@modern-js/utils 2.60.5 → 2.60.6-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cli/require.js +7 -2
- package/dist/cjs/universal/formatWebpack.js +1 -1
- package/dist/compiled/ajv/codegen.js +1 -0
- package/dist/compiled/ajv/index.js +9 -0
- package/dist/compiled/ajv/license +22 -0
- package/dist/compiled/ajv/package.json +1 -0
- package/dist/compiled/ajv/types/ajv.d.ts +16 -0
- package/dist/compiled/ajv/types/compile/codegen/code.d.ts +40 -0
- package/dist/compiled/ajv/types/compile/codegen/index.d.ts +79 -0
- package/dist/compiled/ajv/types/compile/codegen/scope.d.ts +79 -0
- package/dist/compiled/ajv/types/compile/errors.d.ts +13 -0
- package/dist/compiled/ajv/types/compile/index.d.ts +80 -0
- package/dist/compiled/ajv/types/compile/ref_error.d.ts +6 -0
- package/dist/compiled/ajv/types/compile/resolve.d.ts +12 -0
- package/dist/compiled/ajv/types/compile/rules.d.ts +28 -0
- package/dist/compiled/ajv/types/compile/util.d.ts +40 -0
- package/dist/compiled/ajv/types/compile/validate/index.d.ts +42 -0
- package/dist/compiled/ajv/types/compile/validate/subschema.d.ts +47 -0
- package/dist/compiled/ajv/types/core.d.ts +173 -0
- package/dist/compiled/ajv/types/runtime/validation_error.d.ts +7 -0
- package/dist/compiled/ajv/types/types/index.d.ts +183 -0
- package/dist/compiled/ajv/types/types/json-schema.d.ts +124 -0
- package/dist/compiled/ajv/types/types/jtd-schema.d.ts +169 -0
- package/dist/compiled/ajv/types/vocabularies/errors.d.ts +1 -0
- package/dist/compiled/ajv/uri-js.d.ts +59 -0
- package/dist/compiled/ajv-keywords/index.d.ts +1 -0
- package/dist/compiled/ajv-keywords/index.js +1 -0
- package/dist/compiled/ajv-keywords/license +21 -0
- package/dist/compiled/ajv-keywords/package.json +1 -0
- package/dist/compiled/better-ajv-errors/index.d.ts +1 -0
- package/dist/compiled/better-ajv-errors/index.js +1 -0
- package/dist/compiled/better-ajv-errors/license +13 -0
- package/dist/compiled/better-ajv-errors/package.json +1 -0
- package/dist/compiled/recursive-readdir/index.d.ts +21 -0
- package/dist/compiled/recursive-readdir/index.js +1 -0
- package/dist/compiled/recursive-readdir/license +21 -0
- package/dist/compiled/recursive-readdir/package.json +1 -0
- package/dist/compiled/schema-utils3/index.d.ts +1 -0
- package/dist/compiled/schema-utils3/index.js +3 -0
- package/dist/compiled/schema-utils3/license +20 -0
- package/dist/compiled/schema-utils3/package.json +1 -0
- package/dist/compiled/webpack-dev-middleware/index.js +7 -0
- package/dist/compiled/webpack-dev-middleware/license +20 -0
- package/dist/compiled/webpack-dev-middleware/package.json +1 -0
- package/dist/compiled/webpack-dev-middleware/types/index.d.ts +262 -0
- package/dist/esm/cli/require.js +29 -11
- package/dist/esm/universal/formatWebpack.js +1 -1
- package/dist/esm-node/cli/require.js +7 -2
- package/dist/esm-node/universal/formatWebpack.js +1 -1
- package/package.json +1 -1
package/dist/cjs/cli/require.js
CHANGED
@@ -49,9 +49,14 @@ async function compatibleRequire(path, interop = true) {
|
|
49
49
|
try {
|
50
50
|
requiredModule = require(path);
|
51
51
|
} catch (err) {
|
52
|
-
if (err.code === "ERR_REQUIRE_ESM"
|
52
|
+
if (err.code === "ERR_REQUIRE_ESM") {
|
53
53
|
const modulePath = (0, import_node_path.isAbsolute)(path) ? (0, import_node_url.pathToFileURL)(path).href : path;
|
54
|
-
|
54
|
+
if (process.env.NODE_ENV === "development") {
|
55
|
+
const timestamp = Date.now();
|
56
|
+
requiredModule = await import(`${modulePath}?t=${timestamp}`);
|
57
|
+
} else {
|
58
|
+
requiredModule = await import(modulePath);
|
59
|
+
}
|
55
60
|
return interop ? requiredModule.default : requiredModule;
|
56
61
|
} else {
|
57
62
|
throw err;
|
@@ -83,7 +83,7 @@ function addErrorTips(errors, color = defaultColor) {
|
|
83
83
|
formatter(message) {
|
84
84
|
return `${message}
|
85
85
|
|
86
|
-
${color.yellow(`If it is a TypeScript file, you can use "source.include" config to compile it. see ${color.underline("https://modernjs.dev/
|
86
|
+
${color.yellow(`If it is a TypeScript file, you can use "source.include" config to compile it. see ${color.underline("https://modernjs.dev/en/configure/app/source/include.html")}`)}
|
87
87
|
|
88
88
|
${color.green(`${color.gray("// config file")}
|
89
89
|
export default {
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('./').codegen;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
(()=>{var e={4711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const s=r(3834);const a=r(8056);const n=r(8222);const o=r(9520);const i=["/properties"];const c="http://json-schema.org/draft-07/schema";class Ajv extends s.default{_addVocabularies(){super._addVocabularies();a.default.forEach((e=>this.addVocabulary(e)));if(this.opts.discriminator)this.addKeyword(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema(e,c,false);this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:undefined)}}e.exports=t=Ajv;Object.defineProperty(t,"__esModule",{value:true});t["default"]=Ajv;var u=r(7357);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return u.KeywordCxt}});var d=r(4109);Object.defineProperty(t,"_",{enumerable:true,get:function(){return d._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return d.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return d.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return d.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return d.CodeGen}});t.codegen=r(4109)},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName;t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){super();if(!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce(((e,t)=>{if(t instanceof Name)e[t.str]=(e[t.str]||0)+1;return e}),{})}}t._Code=_Code;t.nil=new _Code("");function _(e,...t){const r=[e[0]];let s=0;while(s<t.length){addCodeArg(r,t[s]);r.push(e[++s])}return new _Code(r)}t._=_;const r=new _Code("+");function str(e,...t){const s=[safeStringify(e[0])];let a=0;while(a<t.length){s.push(r);addCodeArg(s,t[a]);s.push(r,safeStringify(e[++a]))}optimize(s);return new _Code(s)}t.str=str;function addCodeArg(e,t){if(t instanceof _Code)e.push(...t._items);else if(t instanceof Name)e.push(t);else e.push(interpolate(t))}t.addCodeArg=addCodeArg;function optimize(e){let t=1;while(t<e.length-1){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(r!==undefined){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function mergeExprItems(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Name||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Name))return`"${e}${t.slice(1)}`;return}function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`}t.strConcat=strConcat;function interpolate(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:safeStringify(Array.isArray(e)?e.join(","):e)}function stringify(e){return new _Code(safeStringify(e))}t.stringify=stringify;function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=safeStringify;function getProperty(e){return typeof e=="string"&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`}t.getProperty=getProperty;function getEsmExportName(e){if(typeof e=="string"&&t.IDENTIFIER.test(e)){return new _Code(`${e}`)}throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}t.getEsmExportName=getEsmExportName;function regexpCode(e){return new _Code(e.toString())}t.regexpCode=regexpCode},4109:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=r(3456);const a=r(3078);var n=r(3456);Object.defineProperty(t,"_",{enumerable:true,get:function(){return n._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return n.str}});Object.defineProperty(t,"strConcat",{enumerable:true,get:function(){return n.strConcat}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return n.nil}});Object.defineProperty(t,"getProperty",{enumerable:true,get:function(){return n.getProperty}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return n.stringify}});Object.defineProperty(t,"regexpCode",{enumerable:true,get:function(){return n.regexpCode}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return n.Name}});var o=r(3078);Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return o.Scope}});Object.defineProperty(t,"ValueScope",{enumerable:true,get:function(){return o.ValueScope}});Object.defineProperty(t,"ValueScopeName",{enumerable:true,get:function(){return o.ValueScopeName}});Object.defineProperty(t,"varKinds",{enumerable:true,get:function(){return o.varKinds}});t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super();this.varKind=e;this.name=t;this.rhs=r}render({es5:e,_n:t}){const r=e?a.varKinds.var:this.varKind;const s=this.rhs===undefined?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super();this.lhs=e;this.rhs=t;this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof s.Name&&!e[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){const e=this.lhs instanceof s.Name?{}:{...this.lhs.names};return addExprNames(e,this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,s){super(e,r,s);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){const t=this.label?` ${this.label}`:"";return`break${t};`+e}}class Throw extends Node{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(e,t){this.code=optimizeExpr(this.code,e,t);return this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;while(t--){const r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:undefined}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;while(s--){const a=r[s];if(a.optimizeNames(e,t))continue;subtractNames(e,a.names);r.splice(s,1)}return r.length>0?this:undefined}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(e===true)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}if(t){if(e===false)return t instanceof If?t:t.nodes;if(this.nodes.length)return this;return new If(not(e),t instanceof If?[t]:t.nodes)}if(e===false||!this.nodes.length)return undefined;return this}optimizeNames(e,t){var r;this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t);if(!(super.optimizeNames(e,t)||this.else))return;this.condition=optimizeExpr(this.condition,e,t);return this}get names(){const e=super.names;addExprNames(e,this.condition);if(this.else)addNames(e,this.else.names);return e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iteration=optimizeExpr(this.iteration,e,t);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,s){super();this.varKind=e;this.name=t;this.from=r;this.to=s}render(e){const t=e.es5?a.varKinds.var:this.varKind;const{name:r,from:s,to:n}=this;return`for(${t} ${r}=${s}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,s){super();this.loop=e;this.varKind=t;this.name=r;this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iterable=optimizeExpr(this.iterable,e,t);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super();this.name=e;this.args=t;this.async=r}render(e){const t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;super.optimizeNodes();(e=this.catch)===null||e===void 0?void 0:e.optimizeNodes();(t=this.finally)===null||t===void 0?void 0:t.optimizeNodes();return this}optimizeNames(e,t){var r,s;super.optimizeNames(e,t);(r=this.catch)===null||r===void 0?void 0:r.optimizeNames(e,t);(s=this.finally)===null||s===void 0?void 0:s.optimizeNames(e,t);return this}get names(){const e=super.names;if(this.catch)addNames(e,this.catch.names);if(this.finally)addNames(e,this.finally.names);return e}}class Catch extends BlockNode{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";class CodeGen{constructor(e,t={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...t,_n:t.lines?"\n":""};this._extScope=e;this._scope=new a.Scope({parent:e});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);const s=this._values[r.prefix]||(this._values[r.prefix]=new Set);s.add(r);return r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const a=this._scope.toName(t);if(r!==undefined&&s)this._constants[a.str]=r;this._leafNode(new Def(e,a,r));return a}const(e,t,r){return this._def(a.varKinds.const,e,t,r)}let(e,t,r){return this._def(a.varKinds.let,e,t,r)}var(e,t,r){return this._def(a.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){if(typeof e=="function")e();else if(e!==s.nil)this._leafNode(new AnyCode(e));return this}object(...e){const t=["{"];for(const[r,a]of e){if(t.length>1)t.push(",");t.push(r);if(r!==a||this.opts.es5){t.push(":");(0,s.addCodeArg)(t,a)}}t.push("}");return new s._Code(t)}if(e,t,r){this._blockNode(new If(e));if(t&&r){this.code(t).else().code(r).endIf()}else if(t){this.code(t).endIf()}else if(r){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){this._blockNode(e);if(t)this.code(t).endFor();return this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,s,n=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(n,o,t,r),(()=>s(o)))}forOf(e,t,r,n=a.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,s._)`${e}.length`,(t=>{this.var(o,(0,s._)`${e}[${t}]`);r(o)}))}return this._for(new ForIter("of",n,o,t),(()=>r(o)))}forIn(e,t,r,n=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties){return this.forOf(e,(0,s._)`Object.keys(${t})`,r)}const o=this._scope.toName(e);return this._for(new ForIter("in",n,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;this._blockNode(t);this.code(e);if(t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new Try;this._blockNode(s);this.code(e);if(t){const e=this.name("e");this._currNode=s.catch=new Catch(e);t(e)}if(r){this._currNode=s.finally=new Finally;this.code(r)}return this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){this._blockStarts.push(this._nodes.length);if(e)this.code(e).endBlock(t);return this}endBlock(e){const t=this._blockStarts.pop();if(t===undefined)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||e!==undefined&&r!==e){throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`)}this._nodes.length=t;return this}func(e,t=s.nil,r,a){this._blockNode(new Func(e,t,r));if(a)this.code(a).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){while(e-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(e){this._currNode.nodes.push(e);return this}_blockNode(e){this._currNode.nodes.push(e);this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=t.else=e;return this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}}t.CodeGen=CodeGen;function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof s._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){if(e instanceof s.Name)return replaceName(e);if(!canOptimize(e))return e;return new s._Code(e._items.reduce(((e,t)=>{if(t instanceof s.Name)t=replaceName(t);if(t instanceof s._Code)e.push(...t._items);else e.push(t);return e}),[]));function replaceName(e){const s=r[e.str];if(s===undefined||t[e.str]!==1)return e;delete t[e.str];return s}function canOptimize(e){return e instanceof s._Code&&e._items.some((e=>e instanceof s.Name&&t[e.str]===1&&r[e.str]!==undefined))}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,s._)`!${par(e)}`}t.not=not;const i=mappend(t.operators.AND);function and(...e){return e.reduce(i)}t.and=and;const c=mappend(t.operators.OR);function or(...e){return e.reduce(c)}t.or=or;function mappend(e){return(t,r)=>t===s.nil?r:r===s.nil?t:(0,s._)`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof s.Name?e:(0,s._)`(${e})`}},3078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=r(3456);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var a;(function(e){e[e["Started"]=0]="Started";e[e["Completed"]=1]="Completed"})(a=t.UsedValueState||(t.UsedValueState={}));t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={};this._prefixes=e;this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){const t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e)){throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`)}return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends s.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e;this.scopePath=(0,s._)`.${new s.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const n=(0,s._)`\n`;class ValueScope extends Scope{constructor(e){super(e);this._values={};this._scope=e.scope;this.opts={...e,_n:e.lines?n:s.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(t.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e);const{prefix:a}=s;const n=(r=t.key)!==null&&r!==void 0?r:t.ref;let o=this._values[a];if(o){const e=o.get(n);if(e)return e}else{o=this._values[a]=new Map}o.set(n,s);const i=this._scope[a]||(this._scope[a]=[]);const c=i.length;i[c]=t.ref;s.setValue(t,{property:a,itemIndex:c});return s}getValue(e,t){const r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(t.scopePath===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return(0,s._)`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(e.value===undefined)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,n={},o){let i=s.nil;for(const c in e){const u=e[c];if(!u)continue;const d=n[c]=n[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,a.Started);let n=r(e);if(n){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;i=(0,s._)`${i}${r} ${e} = ${n};${this.opts._n}`}else if(n=o===null||o===void 0?void 0:o(e)){i=(0,s._)`${i}${n}${this.opts._n}`}else{throw new ValueError(e)}d.set(e,a.Completed)}))}return i}}t.ValueScope=ValueScope},1069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=r(4109);const a=r(7545);const n=r(4492);t.keywordError={message:({keyword:e})=>(0,s.str)`must pass "${e}" keyword validation`};t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,s.str)`"${e}" keyword must be ${t} ($data)`:(0,s.str)`"${e}" keyword is invalid ($data)`};function reportError(e,r=t.keywordError,a,n){const{it:o}=e;const{gen:i,compositeRule:c,allErrors:u}=o;const d=errorObjectCode(e,r,a);if(n!==null&&n!==void 0?n:c||u){addError(i,d)}else{returnErrors(o,(0,s._)`[${d}]`)}}t.reportError=reportError;function reportExtraError(e,r=t.keywordError,s){const{it:a}=e;const{gen:o,compositeRule:i,allErrors:c}=a;const u=errorObjectCode(e,r,s);addError(o,u);if(!(i||c)){returnErrors(a,n.default.vErrors)}}t.reportExtraError=reportExtraError;function resetErrorsCount(e,t){e.assign(n.default.errors,t);e.if((0,s._)`${n.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign((0,s._)`${n.default.vErrors}.length`,t)),(()=>e.assign(n.default.vErrors,null)))))}t.resetErrorsCount=resetErrorsCount;function extendErrors({gen:e,keyword:t,schemaValue:r,data:a,errsCount:o,it:i}){if(o===undefined)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,n.default.errors,(o=>{e.const(c,(0,s._)`${n.default.vErrors}[${o}]`);e.if((0,s._)`${c}.instancePath === undefined`,(()=>e.assign((0,s._)`${c}.instancePath`,(0,s.strConcat)(n.default.instancePath,i.errorPath))));e.assign((0,s._)`${c}.schemaPath`,(0,s.str)`${i.errSchemaPath}/${t}`);if(i.opts.verbose){e.assign((0,s._)`${c}.schema`,r);e.assign((0,s._)`${c}.data`,a)}}))}t.extendErrors=extendErrors;function addError(e,t){const r=e.const("err",t);e.if((0,s._)`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,(0,s._)`[${r}]`)),(0,s._)`${n.default.vErrors}.push(${r})`);e.code((0,s._)`${n.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:a,schemaEnv:n}=e;if(n.$async){r.throw((0,s._)`new ${e.ValidationError}(${t})`)}else{r.assign((0,s._)`${a}.errors`,t);r.return(false)}}const o={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:a}=e.it;if(a===false)return(0,s._)`{}`;return errorObject(e,t,r)}function errorObject(e,t,r={}){const{gen:s,it:a}=e;const n=[errorInstancePath(a,r),errorSchemaPath(e,r)];extraErrorProps(e,t,n);return s.object(...n)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?(0,s.str)`${e}${(0,a.getErrorPath)(t,a.Type.Str)}`:e;return[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,s.str)`${t}/${e}`;if(r){i=(0,s.str)`${i}${(0,a.getErrorPath)(r,a.Type.Str)}`}return[o.schemaPath,i]}function extraErrorProps(e,{params:t,message:r},a){const{keyword:i,data:c,schemaValue:u,it:d}=e;const{opts:l,propertyName:f,topSchemaRef:p,schemaPath:h}=d;a.push([o.keyword,i],[o.params,typeof t=="function"?t(e):t||(0,s._)`{}`]);if(l.messages){a.push([o.message,typeof r=="function"?r(e):r])}if(l.verbose){a.push([o.schema,u],[o.parentSchema,(0,s._)`${p}${h}`],[n.default.data,c])}if(f)a.push([o.propertyName,f])}},960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=r(4109);const a=r(5919);const n=r(4492);const o=r(3877);const i=r(7545);const c=r(7357);class SchemaEnv{constructor(e){var t;this.refs={};this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema;this.schemaId=e.schemaId;this.root=e.root||this;this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,o.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]);this.schemaPath=e.schemaPath;this.localRefs=e.localRefs;this.meta=e.meta;this.$async=r===null||r===void 0?void 0:r.$async;this.refs={}}}t.SchemaEnv=SchemaEnv;function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId);const{es5:i,lines:u}=this.opts.code;const{ownProperties:d}=this.opts;const l=new s.CodeGen(this.scope,{es5:i,lines:u,ownProperties:d});let f;if(e.$async){f=l.scopeValue("Error",{ref:a.default,code:(0,s._)`require("ajv/dist/runtime/validation_error").default`})}const p=l.scopeName("validate");e.validateName=p;const h={gen:l,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===true?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,s._)`""`,opts:this.opts,self:this};let m;try{this._compilations.add(e);(0,c.validateFunctionCode)(h);l.optimize(this.opts.code.optimize);const t=l.toString();m=`${l.scopeRefs(n.default.scope)}return ${t}`;if(this.opts.code.process)m=this.opts.code.process(m,e);const r=new Function(`${n.default.self}`,`${n.default.scope}`,m);const a=r(this,this.scope.get());this.scope.value(p,{ref:a});a.errors=null;a.schema=e.schema;a.schemaEnv=e;if(e.$async)a.$async=true;if(this.opts.code.source===true){a.source={validateName:p,validateCode:t,scopeValues:l._values}}if(this.opts.unevaluated){const{props:e,items:t}=h;a.evaluated={props:e instanceof s.Name?undefined:e,items:t instanceof s.Name?undefined:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name};if(a.source)a.source.evaluated=(0,s.stringify)(a.evaluated)}e.validate=a;return e}catch(t){delete e.validate;delete e.validateName;if(m)this.logger.error("Error compiling schema, function code:",m);throw t}finally{this._compilations.delete(e)}}t.compileSchema=compileSchema;function resolveRef(e,t,r){var s;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let n=resolve.call(this,e,r);if(n===undefined){const a=(s=e.localRefs)===null||s===void 0?void 0:s[r];const{schemaId:o}=this.opts;if(a)n=new SchemaEnv({schema:a,schemaId:o,root:e,baseId:t})}if(n===undefined)return;return e.refs[r]=inlineOrCompile.call(this,n)}t.resolveRef=resolveRef;function inlineOrCompile(e){if((0,o.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const t of this._compilations){if(sameSchemaEnv(t,e))return t}}t.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function resolve(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t);const s=(0,o._getFullPath)(this.opts.uriResolver,r);let a=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,undefined);if(Object.keys(e.schema).length>0&&s===a){return getJsonPointer.call(this,r,e)}const n=(0,o.normalizeId)(s);const i=this.refs[n]||this.schemas[n];if(typeof i=="string"){const t=resolveSchema.call(this,e,i);if(typeof(t===null||t===void 0?void 0:t.schema)!=="object")return;return getJsonPointer.call(this,r,t)}if(typeof(i===null||i===void 0?void 0:i.schema)!=="object")return;if(!i.validate)compileSchema.call(this,i);if(n===(0,o.normalizeId)(t)){const{schema:t}=i;const{schemaId:r}=this.opts;const s=t[r];if(s)a=(0,o.resolveUrl)(this.opts.uriResolver,a,s);return new SchemaEnv({schema:t,schemaId:r,root:e,baseId:a})}return getJsonPointer.call(this,r,i)}t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:s}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;const e=r[(0,i.unescapeFragment)(s)];if(e===undefined)return;r=e;const a=typeof r==="object"&&r[this.opts.schemaId];if(!u.has(s)&&a){t=(0,o.resolveUrl)(this.opts.uriResolver,t,a)}}let n;if(typeof r!="boolean"&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);n=resolveSchema.call(this,s,e)}const{schemaId:c}=this.opts;n=n||new SchemaEnv({schema:r,schemaId:c,root:s,baseId:t});if(n.schema!==n.root.schema)return n;return undefined}},4492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t["default"]=a},9984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3877);class MissingRefError extends Error{constructor(e,t,r,a){super(a||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,s.resolveUrl)(e,t,r);this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t["default"]=MissingRefError},3877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=r(7545);const a=r(7447);const n=r(7243);const o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(e,t=true){if(typeof e=="boolean")return true;if(t===true)return!hasRef(e);if(!t)return false;return countKeys(e)<=t}t.inlineRef=inlineRef;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(i.has(t))return true;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return true;if(typeof r=="object"&&hasRef(r))return true}return false}function countKeys(e){let t=0;for(const r in e){if(r==="$ref")return Infinity;t++;if(o.has(r))continue;if(typeof e[r]=="object"){(0,s.eachItem)(e[r],(e=>t+=countKeys(e)))}if(t===Infinity)return Infinity}return t}function getFullPath(e,t="",r){if(r!==false)t=normalizeId(t);const s=e.parse(t);return _getFullPath(e,s)}t.getFullPath=getFullPath;function _getFullPath(e,t){const r=e.serialize(t);return r.split("#")[0]+"#"}t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId;function resolveUrl(e,t,r){r=normalizeId(r);return e.resolve(t,r)}t.resolveUrl=resolveUrl;const u=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts;const o=normalizeId(e[r]||t);const i={"":o};const c=getFullPath(s,o,false);const d={};const l=new Set;n(e,{allKeys:true},((e,t,s,a)=>{if(a===undefined)return;const n=c+t;let o=i[a];if(typeof e[r]=="string")o=addRef.call(this,e[r]);addAnchor.call(this,e.$anchor);addAnchor.call(this,e.$dynamicAnchor);i[t]=o;function addRef(t){const r=this.opts.uriResolver.resolve;t=normalizeId(o?r(o,t):t);if(l.has(t))throw ambiguos(t);l.add(t);let s=this.refs[t];if(typeof s=="string")s=this.refs[s];if(typeof s=="object"){checkAmbiguosRef(e,s.schema,t)}else if(t!==normalizeId(n)){if(t[0]==="#"){checkAmbiguosRef(e,d[t],t);d[t]=e}else{this.refs[t]=n}}return t}function addAnchor(e){if(typeof e=="string"){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}}));return d;function checkAmbiguosRef(e,t,r){if(t!==undefined&&!a(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}t.getSchemaRefs=getSchemaRefs},521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getRules=t.isJSONType=void 0;const r=["string","number","integer","boolean","null","object","array"];const s=new Set(r);function isJSONType(e){return typeof e=="string"&&s.has(e)}t.isJSONType=isJSONType;function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:true,boolean:true,null:true},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=getRules},7545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=r(4109);const a=r(3456);function toHash(e){const t={};for(const r of e)t[r]=true;return t}t.toHash=toHash;function alwaysValidSchema(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return true;checkUnknownRules(e,t);return!schemaHasRules(t,e.self.RULES.all)}t.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;const a=s.RULES.keywords;for(const r in t){if(!a[r])checkStrictMode(e,`unknown keyword: "${r}"`)}}t.checkUnknownRules=checkUnknownRules;function schemaHasRules(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return true;return false}t.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return true;return false}t.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,a,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,s._)`${r}`}return(0,s._)`${e}${t}${(0,s.getProperty)(a)}`}t.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))}t.unescapeFragment=unescapeFragment;function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))}t.escapeFragment=escapeFragment;function escapeJsonPointer(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=unescapeJsonPointer;function eachItem(e,t){if(Array.isArray(e)){for(const r of e)t(r)}else{t(e)}}t.eachItem=eachItem;function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:a}){return(n,o,i,c)=>{const u=i===undefined?o:i instanceof s.Name?(o instanceof s.Name?e(n,o,i):t(n,o,i),i):o instanceof s.Name?(t(n,i,o),o):r(o,i);return c===s.Name&&!(u instanceof s.Name)?a(n,u):u}}t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,s._)`${r} !== true && ${t} !== undefined`,(()=>{e.if((0,s._)`${t} === true`,(()=>e.assign(r,true)),(()=>e.assign(r,(0,s._)`${r} || {}`).code((0,s._)`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if((0,s._)`${r} !== true`,(()=>{if(t===true){e.assign(r,true)}else{e.assign(r,(0,s._)`${r} || {}`);setEvaluated(e,r,t)}})),mergeValues:(e,t)=>e===true?true:{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,s._)`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,(0,s._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if((0,s._)`${r} !== true`,(()=>e.assign(r,t===true?true:(0,s._)`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>e===true?true:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function evaluatedPropsToName(e,t){if(t===true)return e.var("props",true);const r=e.var("props",(0,s._)`{}`);if(t!==undefined)setEvaluated(e,r,t);return r}t.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign((0,s._)`${t}${(0,s.getProperty)(r)}`,true)))}t.setEvaluated=setEvaluated;const n={};function useFunc(e,t){return e.scopeValue("func",{ref:t,code:n[t.code]||(n[t.code]=new a._Code(t.code))})}t.useFunc=useFunc;var o;(function(e){e[e["Num"]=0]="Num";e[e["Str"]=1]="Str"})(o=t.Type||(t.Type={}));function getErrorPath(e,t,r){if(e instanceof s.Name){const a=t===o.Num;return r?a?(0,s._)`"[" + ${e} + "]"`:(0,s._)`"['" + ${e} + "']"`:a?(0,s._)`"/" + ${e}`:(0,s._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,s.getProperty)(e).toString():"/"+escapeJsonPointer(e)}t.getErrorPath=getErrorPath;function checkStrictMode(e,t,r=e.opts.strictSchema){if(!r)return;t=`strict mode: ${t}`;if(r===true)throw new Error(t);e.self.logger.warn(t)}t.checkStrictMode=checkStrictMode},2175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:e,self:t},r){const s=t.RULES.types[r];return s&&s!==true&&shouldUseGroup(e,s)}t.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}t.shouldUseGroup=shouldUseGroup;function shouldUseRule(e,t){var r;return e[t.keyword]!==undefined||((r=t.definition.implements)===null||r===void 0?void 0:r.some((t=>e[t]!==undefined)))}t.shouldUseRule=shouldUseRule},4152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=r(1069);const a=r(4109);const n=r(4492);const o={message:"boolean schema is false"};function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:s}=e;if(r===false){falseSchemaError(e,false)}else if(typeof r=="object"&&r.$async===true){t.return(n.default.data)}else{t.assign((0,a._)`${s}.errors`,null);t.return(true)}}t.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(e,t){const{gen:r,schema:s}=e;if(s===false){r.var(t,false);falseSchemaError(e)}else{r.var(t,true)}}t.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(e,t){const{gen:r,data:a}=e;const n={gen:r,keyword:"false schema",data:a,schema:false,schemaCode:false,schemaValue:false,params:{},it:e};(0,s.reportError)(n,o,undefined,t)}},3967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=r(521);const a=r(2175);const n=r(1069);const o=r(4109);const i=r(7545);var c;(function(e){e[e["Correct"]=0]="Correct";e[e["Wrong"]=1]="Wrong"})(c=t.DataType||(t.DataType={}));function getSchemaTypes(e){const t=getJSONTypes(e.type);const r=t.includes("null");if(r){if(e.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(e.nullable===true)t.push("null")}return t}t.getSchemaTypes=getSchemaTypes;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}t.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(e,t){const{gen:r,data:s,opts:n}=e;const o=coerceToTypes(t,n.coerceTypes);const i=t.length>0&&!(o.length===0&&t.length===1&&(0,a.schemaHasRulesForType)(e,t[0]));if(i){const a=checkDataTypes(t,s,n.strictNumbers,c.Wrong);r.if(a,(()=>{if(o.length)coerceData(e,t,o);else reportTypeError(e)}))}return i}t.coerceAndCheckDataType=coerceAndCheckDataType;const u=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||t==="array"&&e==="array")):[]}function coerceData(e,t,r){const{gen:s,data:a,opts:n}=e;const i=s.let("dataType",(0,o._)`typeof ${a}`);const c=s.let("coerced",(0,o._)`undefined`);if(n.coerceTypes==="array"){s.if((0,o._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>s.assign(a,(0,o._)`${a}[0]`).assign(i,(0,o._)`typeof ${a}`).if(checkDataTypes(t,a,n.strictNumbers),(()=>s.assign(c,a)))))}s.if((0,o._)`${c} !== undefined`);for(const e of r){if(u.has(e)||e==="array"&&n.coerceTypes==="array"){coerceSpecificType(e)}}s.else();reportTypeError(e);s.endIf();s.if((0,o._)`${c} !== undefined`,(()=>{s.assign(a,c);assignParentData(e,c)}));function coerceSpecificType(e){switch(e){case"string":s.elseIf((0,o._)`${i} == "number" || ${i} == "boolean"`).assign(c,(0,o._)`"" + ${a}`).elseIf((0,o._)`${a} === null`).assign(c,(0,o._)`""`);return;case"number":s.elseIf((0,o._)`${i} == "boolean" || ${a} === null
|
2
|
+
|| (${i} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,o._)`+${a}`);return;case"integer":s.elseIf((0,o._)`${i} === "boolean" || ${a} === null
|
3
|
+
|| (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,o._)`+${a}`);return;case"boolean":s.elseIf((0,o._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,false).elseIf((0,o._)`${a} === "true" || ${a} === 1`).assign(c,true);return;case"null":s.elseIf((0,o._)`${a} === "" || ${a} === 0 || ${a} === false`);s.assign(c,null);return;case"array":s.elseIf((0,o._)`${i} === "string" || ${i} === "number"
|
4
|
+
|| ${i} === "boolean" || ${a} === null`).assign(c,(0,o._)`[${a}]`)}}}function assignParentData({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,o._)`${t} !== undefined`,(()=>e.assign((0,o._)`${t}[${r}]`,s)))}function checkDataType(e,t,r,s=c.Correct){const a=s===c.Correct?o.operators.EQ:o.operators.NEQ;let n;switch(e){case"null":return(0,o._)`${t} ${a} null`;case"array":n=(0,o._)`Array.isArray(${t})`;break;case"object":n=(0,o._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":n=numCond((0,o._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":n=numCond();break;default:return(0,o._)`typeof ${t} ${a} ${e}`}return s===c.Correct?n:(0,o.not)(n);function numCond(e=o.nil){return(0,o.and)((0,o._)`typeof ${t} == "number"`,e,r?(0,o._)`isFinite(${t})`:o.nil)}}t.checkDataType=checkDataType;function checkDataTypes(e,t,r,s){if(e.length===1){return checkDataType(e[0],t,r,s)}let a;const n=(0,i.toHash)(e);if(n.array&&n.object){const e=(0,o._)`typeof ${t} != "object"`;a=n.null?e:(0,o._)`!${t} || ${e}`;delete n.null;delete n.array;delete n.object}else{a=o.nil}if(n.number)delete n.integer;for(const e in n)a=(0,o.and)(a,checkDataType(e,t,r,s));return a}t.checkDataTypes=checkDataTypes;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,o._)`{type: ${e}}`:(0,o._)`{type: ${t}}`};function reportTypeError(e){const t=getTypeErrorContext(e);(0,n.reportError)(t,d)}t.reportTypeError=reportTypeError;function getTypeErrorContext(e){const{gen:t,data:r,schema:s}=e;const a=(0,i.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:a,schemaValue:a,parentSchema:s,params:{},it:e}}},4017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assignDefaults=void 0;const s=r(4109);const a=r(7545);function assignDefaults(e,t){const{properties:r,items:s}=e.schema;if(t==="object"&&r){for(const t in r){assignDefault(e,t,r[t].default)}}else if(t==="array"&&Array.isArray(s)){s.forEach(((t,r)=>assignDefault(e,r,t.default)))}}t.assignDefaults=assignDefaults;function assignDefault(e,t,r){const{gen:n,compositeRule:o,data:i,opts:c}=e;if(r===undefined)return;const u=(0,s._)`${i}${(0,s.getProperty)(t)}`;if(o){(0,a.checkStrictMode)(e,`default is ignored for: ${u}`);return}let d=(0,s._)`${u} === undefined`;if(c.useDefaults==="empty"){d=(0,s._)`${d} || ${u} === null || ${u} === ""`}n.if(d,(0,s._)`${u} = ${(0,s.stringify)(r)}`)}},7357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const s=r(4152);const a=r(3967);const n=r(2175);const o=r(3967);const i=r(4017);const c=r(272);const u=r(7390);const d=r(4109);const l=r(4492);const f=r(3877);const p=r(7545);const h=r(1069);function validateFunctionCode(e){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){topSchemaObjCode(e);return}}validateFunction(e,(()=>(0,s.topBoolOrEmptySchema)(e)))}t.validateFunctionCode=validateFunctionCode;function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:s,opts:a},n){if(a.code.es5){e.func(t,(0,d._)`${l.default.data}, ${l.default.valCxt}`,s.$async,(()=>{e.code((0,d._)`"use strict"; ${funcSourceUrl(r,a)}`);destructureValCxtES5(e,a);e.code(n)}))}else{e.func(t,(0,d._)`${l.default.data}, ${destructureValCxt(a)}`,s.$async,(()=>e.code(funcSourceUrl(r,a)).code(n)))}}function destructureValCxt(e){return(0,d._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,d._)`, ${l.default.dynamicAnchors}={}`:d.nil}}={}`}function destructureValCxtES5(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,(0,d._)`${l.default.valCxt}.${l.default.instancePath}`);e.var(l.default.parentData,(0,d._)`${l.default.valCxt}.${l.default.parentData}`);e.var(l.default.parentDataProperty,(0,d._)`${l.default.valCxt}.${l.default.parentDataProperty}`);e.var(l.default.rootData,(0,d._)`${l.default.valCxt}.${l.default.rootData}`);if(t.dynamicRef)e.var(l.default.dynamicAnchors,(0,d._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,(0,d._)`""`);e.var(l.default.parentData,(0,d._)`undefined`);e.var(l.default.parentDataProperty,(0,d._)`undefined`);e.var(l.default.rootData,l.default.data);if(t.dynamicRef)e.var(l.default.dynamicAnchors,(0,d._)`{}`)}))}function topSchemaObjCode(e){const{schema:t,opts:r,gen:s}=e;validateFunction(e,(()=>{if(r.$comment&&t.$comment)commentKeyword(e);checkNoDefault(e);s.let(l.default.vErrors,null);s.let(l.default.errors,0);if(r.unevaluated)resetEvaluated(e);typeAndKeywords(e);returnResults(e)}));return}function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`);t.if((0,d._)`${e.evaluated}.dynamicProps`,(()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)));t.if((0,d._)`${e.evaluated}.dynamicItems`,(()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`)))}function funcSourceUrl(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function subschemaCode(e,t){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){subSchemaObjCode(e,t);return}}(0,s.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return true;return false}function isSchemaObj(e){return typeof e.schema!="boolean"}function subSchemaObjCode(e,t){const{schema:r,gen:s,opts:a}=e;if(a.$comment&&r.$comment)commentKeyword(e);updateContext(e);checkAsyncSchema(e);const n=s.const("_errs",l.default.errors);typeAndKeywords(e,n);s.var(t,(0,d._)`${n} === ${l.default.errors}`)}function checkKeywords(e){(0,p.checkUnknownRules)(e);checkRefsAndKeywords(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],false,t);const r=(0,a.getSchemaTypes)(e.schema);const s=(0,a.coerceAndCheckDataType)(e,r);schemaKeywords(e,r,!s,t)}function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:s,self:a}=e;if(t.$ref&&s.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,a.RULES)){a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}}function checkNoDefault(e){const{schema:t,opts:r}=e;if(t.default!==undefined&&r.useDefaults&&r.strictSchema){(0,p.checkStrictMode)(e,"default is ignored in the schema root")}}function updateContext(e){const t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:a}){const n=r.$comment;if(a.$comment===true){e.code((0,d._)`${l.default.self}.logger.log(${n})`)}else if(typeof a.$comment=="function"){const r=(0,d.str)`${s}/$comment`;const a=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${l.default.self}.opts.$comment(${n}, ${r}, ${a}.schema)`)}}function returnResults(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:a,opts:n}=e;if(r.$async){t.if((0,d._)`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw((0,d._)`new ${a}(${l.default.vErrors})`)))}else{t.assign((0,d._)`${s}.errors`,l.default.vErrors);if(n.unevaluated)assignEvaluated(e);t.return((0,d._)`${l.default.errors} === 0`)}}function assignEvaluated({gen:e,evaluated:t,props:r,items:s}){if(r instanceof d.Name)e.assign((0,d._)`${t}.props`,r);if(s instanceof d.Name)e.assign((0,d._)`${t}.items`,s)}function schemaKeywords(e,t,r,s){const{gen:a,schema:i,data:c,allErrors:u,opts:f,self:h}=e;const{RULES:m}=h;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(i,m))){a.block((()=>keywordCode(e,"$ref",m.all.$ref.definition)));return}if(!f.jtd)checkStrictTypes(e,t);a.block((()=>{for(const e of m.rules)groupKeywords(e);groupKeywords(m.post)}));function groupKeywords(p){if(!(0,n.shouldUseGroup)(i,p))return;if(p.type){a.if((0,o.checkDataType)(p.type,c,f.strictNumbers));iterateKeywords(e,p);if(t.length===1&&t[0]===p.type&&r){a.else();(0,o.reportTypeError)(e)}a.endIf()}else{iterateKeywords(e,p)}if(!u)a.if((0,d._)`${l.default.errors} === ${s||0}`)}}function iterateKeywords(e,t){const{gen:r,schema:s,opts:{useDefaults:a}}=e;if(a)(0,i.assignDefaults)(e,t.type);r.block((()=>{for(const r of t.rules){if((0,n.shouldUseRule)(s,r)){keywordCode(e,r.keyword,r.definition,t.type)}}}))}function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;checkContextTypes(e,t);if(!e.opts.allowUnionTypes)checkMultipleTypes(e,t);checkKeywordTypes(e,e.dataTypes)}function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((t=>{if(!includesType(e.dataTypes,t)){strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}}));e.dataTypes=e.dataTypes.filter((e=>includesType(t,e)))}function checkMultipleTypes(e,t){if(t.length>1&&!(t.length===2&&t.includes("null"))){strictTypesError(e,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const s in r){const a=r[s];if(typeof a=="object"&&(0,n.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;if(r.length&&!r.some((e=>hasApplicableType(t,e)))){strictTypesError(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}}function hasApplicableType(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function includesType(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function strictTypesError(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`;(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}class KeywordCxt{constructor(e,t,r){(0,c.validateKeywordUsage)(e,t,r);this.gen=e.gen;this.allErrors=e.allErrors;this.keyword=r;this.data=e.data;this.schema=e.schema[r];this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data);this.schemaType=t.schemaType;this.parentSchema=e.schema;this.params={};this.it=e;this.def=t;if(this.$data){this.schemaCode=e.gen.const("vSchema",getData(this.$data,e))}else{this.schemaCode=this.schemaValue;if(!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined)){throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`)}}if("code"in t?t.trackErrors:t.errors!==false){this.errsCount=e.gen.const("_errs",l.default.errors)}}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e);if(r)r();else this.error();if(t){this.gen.else();t();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(e,t){this.failResult((0,d.not)(e),undefined,t)}fail(e){if(e===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(e);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t);this._error(e,r);this.setParams({});return}this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=d.nil){this.gen.block((()=>{this.check$data(e,r);t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:a,def:n}=this;r.if((0,d.or)((0,d._)`${s} === undefined`,t));if(e!==d.nil)r.assign(e,true);if(a.length||n.validateSchema){r.elseIf(this.invalid$data());this.$dataError();if(e!==d.nil)r.assign(e,false)}r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:s,it:a}=this;return(0,d.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,a.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}function invalid$DataSchema(){if(s.validateSchema){const r=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e);(0,u.extendSubschemaMode)(r,e);const s={...this.it,...r,items:undefined,props:undefined};subschemaCode(s,t);return s}mergeEvaluated(e,t){const{it:r,gen:s}=this;if(!r.opts.unevaluated)return;if(r.props!==true&&e.props!==undefined){r.props=p.mergeEvaluated.props(s,e.props,r.props,t)}if(r.items!==true&&e.items!==undefined){r.items=p.mergeEvaluated.items(s,e.items,r.items,t)}}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(r.props!==true||r.items!==true)){s.if(t,(()=>this.mergeEvaluated(e,d.Name)));return true}}}t.KeywordCxt=KeywordCxt;function keywordCode(e,t,r,s){const a=new KeywordCxt(e,r,t);if("code"in r){r.code(a,s)}else if(a.$data&&r.validate){(0,c.funcKeywordCode)(a,r)}else if("macro"in r){(0,c.macroKeywordCode)(a,r)}else if(r.compile||r.validate){(0,c.funcKeywordCode)(a,r)}}const m=/^\/(?:[^~]|~0|~1)*$/;const y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let a;let n;if(e==="")return l.default.rootData;if(e[0]==="/"){if(!m.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e;n=l.default.rootData}else{const o=y.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+o[1];a=o[2];if(a==="#"){if(i>=t)throw new Error(errorMsg("property/index",i));return s[t-i]}if(i>t)throw new Error(errorMsg("data",i));n=r[t-i];if(!a)return n}let o=n;const i=a.split("/");for(const e of i){if(e){n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`;o=(0,d._)`${o} && ${n}`}}return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const s=r(4109);const a=r(4492);const n=r(6086);const o=r(1069);function macroKeywordCode(e,t){const{gen:r,keyword:a,schema:n,parentSchema:o,it:i}=e;const c=t.macro.call(i.self,n,o,i);const u=useKeyword(r,a,c);if(i.opts.validateSchema!==false)i.self.validateSchema(c,true);const d=r.name("valid");e.subschema({schema:c,schemaPath:s.nil,errSchemaPath:`${i.errSchemaPath}/${a}`,topSchemaRef:u,compositeRule:true},d);e.pass(d,(()=>e.error(true)))}t.macroKeywordCode=macroKeywordCode;function funcKeywordCode(e,t){var r;const{gen:o,keyword:i,schema:c,parentSchema:u,$data:d,it:l}=e;checkAsyncKeyword(l,t);const f=!d&&t.compile?t.compile.call(l.self,c,u,l):t.validate;const p=useKeyword(o,i,f);const h=o.let("valid");e.block$data(h,validateKeyword);e.ok((r=t.valid)!==null&&r!==void 0?r:h);function validateKeyword(){if(t.errors===false){assignValid();if(t.modifying)modifyData(e);reportErrs((()=>e.error()))}else{const r=t.async?validateAsync():validateSync();if(t.modifying)modifyData(e);reportErrs((()=>addErrs(e,r)))}}function validateAsync(){const e=o.let("ruleErrs",null);o.try((()=>assignValid((0,s._)`await `)),(t=>o.assign(h,false).if((0,s._)`${t} instanceof ${l.ValidationError}`,(()=>o.assign(e,(0,s._)`${t}.errors`)),(()=>o.throw(t)))));return e}function validateSync(){const e=(0,s._)`${p}.errors`;o.assign(e,null);assignValid(s.nil);return e}function assignValid(r=(t.async?(0,s._)`await `:s.nil)){const i=l.opts.passContext?a.default.this:a.default.self;const c=!("compile"in t&&!d||t.schema===false);o.assign(h,(0,s._)`${r}${(0,n.callValidateCode)(e,p,i,c)}`,t.modifying)}function reportErrs(e){var r;o.if((0,s.not)((r=t.valid)!==null&&r!==void 0?r:h),e)}}t.funcKeywordCode=funcKeywordCode;function modifyData(e){const{gen:t,data:r,it:a}=e;t.if(a.parentData,(()=>t.assign(r,(0,s._)`${a.parentData}[${a.parentDataProperty}]`)))}function addErrs(e,t){const{gen:r}=e;r.if((0,s._)`Array.isArray(${t})`,(()=>{r.assign(a.default.vErrors,(0,s._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`).assign(a.default.errors,(0,s._)`${a.default.vErrors}.length`);(0,o.extendErrors)(e)}),(()=>e.error()))}function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function useKeyword(e,t,r){if(r===undefined)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}function validSchemaType(e,t,r=false){return!t.length||t.some((t=>t==="array"?Array.isArray(e):t==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==t||r&&typeof e=="undefined"))}t.validSchemaType=validSchemaType;function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:s},a,n){if(Array.isArray(a.keyword)?!a.keyword.includes(n):a.keyword!==n){throw new Error("ajv implementation error")}const o=a.dependencies;if(o===null||o===void 0?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t)))){throw new Error(`parent schema must have dependencies of ${n}: ${o.join(",")}`)}if(a.validateSchema){const o=a.validateSchema(e[n]);if(!o){const e=`keyword "${n}" value is invalid at path "${s}": `+r.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(e);else throw new Error(e)}}}t.validateKeywordUsage=validateKeywordUsage},7390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const s=r(4109);const a=r(7545);function getSubschema(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:c}){if(t!==undefined&&n!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(t!==undefined){const n=e.schema[t];return r===undefined?{schema:n,schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,a.escapeFragment)(r)}`}}if(n!==undefined){if(o===undefined||i===undefined||c===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:n,schemaPath:o,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=getSubschema;function extendSubschemaData(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:c}){if(o!==undefined&&r!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:u}=t;if(r!==undefined){const{errorPath:o,dataPathArr:i,opts:c}=t;const d=u.let("data",(0,s._)`${t.data}${(0,s.getProperty)(r)}`,true);dataContextProps(d);e.errorPath=(0,s.str)`${o}${(0,a.getErrorPath)(r,n,c.jsPropertySyntax)}`;e.parentDataProperty=(0,s._)`${r}`;e.dataPathArr=[...i,e.parentDataProperty]}if(o!==undefined){const t=o instanceof s.Name?o:u.let("data",o,true);dataContextProps(t);if(c!==undefined)e.propertyName=c}if(i)e.dataTypes=i;function dataContextProps(r){e.data=r;e.dataLevel=t.dataLevel+1;e.dataTypes=[];t.definedProperties=new Set;e.parentData=t.data;e.dataNames=[...t.dataNames,r]}}t.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:a,allErrors:n}){if(s!==undefined)e.compositeRule=s;if(a!==undefined)e.createErrors=a;if(n!==undefined)e.allErrors=n;e.jtdDiscriminator=t;e.jtdMetadata=r}t.extendSubschemaMode=extendSubschemaMode},3834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(7357);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return s.KeywordCxt}});var a=r(4109);Object.defineProperty(t,"_",{enumerable:true,get:function(){return a._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return a.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return a.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return a.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return a.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return a.CodeGen}});const n=r(5919);const o=r(9984);const i=r(521);const c=r(960);const u=r(4109);const d=r(3877);const l=r(3967);const f=r(7545);const p=r(7918);const h=r(4095);const defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"];const y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const g={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."};const v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const $=200;function requiredOptions(e){var t,r,s,a,n,o,i,c,u,d,l,f,p,m,y,g,v,b,w,E,S,P,C,x,k;const N=e.strict;const O=(t=e.code)===null||t===void 0?void 0:t.optimize;const R=O===true||O===undefined?1:O||0;const T=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:defaultRegExp;const j=(a=e.uriResolver)!==null&&a!==void 0?a:h.default;return{strictSchema:(o=(n=e.strictSchema)!==null&&n!==void 0?n:N)!==null&&o!==void 0?o:true,strictNumbers:(c=(i=e.strictNumbers)!==null&&i!==void 0?i:N)!==null&&c!==void 0?c:true,strictTypes:(d=(u=e.strictTypes)!==null&&u!==void 0?u:N)!==null&&d!==void 0?d:"log",strictTuples:(f=(l=e.strictTuples)!==null&&l!==void 0?l:N)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=e.strictRequired)!==null&&p!==void 0?p:N)!==null&&m!==void 0?m:false,code:e.code?{...e.code,optimize:R,regExp:T}:{optimize:R,regExp:T},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:$,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:$,meta:(v=e.meta)!==null&&v!==void 0?v:true,messages:(b=e.messages)!==null&&b!==void 0?b:true,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:true,schemaId:(E=e.schemaId)!==null&&E!==void 0?E:"$id",addUsedSchema:(S=e.addUsedSchema)!==null&&S!==void 0?S:true,validateSchema:(P=e.validateSchema)!==null&&P!==void 0?P:true,validateFormats:(C=e.validateFormats)!==null&&C!==void 0?C:true,unicodeRegExp:(x=e.unicodeRegExp)!==null&&x!==void 0?x:true,int32range:(k=e.int32range)!==null&&k!==void 0?k:true,uriResolver:j}}class Ajv{constructor(e={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:y,es5:t,lines:r});this.logger=getLogger(e.logger);const s=e.validateFormats;e.validateFormats=false;this.RULES=(0,i.getRules)();checkOptions.call(this,g,e,"NOT SUPPORTED");checkOptions.call(this,v,e,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(e.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(e.keywords)addInitialKeywords.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);addInitialSchemas.call(this);e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=p;if(r==="id"){s={...p};s.id=s.$id;delete s.$id}if(t&&e)this.addMetaSchema(s,s[r],false)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:undefined}validate(e,t){let r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error(`no schema with key or ref "${e}"`)}else{r=this.compile(e)}const s=r(t);if(!("$async"in r))this.errors=r.errors;return s}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){if(e&&!this.getSchema(e)){await runCompileAsync.call(this,{$ref:e},true)}}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;checkLoaded.call(this,t);await loadMissingSchema.call(this,t.missingSchema);return _compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e]){throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);if(!this.refs[e])await loadMetaSchema.call(this,r.$schema);if(!this.refs[e])this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,undefined,r,s);return this}let a;if(typeof e==="object"){const{schemaId:t}=this.opts;a=e[t];if(a!==undefined&&typeof a!="string"){throw new Error(`schema ${t} must be string`)}}t=(0,d.normalizeId)(t||a);this._checkUnique(t);this.schemas[t]=this._addSchema(e,r,t,s,true);return this}addMetaSchema(e,t,r=this.opts.validateSchema){this.addSchema(e,t,true,r);return this}validateSchema(e,t){if(typeof e=="boolean")return true;let r;r=e.$schema;if(r!==undefined&&typeof r!="string"){throw new Error("$schema must be a string")}r=r||this.opts.defaultMeta||this.defaultMeta();if(!r){this.logger.warn("meta-schema not available");this.errors=null;return true}const s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(e);else throw new Error(e)}return s}getSchema(e){let t;while(typeof(t=getSchEnv.call(this,e))=="string")e=t;if(t===undefined){const{schemaId:r}=this.opts;const s=new c.SchemaEnv({schema:{},schemaId:r});t=c.resolveSchema.call(this,s,e);if(!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp){this._removeAllSchemas(this.schemas,e);this._removeAllSchemas(this.refs,e);return this}switch(typeof e){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const t=getSchEnv.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);delete this.schemas[e];delete this.refs[e];return this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r){r=(0,d.normalizeId)(r);delete this.schemas[r];delete this.refs[r]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){r=e;if(typeof t=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");t.keyword=r}}else if(typeof e=="object"&&t===undefined){t=e;r=t.keyword;if(Array.isArray(r)&&!r.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,r,t);if(!t){(0,f.eachItem)(r,(e=>addRule.call(this,e)));return this}keywordMetaschema.call(this,t);const s={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};(0,f.eachItem)(r,s.type.length===0?e=>addRule.call(this,e,s):e=>s.type.forEach((t=>addRule.call(this,e,s,t))));return this}getKeyword(e){const t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e];delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));if(t>=0)r.rules.splice(t,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);this.formats[e]=t;return this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r))}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in r){const t=r[e];if(typeof t!="object")continue;const{$data:s}=t.definition;const n=a[e];if(s&&n)a[e]=schemaOrData(n)}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];if(!t||t.test(r)){if(typeof s=="string"){delete e[r]}else if(s&&!s.meta){this._cache.delete(s.schema);delete e[r]}}}}_addSchema(e,t,r,s=this.opts.validateSchema,a=this.opts.addUsedSchema){let n;const{schemaId:o}=this.opts;if(typeof e=="object"){n=e[o]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(i!==undefined)return i;r=(0,d.normalizeId)(n||r);const u=d.getSchemaRefs.call(this,e,r);i=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u});this._cache.set(i.schema,i);if(a&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=i}if(s)this.validateSchema(e,true);return i}_checkUnique(e){if(this.schemas[e]||this.refs[e]){throw new Error(`schema with key or id "${e}" already exists`)}}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else c.compileSchema.call(this,e);if(!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}t["default"]=Ajv;Ajv.ValidationError=n.default;Ajv.MissingRefError=o.default;function checkOptions(e,t,r,s="error"){for(const a in e){const n=a;if(n in t)this.logger[s](`${r}: option ${a}. ${e[n]}`)}}function getSchEnv(e){e=(0,d.normalizeId)(e);return this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of m)delete e[t];return e}const b={log(){},warn(){},error(){}};function getLogger(e){if(e===false)return b;if(e===undefined)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}const w=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;(0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!w.test(e))throw new Error(`Keyword ${e} has invalid name`)}));if(!t)return;if(t.$data&&!("code"in t||"validate"in t)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(e,t,r){var s;const a=t===null||t===void 0?void 0:t.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:n}=this;let o=a?n.post:n.rules.find((({type:e})=>e===r));if(!o){o={type:r,rules:[]};n.rules.push(o)}n.keywords[e]=true;if(!t)return;const i={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};if(t.before)addBeforeRule.call(this,o,i,t.before);else o.rules.push(i);n.all[e]=i;(s=t.implements)===null||s===void 0?void 0:s.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const s=e.rules.findIndex((e=>e.keyword===r));if(s>=0){e.rules.splice(s,0,t)}else{e.rules.push(t);this.logger.warn(`rule ${r} is not defined`)}}function keywordMetaschema(e){let{metaSchema:t}=e;if(t===undefined)return;if(e.$data&&this.opts.$data)t=schemaOrData(t);e.validateSchema=this.compile(t,true)}const E={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,E]}}},9987:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7447);s.code='require("ajv/dist/runtime/equal").default';t["default"]=s},4624:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function ucs2length(e){const t=e.length;let r=0;let s=0;let a;while(s<t){r++;a=e.charCodeAt(s++);if(a>=55296&&a<=56319&&s<t){a=e.charCodeAt(s);if((a&64512)===56320)s++}}return r}t["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},4095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(199);s.code='require("ajv/dist/runtime/uri").default';t["default"]=s},5919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class ValidationError extends Error{constructor(e){super("validation failed");this.errors=e;this.ajv=this.validation=true}}t["default"]=ValidationError},8268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateAdditionalItems=void 0;const s=r(4109);const a=r(7545);const n={message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`};const o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(e){const{parentSchema:t,it:r}=e;const{items:s}=t;if(!Array.isArray(s)){(0,a.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(e,s)}};function validateAdditionalItems(e,t){const{gen:r,schema:n,data:o,keyword:i,it:c}=e;c.items=true;const u=r.const("len",(0,s._)`${o}.length`);if(n===false){e.setParams({len:t.length});e.pass((0,s._)`${u} <= ${t.length}`)}else if(typeof n=="object"&&!(0,a.alwaysValidSchema)(c,n)){const a=r.var("valid",(0,s._)`${u} <= ${t.length}`);r.if((0,s.not)(a),(()=>validateItems(a)));e.ok(a)}function validateItems(n){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:a.Type.Num},n);if(!c.allErrors)r.if((0,s.not)(n),(()=>r.break()))}))}}t.validateAdditionalItems=validateAdditionalItems;t["default"]=o},5506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6086);const a=r(4109);const n=r(4492);const o=r(7545);const i={message:"must NOT have additional properties",params:({params:e})=>(0,a._)`{additionalProperty: ${e.additionalProperty}}`};const c={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:i,code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:u,it:d}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:l,opts:f}=d;d.props=true;if(f.removeAdditional!=="all"&&(0,o.alwaysValidSchema)(d,r))return;const p=(0,s.allSchemaProperties)(i.properties);const h=(0,s.allSchemaProperties)(i.patternProperties);checkAdditionalProperties();e.ok((0,a._)`${u} === ${n.default.errors}`);function checkAdditionalProperties(){t.forIn("key",c,(e=>{if(!p.length&&!h.length)additionalPropertyCode(e);else t.if(isAdditional(e),(()=>additionalPropertyCode(e)))}))}function isAdditional(r){let n;if(p.length>8){const e=(0,o.schemaRefOrVal)(d,i.properties,"properties");n=(0,s.isOwnProperty)(t,e,r)}else if(p.length){n=(0,a.or)(...p.map((e=>(0,a._)`${r} === ${e}`)))}else{n=a.nil}if(h.length){n=(0,a.or)(n,...h.map((t=>(0,a._)`${(0,s.usePattern)(e,t)}.test(${r})`)))}return(0,a.not)(n)}function deleteAdditional(e){t.code((0,a._)`delete ${c}[${e}]`)}function additionalPropertyCode(s){if(f.removeAdditional==="all"||f.removeAdditional&&r===false){deleteAdditional(s);return}if(r===false){e.setParams({additionalProperty:s});e.error();if(!l)t.break();return}if(typeof r=="object"&&!(0,o.alwaysValidSchema)(d,r)){const r=t.name("valid");if(f.removeAdditional==="failing"){applyAdditionalSchema(s,r,false);t.if((0,a.not)(r),(()=>{e.reset();deleteAdditional(s)}))}else{applyAdditionalSchema(s,r);if(!l)t.if((0,a.not)(r),(()=>t.break()))}}}function applyAdditionalSchema(t,r,s){const a={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};if(s===false){Object.assign(a,{compositeRule:true,createErrors:false,allErrors:false})}e.subschema(a,r)}}};t["default"]=c},2962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7545);const a={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach(((t,r)=>{if((0,s.alwaysValidSchema)(a,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},n);e.ok(n);e.mergeEvaluated(o)}))}};t["default"]=a},1549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6086);const a={keyword:"anyOf",schemaType:"array",trackErrors:true,code:s.validateUnion,error:{message:"must match a schema in anyOf"}};t["default"]=a},9251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n={message:({params:{min:e,max:t}})=>t===undefined?(0,s.str)`must contain at least ${e} valid item(s)`:(0,s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===undefined?(0,s._)`{minContains: ${e}}`:(0,s._)`{minContains: ${e}, maxContains: ${t}}`};const o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:n,code(e){const{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;let c;let u;const{minContains:d,maxContains:l}=n;if(i.opts.next){c=d===undefined?1:d;u=l}else{c=1}const f=t.const("len",(0,s._)`${o}.length`);e.setParams({min:c,max:u});if(u===undefined&&c===0){(0,a.checkStrictMode)(i,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(u!==undefined&&c>u){(0,a.checkStrictMode)(i,`"minContains" > "maxContains" is always invalid`);e.fail();return}if((0,a.alwaysValidSchema)(i,r)){let t=(0,s._)`${f} >= ${c}`;if(u!==undefined)t=(0,s._)`${t} && ${f} <= ${u}`;e.pass(t);return}i.items=true;const p=t.name("valid");if(u===undefined&&c===1){validateItems(p,(()=>t.if(p,(()=>t.break()))))}else if(c===0){t.let(p,true);if(u!==undefined)t.if((0,s._)`${o}.length > 0`,validateItemsWithCount)}else{t.let(p,false);validateItemsWithCount()}e.result(p,(()=>e.reset()));function validateItemsWithCount(){const e=t.name("_valid");const r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>checkLimits(r)))))}function validateItems(r,s){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:a.Type.Num,compositeRule:true},r);s()}))}function checkLimits(e){t.code((0,s._)`${e}++`);if(u===undefined){t.if((0,s._)`${e} >= ${c}`,(()=>t.assign(p,true).break()))}else{t.if((0,s._)`${e} > ${u}`,(()=>t.assign(p,false).break()));if(c===1)t.assign(p,true);else t.if((0,s._)`${e} >= ${c}`,(()=>t.assign(p,true)))}}}};t["default"]=o},8243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const s=r(4109);const a=r(7545);const n=r(6086);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const a=t===1?"property":"properties";return(0,s.str)`must have ${a} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:a}})=>(0,s._)`{property: ${e},
|
5
|
+
missingProperty: ${a},
|
6
|
+
depsCount: ${t},
|
7
|
+
deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=splitDependencies(e);validatePropertyDeps(e,t);validateSchemaDeps(e,r)}};function splitDependencies({schema:e}){const t={};const r={};for(const s in e){if(s==="__proto__")continue;const a=Array.isArray(e[s])?t:r;a[s]=e[s]}return[t,r]}function validatePropertyDeps(e,t=e.schema){const{gen:r,data:a,it:o}=e;if(Object.keys(t).length===0)return;const i=r.let("missing");for(const c in t){const u=t[c];if(u.length===0)continue;const d=(0,n.propertyInData)(r,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")});if(o.allErrors){r.if(d,(()=>{for(const t of u){(0,n.checkReportMissingProp)(e,t)}}))}else{r.if((0,s._)`${d} && (${(0,n.checkMissingProp)(e,u,i)})`);(0,n.reportMissingProp)(e,i);r.else()}}}t.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(e,t=e.schema){const{gen:r,data:s,keyword:o,it:i}=e;const c=r.name("valid");for(const u in t){if((0,a.alwaysValidSchema)(i,t[u]))continue;r.if((0,n.propertyInData)(r,s,u,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,true)));e.ok(c)}}t.validateSchemaDeps=validateSchemaDeps;t["default"]=o},2062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n={message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`};const o={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:n,code(e){const{gen:t,parentSchema:r,it:n}=e;if(r.then===undefined&&r.else===undefined){(0,a.checkStrictMode)(n,'"if" without "then" and "else" is ignored')}const o=hasSchema(n,"then");const i=hasSchema(n,"else");if(!o&&!i)return;const c=t.let("valid",true);const u=t.name("_valid");validateIf();e.reset();if(o&&i){const r=t.let("ifClause");e.setParams({ifClause:r});t.if(u,validateClause("then",r),validateClause("else",r))}else if(o){t.if(u,validateClause("then"))}else{t.if((0,s.not)(u),validateClause("else"))}e.pass(c,(()=>e.error(true)));function validateIf(){const t=e.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},u);e.mergeEvaluated(t)}function validateClause(r,a){return()=>{const n=e.subschema({keyword:r},u);t.assign(c,u);e.mergeValidEvaluated(n,c);if(a)t.assign(a,(0,s._)`${r}`);else e.setParams({ifClause:r})}}}};function hasSchema(e,t){const r=e.schema[t];return r!==undefined&&!(0,a.alwaysValidSchema)(e,r)}t["default"]=o},4576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8268);const a=r(6282);const n=r(1198);const o=r(4437);const i=r(9251);const c=r(8243);const u=r(7558);const d=r(5506);const l=r(6096);const f=r(4496);const p=r(7676);const h=r(1549);const m=r(4201);const y=r(2962);const g=r(2062);const v=r(6918);function getApplicator(e=false){const t=[p.default,h.default,m.default,y.default,g.default,v.default,u.default,d.default,c.default,l.default,f.default];if(e)t.push(a.default,o.default);else t.push(s.default,n.default);t.push(i.default);return t}t["default"]=getApplicator},1198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateTuple=void 0;const s=r(4109);const a=r(7545);const n=r(6086);const o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=true;if((0,a.alwaysValidSchema)(r,t))return;e.ok((0,n.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:n,parentSchema:o,data:i,keyword:c,it:u}=e;checkStrictTuple(o);if(u.opts.unevaluated&&r.length&&u.items!==true){u.items=a.mergeEvaluated.items(n,r.length,u.items)}const d=n.name("valid");const l=n.const("len",(0,s._)`${i}.length`);r.forEach(((t,r)=>{if((0,a.alwaysValidSchema)(u,t))return;n.if((0,s._)`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},d)));e.ok(d)}));function checkStrictTuple(e){const{opts:s,errSchemaPath:n}=u;const o=r.length;const i=o===e.minItems&&(o===e.maxItems||e[t]===false);if(s.strictTuples&&!i){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${n}"`;(0,a.checkStrictMode)(u,e,s.strictTuples)}}}t.validateTuple=validateTuple;t["default"]=o},4437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n=r(6086);const o=r(8268);const i={message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`};const c={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:i,code(e){const{schema:t,parentSchema:r,it:s}=e;const{prefixItems:i}=r;s.items=true;if((0,a.alwaysValidSchema)(s,t))return;if(i)(0,o.validateAdditionalItems)(e,i);else e.ok((0,n.validateArray)(e))}};t["default"]=c},7676:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7545);const a={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(e){const{gen:t,schema:r,it:a}=e;if((0,s.alwaysValidSchema)(a,r)){e.fail();return}const n=t.name("valid");e.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},n);e.failResult(n,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t["default"]=a},4201:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`};const o={keyword:"oneOf",schemaType:"array",trackErrors:true,error:n,code(e){const{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;const i=r;const c=t.let("valid",false);const u=t.let("passing",null);const d=t.name("_valid");e.setParams({passing:u});t.block(validateOneOf);e.result(c,(()=>e.reset()),(()=>e.error(true)));function validateOneOf(){i.forEach(((r,n)=>{let i;if((0,a.alwaysValidSchema)(o,r)){t.var(d,true)}else{i=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:true},d)}if(n>0){t.if((0,s._)`${d} && ${c}`).assign(c,false).assign(u,(0,s._)`[${u}, ${n}]`).else()}t.if(d,(()=>{t.assign(c,true);t.assign(u,n);if(i)e.mergeEvaluated(i,s.Name)}))}))}}};t["default"]=o},4496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6086);const a=r(4109);const n=r(7545);const o=r(7545);const i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:u}=e;const{opts:d}=u;const l=(0,s.allSchemaProperties)(r);const f=l.filter((e=>(0,n.alwaysValidSchema)(u,r[e])));if(l.length===0||f.length===l.length&&(!u.opts.unevaluated||u.props===true)){return}const p=d.strictSchema&&!d.allowMatchingProperties&&c.properties;const h=t.name("valid");if(u.props!==true&&!(u.props instanceof a.Name)){u.props=(0,o.evaluatedPropsToName)(t,u.props)}const{props:m}=u;validatePatternProperties();function validatePatternProperties(){for(const e of l){if(p)checkMatchingProperties(e);if(u.allErrors){validateProperties(e)}else{t.var(h,true);validateProperties(e);t.if(h)}}}function checkMatchingProperties(e){for(const t in p){if(new RegExp(e).test(t)){(0,n.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}}}function validateProperties(r){t.forIn("key",i,(n=>{t.if((0,a._)`${(0,s.usePattern)(e,r)}.test(${n})`,(()=>{const s=f.includes(r);if(!s){e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:o.Type.Str},h)}if(u.opts.unevaluated&&m!==true){t.assign((0,a._)`${m}[${n}]`,true)}else if(!s&&!u.allErrors){t.if((0,a.not)(h),(()=>t.break()))}}))}))}}};t["default"]=i},6282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1198);const a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")};t["default"]=a},6096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7357);const a=r(6086);const n=r(7545);const o=r(5506);const i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:u}=e;if(u.opts.removeAdditional==="all"&&i.additionalProperties===undefined){o.default.code(new s.KeywordCxt(u,o.default,"additionalProperties"))}const d=(0,a.allSchemaProperties)(r);for(const e of d){u.definedProperties.add(e)}if(u.opts.unevaluated&&d.length&&u.props!==true){u.props=n.mergeEvaluated.props(t,(0,n.toHash)(d),u.props)}const l=d.filter((e=>!(0,n.alwaysValidSchema)(u,r[e])));if(l.length===0)return;const f=t.name("valid");for(const r of l){if(hasDefault(r)){applyPropertySchema(r)}else{t.if((0,a.propertyInData)(t,c,r,u.opts.ownProperties));applyPropertySchema(r);if(!u.allErrors)t.else().var(f,true);t.endIf()}e.it.definedProperties.add(r);e.ok(f)}function hasDefault(e){return u.opts.useDefaults&&!u.compositeRule&&r[e].default!==undefined}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t["default"]=i},7558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n={message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`};const o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(e){const{gen:t,schema:r,data:n,it:o}=e;if((0,a.alwaysValidSchema)(o,r))return;const i=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r});e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:true},i);t.if((0,s.not)(i),(()=>{e.error(true);if(!o.allErrors)t.break()}))}));e.ok(i)}};t["default"]=o},6918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7545);const a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===undefined)(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t["default"]=a},6086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const s=r(4109);const a=r(7545);const n=r(4492);const o=r(7545);function checkReportMissingProp(e,t){const{gen:r,data:a,it:n}=e;r.if(noPropertyInData(r,a,t,n.opts.ownProperties),(()=>{e.setParams({missingProperty:(0,s._)`${t}`},true);e.error()}))}t.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:e,data:t,it:{opts:r}},a,n){return(0,s.or)(...a.map((a=>(0,s.and)(noPropertyInData(e,t,a,r.ownProperties),(0,s._)`${n} = ${a}`))))}t.checkMissingProp=checkMissingProp;function reportMissingProp(e,t){e.setParams({missingProperty:t},true);e.error()}t.reportMissingProp=reportMissingProp;function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=hasPropFunc;function isOwnProperty(e,t,r){return(0,s._)`${hasPropFunc(e)}.call(${t}, ${r})`}t.isOwnProperty=isOwnProperty;function propertyInData(e,t,r,a){const n=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return a?(0,s._)`${n} && ${isOwnProperty(e,t,r)}`:n}t.propertyInData=propertyInData;function noPropertyInData(e,t,r,a){const n=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return a?(0,s.or)(n,(0,s.not)(isOwnProperty(e,t,r))):n}t.noPropertyInData=noPropertyInData;function allSchemaProperties(e){return e?Object.keys(e).filter((e=>e!=="__proto__")):[]}t.allSchemaProperties=allSchemaProperties;function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,a.alwaysValidSchema)(e,t[r])))}t.schemaProperties=schemaProperties;function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:a,schemaPath:o,errorPath:i},it:c},u,d,l){const f=l?(0,s._)`${e}, ${t}, ${a}${o}`:t;const p=[[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,i)],[n.default.parentData,c.parentData],[n.default.parentDataProperty,c.parentDataProperty],[n.default.rootData,n.default.rootData]];if(c.opts.dynamicRef)p.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const h=(0,s._)`${f}, ${r.object(...p)}`;return d!==s.nil?(0,s._)`${u}.call(${d}, ${h})`:(0,s._)`${u}(${h})`}t.callValidateCode=callValidateCode;const i=(0,s._)`new RegExp`;function usePattern({gen:e,it:{opts:t}},r){const a=t.unicodeRegExp?"u":"";const{regExp:n}=t.code;const c=n(r,a);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:(0,s._)`${n.code==="new RegExp"?i:(0,o.useFunc)(e,n)}(${r}, ${a})`})}t.usePattern=usePattern;function validateArray(e){const{gen:t,data:r,keyword:n,it:o}=e;const i=t.name("valid");if(o.allErrors){const e=t.let("valid",true);validateItems((()=>t.assign(e,false)));return e}t.var(i,true);validateItems((()=>t.break()));return i;function validateItems(o){const c=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:a.Type.Num},i);t.if((0,s.not)(i),o)}))}}t.validateArray=validateArray;function validateUnion(e){const{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=r.some((e=>(0,a.alwaysValidSchema)(o,e)));if(i&&!o.opts.unevaluated)return;const c=t.let("valid",false);const u=t.name("_valid");t.block((()=>r.forEach(((r,a)=>{const o=e.subschema({keyword:n,schemaProp:a,compositeRule:true},u);t.assign(c,(0,s._)`${c} || ${u}`);const i=e.mergeValidEvaluated(o,u);if(!i)t.if((0,s.not)(c))}))));e.result(c,(()=>e.reset()),(()=>e.error(true)))}t.validateUnion=validateUnion},8795:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t["default"]=r},9827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8795);const a=r(9873);const n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,a.default];t["default"]=n},9873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.callRef=t.getValidate=void 0;const s=r(9984);const a=r(6086);const n=r(4109);const o=r(4492);const i=r(960);const c=r(7545);const u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:a}=e;const{baseId:o,schemaEnv:c,validateName:u,opts:d,self:l}=a;const{root:f}=c;if((r==="#"||r==="#/")&&o===f.baseId)return callRootRef();const p=i.resolveRef.call(l,f,o,r);if(p===undefined)throw new s.default(a.opts.uriResolver,o,r);if(p instanceof i.SchemaEnv)return callValidate(p);return inlineRefSchema(p);function callRootRef(){if(c===f)return callRef(e,u,c,c.$async);const r=t.scopeValue("root",{ref:f});return callRef(e,(0,n._)`${r}.validate`,f,f.$async)}function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}function inlineRefSchema(s){const a=t.scopeValue("schema",d.code.source===true?{ref:s,code:(0,n.stringify)(s)}:{ref:s});const o=t.name("valid");const i=e.subschema({schema:s,dataTypes:[],schemaPath:n.nil,topSchemaRef:a,errSchemaPath:r},o);e.mergeEvaluated(i);e.ok(o)}}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,n._)`${r.scopeValue("wrapper",{ref:t})}.validate`}t.getValidate=getValidate;function callRef(e,t,r,s){const{gen:i,it:u}=e;const{allErrors:d,schemaEnv:l,opts:f}=u;const p=f.passContext?o.default.this:n.nil;if(s)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code((0,n._)`await ${(0,a.callValidateCode)(e,t,p)}`);addEvaluatedFrom(t);if(!d)i.assign(r,true)}),(e=>{i.if((0,n._)`!(${e} instanceof ${u.ValidationError})`,(()=>i.throw(e)));addErrorsFrom(e);if(!d)i.assign(r,false)}));e.ok(r)}function callSyncRef(){e.result((0,a.callValidateCode)(e,t,p),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}function addErrorsFrom(e){const t=(0,n._)`${e}.errors`;i.assign(o.default.vErrors,(0,n._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`);i.assign(o.default.errors,(0,n._)`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!u.opts.unevaluated)return;const s=(t=r===null||r===void 0?void 0:r.validate)===null||t===void 0?void 0:t.evaluated;if(u.props!==true){if(s&&!s.dynamicProps){if(s.props!==undefined){u.props=c.mergeEvaluated.props(i,s.props,u.props)}}else{const t=i.var("props",(0,n._)`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(i,t,u.props,n.Name)}}if(u.items!==true){if(s&&!s.dynamicItems){if(s.items!==undefined){u.items=c.mergeEvaluated.items(i,s.items,u.items)}}else{const t=i.var("items",(0,n._)`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(i,t,u.items,n.Name)}}}}t.callRef=callRef;t["default"]=u},8222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(3547);const n=r(960);const o=r(7545);const i={message:({params:{discrError:e,tagName:t}})=>e===a.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`};const c={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(e){const{gen:t,data:r,schema:i,parentSchema:c,it:u}=e;const{oneOf:d}=c;if(!u.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const l=i.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",false);const p=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(l)}`);t.if((0,s._)`typeof ${p} == "string"`,(()=>validateMapping()),(()=>e.error(false,{discrError:a.DiscrError.Tag,tag:p,tagName:l})));e.ok(f);function validateMapping(){const r=getMapping();t.if(false);for(const e in r){t.elseIf((0,s._)`${p} === ${e}`);t.assign(f,applyTagSchema(r[e]))}t.else();e.error(false,{discrError:a.DiscrError.Mapping,tag:p,tagName:l});t.endIf()}function applyTagSchema(r){const a=t.name("valid");const n=e.subschema({keyword:"oneOf",schemaProp:r},a);e.mergeEvaluated(n,s.Name);return a}function getMapping(){var e;const t={};const r=hasRequired(c);let s=true;for(let t=0;t<d.length;t++){let a=d[t];if((a===null||a===void 0?void 0:a.$ref)&&!(0,o.schemaHasRulesButRef)(a,u.self.RULES)){a=n.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,a===null||a===void 0?void 0:a.$ref);if(a instanceof n.SchemaEnv)a=a.schema}const i=(e=a===null||a===void 0?void 0:a.properties)===null||e===void 0?void 0:e[l];if(typeof i!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`)}s=s&&(r||hasRequired(a));addMappings(i,t)}if(!s)throw new Error(`discriminator: "${l}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(l)}function addMappings(e,t){if(e.const){addMapping(e.const,t)}else if(e.enum){for(const r of e.enum){addMapping(r,t)}}else{throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`)}}function addMapping(e,r){if(typeof e!="string"||e in t){throw new Error(`discriminator: "${l}" values must be unique strings`)}t[e]=r}}}};t["default"]=c},3547:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiscrError=void 0;var r;(function(e){e["Tag"]="tag";e["Mapping"]="mapping"})(r=t.DiscrError||(t.DiscrError={}))},8056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9827);const a=r(4463);const n=r(4576);const o=r(7596);const i=r(1654);const c=[s.default,a.default,(0,n.default)(),o.default,i.metadataVocabulary,i.contentVocabulary];t["default"]=c},3875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a={message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`};const n={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:a,code(e,t){const{gen:r,data:a,$data:n,schema:o,schemaCode:i,it:c}=e;const{opts:u,errSchemaPath:d,schemaEnv:l,self:f}=c;if(!u.validateFormats)return;if(n)validate$DataFormat();else validateFormat();function validate$DataFormat(){const n=r.scopeValue("formats",{ref:f.formats,code:u.code.formats});const o=r.const("fDef",(0,s._)`${n}[${i}]`);const c=r.let("fType");const d=r.let("format");r.if((0,s._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,(0,s._)`${o}.type || "string"`).assign(d,(0,s._)`${o}.validate`)),(()=>r.assign(c,(0,s._)`"string"`).assign(d,o)));e.fail$data((0,s.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(u.strictSchema===false)return s.nil;return(0,s._)`${i} && !${d}`}function invalidFmt(){const e=l.$async?(0,s._)`(${o}.async ? await ${d}(${a}) : ${d}(${a}))`:(0,s._)`${d}(${a})`;const r=(0,s._)`(typeof ${d} == "function" ? ${e} : ${d}.test(${a}))`;return(0,s._)`${d} && ${d} !== true && ${c} === ${t} && !${r}`}}function validateFormat(){const n=f.formats[o];if(!n){unknownFormat();return}if(n===true)return;const[i,c,p]=getFormat(n);if(i===t)e.pass(validCondition());function unknownFormat(){if(u.strictSchema===false){f.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${d}"`}}function getFormat(e){const t=e instanceof RegExp?(0,s.regexpCode)(e):u.code.formats?(0,s._)`${u.code.formats}${(0,s.getProperty)(o)}`:undefined;const a=r.scopeValue("formats",{key:o,ref:e,code:t});if(typeof e=="object"&&!(e instanceof RegExp)){return[e.type||"string",e.validate,(0,s._)`${a}.validate`]}return["string",e,a]}function validCondition(){if(typeof n=="object"&&!(n instanceof RegExp)&&n.async){if(!l.$async)throw new Error("async format in sync schema");return(0,s._)`await ${p}(${a})`}return typeof c=="function"?(0,s._)`${p}(${a})`:(0,s._)`${p}.test(${a})`}}}};t["default"]=n},7596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3875);const a=[s.default];t["default"]=a},1654:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.contentVocabulary=t.metadataVocabulary=void 0;t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},3838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n=r(9987);const o={message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`};const i={keyword:"const",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schemaCode:i,schema:c}=e;if(o||c&&typeof c=="object"){e.fail$data((0,s._)`!${(0,a.useFunc)(t,n.default)}(${r}, ${i})`)}else{e.fail((0,s._)`${c} !== ${r}`)}}};t["default"]=i},6923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n=r(9987);const o={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`};const i={keyword:"enum",schemaType:"array",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schema:i,schemaCode:c,it:u}=e;if(!o&&i.length===0)throw new Error("enum must have non-empty array");const d=i.length>=u.opts.loopEnum;let l;const getEql=()=>l!==null&&l!==void 0?l:l=(0,a.useFunc)(t,n.default);let f;if(d||o){f=t.let("valid");e.block$data(f,loopEnum)}else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,s.or)(...i.map(((t,r)=>equalCode(e,r))))}e.pass(f);function loopEnum(){t.assign(f,false);t.forOf("v",c,(e=>t.if((0,s._)`${getEql()}(${r}, ${e})`,(()=>t.assign(f,true).break()))))}function equalCode(e,t){const a=i[t];return typeof a==="object"&&a!==null?(0,s._)`${getEql()}(${r}, ${e}[${t}])`:(0,s._)`${r} === ${a}`}}};t["default"]=i},4463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6974);const a=r(873);const n=r(5534);const o=r(6880);const i=r(490);const c=r(1022);const u=r(3480);const d=r(4214);const l=r(3838);const f=r(6923);const p=[s.default,a.default,n.default,o.default,i.default,c.default,u.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,f.default];t["default"]=p},3480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:a,code(e){const{keyword:t,data:r,schemaCode:a}=e;const n=t==="maxItems"?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${n} ${a}`)}};t["default"]=n},5534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=r(7545);const n=r(4624);const o={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:o,it:i}=e;const c=t==="maxLength"?s.operators.GT:s.operators.LT;const u=i.opts.unicode===false?(0,s._)`${r}.length`:(0,s._)`${(0,a.useFunc)(e.gen,n.default)}(${r})`;e.fail$data((0,s._)`${u} ${c} ${o}`)}};t["default"]=i},6974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a=s.operators;const n={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}};const o={message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${n[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${n[e].okStr}, limit: ${t}}`};const i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:a}=e;e.fail$data((0,s._)`${r} ${n[t].fail} ${a} || isNaN(${r})`)}};t["default"]=i},490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:a,code(e){const{keyword:t,data:r,schemaCode:a}=e;const n=t==="maxProperties"?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${n} ${a}`)}};t["default"]=n},873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4109);const a={message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`};const n={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:a,code(e){const{gen:t,data:r,schemaCode:a,it:n}=e;const o=n.opts.multipleOfPrecision;const i=t.let("res");const c=o?(0,s._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:(0,s._)`${i} !== parseInt(${i})`;e.fail$data((0,s._)`(${a} === 0 || (${i} = ${r}/${a}, ${c}))`)}};t["default"]=n},6880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6086);const a=r(4109);const n={message:({schemaCode:e})=>(0,a.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,a._)`{pattern: ${e}}`};const o={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:n,code(e){const{data:t,$data:r,schema:n,schemaCode:o,it:i}=e;const c=i.opts.unicodeRegExp?"u":"";const u=r?(0,a._)`(new RegExp(${o}, ${c}))`:(0,s.usePattern)(e,n);e.fail$data((0,a._)`!${u}.test(${t})`)}};t["default"]=o},1022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6086);const a=r(4109);const n=r(7545);const o={message:({params:{missingProperty:e}})=>(0,a.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,a._)`{missingProperty: ${e}}`};const i={keyword:"required",type:"object",schemaType:"array",$data:true,error:o,code(e){const{gen:t,schema:r,schemaCode:o,data:i,$data:c,it:u}=e;const{opts:d}=u;if(!c&&r.length===0)return;const l=r.length>=d.loopRequired;if(u.allErrors)allErrorsMode();else exitOnErrorMode();if(d.strictRequired){const t=e.parentSchema.properties;const{definedProperties:s}=e.it;for(const e of r){if((t===null||t===void 0?void 0:t[e])===undefined&&!s.has(e)){const t=u.schemaEnv.baseId+u.errSchemaPath;const r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,n.checkStrictMode)(u,r,u.opts.strictRequired)}}}function allErrorsMode(){if(l||c){e.block$data(a.nil,loopAllRequired)}else{for(const t of r){(0,s.checkReportMissingProp)(e,t)}}}function exitOnErrorMode(){const a=t.let("missing");if(l||c){const r=t.let("valid",true);e.block$data(r,(()=>loopUntilMissing(a,r)));e.ok(r)}else{t.if((0,s.checkMissingProp)(e,r,a));(0,s.reportMissingProp)(e,a);t.else()}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r});t.if((0,s.noPropertyInData)(t,i,r,d.ownProperties),(()=>e.error()))}))}function loopUntilMissing(r,n){e.setParams({missingProperty:r});t.forOf(r,o,(()=>{t.assign(n,(0,s.propertyInData)(t,i,r,d.ownProperties));t.if((0,a.not)(n),(()=>{e.error();t.break()}))}),a.nil)}}};t["default"]=i},4214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3967);const a=r(4109);const n=r(7545);const o=r(9987);const i={message:({params:{i:e,j:t}})=>(0,a.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,a._)`{i: ${e}, j: ${t}}`};const c={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:i,code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:u,schemaCode:d,it:l}=e;if(!i&&!c)return;const f=t.let("valid");const p=u.items?(0,s.getSchemaTypes)(u.items):[];e.block$data(f,validateUniqueItems,(0,a._)`${d} === false`);e.ok(f);function validateUniqueItems(){const s=t.let("i",(0,a._)`${r}.length`);const n=t.let("j");e.setParams({i:s,j:n});t.assign(f,true);t.if((0,a._)`${s} > 1`,(()=>(canOptimize()?loopN:loopN2)(s,n)))}function canOptimize(){return p.length>0&&!p.some((e=>e==="object"||e==="array"))}function loopN(n,o){const i=t.name("item");const c=(0,s.checkDataTypes)(p,i,l.opts.strictNumbers,s.DataType.Wrong);const u=t.const("indices",(0,a._)`{}`);t.for((0,a._)`;${n}--;`,(()=>{t.let(i,(0,a._)`${r}[${n}]`);t.if(c,(0,a._)`continue`);if(p.length>1)t.if((0,a._)`typeof ${i} == "string"`,(0,a._)`${i} += "_"`);t.if((0,a._)`typeof ${u}[${i}] == "number"`,(()=>{t.assign(o,(0,a._)`${u}[${i}]`);e.error();t.assign(f,false).break()})).code((0,a._)`${u}[${i}] = ${n}`)}))}function loopN2(s,i){const c=(0,n.useFunc)(t,o.default);const u=t.name("outer");t.label(u).for((0,a._)`;${s}--;`,(()=>t.for((0,a._)`${i} = ${s}; ${i}--;`,(()=>t.if((0,a._)`${c}(${r}[${s}], ${r}[${i}])`,(()=>{e.error();t.assign(f,false).break(u)}))))))}}};t["default"]=c},7447:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var r,s,a;if(Array.isArray(e)){r=e.length;if(r!=t.length)return false;for(s=r;s--!==0;)if(!equal(e[s],t[s]))return false;return true}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();a=Object.keys(e);r=a.length;if(r!==Object.keys(t).length)return false;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[s]))return false;for(s=r;s--!==0;){var n=a[s];if(!equal(e[n],t[n]))return false}return true}return e!==e&&t!==t}},7243:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){};var a=r.post||function(){};_traverse(t,s,a,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,s,a,n,o,i,c,u,d){if(a&&typeof a=="object"&&!Array.isArray(a)){r(a,n,o,i,c,u,d);for(var l in a){var f=a[l];if(Array.isArray(f)){if(l in t.arrayKeywords){for(var p=0;p<f.length;p++)_traverse(e,r,s,f[p],n+"/"+l+"/"+p,o,n,l,a,p)}}else if(l in t.propsKeywords){if(f&&typeof f=="object"){for(var h in f)_traverse(e,r,s,f[h],n+"/"+l+"/"+escapeJsonPtr(h),o,n,l,a,h)}}else if(l in t.keywords||e.allKeys&&!(l in t.skipKeywords)){_traverse(e,r,s,f,n+"/"+l,o,n,l,a)}}s(a,n,o,i,c,u,d)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}},199:function(e,t){
|
8
|
+
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
9
|
+
(function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length>1){t[0]=t[0].slice(0,-1);var s=t.length-1;for(var a=1;a<s;++a){t[a]=t[a].slice(1,-1)}t[s]=t[s].slice(1);return t.join("")}else{return t[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t){for(var s in t){r[s]=t[s]}}return r}function buildExps(e){var t="[A-Za-z]",r="[\\x0D]",s="[0-9]",a="[\\x22]",n=merge(s,"[A-Fa-f]"),o="[\\x0A]",i="[\\x20]",c=subexp(subexp("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+subexp("%[89A-Fa-f]"+n+"%"+n+n)+"|"+subexp("%"+n+n)),u="[\\:\\/\\?\\#\\[\\]\\@]",d="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=merge(u,d),f=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=e?"[\\uE000-\\uF8FF]":"[]",h=merge(t,s,"[\\-\\.\\_\\~]",f),m=subexp(t+merge(t,s,"[\\+\\-\\.]")+"*"),y=subexp(subexp(c+"|"+merge(h,d,"[\\:]"))+"*"),g=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("[1-9]"+s)+"|"+s),v=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("0?[1-9]"+s)+"|0?0?"+s),$=subexp(v+"\\."+v+"\\."+v+"\\."+v),b=subexp(n+"{1,4}"),w=subexp(subexp(b+"\\:"+b)+"|"+$),E=subexp(subexp(b+"\\:")+"{6}"+w),S=subexp("\\:\\:"+subexp(b+"\\:")+"{5}"+w),P=subexp(subexp(b)+"?\\:\\:"+subexp(b+"\\:")+"{4}"+w),C=subexp(subexp(subexp(b+"\\:")+"{0,1}"+b)+"?\\:\\:"+subexp(b+"\\:")+"{3}"+w),x=subexp(subexp(subexp(b+"\\:")+"{0,2}"+b)+"?\\:\\:"+subexp(b+"\\:")+"{2}"+w),k=subexp(subexp(subexp(b+"\\:")+"{0,3}"+b)+"?\\:\\:"+b+"\\:"+w),N=subexp(subexp(subexp(b+"\\:")+"{0,4}"+b)+"?\\:\\:"+w),O=subexp(subexp(subexp(b+"\\:")+"{0,5}"+b)+"?\\:\\:"+b),R=subexp(subexp(subexp(b+"\\:")+"{0,6}"+b)+"?\\:\\:"),T=subexp([E,S,P,C,x,k,N,O,R].join("|")),j=subexp(subexp(h+"|"+c)+"+"),I=subexp(T+"\\%25"+j),D=subexp(T+subexp("\\%25|\\%(?!"+n+"{2})")+j),A=subexp("[vV]"+n+"+\\."+merge(h,d,"[\\:]")+"+"),M=subexp("\\["+subexp(D+"|"+T+"|"+A)+"\\]"),F=subexp(subexp(c+"|"+merge(h,d))+"*"),V=subexp(M+"|"+$+"(?!"+F+")"+"|"+F),U=subexp(s+"*"),z=subexp(subexp(y+"@")+"?"+V+subexp("\\:"+U)+"?"),K=subexp(c+"|"+merge(h,d,"[\\:\\@]")),q=subexp(K+"*"),L=subexp(K+"+"),H=subexp(subexp(c+"|"+merge(h,d,"[\\@]"))+"+"),G=subexp(subexp("\\/"+q)+"*"),J=subexp("\\/"+subexp(L+G)+"?"),B=subexp(H+G),W=subexp(L+G),Z="(?!"+K+")",Q=subexp(G+"|"+J+"|"+B+"|"+W+"|"+Z),Y=subexp(subexp(K+"|"+merge("[\\/\\?]",p))+"*"),X=subexp(subexp(K+"|[\\/\\?]")+"*"),ee=subexp(subexp("\\/\\/"+z+G)+"|"+J+"|"+W+"|"+Z),te=subexp(m+"\\:"+ee+subexp("\\?"+Y)+"?"+subexp("\\#"+X)+"?"),re=subexp(subexp("\\/\\/"+z+G)+"|"+J+"|"+B+"|"+Z),se=subexp(re+subexp("\\?"+Y)+"?"+subexp("\\#"+X)+"?"),ae=subexp(te+"|"+se),ne=subexp(m+"\\:"+ee+subexp("\\?"+Y)+"?"),oe="^("+m+")\\:"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+V+")"+subexp("\\:("+U+")")+"?)")+"?("+G+"|"+J+"|"+W+"|"+Z+")")+subexp("\\?("+Y+")")+"?"+subexp("\\#("+X+")")+"?$",ie="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+V+")"+subexp("\\:("+U+")")+"?)")+"?("+G+"|"+J+"|"+B+"|"+Z+")")+subexp("\\?("+Y+")")+"?"+subexp("\\#("+X+")")+"?$",ce="^("+m+")\\:"+subexp(subexp("\\/\\/("+subexp("("+y+")@")+"?("+V+")"+subexp("\\:("+U+")")+"?)")+"?("+G+"|"+J+"|"+W+"|"+Z+")")+subexp("\\?("+Y+")")+"?$",ue="^"+subexp("\\#("+X+")")+"?$",de="^"+subexp("("+y+")@")+"?("+V+")"+subexp("\\:("+U+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",t,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",h,d),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",h,d),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",h,d),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",h,d),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",h,d,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",h,d,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",h,d),"g"),UNRESERVED:new RegExp(h,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",h,l),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+$+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+subexp(subexp("\\%25|\\%(?!"+n+"{2})")+"("+j+")")+"?\\]?$")}}var t=buildExps(false);var r=buildExps(true);var s=function(){function sliceIterator(e,t){var r=[];var s=true;var a=false;var n=undefined;try{for(var o=e[Symbol.iterator](),i;!(s=(i=o.next()).done);s=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){a=true;n=e}finally{try{if(!s&&o["return"])o["return"]()}finally{if(a)throw n}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var a=2147483647;var n=36;var o=1;var i=26;var c=38;var u=700;var d=72;var l=128;var f="-";var p=/^xn--/;var h=/[^\0-\x7E]/;var m=/[\x2E\u3002\uFF0E\uFF61]/g;var y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var g=n-o;var v=Math.floor;var $=String.fromCharCode;function error$1(e){throw new RangeError(y[e])}function map(e,t){var r=[];var s=e.length;while(s--){r[s]=t(e[s])}return r}function mapDomain(e,t){var r=e.split("@");var s="";if(r.length>1){s=r[0]+"@";e=r[1]}e=e.replace(m,".");var a=e.split(".");var n=map(a,t).join(".");return s+n}function ucs2decode(e){var t=[];var r=0;var s=e.length;while(r<s){var a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<s){var n=e.charCodeAt(r++);if((n&64512)==56320){t.push(((a&1023)<<10)+(n&1023)+65536)}else{t.push(a);r--}}else{t.push(a)}}return t}var b=function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))};var w=function basicToDigit(e){if(e-48<10){return e-22}if(e-65<26){return e-65}if(e-97<26){return e-97}return n};var E=function digitToBasic(e,t){return e+22+75*(e<26)-((t!=0)<<5)};var S=function adapt(e,t,r){var s=0;e=r?v(e/u):e>>1;e+=v(e/t);for(;e>g*i>>1;s+=n){e=v(e/g)}return v(s+(g+1)*e/(e+c))};var P=function decode(e){var t=[];var r=e.length;var s=0;var c=l;var u=d;var p=e.lastIndexOf(f);if(p<0){p=0}for(var h=0;h<p;++h){if(e.charCodeAt(h)>=128){error$1("not-basic")}t.push(e.charCodeAt(h))}for(var m=p>0?p+1:0;m<r;){var y=s;for(var g=1,$=n;;$+=n){if(m>=r){error$1("invalid-input")}var b=w(e.charCodeAt(m++));if(b>=n||b>v((a-s)/g)){error$1("overflow")}s+=b*g;var E=$<=u?o:$>=u+i?i:$-u;if(b<E){break}var P=n-E;if(g>v(a/P)){error$1("overflow")}g*=P}var C=t.length+1;u=S(s-y,C,y==0);if(v(s/C)>a-c){error$1("overflow")}c+=v(s/C);s%=C;t.splice(s++,0,c)}return String.fromCodePoint.apply(String,t)};var C=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var s=l;var c=0;var u=d;var p=true;var h=false;var m=undefined;try{for(var y=e[Symbol.iterator](),g;!(p=(g=y.next()).done);p=true){var b=g.value;if(b<128){t.push($(b))}}}catch(e){h=true;m=e}finally{try{if(!p&&y.return){y.return()}}finally{if(h){throw m}}}var w=t.length;var P=w;if(w){t.push(f)}while(P<r){var C=a;var x=true;var k=false;var N=undefined;try{for(var O=e[Symbol.iterator](),R;!(x=(R=O.next()).done);x=true){var T=R.value;if(T>=s&&T<C){C=T}}}catch(e){k=true;N=e}finally{try{if(!x&&O.return){O.return()}}finally{if(k){throw N}}}var j=P+1;if(C-s>v((a-c)/j)){error$1("overflow")}c+=(C-s)*j;s=C;var I=true;var D=false;var A=undefined;try{for(var M=e[Symbol.iterator](),F;!(I=(F=M.next()).done);I=true){var V=F.value;if(V<s&&++c>a){error$1("overflow")}if(V==s){var U=c;for(var z=n;;z+=n){var K=z<=u?o:z>=u+i?i:z-u;if(U<K){break}var q=U-K;var L=n-K;t.push($(E(K+q%L,0)));U=v(q/L)}t.push($(E(U,0)));u=S(c,j,P==w);c=0;++P}}}catch(e){D=true;A=e}finally{try{if(!I&&M.return){M.return()}}finally{if(D){throw A}}}++c;++s}return t.join("")};var x=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?P(e.slice(4).toLowerCase()):e}))};var k=function toASCII(e){return mapDomain(e,(function(e){return h.test(e)?"xn--"+C(e):e}))};var N={version:"2.1.0",ucs2:{decode:ucs2decode,encode:b},decode:P,encode:C,toASCII:k,toUnicode:x};var O={};function pctEncChar(e){var t=e.charCodeAt(0);var r=void 0;if(t<16)r="%0"+t.toString(16).toUpperCase();else if(t<128)r="%"+t.toString(16).toUpperCase();else if(t<2048)r="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var s=e.length;while(r<s){var a=parseInt(e.substr(r+1,2),16);if(a<128){t+=String.fromCharCode(a);r+=3}else if(a>=194&&a<224){if(s-r>=6){var n=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((a&31)<<6|n&63)}else{t+=e.substr(r,6)}r+=6}else if(a>=224){if(s-r>=9){var o=parseInt(e.substr(r+4,2),16);var i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((a&15)<<12|(o&63)<<6|i&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var a=s(r,2),n=a[1];if(n){return n.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var a=s(r,3),n=a[1],o=a[2];if(n){var i=n.toLowerCase().split("::").reverse(),c=s(i,2),u=c[0],d=c[1];var l=d?d.split(":").map(_stripLeadingZeros):[];var f=u.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(f[f.length-1]);var h=p?7:8;var m=f.length-h;var y=Array(h);for(var g=0;g<h;++g){y[g]=l[g]||f[m+g]||""}if(p){y[h-1]=_normalizeIPv4(y[h-1],t)}var v=y.reduce((function(e,t,r){if(!t||t==="0"){var s=e[e.length-1];if(s&&s.index+s.length===r){s.length++}else{e.push({index:r,length:1})}}return e}),[]);var $=v.sort((function(e,t){return t.length-e.length}))[0];var b=void 0;if($&&$.length>1){var w=y.slice(0,$.index);var E=y.slice($.index+$.length);b=w.join(":")+"::"+E.join(":")}else{b=y.join(":")}if(o){b+="%"+o}return b}else{return e}}var R=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var T="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a={};var n=s.iri!==false?r:t;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var o=e.match(R);if(o){if(T){a.scheme=o[1];a.userinfo=o[3];a.host=o[4];a.port=parseInt(o[5],10);a.path=o[6]||"";a.query=o[7];a.fragment=o[8];if(isNaN(a.port)){a.port=o[5]}}else{a.scheme=o[1]||undefined;a.userinfo=e.indexOf("@")!==-1?o[3]:undefined;a.host=e.indexOf("//")!==-1?o[4]:undefined;a.port=parseInt(o[5],10);a.path=o[6]||"";a.query=e.indexOf("?")!==-1?o[7]:undefined;a.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(a.port)){a.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(a.host){a.host=_normalizeIPv6(_normalizeIPv4(a.host,n),n)}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&!a.path&&a.query===undefined){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==a.reference){a.error=a.error||"URI is not a "+s.reference+" reference."}var i=O[(s.scheme||a.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!i||!i.unicodeSupport)){if(a.host&&(s.domainHost||i&&i.domainHost)){try{a.host=N.toASCII(a.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(a,t)}else{_normalizeComponentEncoding(a,n)}if(i&&i.parse){i.parse(a,s)}}else{a.error=a.error||"URI can not be parsed."}return a}function _recomposeAuthority(e,s){var a=s.iri!==false?r:t;var n=[];if(e.userinfo!==undefined){n.push(e.userinfo);n.push("@")}if(e.host!==undefined){n.push(_normalizeIPv6(_normalizeIPv4(String(e.host),a),a).replace(a.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){n.push(":");n.push(String(e.port))}return n.length?n.join(""):undefined}var j=/^\.\.?\//;var I=/^\/\.(\/|$)/;var D=/^\/\.\.(\/|$)/;var A=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(j)){e=e.replace(j,"")}else if(e.match(I)){e=e.replace(I,"/")}else if(e.match(D)){e=e.replace(D,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(A);if(r){var s=r[0];e=e.slice(s.length);t.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=s.iri?r:t;var n=[];var o=O[(s.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,s);if(e.host){if(a.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||o&&o.domainHost){try{e.host=!s.iri?N.toASCII(e.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase()):N.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,a);if(s.reference!=="suffix"&&e.scheme){n.push(e.scheme);n.push(":")}var i=_recomposeAuthority(e,s);if(i!==undefined){if(s.reference!=="suffix"){n.push("//")}n.push(i);if(e.path&&e.path.charAt(0)!=="/"){n.push("/")}}if(e.path!==undefined){var c=e.path;if(!s.absolutePath&&(!o||!o.absolutePath)){c=removeDotSegments(c)}if(i===undefined){c=c.replace(/^\/\//,"/%2F")}n.push(c)}if(e.query!==undefined){n.push("?");n.push(e.query)}if(e.fragment!==undefined){n.push("#");n.push(e.fragment)}return n.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var a={};if(!s){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){a.scheme=t.scheme;a.userinfo=t.userinfo;a.host=t.host;a.port=t.port;a.path=removeDotSegments(t.path||"");a.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){a.userinfo=t.userinfo;a.host=t.host;a.port=t.port;a.path=removeDotSegments(t.path||"");a.query=t.query}else{if(!t.path){a.path=e.path;if(t.query!==undefined){a.query=t.query}else{a.query=e.query}}else{if(t.path.charAt(0)==="/"){a.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){a.path="/"+t.path}else if(!e.path){a.path=t.path}else{a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}a.path=removeDotSegments(a.path)}a.query=t.query}a.userinfo=e.userinfo;a.host=e.host;a.port=e.port}a.scheme=e.scheme}a.fragment=t.fragment;return a}function resolve(e,t,r){var s=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,s),parse(t,s),s,true),s)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var M={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var F={scheme:"https",domainHost:M.domainHost,parse:M.parse,serialize:M.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var V={scheme:"ws",domainHost:true,parse:function parse(e,t){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,t){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),a=s(r,2),n=a[0],o=a[1];e.path=n&&n!=="/"?n:undefined;e.query=o;e.resourceName=undefined}e.fragment=undefined;return e}};var U={scheme:"wss",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};var z={};var K=true;var q="[A-Za-z0-9\\-\\.\\_\\~"+(K?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var L="[0-9A-Fa-f]";var H=subexp(subexp("%[EFef]"+L+"%"+L+L+"%"+L+L)+"|"+subexp("%[89A-Fa-f]"+L+"%"+L+L)+"|"+subexp("%"+L+L));var G="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var J="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var B=merge(J,'[\\"\\\\]');var W="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var Z=new RegExp(q,"g");var Q=new RegExp(H,"g");var Y=new RegExp(merge("[^]",G,"[\\.]",'[\\"]',B),"g");var X=new RegExp(merge("[^]",q,W),"g");var ee=X;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(Z)?e:t}var te={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var s=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var a=false;var n={};var o=r.query.split("&");for(var i=0,c=o.length;i<c;++i){var u=o[i].split("=");switch(u[0]){case"to":var d=u[1].split(",");for(var l=0,f=d.length;l<f;++l){s.push(d[l])}break;case"subject":r.subject=unescapeComponent(u[1],t);break;case"body":r.body=unescapeComponent(u[1],t);break;default:a=true;n[unescapeComponent(u[0],t)]=unescapeComponent(u[1],t);break}}if(a)r.headers=n}r.query=undefined;for(var p=0,h=s.length;p<h;++p){var m=s[p].split("@");m[0]=unescapeComponent(m[0]);if(!t.unicodeSupport){try{m[1]=N.toASCII(unescapeComponent(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{m[1]=unescapeComponent(m[1],t).toLowerCase()}s[p]=m.join("@")}return r},serialize:function serialize$$1(e,t){var r=e;var s=toArray(e.to);if(s){for(var a=0,n=s.length;a<n;++a){var o=String(s[a]);var i=o.lastIndexOf("@");var c=o.slice(0,i).replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(Y,pctEncChar);var u=o.slice(i+1);try{u=!t.iri?N.toASCII(unescapeComponent(u,t).toLowerCase()):N.toUnicode(u)}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(!t.iri?"ASCII":"Unicode")+" via punycode: "+e}s[a]=c+"@"+u}r.path=s.join(",")}var d=e.headers=e.headers||{};if(e.subject)d["subject"]=e.subject;if(e.body)d["body"]=e.body;var l=[];for(var f in d){if(d[f]!==z[f]){l.push(f.replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(X,pctEncChar)+"="+d[f].replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(ee,pctEncChar))}}if(l.length){r.query=l.join("&")}return r}};var re=/^([^\:]+)\:(.*)/;var se={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(re);var s=e;if(r){var a=t.scheme||s.scheme||"urn";var n=r[1].toLowerCase();var o=r[2];var i=a+":"+(t.nid||n);var c=O[i];s.nid=n;s.nss=o;s.path=undefined;if(c){s=c.parse(s,t)}}else{s.error=s.error||"URN can not be parsed."}return s},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn";var s=e.nid;var a=r+":"+(t.nid||s);var n=O[a];if(n){e=n.serialize(e,t)}var o=e;var i=e.nss;o.path=(s||t.nid)+":"+i;return o}};var ae=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ne={scheme:"urn:uuid",parse:function parse(e,t){var r=e;r.uuid=r.nss;r.nss=undefined;if(!t.tolerant&&(!r.uuid||!r.uuid.match(ae))){r.error=r.error||"UUID is not valid."}return r},serialize:function serialize(e,t){var r=e;r.nss=(e.uuid||"").toLowerCase();return r}};O[M.scheme]=M;O[F.scheme]=F;O[V.scheme]=V;O[U.scheme]=U;O[te.scheme]=te;O[se.scheme]=se;O[ne.scheme]=ne;e.SCHEMES=O;e.pctEncChar=pctEncChar;e.pctDecChars=pctDecChars;e.parse=parse;e.removeDotSegments=removeDotSegments;e.serialize=serialize;e.resolveComponents=resolveComponents;e.resolve=resolve;e.normalize=normalize;e.equal=equal;e.escapeComponent=escapeComponent;e.unescapeComponent=unescapeComponent;Object.defineProperty(e,"__esModule",{value:true})}))},7918:e=>{"use strict";e.exports=JSON.parse('{"$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":false}')},9520:e=>{"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var a=t[r]={exports:{}};var n=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(4711);module.exports=r})();
|
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015-2021 Evgeny Poberezkin
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"ajv","author":"Evgeny Poberezkin","version":"8.11.0","funding":{"type":"github","url":"https://github.com/sponsors/epoberezkin"},"license":"MIT","types":"types/ajv.d.ts"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { AnySchemaObject } from './types';
|
2
|
+
import AjvCore from './core';
|
3
|
+
declare class Ajv extends AjvCore {
|
4
|
+
_addVocabularies(): void;
|
5
|
+
_addDefaultMetaSchema(): void;
|
6
|
+
defaultMeta(): string | AnySchemaObject | undefined;
|
7
|
+
}
|
8
|
+
export default Ajv;
|
9
|
+
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, SchemaValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
|
10
|
+
export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
|
11
|
+
export { SchemaCxt, SchemaObjCxt } from "./compile";
|
12
|
+
export { KeywordCxt } from "./compile/validate";
|
13
|
+
export { DefinedError } from "./vocabularies/errors";
|
14
|
+
export { JSONType } from "./compile/rules";
|
15
|
+
export { JSONSchemaType } from "./types/json-schema";
|
16
|
+
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
|
@@ -0,0 +1,40 @@
|
|
1
|
+
export declare abstract class _CodeOrName {
|
2
|
+
abstract readonly str: string;
|
3
|
+
abstract readonly names: UsedNames;
|
4
|
+
abstract toString(): string;
|
5
|
+
abstract emptyStr(): boolean;
|
6
|
+
}
|
7
|
+
export declare const IDENTIFIER: RegExp;
|
8
|
+
export declare class Name extends _CodeOrName {
|
9
|
+
readonly str: string;
|
10
|
+
constructor(s: string);
|
11
|
+
toString(): string;
|
12
|
+
emptyStr(): boolean;
|
13
|
+
get names(): UsedNames;
|
14
|
+
}
|
15
|
+
export declare class _Code extends _CodeOrName {
|
16
|
+
readonly _items: readonly CodeItem[];
|
17
|
+
private _str?;
|
18
|
+
private _names?;
|
19
|
+
constructor(code: string | readonly CodeItem[]);
|
20
|
+
toString(): string;
|
21
|
+
emptyStr(): boolean;
|
22
|
+
get str(): string;
|
23
|
+
get names(): UsedNames;
|
24
|
+
}
|
25
|
+
export declare type CodeItem = Name | string | number | boolean | null;
|
26
|
+
export declare type UsedNames = Record<string, number | undefined>;
|
27
|
+
export declare type Code = _Code | Name;
|
28
|
+
export declare type SafeExpr = Code | number | boolean | null;
|
29
|
+
export declare const nil: _Code;
|
30
|
+
declare type CodeArg = SafeExpr | string | undefined;
|
31
|
+
export declare function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code;
|
32
|
+
export declare function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code;
|
33
|
+
export declare function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void;
|
34
|
+
export declare function strConcat(c1: Code, c2: Code): Code;
|
35
|
+
export declare function stringify(x: unknown): Code;
|
36
|
+
export declare function safeStringify(x: unknown): string;
|
37
|
+
export declare function getProperty(key: Code | string | number): Code;
|
38
|
+
export declare function getEsmExportName(key: Code | string | number): Code;
|
39
|
+
export declare function regexpCode(rx: RegExp): Code;
|
40
|
+
export {};
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import type { ScopeValueSets, NameValue, ValueScope, ValueScopeName } from './scope';
|
2
|
+
import { _Code, Code, Name } from './code';
|
3
|
+
import { Scope } from './scope';
|
4
|
+
export { _, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code } from "./code";
|
5
|
+
export { Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds } from "./scope";
|
6
|
+
export declare type SafeExpr = Code | number | boolean | null;
|
7
|
+
export declare type Block = Code | (() => void);
|
8
|
+
export declare const operators: {
|
9
|
+
GT: _Code;
|
10
|
+
GTE: _Code;
|
11
|
+
LT: _Code;
|
12
|
+
LTE: _Code;
|
13
|
+
EQ: _Code;
|
14
|
+
NEQ: _Code;
|
15
|
+
NOT: _Code;
|
16
|
+
OR: _Code;
|
17
|
+
AND: _Code;
|
18
|
+
ADD: _Code;
|
19
|
+
};
|
20
|
+
export interface CodeGenOptions {
|
21
|
+
es5?: boolean;
|
22
|
+
lines?: boolean;
|
23
|
+
ownProperties?: boolean;
|
24
|
+
}
|
25
|
+
export declare class CodeGen {
|
26
|
+
readonly _scope: Scope;
|
27
|
+
readonly _extScope: ValueScope;
|
28
|
+
readonly _values: ScopeValueSets;
|
29
|
+
private readonly _nodes;
|
30
|
+
private readonly _blockStarts;
|
31
|
+
private readonly _constants;
|
32
|
+
private readonly opts;
|
33
|
+
constructor(extScope: ValueScope, opts?: CodeGenOptions);
|
34
|
+
toString(): string;
|
35
|
+
name(prefix: string): Name;
|
36
|
+
scopeName(prefix: string): ValueScopeName;
|
37
|
+
scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name;
|
38
|
+
getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined;
|
39
|
+
scopeRefs(scopeName: Name): Code;
|
40
|
+
scopeCode(): Code;
|
41
|
+
private _def;
|
42
|
+
const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name;
|
43
|
+
let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
|
44
|
+
var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
|
45
|
+
assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen;
|
46
|
+
add(lhs: Code, rhs: SafeExpr): CodeGen;
|
47
|
+
code(c: Block | SafeExpr): CodeGen;
|
48
|
+
object(...keyValues: [Name | string, SafeExpr | string][]): _Code;
|
49
|
+
if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen;
|
50
|
+
elseIf(condition: Code | boolean): CodeGen;
|
51
|
+
else(): CodeGen;
|
52
|
+
endIf(): CodeGen;
|
53
|
+
private _for;
|
54
|
+
for(iteration: Code, forBody?: Block): CodeGen;
|
55
|
+
forRange(nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind?: Code): CodeGen;
|
56
|
+
forOf(nameOrPrefix: Name | string, iterable: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
|
57
|
+
forIn(nameOrPrefix: Name | string, obj: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
|
58
|
+
endFor(): CodeGen;
|
59
|
+
label(label: Name): CodeGen;
|
60
|
+
break(label?: Code): CodeGen;
|
61
|
+
return(value: Block | SafeExpr): CodeGen;
|
62
|
+
try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen;
|
63
|
+
throw(error: Code): CodeGen;
|
64
|
+
block(body?: Block, nodeCount?: number): CodeGen;
|
65
|
+
endBlock(nodeCount?: number): CodeGen;
|
66
|
+
func(name: Name, args?: Code, async?: boolean, funcBody?: Block): CodeGen;
|
67
|
+
endFunc(): CodeGen;
|
68
|
+
optimize(n?: number): void;
|
69
|
+
private _leafNode;
|
70
|
+
private _blockNode;
|
71
|
+
private _endBlockNode;
|
72
|
+
private _elseNode;
|
73
|
+
private get _root();
|
74
|
+
private get _currNode();
|
75
|
+
private set _currNode(value);
|
76
|
+
}
|
77
|
+
export declare function not<T extends Code | SafeExpr>(x: T): T;
|
78
|
+
export declare function and(...args: Code[]): Code;
|
79
|
+
export declare function or(...args: Code[]): Code;
|