@opentiny/next-sdk 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.dev.js +987 -336
- package/dist/index.es.js +11753 -11150
- package/dist/index.js +2 -2
- package/dist/index.umd.dev.js +987 -336
- package/dist/index.umd.js +55 -55
- package/dist/mcpsdk@1.25.3.dev.js +190 -181
- package/dist/mcpsdk@1.25.3.es.dev.js +190 -181
- package/dist/mcpsdk@1.25.3.es.js +1111 -1105
- package/dist/mcpsdk@1.25.3.js +14 -14
- package/dist/skills/index.d.ts +2 -2
- package/dist/webagent.dev.js +985 -334
- package/dist/webagent.es.dev.js +985 -334
- package/dist/webagent.es.js +11294 -10691
- package/dist/webagent.js +58 -58
- package/dist/webmcp-full.dev.js +190 -181
- package/dist/webmcp-full.es.dev.js +190 -181
- package/dist/webmcp-full.es.js +74 -68
- package/dist/webmcp-full.js +1 -1
- package/package.json +1 -1
- package/skills/index.ts +4 -4
package/dist/webmcp-full.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
`:""},this._extScope=$,this._scope=new r.Scope({parent:$}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,E){const N=this._extScope.value($,E);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue($,E){return this._extScope.getValue($,E)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,E,N,ee){const ne=this._scope.toName(E);return N!==void 0&&ee&&(this._constants[ne.str]=N),this._leafNode(new o($,ne,N)),ne}const($,E,N){return this._def(r.varKinds.const,$,E,N)}let($,E,N){return this._def(r.varKinds.let,$,E,N)}var($,E,N){return this._def(r.varKinds.var,$,E,N)}assign($,E,N){return this._leafNode(new i($,E,N))}add($,E){return this._leafNode(new c($,t.operators.ADD,E))}code($){return typeof $=="function"?$():$!==e.nil&&this._leafNode(new m($)),this}object(...$){const E=["{"];for(const[N,ee]of $)E.length>1&&E.push(","),E.push(N),(N!==ee||this.opts.es5)&&(E.push(":"),(0,e.addCodeArg)(E,ee));return E.push("}"),new e._Code(E)}if($,E,N){if(this._blockNode(new v($)),E&&N)this.code(E).else().code(N).endIf();else if(E)this.code(E).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new v($))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(v,h)}_for($,E){return this._blockNode($),E&&this.code(E).endFor(),this}for($,E){return this._for(new g($),E)}forRange($,E,N,ee,ne=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName($);return this._for(new b(ne,me,E,N),()=>ee(me))}forOf($,E,N,ee=r.varKinds.const){const ne=this._scope.toName($);if(this.opts.es5){const me=E instanceof e.Name?E:this.var("_arr",E);return this.forRange("_i",0,(0,e._)`${me}.length`,fe=>{this.var(ne,(0,e._)`${me}[${fe}]`),N(ne)})}return this._for(new w("of",ee,ne,E),()=>N(ne))}forIn($,E,N,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf($,(0,e._)`Object.keys(${E})`,N);const ne=this._scope.toName($);return this._for(new w("in",ee,ne,E),()=>N(ne))}endFor(){return this._endBlockNode(f)}label($){return this._leafNode(new u($))}break($){return this._leafNode(new l($))}return($){const E=new S;if(this._blockNode(E),this.code($),E.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try($,E,N){if(!E&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new C;if(this._blockNode(ee),this.code($),E){const ne=this.name("e");this._currNode=ee.catch=new j(ne),E(ne)}return N&&(this._currNode=ee.finally=new D,this.code(N)),this._endBlockNode(j,D)}throw($){return this._leafNode(new d($))}block($,E){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(E),this}endBlock($){const E=this._blockStarts.pop();if(E===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-E;if(N<0||$!==void 0&&N!==$)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${$} expected`);return this._nodes.length=E,this}func($,E=e.nil,N,ee){return this._blockNode(new k($,E,N)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(k)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,E){const N=this._currNode;if(N instanceof $||E&&N instanceof E)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${E?`${$.kind}/${E.kind}`:$.kind}"`)}_elseNode($){const E=this._currNode;if(!(E instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=E.else=$,this}get _root(){return this._nodes[0]}get _currNode(){const $=this._nodes;return $[$.length-1]}set _currNode($){const E=this._nodes;E[E.length-1]=$}}t.CodeGen=A;function V(I,$){for(const E in $)I[E]=(I[E]||0)+($[E]||0);return I}function J(I,$){return $ instanceof e._CodeOrName?V(I,$.names):I}function Y(I,$,E){if(I instanceof e.Name)return N(I);if(!ee(I))return I;return new e._Code(I._items.reduce((ne,me)=>(me instanceof e.Name&&(me=N(me)),me instanceof e._Code?ne.push(...me._items):ne.push(me),ne),[]));function N(ne){const me=E[ne.str];return me===void 0||$[ne.str]!==1?ne:(delete $[ne.str],me)}function ee(ne){return ne instanceof e._Code&&ne._items.some(me=>me instanceof e.Name&&$[me.str]===1&&E[me.str]!==void 0)}}function ge(I,$){for(const E in $)I[E]=(I[E]||0)-($[E]||0)}function Ge(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,e._)`!${z(I)}`}t.not=Ge;const Ye=P(t.operators.AND);function be(...I){return I.reduce(Ye)}t.and=be;const Tt=P(t.operators.OR);function L(...I){return I.reduce(Tt)}t.or=L;function P(I){return($,E)=>$===e.nil?E:E===e.nil?$:(0,e._)`${z($)} ${I} ${z(E)}`}function z(I){return I instanceof e.Name?I:(0,e._)`(${I})`}})(ha)),ha}var ce={},vi;function he(){if(vi)return ce;vi=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.checkStrictMode=ce.getErrorPath=ce.Type=ce.useFunc=ce.setEvaluated=ce.evaluatedPropsToName=ce.mergeEvaluated=ce.eachItem=ce.unescapeJsonPointer=ce.escapeJsonPointer=ce.escapeFragment=ce.unescapeFragment=ce.schemaRefOrVal=ce.schemaHasRulesButRef=ce.schemaHasRules=ce.checkUnknownRules=ce.alwaysValidSchema=ce.toHash=void 0;const t=ie(),e=xn();function r(w){const k={};for(const S of w)k[S]=!0;return k}ce.toHash=r;function n(w,k){return typeof k=="boolean"?k:Object.keys(k).length===0?!0:(s(w,k),!a(k,w.self.RULES.all))}ce.alwaysValidSchema=n;function s(w,k=w.schema){const{opts:S,self:C}=w;if(!S.strictSchema||typeof k=="boolean")return;const j=C.RULES.keywords;for(const D in k)j[D]||b(w,`unknown keyword: "${D}"`)}ce.checkUnknownRules=s;function a(w,k){if(typeof w=="boolean")return!w;for(const S in w)if(k[S])return!0;return!1}ce.schemaHasRules=a;function o(w,k){if(typeof w=="boolean")return!w;for(const S in w)if(S!=="$ref"&&k.all[S])return!0;return!1}ce.schemaHasRulesButRef=o;function i({topSchemaRef:w,schemaPath:k},S,C,j){if(!j){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,t._)`${S}`}return(0,t._)`${w}${k}${(0,t.getProperty)(C)}`}ce.schemaRefOrVal=i;function c(w){return d(decodeURIComponent(w))}ce.unescapeFragment=c;function u(w){return encodeURIComponent(l(w))}ce.escapeFragment=u;function l(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}ce.escapeJsonPointer=l;function d(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}ce.unescapeJsonPointer=d;function m(w,k){if(Array.isArray(w))for(const S of w)k(S);else k(w)}ce.eachItem=m;function _({mergeNames:w,mergeToName:k,mergeValues:S,resultToName:C}){return(j,D,A,V)=>{const J=A===void 0?D:A instanceof t.Name?(D instanceof t.Name?w(j,D,A):k(j,D,A),A):D instanceof t.Name?(k(j,A,D),D):S(D,A);return V===t.Name&&!(J instanceof t.Name)?C(j,J):J}}ce.mergeEvaluated={props:_({mergeNames:(w,k,S)=>w.if((0,t._)`${S} !== true && ${k} !== undefined`,()=>{w.if((0,t._)`${k} === true`,()=>w.assign(S,!0),()=>w.assign(S,(0,t._)`${S} || {}`).code((0,t._)`Object.assign(${S}, ${k})`))}),mergeToName:(w,k,S)=>w.if((0,t._)`${S} !== true`,()=>{k===!0?w.assign(S,!0):(w.assign(S,(0,t._)`${S} || {}`),y(w,S,k))}),mergeValues:(w,k)=>w===!0?!0:{...w,...k},resultToName:p}),items:_({mergeNames:(w,k,S)=>w.if((0,t._)`${S} !== true && ${k} !== undefined`,()=>w.assign(S,(0,t._)`${k} === true ? true : ${S} > ${k} ? ${S} : ${k}`)),mergeToName:(w,k,S)=>w.if((0,t._)`${S} !== true`,()=>w.assign(S,k===!0?!0:(0,t._)`${S} > ${k} ? ${S} : ${k}`)),mergeValues:(w,k)=>w===!0?!0:Math.max(w,k),resultToName:(w,k)=>w.var("items",k)})};function p(w,k){if(k===!0)return w.var("props",!0);const S=w.var("props",(0,t._)`{}`);return k!==void 0&&y(w,S,k),S}ce.evaluatedPropsToName=p;function y(w,k,S){Object.keys(S).forEach(C=>w.assign((0,t._)`${k}${(0,t.getProperty)(C)}`,!0))}ce.setEvaluated=y;const h={};function v(w,k){return w.scopeValue("func",{ref:k,code:h[k.code]||(h[k.code]=new e._Code(k.code))})}ce.useFunc=v;var f;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(f||(ce.Type=f={}));function g(w,k,S){if(w instanceof t.Name){const C=k===f.Num;return S?C?(0,t._)`"[" + ${w} + "]"`:(0,t._)`"['" + ${w} + "']"`:C?(0,t._)`"/" + ${w}`:(0,t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,t.getProperty)(w).toString():"/"+l(w)}ce.getErrorPath=g;function b(w,k,S=w.opts.strictSchema){if(S){if(k=`strict mode: ${k}`,S===!0)throw new Error(k);w.self.logger.warn(k)}}return ce.checkStrictMode=b,ce}var In={},wi;function Zt(){if(wi)return In;wi=1,Object.defineProperty(In,"__esModule",{value:!0});const t=ie(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return In.default=e,In}var bi;function Cn(){return bi||(bi=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=ie(),r=he(),n=Zt();t.keywordError={message:({keyword:h})=>(0,e.str)`must pass "${h}" keyword validation`},t.keyword$DataError={message:({keyword:h,schemaType:v})=>v?(0,e.str)`"${h}" keyword must be ${v} ($data)`:(0,e.str)`"${h}" keyword is invalid ($data)`};function s(h,v=t.keywordError,f,g){const{it:b}=h,{gen:w,compositeRule:k,allErrors:S}=b,C=d(h,v,f);g??(k||S)?c(w,C):u(b,(0,e._)`[${C}]`)}t.reportError=s;function a(h,v=t.keywordError,f){const{it:g}=h,{gen:b,compositeRule:w,allErrors:k}=g,S=d(h,v,f);c(b,S),w||k||u(g,n.default.vErrors)}t.reportExtraError=a;function o(h,v){h.assign(n.default.errors,v),h.if((0,e._)`${n.default.vErrors} !== null`,()=>h.if(v,()=>h.assign((0,e._)`${n.default.vErrors}.length`,v),()=>h.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function i({gen:h,keyword:v,schemaValue:f,data:g,errsCount:b,it:w}){if(b===void 0)throw new Error("ajv implementation error");const k=h.name("err");h.forRange("i",b,n.default.errors,S=>{h.const(k,(0,e._)`${n.default.vErrors}[${S}]`),h.if((0,e._)`${k}.instancePath === undefined`,()=>h.assign((0,e._)`${k}.instancePath`,(0,e.strConcat)(n.default.instancePath,w.errorPath))),h.assign((0,e._)`${k}.schemaPath`,(0,e.str)`${w.errSchemaPath}/${v}`),w.opts.verbose&&(h.assign((0,e._)`${k}.schema`,f),h.assign((0,e._)`${k}.data`,g))})}t.extendErrors=i;function c(h,v){const f=h.const("err",v);h.if((0,e._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,e._)`[${f}]`),(0,e._)`${n.default.vErrors}.push(${f})`),h.code((0,e._)`${n.default.errors}++`)}function u(h,v){const{gen:f,validateName:g,schemaEnv:b}=h;b.$async?f.throw((0,e._)`new ${h.ValidationError}(${v})`):(f.assign((0,e._)`${g}.errors`,v),f.return(!1))}const l={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(h,v,f){const{createErrors:g}=h.it;return g===!1?(0,e._)`{}`:m(h,v,f)}function m(h,v,f={}){const{gen:g,it:b}=h,w=[_(b,f),p(h,f)];return y(h,v,w),g.object(...w)}function _({errorPath:h},{instancePath:v}){const f=v?(0,e.str)`${h}${(0,r.getErrorPath)(v,r.Type.Str)}`:h;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,f)]}function p({keyword:h,it:{errSchemaPath:v}},{schemaPath:f,parentSchema:g}){let b=g?v:(0,e.str)`${v}/${h}`;return f&&(b=(0,e.str)`${b}${(0,r.getErrorPath)(f,r.Type.Str)}`),[l.schemaPath,b]}function y(h,{params:v,message:f},g){const{keyword:b,data:w,schemaValue:k,it:S}=h,{opts:C,propertyName:j,topSchemaRef:D,schemaPath:A}=S;g.push([l.keyword,b],[l.params,typeof v=="function"?v(h):v||(0,e._)`{}`]),C.messages&&g.push([l.message,typeof f=="function"?f(h):f]),C.verbose&&g.push([l.schema,k],[l.parentSchema,(0,e._)`${D}${A}`],[n.default.data,w]),j&&g.push([l.propertyName,j])}})(fa)),fa}var ki;function wd(){if(ki)return er;ki=1,Object.defineProperty(er,"__esModule",{value:!0}),er.boolOrEmptySchema=er.topBoolOrEmptySchema=void 0;const t=Cn(),e=ie(),r=Zt(),n={message:"boolean schema is false"};function s(i){const{gen:c,schema:u,validateName:l}=i;u===!1?o(i,!1):typeof u=="object"&&u.$async===!0?c.return(r.default.data):(c.assign((0,e._)`${l}.errors`,null),c.return(!0))}er.topBoolOrEmptySchema=s;function a(i,c){const{gen:u,schema:l}=i;l===!1?(u.var(c,!1),o(i)):u.var(c,!0)}er.boolOrEmptySchema=a;function o(i,c){const{gen:u,data:l}=i,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,t.reportError)(d,n,void 0,c)}return er}var qe={},tr={},$i;function Si(){if($i)return tr;$i=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.getRules=tr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(s){return typeof s=="string"&&e.has(s)}tr.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return tr.getRules=n,tr}var It={},Ti;function Ei(){if(Ti)return It;Ti=1,Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0;function t({schema:n,self:s},a){const o=s.RULES.types[a];return o&&o!==!0&&e(n,o)}It.schemaHasRulesForType=t;function e(n,s){return s.rules.some(a=>r(n,a))}It.shouldUseGroup=e;function r(n,s){var a;return n[s.keyword]!==void 0||((a=s.definition.implements)===null||a===void 0?void 0:a.some(o=>n[o]!==void 0))}return It.shouldUseRule=r,It}var Ri;function On(){if(Ri)return qe;Ri=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;const t=Si(),e=Ei(),r=Cn(),n=ie(),s=he();var a;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(a||(qe.DataType=a={}));function o(f){const g=i(f.type);if(g.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&g.push("null")}return g}qe.getSchemaTypes=o;function i(f){const g=Array.isArray(f)?f:f?[f]:[];if(g.every(t.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}qe.getJSONTypes=i;function c(f,g){const{gen:b,data:w,opts:k}=f,S=l(g,k.coerceTypes),C=g.length>0&&!(S.length===0&&g.length===1&&(0,e.schemaHasRulesForType)(f,g[0]));if(C){const j=p(g,w,k.strictNumbers,a.Wrong);b.if(j,()=>{S.length?d(f,g,S):h(f)})}return C}qe.coerceAndCheckDataType=c;const u=new Set(["string","number","integer","boolean","null"]);function l(f,g){return g?f.filter(b=>u.has(b)||g==="array"&&b==="array"):[]}function d(f,g,b){const{gen:w,data:k,opts:S}=f,C=w.let("dataType",(0,n._)`typeof ${k}`),j=w.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&w.if((0,n._)`${C} == 'object' && Array.isArray(${k}) && ${k}.length == 1`,()=>w.assign(k,(0,n._)`${k}[0]`).assign(C,(0,n._)`typeof ${k}`).if(p(g,k,S.strictNumbers),()=>w.assign(j,k))),w.if((0,n._)`${j} !== undefined`);for(const A of b)(u.has(A)||A==="array"&&S.coerceTypes==="array")&&D(A);w.else(),h(f),w.endIf(),w.if((0,n._)`${j} !== undefined`,()=>{w.assign(k,j),m(f,j)});function D(A){switch(A){case"string":w.elseIf((0,n._)`${C} == "number" || ${C} == "boolean"`).assign(j,(0,n._)`"" + ${k}`).elseIf((0,n._)`${k} === null`).assign(j,(0,n._)`""`);return;case"number":w.elseIf((0,n._)`${C} == "boolean" || ${k} === null
|
|
3
3
|
|| (${C} == "string" && ${k} && ${k} == +${k})`).assign(j,(0,n._)`+${k}`);return;case"integer":w.elseIf((0,n._)`${C} === "boolean" || ${k} === null
|
|
4
4
|
|| (${C} === "string" && ${k} && ${k} == +${k} && !(${k} % 1))`).assign(j,(0,n._)`+${k}`);return;case"boolean":w.elseIf((0,n._)`${k} === "false" || ${k} === 0 || ${k} === null`).assign(j,!1).elseIf((0,n._)`${k} === "true" || ${k} === 1`).assign(j,!0);return;case"null":w.elseIf((0,n._)`${k} === "" || ${k} === 0 || ${k} === false`),w.assign(j,null);return;case"array":w.elseIf((0,n._)`${C} === "string" || ${C} === "number"
|
|
5
|
-
|| ${C} === "boolean" || ${k} === null`).assign(j,(0,n._)`[${k}]`)}}}function m({gen:f,parentData:g,parentDataProperty:b},w){f.if((0,n._)`${g} !== undefined`,()=>f.assign((0,n._)`${g}[${b}]`,w))}function _(f,g,b,w=a.Correct){const k=w===a.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(f){case"null":return(0,n._)`${g} ${k} null`;case"array":S=(0,n._)`Array.isArray(${g})`;break;case"object":S=(0,n._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":S=C((0,n._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":S=C();break;default:return(0,n._)`typeof ${g} ${k} ${f}`}return w===a.Correct?S:(0,n.not)(S);function C(j=n.nil){return(0,n.and)((0,n._)`typeof ${g} == "number"`,j,b?(0,n._)`isFinite(${g})`:n.nil)}}qe.checkDataType=_;function p(f,g,b,w){if(f.length===1)return _(f[0],g,b,w);let k;const S=(0,s.toHash)(f);if(S.array&&S.object){const C=(0,n._)`typeof ${g} != "object"`;k=S.null?C:(0,n._)`!${g} || ${C}`,delete S.null,delete S.array,delete S.object}else k=n.nil;S.number&&delete S.integer;for(const C in S)k=(0,n.and)(k,_(C,g,b,w));return k}qe.checkDataTypes=p;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:g})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${g}}`};function h(f){const g=v(f);(0,r.reportError)(g,y)}qe.reportTypeError=h;function v(f){const{gen:g,data:b,schema:w}=f,k=(0,s.schemaRefOrVal)(f,w,"type");return{gen:g,keyword:"type",data:b,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:f}}return qe}var Mr={},Pi;function bd(){if(Pi)return Mr;Pi=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.assignDefaults=void 0;const t=ie(),e=he();function r(s,a){const{properties:o,items:i}=s.schema;if(a==="object"&&o)for(const c in o)n(s,c,o[c].default);else a==="array"&&Array.isArray(i)&&i.forEach((c,u)=>n(s,u,c.default))}Mr.assignDefaults=r;function n(s,a,o){const{gen:i,compositeRule:c,data:u,opts:l}=s;if(o===void 0)return;const d=(0,t._)`${u}${(0,t.getProperty)(a)}`;if(c){(0,e.checkStrictMode)(s,`default is ignored for: ${d}`);return}let m=(0,t._)`${d} === undefined`;l.useDefaults==="empty"&&(m=(0,t._)`${m} || ${d} === null || ${d} === ""`),i.if(m,(0,t._)`${d} = ${(0,t.stringify)(o)}`)}return Mr}var ft={},ye={},xi;function ht(){if(xi)return ye;xi=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const t=ie(),e=he(),r=Zt(),n=he();function s(f,g){const{gen:b,data:w,it:k}=f;b.if(l(b,w,g,k.opts.ownProperties),()=>{f.setParams({missingProperty:(0,t._)`${g}`},!0),f.error()})}ye.checkReportMissingProp=s;function a({gen:f,data:g,it:{opts:b}},w,k){return(0,t.or)(...w.map(S=>(0,t.and)(l(f,g,S,b.ownProperties),(0,t._)`${k} = ${S}`)))}ye.checkMissingProp=a;function o(f,g){f.setParams({missingProperty:g},!0),f.error()}ye.reportMissingProp=o;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=i;function c(f,g,b){return(0,t._)`${i(f)}.call(${g}, ${b})`}ye.isOwnProperty=c;function u(f,g,b,w){const k=(0,t._)`${g}${(0,t.getProperty)(b)} !== undefined`;return w?(0,t._)`${k} && ${c(f,g,b)}`:k}ye.propertyInData=u;function l(f,g,b,w){const k=(0,t._)`${g}${(0,t.getProperty)(b)} === undefined`;return w?(0,t.or)(k,(0,t.not)(c(f,g,b))):k}ye.noPropertyInData=l;function d(f){return f?Object.keys(f).filter(g=>g!=="__proto__"):[]}ye.allSchemaProperties=d;function m(f,g){return d(g).filter(b=>!(0,e.alwaysValidSchema)(f,g[b]))}ye.schemaProperties=m;function _({schemaCode:f,data:g,it:{gen:b,topSchemaRef:w,schemaPath:k,errorPath:S},it:C},j,D,A){const V=A?(0,t._)`${f}, ${g}, ${w}${k}`:g,J=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,S)],[r.default.parentData,C.parentData],[r.default.parentDataProperty,C.parentDataProperty],[r.default.rootData,r.default.rootData]];C.opts.dynamicRef&&J.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Y=(0,t._)`${V}, ${b.object(...J)}`;return D!==t.nil?(0,t._)`${j}.call(${D}, ${Y})`:(0,t._)`${j}(${Y})`}ye.callValidateCode=_;const p=(0,t._)`new RegExp`;function y({gen:f,it:{opts:g}},b){const w=g.unicodeRegExp?"u":"",{regExp:k}=g.code,S=k(b,w);return f.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,t._)`${k.code==="new RegExp"?p:(0,n.useFunc)(f,k)}(${b}, ${w})`})}ye.usePattern=y;function h(f){const{gen:g,data:b,keyword:w,it:k}=f,S=g.name("valid");if(k.allErrors){const j=g.let("valid",!0);return C(()=>g.assign(j,!1)),j}return g.var(S,!0),C(()=>g.break()),S;function C(j){const D=g.const("len",(0,t._)`${b}.length`);g.forRange("i",0,D,A=>{f.subschema({keyword:w,dataProp:A,dataPropType:e.Type.Num},S),g.if((0,t.not)(S),j)})}}ye.validateArray=h;function v(f){const{gen:g,schema:b,keyword:w,it:k}=f;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,e.alwaysValidSchema)(k,D))&&!k.opts.unevaluated)return;const C=g.let("valid",!1),j=g.name("_valid");g.block(()=>b.forEach((D,A)=>{const V=f.subschema({keyword:w,schemaProp:A,compositeRule:!0},j);g.assign(C,(0,t._)`${C} || ${j}`),f.mergeValidEvaluated(V,j)||g.if((0,t.not)(C))})),f.result(C,()=>f.reset(),()=>f.error(!0))}return ye.validateUnion=v,ye}var Ii;function kd(){if(Ii)return ft;Ii=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const t=ie(),e=Zt(),r=ht(),n=Cn();function s(m,_){const{gen:p,keyword:y,schema:h,parentSchema:v,it:f}=m,g=_.macro.call(f.self,h,v,f),b=u(p,y,g);f.opts.validateSchema!==!1&&f.self.validateSchema(g,!0);const w=p.name("valid");m.subschema({schema:g,schemaPath:t.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:b,compositeRule:!0},w),m.pass(w,()=>m.error(!0))}ft.macroKeywordCode=s;function a(m,_){var p;const{gen:y,keyword:h,schema:v,parentSchema:f,$data:g,it:b}=m;c(b,_);const w=!g&&_.compile?_.compile.call(b.self,v,f,b):_.validate,k=u(y,h,w),S=y.let("valid");m.block$data(S,C),m.ok((p=_.valid)!==null&&p!==void 0?p:S);function C(){if(_.errors===!1)A(),_.modifying&&o(m),V(()=>m.error());else{const J=_.async?j():D();_.modifying&&o(m),V(()=>i(m,J))}}function j(){const J=y.let("ruleErrs",null);return y.try(()=>A((0,t._)`await `),Y=>y.assign(S,!1).if((0,t._)`${Y} instanceof ${b.ValidationError}`,()=>y.assign(J,(0,t._)`${Y}.errors`),()=>y.throw(Y))),J}function D(){const J=(0,t._)`${k}.errors`;return y.assign(J,null),A(t.nil),J}function A(J=_.async?(0,t._)`await `:t.nil){const Y=b.opts.passContext?e.default.this:e.default.self,ge=!("compile"in _&&!g||_.schema===!1);y.assign(S,(0,t._)`${J}${(0,r.callValidateCode)(m,k,Y,ge)}`,_.modifying)}function V(J){var Y;y.if((0,t.not)((Y=_.valid)!==null&&Y!==void 0?Y:S),J)}}ft.funcKeywordCode=a;function o(m){const{gen:_,data:p,it:y}=m;_.if(y.parentData,()=>_.assign(p,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function i(m,_){const{gen:p}=m;p.if((0,t._)`Array.isArray(${_})`,()=>{p.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${_} : ${e.default.vErrors}.concat(${_})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},_){if(_.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,_,p){if(p===void 0)throw new Error(`keyword "${_}" failed to compile`);return m.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,t.stringify)(p)})}function l(m,_,p=!1){return!_.length||_.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||p&&typeof m>"u")}ft.validSchemaType=l;function d({schema:m,opts:_,self:p,errSchemaPath:y},h,v){if(Array.isArray(h.keyword)?!h.keyword.includes(v):h.keyword!==v)throw new Error("ajv implementation error");const f=h.dependencies;if(f?.some(g=>!Object.prototype.hasOwnProperty.call(m,g)))throw new Error(`parent schema must have dependencies of ${v}: ${f.join(",")}`);if(h.validateSchema&&!h.validateSchema(m[v])){const b=`keyword "${v}" value is invalid at path "${y}": `+p.errorsText(h.validateSchema.errors);if(_.validateSchema==="log")p.logger.error(b);else throw new Error(b)}}return ft.validateKeywordUsage=d,ft}var Ct={},Ci;function $d(){if(Ci)return Ct;Ci=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.extendSubschemaMode=Ct.extendSubschemaData=Ct.getSubschema=void 0;const t=ie(),e=he();function r(a,{keyword:o,schemaProp:i,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const m=a.schema[o];return i===void 0?{schema:m,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:m[i],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,e.escapeFragment)(i)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Ct.getSubschema=r;function n(a,o,{dataProp:i,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=o;if(i!==void 0){const{errorPath:p,dataPathArr:y,opts:h}=o,v=m.let("data",(0,t._)`${o.data}${(0,t.getProperty)(i)}`,!0);_(v),a.errorPath=(0,t.str)`${p}${(0,e.getErrorPath)(i,c,h.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${i}`,a.dataPathArr=[...y,a.parentDataProperty]}if(u!==void 0){const p=u instanceof t.Name?u:m.let("data",u,!0);_(p),d!==void 0&&(a.propertyName=d)}l&&(a.dataTypes=l);function _(p){a.data=p,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,p]}}Ct.extendSubschemaData=n;function s(a,{jtdDiscriminator:o,jtdMetadata:i,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(a.compositeRule=c),u!==void 0&&(a.createErrors=u),l!==void 0&&(a.allErrors=l),a.jtdDiscriminator=o,a.jtdMetadata=i}return Ct.extendSubschemaMode=s,Ct}var Ke={},_a,Oi;function Ni(){return Oi||(Oi=1,_a=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){var o=a[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),_a}var ga={exports:{}},Ai;function Sd(){if(Ai)return ga.exports;Ai=1;var t=ga.exports=function(n,s,a){typeof s=="function"&&(a=s,s={}),a=s.cb||a;var o=typeof a=="function"?a:a.pre||function(){},i=a.post||function(){};e(s,o,i,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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 e(n,s,a,o,i,c,u,l,d,m){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,i,c,u,l,d,m);for(var _ in o){var p=o[_];if(Array.isArray(p)){if(_ in t.arrayKeywords)for(var y=0;y<p.length;y++)e(n,s,a,p[y],i+"/"+_+"/"+y,c,i,_,o,y)}else if(_ in t.propsKeywords){if(p&&typeof p=="object")for(var h in p)e(n,s,a,p[h],i+"/"+_+"/"+r(h),c,i,_,o,h)}else(_ in t.keywords||n.allKeys&&!(_ in t.skipKeywords))&&e(n,s,a,p,i+"/"+_,c,i,_,o)}a(o,i,c,u,l,d,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return ga.exports}var ji;function Nn(){if(ji)return Ke;ji=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;const t=he(),e=Ni(),r=Sd(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,h=!0){return typeof y=="boolean"?!0:h===!0?!o(y):h?i(y)<=h:!1}Ke.inlineRef=s;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(y){for(const h in y){if(a.has(h))return!0;const v=y[h];if(Array.isArray(v)&&v.some(o)||typeof v=="object"&&o(v))return!0}return!1}function i(y){let h=0;for(const v in y){if(v==="$ref")return 1/0;if(h++,!n.has(v)&&(typeof y[v]=="object"&&(0,t.eachItem)(y[v],f=>h+=i(f)),h===1/0))return 1/0}return h}function c(y,h="",v){v!==!1&&(h=d(h));const f=y.parse(h);return u(y,f)}Ke.getFullPath=c;function u(y,h){return y.serialize(h).split("#")[0]+"#"}Ke._getFullPath=u;const l=/#\/?$/;function d(y){return y?y.replace(l,""):""}Ke.normalizeId=d;function m(y,h,v){return v=d(v),y.resolve(h,v)}Ke.resolveUrl=m;const _=/^[a-z_][-a-z0-9._]*$/i;function p(y,h){if(typeof y=="boolean")return{};const{schemaId:v,uriResolver:f}=this.opts,g=d(y[v]||h),b={"":g},w=c(f,g,!1),k={},S=new Set;return r(y,{allKeys:!0},(D,A,V,J)=>{if(J===void 0)return;const Y=w+A;let ge=b[J];typeof D[v]=="string"&&(ge=Ge.call(this,D[v])),Ye.call(this,D.$anchor),Ye.call(this,D.$dynamicAnchor),b[A]=ge;function Ge(be){const Tt=this.opts.uriResolver.resolve;if(be=d(ge?Tt(ge,be):be),S.has(be))throw j(be);S.add(be);let L=this.refs[be];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?C(D,L.schema,be):be!==d(Y)&&(be[0]==="#"?(C(D,k[be],be),k[be]=D):this.refs[be]=Y),be}function Ye(be){if(typeof be=="string"){if(!_.test(be))throw new Error(`invalid anchor "${be}"`);Ge.call(this,`#${be}`)}}}),k;function C(D,A,V){if(A!==void 0&&!e(D,A))throw j(V)}function j(D){return new Error(`reference "${D}" resolves to more than one schema`)}}return Ke.getSchemaRefs=p,Ke}var Mi;function An(){if(Mi)return xt;Mi=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.getData=xt.KeywordCxt=xt.validateFunctionCode=void 0;const t=wd(),e=On(),r=Ei(),n=On(),s=bd(),a=kd(),o=$d(),i=ie(),c=Zt(),u=Nn(),l=he(),d=Cn();function m(R){if(w(R)&&(S(R),b(R))){h(R);return}_(R,()=>(0,t.topBoolOrEmptySchema)(R))}xt.validateFunctionCode=m;function _({gen:R,validateName:x,schema:M,schemaEnv:U,opts:re},ue){re.code.es5?R.func(x,(0,i._)`${c.default.data}, ${c.default.valCxt}`,U.$async,()=>{R.code((0,i._)`"use strict"; ${f(M,re)}`),y(R,re),R.code(ue)}):R.func(x,(0,i._)`${c.default.data}, ${p(re)}`,U.$async,()=>R.code(f(M,re)).code(ue))}function p(R){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${R.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(R,x){R.if(c.default.valCxt,()=>{R.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),R.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),R.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),R.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),x.dynamicRef&&R.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{R.var(c.default.instancePath,(0,i._)`""`),R.var(c.default.parentData,(0,i._)`undefined`),R.var(c.default.parentDataProperty,(0,i._)`undefined`),R.var(c.default.rootData,c.default.data),x.dynamicRef&&R.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function h(R){const{schema:x,opts:M,gen:U}=R;_(R,()=>{M.$comment&&x.$comment&&J(R),D(R),U.let(c.default.vErrors,null),U.let(c.default.errors,0),M.unevaluated&&v(R),C(R),Y(R)})}function v(R){const{gen:x,validateName:M}=R;R.evaluated=x.const("evaluated",(0,i._)`${M}.evaluated`),x.if((0,i._)`${R.evaluated}.dynamicProps`,()=>x.assign((0,i._)`${R.evaluated}.props`,(0,i._)`undefined`)),x.if((0,i._)`${R.evaluated}.dynamicItems`,()=>x.assign((0,i._)`${R.evaluated}.items`,(0,i._)`undefined`))}function f(R,x){const M=typeof R=="object"&&R[x.schemaId];return M&&(x.code.source||x.code.process)?(0,i._)`/*# sourceURL=${M} */`:i.nil}function g(R,x){if(w(R)&&(S(R),b(R))){k(R,x);return}(0,t.boolOrEmptySchema)(R,x)}function b({schema:R,self:x}){if(typeof R=="boolean")return!R;for(const M in R)if(x.RULES.all[M])return!0;return!1}function w(R){return typeof R.schema!="boolean"}function k(R,x){const{schema:M,gen:U,opts:re}=R;re.$comment&&M.$comment&&J(R),A(R),V(R);const ue=U.const("_errs",c.default.errors);C(R,ue),U.var(x,(0,i._)`${ue} === ${c.default.errors}`)}function S(R){(0,l.checkUnknownRules)(R),j(R)}function C(R,x){if(R.opts.jtd)return Ge(R,[],!1,x);const M=(0,e.getSchemaTypes)(R.schema),U=(0,e.coerceAndCheckDataType)(R,M);Ge(R,M,!U,x)}function j(R){const{schema:x,errSchemaPath:M,opts:U,self:re}=R;x.$ref&&U.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(x,re.RULES)&&re.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function D(R){const{schema:x,opts:M}=R;x.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,l.checkStrictMode)(R,"default is ignored in the schema root")}function A(R){const x=R.schema[R.opts.schemaId];x&&(R.baseId=(0,u.resolveUrl)(R.opts.uriResolver,R.baseId,x))}function V(R){if(R.schema.$async&&!R.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:R,schemaEnv:x,schema:M,errSchemaPath:U,opts:re}){const ue=M.$comment;if(re.$comment===!0)R.code((0,i._)`${c.default.self}.logger.log(${ue})`);else if(typeof re.$comment=="function"){const Fe=(0,i.str)`${U}/$comment`,Et=R.scopeValue("root",{ref:x.root});R.code((0,i._)`${c.default.self}.opts.$comment(${ue}, ${Fe}, ${Et}.schema)`)}}function Y(R){const{gen:x,schemaEnv:M,validateName:U,ValidationError:re,opts:ue}=R;M.$async?x.if((0,i._)`${c.default.errors} === 0`,()=>x.return(c.default.data),()=>x.throw((0,i._)`new ${re}(${c.default.vErrors})`)):(x.assign((0,i._)`${U}.errors`,c.default.vErrors),ue.unevaluated&&ge(R),x.return((0,i._)`${c.default.errors} === 0`))}function ge({gen:R,evaluated:x,props:M,items:U}){M instanceof i.Name&&R.assign((0,i._)`${x}.props`,M),U instanceof i.Name&&R.assign((0,i._)`${x}.items`,U)}function Ge(R,x,M,U){const{gen:re,schema:ue,data:Fe,allErrors:Et,opts:tt,self:rt}=R,{RULES:He}=rt;if(ue.$ref&&(tt.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(ue,He))){re.block(()=>ee(R,"$ref",He.all.$ref.definition));return}tt.jtd||be(R,x),re.block(()=>{for(const dt of He.rules)jr(dt);jr(He.post)});function jr(dt){(0,r.shouldUseGroup)(ue,dt)&&(dt.type?(re.if((0,n.checkDataType)(dt.type,Fe,tt.strictNumbers)),Ye(R,dt),x.length===1&&x[0]===dt.type&&M&&(re.else(),(0,n.reportTypeError)(R)),re.endIf()):Ye(R,dt),Et||re.if((0,i._)`${c.default.errors} === ${U||0}`))}}function Ye(R,x){const{gen:M,schema:U,opts:{useDefaults:re}}=R;re&&(0,s.assignDefaults)(R,x.type),M.block(()=>{for(const ue of x.rules)(0,r.shouldUseRule)(U,ue)&&ee(R,ue.keyword,ue.definition,x.type)})}function be(R,x){R.schemaEnv.meta||!R.opts.strictTypes||(Tt(R,x),R.opts.allowUnionTypes||L(R,x),P(R,R.dataTypes))}function Tt(R,x){if(x.length){if(!R.dataTypes.length){R.dataTypes=x;return}x.forEach(M=>{I(R.dataTypes,M)||E(R,`type "${M}" not allowed by context "${R.dataTypes.join(",")}"`)}),$(R,x)}}function L(R,x){x.length>1&&!(x.length===2&&x.includes("null"))&&E(R,"use allowUnionTypes to allow union type keyword")}function P(R,x){const M=R.self.RULES.all;for(const U in M){const re=M[U];if(typeof re=="object"&&(0,r.shouldUseRule)(R.schema,re)){const{type:ue}=re.definition;ue.length&&!ue.some(Fe=>z(x,Fe))&&E(R,`missing type "${ue.join(",")}" for keyword "${U}"`)}}}function z(R,x){return R.includes(x)||x==="number"&&R.includes("integer")}function I(R,x){return R.includes(x)||x==="integer"&&R.includes("number")}function $(R,x){const M=[];for(const U of R.dataTypes)I(x,U)?M.push(U):x.includes("integer")&&U==="number"&&M.push("integer");R.dataTypes=M}function E(R,x){const M=R.schemaEnv.baseId+R.errSchemaPath;x+=` at "${M}" (strictTypes)`,(0,l.checkStrictMode)(R,x,R.opts.strictTypes)}class N{constructor(x,M,U){if((0,a.validateKeywordUsage)(x,M,U),this.gen=x.gen,this.allErrors=x.allErrors,this.keyword=U,this.data=x.data,this.schema=x.schema[U],this.$data=M.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(x,this.schema,U,this.$data),this.schemaType=M.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=M,this.$data)this.schemaCode=x.gen.const("vSchema",fe(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=x.gen.const("_errs",c.default.errors))}result(x,M,U){this.failResult((0,i.not)(x),M,U)}failResult(x,M,U){this.gen.if(x),U?U():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,M){this.failResult((0,i.not)(x),void 0,M)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:M}=this;this.fail((0,i._)`${M} !== undefined && (${(0,i.or)(this.invalid$data(),x)})`)}error(x,M,U){if(M){this.setParams(M),this._error(x,U),this.setParams({});return}this._error(x,U)}_error(x,M){(x?d.reportExtraError:d.reportError)(this,this.def.error,M)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,M){M?Object.assign(this.params,x):this.params=x}block$data(x,M,U=i.nil){this.gen.block(()=>{this.check$data(x,U),M()})}check$data(x=i.nil,M=i.nil){if(!this.$data)return;const{gen:U,schemaCode:re,schemaType:ue,def:Fe}=this;U.if((0,i.or)((0,i._)`${re} === undefined`,M)),x!==i.nil&&U.assign(x,!0),(ue.length||Fe.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),x!==i.nil&&U.assign(x,!1)),U.else()}invalid$data(){const{gen:x,schemaCode:M,schemaType:U,def:re,it:ue}=this;return(0,i.or)(Fe(),Et());function Fe(){if(U.length){if(!(M instanceof i.Name))throw new Error("ajv implementation error");const tt=Array.isArray(U)?U:[U];return(0,i._)`${(0,n.checkDataTypes)(tt,M,ue.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function Et(){if(re.validateSchema){const tt=x.scopeValue("validate$data",{ref:re.validateSchema});return(0,i._)`!${tt}(${M})`}return i.nil}}subschema(x,M){const U=(0,o.getSubschema)(this.it,x);(0,o.extendSubschemaData)(U,this.it,x),(0,o.extendSubschemaMode)(U,x);const re={...this.it,...U,items:void 0,props:void 0};return g(re,M),re}mergeEvaluated(x,M){const{it:U,gen:re}=this;U.opts.unevaluated&&(U.props!==!0&&x.props!==void 0&&(U.props=l.mergeEvaluated.props(re,x.props,U.props,M)),U.items!==!0&&x.items!==void 0&&(U.items=l.mergeEvaluated.items(re,x.items,U.items,M)))}mergeValidEvaluated(x,M){const{it:U,gen:re}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return re.if(M,()=>this.mergeEvaluated(x,i.Name)),!0}}xt.KeywordCxt=N;function ee(R,x,M,U){const re=new N(R,M,x);"code"in M?M.code(re,U):re.$data&&M.validate?(0,a.funcKeywordCode)(re,M):"macro"in M?(0,a.macroKeywordCode)(re,M):(M.compile||M.validate)&&(0,a.funcKeywordCode)(re,M)}const ne=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(R,{dataLevel:x,dataNames:M,dataPathArr:U}){let re,ue;if(R==="")return c.default.rootData;if(R[0]==="/"){if(!ne.test(R))throw new Error(`Invalid JSON-pointer: ${R}`);re=R,ue=c.default.rootData}else{const rt=me.exec(R);if(!rt)throw new Error(`Invalid JSON-pointer: ${R}`);const He=+rt[1];if(re=rt[2],re==="#"){if(He>=x)throw new Error(tt("property/index",He));return U[x-He]}if(He>x)throw new Error(tt("data",He));if(ue=M[x-He],!re)return ue}let Fe=ue;const Et=re.split("/");for(const rt of Et)rt&&(ue=(0,i._)`${ue}${(0,i.getProperty)((0,l.unescapeJsonPointer)(rt))}`,Fe=(0,i._)`${Fe} && ${ue}`);return Fe;function tt(rt,He){return`Cannot access ${rt} ${He} levels up, current level is ${x}`}}return xt.getData=fe,xt}var jn={},zi;function ya(){if(zi)return jn;zi=1,Object.defineProperty(jn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return jn.default=t,jn}var Mn={},qi;function zn(){if(qi)return Mn;qi=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=Nn();class e extends Error{constructor(n,s,a,o){super(o||`can't resolve reference ${a} from id ${s}`),this.missingRef=(0,t.resolveUrl)(n,s,a),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return Mn.default=e,Mn}var nt={},Zi;function va(){if(Zi)return nt;Zi=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.resolveSchema=nt.getCompilingSchema=nt.resolveRef=nt.compileSchema=nt.SchemaEnv=void 0;const t=ie(),e=ya(),r=Zt(),n=Nn(),s=he(),a=An();class o{constructor(v){var f;this.refs={},this.dynamicAnchors={};let g;typeof v.schema=="object"&&(g=v.schema),this.schema=v.schema,this.schemaId=v.schemaId,this.root=v.root||this,this.baseId=(f=v.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(g?.[v.schemaId||"$id"]),this.schemaPath=v.schemaPath,this.localRefs=v.localRefs,this.meta=v.meta,this.$async=g?.$async,this.refs={}}}nt.SchemaEnv=o;function i(h){const v=l.call(this,h);if(v)return v;const f=(0,n.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:g,lines:b}=this.opts.code,{ownProperties:w}=this.opts,k=new t.CodeGen(this.scope,{es5:g,lines:b,ownProperties:w});let S;h.$async&&(S=k.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const C=k.scopeName("validate");h.validateName=C;const j={gen:k,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:k.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:C,ValidationError:S,schema:h.schema,schemaEnv:h,rootId:f,baseId:h.baseId||f,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(h),(0,a.validateFunctionCode)(j),k.optimize(this.opts.code.optimize);const A=k.toString();D=`${k.scopeRefs(r.default.scope)}return ${A}`,this.opts.code.process&&(D=this.opts.code.process(D,h));const J=new Function(`${r.default.self}`,`${r.default.scope}`,D)(this,this.scope.get());if(this.scope.value(C,{ref:J}),J.errors=null,J.schema=h.schema,J.schemaEnv=h,h.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:C,validateCode:A,scopeValues:k._values}),this.opts.unevaluated){const{props:Y,items:ge}=j;J.evaluated={props:Y instanceof t.Name?void 0:Y,items:ge instanceof t.Name?void 0:ge,dynamicProps:Y instanceof t.Name,dynamicItems:ge instanceof t.Name},J.source&&(J.source.evaluated=(0,t.stringify)(J.evaluated))}return h.validate=J,h}catch(A){throw delete h.validate,delete h.validateName,D&&this.logger.error("Error compiling schema, function code:",D),A}finally{this._compilations.delete(h)}}nt.compileSchema=i;function c(h,v,f){var g;f=(0,n.resolveUrl)(this.opts.uriResolver,v,f);const b=h.refs[f];if(b)return b;let w=m.call(this,h,f);if(w===void 0){const k=(g=h.localRefs)===null||g===void 0?void 0:g[f],{schemaId:S}=this.opts;k&&(w=new o({schema:k,schemaId:S,root:h,baseId:v}))}if(w!==void 0)return h.refs[f]=u.call(this,w)}nt.resolveRef=c;function u(h){return(0,n.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:i.call(this,h)}function l(h){for(const v of this._compilations)if(d(v,h))return v}nt.getCompilingSchema=l;function d(h,v){return h.schema===v.schema&&h.root===v.root&&h.baseId===v.baseId}function m(h,v){let f;for(;typeof(f=this.refs[v])=="string";)v=f;return f||this.schemas[v]||_.call(this,h,v)}function _(h,v){const f=this.opts.uriResolver.parse(v),g=(0,n._getFullPath)(this.opts.uriResolver,f);let b=(0,n.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&g===b)return y.call(this,f,h);const w=(0,n.normalizeId)(g),k=this.refs[w]||this.schemas[w];if(typeof k=="string"){const S=_.call(this,h,k);return typeof S?.schema!="object"?void 0:y.call(this,f,S)}if(typeof k?.schema=="object"){if(k.validate||i.call(this,k),w===(0,n.normalizeId)(v)){const{schema:S}=k,{schemaId:C}=this.opts,j=S[C];return j&&(b=(0,n.resolveUrl)(this.opts.uriResolver,b,j)),new o({schema:S,schemaId:C,root:h,baseId:b})}return y.call(this,f,k)}}nt.resolveSchema=_;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(h,{baseId:v,schema:f,root:g}){var b;if(((b=h.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of h.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const C=f[(0,s.unescapeFragment)(S)];if(C===void 0)return;f=C;const j=typeof f=="object"&&f[this.opts.schemaId];!p.has(S)&&j&&(v=(0,n.resolveUrl)(this.opts.uriResolver,v,j))}let w;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,v,f.$ref);w=_.call(this,g,S)}const{schemaId:k}=this.opts;if(w=w||new o({schema:f,schemaId:k,root:g,baseId:v}),w.schema!==w.root.schema)return w}return nt}const Td={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var qn={},zr={exports:{}},wa,Li;function Ui(){if(Li)return wa;Li=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let _="",p=0,y=0;for(y=0;y<m.length;y++)if(p=m[y].charCodeAt(0),p!==48){if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";_+=m[y];break}for(y+=1;y<m.length;y++){if(p=m[y].charCodeAt(0),!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";_+=m[y]}return _}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(m){return m.length=0,!0}function a(m,_,p){if(m.length){const y=r(m);if(y!=="")_.push(y);else return p.error=!0,!1;m.length=0}return!0}function o(m){let _=0;const p={error:!1,address:"",zone:""},y=[],h=[];let v=!1,f=!1,g=a;for(let b=0;b<m.length;b++){const w=m[b];if(!(w==="["||w==="]"))if(w===":"){if(v===!0&&(f=!0),!g(h,y,p))break;if(++_>7){p.error=!0;break}b>0&&m[b-1]===":"&&(v=!0),y.push(":");continue}else if(w==="%"){if(!g(h,y,p))break;g=s}else{h.push(w);continue}}return h.length&&(g===s?p.zone=h.join(""):f?y.push(h.join("")):y.push(r(h))),p.address=y.join(""),p}function i(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const _=o(m);if(_.error)return{host:m,isIPV6:!1};{let p=_.address,y=_.address;return _.zone&&(p+="%"+_.zone,y+="%25"+_.zone),{host:p,isIPV6:!0,escapedHost:y}}}function c(m,_){let p=0;for(let y=0;y<m.length;y++)m[y]===_&&p++;return p}function u(m){let _=m;const p=[];let y=-1,h=0;for(;h=_.length;){if(h===1){if(_===".")break;if(_==="/"){p.push("/");break}else{p.push(_);break}}else if(h===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){p.push("/");break}}else if(h===3&&_==="/.."){p.length!==0&&p.pop(),p.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),p.length!==0&&p.pop();continue}}if((y=_.indexOf("/",1))===-1){p.push(_);break}else p.push(_.slice(0,y)),_=_.slice(y)}return p.join("")}function l(m,_){const p=_!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=p(m.scheme)),m.userinfo!==void 0&&(m.userinfo=p(m.userinfo)),m.host!==void 0&&(m.host=p(m.host)),m.path!==void 0&&(m.path=p(m.path)),m.query!==void 0&&(m.query=p(m.query)),m.fragment!==void 0&&(m.fragment=p(m.fragment)),m}function d(m){const _=[];if(m.userinfo!==void 0&&(_.push(m.userinfo),_.push("@")),m.host!==void 0){let p=unescape(m.host);if(!e(p)){const y=i(p);y.isIPV6===!0?p=`[${y.escapedHost}]`:p=m.host}_.push(p)}return(typeof m.port=="number"||typeof m.port=="string")&&(_.push(":"),_.push(String(m.port))),_.length?_.join(""):void 0}return wa={nonSimpleDomain:n,recomposeAuthority:d,normalizeComponentEncoding:l,removeDotSegments:u,isIPv4:e,isUUID:t,normalizeIPv6:i,stringArrayToHexStripped:r},wa}var ba,Di;function Ed(){if(Di)return ba;Di=1;const{isUUID:t}=Ui(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(w){return r.indexOf(w)!==-1}function s(w){return w.secure===!0?!0:w.secure===!1?!1:w.scheme?w.scheme.length===3&&(w.scheme[0]==="w"||w.scheme[0]==="W")&&(w.scheme[1]==="s"||w.scheme[1]==="S")&&(w.scheme[2]==="s"||w.scheme[2]==="S"):!1}function a(w){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w}function o(w){const k=String(w.scheme).toLowerCase()==="https";return(w.port===(k?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}function i(w){return w.secure=s(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function c(w){if((w.port===(s(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){const[k,S]=w.resourceName.split("?");w.path=k&&k!=="/"?k:void 0,w.query=S,w.resourceName=void 0}return w.fragment=void 0,w}function u(w,k){if(!w.path)return w.error="URN can not be parsed",w;const S=w.path.match(e);if(S){const C=k.scheme||w.scheme||"urn";w.nid=S[1].toLowerCase(),w.nss=S[2];const j=`${C}:${k.nid||w.nid}`,D=b(j);w.path=void 0,D&&(w=D.parse(w,k))}else w.error=w.error||"URN can not be parsed.";return w}function l(w,k){if(w.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=k.scheme||w.scheme||"urn",C=w.nid.toLowerCase(),j=`${S}:${k.nid||C}`,D=b(j);D&&(w=D.serialize(w,k));const A=w,V=w.nss;return A.path=`${C||k.nid}:${V}`,k.skipEscape=!0,A}function d(w,k){const S=w;return S.uuid=S.nss,S.nss=void 0,!k.tolerant&&(!S.uuid||!t(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(w){const k=w;return k.nss=(w.uuid||"").toLowerCase(),k}const _={scheme:"http",domainHost:!0,parse:a,serialize:o},p={scheme:"https",domainHost:_.domainHost,parse:a,serialize:o},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},h={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},g={http:_,https:p,ws:y,wss:h,urn:{scheme:"urn",parse:u,serialize:l,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(g,null);function b(w){return w&&(g[w]||g[w.toLowerCase()])||void 0}return ba={wsIsSecure:s,SCHEMES:g,isValidSchemeName:n,getSchemeHandler:b},ba}var Vi;function Rd(){if(Vi)return zr.exports;Vi=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:a}=Ui(),{SCHEMES:o,getSchemeHandler:i}=Ed();function c(h,v){return typeof h=="string"?h=m(p(h,v),v):typeof h=="object"&&(h=p(m(h,v),v)),h}function u(h,v,f){const g=f?Object.assign({scheme:"null"},f):{scheme:"null"},b=l(p(h,g),p(v,g),g,!0);return g.skipEscape=!0,m(b,g)}function l(h,v,f,g){const b={};return g||(h=p(m(h,f),f),v=p(m(v,f),f)),f=f||{},!f.tolerant&&v.scheme?(b.scheme=v.scheme,b.userinfo=v.userinfo,b.host=v.host,b.port=v.port,b.path=e(v.path||""),b.query=v.query):(v.userinfo!==void 0||v.host!==void 0||v.port!==void 0?(b.userinfo=v.userinfo,b.host=v.host,b.port=v.port,b.path=e(v.path||""),b.query=v.query):(v.path?(v.path[0]==="/"?b.path=e(v.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?b.path="/"+v.path:h.path?b.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+v.path:b.path=v.path,b.path=e(b.path)),b.query=v.query):(b.path=h.path,v.query!==void 0?b.query=v.query:b.query=h.query),b.userinfo=h.userinfo,b.host=h.host,b.port=h.port),b.scheme=h.scheme),b.fragment=v.fragment,b}function d(h,v,f){return typeof h=="string"?(h=unescape(h),h=m(n(p(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=m(n(h,!0),{...f,skipEscape:!0})),typeof v=="string"?(v=unescape(v),v=m(n(p(v,f),!0),{...f,skipEscape:!0})):typeof v=="object"&&(v=m(n(v,!0),{...f,skipEscape:!0})),h.toLowerCase()===v.toLowerCase()}function m(h,v){const f={host:h.host,scheme:h.scheme,userinfo:h.userinfo,port:h.port,path:h.path,query:h.query,nid:h.nid,nss:h.nss,uuid:h.uuid,fragment:h.fragment,reference:h.reference,resourceName:h.resourceName,secure:h.secure,error:""},g=Object.assign({},v),b=[],w=i(g.scheme||f.scheme);w&&w.serialize&&w.serialize(f,g),f.path!==void 0&&(g.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),g.reference!=="suffix"&&f.scheme&&b.push(f.scheme,":");const k=r(f);if(k!==void 0&&(g.reference!=="suffix"&&b.push("//"),b.push(k),f.path&&f.path[0]!=="/"&&b.push("/")),f.path!==void 0){let S=f.path;!g.absolutePath&&(!w||!w.absolutePath)&&(S=e(S)),k===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),b.push(S)}return f.query!==void 0&&b.push("?",f.query),f.fragment!==void 0&&b.push("#",f.fragment),b.join("")}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(h,v){const f=Object.assign({},v),g={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let b=!1;f.reference==="suffix"&&(f.scheme?h=f.scheme+":"+h:h="//"+h);const w=h.match(_);if(w){if(g.scheme=w[1],g.userinfo=w[3],g.host=w[4],g.port=parseInt(w[5],10),g.path=w[6]||"",g.query=w[7],g.fragment=w[8],isNaN(g.port)&&(g.port=w[5]),g.host)if(s(g.host)===!1){const C=t(g.host);g.host=C.host.toLowerCase(),b=C.isIPV6}else b=!0;g.scheme===void 0&&g.userinfo===void 0&&g.host===void 0&&g.port===void 0&&g.query===void 0&&!g.path?g.reference="same-document":g.scheme===void 0?g.reference="relative":g.fragment===void 0?g.reference="absolute":g.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==g.reference&&(g.error=g.error||"URI is not a "+f.reference+" reference.");const k=i(f.scheme||g.scheme);if(!f.unicodeSupport&&(!k||!k.unicodeSupport)&&g.host&&(f.domainHost||k&&k.domainHost)&&b===!1&&a(g.host))try{g.host=URL.domainToASCII(g.host.toLowerCase())}catch(S){g.error=g.error||"Host's domain name can not be converted to ASCII: "+S}(!k||k&&!k.skipNormalize)&&(h.indexOf("%")!==-1&&(g.scheme!==void 0&&(g.scheme=unescape(g.scheme)),g.host!==void 0&&(g.host=unescape(g.host))),g.path&&(g.path=escape(unescape(g.path))),g.fragment&&(g.fragment=encodeURI(decodeURIComponent(g.fragment)))),k&&k.parse&&k.parse(g,f)}else g.error=g.error||"URI can not be parsed.";return g}const y={SCHEMES:o,normalize:c,resolve:u,resolveComponent:l,equal:d,serialize:m,parse:p};return zr.exports=y,zr.exports.default=y,zr.exports.fastUri=y,zr.exports}var Fi;function Pd(){if(Fi)return qn;Fi=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=Rd();return t.code='require("ajv/dist/runtime/uri").default',qn.default=t,qn}var Hi;function xd(){return Hi||(Hi=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=An();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=ie();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ya(),s=zn(),a=Si(),o=va(),i=ie(),c=Nn(),u=On(),l=he(),d=Td,m=Pd(),_=(L,P)=>new RegExp(L,P);_.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function g(L){var P,z,I,$,E,N,ee,ne,me,fe,R,x,M,U,re,ue,Fe,Et,tt,rt,He,jr,dt,fi,hi;const Rn=L.strict,pi=(P=L.code)===null||P===void 0?void 0:P.optimize,yd=pi===!0||pi===void 0?1:pi||0,vd=(I=(z=L.code)===null||z===void 0?void 0:z.regExp)!==null&&I!==void 0?I:_,fw=($=L.uriResolver)!==null&&$!==void 0?$:m.default;return{strictSchema:(N=(E=L.strictSchema)!==null&&E!==void 0?E:Rn)!==null&&N!==void 0?N:!0,strictNumbers:(ne=(ee=L.strictNumbers)!==null&&ee!==void 0?ee:Rn)!==null&&ne!==void 0?ne:!0,strictTypes:(fe=(me=L.strictTypes)!==null&&me!==void 0?me:Rn)!==null&&fe!==void 0?fe:"log",strictTuples:(x=(R=L.strictTuples)!==null&&R!==void 0?R:Rn)!==null&&x!==void 0?x:"log",strictRequired:(U=(M=L.strictRequired)!==null&&M!==void 0?M:Rn)!==null&&U!==void 0?U:!1,code:L.code?{...L.code,optimize:yd,regExp:vd}:{optimize:yd,regExp:vd},loopRequired:(re=L.loopRequired)!==null&&re!==void 0?re:f,loopEnum:(ue=L.loopEnum)!==null&&ue!==void 0?ue:f,meta:(Fe=L.meta)!==null&&Fe!==void 0?Fe:!0,messages:(Et=L.messages)!==null&&Et!==void 0?Et:!0,inlineRefs:(tt=L.inlineRefs)!==null&&tt!==void 0?tt:!0,schemaId:(rt=L.schemaId)!==null&&rt!==void 0?rt:"$id",addUsedSchema:(He=L.addUsedSchema)!==null&&He!==void 0?He:!0,validateSchema:(jr=L.validateSchema)!==null&&jr!==void 0?jr:!0,validateFormats:(dt=L.validateFormats)!==null&&dt!==void 0?dt:!0,unicodeRegExp:(fi=L.unicodeRegExp)!==null&&fi!==void 0?fi:!0,int32range:(hi=L.int32range)!==null&&hi!==void 0?hi:!0,uriResolver:fw}}class b{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...g(P)};const{es5:z,lines:I}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:z,lines:I}),this.logger=V(P.logger);const $=P.validateFormats;P.validateFormats=!1,this.RULES=(0,a.getRules)(),w.call(this,h,P,"NOT SUPPORTED"),w.call(this,v,P,"DEPRECATED","warn"),this._metaOpts=D.call(this),P.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&j.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),S.call(this),P.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:z,schemaId:I}=this.opts;let $=d;I==="id"&&($={...d},$.id=$.$id,delete $.$id),z&&P&&this.addMetaSchema($,$[I],!1)}defaultMeta(){const{meta:P,schemaId:z}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[z]||P:void 0}validate(P,z){let I;if(typeof P=="string"){if(I=this.getSchema(P),!I)throw new Error(`no schema with key or ref "${P}"`)}else I=this.compile(P);const $=I(z);return"$async"in I||(this.errors=I.errors),$}compile(P,z){const I=this._addSchema(P,z);return I.validate||this._compileSchemaEnv(I)}compileAsync(P,z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return $.call(this,P,z);async function $(fe,R){await E.call(this,fe.$schema);const x=this._addSchema(fe,R);return x.validate||N.call(this,x)}async function E(fe){fe&&!this.getSchema(fe)&&await $.call(this,{$ref:fe},!0)}async function N(fe){try{return this._compileSchemaEnv(fe)}catch(R){if(!(R instanceof s.default))throw R;return ee.call(this,R),await ne.call(this,R.missingSchema),N.call(this,fe)}}function ee({missingSchema:fe,missingRef:R}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${R} cannot be resolved`)}async function ne(fe){const R=await me.call(this,fe);this.refs[fe]||await E.call(this,R.$schema),this.refs[fe]||this.addSchema(R,fe,z)}async function me(fe){const R=this._loading[fe];if(R)return R;try{return await(this._loading[fe]=I(fe))}finally{delete this._loading[fe]}}}addSchema(P,z,I,$=this.opts.validateSchema){if(Array.isArray(P)){for(const N of P)this.addSchema(N,void 0,I,$);return this}let E;if(typeof P=="object"){const{schemaId:N}=this.opts;if(E=P[N],E!==void 0&&typeof E!="string")throw new Error(`schema ${N} must be string`)}return z=(0,c.normalizeId)(z||E),this._checkUnique(z),this.schemas[z]=this._addSchema(P,I,z,$,!0),this}addMetaSchema(P,z,I=this.opts.validateSchema){return this.addSchema(P,z,!0,I),this}validateSchema(P,z){if(typeof P=="boolean")return!0;let I;if(I=P.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(I,P);if(!$&&z){const E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return $}getSchema(P){let z;for(;typeof(z=k.call(this,P))=="string";)P=z;if(z===void 0){const{schemaId:I}=this.opts,$=new o.SchemaEnv({schema:{},schemaId:I});if(z=o.resolveSchema.call(this,$,P),!z)return;this.refs[P]=z}return z.validate||this._compileSchemaEnv(z)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const z=k.call(this,P);return typeof z=="object"&&this._cache.delete(z.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const z=P;this._cache.delete(z);let I=P[this.opts.schemaId];return I&&(I=(0,c.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const z of P)this.addKeyword(z);return this}addKeyword(P,z){let I;if(typeof P=="string")I=P,typeof z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),z.keyword=I);else if(typeof P=="object"&&z===void 0){if(z=P,I=z.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,I,z),!z)return(0,l.eachItem)(I,E=>ge.call(this,E)),this;Ye.call(this,z);const $={...z,type:(0,u.getJSONTypes)(z.type),schemaType:(0,u.getJSONTypes)(z.schemaType)};return(0,l.eachItem)(I,$.type.length===0?E=>ge.call(this,E,$):E=>$.type.forEach(N=>ge.call(this,E,$,N))),this}getKeyword(P){const z=this.RULES.all[P];return typeof z=="object"?z.definition:!!z}removeKeyword(P){const{RULES:z}=this;delete z.keywords[P],delete z.all[P];for(const I of z.rules){const $=I.rules.findIndex(E=>E.keyword===P);$>=0&&I.rules.splice($,1)}return this}addFormat(P,z){return typeof z=="string"&&(z=new RegExp(z)),this.formats[P]=z,this}errorsText(P=this.errors,{separator:z=", ",dataVar:I="data"}={}){return!P||P.length===0?"No errors":P.map($=>`${I}${$.instancePath} ${$.message}`).reduce(($,E)=>$+z+E)}$dataMetaSchema(P,z){const I=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const $ of z){const E=$.split("/").slice(1);let N=P;for(const ee of E)N=N[ee];for(const ee in I){const ne=I[ee];if(typeof ne!="object")continue;const{$data:me}=ne.definition,fe=N[ee];me&&fe&&(N[ee]=Tt(fe))}}return P}_removeAllSchemas(P,z){for(const I in P){const $=P[I];(!z||z.test(I))&&(typeof $=="string"?delete P[I]:$&&!$.meta&&(this._cache.delete($.schema),delete P[I]))}}_addSchema(P,z,I,$=this.opts.validateSchema,E=this.opts.addUsedSchema){let N;const{schemaId:ee}=this.opts;if(typeof P=="object")N=P[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let ne=this._cache.get(P);if(ne!==void 0)return ne;I=(0,c.normalizeId)(N||I);const me=c.getSchemaRefs.call(this,P,I);return ne=new o.SchemaEnv({schema:P,schemaId:ee,meta:z,baseId:I,localRefs:me}),this._cache.set(ne.schema,ne),E&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=ne),$&&this.validateSchema(P,!0),ne}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):o.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const z=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,P)}finally{this.opts=z}}}b.ValidationError=n.default,b.MissingRefError=s.default,t.default=b;function w(L,P,z,I="error"){for(const $ in L){const E=$;E in P&&this.logger[I](`${z}: option ${$}. ${L[E]}`)}}function k(L){return L=(0,c.normalizeId)(L),this.schemas[L]||this.refs[L]}function S(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const P in L)this.addSchema(L[P],P)}function C(){for(const L in this.opts.formats){const P=this.opts.formats[L];P&&this.addFormat(L,P)}}function j(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in L){const z=L[P];z.keyword||(z.keyword=P),this.addKeyword(z)}}function D(){const L={...this.opts};for(const P of p)delete L[P];return L}const A={log(){},warn(){},error(){}};function V(L){if(L===!1)return A;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(L,P){const{RULES:z}=this;if((0,l.eachItem)(L,I=>{if(z.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!J.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function ge(L,P,z){var I;const $=P?.post;if(z&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:E}=this;let N=$?E.post:E.rules.find(({type:ne})=>ne===z);if(N||(N={type:z,rules:[]},E.rules.push(N)),E.keywords[L]=!0,!P)return;const ee={keyword:L,definition:{...P,type:(0,u.getJSONTypes)(P.type),schemaType:(0,u.getJSONTypes)(P.schemaType)}};P.before?Ge.call(this,N,ee,P.before):N.rules.push(ee),E.all[L]=ee,(I=P.implements)===null||I===void 0||I.forEach(ne=>this.addKeyword(ne))}function Ge(L,P,z){const I=L.rules.findIndex($=>$.keyword===z);I>=0?L.rules.splice(I,0,P):(L.rules.push(P),this.logger.warn(`rule ${z} is not defined`))}function Ye(L){let{metaSchema:P}=L;P!==void 0&&(L.$data&&this.opts.$data&&(P=Tt(P)),L.validateSchema=this.compile(P,!0))}const be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Tt(L){return{anyOf:[L,be]}}})(da)),da}var Zn={},Ln={},Un={},Wi;function Id(){if(Wi)return Un;Wi=1,Object.defineProperty(Un,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Un.default=t,Un}var Lt={},Ki;function Cd(){if(Ki)return Lt;Ki=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.callRef=Lt.getValidate=void 0;const t=zn(),e=ht(),r=ie(),n=Zt(),s=va(),a=he(),o={keyword:"$ref",schemaType:"string",code(u){const{gen:l,schema:d,it:m}=u,{baseId:_,schemaEnv:p,validateName:y,opts:h,self:v}=m,{root:f}=p;if((d==="#"||d==="#/")&&_===f.baseId)return b();const g=s.resolveRef.call(v,f,_,d);if(g===void 0)throw new t.default(m.opts.uriResolver,_,d);if(g instanceof s.SchemaEnv)return w(g);return k(g);function b(){if(p===f)return c(u,y,p,p.$async);const S=l.scopeValue("root",{ref:f});return c(u,(0,r._)`${S}.validate`,f,f.$async)}function w(S){const C=i(u,S);c(u,C,S,S.$async)}function k(S){const C=l.scopeValue("schema",h.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),j=l.name("valid"),D=u.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:C,errSchemaPath:d},j);u.mergeEvaluated(D),u.ok(j)}}};function i(u,l){const{gen:d}=u;return l.validate?d.scopeValue("validate",{ref:l.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:l})}.validate`}Lt.getValidate=i;function c(u,l,d,m){const{gen:_,it:p}=u,{allErrors:y,schemaEnv:h,opts:v}=p,f=v.passContext?n.default.this:r.nil;m?g():b();function g(){if(!h.$async)throw new Error("async schema referenced by sync schema");const S=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,e.callValidateCode)(u,l,f)}`),k(l),y||_.assign(S,!0)},C=>{_.if((0,r._)`!(${C} instanceof ${p.ValidationError})`,()=>_.throw(C)),w(C),y||_.assign(S,!1)}),u.ok(S)}function b(){u.result((0,e.callValidateCode)(u,l,f),()=>k(l),()=>w(l))}function w(S){const C=(0,r._)`${S}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${C} : ${n.default.vErrors}.concat(${C})`),_.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function k(S){var C;if(!p.opts.unevaluated)return;const j=(C=d?.validate)===null||C===void 0?void 0:C.evaluated;if(p.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(p.props=a.mergeEvaluated.props(_,j.props,p.props));else{const D=_.var("props",(0,r._)`${S}.evaluated.props`);p.props=a.mergeEvaluated.props(_,D,p.props,r.Name)}if(p.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(p.items=a.mergeEvaluated.items(_,j.items,p.items));else{const D=_.var("items",(0,r._)`${S}.evaluated.items`);p.items=a.mergeEvaluated.items(_,D,p.items,r.Name)}}}return Lt.callRef=c,Lt.default=o,Lt}var Bi;function Od(){if(Bi)return Ln;Bi=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=Id(),e=Cd(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return Ln.default=r,Ln}var Dn={},Vn={},Ji;function Nd(){if(Ji)return Vn;Ji=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=ie(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:a,schemaCode:o})=>(0,t.str)`must be ${r[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,t._)`{comparison: ${r[a].okStr}, limit: ${o}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:o,data:i,schemaCode:c}=a;a.fail$data((0,t._)`${i} ${r[o].fail} ${c} || isNaN(${i})`)}};return Vn.default=s,Vn}var Fn={},Gi;function Ad(){if(Gi)return Fn;Gi=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=ie(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:a,schemaCode:o,it:i}=n,c=i.opts.multipleOfPrecision,u=s.let("res"),l=c?(0,t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,t._)`${u} !== parseInt(${u})`;n.fail$data((0,t._)`(${o} === 0 || (${u} = ${a}/${o}, ${l}))`)}};return Fn.default=r,Fn}var Hn={},Wn={},Yi;function jd(){if(Yi)return Wn;Yi=1,Object.defineProperty(Wn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,s=0,a;for(;s<r;)n++,a=e.charCodeAt(s++),a>=55296&&a<=56319&&s<r&&(a=e.charCodeAt(s),(a&64512)===56320&&s++);return n}return Wn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Wn}var Xi;function Md(){if(Xi)return Hn;Xi=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=ie(),e=he(),r=jd(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const i=a==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${o} characters`},params:({schemaCode:a})=>(0,t._)`{limit: ${a}}`},code(a){const{keyword:o,data:i,schemaCode:c,it:u}=a,l=o==="maxLength"?t.operators.GT:t.operators.LT,d=u.opts.unicode===!1?(0,t._)`${i}.length`:(0,t._)`${(0,e.useFunc)(a.gen,r.default)}(${i})`;a.fail$data((0,t._)`${d} ${l} ${c}`)}};return Hn.default=s,Hn}var Kn={},Qi;function zd(){if(Qi)return Kn;Qi=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=ht(),e=ie(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,e._)`{pattern: ${s}}`},code(s){const{data:a,$data:o,schema:i,schemaCode:c,it:u}=s,l=u.opts.unicodeRegExp?"u":"",d=o?(0,e._)`(new RegExp(${c}, ${l}))`:(0,t.usePattern)(s,i);s.fail$data((0,e._)`!${d}.test(${a})`)}};return Kn.default=n,Kn}var Bn={},ec;function qd(){if(ec)return Bn;ec=1,Object.defineProperty(Bn,"__esModule",{value:!0});const t=ie(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const a=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${s} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:a,schemaCode:o}=n,i=s==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${a}).length ${i} ${o}`)}};return Bn.default=r,Bn}var Jn={},tc;function Zd(){if(tc)return Jn;tc=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=ht(),e=ie(),r=he(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,e.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,e._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:i,schemaCode:c,data:u,$data:l,it:d}=a,{opts:m}=d;if(!l&&i.length===0)return;const _=i.length>=m.loopRequired;if(d.allErrors?p():y(),m.strictRequired){const f=a.parentSchema.properties,{definedProperties:g}=a.it;for(const b of i)if(f?.[b]===void 0&&!g.has(b)){const w=d.schemaEnv.baseId+d.errSchemaPath,k=`required property "${b}" is not defined at "${w}" (strictRequired)`;(0,r.checkStrictMode)(d,k,d.opts.strictRequired)}}function p(){if(_||l)a.block$data(e.nil,h);else for(const f of i)(0,t.checkReportMissingProp)(a,f)}function y(){const f=o.let("missing");if(_||l){const g=o.let("valid",!0);a.block$data(g,()=>v(f,g)),a.ok(g)}else o.if((0,t.checkMissingProp)(a,i,f)),(0,t.reportMissingProp)(a,f),o.else()}function h(){o.forOf("prop",c,f=>{a.setParams({missingProperty:f}),o.if((0,t.noPropertyInData)(o,u,f,m.ownProperties),()=>a.error())})}function v(f,g){a.setParams({missingProperty:f}),o.forOf(f,c,()=>{o.assign(g,(0,t.propertyInData)(o,u,f,m.ownProperties)),o.if((0,e.not)(g),()=>{a.error(),o.break()})},e.nil)}}};return Jn.default=s,Jn}var Gn={},rc;function Ld(){if(rc)return Gn;rc=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=ie(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const a=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${s} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:a,schemaCode:o}=n,i=s==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${a}.length ${i} ${o}`)}};return Gn.default=r,Gn}var Yn={},Xn={},nc;function ka(){if(nc)return Xn;nc=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=Ni();return t.code='require("ajv/dist/runtime/equal").default',Xn.default=t,Xn}var sc;function Ud(){if(sc)return Yn;sc=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=On(),e=ie(),r=he(),n=ka(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:i}})=>(0,e.str)`must NOT have duplicate items (items ## ${i} and ${o} are identical)`,params:({params:{i:o,j:i}})=>(0,e._)`{i: ${o}, j: ${i}}`},code(o){const{gen:i,data:c,$data:u,schema:l,parentSchema:d,schemaCode:m,it:_}=o;if(!u&&!l)return;const p=i.let("valid"),y=d.items?(0,t.getSchemaTypes)(d.items):[];o.block$data(p,h,(0,e._)`${m} === false`),o.ok(p);function h(){const b=i.let("i",(0,e._)`${c}.length`),w=i.let("j");o.setParams({i:b,j:w}),i.assign(p,!0),i.if((0,e._)`${b} > 1`,()=>(v()?f:g)(b,w))}function v(){return y.length>0&&!y.some(b=>b==="object"||b==="array")}function f(b,w){const k=i.name("item"),S=(0,t.checkDataTypes)(y,k,_.opts.strictNumbers,t.DataType.Wrong),C=i.const("indices",(0,e._)`{}`);i.for((0,e._)`;${b}--;`,()=>{i.let(k,(0,e._)`${c}[${b}]`),i.if(S,(0,e._)`continue`),y.length>1&&i.if((0,e._)`typeof ${k} == "string"`,(0,e._)`${k} += "_"`),i.if((0,e._)`typeof ${C}[${k}] == "number"`,()=>{i.assign(w,(0,e._)`${C}[${k}]`),o.error(),i.assign(p,!1).break()}).code((0,e._)`${C}[${k}] = ${b}`)})}function g(b,w){const k=(0,r.useFunc)(i,n.default),S=i.name("outer");i.label(S).for((0,e._)`;${b}--;`,()=>i.for((0,e._)`${w} = ${b}; ${w}--;`,()=>i.if((0,e._)`${k}(${c}[${b}], ${c}[${w}])`,()=>{o.error(),i.assign(p,!1).break(S)})))}}};return Yn.default=a,Yn}var Qn={},ac;function Dd(){if(ac)return Qn;ac=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=ie(),e=he(),r=ka(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,t._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:i,$data:c,schemaCode:u,schema:l}=a;c||l&&typeof l=="object"?a.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${i}, ${u})`):a.fail((0,t._)`${l} !== ${i}`)}};return Qn.default=s,Qn}var es={},oc;function Vd(){if(oc)return es;oc=1,Object.defineProperty(es,"__esModule",{value:!0});const t=ie(),e=he(),r=ka(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,t._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:i,$data:c,schema:u,schemaCode:l,it:d}=a;if(!c&&u.length===0)throw new Error("enum must have non-empty array");const m=u.length>=d.opts.loopEnum;let _;const p=()=>_??(_=(0,e.useFunc)(o,r.default));let y;if(m||c)y=o.let("valid"),a.block$data(y,h);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const f=o.const("vSchema",l);y=(0,t.or)(...u.map((g,b)=>v(f,b)))}a.pass(y);function h(){o.assign(y,!1),o.forOf("v",l,f=>o.if((0,t._)`${p()}(${i}, ${f})`,()=>o.assign(y,!0).break()))}function v(f,g){const b=u[g];return typeof b=="object"&&b!==null?(0,t._)`${p()}(${i}, ${f}[${g}])`:(0,t._)`${i} === ${b}`}}};return es.default=s,es}var ic;function Fd(){if(ic)return Dn;ic=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=Nd(),e=Ad(),r=Md(),n=zd(),s=qd(),a=Zd(),o=Ld(),i=Ud(),c=Dd(),u=Vd(),l=[t.default,e.default,r.default,n.default,s.default,a.default,o.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return Dn.default=l,Dn}var ts={},pr={},cc;function uc(){if(cc)return pr;cc=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.validateAdditionalItems=void 0;const t=ie(),e=he(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:i}=a,{items:c}=o;if(!Array.isArray(c)){(0,e.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(a,c)}};function s(a,o){const{gen:i,schema:c,data:u,keyword:l,it:d}=a;d.items=!0;const m=i.const("len",(0,t._)`${u}.length`);if(c===!1)a.setParams({len:o.length}),a.pass((0,t._)`${m} <= ${o.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(d,c)){const p=i.var("valid",(0,t._)`${m} <= ${o.length}`);i.if((0,t.not)(p),()=>_(p)),a.ok(p)}function _(p){i.forRange("i",o.length,m,y=>{a.subschema({keyword:l,dataProp:y,dataPropType:e.Type.Num},p),d.allErrors||i.if((0,t.not)(p),()=>i.break())})}}return pr.validateAdditionalItems=s,pr.default=n,pr}var rs={},mr={},lc;function dc(){if(lc)return mr;lc=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.validateTuple=void 0;const t=ie(),e=he(),r=ht(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:i}=a;if(Array.isArray(o))return s(a,"additionalItems",o);i.items=!0,!(0,e.alwaysValidSchema)(i,o)&&a.ok((0,r.validateArray)(a))}};function s(a,o,i=a.schema){const{gen:c,parentSchema:u,data:l,keyword:d,it:m}=a;y(u),m.opts.unevaluated&&i.length&&m.items!==!0&&(m.items=e.mergeEvaluated.items(c,i.length,m.items));const _=c.name("valid"),p=c.const("len",(0,t._)`${l}.length`);i.forEach((h,v)=>{(0,e.alwaysValidSchema)(m,h)||(c.if((0,t._)`${p} > ${v}`,()=>a.subschema({keyword:d,schemaProp:v,dataProp:v},_)),a.ok(_))});function y(h){const{opts:v,errSchemaPath:f}=m,g=i.length,b=g===h.minItems&&(g===h.maxItems||h[o]===!1);if(v.strictTuples&&!b){const w=`"${d}" is ${g}-tuple, but minItems or maxItems/${o} are not specified or different at path "${f}"`;(0,e.checkStrictMode)(m,w,v.strictTuples)}}}return mr.validateTuple=s,mr.default=n,mr}var fc;function Hd(){if(fc)return rs;fc=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=dc(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return rs.default=e,rs}var ns={},hc;function Wd(){if(hc)return ns;hc=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=ie(),e=he(),r=ht(),n=uc(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:i,parentSchema:c,it:u}=o,{prefixItems:l}=c;u.items=!0,!(0,e.alwaysValidSchema)(u,i)&&(l?(0,n.validateAdditionalItems)(o,l):o.ok((0,r.validateArray)(o)))}};return ns.default=a,ns}var ss={},pc;function Kd(){if(pc)return ss;pc=1,Object.defineProperty(ss,"__esModule",{value:!0});const t=ie(),e=he(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:a}})=>a===void 0?(0,t.str)`must contain at least ${s} valid item(s)`:(0,t.str)`must contain at least ${s} and no more than ${a} valid item(s)`,params:({params:{min:s,max:a}})=>a===void 0?(0,t._)`{minContains: ${s}}`:(0,t._)`{minContains: ${s}, maxContains: ${a}}`},code(s){const{gen:a,schema:o,parentSchema:i,data:c,it:u}=s;let l,d;const{minContains:m,maxContains:_}=i;u.opts.next?(l=m===void 0?1:m,d=_):l=1;const p=a.const("len",(0,t._)`${c}.length`);if(s.setParams({min:l,max:d}),d===void 0&&l===0){(0,e.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&l>d){(0,e.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.alwaysValidSchema)(u,o)){let g=(0,t._)`${p} >= ${l}`;d!==void 0&&(g=(0,t._)`${g} && ${p} <= ${d}`),s.pass(g);return}u.items=!0;const y=a.name("valid");d===void 0&&l===1?v(y,()=>a.if(y,()=>a.break())):l===0?(a.let(y,!0),d!==void 0&&a.if((0,t._)`${c}.length > 0`,h)):(a.let(y,!1),h()),s.result(y,()=>s.reset());function h(){const g=a.name("_valid"),b=a.let("count",0);v(g,()=>a.if(g,()=>f(b)))}function v(g,b){a.forRange("i",0,p,w=>{s.subschema({keyword:"contains",dataProp:w,dataPropType:e.Type.Num,compositeRule:!0},g),b()})}function f(g){a.code((0,t._)`${g}++`),d===void 0?a.if((0,t._)`${g} >= ${l}`,()=>a.assign(y,!0).break()):(a.if((0,t._)`${g} > ${d}`,()=>a.assign(y,!1).break()),l===1?a.assign(y,!0):a.if((0,t._)`${g} >= ${l}`,()=>a.assign(y,!0)))}}};return ss.default=n,ss}var $a={},mc;function Bd(){return mc||(mc=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ie(),r=he(),n=ht();t.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,e._)`{property: ${c},
|
|
5
|
+
|| ${C} === "boolean" || ${k} === null`).assign(j,(0,n._)`[${k}]`)}}}function m({gen:f,parentData:g,parentDataProperty:b},w){f.if((0,n._)`${g} !== undefined`,()=>f.assign((0,n._)`${g}[${b}]`,w))}function _(f,g,b,w=a.Correct){const k=w===a.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(f){case"null":return(0,n._)`${g} ${k} null`;case"array":S=(0,n._)`Array.isArray(${g})`;break;case"object":S=(0,n._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":S=C((0,n._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":S=C();break;default:return(0,n._)`typeof ${g} ${k} ${f}`}return w===a.Correct?S:(0,n.not)(S);function C(j=n.nil){return(0,n.and)((0,n._)`typeof ${g} == "number"`,j,b?(0,n._)`isFinite(${g})`:n.nil)}}qe.checkDataType=_;function p(f,g,b,w){if(f.length===1)return _(f[0],g,b,w);let k;const S=(0,s.toHash)(f);if(S.array&&S.object){const C=(0,n._)`typeof ${g} != "object"`;k=S.null?C:(0,n._)`!${g} || ${C}`,delete S.null,delete S.array,delete S.object}else k=n.nil;S.number&&delete S.integer;for(const C in S)k=(0,n.and)(k,_(C,g,b,w));return k}qe.checkDataTypes=p;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:g})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${g}}`};function h(f){const g=v(f);(0,r.reportError)(g,y)}qe.reportTypeError=h;function v(f){const{gen:g,data:b,schema:w}=f,k=(0,s.schemaRefOrVal)(f,w,"type");return{gen:g,keyword:"type",data:b,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:f}}return qe}var Mr={},Pi;function bd(){if(Pi)return Mr;Pi=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.assignDefaults=void 0;const t=ie(),e=he();function r(s,a){const{properties:o,items:i}=s.schema;if(a==="object"&&o)for(const c in o)n(s,c,o[c].default);else a==="array"&&Array.isArray(i)&&i.forEach((c,u)=>n(s,u,c.default))}Mr.assignDefaults=r;function n(s,a,o){const{gen:i,compositeRule:c,data:u,opts:l}=s;if(o===void 0)return;const d=(0,t._)`${u}${(0,t.getProperty)(a)}`;if(c){(0,e.checkStrictMode)(s,`default is ignored for: ${d}`);return}let m=(0,t._)`${d} === undefined`;l.useDefaults==="empty"&&(m=(0,t._)`${m} || ${d} === null || ${d} === ""`),i.if(m,(0,t._)`${d} = ${(0,t.stringify)(o)}`)}return Mr}var ft={},ye={},xi;function ht(){if(xi)return ye;xi=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const t=ie(),e=he(),r=Zt(),n=he();function s(f,g){const{gen:b,data:w,it:k}=f;b.if(l(b,w,g,k.opts.ownProperties),()=>{f.setParams({missingProperty:(0,t._)`${g}`},!0),f.error()})}ye.checkReportMissingProp=s;function a({gen:f,data:g,it:{opts:b}},w,k){return(0,t.or)(...w.map(S=>(0,t.and)(l(f,g,S,b.ownProperties),(0,t._)`${k} = ${S}`)))}ye.checkMissingProp=a;function o(f,g){f.setParams({missingProperty:g},!0),f.error()}ye.reportMissingProp=o;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=i;function c(f,g,b){return(0,t._)`${i(f)}.call(${g}, ${b})`}ye.isOwnProperty=c;function u(f,g,b,w){const k=(0,t._)`${g}${(0,t.getProperty)(b)} !== undefined`;return w?(0,t._)`${k} && ${c(f,g,b)}`:k}ye.propertyInData=u;function l(f,g,b,w){const k=(0,t._)`${g}${(0,t.getProperty)(b)} === undefined`;return w?(0,t.or)(k,(0,t.not)(c(f,g,b))):k}ye.noPropertyInData=l;function d(f){return f?Object.keys(f).filter(g=>g!=="__proto__"):[]}ye.allSchemaProperties=d;function m(f,g){return d(g).filter(b=>!(0,e.alwaysValidSchema)(f,g[b]))}ye.schemaProperties=m;function _({schemaCode:f,data:g,it:{gen:b,topSchemaRef:w,schemaPath:k,errorPath:S},it:C},j,D,A){const V=A?(0,t._)`${f}, ${g}, ${w}${k}`:g,J=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,S)],[r.default.parentData,C.parentData],[r.default.parentDataProperty,C.parentDataProperty],[r.default.rootData,r.default.rootData]];C.opts.dynamicRef&&J.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Y=(0,t._)`${V}, ${b.object(...J)}`;return D!==t.nil?(0,t._)`${j}.call(${D}, ${Y})`:(0,t._)`${j}(${Y})`}ye.callValidateCode=_;const p=(0,t._)`new RegExp`;function y({gen:f,it:{opts:g}},b){const w=g.unicodeRegExp?"u":"",{regExp:k}=g.code,S=k(b,w);return f.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,t._)`${k.code==="new RegExp"?p:(0,n.useFunc)(f,k)}(${b}, ${w})`})}ye.usePattern=y;function h(f){const{gen:g,data:b,keyword:w,it:k}=f,S=g.name("valid");if(k.allErrors){const j=g.let("valid",!0);return C(()=>g.assign(j,!1)),j}return g.var(S,!0),C(()=>g.break()),S;function C(j){const D=g.const("len",(0,t._)`${b}.length`);g.forRange("i",0,D,A=>{f.subschema({keyword:w,dataProp:A,dataPropType:e.Type.Num},S),g.if((0,t.not)(S),j)})}}ye.validateArray=h;function v(f){const{gen:g,schema:b,keyword:w,it:k}=f;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,e.alwaysValidSchema)(k,D))&&!k.opts.unevaluated)return;const C=g.let("valid",!1),j=g.name("_valid");g.block(()=>b.forEach((D,A)=>{const V=f.subschema({keyword:w,schemaProp:A,compositeRule:!0},j);g.assign(C,(0,t._)`${C} || ${j}`),f.mergeValidEvaluated(V,j)||g.if((0,t.not)(C))})),f.result(C,()=>f.reset(),()=>f.error(!0))}return ye.validateUnion=v,ye}var Ii;function kd(){if(Ii)return ft;Ii=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const t=ie(),e=Zt(),r=ht(),n=Cn();function s(m,_){const{gen:p,keyword:y,schema:h,parentSchema:v,it:f}=m,g=_.macro.call(f.self,h,v,f),b=u(p,y,g);f.opts.validateSchema!==!1&&f.self.validateSchema(g,!0);const w=p.name("valid");m.subschema({schema:g,schemaPath:t.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:b,compositeRule:!0},w),m.pass(w,()=>m.error(!0))}ft.macroKeywordCode=s;function a(m,_){var p;const{gen:y,keyword:h,schema:v,parentSchema:f,$data:g,it:b}=m;c(b,_);const w=!g&&_.compile?_.compile.call(b.self,v,f,b):_.validate,k=u(y,h,w),S=y.let("valid");m.block$data(S,C),m.ok((p=_.valid)!==null&&p!==void 0?p:S);function C(){if(_.errors===!1)A(),_.modifying&&o(m),V(()=>m.error());else{const J=_.async?j():D();_.modifying&&o(m),V(()=>i(m,J))}}function j(){const J=y.let("ruleErrs",null);return y.try(()=>A((0,t._)`await `),Y=>y.assign(S,!1).if((0,t._)`${Y} instanceof ${b.ValidationError}`,()=>y.assign(J,(0,t._)`${Y}.errors`),()=>y.throw(Y))),J}function D(){const J=(0,t._)`${k}.errors`;return y.assign(J,null),A(t.nil),J}function A(J=_.async?(0,t._)`await `:t.nil){const Y=b.opts.passContext?e.default.this:e.default.self,ge=!("compile"in _&&!g||_.schema===!1);y.assign(S,(0,t._)`${J}${(0,r.callValidateCode)(m,k,Y,ge)}`,_.modifying)}function V(J){var Y;y.if((0,t.not)((Y=_.valid)!==null&&Y!==void 0?Y:S),J)}}ft.funcKeywordCode=a;function o(m){const{gen:_,data:p,it:y}=m;_.if(y.parentData,()=>_.assign(p,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function i(m,_){const{gen:p}=m;p.if((0,t._)`Array.isArray(${_})`,()=>{p.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${_} : ${e.default.vErrors}.concat(${_})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},_){if(_.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,_,p){if(p===void 0)throw new Error(`keyword "${_}" failed to compile`);return m.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,t.stringify)(p)})}function l(m,_,p=!1){return!_.length||_.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||p&&typeof m>"u")}ft.validSchemaType=l;function d({schema:m,opts:_,self:p,errSchemaPath:y},h,v){if(Array.isArray(h.keyword)?!h.keyword.includes(v):h.keyword!==v)throw new Error("ajv implementation error");const f=h.dependencies;if(f?.some(g=>!Object.prototype.hasOwnProperty.call(m,g)))throw new Error(`parent schema must have dependencies of ${v}: ${f.join(",")}`);if(h.validateSchema&&!h.validateSchema(m[v])){const b=`keyword "${v}" value is invalid at path "${y}": `+p.errorsText(h.validateSchema.errors);if(_.validateSchema==="log")p.logger.error(b);else throw new Error(b)}}return ft.validateKeywordUsage=d,ft}var Ct={},Ci;function $d(){if(Ci)return Ct;Ci=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.extendSubschemaMode=Ct.extendSubschemaData=Ct.getSubschema=void 0;const t=ie(),e=he();function r(a,{keyword:o,schemaProp:i,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const m=a.schema[o];return i===void 0?{schema:m,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:m[i],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,e.escapeFragment)(i)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Ct.getSubschema=r;function n(a,o,{dataProp:i,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=o;if(i!==void 0){const{errorPath:p,dataPathArr:y,opts:h}=o,v=m.let("data",(0,t._)`${o.data}${(0,t.getProperty)(i)}`,!0);_(v),a.errorPath=(0,t.str)`${p}${(0,e.getErrorPath)(i,c,h.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${i}`,a.dataPathArr=[...y,a.parentDataProperty]}if(u!==void 0){const p=u instanceof t.Name?u:m.let("data",u,!0);_(p),d!==void 0&&(a.propertyName=d)}l&&(a.dataTypes=l);function _(p){a.data=p,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,p]}}Ct.extendSubschemaData=n;function s(a,{jtdDiscriminator:o,jtdMetadata:i,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(a.compositeRule=c),u!==void 0&&(a.createErrors=u),l!==void 0&&(a.allErrors=l),a.jtdDiscriminator=o,a.jtdMetadata=i}return Ct.extendSubschemaMode=s,Ct}var Ke={},_a,Oi;function Ni(){return Oi||(Oi=1,_a=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){var o=a[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),_a}var ga={exports:{}},Ai;function Sd(){if(Ai)return ga.exports;Ai=1;var t=ga.exports=function(n,s,a){typeof s=="function"&&(a=s,s={}),a=s.cb||a;var o=typeof a=="function"?a:a.pre||function(){},i=a.post||function(){};e(s,o,i,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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 e(n,s,a,o,i,c,u,l,d,m){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,i,c,u,l,d,m);for(var _ in o){var p=o[_];if(Array.isArray(p)){if(_ in t.arrayKeywords)for(var y=0;y<p.length;y++)e(n,s,a,p[y],i+"/"+_+"/"+y,c,i,_,o,y)}else if(_ in t.propsKeywords){if(p&&typeof p=="object")for(var h in p)e(n,s,a,p[h],i+"/"+_+"/"+r(h),c,i,_,o,h)}else(_ in t.keywords||n.allKeys&&!(_ in t.skipKeywords))&&e(n,s,a,p,i+"/"+_,c,i,_,o)}a(o,i,c,u,l,d,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return ga.exports}var ji;function Nn(){if(ji)return Ke;ji=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;const t=he(),e=Ni(),r=Sd(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,h=!0){return typeof y=="boolean"?!0:h===!0?!o(y):h?i(y)<=h:!1}Ke.inlineRef=s;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(y){for(const h in y){if(a.has(h))return!0;const v=y[h];if(Array.isArray(v)&&v.some(o)||typeof v=="object"&&o(v))return!0}return!1}function i(y){let h=0;for(const v in y){if(v==="$ref")return 1/0;if(h++,!n.has(v)&&(typeof y[v]=="object"&&(0,t.eachItem)(y[v],f=>h+=i(f)),h===1/0))return 1/0}return h}function c(y,h="",v){v!==!1&&(h=d(h));const f=y.parse(h);return u(y,f)}Ke.getFullPath=c;function u(y,h){return y.serialize(h).split("#")[0]+"#"}Ke._getFullPath=u;const l=/#\/?$/;function d(y){return y?y.replace(l,""):""}Ke.normalizeId=d;function m(y,h,v){return v=d(v),y.resolve(h,v)}Ke.resolveUrl=m;const _=/^[a-z_][-a-z0-9._]*$/i;function p(y,h){if(typeof y=="boolean")return{};const{schemaId:v,uriResolver:f}=this.opts,g=d(y[v]||h),b={"":g},w=c(f,g,!1),k={},S=new Set;return r(y,{allKeys:!0},(D,A,V,J)=>{if(J===void 0)return;const Y=w+A;let ge=b[J];typeof D[v]=="string"&&(ge=Ge.call(this,D[v])),Ye.call(this,D.$anchor),Ye.call(this,D.$dynamicAnchor),b[A]=ge;function Ge(be){const Tt=this.opts.uriResolver.resolve;if(be=d(ge?Tt(ge,be):be),S.has(be))throw j(be);S.add(be);let L=this.refs[be];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?C(D,L.schema,be):be!==d(Y)&&(be[0]==="#"?(C(D,k[be],be),k[be]=D):this.refs[be]=Y),be}function Ye(be){if(typeof be=="string"){if(!_.test(be))throw new Error(`invalid anchor "${be}"`);Ge.call(this,`#${be}`)}}}),k;function C(D,A,V){if(A!==void 0&&!e(D,A))throw j(V)}function j(D){return new Error(`reference "${D}" resolves to more than one schema`)}}return Ke.getSchemaRefs=p,Ke}var Mi;function An(){if(Mi)return xt;Mi=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.getData=xt.KeywordCxt=xt.validateFunctionCode=void 0;const t=wd(),e=On(),r=Ei(),n=On(),s=bd(),a=kd(),o=$d(),i=ie(),c=Zt(),u=Nn(),l=he(),d=Cn();function m(R){if(w(R)&&(S(R),b(R))){h(R);return}_(R,()=>(0,t.topBoolOrEmptySchema)(R))}xt.validateFunctionCode=m;function _({gen:R,validateName:x,schema:M,schemaEnv:U,opts:re},ue){re.code.es5?R.func(x,(0,i._)`${c.default.data}, ${c.default.valCxt}`,U.$async,()=>{R.code((0,i._)`"use strict"; ${f(M,re)}`),y(R,re),R.code(ue)}):R.func(x,(0,i._)`${c.default.data}, ${p(re)}`,U.$async,()=>R.code(f(M,re)).code(ue))}function p(R){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${R.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(R,x){R.if(c.default.valCxt,()=>{R.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),R.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),R.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),R.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),x.dynamicRef&&R.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{R.var(c.default.instancePath,(0,i._)`""`),R.var(c.default.parentData,(0,i._)`undefined`),R.var(c.default.parentDataProperty,(0,i._)`undefined`),R.var(c.default.rootData,c.default.data),x.dynamicRef&&R.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function h(R){const{schema:x,opts:M,gen:U}=R;_(R,()=>{M.$comment&&x.$comment&&J(R),D(R),U.let(c.default.vErrors,null),U.let(c.default.errors,0),M.unevaluated&&v(R),C(R),Y(R)})}function v(R){const{gen:x,validateName:M}=R;R.evaluated=x.const("evaluated",(0,i._)`${M}.evaluated`),x.if((0,i._)`${R.evaluated}.dynamicProps`,()=>x.assign((0,i._)`${R.evaluated}.props`,(0,i._)`undefined`)),x.if((0,i._)`${R.evaluated}.dynamicItems`,()=>x.assign((0,i._)`${R.evaluated}.items`,(0,i._)`undefined`))}function f(R,x){const M=typeof R=="object"&&R[x.schemaId];return M&&(x.code.source||x.code.process)?(0,i._)`/*# sourceURL=${M} */`:i.nil}function g(R,x){if(w(R)&&(S(R),b(R))){k(R,x);return}(0,t.boolOrEmptySchema)(R,x)}function b({schema:R,self:x}){if(typeof R=="boolean")return!R;for(const M in R)if(x.RULES.all[M])return!0;return!1}function w(R){return typeof R.schema!="boolean"}function k(R,x){const{schema:M,gen:U,opts:re}=R;re.$comment&&M.$comment&&J(R),A(R),V(R);const ue=U.const("_errs",c.default.errors);C(R,ue),U.var(x,(0,i._)`${ue} === ${c.default.errors}`)}function S(R){(0,l.checkUnknownRules)(R),j(R)}function C(R,x){if(R.opts.jtd)return Ge(R,[],!1,x);const M=(0,e.getSchemaTypes)(R.schema),U=(0,e.coerceAndCheckDataType)(R,M);Ge(R,M,!U,x)}function j(R){const{schema:x,errSchemaPath:M,opts:U,self:re}=R;x.$ref&&U.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(x,re.RULES)&&re.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function D(R){const{schema:x,opts:M}=R;x.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,l.checkStrictMode)(R,"default is ignored in the schema root")}function A(R){const x=R.schema[R.opts.schemaId];x&&(R.baseId=(0,u.resolveUrl)(R.opts.uriResolver,R.baseId,x))}function V(R){if(R.schema.$async&&!R.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:R,schemaEnv:x,schema:M,errSchemaPath:U,opts:re}){const ue=M.$comment;if(re.$comment===!0)R.code((0,i._)`${c.default.self}.logger.log(${ue})`);else if(typeof re.$comment=="function"){const Fe=(0,i.str)`${U}/$comment`,Et=R.scopeValue("root",{ref:x.root});R.code((0,i._)`${c.default.self}.opts.$comment(${ue}, ${Fe}, ${Et}.schema)`)}}function Y(R){const{gen:x,schemaEnv:M,validateName:U,ValidationError:re,opts:ue}=R;M.$async?x.if((0,i._)`${c.default.errors} === 0`,()=>x.return(c.default.data),()=>x.throw((0,i._)`new ${re}(${c.default.vErrors})`)):(x.assign((0,i._)`${U}.errors`,c.default.vErrors),ue.unevaluated&&ge(R),x.return((0,i._)`${c.default.errors} === 0`))}function ge({gen:R,evaluated:x,props:M,items:U}){M instanceof i.Name&&R.assign((0,i._)`${x}.props`,M),U instanceof i.Name&&R.assign((0,i._)`${x}.items`,U)}function Ge(R,x,M,U){const{gen:re,schema:ue,data:Fe,allErrors:Et,opts:tt,self:rt}=R,{RULES:He}=rt;if(ue.$ref&&(tt.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(ue,He))){re.block(()=>ee(R,"$ref",He.all.$ref.definition));return}tt.jtd||be(R,x),re.block(()=>{for(const dt of He.rules)jr(dt);jr(He.post)});function jr(dt){(0,r.shouldUseGroup)(ue,dt)&&(dt.type?(re.if((0,n.checkDataType)(dt.type,Fe,tt.strictNumbers)),Ye(R,dt),x.length===1&&x[0]===dt.type&&M&&(re.else(),(0,n.reportTypeError)(R)),re.endIf()):Ye(R,dt),Et||re.if((0,i._)`${c.default.errors} === ${U||0}`))}}function Ye(R,x){const{gen:M,schema:U,opts:{useDefaults:re}}=R;re&&(0,s.assignDefaults)(R,x.type),M.block(()=>{for(const ue of x.rules)(0,r.shouldUseRule)(U,ue)&&ee(R,ue.keyword,ue.definition,x.type)})}function be(R,x){R.schemaEnv.meta||!R.opts.strictTypes||(Tt(R,x),R.opts.allowUnionTypes||L(R,x),P(R,R.dataTypes))}function Tt(R,x){if(x.length){if(!R.dataTypes.length){R.dataTypes=x;return}x.forEach(M=>{I(R.dataTypes,M)||E(R,`type "${M}" not allowed by context "${R.dataTypes.join(",")}"`)}),$(R,x)}}function L(R,x){x.length>1&&!(x.length===2&&x.includes("null"))&&E(R,"use allowUnionTypes to allow union type keyword")}function P(R,x){const M=R.self.RULES.all;for(const U in M){const re=M[U];if(typeof re=="object"&&(0,r.shouldUseRule)(R.schema,re)){const{type:ue}=re.definition;ue.length&&!ue.some(Fe=>z(x,Fe))&&E(R,`missing type "${ue.join(",")}" for keyword "${U}"`)}}}function z(R,x){return R.includes(x)||x==="number"&&R.includes("integer")}function I(R,x){return R.includes(x)||x==="integer"&&R.includes("number")}function $(R,x){const M=[];for(const U of R.dataTypes)I(x,U)?M.push(U):x.includes("integer")&&U==="number"&&M.push("integer");R.dataTypes=M}function E(R,x){const M=R.schemaEnv.baseId+R.errSchemaPath;x+=` at "${M}" (strictTypes)`,(0,l.checkStrictMode)(R,x,R.opts.strictTypes)}class N{constructor(x,M,U){if((0,a.validateKeywordUsage)(x,M,U),this.gen=x.gen,this.allErrors=x.allErrors,this.keyword=U,this.data=x.data,this.schema=x.schema[U],this.$data=M.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(x,this.schema,U,this.$data),this.schemaType=M.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=M,this.$data)this.schemaCode=x.gen.const("vSchema",fe(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=x.gen.const("_errs",c.default.errors))}result(x,M,U){this.failResult((0,i.not)(x),M,U)}failResult(x,M,U){this.gen.if(x),U?U():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,M){this.failResult((0,i.not)(x),void 0,M)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:M}=this;this.fail((0,i._)`${M} !== undefined && (${(0,i.or)(this.invalid$data(),x)})`)}error(x,M,U){if(M){this.setParams(M),this._error(x,U),this.setParams({});return}this._error(x,U)}_error(x,M){(x?d.reportExtraError:d.reportError)(this,this.def.error,M)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,M){M?Object.assign(this.params,x):this.params=x}block$data(x,M,U=i.nil){this.gen.block(()=>{this.check$data(x,U),M()})}check$data(x=i.nil,M=i.nil){if(!this.$data)return;const{gen:U,schemaCode:re,schemaType:ue,def:Fe}=this;U.if((0,i.or)((0,i._)`${re} === undefined`,M)),x!==i.nil&&U.assign(x,!0),(ue.length||Fe.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),x!==i.nil&&U.assign(x,!1)),U.else()}invalid$data(){const{gen:x,schemaCode:M,schemaType:U,def:re,it:ue}=this;return(0,i.or)(Fe(),Et());function Fe(){if(U.length){if(!(M instanceof i.Name))throw new Error("ajv implementation error");const tt=Array.isArray(U)?U:[U];return(0,i._)`${(0,n.checkDataTypes)(tt,M,ue.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function Et(){if(re.validateSchema){const tt=x.scopeValue("validate$data",{ref:re.validateSchema});return(0,i._)`!${tt}(${M})`}return i.nil}}subschema(x,M){const U=(0,o.getSubschema)(this.it,x);(0,o.extendSubschemaData)(U,this.it,x),(0,o.extendSubschemaMode)(U,x);const re={...this.it,...U,items:void 0,props:void 0};return g(re,M),re}mergeEvaluated(x,M){const{it:U,gen:re}=this;U.opts.unevaluated&&(U.props!==!0&&x.props!==void 0&&(U.props=l.mergeEvaluated.props(re,x.props,U.props,M)),U.items!==!0&&x.items!==void 0&&(U.items=l.mergeEvaluated.items(re,x.items,U.items,M)))}mergeValidEvaluated(x,M){const{it:U,gen:re}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return re.if(M,()=>this.mergeEvaluated(x,i.Name)),!0}}xt.KeywordCxt=N;function ee(R,x,M,U){const re=new N(R,M,x);"code"in M?M.code(re,U):re.$data&&M.validate?(0,a.funcKeywordCode)(re,M):"macro"in M?(0,a.macroKeywordCode)(re,M):(M.compile||M.validate)&&(0,a.funcKeywordCode)(re,M)}const ne=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(R,{dataLevel:x,dataNames:M,dataPathArr:U}){let re,ue;if(R==="")return c.default.rootData;if(R[0]==="/"){if(!ne.test(R))throw new Error(`Invalid JSON-pointer: ${R}`);re=R,ue=c.default.rootData}else{const rt=me.exec(R);if(!rt)throw new Error(`Invalid JSON-pointer: ${R}`);const He=+rt[1];if(re=rt[2],re==="#"){if(He>=x)throw new Error(tt("property/index",He));return U[x-He]}if(He>x)throw new Error(tt("data",He));if(ue=M[x-He],!re)return ue}let Fe=ue;const Et=re.split("/");for(const rt of Et)rt&&(ue=(0,i._)`${ue}${(0,i.getProperty)((0,l.unescapeJsonPointer)(rt))}`,Fe=(0,i._)`${Fe} && ${ue}`);return Fe;function tt(rt,He){return`Cannot access ${rt} ${He} levels up, current level is ${x}`}}return xt.getData=fe,xt}var jn={},zi;function ya(){if(zi)return jn;zi=1,Object.defineProperty(jn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return jn.default=t,jn}var Mn={},qi;function zn(){if(qi)return Mn;qi=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=Nn();class e extends Error{constructor(n,s,a,o){super(o||`can't resolve reference ${a} from id ${s}`),this.missingRef=(0,t.resolveUrl)(n,s,a),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return Mn.default=e,Mn}var nt={},Zi;function va(){if(Zi)return nt;Zi=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.resolveSchema=nt.getCompilingSchema=nt.resolveRef=nt.compileSchema=nt.SchemaEnv=void 0;const t=ie(),e=ya(),r=Zt(),n=Nn(),s=he(),a=An();class o{constructor(v){var f;this.refs={},this.dynamicAnchors={};let g;typeof v.schema=="object"&&(g=v.schema),this.schema=v.schema,this.schemaId=v.schemaId,this.root=v.root||this,this.baseId=(f=v.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(g?.[v.schemaId||"$id"]),this.schemaPath=v.schemaPath,this.localRefs=v.localRefs,this.meta=v.meta,this.$async=g?.$async,this.refs={}}}nt.SchemaEnv=o;function i(h){const v=l.call(this,h);if(v)return v;const f=(0,n.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:g,lines:b}=this.opts.code,{ownProperties:w}=this.opts,k=new t.CodeGen(this.scope,{es5:g,lines:b,ownProperties:w});let S;h.$async&&(S=k.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const C=k.scopeName("validate");h.validateName=C;const j={gen:k,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:k.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:C,ValidationError:S,schema:h.schema,schemaEnv:h,rootId:f,baseId:h.baseId||f,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(h),(0,a.validateFunctionCode)(j),k.optimize(this.opts.code.optimize);const A=k.toString();D=`${k.scopeRefs(r.default.scope)}return ${A}`,this.opts.code.process&&(D=this.opts.code.process(D,h));const J=new Function(`${r.default.self}`,`${r.default.scope}`,D)(this,this.scope.get());if(this.scope.value(C,{ref:J}),J.errors=null,J.schema=h.schema,J.schemaEnv=h,h.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:C,validateCode:A,scopeValues:k._values}),this.opts.unevaluated){const{props:Y,items:ge}=j;J.evaluated={props:Y instanceof t.Name?void 0:Y,items:ge instanceof t.Name?void 0:ge,dynamicProps:Y instanceof t.Name,dynamicItems:ge instanceof t.Name},J.source&&(J.source.evaluated=(0,t.stringify)(J.evaluated))}return h.validate=J,h}catch(A){throw delete h.validate,delete h.validateName,D&&this.logger.error("Error compiling schema, function code:",D),A}finally{this._compilations.delete(h)}}nt.compileSchema=i;function c(h,v,f){var g;f=(0,n.resolveUrl)(this.opts.uriResolver,v,f);const b=h.refs[f];if(b)return b;let w=m.call(this,h,f);if(w===void 0){const k=(g=h.localRefs)===null||g===void 0?void 0:g[f],{schemaId:S}=this.opts;k&&(w=new o({schema:k,schemaId:S,root:h,baseId:v}))}if(w!==void 0)return h.refs[f]=u.call(this,w)}nt.resolveRef=c;function u(h){return(0,n.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:i.call(this,h)}function l(h){for(const v of this._compilations)if(d(v,h))return v}nt.getCompilingSchema=l;function d(h,v){return h.schema===v.schema&&h.root===v.root&&h.baseId===v.baseId}function m(h,v){let f;for(;typeof(f=this.refs[v])=="string";)v=f;return f||this.schemas[v]||_.call(this,h,v)}function _(h,v){const f=this.opts.uriResolver.parse(v),g=(0,n._getFullPath)(this.opts.uriResolver,f);let b=(0,n.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&g===b)return y.call(this,f,h);const w=(0,n.normalizeId)(g),k=this.refs[w]||this.schemas[w];if(typeof k=="string"){const S=_.call(this,h,k);return typeof S?.schema!="object"?void 0:y.call(this,f,S)}if(typeof k?.schema=="object"){if(k.validate||i.call(this,k),w===(0,n.normalizeId)(v)){const{schema:S}=k,{schemaId:C}=this.opts,j=S[C];return j&&(b=(0,n.resolveUrl)(this.opts.uriResolver,b,j)),new o({schema:S,schemaId:C,root:h,baseId:b})}return y.call(this,f,k)}}nt.resolveSchema=_;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(h,{baseId:v,schema:f,root:g}){var b;if(((b=h.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of h.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const C=f[(0,s.unescapeFragment)(S)];if(C===void 0)return;f=C;const j=typeof f=="object"&&f[this.opts.schemaId];!p.has(S)&&j&&(v=(0,n.resolveUrl)(this.opts.uriResolver,v,j))}let w;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,v,f.$ref);w=_.call(this,g,S)}const{schemaId:k}=this.opts;if(w=w||new o({schema:f,schemaId:k,root:g,baseId:v}),w.schema!==w.root.schema)return w}return nt}const Td={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var qn={},zr={exports:{}},wa,Li;function Ui(){if(Li)return wa;Li=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let _="",p=0,y=0;for(y=0;y<m.length;y++)if(p=m[y].charCodeAt(0),p!==48){if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";_+=m[y];break}for(y+=1;y<m.length;y++){if(p=m[y].charCodeAt(0),!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";_+=m[y]}return _}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(m){return m.length=0,!0}function a(m,_,p){if(m.length){const y=r(m);if(y!=="")_.push(y);else return p.error=!0,!1;m.length=0}return!0}function o(m){let _=0;const p={error:!1,address:"",zone:""},y=[],h=[];let v=!1,f=!1,g=a;for(let b=0;b<m.length;b++){const w=m[b];if(!(w==="["||w==="]"))if(w===":"){if(v===!0&&(f=!0),!g(h,y,p))break;if(++_>7){p.error=!0;break}b>0&&m[b-1]===":"&&(v=!0),y.push(":");continue}else if(w==="%"){if(!g(h,y,p))break;g=s}else{h.push(w);continue}}return h.length&&(g===s?p.zone=h.join(""):f?y.push(h.join("")):y.push(r(h))),p.address=y.join(""),p}function i(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const _=o(m);if(_.error)return{host:m,isIPV6:!1};{let p=_.address,y=_.address;return _.zone&&(p+="%"+_.zone,y+="%25"+_.zone),{host:p,isIPV6:!0,escapedHost:y}}}function c(m,_){let p=0;for(let y=0;y<m.length;y++)m[y]===_&&p++;return p}function u(m){let _=m;const p=[];let y=-1,h=0;for(;h=_.length;){if(h===1){if(_===".")break;if(_==="/"){p.push("/");break}else{p.push(_);break}}else if(h===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){p.push("/");break}}else if(h===3&&_==="/.."){p.length!==0&&p.pop(),p.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),p.length!==0&&p.pop();continue}}if((y=_.indexOf("/",1))===-1){p.push(_);break}else p.push(_.slice(0,y)),_=_.slice(y)}return p.join("")}function l(m,_){const p=_!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=p(m.scheme)),m.userinfo!==void 0&&(m.userinfo=p(m.userinfo)),m.host!==void 0&&(m.host=p(m.host)),m.path!==void 0&&(m.path=p(m.path)),m.query!==void 0&&(m.query=p(m.query)),m.fragment!==void 0&&(m.fragment=p(m.fragment)),m}function d(m){const _=[];if(m.userinfo!==void 0&&(_.push(m.userinfo),_.push("@")),m.host!==void 0){let p=unescape(m.host);if(!e(p)){const y=i(p);y.isIPV6===!0?p=`[${y.escapedHost}]`:p=m.host}_.push(p)}return(typeof m.port=="number"||typeof m.port=="string")&&(_.push(":"),_.push(String(m.port))),_.length?_.join(""):void 0}return wa={nonSimpleDomain:n,recomposeAuthority:d,normalizeComponentEncoding:l,removeDotSegments:u,isIPv4:e,isUUID:t,normalizeIPv6:i,stringArrayToHexStripped:r},wa}var ba,Di;function Ed(){if(Di)return ba;Di=1;const{isUUID:t}=Ui(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(w){return r.indexOf(w)!==-1}function s(w){return w.secure===!0?!0:w.secure===!1?!1:w.scheme?w.scheme.length===3&&(w.scheme[0]==="w"||w.scheme[0]==="W")&&(w.scheme[1]==="s"||w.scheme[1]==="S")&&(w.scheme[2]==="s"||w.scheme[2]==="S"):!1}function a(w){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w}function o(w){const k=String(w.scheme).toLowerCase()==="https";return(w.port===(k?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}function i(w){return w.secure=s(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function c(w){if((w.port===(s(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){const[k,S]=w.resourceName.split("?");w.path=k&&k!=="/"?k:void 0,w.query=S,w.resourceName=void 0}return w.fragment=void 0,w}function u(w,k){if(!w.path)return w.error="URN can not be parsed",w;const S=w.path.match(e);if(S){const C=k.scheme||w.scheme||"urn";w.nid=S[1].toLowerCase(),w.nss=S[2];const j=`${C}:${k.nid||w.nid}`,D=b(j);w.path=void 0,D&&(w=D.parse(w,k))}else w.error=w.error||"URN can not be parsed.";return w}function l(w,k){if(w.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=k.scheme||w.scheme||"urn",C=w.nid.toLowerCase(),j=`${S}:${k.nid||C}`,D=b(j);D&&(w=D.serialize(w,k));const A=w,V=w.nss;return A.path=`${C||k.nid}:${V}`,k.skipEscape=!0,A}function d(w,k){const S=w;return S.uuid=S.nss,S.nss=void 0,!k.tolerant&&(!S.uuid||!t(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(w){const k=w;return k.nss=(w.uuid||"").toLowerCase(),k}const _={scheme:"http",domainHost:!0,parse:a,serialize:o},p={scheme:"https",domainHost:_.domainHost,parse:a,serialize:o},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},h={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},g={http:_,https:p,ws:y,wss:h,urn:{scheme:"urn",parse:u,serialize:l,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(g,null);function b(w){return w&&(g[w]||g[w.toLowerCase()])||void 0}return ba={wsIsSecure:s,SCHEMES:g,isValidSchemeName:n,getSchemeHandler:b},ba}var Vi;function Rd(){if(Vi)return zr.exports;Vi=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:a}=Ui(),{SCHEMES:o,getSchemeHandler:i}=Ed();function c(h,v){return typeof h=="string"?h=m(p(h,v),v):typeof h=="object"&&(h=p(m(h,v),v)),h}function u(h,v,f){const g=f?Object.assign({scheme:"null"},f):{scheme:"null"},b=l(p(h,g),p(v,g),g,!0);return g.skipEscape=!0,m(b,g)}function l(h,v,f,g){const b={};return g||(h=p(m(h,f),f),v=p(m(v,f),f)),f=f||{},!f.tolerant&&v.scheme?(b.scheme=v.scheme,b.userinfo=v.userinfo,b.host=v.host,b.port=v.port,b.path=e(v.path||""),b.query=v.query):(v.userinfo!==void 0||v.host!==void 0||v.port!==void 0?(b.userinfo=v.userinfo,b.host=v.host,b.port=v.port,b.path=e(v.path||""),b.query=v.query):(v.path?(v.path[0]==="/"?b.path=e(v.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?b.path="/"+v.path:h.path?b.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+v.path:b.path=v.path,b.path=e(b.path)),b.query=v.query):(b.path=h.path,v.query!==void 0?b.query=v.query:b.query=h.query),b.userinfo=h.userinfo,b.host=h.host,b.port=h.port),b.scheme=h.scheme),b.fragment=v.fragment,b}function d(h,v,f){return typeof h=="string"?(h=unescape(h),h=m(n(p(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=m(n(h,!0),{...f,skipEscape:!0})),typeof v=="string"?(v=unescape(v),v=m(n(p(v,f),!0),{...f,skipEscape:!0})):typeof v=="object"&&(v=m(n(v,!0),{...f,skipEscape:!0})),h.toLowerCase()===v.toLowerCase()}function m(h,v){const f={host:h.host,scheme:h.scheme,userinfo:h.userinfo,port:h.port,path:h.path,query:h.query,nid:h.nid,nss:h.nss,uuid:h.uuid,fragment:h.fragment,reference:h.reference,resourceName:h.resourceName,secure:h.secure,error:""},g=Object.assign({},v),b=[],w=i(g.scheme||f.scheme);w&&w.serialize&&w.serialize(f,g),f.path!==void 0&&(g.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),g.reference!=="suffix"&&f.scheme&&b.push(f.scheme,":");const k=r(f);if(k!==void 0&&(g.reference!=="suffix"&&b.push("//"),b.push(k),f.path&&f.path[0]!=="/"&&b.push("/")),f.path!==void 0){let S=f.path;!g.absolutePath&&(!w||!w.absolutePath)&&(S=e(S)),k===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),b.push(S)}return f.query!==void 0&&b.push("?",f.query),f.fragment!==void 0&&b.push("#",f.fragment),b.join("")}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(h,v){const f=Object.assign({},v),g={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let b=!1;f.reference==="suffix"&&(f.scheme?h=f.scheme+":"+h:h="//"+h);const w=h.match(_);if(w){if(g.scheme=w[1],g.userinfo=w[3],g.host=w[4],g.port=parseInt(w[5],10),g.path=w[6]||"",g.query=w[7],g.fragment=w[8],isNaN(g.port)&&(g.port=w[5]),g.host)if(s(g.host)===!1){const C=t(g.host);g.host=C.host.toLowerCase(),b=C.isIPV6}else b=!0;g.scheme===void 0&&g.userinfo===void 0&&g.host===void 0&&g.port===void 0&&g.query===void 0&&!g.path?g.reference="same-document":g.scheme===void 0?g.reference="relative":g.fragment===void 0?g.reference="absolute":g.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==g.reference&&(g.error=g.error||"URI is not a "+f.reference+" reference.");const k=i(f.scheme||g.scheme);if(!f.unicodeSupport&&(!k||!k.unicodeSupport)&&g.host&&(f.domainHost||k&&k.domainHost)&&b===!1&&a(g.host))try{g.host=URL.domainToASCII(g.host.toLowerCase())}catch(S){g.error=g.error||"Host's domain name can not be converted to ASCII: "+S}(!k||k&&!k.skipNormalize)&&(h.indexOf("%")!==-1&&(g.scheme!==void 0&&(g.scheme=unescape(g.scheme)),g.host!==void 0&&(g.host=unescape(g.host))),g.path&&(g.path=escape(unescape(g.path))),g.fragment&&(g.fragment=encodeURI(decodeURIComponent(g.fragment)))),k&&k.parse&&k.parse(g,f)}else g.error=g.error||"URI can not be parsed.";return g}const y={SCHEMES:o,normalize:c,resolve:u,resolveComponent:l,equal:d,serialize:m,parse:p};return zr.exports=y,zr.exports.default=y,zr.exports.fastUri=y,zr.exports}var Fi;function Pd(){if(Fi)return qn;Fi=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=Rd();return t.code='require("ajv/dist/runtime/uri").default',qn.default=t,qn}var Hi;function xd(){return Hi||(Hi=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=An();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=ie();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ya(),s=zn(),a=Si(),o=va(),i=ie(),c=Nn(),u=On(),l=he(),d=Td,m=Pd(),_=(L,P)=>new RegExp(L,P);_.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function g(L){var P,z,I,$,E,N,ee,ne,me,fe,R,x,M,U,re,ue,Fe,Et,tt,rt,He,jr,dt,fi,hi;const Rn=L.strict,pi=(P=L.code)===null||P===void 0?void 0:P.optimize,yd=pi===!0||pi===void 0?1:pi||0,vd=(I=(z=L.code)===null||z===void 0?void 0:z.regExp)!==null&&I!==void 0?I:_,fw=($=L.uriResolver)!==null&&$!==void 0?$:m.default;return{strictSchema:(N=(E=L.strictSchema)!==null&&E!==void 0?E:Rn)!==null&&N!==void 0?N:!0,strictNumbers:(ne=(ee=L.strictNumbers)!==null&&ee!==void 0?ee:Rn)!==null&&ne!==void 0?ne:!0,strictTypes:(fe=(me=L.strictTypes)!==null&&me!==void 0?me:Rn)!==null&&fe!==void 0?fe:"log",strictTuples:(x=(R=L.strictTuples)!==null&&R!==void 0?R:Rn)!==null&&x!==void 0?x:"log",strictRequired:(U=(M=L.strictRequired)!==null&&M!==void 0?M:Rn)!==null&&U!==void 0?U:!1,code:L.code?{...L.code,optimize:yd,regExp:vd}:{optimize:yd,regExp:vd},loopRequired:(re=L.loopRequired)!==null&&re!==void 0?re:f,loopEnum:(ue=L.loopEnum)!==null&&ue!==void 0?ue:f,meta:(Fe=L.meta)!==null&&Fe!==void 0?Fe:!0,messages:(Et=L.messages)!==null&&Et!==void 0?Et:!0,inlineRefs:(tt=L.inlineRefs)!==null&&tt!==void 0?tt:!0,schemaId:(rt=L.schemaId)!==null&&rt!==void 0?rt:"$id",addUsedSchema:(He=L.addUsedSchema)!==null&&He!==void 0?He:!0,validateSchema:(jr=L.validateSchema)!==null&&jr!==void 0?jr:!0,validateFormats:(dt=L.validateFormats)!==null&&dt!==void 0?dt:!0,unicodeRegExp:(fi=L.unicodeRegExp)!==null&&fi!==void 0?fi:!0,int32range:(hi=L.int32range)!==null&&hi!==void 0?hi:!0,uriResolver:fw}}class b{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...g(P)};const{es5:z,lines:I}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:z,lines:I}),this.logger=V(P.logger);const $=P.validateFormats;P.validateFormats=!1,this.RULES=(0,a.getRules)(),w.call(this,h,P,"NOT SUPPORTED"),w.call(this,v,P,"DEPRECATED","warn"),this._metaOpts=D.call(this),P.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&j.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),S.call(this),P.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:z,schemaId:I}=this.opts;let $=d;I==="id"&&($={...d},$.id=$.$id,delete $.$id),z&&P&&this.addMetaSchema($,$[I],!1)}defaultMeta(){const{meta:P,schemaId:z}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[z]||P:void 0}validate(P,z){let I;if(typeof P=="string"){if(I=this.getSchema(P),!I)throw new Error(`no schema with key or ref "${P}"`)}else I=this.compile(P);const $=I(z);return"$async"in I||(this.errors=I.errors),$}compile(P,z){const I=this._addSchema(P,z);return I.validate||this._compileSchemaEnv(I)}compileAsync(P,z){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return $.call(this,P,z);async function $(fe,R){await E.call(this,fe.$schema);const x=this._addSchema(fe,R);return x.validate||N.call(this,x)}async function E(fe){fe&&!this.getSchema(fe)&&await $.call(this,{$ref:fe},!0)}async function N(fe){try{return this._compileSchemaEnv(fe)}catch(R){if(!(R instanceof s.default))throw R;return ee.call(this,R),await ne.call(this,R.missingSchema),N.call(this,fe)}}function ee({missingSchema:fe,missingRef:R}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${R} cannot be resolved`)}async function ne(fe){const R=await me.call(this,fe);this.refs[fe]||await E.call(this,R.$schema),this.refs[fe]||this.addSchema(R,fe,z)}async function me(fe){const R=this._loading[fe];if(R)return R;try{return await(this._loading[fe]=I(fe))}finally{delete this._loading[fe]}}}addSchema(P,z,I,$=this.opts.validateSchema){if(Array.isArray(P)){for(const N of P)this.addSchema(N,void 0,I,$);return this}let E;if(typeof P=="object"){const{schemaId:N}=this.opts;if(E=P[N],E!==void 0&&typeof E!="string")throw new Error(`schema ${N} must be string`)}return z=(0,c.normalizeId)(z||E),this._checkUnique(z),this.schemas[z]=this._addSchema(P,I,z,$,!0),this}addMetaSchema(P,z,I=this.opts.validateSchema){return this.addSchema(P,z,!0,I),this}validateSchema(P,z){if(typeof P=="boolean")return!0;let I;if(I=P.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(I,P);if(!$&&z){const E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return $}getSchema(P){let z;for(;typeof(z=k.call(this,P))=="string";)P=z;if(z===void 0){const{schemaId:I}=this.opts,$=new o.SchemaEnv({schema:{},schemaId:I});if(z=o.resolveSchema.call(this,$,P),!z)return;this.refs[P]=z}return z.validate||this._compileSchemaEnv(z)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const z=k.call(this,P);return typeof z=="object"&&this._cache.delete(z.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const z=P;this._cache.delete(z);let I=P[this.opts.schemaId];return I&&(I=(0,c.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const z of P)this.addKeyword(z);return this}addKeyword(P,z){let I;if(typeof P=="string")I=P,typeof z=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),z.keyword=I);else if(typeof P=="object"&&z===void 0){if(z=P,I=z.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,I,z),!z)return(0,l.eachItem)(I,E=>ge.call(this,E)),this;Ye.call(this,z);const $={...z,type:(0,u.getJSONTypes)(z.type),schemaType:(0,u.getJSONTypes)(z.schemaType)};return(0,l.eachItem)(I,$.type.length===0?E=>ge.call(this,E,$):E=>$.type.forEach(N=>ge.call(this,E,$,N))),this}getKeyword(P){const z=this.RULES.all[P];return typeof z=="object"?z.definition:!!z}removeKeyword(P){const{RULES:z}=this;delete z.keywords[P],delete z.all[P];for(const I of z.rules){const $=I.rules.findIndex(E=>E.keyword===P);$>=0&&I.rules.splice($,1)}return this}addFormat(P,z){return typeof z=="string"&&(z=new RegExp(z)),this.formats[P]=z,this}errorsText(P=this.errors,{separator:z=", ",dataVar:I="data"}={}){return!P||P.length===0?"No errors":P.map($=>`${I}${$.instancePath} ${$.message}`).reduce(($,E)=>$+z+E)}$dataMetaSchema(P,z){const I=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const $ of z){const E=$.split("/").slice(1);let N=P;for(const ee of E)N=N[ee];for(const ee in I){const ne=I[ee];if(typeof ne!="object")continue;const{$data:me}=ne.definition,fe=N[ee];me&&fe&&(N[ee]=Tt(fe))}}return P}_removeAllSchemas(P,z){for(const I in P){const $=P[I];(!z||z.test(I))&&(typeof $=="string"?delete P[I]:$&&!$.meta&&(this._cache.delete($.schema),delete P[I]))}}_addSchema(P,z,I,$=this.opts.validateSchema,E=this.opts.addUsedSchema){let N;const{schemaId:ee}=this.opts;if(typeof P=="object")N=P[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let ne=this._cache.get(P);if(ne!==void 0)return ne;I=(0,c.normalizeId)(N||I);const me=c.getSchemaRefs.call(this,P,I);return ne=new o.SchemaEnv({schema:P,schemaId:ee,meta:z,baseId:I,localRefs:me}),this._cache.set(ne.schema,ne),E&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=ne),$&&this.validateSchema(P,!0),ne}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):o.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const z=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,P)}finally{this.opts=z}}}b.ValidationError=n.default,b.MissingRefError=s.default,t.default=b;function w(L,P,z,I="error"){for(const $ in L){const E=$;E in P&&this.logger[I](`${z}: option ${$}. ${L[E]}`)}}function k(L){return L=(0,c.normalizeId)(L),this.schemas[L]||this.refs[L]}function S(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const P in L)this.addSchema(L[P],P)}function C(){for(const L in this.opts.formats){const P=this.opts.formats[L];P&&this.addFormat(L,P)}}function j(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in L){const z=L[P];z.keyword||(z.keyword=P),this.addKeyword(z)}}function D(){const L={...this.opts};for(const P of p)delete L[P];return L}const A={log(){},warn(){},error(){}};function V(L){if(L===!1)return A;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(L,P){const{RULES:z}=this;if((0,l.eachItem)(L,I=>{if(z.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!J.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function ge(L,P,z){var I;const $=P?.post;if(z&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:E}=this;let N=$?E.post:E.rules.find(({type:ne})=>ne===z);if(N||(N={type:z,rules:[]},E.rules.push(N)),E.keywords[L]=!0,!P)return;const ee={keyword:L,definition:{...P,type:(0,u.getJSONTypes)(P.type),schemaType:(0,u.getJSONTypes)(P.schemaType)}};P.before?Ge.call(this,N,ee,P.before):N.rules.push(ee),E.all[L]=ee,(I=P.implements)===null||I===void 0||I.forEach(ne=>this.addKeyword(ne))}function Ge(L,P,z){const I=L.rules.findIndex($=>$.keyword===z);I>=0?L.rules.splice(I,0,P):(L.rules.push(P),this.logger.warn(`rule ${z} is not defined`))}function Ye(L){let{metaSchema:P}=L;P!==void 0&&(L.$data&&this.opts.$data&&(P=Tt(P)),L.validateSchema=this.compile(P,!0))}const be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Tt(L){return{anyOf:[L,be]}}})(da)),da}var Zn={},Ln={},Un={},Wi;function Id(){if(Wi)return Un;Wi=1,Object.defineProperty(Un,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Un.default=t,Un}var Lt={},Ki;function Cd(){if(Ki)return Lt;Ki=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.callRef=Lt.getValidate=void 0;const t=zn(),e=ht(),r=ie(),n=Zt(),s=va(),a=he(),o={keyword:"$ref",schemaType:"string",code(u){const{gen:l,schema:d,it:m}=u,{baseId:_,schemaEnv:p,validateName:y,opts:h,self:v}=m,{root:f}=p;if((d==="#"||d==="#/")&&_===f.baseId)return b();const g=s.resolveRef.call(v,f,_,d);if(g===void 0)throw new t.default(m.opts.uriResolver,_,d);if(g instanceof s.SchemaEnv)return w(g);return k(g);function b(){if(p===f)return c(u,y,p,p.$async);const S=l.scopeValue("root",{ref:f});return c(u,(0,r._)`${S}.validate`,f,f.$async)}function w(S){const C=i(u,S);c(u,C,S,S.$async)}function k(S){const C=l.scopeValue("schema",h.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),j=l.name("valid"),D=u.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:C,errSchemaPath:d},j);u.mergeEvaluated(D),u.ok(j)}}};function i(u,l){const{gen:d}=u;return l.validate?d.scopeValue("validate",{ref:l.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:l})}.validate`}Lt.getValidate=i;function c(u,l,d,m){const{gen:_,it:p}=u,{allErrors:y,schemaEnv:h,opts:v}=p,f=v.passContext?n.default.this:r.nil;m?g():b();function g(){if(!h.$async)throw new Error("async schema referenced by sync schema");const S=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,e.callValidateCode)(u,l,f)}`),k(l),y||_.assign(S,!0)},C=>{_.if((0,r._)`!(${C} instanceof ${p.ValidationError})`,()=>_.throw(C)),w(C),y||_.assign(S,!1)}),u.ok(S)}function b(){u.result((0,e.callValidateCode)(u,l,f),()=>k(l),()=>w(l))}function w(S){const C=(0,r._)`${S}.errors`;_.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${C} : ${n.default.vErrors}.concat(${C})`),_.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function k(S){var C;if(!p.opts.unevaluated)return;const j=(C=d?.validate)===null||C===void 0?void 0:C.evaluated;if(p.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(p.props=a.mergeEvaluated.props(_,j.props,p.props));else{const D=_.var("props",(0,r._)`${S}.evaluated.props`);p.props=a.mergeEvaluated.props(_,D,p.props,r.Name)}if(p.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(p.items=a.mergeEvaluated.items(_,j.items,p.items));else{const D=_.var("items",(0,r._)`${S}.evaluated.items`);p.items=a.mergeEvaluated.items(_,D,p.items,r.Name)}}}return Lt.callRef=c,Lt.default=o,Lt}var Bi;function Od(){if(Bi)return Ln;Bi=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=Id(),e=Cd(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return Ln.default=r,Ln}var Dn={},Vn={},Ji;function Nd(){if(Ji)return Vn;Ji=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=ie(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:a,schemaCode:o})=>(0,t.str)`must be ${r[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,t._)`{comparison: ${r[a].okStr}, limit: ${o}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:o,data:i,schemaCode:c}=a;a.fail$data((0,t._)`${i} ${r[o].fail} ${c} || isNaN(${i})`)}};return Vn.default=s,Vn}var Fn={},Gi;function Ad(){if(Gi)return Fn;Gi=1,Object.defineProperty(Fn,"__esModule",{value:!0});const t=ie(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:a,schemaCode:o,it:i}=n,c=i.opts.multipleOfPrecision,u=s.let("res"),l=c?(0,t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,t._)`${u} !== parseInt(${u})`;n.fail$data((0,t._)`(${o} === 0 || (${u} = ${a}/${o}, ${l}))`)}};return Fn.default=r,Fn}var Hn={},Wn={},Yi;function jd(){if(Yi)return Wn;Yi=1,Object.defineProperty(Wn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,s=0,a;for(;s<r;)n++,a=e.charCodeAt(s++),a>=55296&&a<=56319&&s<r&&(a=e.charCodeAt(s),(a&64512)===56320&&s++);return n}return Wn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',Wn}var Xi;function Md(){if(Xi)return Hn;Xi=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=ie(),e=he(),r=jd(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const i=a==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${o} characters`},params:({schemaCode:a})=>(0,t._)`{limit: ${a}}`},code(a){const{keyword:o,data:i,schemaCode:c,it:u}=a,l=o==="maxLength"?t.operators.GT:t.operators.LT,d=u.opts.unicode===!1?(0,t._)`${i}.length`:(0,t._)`${(0,e.useFunc)(a.gen,r.default)}(${i})`;a.fail$data((0,t._)`${d} ${l} ${c}`)}};return Hn.default=s,Hn}var Kn={},Qi;function zd(){if(Qi)return Kn;Qi=1,Object.defineProperty(Kn,"__esModule",{value:!0});const t=ht(),e=he(),r=ie(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,r.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,r._)`{pattern: ${a}}`},code(a){const{gen:o,data:i,$data:c,schema:u,schemaCode:l,it:d}=a,m=d.opts.unicodeRegExp?"u":"";if(c){const{regExp:_}=d.opts.code,p=_.code==="new RegExp"?(0,r._)`new RegExp`:(0,e.useFunc)(o,_),y=o.let("valid");o.try(()=>o.assign(y,(0,r._)`${p}(${l}, ${m}).test(${i})`),()=>o.assign(y,!1)),a.fail$data((0,r._)`!${y}`)}else{const _=(0,t.usePattern)(a,u);a.fail$data((0,r._)`!${_}.test(${i})`)}}};return Kn.default=s,Kn}var Bn={},ec;function qd(){if(ec)return Bn;ec=1,Object.defineProperty(Bn,"__esModule",{value:!0});const t=ie(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const a=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${s} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:a,schemaCode:o}=n,i=s==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${a}).length ${i} ${o}`)}};return Bn.default=r,Bn}var Jn={},tc;function Zd(){if(tc)return Jn;tc=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=ht(),e=ie(),r=he(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,e.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,e._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:i,schemaCode:c,data:u,$data:l,it:d}=a,{opts:m}=d;if(!l&&i.length===0)return;const _=i.length>=m.loopRequired;if(d.allErrors?p():y(),m.strictRequired){const f=a.parentSchema.properties,{definedProperties:g}=a.it;for(const b of i)if(f?.[b]===void 0&&!g.has(b)){const w=d.schemaEnv.baseId+d.errSchemaPath,k=`required property "${b}" is not defined at "${w}" (strictRequired)`;(0,r.checkStrictMode)(d,k,d.opts.strictRequired)}}function p(){if(_||l)a.block$data(e.nil,h);else for(const f of i)(0,t.checkReportMissingProp)(a,f)}function y(){const f=o.let("missing");if(_||l){const g=o.let("valid",!0);a.block$data(g,()=>v(f,g)),a.ok(g)}else o.if((0,t.checkMissingProp)(a,i,f)),(0,t.reportMissingProp)(a,f),o.else()}function h(){o.forOf("prop",c,f=>{a.setParams({missingProperty:f}),o.if((0,t.noPropertyInData)(o,u,f,m.ownProperties),()=>a.error())})}function v(f,g){a.setParams({missingProperty:f}),o.forOf(f,c,()=>{o.assign(g,(0,t.propertyInData)(o,u,f,m.ownProperties)),o.if((0,e.not)(g),()=>{a.error(),o.break()})},e.nil)}}};return Jn.default=s,Jn}var Gn={},rc;function Ld(){if(rc)return Gn;rc=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=ie(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const a=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${s} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:s,data:a,schemaCode:o}=n,i=s==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${a}.length ${i} ${o}`)}};return Gn.default=r,Gn}var Yn={},Xn={},nc;function ka(){if(nc)return Xn;nc=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=Ni();return t.code='require("ajv/dist/runtime/equal").default',Xn.default=t,Xn}var sc;function Ud(){if(sc)return Yn;sc=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t=On(),e=ie(),r=he(),n=ka(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:i}})=>(0,e.str)`must NOT have duplicate items (items ## ${i} and ${o} are identical)`,params:({params:{i:o,j:i}})=>(0,e._)`{i: ${o}, j: ${i}}`},code(o){const{gen:i,data:c,$data:u,schema:l,parentSchema:d,schemaCode:m,it:_}=o;if(!u&&!l)return;const p=i.let("valid"),y=d.items?(0,t.getSchemaTypes)(d.items):[];o.block$data(p,h,(0,e._)`${m} === false`),o.ok(p);function h(){const b=i.let("i",(0,e._)`${c}.length`),w=i.let("j");o.setParams({i:b,j:w}),i.assign(p,!0),i.if((0,e._)`${b} > 1`,()=>(v()?f:g)(b,w))}function v(){return y.length>0&&!y.some(b=>b==="object"||b==="array")}function f(b,w){const k=i.name("item"),S=(0,t.checkDataTypes)(y,k,_.opts.strictNumbers,t.DataType.Wrong),C=i.const("indices",(0,e._)`{}`);i.for((0,e._)`;${b}--;`,()=>{i.let(k,(0,e._)`${c}[${b}]`),i.if(S,(0,e._)`continue`),y.length>1&&i.if((0,e._)`typeof ${k} == "string"`,(0,e._)`${k} += "_"`),i.if((0,e._)`typeof ${C}[${k}] == "number"`,()=>{i.assign(w,(0,e._)`${C}[${k}]`),o.error(),i.assign(p,!1).break()}).code((0,e._)`${C}[${k}] = ${b}`)})}function g(b,w){const k=(0,r.useFunc)(i,n.default),S=i.name("outer");i.label(S).for((0,e._)`;${b}--;`,()=>i.for((0,e._)`${w} = ${b}; ${w}--;`,()=>i.if((0,e._)`${k}(${c}[${b}], ${c}[${w}])`,()=>{o.error(),i.assign(p,!1).break(S)})))}}};return Yn.default=a,Yn}var Qn={},ac;function Dd(){if(ac)return Qn;ac=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=ie(),e=he(),r=ka(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,t._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:i,$data:c,schemaCode:u,schema:l}=a;c||l&&typeof l=="object"?a.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${i}, ${u})`):a.fail((0,t._)`${l} !== ${i}`)}};return Qn.default=s,Qn}var es={},oc;function Vd(){if(oc)return es;oc=1,Object.defineProperty(es,"__esModule",{value:!0});const t=ie(),e=he(),r=ka(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,t._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:i,$data:c,schema:u,schemaCode:l,it:d}=a;if(!c&&u.length===0)throw new Error("enum must have non-empty array");const m=u.length>=d.opts.loopEnum;let _;const p=()=>_??(_=(0,e.useFunc)(o,r.default));let y;if(m||c)y=o.let("valid"),a.block$data(y,h);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const f=o.const("vSchema",l);y=(0,t.or)(...u.map((g,b)=>v(f,b)))}a.pass(y);function h(){o.assign(y,!1),o.forOf("v",l,f=>o.if((0,t._)`${p()}(${i}, ${f})`,()=>o.assign(y,!0).break()))}function v(f,g){const b=u[g];return typeof b=="object"&&b!==null?(0,t._)`${p()}(${i}, ${f}[${g}])`:(0,t._)`${i} === ${b}`}}};return es.default=s,es}var ic;function Fd(){if(ic)return Dn;ic=1,Object.defineProperty(Dn,"__esModule",{value:!0});const t=Nd(),e=Ad(),r=Md(),n=zd(),s=qd(),a=Zd(),o=Ld(),i=Ud(),c=Dd(),u=Vd(),l=[t.default,e.default,r.default,n.default,s.default,a.default,o.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return Dn.default=l,Dn}var ts={},pr={},cc;function uc(){if(cc)return pr;cc=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.validateAdditionalItems=void 0;const t=ie(),e=he(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:i}=a,{items:c}=o;if(!Array.isArray(c)){(0,e.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(a,c)}};function s(a,o){const{gen:i,schema:c,data:u,keyword:l,it:d}=a;d.items=!0;const m=i.const("len",(0,t._)`${u}.length`);if(c===!1)a.setParams({len:o.length}),a.pass((0,t._)`${m} <= ${o.length}`);else if(typeof c=="object"&&!(0,e.alwaysValidSchema)(d,c)){const p=i.var("valid",(0,t._)`${m} <= ${o.length}`);i.if((0,t.not)(p),()=>_(p)),a.ok(p)}function _(p){i.forRange("i",o.length,m,y=>{a.subschema({keyword:l,dataProp:y,dataPropType:e.Type.Num},p),d.allErrors||i.if((0,t.not)(p),()=>i.break())})}}return pr.validateAdditionalItems=s,pr.default=n,pr}var rs={},mr={},lc;function dc(){if(lc)return mr;lc=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.validateTuple=void 0;const t=ie(),e=he(),r=ht(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:i}=a;if(Array.isArray(o))return s(a,"additionalItems",o);i.items=!0,!(0,e.alwaysValidSchema)(i,o)&&a.ok((0,r.validateArray)(a))}};function s(a,o,i=a.schema){const{gen:c,parentSchema:u,data:l,keyword:d,it:m}=a;y(u),m.opts.unevaluated&&i.length&&m.items!==!0&&(m.items=e.mergeEvaluated.items(c,i.length,m.items));const _=c.name("valid"),p=c.const("len",(0,t._)`${l}.length`);i.forEach((h,v)=>{(0,e.alwaysValidSchema)(m,h)||(c.if((0,t._)`${p} > ${v}`,()=>a.subschema({keyword:d,schemaProp:v,dataProp:v},_)),a.ok(_))});function y(h){const{opts:v,errSchemaPath:f}=m,g=i.length,b=g===h.minItems&&(g===h.maxItems||h[o]===!1);if(v.strictTuples&&!b){const w=`"${d}" is ${g}-tuple, but minItems or maxItems/${o} are not specified or different at path "${f}"`;(0,e.checkStrictMode)(m,w,v.strictTuples)}}}return mr.validateTuple=s,mr.default=n,mr}var fc;function Hd(){if(fc)return rs;fc=1,Object.defineProperty(rs,"__esModule",{value:!0});const t=dc(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return rs.default=e,rs}var ns={},hc;function Wd(){if(hc)return ns;hc=1,Object.defineProperty(ns,"__esModule",{value:!0});const t=ie(),e=he(),r=ht(),n=uc(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:i,parentSchema:c,it:u}=o,{prefixItems:l}=c;u.items=!0,!(0,e.alwaysValidSchema)(u,i)&&(l?(0,n.validateAdditionalItems)(o,l):o.ok((0,r.validateArray)(o)))}};return ns.default=a,ns}var ss={},pc;function Kd(){if(pc)return ss;pc=1,Object.defineProperty(ss,"__esModule",{value:!0});const t=ie(),e=he(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:a}})=>a===void 0?(0,t.str)`must contain at least ${s} valid item(s)`:(0,t.str)`must contain at least ${s} and no more than ${a} valid item(s)`,params:({params:{min:s,max:a}})=>a===void 0?(0,t._)`{minContains: ${s}}`:(0,t._)`{minContains: ${s}, maxContains: ${a}}`},code(s){const{gen:a,schema:o,parentSchema:i,data:c,it:u}=s;let l,d;const{minContains:m,maxContains:_}=i;u.opts.next?(l=m===void 0?1:m,d=_):l=1;const p=a.const("len",(0,t._)`${c}.length`);if(s.setParams({min:l,max:d}),d===void 0&&l===0){(0,e.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&l>d){(0,e.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.alwaysValidSchema)(u,o)){let g=(0,t._)`${p} >= ${l}`;d!==void 0&&(g=(0,t._)`${g} && ${p} <= ${d}`),s.pass(g);return}u.items=!0;const y=a.name("valid");d===void 0&&l===1?v(y,()=>a.if(y,()=>a.break())):l===0?(a.let(y,!0),d!==void 0&&a.if((0,t._)`${c}.length > 0`,h)):(a.let(y,!1),h()),s.result(y,()=>s.reset());function h(){const g=a.name("_valid"),b=a.let("count",0);v(g,()=>a.if(g,()=>f(b)))}function v(g,b){a.forRange("i",0,p,w=>{s.subschema({keyword:"contains",dataProp:w,dataPropType:e.Type.Num,compositeRule:!0},g),b()})}function f(g){a.code((0,t._)`${g}++`),d===void 0?a.if((0,t._)`${g} >= ${l}`,()=>a.assign(y,!0).break()):(a.if((0,t._)`${g} > ${d}`,()=>a.assign(y,!1).break()),l===1?a.assign(y,!0):a.if((0,t._)`${g} >= ${l}`,()=>a.assign(y,!0)))}}};return ss.default=n,ss}var $a={},mc;function Bd(){return mc||(mc=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ie(),r=he(),n=ht();t.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,e._)`{property: ${c},
|
|
6
6
|
missingProperty: ${d},
|
|
7
7
|
depsCount: ${u},
|
|
8
8
|
deps: ${l}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[u,l]=a(c);o(c,u),i(c,l)}};function a({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const m=Array.isArray(c[d])?u:l;m[d]=c[d]}return[u,l]}function o(c,u=c.schema){const{gen:l,data:d,it:m}=c;if(Object.keys(u).length===0)return;const _=l.let("missing");for(const p in u){const y=u[p];if(y.length===0)continue;const h=(0,n.propertyInData)(l,d,p,m.opts.ownProperties);c.setParams({property:p,depsCount:y.length,deps:y.join(", ")}),m.allErrors?l.if(h,()=>{for(const v of y)(0,n.checkReportMissingProp)(c,v)}):(l.if((0,e._)`${h} && (${(0,n.checkMissingProp)(c,y,_)})`),(0,n.reportMissingProp)(c,_),l.else())}}t.validatePropertyDeps=o;function i(c,u=c.schema){const{gen:l,data:d,keyword:m,it:_}=c,p=l.name("valid");for(const y in u)(0,r.alwaysValidSchema)(_,u[y])||(l.if((0,n.propertyInData)(l,d,y,_.opts.ownProperties),()=>{const h=c.subschema({keyword:m,schemaProp:y},p);c.mergeValidEvaluated(h,p)},()=>l.var(p,!0)),c.ok(p))}t.validateSchemaDeps=i,t.default=s})($a)),$a}var as={},_c;function Jd(){if(_c)return as;_c=1,Object.defineProperty(as,"__esModule",{value:!0});const t=ie(),e=he(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,t._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:a,schema:o,data:i,it:c}=s;if((0,e.alwaysValidSchema)(c,o))return;const u=a.name("valid");a.forIn("key",i,l=>{s.setParams({propertyName:l}),s.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},u),a.if((0,t.not)(u),()=>{s.error(!0),c.allErrors||a.break()})}),s.ok(u)}};return as.default=n,as}var os={},gc;function yc(){if(gc)return os;gc=1,Object.defineProperty(os,"__esModule",{value:!0});const t=ht(),e=ie(),r=Zt(),n=he(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:i,schema:c,parentSchema:u,data:l,errsCount:d,it:m}=o;if(!d)throw new Error("ajv implementation error");const{allErrors:_,opts:p}=m;if(m.props=!0,p.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,c))return;const y=(0,t.allSchemaProperties)(u.properties),h=(0,t.allSchemaProperties)(u.patternProperties);v(),o.ok((0,e._)`${d} === ${r.default.errors}`);function v(){i.forIn("key",l,k=>{!y.length&&!h.length?b(k):i.if(f(k),()=>b(k))})}function f(k){let S;if(y.length>8){const C=(0,n.schemaRefOrVal)(m,u.properties,"properties");S=(0,t.isOwnProperty)(i,C,k)}else y.length?S=(0,e.or)(...y.map(C=>(0,e._)`${k} === ${C}`)):S=e.nil;return h.length&&(S=(0,e.or)(S,...h.map(C=>(0,e._)`${(0,t.usePattern)(o,C)}.test(${k})`))),(0,e.not)(S)}function g(k){i.code((0,e._)`delete ${l}[${k}]`)}function b(k){if(p.removeAdditional==="all"||p.removeAdditional&&c===!1){g(k);return}if(c===!1){o.setParams({additionalProperty:k}),o.error(),_||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(m,c)){const S=i.name("valid");p.removeAdditional==="failing"?(w(k,S,!1),i.if((0,e.not)(S),()=>{o.reset(),g(k)})):(w(k,S),_||i.if((0,e.not)(S),()=>i.break()))}}function w(k,S,C){const j={keyword:"additionalProperties",dataProp:k,dataPropType:n.Type.Str};C===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(j,S)}}};return os.default=a,os}var is={},vc;function Gd(){if(vc)return is;vc=1,Object.defineProperty(is,"__esModule",{value:!0});const t=An(),e=ht(),r=he(),n=yc(),s={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:o,schema:i,parentSchema:c,data:u,it:l}=a;l.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(l,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(i);for(const h of d)l.definedProperties.add(h);l.opts.unevaluated&&d.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(o,(0,r.toHash)(d),l.props));const m=d.filter(h=>!(0,r.alwaysValidSchema)(l,i[h]));if(m.length===0)return;const _=o.name("valid");for(const h of m)p(h)?y(h):(o.if((0,e.propertyInData)(o,u,h,l.opts.ownProperties)),y(h),l.allErrors||o.else().var(_,!0),o.endIf()),a.it.definedProperties.add(h),a.ok(_);function p(h){return l.opts.useDefaults&&!l.compositeRule&&i[h].default!==void 0}function y(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},_)}}};return is.default=s,is}var cs={},wc;function Yd(){if(wc)return cs;wc=1,Object.defineProperty(cs,"__esModule",{value:!0});const t=ht(),e=ie(),r=he(),n=he(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:o,schema:i,data:c,parentSchema:u,it:l}=a,{opts:d}=l,m=(0,t.allSchemaProperties)(i),_=m.filter(b=>(0,r.alwaysValidSchema)(l,i[b]));if(m.length===0||_.length===m.length&&(!l.opts.unevaluated||l.props===!0))return;const p=d.strictSchema&&!d.allowMatchingProperties&&u.properties,y=o.name("valid");l.props!==!0&&!(l.props instanceof e.Name)&&(l.props=(0,n.evaluatedPropsToName)(o,l.props));const{props:h}=l;v();function v(){for(const b of m)p&&f(b),l.allErrors?g(b):(o.var(y,!0),g(b),o.if(y))}function f(b){for(const w in p)new RegExp(b).test(w)&&(0,r.checkStrictMode)(l,`property ${w} matches pattern ${b} (use allowMatchingProperties)`)}function g(b){o.forIn("key",c,w=>{o.if((0,e._)`${(0,t.usePattern)(a,b)}.test(${w})`,()=>{const k=_.includes(b);k||a.subschema({keyword:"patternProperties",schemaProp:b,dataProp:w,dataPropType:n.Type.Str},y),l.opts.unevaluated&&h!==!0?o.assign((0,e._)`${h}[${w}]`,!0):!k&&!l.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return cs.default=s,cs}var us={},bc;function Xd(){if(bc)return us;bc=1,Object.defineProperty(us,"__esModule",{value:!0});const t=he(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:a}=r;if((0,t.alwaysValidSchema)(a,s)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return us.default=e,us}var ls={},kc;function Qd(){if(kc)return ls;kc=1,Object.defineProperty(ls,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ht().validateUnion,error:{message:"must match a schema in anyOf"}};return ls.default=e,ls}var ds={},$c;function ef(){if($c)return ds;$c=1,Object.defineProperty(ds,"__esModule",{value:!0});const t=ie(),e=he(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,t._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:a,schema:o,parentSchema:i,it:c}=s;if(!Array.isArray(o))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const u=o,l=a.let("valid",!1),d=a.let("passing",null),m=a.name("_valid");s.setParams({passing:d}),a.block(_),s.result(l,()=>s.reset(),()=>s.error(!0));function _(){u.forEach((p,y)=>{let h;(0,e.alwaysValidSchema)(c,p)?a.var(m,!0):h=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},m),y>0&&a.if((0,t._)`${m} && ${l}`).assign(l,!1).assign(d,(0,t._)`[${d}, ${y}]`).else(),a.if(m,()=>{a.assign(l,!0),a.assign(d,y),h&&s.mergeEvaluated(h,t.Name)})})}}};return ds.default=n,ds}var fs={},Sc;function tf(){if(Sc)return fs;Sc=1,Object.defineProperty(fs,"__esModule",{value:!0});const t=he(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:a}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const o=n.name("valid");s.forEach((i,c)=>{if((0,t.alwaysValidSchema)(a,i))return;const u=r.subschema({keyword:"allOf",schemaProp:c},o);r.ok(o),r.mergeEvaluated(u)})}};return fs.default=e,fs}var hs={},Tc;function rf(){if(Tc)return hs;Tc=1,Object.defineProperty(hs,"__esModule",{value:!0});const t=ie(),e=he(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,t.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,t._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:o,parentSchema:i,it:c}=a;i.then===void 0&&i.else===void 0&&(0,e.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const u=s(c,"then"),l=s(c,"else");if(!u&&!l)return;const d=o.let("valid",!0),m=o.name("_valid");if(_(),a.reset(),u&&l){const y=o.let("ifClause");a.setParams({ifClause:y}),o.if(m,p("then",y),p("else",y))}else u?o.if(m,p("then")):o.if((0,t.not)(m),p("else"));a.pass(d,()=>a.error(!0));function _(){const y=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);a.mergeEvaluated(y)}function p(y,h){return()=>{const v=a.subschema({keyword:y},m);o.assign(d,m),a.mergeValidEvaluated(v,d),h?o.assign(h,(0,t._)`${y}`):a.setParams({ifClause:y})}}}};function s(a,o){const i=a.schema[o];return i!==void 0&&!(0,e.alwaysValidSchema)(a,i)}return hs.default=n,hs}var ps={},Ec;function nf(){if(Ec)return ps;Ec=1,Object.defineProperty(ps,"__esModule",{value:!0});const t=he(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,t.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return ps.default=e,ps}var Rc;function sf(){if(Rc)return ts;Rc=1,Object.defineProperty(ts,"__esModule",{value:!0});const t=uc(),e=Hd(),r=dc(),n=Wd(),s=Kd(),a=Bd(),o=Jd(),i=yc(),c=Gd(),u=Yd(),l=Xd(),d=Qd(),m=ef(),_=tf(),p=rf(),y=nf();function h(v=!1){const f=[l.default,d.default,m.default,_.default,p.default,y.default,o.default,i.default,a.default,c.default,u.default];return v?f.push(e.default,n.default):f.push(t.default,r.default),f.push(s.default),f}return ts.default=h,ts}var ms={},_s={},Pc;function af(){if(Pc)return _s;Pc=1,Object.defineProperty(_s,"__esModule",{value:!0});const t=ie(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,s){const{gen:a,data:o,$data:i,schema:c,schemaCode:u,it:l}=n,{opts:d,errSchemaPath:m,schemaEnv:_,self:p}=l;if(!d.validateFormats)return;i?y():h();function y(){const v=a.scopeValue("formats",{ref:p.formats,code:d.code.formats}),f=a.const("fDef",(0,t._)`${v}[${u}]`),g=a.let("fType"),b=a.let("format");a.if((0,t._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>a.assign(g,(0,t._)`${f}.type || "string"`).assign(b,(0,t._)`${f}.validate`),()=>a.assign(g,(0,t._)`"string"`).assign(b,f)),n.fail$data((0,t.or)(w(),k()));function w(){return d.strictSchema===!1?t.nil:(0,t._)`${u} && !${b}`}function k(){const S=_.$async?(0,t._)`(${f}.async ? await ${b}(${o}) : ${b}(${o}))`:(0,t._)`${b}(${o})`,C=(0,t._)`(typeof ${b} == "function" ? ${S} : ${b}.test(${o}))`;return(0,t._)`${b} && ${b} !== true && ${g} === ${s} && !${C}`}}function h(){const v=p.formats[c];if(!v){w();return}if(v===!0)return;const[f,g,b]=k(v);f===s&&n.pass(S());function w(){if(d.strictSchema===!1){p.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function k(C){const j=C instanceof RegExp?(0,t.regexpCode)(C):d.code.formats?(0,t._)`${d.code.formats}${(0,t.getProperty)(c)}`:void 0,D=a.scopeValue("formats",{key:c,ref:C,code:j});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,t._)`${D}.validate`]:["string",C,D]}function S(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!_.$async)throw new Error("async format in sync schema");return(0,t._)`await ${b}(${o})`}return typeof g=="function"?(0,t._)`${b}(${o})`:(0,t._)`${b}.test(${o})`}}}};return _s.default=r,_s}var xc;function of(){if(xc)return ms;xc=1,Object.defineProperty(ms,"__esModule",{value:!0});const e=[af().default];return ms.default=e,ms}var rr={},Ic;function cf(){return Ic||(Ic=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.contentVocabulary=rr.metadataVocabulary=void 0,rr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],rr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),rr}var Cc;function uf(){if(Cc)return Zn;Cc=1,Object.defineProperty(Zn,"__esModule",{value:!0});const t=Od(),e=Fd(),r=sf(),n=of(),s=cf(),a=[t.default,e.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return Zn.default=a,Zn}var gs={},qr={},Oc;function lf(){if(Oc)return qr;Oc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.DiscrError=void 0;var t;return(function(e){e.Tag="tag",e.Mapping="mapping"})(t||(qr.DiscrError=t={})),qr}var Nc;function df(){if(Nc)return gs;Nc=1,Object.defineProperty(gs,"__esModule",{value:!0});const t=ie(),e=lf(),r=va(),n=zn(),s=he(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===e.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:u}})=>(0,t._)`{error: ${i}, tag: ${u}, tagValue: ${c}}`},code(i){const{gen:c,data:u,schema:l,parentSchema:d,it:m}=i,{oneOf:_}=d;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=l.propertyName;if(typeof p!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),h=c.const("tag",(0,t._)`${u}${(0,t.getProperty)(p)}`);c.if((0,t._)`typeof ${h} == "string"`,()=>v(),()=>i.error(!1,{discrError:e.DiscrError.Tag,tag:h,tagName:p})),i.ok(y);function v(){const b=g();c.if(!1);for(const w in b)c.elseIf((0,t._)`${h} === ${w}`),c.assign(y,f(b[w]));c.else(),i.error(!1,{discrError:e.DiscrError.Mapping,tag:h,tagName:p}),c.endIf()}function f(b){const w=c.name("valid"),k=i.subschema({keyword:"oneOf",schemaProp:b},w);return i.mergeEvaluated(k,t.Name),w}function g(){var b;const w={},k=C(d);let S=!0;for(let A=0;A<_.length;A++){let V=_[A];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,m.self.RULES)){const Y=V.$ref;if(V=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,Y),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(m.opts.uriResolver,m.baseId,Y)}const J=(b=V?.properties)===null||b===void 0?void 0:b[p];if(typeof J!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);S=S&&(k||C(V)),j(J,A)}if(!S)throw new Error(`discriminator: "${p}" must be required`);return w;function C({required:A}){return Array.isArray(A)&&A.includes(p)}function j(A,V){if(A.const)D(A.const,V);else if(A.enum)for(const J of A.enum)D(J,V);else throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}function D(A,V){if(typeof A!="string"||A in w)throw new Error(`discriminator: "${p}" values must be unique strings`);w[A]=V}}}};return gs.default=o,gs}const ff={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Ac;function jc(){return Ac||(Ac=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=xd(),n=uf(),s=df(),a=ff,o=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(p,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=An();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=ie();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=ya();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=zn();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Pn,Pn.exports)),Pn.exports}var hf=jc();const Mc=hr(hf),pf=Object.freeze({status:"aborted"});function O(t,e,r){function n(i,c){var u;Object.defineProperty(i,"_zod",{value:i._zod??{},enumerable:!1}),(u=i._zod).traits??(u.traits=new Set),i._zod.traits.add(t),e(i,c);for(const l in o.prototype)l in i||Object.defineProperty(i,l,{value:o.prototype[l].bind(i)});i._zod.constr=o,i._zod.def=c}const s=r?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:t});function o(i){var c;const u=r?.Parent?new a:this;n(u,i),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class Zr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const zc={};function Ut(t){return zc}function qc(t){const e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,s])=>e.indexOf(+n)===-1).map(([n,s])=>s)}function mf(t,e){return typeof e=="bigint"?e.toString():e}function Sa(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Ta(t){return t==null}function Ea(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function _f(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return a%o/10**s}function Se(t,e,r){Object.defineProperty(t,e,{get(){{const n=r();return t[e]=n,n}},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function Lr(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ur(t){return JSON.stringify(t)}const Zc=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ys(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const gf=Sa(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function vs(t){if(ys(t)===!1)return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(ys(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}const yf=new Set(["string","number","symbol"]);function Dr(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dt(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function X(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function vf(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const wf={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function bf(t,e){const r={},n=t._zod.def;for(const s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(r[s]=n.shape[s])}return Dt(t,{...t._zod.def,shape:r,checks:[]})}function kf(t,e){const r={...t._zod.def.shape},n=t._zod.def;for(const s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete r[s]}return Dt(t,{...t._zod.def,shape:r,checks:[]})}function $f(t,e){if(!vs(e))throw new Error("Invalid input to extend: expected a plain object");const r={...t._zod.def,get shape(){const n={...t._zod.def.shape,...e};return Lr(this,"shape",n),n},checks:[]};return Dt(t,r)}function Sf(t,e){return Dt(t,{...t._zod.def,get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return Lr(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function Tf(t,e,r){const n=e._zod.def.shape,s={...n};if(r)for(const a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=t?new t({type:"optional",innerType:n[a]}):n[a])}else for(const a in n)s[a]=t?new t({type:"optional",innerType:n[a]}):n[a];return Dt(e,{...e._zod.def,shape:s,checks:[]})}function Ef(t,e,r){const n=e._zod.def.shape,s={...n};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new t({type:"nonoptional",innerType:n[a]}))}else for(const a in n)s[a]=new t({type:"nonoptional",innerType:n[a]});return Dt(e,{...e._zod.def,shape:s,checks:[]})}function Vr(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function nr(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function ws(t){return typeof t=="string"?t:t?.message}function Vt(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const s=ws(t.inst?._zod.def?.error?.(t))??ws(e?.error?.(t))??ws(r.customError?.(t))??ws(r.localeError?.(t))??"Invalid input";n.message=s}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Ra(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Fr(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const Lc=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,mf,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Uc=O("$ZodError",Lc),bs=O("$ZodError",Lc,{Parent:Error});function Rf(t,e=r=>r.message){const r={},n=[];for(const s of t.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}function Pf(t,e){const r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>s({issues:i}));else if(o.code==="invalid_key")s({issues:o.issues});else if(o.code==="invalid_element")s({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let i=n,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(i[u]=i[u]||{_errors:[]},i[u]._errors.push(r(o))):i[u]=i[u]||{_errors:[]},i=i[u],c++}}};return s(t),n}const Dc=t=>(e,r,n,s)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new Zr;if(o.issues.length){const i=new(s?.Err??t)(o.issues.map(c=>Vt(c,a,Ut())));throw Zc(i,s?.callee),i}return o.value},xf=Dc(bs),Vc=t=>async(e,r,n,s)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){const i=new(s?.Err??t)(o.issues.map(c=>Vt(c,a,Ut())));throw Zc(i,s?.callee),i}return o.value},If=Vc(bs),Fc=t=>(e,r,n)=>{const s=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Zr;return a.issues.length?{success:!1,error:new(t??Uc)(a.issues.map(o=>Vt(o,s,Ut())))}:{success:!0,data:a.value}},Pa=Fc(bs),Hc=t=>async(e,r,n)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let a=e._zod.run({value:r,issues:[]},s);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>Vt(o,s,Ut())))}:{success:!0,data:a.value}},xa=Hc(bs),Cf=/^[cC][^\s-]{8,}$/,Of=/^[0-9a-z]+$/,Nf=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Af=/^[0-9a-vA-V]{20}$/,jf=/^[A-Za-z0-9]{27}$/,Mf=/^[a-zA-Z0-9_-]{21}$/,zf=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qf=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wc=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Zf=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Lf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Uf(){return new RegExp(Lf,"u")}const Df=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Ff=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Hf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wf=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kc=/^[A-Za-z0-9_-]*$/,Kf=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Bf=/^\+(?:[0-9]){6,14}[0-9]$/,Bc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Jf=new RegExp(`^${Bc}$`);function Jc(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Gf(t){return new RegExp(`^${Jc(t)}$`)}function Yf(t){const e=Jc({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Bc}T(?:${n})$`)}const Xf=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Qf=/^\d+$/,eh=/^-?\d+(?:\.\d+)?/i,th=/true|false/i,rh=/null/i,nh=/^[^A-Z]*$/,sh=/^[^a-z]*$/,Xe=O("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Gc={number:"number",bigint:"bigint",object:"date"},Yc=O("$ZodCheckLessThan",(t,e)=>{Xe.init(t,e);const r=Gc[typeof e.value];t._zod.onattach.push(n=>{const s=n._zod.bag,a=(e.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(e.inclusive?s.maximum=e.value:s.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Xc=O("$ZodCheckGreaterThan",(t,e)=>{Xe.init(t,e);const r=Gc[typeof e.value];t._zod.onattach.push(n=>{const s=n._zod.bag,a=(e.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?s.minimum=e.value:s.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ah=O("$ZodCheckMultipleOf",(t,e)=>{Xe.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):_f(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),oh=O("$ZodCheckNumberFormat",(t,e)=>{Xe.init(t,e),e.format=e.format||"float64";const r=e.format?.includes("int"),n=r?"int":"number",[s,a]=wf[e.format];t._zod.onattach.push(o=>{const i=o._zod.bag;i.format=e.format,i.minimum=s,i.maximum=a,r&&(i.pattern=Qf)}),t._zod.check=o=>{const i=o.value;if(r){if(!Number.isInteger(i)){o.issues.push({expected:n,format:e.format,code:"invalid_type",input:i,inst:t});return}if(!Number.isSafeInteger(i)){i>0?o.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):o.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}i<s&&o.issues.push({origin:"number",input:i,code:"too_small",minimum:s,inclusive:!0,inst:t,continue:!e.abort}),i>a&&o.issues.push({origin:"number",input:i,code:"too_big",maximum:a,inst:t})}}),ih=O("$ZodCheckMaxLength",(t,e)=>{var r;Xe.init(t,e),(r=t._zod.def).when??(r.when=n=>{const s=n.value;return!Ta(s)&&s.length!==void 0}),t._zod.onattach.push(n=>{const s=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<s&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const s=n.value;if(s.length<=e.maximum)return;const o=Ra(s);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:s,inst:t,continue:!e.abort})}}),ch=O("$ZodCheckMinLength",(t,e)=>{var r;Xe.init(t,e),(r=t._zod.def).when??(r.when=n=>{const s=n.value;return!Ta(s)&&s.length!==void 0}),t._zod.onattach.push(n=>{const s=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>s&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const s=n.value;if(s.length>=e.minimum)return;const o=Ra(s);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:s,inst:t,continue:!e.abort})}}),uh=O("$ZodCheckLengthEquals",(t,e)=>{var r;Xe.init(t,e),(r=t._zod.def).when??(r.when=n=>{const s=n.value;return!Ta(s)&&s.length!==void 0}),t._zod.onattach.push(n=>{const s=n._zod.bag;s.minimum=e.length,s.maximum=e.length,s.length=e.length}),t._zod.check=n=>{const s=n.value,a=s.length;if(a===e.length)return;const o=Ra(s),i=a>e.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),ks=O("$ZodCheckStringFormat",(t,e)=>{var r,n;Xe.init(t,e),t._zod.onattach.push(s=>{const a=s._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=s=>{e.pattern.lastIndex=0,!e.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:e.format,input:s.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),lh=O("$ZodCheckRegex",(t,e)=>{ks.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),dh=O("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=nh),ks.init(t,e)}),fh=O("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=sh),ks.init(t,e)}),hh=O("$ZodCheckIncludes",(t,e)=>{Xe.init(t,e);const r=Dr(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),t._zod.check=s=>{s.value.includes(e.includes,e.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:s.value,inst:t,continue:!e.abort})}}),ph=O("$ZodCheckStartsWith",(t,e)=>{Xe.init(t,e);const r=new RegExp(`^${Dr(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),mh=O("$ZodCheckEndsWith",(t,e)=>{Xe.init(t,e);const r=new RegExp(`.*${Dr(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),_h=O("$ZodCheckOverwrite",(t,e)=>{Xe.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class gh{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const n=e.split(`
|
package/package.json
CHANGED
package/skills/index.ts
CHANGED
|
@@ -80,14 +80,14 @@ export function formatSkillsForSystemPrompt(skills: SkillMeta[]): string {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* 获取所有已加载的技能文件路径(含主 SKILL.md 与 reference 下的 .md/.json/.xml 等)
|
|
84
84
|
*/
|
|
85
85
|
export function getSkillMdPaths(modules: Record<string, string>): string[] {
|
|
86
86
|
return Object.keys(modules)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* 根据相对路径获取某个技能文档的原始内容(支持 .md、.json、.xml 等文本格式)
|
|
91
91
|
*/
|
|
92
92
|
export function getSkillMdContent(modules: Record<string, string>, path: string): string | undefined {
|
|
93
93
|
return modules[path]
|
|
@@ -114,10 +114,10 @@ export type SkillToolsSet = Record<string, any>
|
|
|
114
114
|
export function createSkillTools(modules: Record<string, string>): SkillToolsSet {
|
|
115
115
|
const getSkillContent = tool({
|
|
116
116
|
description:
|
|
117
|
-
'
|
|
117
|
+
'根据技能名称或文档路径获取该技能的完整文档内容。传入 skillName(如 calculator)或 path(如 ./calculator/SKILL.md)。支持 .md、.json、.xml 等各类文本格式文件。',
|
|
118
118
|
inputSchema: z.object({
|
|
119
119
|
skillName: z.string().optional().describe('技能名称,与目录名一致,如 calculator'),
|
|
120
|
-
path: z.string().optional().describe('文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.
|
|
120
|
+
path: z.string().optional().describe('文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.json')
|
|
121
121
|
}),
|
|
122
122
|
execute: (args: { skillName?: string; path?: string }) => {
|
|
123
123
|
const { skillName, path: pathArg } = args
|