@nsshunt/stsutils 1.15.19 → 1.15.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,3 +4,4 @@
4
4
  || (${J} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(B,(0,a._)`+${S}`);return;case"boolean":w.elseIf((0,a._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(B,!1).elseIf((0,a._)`${S} === "true" || ${S} === 1`).assign(B,!0);return;case"null":w.elseIf((0,a._)`${S} === "" || ${S} === 0 || ${S} === false`),w.assign(B,null);return;case"array":w.elseIf((0,a._)`${J} === "string" || ${J} === "number"
5
5
  || ${J} === "boolean" || ${S} === null`).assign(B,(0,a._)`[${S}]`)}}}function k({gen:b,parentData:D,parentDataProperty:L},w){b.if((0,a._)`${D} !== undefined`,()=>b.assign((0,a._)`${D}[${L}]`,w))}function R(b,D,L,w=d.Correct){const S=w===d.Correct?a.operators.EQ:a.operators.NEQ;let T;switch(b){case"null":return(0,a._)`${D} ${S} null`;case"array":T=(0,a._)`Array.isArray(${D})`;break;case"object":T=(0,a._)`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":T=J((0,a._)`!(${D} % 1) && !isNaN(${D})`);break;case"number":T=J();break;default:return(0,a._)`typeof ${D} ${S} ${b}`}return w===d.Correct?T:(0,a.not)(T);function J(B=a.nil){return(0,a.and)((0,a._)`typeof ${D} == "number"`,B,L?(0,a._)`isFinite(${D})`:a.nil)}}e.checkDataType=R;function I(b,D,L,w){if(b.length===1)return R(b[0],D,L,w);let S;const T=(0,i.toHash)(b);if(T.array&&T.object){const J=(0,a._)`typeof ${D} != "object"`;S=T.null?J:(0,a._)`!${D} || ${J}`,delete T.null,delete T.array,delete T.object}else S=a.nil;T.number&&delete T.integer;for(const J in T)S=(0,a.and)(S,R(J,D,L,w));return S}e.checkDataTypes=I;const j={message:({schema:b})=>`must be ${b}`,params:({schema:b,schemaValue:D})=>typeof b=="string"?(0,a._)`{type: ${b}}`:(0,a._)`{type: ${D}}`};function h(b){const D=P(b);(0,n.reportError)(D,j)}e.reportTypeError=h;function P(b){const{gen:D,data:L,schema:w}=b,S=(0,i.schemaRefOrVal)(b,w,"type");return{gen:D,keyword:"type",data:L,schema:w.type,schemaCode:S,schemaValue:S,parentSchema:w,params:{},it:b}}}(tr);var rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.assignDefaults=void 0;const St=ne,Xa=ye;function Za(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const a in r)cn(e,a,r[a].default);else t==="array"&&Array.isArray(n)&&n.forEach((a,i)=>cn(e,i,a.default))}rr.assignDefaults=Za;function cn(e,t,r){const{gen:n,compositeRule:a,data:i,opts:d}=e;if(r===void 0)return;const v=(0,St._)`${i}${(0,St.getProperty)(t)}`;if(a){(0,Xa.checkStrictMode)(e,`default is ignored for: ${v}`);return}let g=(0,St._)`${v} === undefined`;d.useDefaults==="empty"&&(g=(0,St._)`${g} || ${v} === null || ${v} === ""`),n.if(g,(0,St._)`${v} = ${(0,St.stringify)(r)}`)}var Ve={},ee={};Object.defineProperty(ee,"__esModule",{value:!0}),ee.validateUnion=ee.validateArray=ee.usePattern=ee.callValidateCode=ee.schemaProperties=ee.allSchemaProperties=ee.noPropertyInData=ee.propertyInData=ee.isOwnProperty=ee.hasPropFunc=ee.reportMissingProp=ee.checkMissingProp=ee.checkReportMissingProp=void 0;const oe=ne,Er=ye,et=Oe,xa=ye;function es(e,t){const{gen:r,data:n,it:a}=e;r.if(Sr(r,n,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,oe._)`${t}`},!0),e.error()})}ee.checkReportMissingProp=es;function ts({gen:e,data:t,it:{opts:r}},n,a){return(0,oe.or)(...n.map(i=>(0,oe.and)(Sr(e,t,i,r.ownProperties),(0,oe._)`${a} = ${i}`)))}ee.checkMissingProp=ts;function rs(e,t){e.setParams({missingProperty:t},!0),e.error()}ee.reportMissingProp=rs;function un(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,oe._)`Object.prototype.hasOwnProperty`})}ee.hasPropFunc=un;function wr(e,t,r){return(0,oe._)`${un(e)}.call(${t}, ${r})`}ee.isOwnProperty=wr;function ns(e,t,r,n){const a=(0,oe._)`${t}${(0,oe.getProperty)(r)} !== undefined`;return n?(0,oe._)`${a} && ${wr(e,t,r)}`:a}ee.propertyInData=ns;function Sr(e,t,r,n){const a=(0,oe._)`${t}${(0,oe.getProperty)(r)} === undefined`;return n?(0,oe.or)(a,(0,oe.not)(wr(e,t,r))):a}ee.noPropertyInData=Sr;function ln(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ee.allSchemaProperties=ln;function as(e,t){return ln(t).filter(r=>!(0,Er.alwaysValidSchema)(e,t[r]))}ee.schemaProperties=as;function ss({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:i},it:d},v,g,p){const f=p?(0,oe._)`${e}, ${t}, ${n}${a}`:t,_=[[et.default.instancePath,(0,oe.strConcat)(et.default.instancePath,i)],[et.default.parentData,d.parentData],[et.default.parentDataProperty,d.parentDataProperty],[et.default.rootData,et.default.rootData]];d.opts.dynamicRef&&_.push([et.default.dynamicAnchors,et.default.dynamicAnchors]);const C=(0,oe._)`${f}, ${r.object(..._)}`;return g!==oe.nil?(0,oe._)`${v}.call(${g}, ${C})`:(0,oe._)`${v}(${C})`}ee.callValidateCode=ss;const os=(0,oe._)`new RegExp`;function is({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:a}=t.code,i=a(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,oe._)`${a.code==="new RegExp"?os:(0,xa.useFunc)(e,a)}(${r}, ${n})`})}ee.usePattern=is;function cs(e){const{gen:t,data:r,keyword:n,it:a}=e,i=t.name("valid");if(a.allErrors){const v=t.let("valid",!0);return d(()=>t.assign(v,!1)),v}return t.var(i,!0),d(()=>t.break()),i;function d(v){const g=t.const("len",(0,oe._)`${r}.length`);t.forRange("i",0,g,p=>{e.subschema({keyword:n,dataProp:p,dataPropType:Er.Type.Num},i),t.if((0,oe.not)(i),v)})}}ee.validateArray=cs;function us(e){const{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(g=>(0,Er.alwaysValidSchema)(a,g))&&!a.opts.unevaluated)return;const d=t.let("valid",!1),v=t.name("_valid");t.block(()=>r.forEach((g,p)=>{const f=e.subschema({keyword:n,schemaProp:p,compositeRule:!0},v);t.assign(d,(0,oe._)`${d} || ${v}`),e.mergeValidEvaluated(f,v)||t.if((0,oe.not)(d))})),e.result(d,()=>e.reset(),()=>e.error(!0))}ee.validateUnion=us,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.validateKeywordUsage=Ve.validSchemaType=Ve.funcKeywordCode=Ve.macroKeywordCode=void 0;const be=ne,ft=Oe,ls=ee,ds=kt;function fs(e,t){const{gen:r,keyword:n,schema:a,parentSchema:i,it:d}=e,v=t.macro.call(d.self,a,i,d),g=fn(r,n,v);d.opts.validateSchema!==!1&&d.self.validateSchema(v,!0);const p=r.name("valid");e.subschema({schema:v,schemaPath:be.nil,errSchemaPath:`${d.errSchemaPath}/${n}`,topSchemaRef:g,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}Ve.macroKeywordCode=fs;function hs(e,t){var r;const{gen:n,keyword:a,schema:i,parentSchema:d,$data:v,it:g}=e;ms(g,t);const p=!v&&t.compile?t.compile.call(g.self,i,d,g):t.validate,f=fn(n,a,p),_=n.let("valid");e.block$data(_,C),e.ok((r=t.valid)!==null&&r!==void 0?r:_);function C(){if(t.errors===!1)I(),t.modifying&&dn(e),j(()=>e.error());else{const h=t.async?k():R();t.modifying&&dn(e),j(()=>ps(e,h))}}function k(){const h=n.let("ruleErrs",null);return n.try(()=>I((0,be._)`await `),P=>n.assign(_,!1).if((0,be._)`${P} instanceof ${g.ValidationError}`,()=>n.assign(h,(0,be._)`${P}.errors`),()=>n.throw(P))),h}function R(){const h=(0,be._)`${f}.errors`;return n.assign(h,null),I(be.nil),h}function I(h=t.async?(0,be._)`await `:be.nil){const P=g.opts.passContext?ft.default.this:ft.default.self,b=!("compile"in t&&!v||t.schema===!1);n.assign(_,(0,be._)`${h}${(0,ls.callValidateCode)(e,f,P,b)}`,t.modifying)}function j(h){var P;n.if((0,be.not)((P=t.valid)!==null&&P!==void 0?P:_),h)}}Ve.funcKeywordCode=hs;function dn(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,be._)`${n.parentData}[${n.parentDataProperty}]`))}function ps(e,t){const{gen:r}=e;r.if((0,be._)`Array.isArray(${t})`,()=>{r.assign(ft.default.vErrors,(0,be._)`${ft.default.vErrors} === null ? ${t} : ${ft.default.vErrors}.concat(${t})`).assign(ft.default.errors,(0,be._)`${ft.default.vErrors}.length`),(0,ds.extendErrors)(e)},()=>e.error())}function ms({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function fn(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,be.stringify)(r)})}function vs(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Ve.validSchemaType=vs;function _s({schema:e,opts:t,self:r,errSchemaPath:n},a,i){if(Array.isArray(a.keyword)?!a.keyword.includes(i):a.keyword!==i)throw new Error("ajv implementation error");const d=a.dependencies;if(d!=null&&d.some(v=>!Object.prototype.hasOwnProperty.call(e,v)))throw new Error(`parent schema must have dependencies of ${i}: ${d.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[i])){const g=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(g);else throw new Error(g)}}Ve.validateKeywordUsage=_s;var tt={};Object.defineProperty(tt,"__esModule",{value:!0}),tt.extendSubschemaMode=tt.extendSubschemaData=tt.getSubschema=void 0;const Fe=ne,hn=ye;function ys(e,{keyword:t,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:i,topSchemaRef:d}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const v=e.schema[t];return r===void 0?{schema:v,schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:v[r],schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}${(0,Fe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,hn.escapeFragment)(r)}`}}if(n!==void 0){if(a===void 0||i===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}tt.getSubschema=ys;function gs(e,t,{dataProp:r,dataPropType:n,data:a,dataTypes:i,propertyName:d}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=t;if(r!==void 0){const{errorPath:p,dataPathArr:f,opts:_}=t,C=v.let("data",(0,Fe._)`${t.data}${(0,Fe.getProperty)(r)}`,!0);g(C),e.errorPath=(0,Fe.str)`${p}${(0,hn.getErrorPath)(r,n,_.jsPropertySyntax)}`,e.parentDataProperty=(0,Fe._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(a!==void 0){const p=a instanceof Fe.Name?a:v.let("data",a,!0);g(p),d!==void 0&&(e.propertyName=d)}i&&(e.dataTypes=i);function g(p){e.data=p,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,p]}}tt.extendSubschemaData=gs;function $s(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:i}){n!==void 0&&(e.compositeRule=n),a!==void 0&&(e.createErrors=a),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}tt.extendSubschemaMode=$s;var $e={},Es=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,a,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!e(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[a]))return!1;for(a=n;a--!==0;){var d=i[a];if(!e(t[d],r[d]))return!1}return!0}return t!==t&&r!==r},br={},ws={get exports(){return br},set exports(e){br=e}},rt=ws.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};nr(t,n,a,e,"",e)};rt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},rt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},rt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},rt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function nr(e,t,r,n,a,i,d,v,g,p){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,a,i,d,v,g,p);for(var f in n){var _=n[f];if(Array.isArray(_)){if(f in rt.arrayKeywords)for(var C=0;C<_.length;C++)nr(e,t,r,_[C],a+"/"+f+"/"+C,i,a,f,n,C)}else if(f in rt.propsKeywords){if(_&&typeof _=="object")for(var k in _)nr(e,t,r,_[k],a+"/"+f+"/"+Ss(k),i,a,f,n,k)}else(f in rt.keywords||e.allKeys&&!(f in rt.skipKeywords))&&nr(e,t,r,_,a+"/"+f,i,a,f,n)}r(n,a,i,d,v,g,p)}}function Ss(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty($e,"__esModule",{value:!0}),$e.getSchemaRefs=$e.resolveUrl=$e.normalizeId=$e._getFullPath=$e.getFullPath=$e.inlineRef=void 0;const bs=ye,Ps=Es,Ns=br,Rs=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function js(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Pr(e):t?pn(e)<=t:!1}$e.inlineRef=js;const Os=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Pr(e){for(const t in e){if(Os.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Pr)||typeof r=="object"&&Pr(r))return!0}return!1}function pn(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Rs.has(r)&&(typeof e[r]=="object"&&(0,bs.eachItem)(e[r],n=>t+=pn(n)),t===1/0))return 1/0}return t}function mn(e,t="",r){r!==!1&&(t=bt(t));const n=e.parse(t);return vn(e,n)}$e.getFullPath=mn;function vn(e,t){return e.serialize(t).split("#")[0]+"#"}$e._getFullPath=vn;const Cs=/#\/?$/;function bt(e){return e?e.replace(Cs,""):""}$e.normalizeId=bt;function Ds(e,t,r){return r=bt(r),e.resolve(t,r)}$e.resolveUrl=Ds;const Ts=/^[a-z_][-a-z0-9._]*$/i;function Is(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,a=bt(e[r]||t),i={"":a},d=mn(n,a,!1),v={},g=new Set;return Ns(e,{allKeys:!0},(_,C,k,R)=>{if(R===void 0)return;const I=d+C;let j=i[R];typeof _[r]=="string"&&(j=h.call(this,_[r])),P.call(this,_.$anchor),P.call(this,_.$dynamicAnchor),i[C]=j;function h(b){const D=this.opts.uriResolver.resolve;if(b=bt(j?D(j,b):b),g.has(b))throw f(b);g.add(b);let L=this.refs[b];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?p(_,L.schema,b):b!==bt(I)&&(b[0]==="#"?(p(_,v[b],b),v[b]=_):this.refs[b]=I),b}function P(b){if(typeof b=="string"){if(!Ts.test(b))throw new Error(`invalid anchor "${b}"`);h.call(this,`#${b}`)}}}),v;function p(_,C,k){if(C!==void 0&&!Ps(_,C))throw f(k)}function f(_){return new Error(`reference "${_}" resolves to more than one schema`)}}$e.getSchemaRefs=Is,Object.defineProperty(Me,"__esModule",{value:!0}),Me.getData=Me.KeywordCxt=Me.validateFunctionCode=void 0;const _n=wt,yn=tr,Nr=Be,ar=tr,As=rr,Vt=Ve,Rr=tt,F=ne,q=Oe,ks=$e,We=ye,Ft=kt;function Ms(e){if(wn(e)&&(Sn(e),En(e))){zs(e);return}gn(e,()=>(0,_n.topBoolOrEmptySchema)(e))}Me.validateFunctionCode=Ms;function gn({gen:e,validateName:t,schema:r,schemaEnv:n,opts:a},i){a.code.es5?e.func(t,(0,F._)`${q.default.data}, ${q.default.valCxt}`,n.$async,()=>{e.code((0,F._)`"use strict"; ${$n(r,a)}`),Fs(e,a),e.code(i)}):e.func(t,(0,F._)`${q.default.data}, ${Vs(a)}`,n.$async,()=>e.code($n(r,a)).code(i))}function Vs(e){return(0,F._)`{${q.default.instancePath}="", ${q.default.parentData}, ${q.default.parentDataProperty}, ${q.default.rootData}=${q.default.data}${e.dynamicRef?(0,F._)`, ${q.default.dynamicAnchors}={}`:F.nil}}={}`}function Fs(e,t){e.if(q.default.valCxt,()=>{e.var(q.default.instancePath,(0,F._)`${q.default.valCxt}.${q.default.instancePath}`),e.var(q.default.parentData,(0,F._)`${q.default.valCxt}.${q.default.parentData}`),e.var(q.default.parentDataProperty,(0,F._)`${q.default.valCxt}.${q.default.parentDataProperty}`),e.var(q.default.rootData,(0,F._)`${q.default.valCxt}.${q.default.rootData}`),t.dynamicRef&&e.var(q.default.dynamicAnchors,(0,F._)`${q.default.valCxt}.${q.default.dynamicAnchors}`)},()=>{e.var(q.default.instancePath,(0,F._)`""`),e.var(q.default.parentData,(0,F._)`undefined`),e.var(q.default.parentDataProperty,(0,F._)`undefined`),e.var(q.default.rootData,q.default.data),t.dynamicRef&&e.var(q.default.dynamicAnchors,(0,F._)`{}`)})}function zs(e){const{schema:t,opts:r,gen:n}=e;gn(e,()=>{r.$comment&&t.$comment&&Pn(e),qs(e),n.let(q.default.vErrors,null),n.let(q.default.errors,0),r.unevaluated&&Us(e),bn(e),Bs(e)})}function Us(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,F._)`${r}.evaluated`),t.if((0,F._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,F._)`${e.evaluated}.props`,(0,F._)`undefined`)),t.if((0,F._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,F._)`${e.evaluated}.items`,(0,F._)`undefined`))}function $n(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,F._)`/*# sourceURL=${r} */`:F.nil}function Ks(e,t){if(wn(e)&&(Sn(e),En(e))){Ls(e,t);return}(0,_n.boolOrEmptySchema)(e,t)}function En({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function wn(e){return typeof e.schema!="boolean"}function Ls(e,t){const{schema:r,gen:n,opts:a}=e;a.$comment&&r.$comment&&Pn(e),Hs(e),Gs(e);const i=n.const("_errs",q.default.errors);bn(e,i),n.var(t,(0,F._)`${i} === ${q.default.errors}`)}function Sn(e){(0,We.checkUnknownRules)(e),Js(e)}function bn(e,t){if(e.opts.jtd)return Nn(e,[],!1,t);const r=(0,yn.getSchemaTypes)(e.schema),n=(0,yn.coerceAndCheckDataType)(e,r);Nn(e,r,!n,t)}function Js(e){const{schema:t,errSchemaPath:r,opts:n,self:a}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,We.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function qs(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,We.checkStrictMode)(e,"default is ignored in the schema root")}function Hs(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,ks.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Gs(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Pn({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:a}){const i=r.$comment;if(a.$comment===!0)e.code((0,F._)`${q.default.self}.logger.log(${i})`);else if(typeof a.$comment=="function"){const d=(0,F.str)`${n}/$comment`,v=e.scopeValue("root",{ref:t.root});e.code((0,F._)`${q.default.self}.opts.$comment(${i}, ${d}, ${v}.schema)`)}}function Bs(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:a,opts:i}=e;r.$async?t.if((0,F._)`${q.default.errors} === 0`,()=>t.return(q.default.data),()=>t.throw((0,F._)`new ${a}(${q.default.vErrors})`)):(t.assign((0,F._)`${n}.errors`,q.default.vErrors),i.unevaluated&&Ws(e),t.return((0,F._)`${q.default.errors} === 0`))}function Ws({gen:e,evaluated:t,props:r,items:n}){r instanceof F.Name&&e.assign((0,F._)`${t}.props`,r),n instanceof F.Name&&e.assign((0,F._)`${t}.items`,n)}function Nn(e,t,r,n){const{gen:a,schema:i,data:d,allErrors:v,opts:g,self:p}=e,{RULES:f}=p;if(i.$ref&&(g.ignoreKeywordsWithRef||!(0,We.schemaHasRulesButRef)(i,f))){a.block(()=>Cn(e,"$ref",f.all.$ref.definition));return}g.jtd||Qs(e,t),a.block(()=>{for(const C of f.rules)_(C);_(f.post)});function _(C){(0,Nr.shouldUseGroup)(i,C)&&(C.type?(a.if((0,ar.checkDataType)(C.type,d,g.strictNumbers)),Rn(e,C),t.length===1&&t[0]===C.type&&r&&(a.else(),(0,ar.reportTypeError)(e)),a.endIf()):Rn(e,C),v||a.if((0,F._)`${q.default.errors} === ${n||0}`))}}function Rn(e,t){const{gen:r,schema:n,opts:{useDefaults:a}}=e;a&&(0,As.assignDefaults)(e,t.type),r.block(()=>{for(const i of t.rules)(0,Nr.shouldUseRule)(n,i)&&Cn(e,i.keyword,i.definition,t.type)})}function Qs(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Ys(e,t),e.opts.allowUnionTypes||Xs(e,t),Zs(e,e.dataTypes))}function Ys(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{jn(e.dataTypes,r)||jr(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),eo(e,t)}}function Xs(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&jr(e,"use allowUnionTypes to allow union type keyword")}function Zs(e,t){const r=e.self.RULES.all;for(const n in r){const a=r[n];if(typeof a=="object"&&(0,Nr.shouldUseRule)(e.schema,a)){const{type:i}=a.definition;i.length&&!i.some(d=>xs(t,d))&&jr(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function xs(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function jn(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function eo(e,t){const r=[];for(const n of e.dataTypes)jn(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function jr(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,We.checkStrictMode)(e,t,e.opts.strictTypes)}class On{constructor(t,r,n){if((0,Vt.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,We.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Dn(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Vt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",q.default.errors))}result(t,r,n){this.failResult((0,F.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,F.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,F._)`${r} !== undefined && (${(0,F.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ft.reportExtraError:Ft.reportError)(this,this.def.error,r)}$dataError(){(0,Ft.reportError)(this,this.def.$dataError||Ft.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ft.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=F.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=F.nil,r=F.nil){if(!this.$data)return;const{gen:n,schemaCode:a,schemaType:i,def:d}=this;n.if((0,F.or)((0,F._)`${a} === undefined`,r)),t!==F.nil&&n.assign(t,!0),(i.length||d.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==F.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:a,it:i}=this;return(0,F.or)(d(),v());function d(){if(n.length){if(!(r instanceof F.Name))throw new Error("ajv implementation error");const g=Array.isArray(n)?n:[n];return(0,F._)`${(0,ar.checkDataTypes)(g,r,i.opts.strictNumbers,ar.DataType.Wrong)}`}return F.nil}function v(){if(a.validateSchema){const g=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,F._)`!${g}(${r})`}return F.nil}}subschema(t,r){const n=(0,Rr.getSubschema)(this.it,t);(0,Rr.extendSubschemaData)(n,this.it,t),(0,Rr.extendSubschemaMode)(n,t);const a={...this.it,...n,items:void 0,props:void 0};return Ks(a,r),a}mergeEvaluated(t,r){const{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=We.mergeEvaluated.props(a,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=We.mergeEvaluated.items(a,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(t,F.Name)),!0}}Me.KeywordCxt=On;function Cn(e,t,r,n){const a=new On(e,r,t);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Vt.funcKeywordCode)(a,r):"macro"in r?(0,Vt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Vt.funcKeywordCode)(a,r)}const to=/^\/(?:[^~]|~0|~1)*$/,ro=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Dn(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let a,i;if(e==="")return q.default.rootData;if(e[0]==="/"){if(!to.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,i=q.default.rootData}else{const p=ro.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);const f=+p[1];if(a=p[2],a==="#"){if(f>=t)throw new Error(g("property/index",f));return n[t-f]}if(f>t)throw new Error(g("data",f));if(i=r[t-f],!a)return i}let d=i;const v=a.split("/");for(const p of v)p&&(i=(0,F._)`${i}${(0,F.getProperty)((0,We.unescapeJsonPointer)(p))}`,d=(0,F._)`${d} && ${i}`);return d;function g(p,f){return`Cannot access ${p} ${f} levels up, current level is ${t}`}}Me.getData=Dn;var zt={};Object.defineProperty(zt,"__esModule",{value:!0});class no extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}zt.default=no;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});const Or=$e;class ao extends Error{constructor(t,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Or.resolveUrl)(t,r,n),this.missingSchema=(0,Or.normalizeId)((0,Or.getFullPath)(t,this.missingRef))}}nt.default=ao;var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.resolveSchema=we.getCompilingSchema=we.resolveRef=we.compileSchema=we.SchemaEnv=void 0;const Ae=ne,so=zt,ht=Oe,ke=$e,Tn=ye,oo=Me;class sr{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,ke.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}we.SchemaEnv=sr;function Cr(e){const t=In.call(this,e);if(t)return t;const r=(0,ke.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:i}=this.opts,d=new Ae.CodeGen(this.scope,{es5:n,lines:a,ownProperties:i});let v;e.$async&&(v=d.scopeValue("Error",{ref:so.default,code:(0,Ae._)`require("ajv/dist/runtime/validation_error").default`}));const g=d.scopeName("validate");e.validateName=g;const p={gen:d,allErrors:this.opts.allErrors,data:ht.default.data,parentData:ht.default.parentData,parentDataProperty:ht.default.parentDataProperty,dataNames:[ht.default.data],dataPathArr:[Ae.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ae.stringify)(e.schema)}:{ref:e.schema}),validateName:g,ValidationError:v,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Ae.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ae._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(e),(0,oo.validateFunctionCode)(p),d.optimize(this.opts.code.optimize);const _=d.toString();f=`${d.scopeRefs(ht.default.scope)}return ${_}`,this.opts.code.process&&(f=this.opts.code.process(f,e));const k=new Function(`${ht.default.self}`,`${ht.default.scope}`,f)(this,this.scope.get());if(this.scope.value(g,{ref:k}),k.errors=null,k.schema=e.schema,k.schemaEnv=e,e.$async&&(k.$async=!0),this.opts.code.source===!0&&(k.source={validateName:g,validateCode:_,scopeValues:d._values}),this.opts.unevaluated){const{props:R,items:I}=p;k.evaluated={props:R instanceof Ae.Name?void 0:R,items:I instanceof Ae.Name?void 0:I,dynamicProps:R instanceof Ae.Name,dynamicItems:I instanceof Ae.Name},k.source&&(k.source.evaluated=(0,Ae.stringify)(k.evaluated))}return e.validate=k,e}catch(_){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),_}finally{this._compilations.delete(e)}}we.compileSchema=Cr;function io(e,t,r){var n;r=(0,ke.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let i=lo.call(this,e,r);if(i===void 0){const d=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:v}=this.opts;d&&(i=new sr({schema:d,schemaId:v,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=co.call(this,i)}we.resolveRef=io;function co(e){return(0,ke.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Cr.call(this,e)}function In(e){for(const t of this._compilations)if(uo(t,e))return t}we.getCompilingSchema=In;function uo(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function lo(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||or.call(this,e,t)}function or(e,t){const r=this.opts.uriResolver.parse(t),n=(0,ke._getFullPath)(this.opts.uriResolver,r);let a=(0,ke.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===a)return Dr.call(this,r,e);const i=(0,ke.normalizeId)(n),d=this.refs[i]||this.schemas[i];if(typeof d=="string"){const v=or.call(this,e,d);return typeof(v==null?void 0:v.schema)!="object"?void 0:Dr.call(this,r,v)}if(typeof(d==null?void 0:d.schema)=="object"){if(d.validate||Cr.call(this,d),i===(0,ke.normalizeId)(t)){const{schema:v}=d,{schemaId:g}=this.opts,p=v[g];return p&&(a=(0,ke.resolveUrl)(this.opts.uriResolver,a,p)),new sr({schema:v,schemaId:g,root:e,baseId:a})}return Dr.call(this,r,d)}}we.resolveSchema=or;const fo=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Dr(e,{baseId:t,schema:r,root:n}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const v of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const g=r[(0,Tn.unescapeFragment)(v)];if(g===void 0)return;r=g;const p=typeof r=="object"&&r[this.opts.schemaId];!fo.has(v)&&p&&(t=(0,ke.resolveUrl)(this.opts.uriResolver,t,p))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Tn.schemaHasRulesButRef)(r,this.RULES)){const v=(0,ke.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=or.call(this,n,v)}const{schemaId:d}=this.opts;if(i=i||new sr({schema:r,schemaId:d,root:n,baseId:t}),i.schema!==i.root.schema)return i}const ho={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Tr={},ir={},po={get exports(){return ir},set exports(e){ir=e}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(lt,function(r){function n(){for(var c=arguments.length,o=Array(c),l=0;l<c;l++)o[l]=arguments[l];if(o.length>1){o[0]=o[0].slice(0,-1);for(var E=o.length-1,$=1;$<E;++$)o[$]=o[$].slice(1,-1);return o[E]=o[E].slice(1),o.join("")}else return o[0]}function a(c){return"(?:"+c+")"}function i(c){return c===void 0?"undefined":c===null?"null":Object.prototype.toString.call(c).split(" ").pop().split("]").shift().toLowerCase()}function d(c){return c.toUpperCase()}function v(c){return c!=null?c instanceof Array?c:typeof c.length!="number"||c.split||c.setInterval||c.call?[c]:Array.prototype.slice.call(c):[]}function g(c,o){var l=c;if(o)for(var E in o)l[E]=o[E];return l}function p(c){var o="[A-Za-z]",l="[0-9]",E=n(l,"[A-Fa-f]"),$=a(a("%[EFef]"+E+"%"+E+E+"%"+E+E)+"|"+a("%[89A-Fa-f]"+E+"%"+E+E)+"|"+a("%"+E+E)),U="[\\:\\/\\?\\#\\[\\]\\@]",K="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",te=n(U,K),ce=c?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",me=c?"[\\uE000-\\uF8FF]":"[]",Z=n(o,l,"[\\-\\.\\_\\~]",ce);a(o+n(o,l,"[\\+\\-\\.]")+"*"),a(a($+"|"+n(Z,K,"[\\:]"))+"*");var se=a(a("25[0-5]")+"|"+a("2[0-4]"+l)+"|"+a("1"+l+l)+"|"+a("0?[1-9]"+l)+"|0?0?"+l),ve=a(se+"\\."+se+"\\."+se+"\\."+se),H=a(E+"{1,4}"),de=a(a(H+"\\:"+H)+"|"+ve),_e=a(a(H+"\\:")+"{6}"+de),fe=a("\\:\\:"+a(H+"\\:")+"{5}"+de),ut=a(a(H)+"?\\:\\:"+a(H+"\\:")+"{4}"+de),qe=a(a(a(H+"\\:")+"{0,1}"+H)+"?\\:\\:"+a(H+"\\:")+"{3}"+de),He=a(a(a(H+"\\:")+"{0,2}"+H)+"?\\:\\:"+a(H+"\\:")+"{2}"+de),It=a(a(a(H+"\\:")+"{0,3}"+H)+"?\\:\\:"+H+"\\:"+de),$t=a(a(a(H+"\\:")+"{0,4}"+H)+"?\\:\\:"+de),Ie=a(a(a(H+"\\:")+"{0,5}"+H)+"?\\:\\:"+H),Ge=a(a(a(H+"\\:")+"{0,6}"+H)+"?\\:\\:"),Et=a([_e,fe,ut,qe,He,It,$t,Ie,Ge].join("|")),xe=a(a(Z+"|"+$)+"+");a("[vV]"+E+"+\\."+n(Z,K,"[\\:]")+"+"),a(a($+"|"+n(Z,K))+"*");var Zt=a($+"|"+n(Z,K,"[\\:\\@]"));return a(a($+"|"+n(Z,K,"[\\@]"))+"+"),a(a(Zt+"|"+n("[\\/\\?]",me))+"*"),{NOT_SCHEME:new RegExp(n("[^]",o,l,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Z,K),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Z,K),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Z,K),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Z,K),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Z,K,"[\\:\\@\\/\\?]",me),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Z,K,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Z,K),"g"),UNRESERVED:new RegExp(Z,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Z,te),"g"),PCT_ENCODED:new RegExp($,"g"),IPV4ADDRESS:new RegExp("^("+ve+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Et+")"+a(a("\\%25|\\%(?!"+E+"{2})")+"("+xe+")")+"?\\]?$")}}var f=p(!1),_=p(!0),C=function(){function c(o,l){var E=[],$=!0,U=!1,K=void 0;try{for(var te=o[Symbol.iterator](),ce;!($=(ce=te.next()).done)&&(E.push(ce.value),!(l&&E.length===l));$=!0);}catch(me){U=!0,K=me}finally{try{!$&&te.return&&te.return()}finally{if(U)throw K}}return E}return function(o,l){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return c(o,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function(c){if(Array.isArray(c)){for(var o=0,l=Array(c.length);o<c.length;o++)l[o]=c[o];return l}else return Array.from(c)},R=2147483647,I=36,j=1,h=26,P=38,b=700,D=72,L=128,w="-",S=/^xn--/,T=/[^\0-\x7E]/,J=/[\x2E\u3002\uFF0E\uFF61]/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=I-j,Q=Math.floor,re=String.fromCharCode;function G(c){throw new RangeError(B[c])}function le(c,o){for(var l=[],E=c.length;E--;)l[E]=o(c[E]);return l}function he(c,o){var l=c.split("@"),E="";l.length>1&&(E=l[0]+"@",c=l[1]),c=c.replace(J,".");var $=c.split("."),U=le($,o).join(".");return E+U}function ge(c){for(var o=[],l=0,E=c.length;l<E;){var $=c.charCodeAt(l++);if($>=55296&&$<=56319&&l<E){var U=c.charCodeAt(l++);(U&64512)==56320?o.push((($&1023)<<10)+(U&1023)+65536):(o.push($),l--)}else o.push($)}return o}var Se=function(o){return String.fromCodePoint.apply(String,k(o))},ct=function(o){return o-48<10?o-22:o-65<26?o-65:o-97<26?o-97:I},A=function(o,l){return o+22+75*(o<26)-((l!=0)<<5)},m=function(o,l,E){var $=0;for(o=E?Q(o/b):o>>1,o+=Q(o/l);o>ie*h>>1;$+=I)o=Q(o/ie);return Q($+(ie+1)*o/(o+P))},O=function(o){var l=[],E=o.length,$=0,U=L,K=D,te=o.lastIndexOf(w);te<0&&(te=0);for(var ce=0;ce<te;++ce)o.charCodeAt(ce)>=128&&G("not-basic"),l.push(o.charCodeAt(ce));for(var me=te>0?te+1:0;me<E;){for(var Z=$,se=1,ve=I;;ve+=I){me>=E&&G("invalid-input");var H=ct(o.charCodeAt(me++));(H>=I||H>Q((R-$)/se))&&G("overflow"),$+=H*se;var de=ve<=K?j:ve>=K+h?h:ve-K;if(H<de)break;var _e=I-de;se>Q(R/_e)&&G("overflow"),se*=_e}var fe=l.length+1;K=m($-Z,fe,Z==0),Q($/fe)>R-U&&G("overflow"),U+=Q($/fe),$%=fe,l.splice($++,0,U)}return String.fromCodePoint.apply(String,l)},y=function(o){var l=[];o=ge(o);var E=o.length,$=L,U=0,K=D,te=!0,ce=!1,me=void 0;try{for(var Z=o[Symbol.iterator](),se;!(te=(se=Z.next()).done);te=!0){var ve=se.value;ve<128&&l.push(re(ve))}}catch(xt){ce=!0,me=xt}finally{try{!te&&Z.return&&Z.return()}finally{if(ce)throw me}}var H=l.length,de=H;for(H&&l.push(w);de<E;){var _e=R,fe=!0,ut=!1,qe=void 0;try{for(var He=o[Symbol.iterator](),It;!(fe=(It=He.next()).done);fe=!0){var $t=It.value;$t>=$&&$t<_e&&(_e=$t)}}catch(xt){ut=!0,qe=xt}finally{try{!fe&&He.return&&He.return()}finally{if(ut)throw qe}}var Ie=de+1;_e-$>Q((R-U)/Ie)&&G("overflow"),U+=(_e-$)*Ie,$=_e;var Ge=!0,Et=!1,xe=void 0;try{for(var Zt=o[Symbol.iterator](),Ia;!(Ge=(Ia=Zt.next()).done);Ge=!0){var Aa=Ia.value;if(Aa<$&&++U>R&&G("overflow"),Aa==$){for(var _r=U,yr=I;;yr+=I){var gr=yr<=K?j:yr>=K+h?h:yr-K;if(_r<gr)break;var ka=_r-gr,Ma=I-gr;l.push(re(A(gr+ka%Ma,0))),_r=Q(ka/Ma)}l.push(re(A(_r,0))),K=m(U,Ie,de==H),U=0,++de}}}catch(xt){Et=!0,xe=xt}finally{try{!Ge&&Zt.return&&Zt.return()}finally{if(Et)throw xe}}++U,++$}return l.join("")},s=function(o){return he(o,function(l){return S.test(l)?O(l.slice(4).toLowerCase()):l})},u=function(o){return he(o,function(l){return T.test(l)?"xn--"+y(l):l})},N={version:"2.1.0",ucs2:{decode:ge,encode:Se},decode:O,encode:y,toASCII:u,toUnicode:s},M={};function V(c){var o=c.charCodeAt(0),l=void 0;return o<16?l="%0"+o.toString(16).toUpperCase():o<128?l="%"+o.toString(16).toUpperCase():o<2048?l="%"+(o>>6|192).toString(16).toUpperCase()+"%"+(o&63|128).toString(16).toUpperCase():l="%"+(o>>12|224).toString(16).toUpperCase()+"%"+(o>>6&63|128).toString(16).toUpperCase()+"%"+(o&63|128).toString(16).toUpperCase(),l}function X(c){for(var o="",l=0,E=c.length;l<E;){var $=parseInt(c.substr(l+1,2),16);if($<128)o+=String.fromCharCode($),l+=3;else if($>=194&&$<224){if(E-l>=6){var U=parseInt(c.substr(l+4,2),16);o+=String.fromCharCode(($&31)<<6|U&63)}else o+=c.substr(l,6);l+=6}else if($>=224){if(E-l>=9){var K=parseInt(c.substr(l+4,2),16),te=parseInt(c.substr(l+7,2),16);o+=String.fromCharCode(($&15)<<12|(K&63)<<6|te&63)}else o+=c.substr(l,9);l+=9}else o+=c.substr(l,3),l+=3}return o}function x(c,o){function l(E){var $=X(E);return $.match(o.UNRESERVED)?$:E}return c.scheme&&(c.scheme=String(c.scheme).replace(o.PCT_ENCODED,l).toLowerCase().replace(o.NOT_SCHEME,"")),c.userinfo!==void 0&&(c.userinfo=String(c.userinfo).replace(o.PCT_ENCODED,l).replace(o.NOT_USERINFO,V).replace(o.PCT_ENCODED,d)),c.host!==void 0&&(c.host=String(c.host).replace(o.PCT_ENCODED,l).toLowerCase().replace(o.NOT_HOST,V).replace(o.PCT_ENCODED,d)),c.path!==void 0&&(c.path=String(c.path).replace(o.PCT_ENCODED,l).replace(c.scheme?o.NOT_PATH:o.NOT_PATH_NOSCHEME,V).replace(o.PCT_ENCODED,d)),c.query!==void 0&&(c.query=String(c.query).replace(o.PCT_ENCODED,l).replace(o.NOT_QUERY,V).replace(o.PCT_ENCODED,d)),c.fragment!==void 0&&(c.fragment=String(c.fragment).replace(o.PCT_ENCODED,l).replace(o.NOT_FRAGMENT,V).replace(o.PCT_ENCODED,d)),c}function pe(c){return c.replace(/^0*(.*)/,"$1")||"0"}function Ke(c,o){var l=c.match(o.IPV4ADDRESS)||[],E=C(l,2),$=E[1];return $?$.split(".").map(pe).join("."):c}function Rt(c,o){var l=c.match(o.IPV6ADDRESS)||[],E=C(l,3),$=E[1],U=E[2];if($){for(var K=$.toLowerCase().split("::").reverse(),te=C(K,2),ce=te[0],me=te[1],Z=me?me.split(":").map(pe):[],se=ce.split(":").map(pe),ve=o.IPV4ADDRESS.test(se[se.length-1]),H=ve?7:8,de=se.length-H,_e=Array(H),fe=0;fe<H;++fe)_e[fe]=Z[fe]||se[de+fe]||"";ve&&(_e[H-1]=Ke(_e[H-1],o));var ut=_e.reduce(function(Ie,Ge,Et){if(!Ge||Ge==="0"){var xe=Ie[Ie.length-1];xe&&xe.index+xe.length===Et?xe.length++:Ie.push({index:Et,length:1})}return Ie},[]),qe=ut.sort(function(Ie,Ge){return Ge.length-Ie.length})[0],He=void 0;if(qe&&qe.length>1){var It=_e.slice(0,qe.index),$t=_e.slice(qe.index+qe.length);He=It.join(":")+"::"+$t.join(":")}else He=_e.join(":");return U&&(He+="%"+U),He}else return c}var Ht=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Gt="".match(/(){0}/)[1]===void 0;function je(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l={},E=o.iri!==!1?_:f;o.reference==="suffix"&&(c=(o.scheme?o.scheme+":":"")+"//"+c);var $=c.match(Ht);if($){Gt?(l.scheme=$[1],l.userinfo=$[3],l.host=$[4],l.port=parseInt($[5],10),l.path=$[6]||"",l.query=$[7],l.fragment=$[8],isNaN(l.port)&&(l.port=$[5])):(l.scheme=$[1]||void 0,l.userinfo=c.indexOf("@")!==-1?$[3]:void 0,l.host=c.indexOf("//")!==-1?$[4]:void 0,l.port=parseInt($[5],10),l.path=$[6]||"",l.query=c.indexOf("?")!==-1?$[7]:void 0,l.fragment=c.indexOf("#")!==-1?$[8]:void 0,isNaN(l.port)&&(l.port=c.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),l.host&&(l.host=Rt(Ke(l.host,E),E)),l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&!l.path&&l.query===void 0?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",o.reference&&o.reference!=="suffix"&&o.reference!==l.reference&&(l.error=l.error||"URI is not a "+o.reference+" reference.");var U=M[(o.scheme||l.scheme||"").toLowerCase()];if(!o.unicodeSupport&&(!U||!U.unicodeSupport)){if(l.host&&(o.domainHost||U&&U.domainHost))try{l.host=N.toASCII(l.host.replace(E.PCT_ENCODED,X).toLowerCase())}catch(K){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+K}x(l,f)}else x(l,E);U&&U.parse&&U.parse(l,o)}else l.error=l.error||"URI can not be parsed.";return l}function Bt(c,o){var l=o.iri!==!1?_:f,E=[];return c.userinfo!==void 0&&(E.push(c.userinfo),E.push("@")),c.host!==void 0&&E.push(Rt(Ke(String(c.host),l),l).replace(l.IPV6ADDRESS,function($,U,K){return"["+U+(K?"%25"+K:"")+"]"})),(typeof c.port=="number"||typeof c.port=="string")&&(E.push(":"),E.push(String(c.port))),E.length?E.join(""):void 0}var jt=/^\.\.?\//,Ot=/^\/\.(\/|$)/,Ct=/^\/\.\.(\/|$)/,Wt=/^\/?(?:.|\n)*?(?=\/|$)/;function Le(c){for(var o=[];c.length;)if(c.match(jt))c=c.replace(jt,"");else if(c.match(Ot))c=c.replace(Ot,"/");else if(c.match(Ct))c=c.replace(Ct,"/"),o.pop();else if(c==="."||c==="..")c="";else{var l=c.match(Wt);if(l){var E=l[0];c=c.slice(E.length),o.push(E)}else throw new Error("Unexpected dot segment condition")}return o.join("")}function Ne(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.iri?_:f,E=[],$=M[(o.scheme||c.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(c,o),c.host&&!l.IPV6ADDRESS.test(c.host)){if(o.domainHost||$&&$.domainHost)try{c.host=o.iri?N.toUnicode(c.host):N.toASCII(c.host.replace(l.PCT_ENCODED,X).toLowerCase())}catch(te){c.error=c.error||"Host's domain name can not be converted to "+(o.iri?"Unicode":"ASCII")+" via punycode: "+te}}x(c,l),o.reference!=="suffix"&&c.scheme&&(E.push(c.scheme),E.push(":"));var U=Bt(c,o);if(U!==void 0&&(o.reference!=="suffix"&&E.push("//"),E.push(U),c.path&&c.path.charAt(0)!=="/"&&E.push("/")),c.path!==void 0){var K=c.path;!o.absolutePath&&(!$||!$.absolutePath)&&(K=Le(K)),U===void 0&&(K=K.replace(/^\/\//,"/%2F")),E.push(K)}return c.query!==void 0&&(E.push("?"),E.push(c.query)),c.fragment!==void 0&&(E.push("#"),E.push(c.fragment)),E.join("")}function Dt(c,o){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=arguments[3],$={};return E||(c=je(Ne(c,l),l),o=je(Ne(o,l),l)),l=l||{},!l.tolerant&&o.scheme?($.scheme=o.scheme,$.userinfo=o.userinfo,$.host=o.host,$.port=o.port,$.path=Le(o.path||""),$.query=o.query):(o.userinfo!==void 0||o.host!==void 0||o.port!==void 0?($.userinfo=o.userinfo,$.host=o.host,$.port=o.port,$.path=Le(o.path||""),$.query=o.query):(o.path?(o.path.charAt(0)==="/"?$.path=Le(o.path):((c.userinfo!==void 0||c.host!==void 0||c.port!==void 0)&&!c.path?$.path="/"+o.path:c.path?$.path=c.path.slice(0,c.path.lastIndexOf("/")+1)+o.path:$.path=o.path,$.path=Le($.path)),$.query=o.query):($.path=c.path,o.query!==void 0?$.query=o.query:$.query=c.query),$.userinfo=c.userinfo,$.host=c.host,$.port=c.port),$.scheme=c.scheme),$.fragment=o.fragment,$}function Qt(c,o,l){var E=g({scheme:"null"},l);return Ne(Dt(je(c,E),je(o,E),E,!0),E)}function yt(c,o){return typeof c=="string"?c=Ne(je(c,o),o):i(c)==="object"&&(c=je(Ne(c,o),o)),c}function Yt(c,o,l){return typeof c=="string"?c=Ne(je(c,l),l):i(c)==="object"&&(c=Ne(c,l)),typeof o=="string"?o=Ne(je(o,l),l):i(o)==="object"&&(o=Ne(o,l)),c===o}function vr(c,o){return c&&c.toString().replace(!o||!o.iri?f.ESCAPE:_.ESCAPE,V)}function Te(c,o){return c&&c.toString().replace(!o||!o.iri?f.PCT_ENCODED:_.PCT_ENCODED,X)}var gt={scheme:"http",domainHost:!0,parse:function(o,l){return o.host||(o.error=o.error||"HTTP URIs must have a host."),o},serialize:function(o,l){var E=String(o.scheme).toLowerCase()==="https";return(o.port===(E?443:80)||o.port==="")&&(o.port=void 0),o.path||(o.path="/"),o}},Pa={scheme:"https",domainHost:gt.domainHost,parse:gt.parse,serialize:gt.serialize};function Na(c){return typeof c.secure=="boolean"?c.secure:String(c.scheme).toLowerCase()==="wss"}var Xt={scheme:"ws",domainHost:!0,parse:function(o,l){var E=o;return E.secure=Na(E),E.resourceName=(E.path||"/")+(E.query?"?"+E.query:""),E.path=void 0,E.query=void 0,E},serialize:function(o,l){if((o.port===(Na(o)?443:80)||o.port==="")&&(o.port=void 0),typeof o.secure=="boolean"&&(o.scheme=o.secure?"wss":"ws",o.secure=void 0),o.resourceName){var E=o.resourceName.split("?"),$=C(E,2),U=$[0],K=$[1];o.path=U&&U!=="/"?U:void 0,o.query=K,o.resourceName=void 0}return o.fragment=void 0,o}},Ra={scheme:"wss",domainHost:Xt.domainHost,parse:Xt.parse,serialize:Xt.serialize},rc={},ja="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Je="[0-9A-Fa-f]",nc=a(a("%[EFef]"+Je+"%"+Je+Je+"%"+Je+Je)+"|"+a("%[89A-Fa-f]"+Je+"%"+Je+Je)+"|"+a("%"+Je+Je)),ac="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",sc="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",oc=n(sc,'[\\"\\\\]'),ic="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",cc=new RegExp(ja,"g"),Tt=new RegExp(nc,"g"),uc=new RegExp(n("[^]",ac,"[\\.]",'[\\"]',oc),"g"),Oa=new RegExp(n("[^]",ja,ic),"g"),lc=Oa;function rn(c){var o=X(c);return o.match(cc)?o:c}var Ca={scheme:"mailto",parse:function(o,l){var E=o,$=E.to=E.path?E.path.split(","):[];if(E.path=void 0,E.query){for(var U=!1,K={},te=E.query.split("&"),ce=0,me=te.length;ce<me;++ce){var Z=te[ce].split("=");switch(Z[0]){case"to":for(var se=Z[1].split(","),ve=0,H=se.length;ve<H;++ve)$.push(se[ve]);break;case"subject":E.subject=Te(Z[1],l);break;case"body":E.body=Te(Z[1],l);break;default:U=!0,K[Te(Z[0],l)]=Te(Z[1],l);break}}U&&(E.headers=K)}E.query=void 0;for(var de=0,_e=$.length;de<_e;++de){var fe=$[de].split("@");if(fe[0]=Te(fe[0]),l.unicodeSupport)fe[1]=Te(fe[1],l).toLowerCase();else try{fe[1]=N.toASCII(Te(fe[1],l).toLowerCase())}catch(ut){E.error=E.error||"Email address's domain name can not be converted to ASCII via punycode: "+ut}$[de]=fe.join("@")}return E},serialize:function(o,l){var E=o,$=v(o.to);if($){for(var U=0,K=$.length;U<K;++U){var te=String($[U]),ce=te.lastIndexOf("@"),me=te.slice(0,ce).replace(Tt,rn).replace(Tt,d).replace(uc,V),Z=te.slice(ce+1);try{Z=l.iri?N.toUnicode(Z):N.toASCII(Te(Z,l).toLowerCase())}catch(de){E.error=E.error||"Email address's domain name can not be converted to "+(l.iri?"Unicode":"ASCII")+" via punycode: "+de}$[U]=me+"@"+Z}E.path=$.join(",")}var se=o.headers=o.headers||{};o.subject&&(se.subject=o.subject),o.body&&(se.body=o.body);var ve=[];for(var H in se)se[H]!==rc[H]&&ve.push(H.replace(Tt,rn).replace(Tt,d).replace(Oa,V)+"="+se[H].replace(Tt,rn).replace(Tt,d).replace(lc,V));return ve.length&&(E.query=ve.join("&")),E}},dc=/^([^\:]+)\:(.*)/,Da={scheme:"urn",parse:function(o,l){var E=o.path&&o.path.match(dc),$=o;if(E){var U=l.scheme||$.scheme||"urn",K=E[1].toLowerCase(),te=E[2],ce=U+":"+(l.nid||K),me=M[ce];$.nid=K,$.nss=te,$.path=void 0,me&&($=me.parse($,l))}else $.error=$.error||"URN can not be parsed.";return $},serialize:function(o,l){var E=l.scheme||o.scheme||"urn",$=o.nid,U=E+":"+(l.nid||$),K=M[U];K&&(o=K.serialize(o,l));var te=o,ce=o.nss;return te.path=($||l.nid)+":"+ce,te}},fc=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ta={scheme:"urn:uuid",parse:function(o,l){var E=o;return E.uuid=E.nss,E.nss=void 0,!l.tolerant&&(!E.uuid||!E.uuid.match(fc))&&(E.error=E.error||"UUID is not valid."),E},serialize:function(o,l){var E=o;return E.nss=(o.uuid||"").toLowerCase(),E}};M[gt.scheme]=gt,M[Pa.scheme]=Pa,M[Xt.scheme]=Xt,M[Ra.scheme]=Ra,M[Ca.scheme]=Ca,M[Da.scheme]=Da,M[Ta.scheme]=Ta,r.SCHEMES=M,r.pctEncChar=V,r.pctDecChars=X,r.parse=je,r.removeDotSegments=Le,r.serialize=Ne,r.resolveComponents=Dt,r.resolve=Qt,r.normalize=yt,r.equal=Yt,r.escapeComponent=vr,r.unescapeComponent=Te,Object.defineProperty(r,"__esModule",{value:!0})})})(po,ir),Object.defineProperty(Tr,"__esModule",{value:!0});const An=ir;An.code='require("ajv/dist/runtime/uri").default',Tr.default=An,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Me;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ne;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=zt,a=nt,i=dt,d=we,v=ne,g=$e,p=tr,f=ye,_=ho,C=Tr,k=(A,m)=>new RegExp(A,m);k.code="new RegExp";const R=["removeAdditional","useDefaults","coerceTypes"],I=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),j={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},P=200;function b(A){var m,O,y,s,u,N,M,V,X,x,pe,Ke,Rt,Ht,Gt,je,Bt,jt,Ot,Ct,Wt,Le,Ne,Dt,Qt;const yt=A.strict,Yt=(m=A.code)===null||m===void 0?void 0:m.optimize,vr=Yt===!0||Yt===void 0?1:Yt||0,Te=(y=(O=A.code)===null||O===void 0?void 0:O.regExp)!==null&&y!==void 0?y:k,gt=(s=A.uriResolver)!==null&&s!==void 0?s:C.default;return{strictSchema:(N=(u=A.strictSchema)!==null&&u!==void 0?u:yt)!==null&&N!==void 0?N:!0,strictNumbers:(V=(M=A.strictNumbers)!==null&&M!==void 0?M:yt)!==null&&V!==void 0?V:!0,strictTypes:(x=(X=A.strictTypes)!==null&&X!==void 0?X:yt)!==null&&x!==void 0?x:"log",strictTuples:(Ke=(pe=A.strictTuples)!==null&&pe!==void 0?pe:yt)!==null&&Ke!==void 0?Ke:"log",strictRequired:(Ht=(Rt=A.strictRequired)!==null&&Rt!==void 0?Rt:yt)!==null&&Ht!==void 0?Ht:!1,code:A.code?{...A.code,optimize:vr,regExp:Te}:{optimize:vr,regExp:Te},loopRequired:(Gt=A.loopRequired)!==null&&Gt!==void 0?Gt:P,loopEnum:(je=A.loopEnum)!==null&&je!==void 0?je:P,meta:(Bt=A.meta)!==null&&Bt!==void 0?Bt:!0,messages:(jt=A.messages)!==null&&jt!==void 0?jt:!0,inlineRefs:(Ot=A.inlineRefs)!==null&&Ot!==void 0?Ot:!0,schemaId:(Ct=A.schemaId)!==null&&Ct!==void 0?Ct:"$id",addUsedSchema:(Wt=A.addUsedSchema)!==null&&Wt!==void 0?Wt:!0,validateSchema:(Le=A.validateSchema)!==null&&Le!==void 0?Le:!0,validateFormats:(Ne=A.validateFormats)!==null&&Ne!==void 0?Ne:!0,unicodeRegExp:(Dt=A.unicodeRegExp)!==null&&Dt!==void 0?Dt:!0,int32range:(Qt=A.int32range)!==null&&Qt!==void 0?Qt:!0,uriResolver:gt}}class D{constructor(m={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,m=this.opts={...m,...b(m)};const{es5:O,lines:y}=this.opts.code;this.scope=new v.ValueScope({scope:{},prefixes:I,es5:O,lines:y}),this.logger=Q(m.logger);const s=m.validateFormats;m.validateFormats=!1,this.RULES=(0,i.getRules)(),L.call(this,j,m,"NOT SUPPORTED"),L.call(this,h,m,"DEPRECATED","warn"),this._metaOpts=B.call(this),m.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),m.keywords&&J.call(this,m.keywords),typeof m.meta=="object"&&this.addMetaSchema(m.meta),S.call(this),m.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:m,meta:O,schemaId:y}=this.opts;let s=_;y==="id"&&(s={..._},s.id=s.$id,delete s.$id),O&&m&&this.addMetaSchema(s,s[y],!1)}defaultMeta(){const{meta:m,schemaId:O}=this.opts;return this.opts.defaultMeta=typeof m=="object"?m[O]||m:void 0}validate(m,O){let y;if(typeof m=="string"){if(y=this.getSchema(m),!y)throw new Error(`no schema with key or ref "${m}"`)}else y=this.compile(m);const s=y(O);return"$async"in y||(this.errors=y.errors),s}compile(m,O){const y=this._addSchema(m,O);return y.validate||this._compileSchemaEnv(y)}compileAsync(m,O){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:y}=this.opts;return s.call(this,m,O);async function s(x,pe){await u.call(this,x.$schema);const Ke=this._addSchema(x,pe);return Ke.validate||N.call(this,Ke)}async function u(x){x&&!this.getSchema(x)&&await s.call(this,{$ref:x},!0)}async function N(x){try{return this._compileSchemaEnv(x)}catch(pe){if(!(pe instanceof a.default))throw pe;return M.call(this,pe),await V.call(this,pe.missingSchema),N.call(this,x)}}function M({missingSchema:x,missingRef:pe}){if(this.refs[x])throw new Error(`AnySchema ${x} is loaded but ${pe} cannot be resolved`)}async function V(x){const pe=await X.call(this,x);this.refs[x]||await u.call(this,pe.$schema),this.refs[x]||this.addSchema(pe,x,O)}async function X(x){const pe=this._loading[x];if(pe)return pe;try{return await(this._loading[x]=y(x))}finally{delete this._loading[x]}}}addSchema(m,O,y,s=this.opts.validateSchema){if(Array.isArray(m)){for(const N of m)this.addSchema(N,void 0,y,s);return this}let u;if(typeof m=="object"){const{schemaId:N}=this.opts;if(u=m[N],u!==void 0&&typeof u!="string")throw new Error(`schema ${N} must be string`)}return O=(0,g.normalizeId)(O||u),this._checkUnique(O),this.schemas[O]=this._addSchema(m,y,O,s,!0),this}addMetaSchema(m,O,y=this.opts.validateSchema){return this.addSchema(m,O,!0,y),this}validateSchema(m,O){if(typeof m=="boolean")return!0;let y;if(y=m.$schema,y!==void 0&&typeof y!="string")throw new Error("$schema must be a string");if(y=y||this.opts.defaultMeta||this.defaultMeta(),!y)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(y,m);if(!s&&O){const u="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(u);else throw new Error(u)}return s}getSchema(m){let O;for(;typeof(O=w.call(this,m))=="string";)m=O;if(O===void 0){const{schemaId:y}=this.opts,s=new d.SchemaEnv({schema:{},schemaId:y});if(O=d.resolveSchema.call(this,s,m),!O)return;this.refs[m]=O}return O.validate||this._compileSchemaEnv(O)}removeSchema(m){if(m instanceof RegExp)return this._removeAllSchemas(this.schemas,m),this._removeAllSchemas(this.refs,m),this;switch(typeof m){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const O=w.call(this,m);return typeof O=="object"&&this._cache.delete(O.schema),delete this.schemas[m],delete this.refs[m],this}case"object":{const O=m;this._cache.delete(O);let y=m[this.opts.schemaId];return y&&(y=(0,g.normalizeId)(y),delete this.schemas[y],delete this.refs[y]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(m){for(const O of m)this.addKeyword(O);return this}addKeyword(m,O){let y;if(typeof m=="string")y=m,typeof O=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),O.keyword=y);else if(typeof m=="object"&&O===void 0){if(O=m,y=O.keyword,Array.isArray(y)&&!y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,y,O),!O)return(0,f.eachItem)(y,u=>le.call(this,u)),this;ge.call(this,O);const s={...O,type:(0,p.getJSONTypes)(O.type),schemaType:(0,p.getJSONTypes)(O.schemaType)};return(0,f.eachItem)(y,s.type.length===0?u=>le.call(this,u,s):u=>s.type.forEach(N=>le.call(this,u,s,N))),this}getKeyword(m){const O=this.RULES.all[m];return typeof O=="object"?O.definition:!!O}removeKeyword(m){const{RULES:O}=this;delete O.keywords[m],delete O.all[m];for(const y of O.rules){const s=y.rules.findIndex(u=>u.keyword===m);s>=0&&y.rules.splice(s,1)}return this}addFormat(m,O){return typeof O=="string"&&(O=new RegExp(O)),this.formats[m]=O,this}errorsText(m=this.errors,{separator:O=", ",dataVar:y="data"}={}){return!m||m.length===0?"No errors":m.map(s=>`${y}${s.instancePath} ${s.message}`).reduce((s,u)=>s+O+u)}$dataMetaSchema(m,O){const y=this.RULES.all;m=JSON.parse(JSON.stringify(m));for(const s of O){const u=s.split("/").slice(1);let N=m;for(const M of u)N=N[M];for(const M in y){const V=y[M];if(typeof V!="object")continue;const{$data:X}=V.definition,x=N[M];X&&x&&(N[M]=ct(x))}}return m}_removeAllSchemas(m,O){for(const y in m){const s=m[y];(!O||O.test(y))&&(typeof s=="string"?delete m[y]:s&&!s.meta&&(this._cache.delete(s.schema),delete m[y]))}}_addSchema(m,O,y,s=this.opts.validateSchema,u=this.opts.addUsedSchema){let N;const{schemaId:M}=this.opts;if(typeof m=="object")N=m[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof m!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(m);if(V!==void 0)return V;y=(0,g.normalizeId)(N||y);const X=g.getSchemaRefs.call(this,m,y);return V=new d.SchemaEnv({schema:m,schemaId:M,meta:O,baseId:y,localRefs:X}),this._cache.set(V.schema,V),u&&!y.startsWith("#")&&(y&&this._checkUnique(y),this.refs[y]=V),s&&this.validateSchema(m,!0),V}_checkUnique(m){if(this.schemas[m]||this.refs[m])throw new Error(`schema with key or id "${m}" already exists`)}_compileSchemaEnv(m){if(m.meta?this._compileMetaSchema(m):d.compileSchema.call(this,m),!m.validate)throw new Error("ajv implementation error");return m.validate}_compileMetaSchema(m){const O=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,m)}finally{this.opts=O}}}e.default=D,D.ValidationError=n.default,D.MissingRefError=a.default;function L(A,m,O,y="error"){for(const s in A){const u=s;u in m&&this.logger[y](`${O}: option ${s}. ${A[u]}`)}}function w(A){return A=(0,g.normalizeId)(A),this.schemas[A]||this.refs[A]}function S(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const m in A)this.addSchema(A[m],m)}function T(){for(const A in this.opts.formats){const m=this.opts.formats[A];m&&this.addFormat(A,m)}}function J(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const m in A){const O=A[m];O.keyword||(O.keyword=m),this.addKeyword(O)}}function B(){const A={...this.opts};for(const m of R)delete A[m];return A}const ie={log(){},warn(){},error(){}};function Q(A){if(A===!1)return ie;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const re=/^[a-z_$][a-z0-9_$:-]*$/i;function G(A,m){const{RULES:O}=this;if((0,f.eachItem)(A,y=>{if(O.keywords[y])throw new Error(`Keyword ${y} is already defined`);if(!re.test(y))throw new Error(`Keyword ${y} has invalid name`)}),!!m&&m.$data&&!("code"in m||"validate"in m))throw new Error('$data keyword must have "code" or "validate" function')}function le(A,m,O){var y;const s=m==null?void 0:m.post;if(O&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:u}=this;let N=s?u.post:u.rules.find(({type:V})=>V===O);if(N||(N={type:O,rules:[]},u.rules.push(N)),u.keywords[A]=!0,!m)return;const M={keyword:A,definition:{...m,type:(0,p.getJSONTypes)(m.type),schemaType:(0,p.getJSONTypes)(m.schemaType)}};m.before?he.call(this,N,M,m.before):N.rules.push(M),u.all[A]=M,(y=m.implements)===null||y===void 0||y.forEach(V=>this.addKeyword(V))}function he(A,m,O){const y=A.rules.findIndex(s=>s.keyword===O);y>=0?A.rules.splice(y,0,m):(A.rules.push(m),this.logger.warn(`rule ${O} is not defined`))}function ge(A){let{metaSchema:m}=A;m!==void 0&&(A.$data&&this.opts.$data&&(m=ct(m)),A.validateSchema=this.compile(m,!0))}const Se={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ct(A){return{anyOf:[A,Se]}}}(nn);var Ir={},pt={},mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.callRef=mt.getValidate=void 0;const mo=nt,kn=ee,Pe=ne,Pt=Oe,Mn=we,cr=ye,vo={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:a,schemaEnv:i,validateName:d,opts:v,self:g}=n,{root:p}=i;if((r==="#"||r==="#/")&&a===p.baseId)return _();const f=Mn.resolveRef.call(g,p,a,r);if(f===void 0)throw new mo.default(n.opts.uriResolver,a,r);if(f instanceof Mn.SchemaEnv)return C(f);return k(f);function _(){if(i===p)return ur(e,d,i,i.$async);const R=t.scopeValue("root",{ref:p});return ur(e,(0,Pe._)`${R}.validate`,p,p.$async)}function C(R){const I=Vn(e,R);ur(e,I,R,R.$async)}function k(R){const I=t.scopeValue("schema",v.code.source===!0?{ref:R,code:(0,Pe.stringify)(R)}:{ref:R}),j=t.name("valid"),h=e.subschema({schema:R,dataTypes:[],schemaPath:Pe.nil,topSchemaRef:I,errSchemaPath:r},j);e.mergeEvaluated(h),e.ok(j)}}};function Vn(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Pe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}mt.getValidate=Vn;function ur(e,t,r,n){const{gen:a,it:i}=e,{allErrors:d,schemaEnv:v,opts:g}=i,p=g.passContext?Pt.default.this:Pe.nil;n?f():_();function f(){if(!v.$async)throw new Error("async schema referenced by sync schema");const R=a.let("valid");a.try(()=>{a.code((0,Pe._)`await ${(0,kn.callValidateCode)(e,t,p)}`),k(t),d||a.assign(R,!0)},I=>{a.if((0,Pe._)`!(${I} instanceof ${i.ValidationError})`,()=>a.throw(I)),C(I),d||a.assign(R,!1)}),e.ok(R)}function _(){e.result((0,kn.callValidateCode)(e,t,p),()=>k(t),()=>C(t))}function C(R){const I=(0,Pe._)`${R}.errors`;a.assign(Pt.default.vErrors,(0,Pe._)`${Pt.default.vErrors} === null ? ${I} : ${Pt.default.vErrors}.concat(${I})`),a.assign(Pt.default.errors,(0,Pe._)`${Pt.default.vErrors}.length`)}function k(R){var I;if(!i.opts.unevaluated)return;const j=(I=r==null?void 0:r.validate)===null||I===void 0?void 0:I.evaluated;if(i.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(i.props=cr.mergeEvaluated.props(a,j.props,i.props));else{const h=a.var("props",(0,Pe._)`${R}.evaluated.props`);i.props=cr.mergeEvaluated.props(a,h,i.props,Pe.Name)}if(i.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(i.items=cr.mergeEvaluated.items(a,j.items,i.items));else{const h=a.var("items",(0,Pe._)`${R}.evaluated.items`);i.items=cr.mergeEvaluated.items(a,h,i.items,Pe.Name)}}}mt.callRef=ur,mt.default=vo;var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.checkMetadata=void 0;const _o=ye,yo={keyword:"metadata",schemaType:"object",code(e){Fn(e);const{gen:t,schema:r,it:n}=e;if((0,_o.alwaysValidSchema)(n,r))return;const a=t.name("valid");e.subschema({keyword:"metadata",jtdMetadata:!0},a),e.ok(a)}};function Fn({it:e,keyword:t},r){if(e.jtdMetadata!==r)throw new Error(`JTD: "${t}" cannot be used in this schema location`)}Ce.checkMetadata=Fn,Ce.default=yo,Object.defineProperty(pt,"__esModule",{value:!0}),pt.hasRef=void 0;const zn=we,Ut=ne,go=nt,Un=Oe,Kn=mt,$o=Ce,Eo={keyword:"ref",schemaType:"string",code(e){(0,$o.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:a,it:i}=e,{schemaEnv:{root:d}}=i,v=t.name("valid");a.nullable?(t.var(v,(0,Ut._)`${r} === null`),t.if((0,Ut.not)(v),g)):(t.var(v,!1),g()),e.ok(v);function g(){var _;const C=(_=d.schema.definitions)===null||_===void 0?void 0:_[n];if(!C)throw new go.default(i.opts.uriResolver,"",n,`No definition ${n}`);Ar(C)||!i.opts.inlineRefs?p(C):f(C)}function p(_){const C=zn.compileSchema.call(i.self,new zn.SchemaEnv({schema:_,root:d,schemaPath:`/definitions/${n}`})),k=(0,Kn.getValidate)(e,C),R=t.const("_errs",Un.default.errors);(0,Kn.callRef)(e,k,C,C.$async),t.assign(v,(0,Ut._)`${R} === ${Un.default.errors}`)}function f(_){const C=t.scopeValue("schema",i.opts.code.source===!0?{ref:_,code:(0,Ut.stringify)(_)}:{ref:_});e.subschema({schema:_,dataTypes:[],schemaPath:Ut.nil,topSchemaRef:C,errSchemaPath:`/definitions/${n}`},v)}}};function Ar(e){for(const t in e){let r;if(t==="ref"||typeof(r=e[t])=="object"&&Ar(r))return!0}return!1}pt.hasRef=Ar,pt.default=Eo;var kr={},lr={};Object.defineProperty(lr,"__esModule",{value:!0});const wo=/t|\s/i,So=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bo=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Po=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ln(e,t){const r=e.split(wo);return r.length===2&&Jn(r[0])&&No(r[1])||t&&r.length===1&&Jn(r[0])}lr.default=Ln;function Jn(e){const t=So.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],a=+t[3];return n>=1&&n<=12&&a>=1&&(a<=Po[n]||n===2&&a===29&&(r%100===0?r%400===0:r%4===0))}function No(e){const t=bo.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],a=+t[3],i=+(t[4]||0),d=+(t[5]||0);return r<=23&&n<=59&&a<=59||r-i===23&&n-d===59&&a===60}Ln.code='require("ajv/dist/runtime/timestamp").default';var De={};Object.defineProperty(De,"__esModule",{value:!0}),De.typeErrorParams=De.typeErrorMessage=De.typeError=void 0;const Ro=ne;function jo(e){return{message:t=>qn(t,e),params:t=>Hn(t,e)}}De.typeError=jo;function qn({parentSchema:e},t){return e!=null&&e.nullable?`must be ${t} or null`:`must be ${t}`}De.typeErrorMessage=qn;function Hn({parentSchema:e},t){return(0,Ro._)`{type: ${t}, nullable: ${!!(e!=null&&e.nullable)}}`}De.typeErrorParams=Hn,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intRange=void 0;const t=ne,r=lr,n=ye,a=Ce,i=De;e.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};const d={message:p=>(0,i.typeErrorMessage)(p,p.schema),params:p=>(0,i.typeErrorParams)(p,p.schema)};function v(p){const{gen:f,data:_,it:C}=p,{timestamp:k,allowDate:R}=C.opts;if(k==="date")return(0,t._)`${_} instanceof Date `;const I=(0,n.useFunc)(f,r.default),j=R?(0,t._)`, true`:t.nil,h=(0,t._)`typeof ${_} == "string" && ${I}(${_}${j})`;return k==="string"?h:(0,t.or)((0,t._)`${_} instanceof Date`,h)}const g={keyword:"type",schemaType:"string",error:d,code(p){(0,a.checkMetadata)(p);const{data:f,schema:_,parentSchema:C,it:k}=p;let R;switch(_){case"boolean":case"string":R=(0,t._)`typeof ${f} == ${_}`;break;case"timestamp":{R=v(p);break}case"float32":case"float64":R=(0,t._)`typeof ${f} == "number"`;break;default:{const I=_;if(R=(0,t._)`typeof ${f} == "number" && isFinite(${f}) && !(${f} % 1)`,!k.opts.int32range&&(I==="int32"||I==="uint32"))I==="uint32"&&(R=(0,t._)`${R} && ${f} >= 0`);else{const[j,h]=e.intRange[I];R=(0,t._)`${R} && ${f} >= ${j} && ${f} <= ${h}`}}}p.pass(C.nullable?(0,t.or)((0,t._)`${f} === null`,R):R)}};e.default=g}(kr);var Mr={},ze={};Object.defineProperty(ze,"__esModule",{value:!0}),ze.checkNullableObject=ze.checkNullable=void 0;const dr=ne;function Gn({gen:e,data:t,parentSchema:r},n=dr.nil){const a=e.name("valid");return r.nullable?(e.let(a,(0,dr._)`${t} === null`),n=(0,dr.not)(a)):e.let(a,!1),[a,n]}ze.checkNullable=Gn;function Oo(e,t){const[r,n]=Gn(e,t);return[r,(0,dr._)`${n} && typeof ${e.data} == "object" && !Array.isArray(${e.data})`]}ze.checkNullableObject=Oo,Object.defineProperty(Mr,"__esModule",{value:!0});const at=ne,Co=Ce,Do=ze,To={keyword:"enum",schemaType:"array",error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,at._)`{allowedValues: ${e}}`},code(e){(0,Co.checkMetadata)(e);const{gen:t,data:r,schema:n,schemaValue:a,parentSchema:i,it:d}=e;if(n.length===0)throw new Error("enum must have non-empty array");if(n.length!==new Set(n).size)throw new Error("enum items must be unique");let v;const g=(0,at._)`typeof ${r} == "string"`;if(n.length>=d.opts.loopEnum){let f;[v,f]=(0,Do.checkNullable)(e,g),t.if(f,p)}else{if(!Array.isArray(n))throw new Error("ajv implementation error");v=(0,at.and)(g,(0,at.or)(...n.map(f=>(0,at._)`${r} === ${f}`))),i.nullable&&(v=(0,at.or)((0,at._)`${r} === null`,v))}e.pass(v);function p(){t.forOf("v",a,f=>t.if((0,at._)`${v} = ${r} === ${f}`,()=>t.break()))}}};Mr.default=To;var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});const Io=ye,Ao=ee,Bn=ne,ko=Ce,Mo=ze,Vo={keyword:"elements",schemaType:"object",error:(0,De.typeError)("array"),code(e){(0,ko.checkMetadata)(e);const{gen:t,data:r,schema:n,it:a}=e;if((0,Io.alwaysValidSchema)(a,n))return;const[i]=(0,Mo.checkNullable)(e);t.if((0,Bn.not)(i),()=>t.if((0,Bn._)`Array.isArray(${r})`,()=>t.assign(i,(0,Ao.validateArray)(e)),()=>e.error())),e.ok(i)}};Vr.default=Vo;var Fr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperties=e.error=void 0;const t=ee,r=ye,n=ne,a=Ce,i=ze,d=De;var v;(function(f){f.Additional="additional",f.Missing="missing"})(v||(v={})),e.error={message:f=>{const{params:_}=f;return _.propError?_.propError===v.Additional?"must NOT have additional properties":`must have property '${_.missingProperty}'`:(0,d.typeErrorMessage)(f,"object")},params:f=>{const{params:_}=f;return _.propError?_.propError===v.Additional?(0,n._)`{error: ${_.propError}, additionalProperty: ${_.additionalProperty}}`:(0,n._)`{error: ${_.propError}, missingProperty: ${_.missingProperty}}`:(0,d.typeErrorParams)(f,"object")}};const g={keyword:"properties",schemaType:"object",error:e.error,code:p};function p(f){(0,a.checkMetadata)(f);const{gen:_,data:C,parentSchema:k,it:R}=f,{additionalProperties:I,nullable:j}=k;if(R.jtdDiscriminator&&j)throw new Error("JTD: nullable inside discriminator mapping");if(S())throw new Error("JTD: properties and optionalProperties have common members");const[h,P]=T("properties"),[b,D]=T("optionalProperties");if(P.length===0&&D.length===0&&I)return;const[L,w]=R.jtdDiscriminator===void 0?(0,i.checkNullableObject)(f,C):[_.let("valid",!1),!0];_.if(w,()=>_.assign(L,!0).block(()=>{J(P,"properties",!0),J(D,"optionalProperties"),I||ie()})),f.pass(L);function S(){const re=k.properties,G=k.optionalProperties;if(!(re&&G))return!1;for(const le in re)if(Object.prototype.hasOwnProperty.call(G,le))return!0;return!1}function T(re){const G=k[re],le=G?(0,t.allSchemaProperties)(G):[];if(R.jtdDiscriminator&&le.some(ge=>ge===R.jtdDiscriminator))throw new Error(`JTD: discriminator tag used in ${re}`);const he=le.filter(ge=>!(0,r.alwaysValidSchema)(R,G[ge]));return[le,he]}function J(re,G,le){const he=_.var("valid");for(const Se of re)_.if((0,t.propertyInData)(_,C,Se,R.opts.ownProperties),()=>B(Se,G,he),()=>ge(Se)),f.ok(he);function ge(Se){le?(_.assign(he,!1),f.error(!1,{propError:v.Missing,missingProperty:Se},{schemaPath:Se})):_.assign(he,!0)}}function B(re,G,le){f.subschema({keyword:G,schemaProp:re,dataProp:re},le)}function ie(){_.forIn("key",C,re=>{const G=Q(re,h,"properties",R.jtdDiscriminator),le=Q(re,b,"optionalProperties"),he=G===!0?le:le===!0?G:(0,n.and)(G,le);_.if(he,()=>{R.opts.removeAdditional?_.code((0,n._)`delete ${C}[${re}]`):(f.error(!1,{propError:v.Additional,additionalProperty:re},{instancePath:re,parentSchema:!0}),R.opts.allErrors||_.break())})})}function Q(re,G,le,he){let ge;if(G.length>8){const Se=(0,r.schemaRefOrVal)(R,k[le],le);ge=(0,n.not)((0,t.isOwnProperty)(_,Se,re)),he!==void 0&&(ge=(0,n.and)(ge,(0,n._)`${re} !== ${he}`))}else if(G.length||he!==void 0){const Se=he===void 0?G:[he].concat(G);ge=(0,n.and)(...Se.map(ct=>(0,n._)`${re} !== ${ct}`))}else ge=!0;return ge}}e.validateProperties=p,e.default=g})(Fr);var zr={};Object.defineProperty(zr,"__esModule",{value:!0});const Wn=Fr,Fo={keyword:"optionalProperties",schemaType:"object",error:Wn.error,code(e){e.parentSchema.properties||(0,Wn.validateProperties)(e)}};zr.default=Fo;var Ur={},Qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(Qn),Object.defineProperty(Ur,"__esModule",{value:!0});const vt=ne,zo=Ce,Uo=ze,Yn=De,fr=Qn,Ko={keyword:"discriminator",schemaType:"string",implements:["mapping"],error:{message:e=>{const{schema:t,params:r}=e;return r.discrError?r.discrError===fr.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in mapping`:(0,Yn.typeErrorMessage)(e,"object")},params:e=>{const{schema:t,params:r}=e;return r.discrError?(0,vt._)`{error: ${r.discrError}, tag: ${t}, tagValue: ${r.tag}}`:(0,Yn.typeErrorParams)(e,"object")}},code(e){(0,zo.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:a}=e,[i,d]=(0,Uo.checkNullableObject)(e,r);t.if(d),v(),t.elseIf((0,vt.not)(i)),e.error(),t.endIf(),e.ok(i);function v(){const f=t.const("tag",(0,vt._)`${r}${(0,vt.getProperty)(n)}`);t.if((0,vt._)`${f} === undefined`),e.error(!1,{discrError:fr.DiscrError.Tag,tag:f}),t.elseIf((0,vt._)`typeof ${f} == "string"`),g(f),t.else(),e.error(!1,{discrError:fr.DiscrError.Tag,tag:f},{instancePath:n}),t.endIf()}function g(f){t.if(!1);for(const _ in a.mapping)t.elseIf((0,vt._)`${f} === ${_}`),t.assign(i,p(_));t.else(),e.error(!1,{discrError:fr.DiscrError.Mapping,tag:f},{instancePath:n,schemaPath:"mapping",parentSchema:!0}),t.endIf()}function p(f){const _=t.name("valid");return e.subschema({keyword:"mapping",schemaProp:f,jtdDiscriminator:n},_),_}}};Ur.default=Ko;var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});const Xn=ye,hr=ne,Lo=Ce,Jo=ze,qo={keyword:"values",schemaType:"object",error:(0,De.typeError)("object"),code(e){(0,Lo.checkMetadata)(e);const{gen:t,data:r,schema:n,it:a}=e,[i,d]=(0,Jo.checkNullableObject)(e,r);(0,Xn.alwaysValidSchema)(a,n)?t.if((0,hr.not)((0,hr.or)(d,i)),()=>e.error()):(t.if(d),t.assign(i,v()),t.elseIf((0,hr.not)(i)),e.error(),t.endIf()),e.ok(i);function v(){const g=t.name("valid");if(a.allErrors){const f=t.let("valid",!0);return p(()=>t.assign(f,!1)),f}return t.var(g,!0),p(()=>t.break()),g;function p(f){t.forIn("key",r,_=>{e.subschema({keyword:"values",dataProp:_,dataPropType:Xn.Type.Str},g),t.if((0,hr.not)(g),f)})}}}};Kr.default=qo;var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});const Ho={keyword:"union",schemaType:"array",trackErrors:!0,code:ee.validateUnion,error:{message:"must match a schema in union"}};Lr.default=Ho,Object.defineProperty(Ir,"__esModule",{value:!0});const Go=pt,Bo=kr,Wo=Mr,Qo=Vr,Yo=Fr,Xo=zr,Zo=Ur,xo=Kr,ei=Lr,ti=Ce,ri=["definitions",Go.default,Bo.default,Wo.default,Qo.default,Yo.default,Xo.default,Zo.default,xo.default,ei.default,ti.default,{keyword:"additionalProperties",schemaType:"boolean"},{keyword:"nullable",schemaType:"boolean"}];Ir.default=ri;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});const Qe=e=>{const t={nullable:{type:"boolean"},metadata:{optionalProperties:{union:{elements:{ref:"schema"}}},additionalProperties:!0}};return e&&(t.definitions={values:{ref:"schema"}}),t},ni=e=>({optionalProperties:Qe(e)}),ai=e=>({properties:{ref:{type:"string"}},optionalProperties:Qe(e)}),si=e=>({properties:{type:{enum:["boolean","timestamp","string","float32","float64","int8","uint8","int16","uint16","int32","uint32"]}},optionalProperties:Qe(e)}),oi=e=>({properties:{enum:{elements:{type:"string"}}},optionalProperties:Qe(e)}),ii=e=>({properties:{elements:{ref:"schema"}},optionalProperties:Qe(e)}),Zn=e=>({properties:{properties:{values:{ref:"schema"}}},optionalProperties:{optionalProperties:{values:{ref:"schema"}},additionalProperties:{type:"boolean"},...Qe(e)}}),xn=e=>({properties:{optionalProperties:{values:{ref:"schema"}}},optionalProperties:{additionalProperties:{type:"boolean"},...Qe(e)}}),ci=e=>({properties:{discriminator:{type:"string"},mapping:{values:{metadata:{union:[Zn(!1),xn(!1)]}}}},optionalProperties:Qe(e)}),ui=e=>({properties:{values:{ref:"schema"}},optionalProperties:Qe(e)}),ea=e=>({metadata:{union:[ni,ai,si,oi,ii,Zn,xn,ci,ui].map(t=>t(e))}}),li={definitions:{schema:ea(!1)},...ea(!0)};Jr.default=li;var qr={},Kt={};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.jtdForms=void 0,Kt.jtdForms=["elements","values","discriminator","properties","optionalProperties","enum","type","ref"];var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});const Gr=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,di={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function ta(e){return Gr.lastIndex=0,'"'+(Gr.test(e)?e.replace(Gr,t=>{const r=di[t];return typeof r=="string"?r:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}):e)+'"'}Hr.default=ta,ta.code='require("ajv/dist/runtime/quote").default',Object.defineProperty(qr,"__esModule",{value:!0});const fi=Kt,ra=we,Y=ne,hi=nt,ae=Oe,pi=ee,mi=pt,vi=ye,_i=Hr,yi={elements:$i,values:Ei,discriminator:wi,properties:sa,optionalProperties:sa,enum:Jt,type:Si,ref:Pi};function na(e,t){const r=ra.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:a}=this.opts.code,{ownProperties:i}=this.opts,d=new Y.CodeGen(this.scope,{es5:n,lines:a,ownProperties:i}),v=d.scopeName("serialize"),g={self:this,gen:d,schema:e.schema,schemaEnv:e,definitions:t,data:ae.default.data};let p;try{this._compilations.add(e),e.serializeName=v,d.func(v,ae.default.data,!1,()=>{d.let(ae.default.json,(0,Y.str)``),Lt(g),d.return(ae.default.json)}),d.optimize(this.opts.code.optimize);const f=d.toString();p=`${d.scopeRefs(ae.default.scope)}return ${f}`;const C=new Function(`${ae.default.scope}`,p)(this.scope.get());this.scope.value(v,{ref:C}),e.serialize=C}catch(f){throw p&&this.logger.error("Error compiling serializer, function code:",p),delete e.serialize,delete e.serializeName,f}finally{this._compilations.delete(e)}return e}qr.default=na;function Lt(e){let t;for(const r of fi.jtdForms)if(r in e.schema){t=r;break}gi(e,t?yi[t]:Ri)}function gi(e,t){const{gen:r,schema:n,data:a}=e;if(!n.nullable)return t(e);r.if((0,Y._)`${a} === undefined || ${a} === null`,()=>r.add(ae.default.json,(0,Y._)`"null"`),()=>t(e))}function $i(e){const{gen:t,schema:r,data:n}=e;t.add(ae.default.json,(0,Y.str)`[`);const a=t.let("first",!0);t.forOf("el",n,i=>{Br(e,a),Lt({...e,schema:r.elements,data:i})}),t.add(ae.default.json,(0,Y.str)`]`)}function Ei(e){const{gen:t,schema:r,data:n}=e;t.add(ae.default.json,(0,Y.str)`{`);const a=t.let("first",!0);t.forIn("key",n,i=>aa(e,i,r.values,a)),t.add(ae.default.json,(0,Y.str)`}`)}function aa(e,t,r,n){const{gen:a,data:i}=e;Br(e,n),Jt({...e,data:t}),a.add(ae.default.json,(0,Y.str)`:`);const d=a.const("value",(0,Y._)`${i}${(0,Y.getProperty)(t)}`);Lt({...e,schema:r,data:d})}function wi(e){const{gen:t,schema:r,data:n}=e,{discriminator:a}=r;t.add(ae.default.json,(0,Y.str)`{${JSON.stringify(a)}:`);const i=t.const("tag",(0,Y._)`${n}${(0,Y.getProperty)(a)}`);Jt({...e,data:i}),t.if(!1);for(const d in r.mapping){t.elseIf((0,Y._)`${i} === ${d}`);const v=r.mapping[d];oa({...e,schema:v},a)}t.endIf(),t.add(ae.default.json,(0,Y.str)`}`)}function sa(e){const{gen:t}=e;t.add(ae.default.json,(0,Y.str)`{`),oa(e),t.add(ae.default.json,(0,Y.str)`}`)}function oa(e,t){const{gen:r,schema:n,data:a}=e,{properties:i,optionalProperties:d}=n,v=C(i),g=C(d),p=k(v.concat(g));let f=!t,_;for(const h of v)f?f=!1:r.add(ae.default.json,(0,Y.str)`,`),I(h,i[h],R(h));f&&(_=r.let("first",!0));for(const h of g){const P=R(h);r.if((0,Y.and)((0,Y._)`${P} !== undefined`,(0,pi.isOwnProperty)(r,a,h)),()=>{Br(e,_),I(h,d[h],P)})}n.additionalProperties&&r.forIn("key",a,h=>r.if(j(h,p),()=>aa(e,h,{},_)));function C(h){return h?Object.keys(h):[]}function k(h){if(t&&h.push(t),new Set(h).size!==h.length)throw new Error("JTD: properties/optionalProperties/disciminator overlap");return h}function R(h){return r.const("value",(0,Y._)`${a}${(0,Y.getProperty)(h)}`)}function I(h,P,b){r.add(ae.default.json,(0,Y.str)`${JSON.stringify(h)}:`),Lt({...e,schema:P,data:b})}function j(h,P){return P.length?(0,Y.and)(...P.map(b=>(0,Y._)`${h} !== ${b}`)):!0}}function Si(e){const{gen:t,schema:r,data:n}=e;switch(r.type){case"boolean":t.add(ae.default.json,(0,Y._)`${n} ? "true" : "false"`);break;case"string":Jt(e);break;case"timestamp":t.if((0,Y._)`${n} instanceof Date`,()=>t.add(ae.default.json,(0,Y._)`'"' + ${n}.toISOString() + '"'`),()=>Jt(e));break;default:bi(e)}}function Jt({gen:e,data:t}){e.add(ae.default.json,(0,Y._)`${(0,vi.useFunc)(e,_i.default)}(${t})`)}function bi({gen:e,data:t}){e.add(ae.default.json,(0,Y._)`"" + ${t}`)}function Pi(e){const{gen:t,self:r,data:n,definitions:a,schema:i,schemaEnv:d}=e,{ref:v}=i,g=a[v];if(!g)throw new hi.default(r.opts.uriResolver,"",v,`No definition ${v}`);if(!(0,mi.hasRef)(g))return Lt({...e,schema:g});const{root:p}=d,f=na.call(r,new ra.SchemaEnv({schema:g,root:p}),a);t.add(ae.default.json,(0,Y._)`${Ni(t,f)}(${n})`)}function Ni(e,t){return t.serialize?e.scopeValue("serialize",{ref:t.serialize}):(0,Y._)`${e.scopeValue("wrapper",{ref:t})}.serialize`}function Ri({gen:e,data:t}){e.add(ae.default.json,(0,Y._)`JSON.stringify(${t})`)}function Br({gen:e},t){t?e.if(t,()=>e.assign(t,!1),()=>e.add(ae.default.json,(0,Y.str)`,`)):e.add(ae.default.json,(0,Y.str)`,`)}var Wr={},st={};Object.defineProperty(st,"__esModule",{value:!0}),st.parseJsonString=st.parseJsonNumber=st.parseJson=void 0;const ji=/position\s(\d+)$/;function Ye(e,t){let r;Ye.message=void 0;let n;t&&(e=e.slice(t));try{return Ye.position=t+e.length,JSON.parse(e)}catch(a){if(n=ji.exec(a.message),!n){Ye.message="unexpected end";return}r=+n[1];const i=e[r];e=e.slice(0,r),Ye.position=t+r;try{return JSON.parse(e)}catch{Ye.message=`unexpected token ${i}`;return}}}st.parseJson=Ye,Ye.message=void 0,Ye.position=0,Ye.code='require("ajv/dist/runtime/parseJson").parseJson';function Xe(e,t,r){let n="",a;if(Xe.message=void 0,e[t]==="-"&&(n+="-",t++),e[t]==="0")n+="0",t++;else if(!i(r)){d();return}if(r)return Xe.position=t,+n;if(e[t]==="."&&(n+=".",t++,!i())){d();return}if(a=e[t],(a==="e"||a==="E")&&(n+="e",t++,a=e[t],(a==="+"||a==="-")&&(n+=a,t++),!i())){d();return}return Xe.position=t,+n;function i(v){let g=!1;for(;a=e[t],a>="0"&&a<="9"&&(v===void 0||v-- >0);)g=!0,n+=a,t++;return g}function d(){Xe.position=t,Xe.message=t<e.length?`unexpected token ${e[t]}`:"unexpected end"}}st.parseJsonNumber=Xe,Xe.message=void 0,Xe.position=0,Xe.code='require("ajv/dist/runtime/parseJson").parseJsonNumber';const ia={b:"\b",f:"\f",n:`
6
6
  `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Oi="a".charCodeAt(0),Ci="0".charCodeAt(0);function ot(e,t){let r="",n;for(ot.message=void 0;n=e[t++],n!=='"';)if(n==="\\")if(n=e[t],n in ia)r+=ia[n],t++;else if(n==="u"){t++;let i=4,d=0;for(;i--;){if(d<<=4,n=e[t],n===void 0){a("unexpected end");return}if(n=n.toLowerCase(),n>="a"&&n<="f")d+=n.charCodeAt(0)-Oi+10;else if(n>="0"&&n<="9")d+=n.charCodeAt(0)-Ci;else{a(`unexpected token ${n}`);return}t++}r+=String.fromCharCode(d)}else{a(`unexpected token ${n}`);return}else if(n===void 0){a("unexpected end");return}else if(n.charCodeAt(0)>=32)r+=n;else{a(`unexpected token ${n}`);return}return ot.position=t,r;function a(i){ot.position=t,ot.message=i}}st.parseJsonString=ot,ot.message=void 0,ot.position=0,ot.code='require("ajv/dist/runtime/parseJson").parseJsonString',Object.defineProperty(Wr,"__esModule",{value:!0});const Di=Kt,ca=we,z=ne,Ti=nt,W=Oe,Ii=ee,Ai=pt,ki=kr,Qr=st,ua=ye,Mi=lr,Vi={elements:Ki,values:Li,discriminator:qi,properties:fa,optionalProperties:fa,enum:Gi,type:Hi,ref:Bi};function la(e,t){const r=ca.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:a}=this.opts.code,{ownProperties:i}=this.opts,d=new z.CodeGen(this.scope,{es5:n,lines:a,ownProperties:i}),v=d.scopeName("parse"),g={self:this,gen:d,schema:e.schema,schemaEnv:e,definitions:t,data:W.default.data,parseName:v,char:d.name("c")};let p;try{this._compilations.add(e),e.parseName=v,Fi(g),d.optimize(this.opts.code.optimize);const f=d.toString();p=`${d.scopeRefs(W.default.scope)}return ${f}`;const C=new Function(`${W.default.scope}`,p)(this.scope.get());this.scope.value(v,{ref:C}),e.parse=C}catch(f){throw p&&this.logger.error("Error compiling parser, function code:",p),delete e.parse,delete e.parseName,f}finally{this._compilations.delete(e)}return e}Wr.default=la;const Yr=(0,z._)`undefined`;function Fi(e){const{gen:t,parseName:r,char:n}=e;t.func(r,(0,z._)`${W.default.json}, ${W.default.jsonPos}, ${W.default.jsonPart}`,!1,()=>{t.let(W.default.data),t.let(n),t.assign((0,z._)`${r}.message`,Yr),t.assign((0,z._)`${r}.position`,Yr),t.assign(W.default.jsonPos,(0,z._)`${W.default.jsonPos} || 0`),t.const(W.default.jsonLen,(0,z._)`${W.default.json}.length`),pr(e),tn(e),t.if(W.default.jsonPart,()=>{t.assign((0,z._)`${r}.position`,W.default.jsonPos),t.return(W.default.data)}),t.if((0,z._)`${W.default.jsonPos} === ${W.default.jsonLen}`,()=>t.return(W.default.data)),Nt(e)})}function pr(e){let t;for(const r of Di.jtdForms)if(r in e.schema){t=r;break}t?Ui(e,Vi[t]):xr(e)}const zi=va(!0,va(!1,Nt));function Ui(e,t){const{gen:r,schema:n,data:a}=e;if(!n.nullable)return t(e);qt(e,"null",t,()=>r.assign(a,null))}function Ki(e){const{gen:t,schema:r,data:n}=e;Ue(e,"[");const a=t.let("i",0);t.assign(n,(0,z._)`[]`),Xr(e,"]",()=>{const i=t.let("el");pr({...e,schema:r.elements,data:i}),t.assign((0,z._)`${n}[${a}++]`,i)})}function Li(e){const{gen:t,schema:r,data:n}=e;Ue(e,"{"),t.assign(n,(0,z._)`{}`),Xr(e,"}",()=>Ji(e,r.values))}function Xr(e,t,r){da(e,t,r),Ue(e,t)}function da(e,t,r){const{gen:n}=e;n.for((0,z._)`;${W.default.jsonPos}<${W.default.jsonLen} && ${mr(1)}!==${t};`,()=>{r(),qt(e,",",()=>n.break(),a)});function a(){qt(e,t,()=>{},Nt)}}function Ji(e,t){const{gen:r}=e,n=r.let("key");_t({...e,data:n}),Ue(e,":"),ma(e,n,t)}function qi(e){const{gen:t,data:r,schema:n}=e,{discriminator:a,mapping:i}=n;Ue(e,"{"),t.assign(r,(0,z._)`{}`);const d=t.const("pos",W.default.jsonPos),v=t.let("value"),g=t.let("tag");da(e,"}",()=>{const p=t.let("key");_t({...e,data:p}),Ue(e,":"),t.if((0,z._)`${p} === ${a}`,()=>{_t({...e,data:g}),t.assign((0,z._)`${r}[${p}]`,g),t.break()},()=>xr({...e,data:v}))}),t.assign(W.default.jsonPos,d),t.if((0,z._)`${g} === undefined`),Ze(e,(0,z.str)`discriminator tag not found`);for(const p in i)t.elseIf((0,z._)`${g} === ${p}`),ha({...e,schema:i[p]},a);t.else(),Ze(e,(0,z.str)`discriminator value not in schema`),t.endIf()}function fa(e){const{gen:t,data:r}=e;Ue(e,"{"),t.assign(r,(0,z._)`{}`),ha(e)}function ha(e,t){const{gen:r,schema:n,data:a}=e,{properties:i,optionalProperties:d,additionalProperties:v}=n;if(Xr(e,"}",()=>{const g=r.let("key");if(_t({...e,data:g}),Ue(e,":"),r.if(!1),pa(e,g,i),pa(e,g,d),t){r.elseIf((0,z._)`${g} === ${t}`);const p=r.let("tag");_t({...e,data:p})}r.else(),v?xr({...e,data:(0,z._)`${a}[${g}]`}):Ze(e,(0,z.str)`property ${g} not allowed`),r.endIf()}),i){const g=(0,Ii.hasPropFunc)(r),p=(0,z.and)(...Object.keys(i).map(f=>(0,z._)`${g}.call(${a}, ${f})`));r.if((0,z.not)(p),()=>Ze(e,(0,z.str)`missing required properties`))}}function pa(e,t,r={}){const{gen:n}=e;for(const a in r)n.elseIf((0,z._)`${t} === ${a}`),ma(e,t,r[a])}function ma(e,t,r){pr({...e,schema:r,data:(0,z._)`${e.data}[${t}]`})}function Hi(e){const{gen:t,schema:r,data:n,self:a}=e;switch(r.type){case"boolean":zi(e);break;case"string":_t(e);break;case"timestamp":{_t(e);const i=(0,ua.useFunc)(t,Mi.default),{allowDate:d,parseDate:v}=a.opts,g=d?(0,z._)`!${i}(${n}, true)`:(0,z._)`!${i}(${n})`,p=v?(0,z.or)(g,(0,z._)`(${n} = new Date(${n}), false)`,(0,z._)`isNaN(${n}.valueOf())`):g;t.if(p,()=>Ze(e,(0,z.str)`invalid timestamp`));break}case"float32":case"float64":Zr(e);break;default:{const i=r.type;if(!a.opts.int32range&&(i==="int32"||i==="uint32"))Zr(e,16),i==="uint32"&&t.if((0,z._)`${n} < 0`,()=>Ze(e,(0,z.str)`integer out of range`));else{const[d,v,g]=ki.intRange[i];Zr(e,g),t.if((0,z._)`${n} < ${d} || ${n} > ${v}`,()=>Ze(e,(0,z.str)`integer out of range`))}}}}function _t(e){Ue(e,'"'),en(e,Qr.parseJsonString)}function Gi(e){const{gen:t,data:r,schema:n}=e,a=n.enum;Ue(e,'"'),t.if(!1);for(const i of a){const d=JSON.stringify(i).slice(1);t.elseIf((0,z._)`${mr(d.length)} === ${d}`),t.assign(r,(0,z.str)`${i}`),t.add(W.default.jsonPos,d.length)}t.else(),Nt(e),t.endIf()}function Zr(e,t){const{gen:r}=e;tn(e),r.if((0,z._)`"-0123456789".indexOf(${mr(1)}) < 0`,()=>Nt(e),()=>en(e,Qr.parseJsonNumber,t))}function va(e,t){return r=>{const{gen:n,data:a}=r;qt(r,`${e}`,()=>t(r),()=>n.assign(a,e))}}function Bi(e){const{gen:t,self:r,definitions:n,schema:a,schemaEnv:i}=e,{ref:d}=a,v=n[d];if(!v)throw new Ti.default(r.opts.uriResolver,"",d,`No definition ${d}`);if(!(0,Ai.hasRef)(v))return pr({...e,schema:v});const{root:g}=i,p=la.call(r,new ca.SchemaEnv({schema:v,root:g}),n);_a(e,Wi(t,p),!0)}function Wi(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):(0,z._)`${e.scopeValue("wrapper",{ref:t})}.parse`}function xr(e){en(e,Qr.parseJson)}function en(e,t,r){_a(e,(0,ua.useFunc)(e.gen,t),r)}function _a(e,t,r){const{gen:n,data:a}=e;n.assign(a,(0,z._)`${t}(${W.default.json}, ${W.default.jsonPos}${r?(0,z._)`, ${r}`:z.nil})`),n.assign(W.default.jsonPos,(0,z._)`${t}.position`),n.if((0,z._)`${a} === undefined`,()=>Ze(e,(0,z._)`${t}.message`))}function Ue(e,t){qt(e,t,Nt)}function qt(e,t,r,n){const{gen:a}=e,i=t.length;tn(e),a.if((0,z._)`${mr(i)} === ${t}`,()=>{a.add(W.default.jsonPos,i),n==null||n(e)},()=>r(e))}function tn({gen:e,char:t}){e.code((0,z._)`while((${t}=${W.default.json}[${W.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${W.default.jsonPos}++;`)}function mr(e){return e===1?(0,z._)`${W.default.json}[${W.default.jsonPos}]`:(0,z._)`${W.default.json}.slice(${W.default.jsonPos}, ${W.default.jsonPos}+${e})`}function Nt(e){Ze(e,(0,z._)`"unexpected token " + ${W.default.json}[${W.default.jsonPos}]`)}function Ze({gen:e,parseName:t},r){e.assign((0,z._)`${t}.message`,r),e.assign((0,z._)`${t}.position`,W.default.jsonPos),e.return(Yr)}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=nn,n=Ir,a=Jr,i=qr,d=Wr,v="JTD-meta-schema";class g extends r.default{constructor(R={}){super({...R,jtd:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(a.default,v,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}compileSerializer(R){const I=this._addSchema(R);return I.serialize||this._compileSerializer(I)}compileParser(R){const I=this._addSchema(R);return I.parse||this._compileParser(I)}_compileSerializer(R){if(i.default.call(this,R,R.schema.definitions||{}),!R.serialize)throw new Error("ajv implementation error");return R.serialize}_compileParser(R){if(d.default.call(this,R,R.schema.definitions||{}),!R.parse)throw new Error("ajv implementation error");return R.parse}}e.exports=t=g,Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var p=Me;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var f=ne;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var _=zt;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return _.default}});var C=nt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return C.default}})})(Fa,er);const Qi=Va(er),ya=new Qi,Yi=(e,t)=>e(t)?null:e.errors;function Xi(e,t){ya.addSchema(t,e)}function ga(e,t){const r=ya.getSchema(e);if(r)return Yi(r,t)}class Zi{constructor(t=null){At(this,"_options");this._options=t,t!==null&&(typeof t.validator>"u"||ga(t.validator,t))}get options(){return this._options}}async function $a(e=1e3){return new Promise(t=>setTimeout(t,e))}async function xi(){return $a(100)}var Ea=(e=>(e.AUDIENCE="AUDIENCE",e.CLIENT_ID="client_id",e.CLIENT_SECRET="client_secret",e.RESPONSE_TYPE="response_type",e.SCOPE="scope",e.STATE="state",e.REDIRECT_URI="redirect_uri",e.ERROR="error",e.ERROR_DESCRIPTION="error_description",e.ERROR_CODES="error_codes",e.ERROR_URI="error_uri",e.GRANT_TYPE="grant_type",e.CODE="code",e.ACCESS_TOKEN="access_token",e.TOKEN_TYPE="token_type",e.EXPIRES_IN="expires_in",e.USERNAME="username",e.PASSWORD="password",e.REFRESH_TOKEN="refresh_token",e.RESPONSE_MODE="response_mode",e.TIMESTAMP="timestamp",e.TRACE_ID="trace_id",e.CORRELATION_ID="correlation_id",e))(Ea||{}),wa=(e=>(e.SUB="sub",e.NAME="name",e.GIVEN_NAME="given_name",e.FAMILY_NAME="family_name",e.MIDDLE_NAME="middle_name",e.NICKNAME="nickname",e.PREFERRED_USERNAME="preferred_username",e.PROFILE="profile",e.PICTURE="picture",e.WEBSITE="website",e.EMAIL="email",e.EMAIL_VERIFIED="email_verified",e.GENDER="gender",e.BIRTHDATE="birthdate",e.ZONEINFO="zoneinfo",e.LOCALE="locale",e.PHONE_NUMBER="phone_number",e.PHONE_NUMBER_VERIFIED="phone_number_verified",e.ADDRESS="address",e.CLIENT_SECRET="client_secret",e.NONCE="nonce",e))(wa||{}),Sa=(e=>(e.FORMATTED="formatted",e.STREET_ADDRESS="street_address",e.LOCALITY="locality",e.REGION="region",e.COUNTRY="country",e))(Sa||{});class it{}At(it,"NOT_EQUAL",{code:"STS_OAUTH2_ERR_0001",description:"Parameter values not equal."}),At(it,"NOT_PRESENT",{code:"STS_OAUTH2_ERR_0002",description:"Parameter not provided."}),At(it,"INVALID_FORMAT",{code:"STS_OAUTH2_ERR_0003",description:"Parameter value format invalid."}),At(it,"EXPIRED",{code:"STS_OAUTH2_ERR_0004",description:"Parameter value expired."});function ec(e,t,r){const n=[];for(let a=0;a<r.length;a++){const i=r[a];if(e[a].localeCompare(t[a])!==0){const d={error:it.NOT_EQUAL.code,error_description:it.NOT_EQUAL.description,timestamp:Date.now(),details:`${it.NOT_EQUAL.description}: Parameter: [${i}]`};n.push(d)}}return n}const ba={};function tc(){return ba}ue.$stsgd=ba,ue.$stsgdf=tc,ue.AddSchema=Xi,ue.GetErrorPayload=Re,ue.JestSleep=xi,ue.OAuth2ParameterErrorType=it,ue.OAuth2ParameterType=Ea,ue.OIDCAddressClaim=Sa,ue.OIDCStandardClaim=wa,ue.STSOptionsBase=Zi,ue.Sleep=$a,ue.Validate=ga,ue.compareParameterTypes=ec,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});
7
+ //# sourceMappingURL=stsutils.umd.js.map