@vuebro/runtime 1.2.9 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +1 -1
- package/dist/assets/index-COONrYLs.js +1 -0
- package/dist/assets/{loader-sfc.esm-browser.prod-2.3.25.js → loader-sfc.esm-browser.prod-2.3.26.js} +2923 -2926
- package/dist/assets/shared-nNwI4Bp9.js +17 -0
- package/dist/assets/unocss-pEOBR4Nb.js +415 -0
- package/dist/assets/{vue.esm-browser.prod-3.5.23.js → vue.esm-browser.prod-3.5.24.js} +5 -5
- package/dist/index.html +3 -3
- package/package.json +19 -11
- package/dist/assets/index-DUfRPm5w.js +0 -1
- package/dist/assets/shared-BdzfWMvc.js +0 -17
- package/dist/assets/unocss-BeBBpyPU.js +0 -415
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{computed as bt,isReactive as Pt,reactive as Oe,effectScope as In,ref as qn,markRaw as Cn,toRaw as Mn,isRef as Ae,toRef as Xn,hasInjectionContext as Yn,inject as xn,getCurrentScope as es,onScopeDispose as ts,watch as Zt,nextTick as rs,toRefs as ns}from"vue";import{o as ss}from"./unocss-pEOBR4Nb.js";function Xt(e,t={},o){for(const r in e){const u=e[r],s=o?`${o}:${r}`:r;typeof u=="object"&&u!==null?Xt(u,t,s):typeof u=="function"&&(t[s]=u)}return t}const os={run:e=>e()},is=()=>os,An=typeof console.createTask<"u"?console.createTask:is;function as(e,t){const o=t.shift(),r=An(o);return e.reduce((u,s)=>u.then(()=>r.run(()=>s(...t))),Promise.resolve())}function us(e,t){const o=t.shift(),r=An(o);return Promise.all(e.map(u=>r.run(()=>u(...t))))}function Ct(e,t){for(const o of[...e])o(t)}class cs{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,o,r={}){if(!t||typeof o!="function")return()=>{};const u=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let l=s.message;l||(l=`${u} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(l)||(console.warn(l),this._deprecatedMessages.add(l))}if(!o.name)try{Object.defineProperty(o,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(o),()=>{o&&(this.removeHook(t,o),o=void 0)}}hookOnce(t,o){let r,u=(...s)=>(typeof r=="function"&&r(),r=void 0,u=void 0,o(...s));return r=this.hook(t,u),r}removeHook(t,o){if(this._hooks[t]){const r=this._hooks[t].indexOf(o);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,o){this._deprecatedHooks[t]=typeof o=="string"?{to:o}:o;const r=this._hooks[t]||[];delete this._hooks[t];for(const u of r)this.hook(t,u)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const o in t)this.deprecateHook(o,t[o])}addHooks(t){const o=Xt(t),r=Object.keys(o).map(u=>this.hook(u,o[u]));return()=>{for(const u of r.splice(0,r.length))u()}}removeHooks(t){const o=Xt(t);for(const r in o)this.removeHook(r,o[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...o){return o.unshift(t),this.callHookWith(as,t,...o)}callHookParallel(t,...o){return o.unshift(t),this.callHookWith(us,t,...o)}callHookWith(t,o,...r){const u=this._before||this._after?{name:o,args:r,context:{}}:void 0;this._before&&Ct(this._before,u);const s=t(o in this._hooks?[...this._hooks[o]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&u&&Ct(this._after,u)}):(this._after&&u&&Ct(this._after,u),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const o=this._before.indexOf(t);o!==-1&&this._before.splice(o,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const o=this._after.indexOf(t);o!==-1&&this._after.splice(o,1)}}}}function Yo(){return new cs}function rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ls(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function r(){var u=!1;try{u=this instanceof r}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,u.get?u:{enumerable:!0,get:function(){return e[r]}})}),o}function ds(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Mt={exports:{}};const fs={},hs=Object.freeze(Object.defineProperty({__proto__:null,default:fs},Symbol.toStringTag,{value:"Module"})),ps=ls(hs);var ur;function ms(){return ur||(ur=1,(function(e){(function(){var t,o=0,r=[],u;for(u=0;u<256;u++)r[u]=(u+256).toString(16).substr(1);p.BUFFER_SIZE=4096,p.bin=f,p.clearBuffer=function(){t=null,o=0},p.test=function(_){return typeof _=="string"?/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(_):!1};var s;typeof crypto<"u"?s=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(s=window.msCrypto),typeof ds=="function"?(s=s||ps,e.exports=p):typeof window<"u"&&(window.uuid=p),p.randomBytes=(function(){if(s){if(s.randomBytes)return s.randomBytes;if(s.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var y=new Uint8Array(_);return s.getRandomValues(y),Array.from(y)}:function(_){var y=new Uint8Array(_);return s.getRandomValues(y),y}}return function(_){var y,E=[];for(y=0;y<_;y++)E.push(Math.floor(Math.random()*256));return E}})();function l(_){return(!t||o+_>p.BUFFER_SIZE)&&(o=0,t=p.randomBytes(p.BUFFER_SIZE)),t.slice(o,o+=_)}function f(){var _=l(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function p(){var _=f();return r[_[0]]+r[_[1]]+r[_[2]]+r[_[3]]+"-"+r[_[4]]+r[_[5]]+"-"+r[_[6]]+r[_[7]]+"-"+r[_[8]]+r[_[9]]+"-"+r[_[10]]+r[_[11]]+r[_[12]]+r[_[13]]+r[_[14]]+r[_[15]]}})()})(Mt)),Mt.exports}var ys=ms();const Yt=rr(ys),cr=!0,lr=(e,t)=>[...e].reverse().map(o=>({node:o,parent:t,siblings:e})),gs=(e,{branch:t="branch",children:o="children",id:r="id",index:u="index",next:s="next",parent:l="parent",prev:f="prev",siblings:p="siblings"}={})=>{const _={[t]:{get(){const g=[this];for(;g[0]?.[l];)g.unshift(g[0][l]);return g}},[u]:{get(){return this[p].findIndex(g=>this[r]===g[r])}},[s]:{get(){return this[p][this[u]+1]}},[f]:{get(){return this[p][this[u]-1]}}},y=function*(g){const b=lr(g);for(;b.length;){const{node:a,parent:d,siblings:n}=b.pop()??{};a&&(a[l]!==d&&Object.defineProperty(a,l,{configurable:cr,value:d}),a[p]!==n&&Object.defineProperty(a,p,{configurable:cr,value:n}),Object.keys(_).some(c=>!(c in a))&&Object.defineProperties(a,_),yield a,b.push(...lr(a[o]??[],a)))}},E=bt(()=>[...y(Pt(e)?e:Oe(e))]),v=bt(()=>Object.fromEntries(E.value.map(g=>[g[r],g]))),w=(g,b)=>{const a=v.value[g];if(a){const[d]=E.value,n=a[u],c=a[s],$=n+1,i=a[l],m=a[f],S=n-1,k=a[p];switch(b){case"add":{const T=Yt();return k.splice($,0,{[r]:T}),T}case"addChild":{const T=Yt();return Array.isArray(a[o])||(a[o]=[]),a[o].unshift({[r]:T}),T}case"down":n<k.length-1&&k[n]&&k[$]&&([k[n],k[$]]=[k[$],k[n]]);break;case"left":if(i?.[l])return i[p].splice(i[u]+1,0,...k.splice(n,1)),i[r];break;case"remove":{const T=c?.[r]??m?.[r]??i?.[r]??d?.[r];return k.splice(n,1),T}case"right":if(m){const T=m[o]??[],M=m[r];return m[o]=[...T,...k.splice(n,1)],M}break;case"up":n&&k[n]&&k[S]&&([k[S],k[n]]=[k[n],k[S]]);break}}};return{add:g=>w(g,"add"),addChild:g=>w(g,"addChild"),down:g=>w(g,"down"),left:g=>w(g,"left"),nodes:E,nodesMap:v,remove:g=>w(g,"remove"),right:g=>w(g,"right"),up:g=>w(g,"up")}};var De={exports:{}},At={},me={},be={},Dt={},Vt={},Ft={},dr;function St(){return dr||(dr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=o;class r extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((c,$)=>`${c}${$}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((c,$)=>($ instanceof o&&(c[$.str]=(c[$.str]||0)+1),c),{})}}e._Code=r,e.nil=new r("");function u(d,...n){const c=[d[0]];let $=0;for(;$<n.length;)f(c,n[$]),c.push(d[++$]);return new r(c)}e._=u;const s=new r("+");function l(d,...n){const c=[w(d[0])];let $=0;for(;$<n.length;)c.push(s),f(c,n[$]),c.push(s,w(d[++$]));return p(c),new r(c)}e.str=l;function f(d,n){n instanceof r?d.push(...n._items):n instanceof o?d.push(n):d.push(E(n))}e.addCodeArg=f;function p(d){let n=1;for(;n<d.length-1;){if(d[n]===s){const c=_(d[n-1],d[n+1]);if(c!==void 0){d.splice(n-1,3,c);continue}d[n++]="+"}n++}}function _(d,n){if(n==='""')return d;if(d==='""')return n;if(typeof d=="string")return n instanceof o||d[d.length-1]!=='"'?void 0:typeof n!="string"?`${d.slice(0,-1)}${n}"`:n[0]==='"'?d.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(d instanceof o))return`"${d}${n.slice(1)}`}function y(d,n){return n.emptyStr()?d:d.emptyStr()?n:l`${d}${n}`}e.strConcat=y;function E(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:w(Array.isArray(d)?d.join(","):d)}function v(d){return new r(w(d))}e.stringify=v;function w(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function g(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new r(`.${d}`):u`[${d}]`}e.getProperty=g;function b(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new r(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=b;function a(d){return new r(d.toString())}e.regexpCode=a})(Ft)),Ft}var Lt={},fr;function hr(){return fr||(fr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=St();class o extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var r;(function(p){p[p.Started=0]="Started",p[p.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class u{constructor({prefixes:_,parent:y}={}){this._names={},this._prefixes=_,this._parent=y}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const y=this._names[_]||this._nameGroup(_);return`${_}${y.index++}`}_nameGroup(_){var y,E;if(!((E=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||E===void 0)&&E.has(_)||this._prefixes&&!this._prefixes.has(_))throw new Error(`CodeGen: prefix "${_}" is not allowed in this scope`);return this._names[_]={prefix:_,index:0}}}e.Scope=u;class s extends t.Name{constructor(_,y){super(y),this.prefix=_}setValue(_,{property:y,itemIndex:E}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(y)}[${E}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class f extends u{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?l:t.nil}}get(){return this._scope}name(_){return new s(_,this._newName(_))}value(_,y){var E;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(_),{prefix:w}=v,g=(E=y.key)!==null&&E!==void 0?E:y.ref;let b=this._values[w];if(b){const n=b.get(g);if(n)return n}else b=this._values[w]=new Map;b.set(g,v);const a=this._scope[w]||(this._scope[w]=[]),d=a.length;return a[d]=y.ref,v.setValue(y,{property:w,itemIndex:d}),v}getValue(_,y){const E=this._values[_];if(E)return E.get(y)}scopeRefs(_,y=this._values){return this._reduceValues(y,E=>{if(E.scopePath===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return(0,t._)`${_}${E.scopePath}`})}scopeCode(_=this._values,y,E){return this._reduceValues(_,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},y,E)}_reduceValues(_,y,E={},v){let w=t.nil;for(const g in _){const b=_[g];if(!b)continue;const a=E[g]=E[g]||new Map;b.forEach(d=>{if(a.has(d))return;a.set(d,r.Started);let n=y(d);if(n){const c=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${c} ${d} = ${n};${this.opts._n}`}else if(n=v?.(d))w=(0,t._)`${w}${n}${this.opts._n}`;else throw new o(d);a.set(d,r.Completed)})}return w}}e.ValueScope=f})(Lt)),Lt}var pr;function J(){return pr||(pr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=St(),o=hr();var r=St();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var u=hr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return u.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return u.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return u.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return u.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(h,P){return this}}class l extends s{constructor(h,P,I){super(),this.varKind=h,this.name=P,this.rhs=I}render({es5:h,_n:P}){const I=h?o.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${F};`+P}optimizeNames(h,P){if(h[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,h,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class f extends s{constructor(h,P,I){super(),this.lhs=h,this.rhs=P,this.sideEffects=I}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,P){if(!(this.lhs instanceof t.Name&&!h[this.lhs.str]&&!this.sideEffects))return this.rhs=B(this.rhs,h,P),this}get names(){const h=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(h,this.rhs)}}class p extends f{constructor(h,P,I,F){super(h,I,F),this.op=P}render({_n:h}){return`${this.lhs} ${this.op}= ${this.rhs};`+h}}class _ extends s{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`${this.label}:`+h}}class y extends s{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`break${this.label?` ${this.label}`:""};`+h}}class E extends s{constructor(h){super(),this.error=h}render({_n:h}){return`throw ${this.error};`+h}get names(){return this.error.names}}class v extends s{constructor(h){super(),this.code=h}render({_n:h}){return`${this.code};`+h}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(h,P){return this.code=B(this.code,h,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends s{constructor(h=[]){super(),this.nodes=h}render(h){return this.nodes.reduce((P,I)=>P+I.render(h),"")}optimizeNodes(){const{nodes:h}=this;let P=h.length;for(;P--;){const I=h[P].optimizeNodes();Array.isArray(I)?h.splice(P,1,...I):I?h[P]=I:h.splice(P,1)}return h.length>0?this:void 0}optimizeNames(h,P){const{nodes:I}=this;let F=I.length;for(;F--;){const U=I[F];U.optimizeNames(h,P)||(ee(h,U.names),I.splice(F,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((h,P)=>K(h,P.names),{})}}class g extends w{render(h){return"{"+h._n+super.render(h)+"}"+h._n}}class b extends w{}class a extends g{}a.kind="else";class d extends g{constructor(h,P){super(P),this.condition=h}render(h){let P=`if(${this.condition})`+super.render(h);return this.else&&(P+="else "+this.else.render(h)),P}optimizeNodes(){super.optimizeNodes();const h=this.condition;if(h===!0)return this.nodes;let P=this.else;if(P){const I=P.optimizeNodes();P=this.else=Array.isArray(I)?new a(I):I}if(P)return h===!1?P instanceof d?P:P.nodes:this.nodes.length?this:new d(oe(h),P instanceof d?[P]:P.nodes);if(!(h===!1||!this.nodes.length))return this}optimizeNames(h,P){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(h,P),!!(super.optimizeNames(h,P)||this.else))return this.condition=B(this.condition,h,P),this}get names(){const h=super.names;return z(h,this.condition),this.else&&K(h,this.else.names),h}}d.kind="if";class n extends g{}n.kind="for";class c extends n{constructor(h){super(),this.iteration=h}render(h){return`for(${this.iteration})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iteration=B(this.iteration,h,P),this}get names(){return K(super.names,this.iteration.names)}}class $ extends n{constructor(h,P,I,F){super(),this.varKind=h,this.name=P,this.from=I,this.to=F}render(h){const P=h.es5?o.varKinds.var:this.varKind,{name:I,from:F,to:U}=this;return`for(${P} ${I}=${F}; ${I}<${U}; ${I}++)`+super.render(h)}get names(){const h=z(super.names,this.from);return z(h,this.to)}}class i extends n{constructor(h,P,I,F){super(),this.loop=h,this.varKind=P,this.name=I,this.iterable=F}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iterable=B(this.iterable,h,P),this}get names(){return K(super.names,this.iterable.names)}}class m extends g{constructor(h,P,I){super(),this.name=h,this.args=P,this.async=I}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}}m.kind="func";class S extends w{render(h){return"return "+super.render(h)}}S.kind="return";class k extends g{render(h){let P="try"+super.render(h);return this.catch&&(P+=this.catch.render(h)),this.finally&&(P+=this.finally.render(h)),P}optimizeNodes(){var h,P;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(h,P){var I,F;return super.optimizeNames(h,P),(I=this.catch)===null||I===void 0||I.optimizeNames(h,P),(F=this.finally)===null||F===void 0||F.optimizeNames(h,P),this}get names(){const h=super.names;return this.catch&&K(h,this.catch.names),this.finally&&K(h,this.finally.names),h}}class T extends g{constructor(h){super(),this.error=h}render(h){return`catch(${this.error})`+super.render(h)}}T.kind="catch";class M extends g{render(h){return"finally"+super.render(h)}}M.kind="finally";class V{constructor(h,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
2
|
+
`:""},this._extScope=h,this._scope=new o.Scope({parent:h}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(h){return this._scope.name(h)}scopeName(h){return this._extScope.name(h)}scopeValue(h,P){const I=this._extScope.value(h,P);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(h,P){return this._extScope.getValue(h,P)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,P,I,F){const U=this._scope.toName(P);return I!==void 0&&F&&(this._constants[U.str]=I),this._leafNode(new l(h,U,I)),U}const(h,P,I){return this._def(o.varKinds.const,h,P,I)}let(h,P,I){return this._def(o.varKinds.let,h,P,I)}var(h,P,I){return this._def(o.varKinds.var,h,P,I)}assign(h,P,I){return this._leafNode(new f(h,P,I))}add(h,P){return this._leafNode(new p(h,e.operators.ADD,P))}code(h){return typeof h=="function"?h():h!==t.nil&&this._leafNode(new v(h)),this}object(...h){const P=["{"];for(const[I,F]of h)P.length>1&&P.push(","),P.push(I),(I!==F||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,F));return P.push("}"),new t._Code(P)}if(h,P,I){if(this._blockNode(new d(h)),P&&I)this.code(P).else().code(I).endIf();else if(P)this.code(P).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new d(h))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(d,a)}_for(h,P){return this._blockNode(h),P&&this.code(P).endFor(),this}for(h,P){return this._for(new c(h),P)}forRange(h,P,I,F,U=this.opts.es5?o.varKinds.var:o.varKinds.let){const Z=this._scope.toName(h);return this._for(new $(U,Z,P,I),()=>F(Z))}forOf(h,P,I,F=o.varKinds.const){const U=this._scope.toName(h);if(this.opts.es5){const Z=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${Z}.length`,W=>{this.var(U,(0,t._)`${Z}[${W}]`),I(U)})}return this._for(new i("of",F,U,P),()=>I(U))}forIn(h,P,I,F=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,(0,t._)`Object.keys(${P})`,I);const U=this._scope.toName(h);return this._for(new i("in",F,U,P),()=>I(U))}endFor(){return this._endBlockNode(n)}label(h){return this._leafNode(new _(h))}break(h){return this._leafNode(new y(h))}return(h){const P=new S;if(this._blockNode(P),this.code(h),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(h,P,I){if(!P&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new k;if(this._blockNode(F),this.code(h),P){const U=this.name("e");this._currNode=F.catch=new T(U),P(U)}return I&&(this._currNode=F.finally=new M,this.code(I)),this._endBlockNode(T,M)}throw(h){return this._leafNode(new E(h))}block(h,P){return this._blockStarts.push(this._nodes.length),h&&this.code(h).endBlock(P),this}endBlock(h){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-P;if(I<0||h!==void 0&&I!==h)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${h} expected`);return this._nodes.length=P,this}func(h,P=t.nil,I,F){return this._blockNode(new m(h,P,I)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(h=1){for(;h-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(h){return this._currNode.nodes.push(h),this}_blockNode(h){this._currNode.nodes.push(h),this._nodes.push(h)}_endBlockNode(h,P){const I=this._currNode;if(I instanceof h||P&&I instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${h.kind}/${P.kind}`:h.kind}"`)}_elseNode(h){const P=this._currNode;if(!(P instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=h,this}get _root(){return this._nodes[0]}get _currNode(){const h=this._nodes;return h[h.length-1]}set _currNode(h){const P=this._nodes;P[P.length-1]=h}}e.CodeGen=V;function K(N,h){for(const P in h)N[P]=(N[P]||0)+(h[P]||0);return N}function z(N,h){return h instanceof t._CodeOrName?K(N,h.names):N}function B(N,h,P){if(N instanceof t.Name)return I(N);if(!F(N))return N;return new t._Code(N._items.reduce((U,Z)=>(Z instanceof t.Name&&(Z=I(Z)),Z instanceof t._Code?U.push(...Z._items):U.push(Z),U),[]));function I(U){const Z=P[U.str];return Z===void 0||h[U.str]!==1?U:(delete h[U.str],Z)}function F(U){return U instanceof t._Code&&U._items.some(Z=>Z instanceof t.Name&&h[Z.str]===1&&P[Z.str]!==void 0)}}function ee(N,h){for(const P in h)N[P]=(N[P]||0)-(h[P]||0)}function oe(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,t._)`!${C(N)}`}e.not=oe;const x=R(e.operators.AND);function Y(...N){return N.reduce(x)}e.and=Y;const _e=R(e.operators.OR);function A(...N){return N.reduce(_e)}e.or=A;function R(N){return(h,P)=>h===t.nil?P:P===t.nil?h:(0,t._)`${C(h)} ${N} ${C(P)}`}function C(N){return N instanceof t.Name?N:(0,t._)`(${N})`}})(Vt)),Vt}var H={},mr;function Q(){if(mr)return H;mr=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),t=St();function o(i){const m={};for(const S of i)m[S]=!0;return m}H.toHash=o;function r(i,m){return typeof m=="boolean"?m:Object.keys(m).length===0?!0:(u(i,m),!s(m,i.self.RULES.all))}H.alwaysValidSchema=r;function u(i,m=i.schema){const{opts:S,self:k}=i;if(!S.strictSchema||typeof m=="boolean")return;const T=k.RULES.keywords;for(const M in m)T[M]||$(i,`unknown keyword: "${M}"`)}H.checkUnknownRules=u;function s(i,m){if(typeof i=="boolean")return!i;for(const S in i)if(m[S])return!0;return!1}H.schemaHasRules=s;function l(i,m){if(typeof i=="boolean")return!i;for(const S in i)if(S!=="$ref"&&m.all[S])return!0;return!1}H.schemaHasRulesButRef=l;function f({topSchemaRef:i,schemaPath:m},S,k,T){if(!T){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${i}${m}${(0,e.getProperty)(k)}`}H.schemaRefOrVal=f;function p(i){return E(decodeURIComponent(i))}H.unescapeFragment=p;function _(i){return encodeURIComponent(y(i))}H.escapeFragment=_;function y(i){return typeof i=="number"?`${i}`:i.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=y;function E(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=E;function v(i,m){if(Array.isArray(i))for(const S of i)m(S);else m(i)}H.eachItem=v;function w({mergeNames:i,mergeToName:m,mergeValues:S,resultToName:k}){return(T,M,V,K)=>{const z=V===void 0?M:V instanceof e.Name?(M instanceof e.Name?i(T,M,V):m(T,M,V),V):M instanceof e.Name?(m(T,V,M),M):S(M,V);return K===e.Name&&!(z instanceof e.Name)?k(T,z):z}}H.mergeEvaluated={props:w({mergeNames:(i,m,S)=>i.if((0,e._)`${S} !== true && ${m} !== undefined`,()=>{i.if((0,e._)`${m} === true`,()=>i.assign(S,!0),()=>i.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${m})`))}),mergeToName:(i,m,S)=>i.if((0,e._)`${S} !== true`,()=>{m===!0?i.assign(S,!0):(i.assign(S,(0,e._)`${S} || {}`),b(i,S,m))}),mergeValues:(i,m)=>i===!0?!0:{...i,...m},resultToName:g}),items:w({mergeNames:(i,m,S)=>i.if((0,e._)`${S} !== true && ${m} !== undefined`,()=>i.assign(S,(0,e._)`${m} === true ? true : ${S} > ${m} ? ${S} : ${m}`)),mergeToName:(i,m,S)=>i.if((0,e._)`${S} !== true`,()=>i.assign(S,m===!0?!0:(0,e._)`${S} > ${m} ? ${S} : ${m}`)),mergeValues:(i,m)=>i===!0?!0:Math.max(i,m),resultToName:(i,m)=>i.var("items",m)})};function g(i,m){if(m===!0)return i.var("props",!0);const S=i.var("props",(0,e._)`{}`);return m!==void 0&&b(i,S,m),S}H.evaluatedPropsToName=g;function b(i,m,S){Object.keys(S).forEach(k=>i.assign((0,e._)`${m}${(0,e.getProperty)(k)}`,!0))}H.setEvaluated=b;const a={};function d(i,m){return i.scopeValue("func",{ref:m,code:a[m.code]||(a[m.code]=new t._Code(m.code))})}H.useFunc=d;var n;(function(i){i[i.Num=0]="Num",i[i.Str=1]="Str"})(n||(H.Type=n={}));function c(i,m,S){if(i instanceof e.Name){const k=m===n.Num;return S?k?(0,e._)`"[" + ${i} + "]"`:(0,e._)`"['" + ${i} + "']"`:k?(0,e._)`"/" + ${i}`:(0,e._)`"/" + ${i}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(i).toString():"/"+y(i)}H.getErrorPath=c;function $(i,m,S=i.opts.strictSchema){if(S){if(m=`strict mode: ${m}`,S===!0)throw new Error(m);i.self.logger.warn(m)}}return H.checkStrictMode=$,H}var Ve={},yr;function we(){if(yr)return Ve;yr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e=J(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ve.default=t,Ve}var gr;function jt(){return gr||(gr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=J(),o=Q(),r=we();e.keywordError={message:({keyword:a})=>(0,t.str)`must pass "${a}" keyword validation`},e.keyword$DataError={message:({keyword:a,schemaType:d})=>d?(0,t.str)`"${a}" keyword must be ${d} ($data)`:(0,t.str)`"${a}" keyword is invalid ($data)`};function u(a,d=e.keywordError,n,c){const{it:$}=a,{gen:i,compositeRule:m,allErrors:S}=$,k=E(a,d,n);c??(m||S)?p(i,k):_($,(0,t._)`[${k}]`)}e.reportError=u;function s(a,d=e.keywordError,n){const{it:c}=a,{gen:$,compositeRule:i,allErrors:m}=c,S=E(a,d,n);p($,S),i||m||_(c,r.default.vErrors)}e.reportExtraError=s;function l(a,d){a.assign(r.default.errors,d),a.if((0,t._)`${r.default.vErrors} !== null`,()=>a.if(d,()=>a.assign((0,t._)`${r.default.vErrors}.length`,d),()=>a.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function f({gen:a,keyword:d,schemaValue:n,data:c,errsCount:$,it:i}){if($===void 0)throw new Error("ajv implementation error");const m=a.name("err");a.forRange("i",$,r.default.errors,S=>{a.const(m,(0,t._)`${r.default.vErrors}[${S}]`),a.if((0,t._)`${m}.instancePath === undefined`,()=>a.assign((0,t._)`${m}.instancePath`,(0,t.strConcat)(r.default.instancePath,i.errorPath))),a.assign((0,t._)`${m}.schemaPath`,(0,t.str)`${i.errSchemaPath}/${d}`),i.opts.verbose&&(a.assign((0,t._)`${m}.schema`,n),a.assign((0,t._)`${m}.data`,c))})}e.extendErrors=f;function p(a,d){const n=a.const("err",d);a.if((0,t._)`${r.default.vErrors} === null`,()=>a.assign(r.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${r.default.vErrors}.push(${n})`),a.code((0,t._)`${r.default.errors}++`)}function _(a,d){const{gen:n,validateName:c,schemaEnv:$}=a;$.$async?n.throw((0,t._)`new ${a.ValidationError}(${d})`):(n.assign((0,t._)`${c}.errors`,d),n.return(!1))}const y={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function E(a,d,n){const{createErrors:c}=a.it;return c===!1?(0,t._)`{}`:v(a,d,n)}function v(a,d,n={}){const{gen:c,it:$}=a,i=[w($,n),g(a,n)];return b(a,d,i),c.object(...i)}function w({errorPath:a},{instancePath:d}){const n=d?(0,t.str)`${a}${(0,o.getErrorPath)(d,o.Type.Str)}`:a;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,n)]}function g({keyword:a,it:{errSchemaPath:d}},{schemaPath:n,parentSchema:c}){let $=c?d:(0,t.str)`${d}/${a}`;return n&&($=(0,t.str)`${$}${(0,o.getErrorPath)(n,o.Type.Str)}`),[y.schemaPath,$]}function b(a,{params:d,message:n},c){const{keyword:$,data:i,schemaValue:m,it:S}=a,{opts:k,propertyName:T,topSchemaRef:M,schemaPath:V}=S;c.push([y.keyword,$],[y.params,typeof d=="function"?d(a):d||(0,t._)`{}`]),k.messages&&c.push([y.message,typeof n=="function"?n(a):n]),k.verbose&&c.push([y.schema,m],[y.parentSchema,(0,t._)`${M}${V}`],[r.default.data,i]),T&&c.push([y.propertyName,T])}})(Dt)),Dt}var _r;function _s(){if(_r)return be;_r=1,Object.defineProperty(be,"__esModule",{value:!0}),be.boolOrEmptySchema=be.topBoolOrEmptySchema=void 0;const e=jt(),t=J(),o=we(),r={message:"boolean schema is false"};function u(f){const{gen:p,schema:_,validateName:y}=f;_===!1?l(f,!1):typeof _=="object"&&_.$async===!0?p.return(o.default.data):(p.assign((0,t._)`${y}.errors`,null),p.return(!0))}be.topBoolOrEmptySchema=u;function s(f,p){const{gen:_,schema:y}=f;y===!1?(_.var(p,!1),l(f)):_.var(p,!0)}be.boolOrEmptySchema=s;function l(f,p){const{gen:_,data:y}=f,E={gen:_,keyword:"false schema",data:y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,e.reportError)(E,r,void 0,p)}return be}var ne={},Se={},vr;function Dn(){if(vr)return Se;vr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.getRules=Se.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function o(u){return typeof u=="string"&&t.has(u)}Se.isJSONType=o;function r(){const u={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...u,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},u.number,u.string,u.array,u.object],post:{rules:[]},all:{},keywords:{}}}return Se.getRules=r,Se}var ye={},$r;function Vn(){if($r)return ye;$r=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:r,self:u},s){const l=u.RULES.types[s];return l&&l!==!0&&t(r,l)}ye.schemaHasRulesForType=e;function t(r,u){return u.rules.some(s=>o(r,s))}ye.shouldUseGroup=t;function o(r,u){var s;return r[u.keyword]!==void 0||((s=u.definition.implements)===null||s===void 0?void 0:s.some(l=>r[l]!==void 0))}return ye.shouldUseRule=o,ye}var wr;function Et(){if(wr)return ne;wr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.reportTypeError=ne.checkDataTypes=ne.checkDataType=ne.coerceAndCheckDataType=ne.getJSONTypes=ne.getSchemaTypes=ne.DataType=void 0;const e=Dn(),t=Vn(),o=jt(),r=J(),u=Q();var s;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(s||(ne.DataType=s={}));function l(n){const c=f(n.type);if(c.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!c.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&c.push("null")}return c}ne.getSchemaTypes=l;function f(n){const c=Array.isArray(n)?n:n?[n]:[];if(c.every(e.isJSONType))return c;throw new Error("type must be JSONType or JSONType[]: "+c.join(","))}ne.getJSONTypes=f;function p(n,c){const{gen:$,data:i,opts:m}=n,S=y(c,m.coerceTypes),k=c.length>0&&!(S.length===0&&c.length===1&&(0,t.schemaHasRulesForType)(n,c[0]));if(k){const T=g(c,i,m.strictNumbers,s.Wrong);$.if(T,()=>{S.length?E(n,c,S):a(n)})}return k}ne.coerceAndCheckDataType=p;const _=new Set(["string","number","integer","boolean","null"]);function y(n,c){return c?n.filter($=>_.has($)||c==="array"&&$==="array"):[]}function E(n,c,$){const{gen:i,data:m,opts:S}=n,k=i.let("dataType",(0,r._)`typeof ${m}`),T=i.let("coerced",(0,r._)`undefined`);S.coerceTypes==="array"&&i.if((0,r._)`${k} == 'object' && Array.isArray(${m}) && ${m}.length == 1`,()=>i.assign(m,(0,r._)`${m}[0]`).assign(k,(0,r._)`typeof ${m}`).if(g(c,m,S.strictNumbers),()=>i.assign(T,m))),i.if((0,r._)`${T} !== undefined`);for(const V of $)(_.has(V)||V==="array"&&S.coerceTypes==="array")&&M(V);i.else(),a(n),i.endIf(),i.if((0,r._)`${T} !== undefined`,()=>{i.assign(m,T),v(n,T)});function M(V){switch(V){case"string":i.elseIf((0,r._)`${k} == "number" || ${k} == "boolean"`).assign(T,(0,r._)`"" + ${m}`).elseIf((0,r._)`${m} === null`).assign(T,(0,r._)`""`);return;case"number":i.elseIf((0,r._)`${k} == "boolean" || ${m} === null
|
|
3
|
+
|| (${k} == "string" && ${m} && ${m} == +${m})`).assign(T,(0,r._)`+${m}`);return;case"integer":i.elseIf((0,r._)`${k} === "boolean" || ${m} === null
|
|
4
|
+
|| (${k} === "string" && ${m} && ${m} == +${m} && !(${m} % 1))`).assign(T,(0,r._)`+${m}`);return;case"boolean":i.elseIf((0,r._)`${m} === "false" || ${m} === 0 || ${m} === null`).assign(T,!1).elseIf((0,r._)`${m} === "true" || ${m} === 1`).assign(T,!0);return;case"null":i.elseIf((0,r._)`${m} === "" || ${m} === 0 || ${m} === false`),i.assign(T,null);return;case"array":i.elseIf((0,r._)`${k} === "string" || ${k} === "number"
|
|
5
|
+
|| ${k} === "boolean" || ${m} === null`).assign(T,(0,r._)`[${m}]`)}}}function v({gen:n,parentData:c,parentDataProperty:$},i){n.if((0,r._)`${c} !== undefined`,()=>n.assign((0,r._)`${c}[${$}]`,i))}function w(n,c,$,i=s.Correct){const m=i===s.Correct?r.operators.EQ:r.operators.NEQ;let S;switch(n){case"null":return(0,r._)`${c} ${m} null`;case"array":S=(0,r._)`Array.isArray(${c})`;break;case"object":S=(0,r._)`${c} && typeof ${c} == "object" && !Array.isArray(${c})`;break;case"integer":S=k((0,r._)`!(${c} % 1) && !isNaN(${c})`);break;case"number":S=k();break;default:return(0,r._)`typeof ${c} ${m} ${n}`}return i===s.Correct?S:(0,r.not)(S);function k(T=r.nil){return(0,r.and)((0,r._)`typeof ${c} == "number"`,T,$?(0,r._)`isFinite(${c})`:r.nil)}}ne.checkDataType=w;function g(n,c,$,i){if(n.length===1)return w(n[0],c,$,i);let m;const S=(0,u.toHash)(n);if(S.array&&S.object){const k=(0,r._)`typeof ${c} != "object"`;m=S.null?k:(0,r._)`!${c} || ${k}`,delete S.null,delete S.array,delete S.object}else m=r.nil;S.number&&delete S.integer;for(const k in S)m=(0,r.and)(m,w(k,c,$,i));return m}ne.checkDataTypes=g;const b={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:c})=>typeof n=="string"?(0,r._)`{type: ${n}}`:(0,r._)`{type: ${c}}`};function a(n){const c=d(n);(0,o.reportError)(c,b)}ne.reportTypeError=a;function d(n){const{gen:c,data:$,schema:i}=n,m=(0,u.schemaRefOrVal)(n,i,"type");return{gen:c,keyword:"type",data:$,schema:i.type,schemaCode:m,schemaValue:m,parentSchema:i,params:{},it:n}}return ne}var Te={},br;function vs(){if(br)return Te;br=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.assignDefaults=void 0;const e=J(),t=Q();function o(u,s){const{properties:l,items:f}=u.schema;if(s==="object"&&l)for(const p in l)r(u,p,l[p].default);else s==="array"&&Array.isArray(f)&&f.forEach((p,_)=>r(u,_,p.default))}Te.assignDefaults=o;function r(u,s,l){const{gen:f,compositeRule:p,data:_,opts:y}=u;if(l===void 0)return;const E=(0,e._)`${_}${(0,e.getProperty)(s)}`;if(p){(0,t.checkStrictMode)(u,`default is ignored for: ${E}`);return}let v=(0,e._)`${E} === undefined`;y.useDefaults==="empty"&&(v=(0,e._)`${v} || ${E} === null || ${E} === ""`),f.if(v,(0,e._)`${E} = ${(0,e.stringify)(l)}`)}return Te}var he={},X={},Sr;function pe(){if(Sr)return X;Sr=1,Object.defineProperty(X,"__esModule",{value:!0}),X.validateUnion=X.validateArray=X.usePattern=X.callValidateCode=X.schemaProperties=X.allSchemaProperties=X.noPropertyInData=X.propertyInData=X.isOwnProperty=X.hasPropFunc=X.reportMissingProp=X.checkMissingProp=X.checkReportMissingProp=void 0;const e=J(),t=Q(),o=we(),r=Q();function u(n,c){const{gen:$,data:i,it:m}=n;$.if(y($,i,c,m.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${c}`},!0),n.error()})}X.checkReportMissingProp=u;function s({gen:n,data:c,it:{opts:$}},i,m){return(0,e.or)(...i.map(S=>(0,e.and)(y(n,c,S,$.ownProperties),(0,e._)`${m} = ${S}`)))}X.checkMissingProp=s;function l(n,c){n.setParams({missingProperty:c},!0),n.error()}X.reportMissingProp=l;function f(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}X.hasPropFunc=f;function p(n,c,$){return(0,e._)`${f(n)}.call(${c}, ${$})`}X.isOwnProperty=p;function _(n,c,$,i){const m=(0,e._)`${c}${(0,e.getProperty)($)} !== undefined`;return i?(0,e._)`${m} && ${p(n,c,$)}`:m}X.propertyInData=_;function y(n,c,$,i){const m=(0,e._)`${c}${(0,e.getProperty)($)} === undefined`;return i?(0,e.or)(m,(0,e.not)(p(n,c,$))):m}X.noPropertyInData=y;function E(n){return n?Object.keys(n).filter(c=>c!=="__proto__"):[]}X.allSchemaProperties=E;function v(n,c){return E(c).filter($=>!(0,t.alwaysValidSchema)(n,c[$]))}X.schemaProperties=v;function w({schemaCode:n,data:c,it:{gen:$,topSchemaRef:i,schemaPath:m,errorPath:S},it:k},T,M,V){const K=V?(0,e._)`${n}, ${c}, ${i}${m}`:c,z=[[o.default.instancePath,(0,e.strConcat)(o.default.instancePath,S)],[o.default.parentData,k.parentData],[o.default.parentDataProperty,k.parentDataProperty],[o.default.rootData,o.default.rootData]];k.opts.dynamicRef&&z.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const B=(0,e._)`${K}, ${$.object(...z)}`;return M!==e.nil?(0,e._)`${T}.call(${M}, ${B})`:(0,e._)`${T}(${B})`}X.callValidateCode=w;const g=(0,e._)`new RegExp`;function b({gen:n,it:{opts:c}},$){const i=c.unicodeRegExp?"u":"",{regExp:m}=c.code,S=m($,i);return n.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${m.code==="new RegExp"?g:(0,r.useFunc)(n,m)}(${$}, ${i})`})}X.usePattern=b;function a(n){const{gen:c,data:$,keyword:i,it:m}=n,S=c.name("valid");if(m.allErrors){const T=c.let("valid",!0);return k(()=>c.assign(T,!1)),T}return c.var(S,!0),k(()=>c.break()),S;function k(T){const M=c.const("len",(0,e._)`${$}.length`);c.forRange("i",0,M,V=>{n.subschema({keyword:i,dataProp:V,dataPropType:t.Type.Num},S),c.if((0,e.not)(S),T)})}}X.validateArray=a;function d(n){const{gen:c,schema:$,keyword:i,it:m}=n;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(M=>(0,t.alwaysValidSchema)(m,M))&&!m.opts.unevaluated)return;const k=c.let("valid",!1),T=c.name("_valid");c.block(()=>$.forEach((M,V)=>{const K=n.subschema({keyword:i,schemaProp:V,compositeRule:!0},T);c.assign(k,(0,e._)`${k} || ${T}`),n.mergeValidEvaluated(K,T)||c.if((0,e.not)(k))})),n.result(k,()=>n.reset(),()=>n.error(!0))}return X.validateUnion=d,X}var Er;function $s(){if(Er)return he;Er=1,Object.defineProperty(he,"__esModule",{value:!0}),he.validateKeywordUsage=he.validSchemaType=he.funcKeywordCode=he.macroKeywordCode=void 0;const e=J(),t=we(),o=pe(),r=jt();function u(v,w){const{gen:g,keyword:b,schema:a,parentSchema:d,it:n}=v,c=w.macro.call(n.self,a,d,n),$=_(g,b,c);n.opts.validateSchema!==!1&&n.self.validateSchema(c,!0);const i=g.name("valid");v.subschema({schema:c,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${b}`,topSchemaRef:$,compositeRule:!0},i),v.pass(i,()=>v.error(!0))}he.macroKeywordCode=u;function s(v,w){var g;const{gen:b,keyword:a,schema:d,parentSchema:n,$data:c,it:$}=v;p($,w);const i=!c&&w.compile?w.compile.call($.self,d,n,$):w.validate,m=_(b,a,i),S=b.let("valid");v.block$data(S,k),v.ok((g=w.valid)!==null&&g!==void 0?g:S);function k(){if(w.errors===!1)V(),w.modifying&&l(v),K(()=>v.error());else{const z=w.async?T():M();w.modifying&&l(v),K(()=>f(v,z))}}function T(){const z=b.let("ruleErrs",null);return b.try(()=>V((0,e._)`await `),B=>b.assign(S,!1).if((0,e._)`${B} instanceof ${$.ValidationError}`,()=>b.assign(z,(0,e._)`${B}.errors`),()=>b.throw(B))),z}function M(){const z=(0,e._)`${m}.errors`;return b.assign(z,null),V(e.nil),z}function V(z=w.async?(0,e._)`await `:e.nil){const B=$.opts.passContext?t.default.this:t.default.self,ee=!("compile"in w&&!c||w.schema===!1);b.assign(S,(0,e._)`${z}${(0,o.callValidateCode)(v,m,B,ee)}`,w.modifying)}function K(z){var B;b.if((0,e.not)((B=w.valid)!==null&&B!==void 0?B:S),z)}}he.funcKeywordCode=s;function l(v){const{gen:w,data:g,it:b}=v;w.if(b.parentData,()=>w.assign(g,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function f(v,w){const{gen:g}=v;g.if((0,e._)`Array.isArray(${w})`,()=>{g.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${w} : ${t.default.vErrors}.concat(${w})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(v)},()=>v.error())}function p({schemaEnv:v},w){if(w.async&&!v.$async)throw new Error("async keyword in sync schema")}function _(v,w,g){if(g===void 0)throw new Error(`keyword "${w}" failed to compile`);return v.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,e.stringify)(g)})}function y(v,w,g=!1){return!w.length||w.some(b=>b==="array"?Array.isArray(v):b==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==b||g&&typeof v>"u")}he.validSchemaType=y;function E({schema:v,opts:w,self:g,errSchemaPath:b},a,d){if(Array.isArray(a.keyword)?!a.keyword.includes(d):a.keyword!==d)throw new Error("ajv implementation error");const n=a.dependencies;if(n?.some(c=>!Object.prototype.hasOwnProperty.call(v,c)))throw new Error(`parent schema must have dependencies of ${d}: ${n.join(",")}`);if(a.validateSchema&&!a.validateSchema(v[d])){const $=`keyword "${d}" value is invalid at path "${b}": `+g.errorsText(a.validateSchema.errors);if(w.validateSchema==="log")g.logger.error($);else throw new Error($)}}return he.validateKeywordUsage=E,he}var ge={},Pr;function ws(){if(Pr)return ge;Pr=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.extendSubschemaMode=ge.extendSubschemaData=ge.getSubschema=void 0;const e=J(),t=Q();function o(s,{keyword:l,schemaProp:f,schema:p,schemaPath:_,errSchemaPath:y,topSchemaRef:E}){if(l!==void 0&&p!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const v=s.schema[l];return f===void 0?{schema:v,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:v[f],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(f)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(f)}`}}if(p!==void 0){if(_===void 0||y===void 0||E===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:p,schemaPath:_,topSchemaRef:E,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}ge.getSubschema=o;function r(s,l,{dataProp:f,dataPropType:p,data:_,dataTypes:y,propertyName:E}){if(_!==void 0&&f!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=l;if(f!==void 0){const{errorPath:g,dataPathArr:b,opts:a}=l,d=v.let("data",(0,e._)`${l.data}${(0,e.getProperty)(f)}`,!0);w(d),s.errorPath=(0,e.str)`${g}${(0,t.getErrorPath)(f,p,a.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${f}`,s.dataPathArr=[...b,s.parentDataProperty]}if(_!==void 0){const g=_ instanceof e.Name?_:v.let("data",_,!0);w(g),E!==void 0&&(s.propertyName=E)}y&&(s.dataTypes=y);function w(g){s.data=g,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,g]}}ge.extendSubschemaData=r;function u(s,{jtdDiscriminator:l,jtdMetadata:f,compositeRule:p,createErrors:_,allErrors:y}){p!==void 0&&(s.compositeRule=p),_!==void 0&&(s.createErrors=_),y!==void 0&&(s.allErrors=y),s.jtdDiscriminator=l,s.jtdMetadata=f}return ge.extendSubschemaMode=u,ge}var ie={},Ut,jr;function Fn(){return jr||(jr=1,Ut=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,u,s;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(u=r;u--!==0;)if(!e(t[u],o[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(o).length)return!1;for(u=r;u--!==0;)if(!Object.prototype.hasOwnProperty.call(o,s[u]))return!1;for(u=r;u--!==0;){var l=s[u];if(!e(t[l],o[l]))return!1}return!0}return t!==t&&o!==o}),Ut}var zt={exports:{}},kr;function bs(){if(kr)return zt.exports;kr=1;var e=zt.exports=function(r,u,s){typeof u=="function"&&(s=u,u={}),s=u.cb||s;var l=typeof s=="function"?s:s.pre||function(){},f=s.post||function(){};t(u,l,f,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,u,s,l,f,p,_,y,E,v){if(l&&typeof l=="object"&&!Array.isArray(l)){u(l,f,p,_,y,E,v);for(var w in l){var g=l[w];if(Array.isArray(g)){if(w in e.arrayKeywords)for(var b=0;b<g.length;b++)t(r,u,s,g[b],f+"/"+w+"/"+b,p,f,w,l,b)}else if(w in e.propsKeywords){if(g&&typeof g=="object")for(var a in g)t(r,u,s,g[a],f+"/"+w+"/"+o(a),p,f,w,l,a)}else(w in e.keywords||r.allKeys&&!(w in e.skipKeywords))&&t(r,u,s,g,f+"/"+w,p,f,w,l)}s(l,f,p,_,y,E,v)}}function o(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return zt.exports}var Rr;function kt(){if(Rr)return ie;Rr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.getSchemaRefs=ie.resolveUrl=ie.normalizeId=ie._getFullPath=ie.getFullPath=ie.inlineRef=void 0;const e=Q(),t=Fn(),o=bs(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function u(b,a=!0){return typeof b=="boolean"?!0:a===!0?!l(b):a?f(b)<=a:!1}ie.inlineRef=u;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(b){for(const a in b){if(s.has(a))return!0;const d=b[a];if(Array.isArray(d)&&d.some(l)||typeof d=="object"&&l(d))return!0}return!1}function f(b){let a=0;for(const d in b){if(d==="$ref")return 1/0;if(a++,!r.has(d)&&(typeof b[d]=="object"&&(0,e.eachItem)(b[d],n=>a+=f(n)),a===1/0))return 1/0}return a}function p(b,a="",d){d!==!1&&(a=E(a));const n=b.parse(a);return _(b,n)}ie.getFullPath=p;function _(b,a){return b.serialize(a).split("#")[0]+"#"}ie._getFullPath=_;const y=/#\/?$/;function E(b){return b?b.replace(y,""):""}ie.normalizeId=E;function v(b,a,d){return d=E(d),b.resolve(a,d)}ie.resolveUrl=v;const w=/^[a-z_][-a-z0-9._]*$/i;function g(b,a){if(typeof b=="boolean")return{};const{schemaId:d,uriResolver:n}=this.opts,c=E(b[d]||a),$={"":c},i=p(n,c,!1),m={},S=new Set;return o(b,{allKeys:!0},(M,V,K,z)=>{if(z===void 0)return;const B=i+V;let ee=$[z];typeof M[d]=="string"&&(ee=oe.call(this,M[d])),x.call(this,M.$anchor),x.call(this,M.$dynamicAnchor),$[V]=ee;function oe(Y){const _e=this.opts.uriResolver.resolve;if(Y=E(ee?_e(ee,Y):Y),S.has(Y))throw T(Y);S.add(Y);let A=this.refs[Y];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?k(M,A.schema,Y):Y!==E(B)&&(Y[0]==="#"?(k(M,m[Y],Y),m[Y]=M):this.refs[Y]=B),Y}function x(Y){if(typeof Y=="string"){if(!w.test(Y))throw new Error(`invalid anchor "${Y}"`);oe.call(this,`#${Y}`)}}}),m;function k(M,V,K){if(V!==void 0&&!t(M,V))throw T(K)}function T(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return ie.getSchemaRefs=g,ie}var Or;function Rt(){if(Or)return me;Or=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=_s(),t=Et(),o=Vn(),r=Et(),u=vs(),s=$s(),l=ws(),f=J(),p=we(),_=kt(),y=Q(),E=jt();function v(j){if(i(j)&&(S(j),$(j))){a(j);return}w(j,()=>(0,e.topBoolOrEmptySchema)(j))}me.validateFunctionCode=v;function w({gen:j,validateName:O,schema:q,schemaEnv:D,opts:L},G){L.code.es5?j.func(O,(0,f._)`${p.default.data}, ${p.default.valCxt}`,D.$async,()=>{j.code((0,f._)`"use strict"; ${n(q,L)}`),b(j,L),j.code(G)}):j.func(O,(0,f._)`${p.default.data}, ${g(L)}`,D.$async,()=>j.code(n(q,L)).code(G))}function g(j){return(0,f._)`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${j.dynamicRef?(0,f._)`, ${p.default.dynamicAnchors}={}`:f.nil}}={}`}function b(j,O){j.if(p.default.valCxt,()=>{j.var(p.default.instancePath,(0,f._)`${p.default.valCxt}.${p.default.instancePath}`),j.var(p.default.parentData,(0,f._)`${p.default.valCxt}.${p.default.parentData}`),j.var(p.default.parentDataProperty,(0,f._)`${p.default.valCxt}.${p.default.parentDataProperty}`),j.var(p.default.rootData,(0,f._)`${p.default.valCxt}.${p.default.rootData}`),O.dynamicRef&&j.var(p.default.dynamicAnchors,(0,f._)`${p.default.valCxt}.${p.default.dynamicAnchors}`)},()=>{j.var(p.default.instancePath,(0,f._)`""`),j.var(p.default.parentData,(0,f._)`undefined`),j.var(p.default.parentDataProperty,(0,f._)`undefined`),j.var(p.default.rootData,p.default.data),O.dynamicRef&&j.var(p.default.dynamicAnchors,(0,f._)`{}`)})}function a(j){const{schema:O,opts:q,gen:D}=j;w(j,()=>{q.$comment&&O.$comment&&z(j),M(j),D.let(p.default.vErrors,null),D.let(p.default.errors,0),q.unevaluated&&d(j),k(j),B(j)})}function d(j){const{gen:O,validateName:q}=j;j.evaluated=O.const("evaluated",(0,f._)`${q}.evaluated`),O.if((0,f._)`${j.evaluated}.dynamicProps`,()=>O.assign((0,f._)`${j.evaluated}.props`,(0,f._)`undefined`)),O.if((0,f._)`${j.evaluated}.dynamicItems`,()=>O.assign((0,f._)`${j.evaluated}.items`,(0,f._)`undefined`))}function n(j,O){const q=typeof j=="object"&&j[O.schemaId];return q&&(O.code.source||O.code.process)?(0,f._)`/*# sourceURL=${q} */`:f.nil}function c(j,O){if(i(j)&&(S(j),$(j))){m(j,O);return}(0,e.boolOrEmptySchema)(j,O)}function $({schema:j,self:O}){if(typeof j=="boolean")return!j;for(const q in j)if(O.RULES.all[q])return!0;return!1}function i(j){return typeof j.schema!="boolean"}function m(j,O){const{schema:q,gen:D,opts:L}=j;L.$comment&&q.$comment&&z(j),V(j),K(j);const G=D.const("_errs",p.default.errors);k(j,G),D.var(O,(0,f._)`${G} === ${p.default.errors}`)}function S(j){(0,y.checkUnknownRules)(j),T(j)}function k(j,O){if(j.opts.jtd)return oe(j,[],!1,O);const q=(0,t.getSchemaTypes)(j.schema),D=(0,t.coerceAndCheckDataType)(j,q);oe(j,q,!D,O)}function T(j){const{schema:O,errSchemaPath:q,opts:D,self:L}=j;O.$ref&&D.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(O,L.RULES)&&L.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function M(j){const{schema:O,opts:q}=j;O.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,y.checkStrictMode)(j,"default is ignored in the schema root")}function V(j){const O=j.schema[j.opts.schemaId];O&&(j.baseId=(0,_.resolveUrl)(j.opts.uriResolver,j.baseId,O))}function K(j){if(j.schema.$async&&!j.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:j,schemaEnv:O,schema:q,errSchemaPath:D,opts:L}){const G=q.$comment;if(L.$comment===!0)j.code((0,f._)`${p.default.self}.logger.log(${G})`);else if(typeof L.$comment=="function"){const te=(0,f.str)`${D}/$comment`,fe=j.scopeValue("root",{ref:O.root});j.code((0,f._)`${p.default.self}.opts.$comment(${G}, ${te}, ${fe}.schema)`)}}function B(j){const{gen:O,schemaEnv:q,validateName:D,ValidationError:L,opts:G}=j;q.$async?O.if((0,f._)`${p.default.errors} === 0`,()=>O.return(p.default.data),()=>O.throw((0,f._)`new ${L}(${p.default.vErrors})`)):(O.assign((0,f._)`${D}.errors`,p.default.vErrors),G.unevaluated&&ee(j),O.return((0,f._)`${p.default.errors} === 0`))}function ee({gen:j,evaluated:O,props:q,items:D}){q instanceof f.Name&&j.assign((0,f._)`${O}.props`,q),D instanceof f.Name&&j.assign((0,f._)`${O}.items`,D)}function oe(j,O,q,D){const{gen:L,schema:G,data:te,allErrors:fe,opts:ae,self:ue}=j,{RULES:re}=ue;if(G.$ref&&(ae.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(G,re))){L.block(()=>F(j,"$ref",re.all.$ref.definition));return}ae.jtd||Y(j,O),L.block(()=>{for(const de of re.rules)Pe(de);Pe(re.post)});function Pe(de){(0,o.shouldUseGroup)(G,de)&&(de.type?(L.if((0,r.checkDataType)(de.type,te,ae.strictNumbers)),x(j,de),O.length===1&&O[0]===de.type&&q&&(L.else(),(0,r.reportTypeError)(j)),L.endIf()):x(j,de),fe||L.if((0,f._)`${p.default.errors} === ${D||0}`))}}function x(j,O){const{gen:q,schema:D,opts:{useDefaults:L}}=j;L&&(0,u.assignDefaults)(j,O.type),q.block(()=>{for(const G of O.rules)(0,o.shouldUseRule)(D,G)&&F(j,G.keyword,G.definition,O.type)})}function Y(j,O){j.schemaEnv.meta||!j.opts.strictTypes||(_e(j,O),j.opts.allowUnionTypes||A(j,O),R(j,j.dataTypes))}function _e(j,O){if(O.length){if(!j.dataTypes.length){j.dataTypes=O;return}O.forEach(q=>{N(j.dataTypes,q)||P(j,`type "${q}" not allowed by context "${j.dataTypes.join(",")}"`)}),h(j,O)}}function A(j,O){O.length>1&&!(O.length===2&&O.includes("null"))&&P(j,"use allowUnionTypes to allow union type keyword")}function R(j,O){const q=j.self.RULES.all;for(const D in q){const L=q[D];if(typeof L=="object"&&(0,o.shouldUseRule)(j.schema,L)){const{type:G}=L.definition;G.length&&!G.some(te=>C(O,te))&&P(j,`missing type "${G.join(",")}" for keyword "${D}"`)}}}function C(j,O){return j.includes(O)||O==="number"&&j.includes("integer")}function N(j,O){return j.includes(O)||O==="integer"&&j.includes("number")}function h(j,O){const q=[];for(const D of j.dataTypes)N(O,D)?q.push(D):O.includes("integer")&&D==="number"&&q.push("integer");j.dataTypes=q}function P(j,O){const q=j.schemaEnv.baseId+j.errSchemaPath;O+=` at "${q}" (strictTypes)`,(0,y.checkStrictMode)(j,O,j.opts.strictTypes)}class I{constructor(O,q,D){if((0,s.validateKeywordUsage)(O,q,D),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=D,this.data=O.data,this.schema=O.schema[D],this.$data=q.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(O,this.schema,D,this.$data),this.schemaType=q.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=q,this.$data)this.schemaCode=O.gen.const("vSchema",W(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${D} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=O.gen.const("_errs",p.default.errors))}result(O,q,D){this.failResult((0,f.not)(O),q,D)}failResult(O,q,D){this.gen.if(O),D?D():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(O,q){this.failResult((0,f.not)(O),void 0,q)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:q}=this;this.fail((0,f._)`${q} !== undefined && (${(0,f.or)(this.invalid$data(),O)})`)}error(O,q,D){if(q){this.setParams(q),this._error(O,D),this.setParams({});return}this._error(O,D)}_error(O,q){(O?E.reportExtraError:E.reportError)(this,this.def.error,q)}$dataError(){(0,E.reportError)(this,this.def.$dataError||E.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,E.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,q){q?Object.assign(this.params,O):this.params=O}block$data(O,q,D=f.nil){this.gen.block(()=>{this.check$data(O,D),q()})}check$data(O=f.nil,q=f.nil){if(!this.$data)return;const{gen:D,schemaCode:L,schemaType:G,def:te}=this;D.if((0,f.or)((0,f._)`${L} === undefined`,q)),O!==f.nil&&D.assign(O,!0),(G.length||te.validateSchema)&&(D.elseIf(this.invalid$data()),this.$dataError(),O!==f.nil&&D.assign(O,!1)),D.else()}invalid$data(){const{gen:O,schemaCode:q,schemaType:D,def:L,it:G}=this;return(0,f.or)(te(),fe());function te(){if(D.length){if(!(q instanceof f.Name))throw new Error("ajv implementation error");const ae=Array.isArray(D)?D:[D];return(0,f._)`${(0,r.checkDataTypes)(ae,q,G.opts.strictNumbers,r.DataType.Wrong)}`}return f.nil}function fe(){if(L.validateSchema){const ae=O.scopeValue("validate$data",{ref:L.validateSchema});return(0,f._)`!${ae}(${q})`}return f.nil}}subschema(O,q){const D=(0,l.getSubschema)(this.it,O);(0,l.extendSubschemaData)(D,this.it,O),(0,l.extendSubschemaMode)(D,O);const L={...this.it,...D,items:void 0,props:void 0};return c(L,q),L}mergeEvaluated(O,q){const{it:D,gen:L}=this;D.opts.unevaluated&&(D.props!==!0&&O.props!==void 0&&(D.props=y.mergeEvaluated.props(L,O.props,D.props,q)),D.items!==!0&&O.items!==void 0&&(D.items=y.mergeEvaluated.items(L,O.items,D.items,q)))}mergeValidEvaluated(O,q){const{it:D,gen:L}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return L.if(q,()=>this.mergeEvaluated(O,f.Name)),!0}}me.KeywordCxt=I;function F(j,O,q,D){const L=new I(j,q,O);"code"in q?q.code(L,D):L.$data&&q.validate?(0,s.funcKeywordCode)(L,q):"macro"in q?(0,s.macroKeywordCode)(L,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(L,q)}const U=/^\/(?:[^~]|~0|~1)*$/,Z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(j,{dataLevel:O,dataNames:q,dataPathArr:D}){let L,G;if(j==="")return p.default.rootData;if(j[0]==="/"){if(!U.test(j))throw new Error(`Invalid JSON-pointer: ${j}`);L=j,G=p.default.rootData}else{const ue=Z.exec(j);if(!ue)throw new Error(`Invalid JSON-pointer: ${j}`);const re=+ue[1];if(L=ue[2],L==="#"){if(re>=O)throw new Error(ae("property/index",re));return D[O-re]}if(re>O)throw new Error(ae("data",re));if(G=q[O-re],!L)return G}let te=G;const fe=L.split("/");for(const ue of fe)ue&&(G=(0,f._)`${G}${(0,f.getProperty)((0,y.unescapeJsonPointer)(ue))}`,te=(0,f._)`${te} && ${G}`);return te;function ae(ue,re){return`Cannot access ${ue} ${re} levels up, current level is ${O}`}}return me.getData=W,me}var Fe={},Nr;function nr(){if(Nr)return Fe;Nr=1,Object.defineProperty(Fe,"__esModule",{value:!0});class e extends Error{constructor(o){super("validation failed"),this.errors=o,this.ajv=this.validation=!0}}return Fe.default=e,Fe}var Le={},Tr;function Ot(){if(Tr)return Le;Tr=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=kt();class t extends Error{constructor(r,u,s,l){super(l||`can't resolve reference ${s} from id ${u}`),this.missingRef=(0,e.resolveUrl)(r,u,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Le.default=t,Le}var ce={},Ir;function sr(){if(Ir)return ce;Ir=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.resolveSchema=ce.getCompilingSchema=ce.resolveRef=ce.compileSchema=ce.SchemaEnv=void 0;const e=J(),t=nr(),o=we(),r=kt(),u=Q(),s=Rt();class l{constructor(d){var n;this.refs={},this.dynamicAnchors={};let c;typeof d.schema=="object"&&(c=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(n=d.baseId)!==null&&n!==void 0?n:(0,r.normalizeId)(c?.[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=c?.$async,this.refs={}}}ce.SchemaEnv=l;function f(a){const d=y.call(this,a);if(d)return d;const n=(0,r.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:c,lines:$}=this.opts.code,{ownProperties:i}=this.opts,m=new e.CodeGen(this.scope,{es5:c,lines:$,ownProperties:i});let S;a.$async&&(S=m.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const k=m.scopeName("validate");a.validateName=k;const T={gen:m,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,e.stringify)(a.schema)}:{ref:a.schema}),validateName:k,ValidationError:S,schema:a.schema,schemaEnv:a,rootId:n,baseId:a.baseId||n,schemaPath:e.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(a),(0,s.validateFunctionCode)(T),m.optimize(this.opts.code.optimize);const V=m.toString();M=`${m.scopeRefs(o.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,a));const z=new Function(`${o.default.self}`,`${o.default.scope}`,M)(this,this.scope.get());if(this.scope.value(k,{ref:z}),z.errors=null,z.schema=a.schema,z.schemaEnv=a,a.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:k,validateCode:V,scopeValues:m._values}),this.opts.unevaluated){const{props:B,items:ee}=T;z.evaluated={props:B instanceof e.Name?void 0:B,items:ee instanceof e.Name?void 0:ee,dynamicProps:B instanceof e.Name,dynamicItems:ee instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return a.validate=z,a}catch(V){throw delete a.validate,delete a.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(a)}}ce.compileSchema=f;function p(a,d,n){var c;n=(0,r.resolveUrl)(this.opts.uriResolver,d,n);const $=a.refs[n];if($)return $;let i=v.call(this,a,n);if(i===void 0){const m=(c=a.localRefs)===null||c===void 0?void 0:c[n],{schemaId:S}=this.opts;m&&(i=new l({schema:m,schemaId:S,root:a,baseId:d}))}if(i!==void 0)return a.refs[n]=_.call(this,i)}ce.resolveRef=p;function _(a){return(0,r.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:f.call(this,a)}function y(a){for(const d of this._compilations)if(E(d,a))return d}ce.getCompilingSchema=y;function E(a,d){return a.schema===d.schema&&a.root===d.root&&a.baseId===d.baseId}function v(a,d){let n;for(;typeof(n=this.refs[d])=="string";)d=n;return n||this.schemas[d]||w.call(this,a,d)}function w(a,d){const n=this.opts.uriResolver.parse(d),c=(0,r._getFullPath)(this.opts.uriResolver,n);let $=(0,r.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&c===$)return b.call(this,n,a);const i=(0,r.normalizeId)(c),m=this.refs[i]||this.schemas[i];if(typeof m=="string"){const S=w.call(this,a,m);return typeof S?.schema!="object"?void 0:b.call(this,n,S)}if(typeof m?.schema=="object"){if(m.validate||f.call(this,m),i===(0,r.normalizeId)(d)){const{schema:S}=m,{schemaId:k}=this.opts,T=S[k];return T&&($=(0,r.resolveUrl)(this.opts.uriResolver,$,T)),new l({schema:S,schemaId:k,root:a,baseId:$})}return b.call(this,n,m)}}ce.resolveSchema=w;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(a,{baseId:d,schema:n,root:c}){var $;if((($=a.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const S of a.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const k=n[(0,u.unescapeFragment)(S)];if(k===void 0)return;n=k;const T=typeof n=="object"&&n[this.opts.schemaId];!g.has(S)&&T&&(d=(0,r.resolveUrl)(this.opts.uriResolver,d,T))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,u.schemaHasRulesButRef)(n,this.RULES)){const S=(0,r.resolveUrl)(this.opts.uriResolver,d,n.$ref);i=w.call(this,c,S)}const{schemaId:m}=this.opts;if(i=i||new l({schema:n,schemaId:m,root:c,baseId:d}),i.schema!==i.root.schema)return i}return ce}const Ss="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Es="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ps="object",js=["$data"],ks={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Rs=!1,Os={$id:Ss,description:Es,type:Ps,required:js,properties:ks,additionalProperties:Rs};var Ue={},Ie={exports:{}},Kt,qr;function Ln(){if(qr)return Kt;qr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(v){let w="",g=0,b=0;for(b=0;b<v.length;b++)if(g=v[b].charCodeAt(0),g!==48){if(!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";w+=v[b];break}for(b+=1;b<v.length;b++){if(g=v[b].charCodeAt(0),!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";w+=v[b]}return w}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u(v){return v.length=0,!0}function s(v,w,g){if(v.length){const b=o(v);if(b!=="")w.push(b);else return g.error=!0,!1;v.length=0}return!0}function l(v){let w=0;const g={error:!1,address:"",zone:""},b=[],a=[];let d=!1,n=!1,c=s;for(let $=0;$<v.length;$++){const i=v[$];if(!(i==="["||i==="]"))if(i===":"){if(d===!0&&(n=!0),!c(a,b,g))break;if(++w>7){g.error=!0;break}$>0&&v[$-1]===":"&&(d=!0),b.push(":");continue}else if(i==="%"){if(!c(a,b,g))break;c=u}else{a.push(i);continue}}return a.length&&(c===u?g.zone=a.join(""):n?b.push(a.join("")):b.push(o(a))),g.address=b.join(""),g}function f(v){if(p(v,":")<2)return{host:v,isIPV6:!1};const w=l(v);if(w.error)return{host:v,isIPV6:!1};{let g=w.address,b=w.address;return w.zone&&(g+="%"+w.zone,b+="%25"+w.zone),{host:g,isIPV6:!0,escapedHost:b}}}function p(v,w){let g=0;for(let b=0;b<v.length;b++)v[b]===w&&g++;return g}function _(v){let w=v;const g=[];let b=-1,a=0;for(;a=w.length;){if(a===1){if(w===".")break;if(w==="/"){g.push("/");break}else{g.push(w);break}}else if(a===2){if(w[0]==="."){if(w[1]===".")break;if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&(w[1]==="."||w[1]==="/")){g.push("/");break}}else if(a===3&&w==="/.."){g.length!==0&&g.pop(),g.push("/");break}if(w[0]==="."){if(w[1]==="."){if(w[2]==="/"){w=w.slice(3);continue}}else if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&w[1]==="."){if(w[2]==="/"){w=w.slice(2);continue}else if(w[2]==="."&&w[3]==="/"){w=w.slice(3),g.length!==0&&g.pop();continue}}if((b=w.indexOf("/",1))===-1){g.push(w);break}else g.push(w.slice(0,b)),w=w.slice(b)}return g.join("")}function y(v,w){const g=w!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=g(v.scheme)),v.userinfo!==void 0&&(v.userinfo=g(v.userinfo)),v.host!==void 0&&(v.host=g(v.host)),v.path!==void 0&&(v.path=g(v.path)),v.query!==void 0&&(v.query=g(v.query)),v.fragment!==void 0&&(v.fragment=g(v.fragment)),v}function E(v){const w=[];if(v.userinfo!==void 0&&(w.push(v.userinfo),w.push("@")),v.host!==void 0){let g=unescape(v.host);if(!t(g)){const b=f(g);b.isIPV6===!0?g=`[${b.escapedHost}]`:g=v.host}w.push(g)}return(typeof v.port=="number"||typeof v.port=="string")&&(w.push(":"),w.push(String(v.port))),w.length?w.join(""):void 0}return Kt={nonSimpleDomain:r,recomposeAuthority:E,normalizeComponentEncoding:y,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:o},Kt}var Ht,Cr;function Ns(){if(Cr)return Ht;Cr=1;const{isUUID:e}=Ln(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function r(i){return o.indexOf(i)!==-1}function u(i){return i.secure===!0?!0:i.secure===!1?!1:i.scheme?i.scheme.length===3&&(i.scheme[0]==="w"||i.scheme[0]==="W")&&(i.scheme[1]==="s"||i.scheme[1]==="S")&&(i.scheme[2]==="s"||i.scheme[2]==="S"):!1}function s(i){return i.host||(i.error=i.error||"HTTP URIs must have a host."),i}function l(i){const m=String(i.scheme).toLowerCase()==="https";return(i.port===(m?443:80)||i.port==="")&&(i.port=void 0),i.path||(i.path="/"),i}function f(i){return i.secure=u(i),i.resourceName=(i.path||"/")+(i.query?"?"+i.query:""),i.path=void 0,i.query=void 0,i}function p(i){if((i.port===(u(i)?443:80)||i.port==="")&&(i.port=void 0),typeof i.secure=="boolean"&&(i.scheme=i.secure?"wss":"ws",i.secure=void 0),i.resourceName){const[m,S]=i.resourceName.split("?");i.path=m&&m!=="/"?m:void 0,i.query=S,i.resourceName=void 0}return i.fragment=void 0,i}function _(i,m){if(!i.path)return i.error="URN can not be parsed",i;const S=i.path.match(t);if(S){const k=m.scheme||i.scheme||"urn";i.nid=S[1].toLowerCase(),i.nss=S[2];const T=`${k}:${m.nid||i.nid}`,M=$(T);i.path=void 0,M&&(i=M.parse(i,m))}else i.error=i.error||"URN can not be parsed.";return i}function y(i,m){if(i.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=m.scheme||i.scheme||"urn",k=i.nid.toLowerCase(),T=`${S}:${m.nid||k}`,M=$(T);M&&(i=M.serialize(i,m));const V=i,K=i.nss;return V.path=`${k||m.nid}:${K}`,m.skipEscape=!0,V}function E(i,m){const S=i;return S.uuid=S.nss,S.nss=void 0,!m.tolerant&&(!S.uuid||!e(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function v(i){const m=i;return m.nss=(i.uuid||"").toLowerCase(),m}const w={scheme:"http",domainHost:!0,parse:s,serialize:l},g={scheme:"https",domainHost:w.domainHost,parse:s,serialize:l},b={scheme:"ws",domainHost:!0,parse:f,serialize:p},a={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},c={http:w,https:g,ws:b,wss:a,urn:{scheme:"urn",parse:_,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:E,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(c,null);function $(i){return i&&(c[i]||c[i.toLowerCase()])||void 0}return Ht={wsIsSecure:u,SCHEMES:c,isValidSchemeName:r,getSchemeHandler:$},Ht}var Mr;function Ts(){if(Mr)return Ie.exports;Mr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:o,normalizeComponentEncoding:r,isIPv4:u,nonSimpleDomain:s}=Ln(),{SCHEMES:l,getSchemeHandler:f}=Ns();function p(a,d){return typeof a=="string"?a=v(g(a,d),d):typeof a=="object"&&(a=g(v(a,d),d)),a}function _(a,d,n){const c=n?Object.assign({scheme:"null"},n):{scheme:"null"},$=y(g(a,c),g(d,c),c,!0);return c.skipEscape=!0,v($,c)}function y(a,d,n,c){const $={};return c||(a=g(v(a,n),n),d=g(v(d,n),n)),n=n||{},!n.tolerant&&d.scheme?($.scheme=d.scheme,$.userinfo=d.userinfo,$.host=d.host,$.port=d.port,$.path=t(d.path||""),$.query=d.query):(d.userinfo!==void 0||d.host!==void 0||d.port!==void 0?($.userinfo=d.userinfo,$.host=d.host,$.port=d.port,$.path=t(d.path||""),$.query=d.query):(d.path?(d.path[0]==="/"?$.path=t(d.path):((a.userinfo!==void 0||a.host!==void 0||a.port!==void 0)&&!a.path?$.path="/"+d.path:a.path?$.path=a.path.slice(0,a.path.lastIndexOf("/")+1)+d.path:$.path=d.path,$.path=t($.path)),$.query=d.query):($.path=a.path,d.query!==void 0?$.query=d.query:$.query=a.query),$.userinfo=a.userinfo,$.host=a.host,$.port=a.port),$.scheme=a.scheme),$.fragment=d.fragment,$}function E(a,d,n){return typeof a=="string"?(a=unescape(a),a=v(r(g(a,n),!0),{...n,skipEscape:!0})):typeof a=="object"&&(a=v(r(a,!0),{...n,skipEscape:!0})),typeof d=="string"?(d=unescape(d),d=v(r(g(d,n),!0),{...n,skipEscape:!0})):typeof d=="object"&&(d=v(r(d,!0),{...n,skipEscape:!0})),a.toLowerCase()===d.toLowerCase()}function v(a,d){const n={host:a.host,scheme:a.scheme,userinfo:a.userinfo,port:a.port,path:a.path,query:a.query,nid:a.nid,nss:a.nss,uuid:a.uuid,fragment:a.fragment,reference:a.reference,resourceName:a.resourceName,secure:a.secure,error:""},c=Object.assign({},d),$=[],i=f(c.scheme||n.scheme);i&&i.serialize&&i.serialize(n,c),n.path!==void 0&&(c.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),c.reference!=="suffix"&&n.scheme&&$.push(n.scheme,":");const m=o(n);if(m!==void 0&&(c.reference!=="suffix"&&$.push("//"),$.push(m),n.path&&n.path[0]!=="/"&&$.push("/")),n.path!==void 0){let S=n.path;!c.absolutePath&&(!i||!i.absolutePath)&&(S=t(S)),m===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),$.push(S)}return n.query!==void 0&&$.push("?",n.query),n.fragment!==void 0&&$.push("#",n.fragment),$.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(a,d){const n=Object.assign({},d),c={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let $=!1;n.reference==="suffix"&&(n.scheme?a=n.scheme+":"+a:a="//"+a);const i=a.match(w);if(i){if(c.scheme=i[1],c.userinfo=i[3],c.host=i[4],c.port=parseInt(i[5],10),c.path=i[6]||"",c.query=i[7],c.fragment=i[8],isNaN(c.port)&&(c.port=i[5]),c.host)if(u(c.host)===!1){const k=e(c.host);c.host=k.host.toLowerCase(),$=k.isIPV6}else $=!0;c.scheme===void 0&&c.userinfo===void 0&&c.host===void 0&&c.port===void 0&&c.query===void 0&&!c.path?c.reference="same-document":c.scheme===void 0?c.reference="relative":c.fragment===void 0?c.reference="absolute":c.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==c.reference&&(c.error=c.error||"URI is not a "+n.reference+" reference.");const m=f(n.scheme||c.scheme);if(!n.unicodeSupport&&(!m||!m.unicodeSupport)&&c.host&&(n.domainHost||m&&m.domainHost)&&$===!1&&s(c.host))try{c.host=URL.domainToASCII(c.host.toLowerCase())}catch(S){c.error=c.error||"Host's domain name can not be converted to ASCII: "+S}(!m||m&&!m.skipNormalize)&&(a.indexOf("%")!==-1&&(c.scheme!==void 0&&(c.scheme=unescape(c.scheme)),c.host!==void 0&&(c.host=unescape(c.host))),c.path&&(c.path=escape(unescape(c.path))),c.fragment&&(c.fragment=encodeURI(decodeURIComponent(c.fragment)))),m&&m.parse&&m.parse(c,n)}else c.error=c.error||"URI can not be parsed.";return c}const b={SCHEMES:l,normalize:p,resolve:_,resolveComponent:y,equal:E,serialize:v,parse:g};return Ie.exports=b,Ie.exports.default=b,Ie.exports.fastUri=b,Ie.exports}var Ar;function Is(){if(Ar)return Ue;Ar=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=Ts();return e.code='require("ajv/dist/runtime/uri").default',Ue.default=e,Ue}var Dr;function qs(){return Dr||(Dr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Rt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var o=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const r=nr(),u=Ot(),s=Dn(),l=sr(),f=J(),p=kt(),_=Et(),y=Q(),E=Os,v=Is(),w=(A,R)=>new RegExp(A,R);w.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),a={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."},d={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function c(A){var R,C,N,h,P,I,F,U,Z,W,j,O,q,D,L,G,te,fe,ae,ue,re,Pe,de,Tt,It;const Ne=A.strict,qt=(R=A.code)===null||R===void 0?void 0:R.optimize,ir=qt===!0||qt===void 0?1:qt||0,ar=(N=(C=A.code)===null||C===void 0?void 0:C.regExp)!==null&&N!==void 0?N:w,Zn=(h=A.uriResolver)!==null&&h!==void 0?h:v.default;return{strictSchema:(I=(P=A.strictSchema)!==null&&P!==void 0?P:Ne)!==null&&I!==void 0?I:!0,strictNumbers:(U=(F=A.strictNumbers)!==null&&F!==void 0?F:Ne)!==null&&U!==void 0?U:!0,strictTypes:(W=(Z=A.strictTypes)!==null&&Z!==void 0?Z:Ne)!==null&&W!==void 0?W:"log",strictTuples:(O=(j=A.strictTuples)!==null&&j!==void 0?j:Ne)!==null&&O!==void 0?O:"log",strictRequired:(D=(q=A.strictRequired)!==null&&q!==void 0?q:Ne)!==null&&D!==void 0?D:!1,code:A.code?{...A.code,optimize:ir,regExp:ar}:{optimize:ir,regExp:ar},loopRequired:(L=A.loopRequired)!==null&&L!==void 0?L:n,loopEnum:(G=A.loopEnum)!==null&&G!==void 0?G:n,meta:(te=A.meta)!==null&&te!==void 0?te:!0,messages:(fe=A.messages)!==null&&fe!==void 0?fe:!0,inlineRefs:(ae=A.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(ue=A.schemaId)!==null&&ue!==void 0?ue:"$id",addUsedSchema:(re=A.addUsedSchema)!==null&&re!==void 0?re:!0,validateSchema:(Pe=A.validateSchema)!==null&&Pe!==void 0?Pe:!0,validateFormats:(de=A.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(Tt=A.unicodeRegExp)!==null&&Tt!==void 0?Tt:!0,int32range:(It=A.int32range)!==null&&It!==void 0?It:!0,uriResolver:Zn}}class ${constructor(R={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,R=this.opts={...R,...c(R)};const{es5:C,lines:N}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:b,es5:C,lines:N}),this.logger=K(R.logger);const h=R.validateFormats;R.validateFormats=!1,this.RULES=(0,s.getRules)(),i.call(this,a,R,"NOT SUPPORTED"),i.call(this,d,R,"DEPRECATED","warn"),this._metaOpts=M.call(this),R.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&T.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),S.call(this),R.validateFormats=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:C,schemaId:N}=this.opts;let h=E;N==="id"&&(h={...E},h.id=h.$id,delete h.$id),C&&R&&this.addMetaSchema(h,h[N],!1)}defaultMeta(){const{meta:R,schemaId:C}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[C]||R:void 0}validate(R,C){let N;if(typeof R=="string"){if(N=this.getSchema(R),!N)throw new Error(`no schema with key or ref "${R}"`)}else N=this.compile(R);const h=N(C);return"$async"in N||(this.errors=N.errors),h}compile(R,C){const N=this._addSchema(R,C);return N.validate||this._compileSchemaEnv(N)}compileAsync(R,C){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return h.call(this,R,C);async function h(W,j){await P.call(this,W.$schema);const O=this._addSchema(W,j);return O.validate||I.call(this,O)}async function P(W){W&&!this.getSchema(W)&&await h.call(this,{$ref:W},!0)}async function I(W){try{return this._compileSchemaEnv(W)}catch(j){if(!(j instanceof u.default))throw j;return F.call(this,j),await U.call(this,j.missingSchema),I.call(this,W)}}function F({missingSchema:W,missingRef:j}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${j} cannot be resolved`)}async function U(W){const j=await Z.call(this,W);this.refs[W]||await P.call(this,j.$schema),this.refs[W]||this.addSchema(j,W,C)}async function Z(W){const j=this._loading[W];if(j)return j;try{return await(this._loading[W]=N(W))}finally{delete this._loading[W]}}}addSchema(R,C,N,h=this.opts.validateSchema){if(Array.isArray(R)){for(const I of R)this.addSchema(I,void 0,N,h);return this}let P;if(typeof R=="object"){const{schemaId:I}=this.opts;if(P=R[I],P!==void 0&&typeof P!="string")throw new Error(`schema ${I} must be string`)}return C=(0,p.normalizeId)(C||P),this._checkUnique(C),this.schemas[C]=this._addSchema(R,N,C,h,!0),this}addMetaSchema(R,C,N=this.opts.validateSchema){return this.addSchema(R,C,!0,N),this}validateSchema(R,C){if(typeof R=="boolean")return!0;let N;if(N=R.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const h=this.validate(N,R);if(!h&&C){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return h}getSchema(R){let C;for(;typeof(C=m.call(this,R))=="string";)R=C;if(C===void 0){const{schemaId:N}=this.opts,h=new l.SchemaEnv({schema:{},schemaId:N});if(C=l.resolveSchema.call(this,h,R),!C)return;this.refs[R]=C}return C.validate||this._compileSchemaEnv(C)}removeSchema(R){if(R instanceof RegExp)return this._removeAllSchemas(this.schemas,R),this._removeAllSchemas(this.refs,R),this;switch(typeof R){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const C=m.call(this,R);return typeof C=="object"&&this._cache.delete(C.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const C=R;this._cache.delete(C);let N=R[this.opts.schemaId];return N&&(N=(0,p.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const C of R)this.addKeyword(C);return this}addKeyword(R,C){let N;if(typeof R=="string")N=R,typeof C=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),C.keyword=N);else if(typeof R=="object"&&C===void 0){if(C=R,N=C.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(B.call(this,N,C),!C)return(0,y.eachItem)(N,P=>ee.call(this,P)),this;x.call(this,C);const h={...C,type:(0,_.getJSONTypes)(C.type),schemaType:(0,_.getJSONTypes)(C.schemaType)};return(0,y.eachItem)(N,h.type.length===0?P=>ee.call(this,P,h):P=>h.type.forEach(I=>ee.call(this,P,h,I))),this}getKeyword(R){const C=this.RULES.all[R];return typeof C=="object"?C.definition:!!C}removeKeyword(R){const{RULES:C}=this;delete C.keywords[R],delete C.all[R];for(const N of C.rules){const h=N.rules.findIndex(P=>P.keyword===R);h>=0&&N.rules.splice(h,1)}return this}addFormat(R,C){return typeof C=="string"&&(C=new RegExp(C)),this.formats[R]=C,this}errorsText(R=this.errors,{separator:C=", ",dataVar:N="data"}={}){return!R||R.length===0?"No errors":R.map(h=>`${N}${h.instancePath} ${h.message}`).reduce((h,P)=>h+C+P)}$dataMetaSchema(R,C){const N=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const h of C){const P=h.split("/").slice(1);let I=R;for(const F of P)I=I[F];for(const F in N){const U=N[F];if(typeof U!="object")continue;const{$data:Z}=U.definition,W=I[F];Z&&W&&(I[F]=_e(W))}}return R}_removeAllSchemas(R,C){for(const N in R){const h=R[N];(!C||C.test(N))&&(typeof h=="string"?delete R[N]:h&&!h.meta&&(this._cache.delete(h.schema),delete R[N]))}}_addSchema(R,C,N,h=this.opts.validateSchema,P=this.opts.addUsedSchema){let I;const{schemaId:F}=this.opts;if(typeof R=="object")I=R[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let U=this._cache.get(R);if(U!==void 0)return U;N=(0,p.normalizeId)(I||N);const Z=p.getSchemaRefs.call(this,R,N);return U=new l.SchemaEnv({schema:R,schemaId:F,meta:C,baseId:N,localRefs:Z}),this._cache.set(U.schema,U),P&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=U),h&&this.validateSchema(R,!0),U}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):l.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const C=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,R)}finally{this.opts=C}}}$.ValidationError=r.default,$.MissingRefError=u.default,e.default=$;function i(A,R,C,N="error"){for(const h in A){const P=h;P in R&&this.logger[N](`${C}: option ${h}. ${A[P]}`)}}function m(A){return A=(0,p.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 R in A)this.addSchema(A[R],R)}function k(){for(const A in this.opts.formats){const R=this.opts.formats[A];R&&this.addFormat(A,R)}}function T(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in A){const C=A[R];C.keyword||(C.keyword=R),this.addKeyword(C)}}function M(){const A={...this.opts};for(const R of g)delete A[R];return A}const V={log(){},warn(){},error(){}};function K(A){if(A===!1)return V;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 z=/^[a-z_$][a-z0-9_$:-]*$/i;function B(A,R){const{RULES:C}=this;if((0,y.eachItem)(A,N=>{if(C.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!z.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function ee(A,R,C){var N;const h=R?.post;if(C&&h)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let I=h?P.post:P.rules.find(({type:U})=>U===C);if(I||(I={type:C,rules:[]},P.rules.push(I)),P.keywords[A]=!0,!R)return;const F={keyword:A,definition:{...R,type:(0,_.getJSONTypes)(R.type),schemaType:(0,_.getJSONTypes)(R.schemaType)}};R.before?oe.call(this,I,F,R.before):I.rules.push(F),P.all[A]=F,(N=R.implements)===null||N===void 0||N.forEach(U=>this.addKeyword(U))}function oe(A,R,C){const N=A.rules.findIndex(h=>h.keyword===C);N>=0?A.rules.splice(N,0,R):(A.rules.push(R),this.logger.warn(`rule ${C} is not defined`))}function x(A){let{metaSchema:R}=A;R!==void 0&&(A.$data&&this.opts.$data&&(R=_e(R)),A.validateSchema=this.compile(R,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(A){return{anyOf:[A,Y]}}})(At)),At}var ze={},Ke={},He={},Vr;function Cs(){if(Vr)return He;Vr=1,Object.defineProperty(He,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return He.default=e,He}var ve={},Fr;function Ms(){if(Fr)return ve;Fr=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=Ot(),t=pe(),o=J(),r=we(),u=sr(),s=Q(),l={keyword:"$ref",schemaType:"string",code(_){const{gen:y,schema:E,it:v}=_,{baseId:w,schemaEnv:g,validateName:b,opts:a,self:d}=v,{root:n}=g;if((E==="#"||E==="#/")&&w===n.baseId)return $();const c=u.resolveRef.call(d,n,w,E);if(c===void 0)throw new e.default(v.opts.uriResolver,w,E);if(c instanceof u.SchemaEnv)return i(c);return m(c);function $(){if(g===n)return p(_,b,g,g.$async);const S=y.scopeValue("root",{ref:n});return p(_,(0,o._)`${S}.validate`,n,n.$async)}function i(S){const k=f(_,S);p(_,k,S,S.$async)}function m(S){const k=y.scopeValue("schema",a.code.source===!0?{ref:S,code:(0,o.stringify)(S)}:{ref:S}),T=y.name("valid"),M=_.subschema({schema:S,dataTypes:[],schemaPath:o.nil,topSchemaRef:k,errSchemaPath:E},T);_.mergeEvaluated(M),_.ok(T)}}};function f(_,y){const{gen:E}=_;return y.validate?E.scopeValue("validate",{ref:y.validate}):(0,o._)`${E.scopeValue("wrapper",{ref:y})}.validate`}ve.getValidate=f;function p(_,y,E,v){const{gen:w,it:g}=_,{allErrors:b,schemaEnv:a,opts:d}=g,n=d.passContext?r.default.this:o.nil;v?c():$();function c(){if(!a.$async)throw new Error("async schema referenced by sync schema");const S=w.let("valid");w.try(()=>{w.code((0,o._)`await ${(0,t.callValidateCode)(_,y,n)}`),m(y),b||w.assign(S,!0)},k=>{w.if((0,o._)`!(${k} instanceof ${g.ValidationError})`,()=>w.throw(k)),i(k),b||w.assign(S,!1)}),_.ok(S)}function $(){_.result((0,t.callValidateCode)(_,y,n),()=>m(y),()=>i(y))}function i(S){const k=(0,o._)`${S}.errors`;w.assign(r.default.vErrors,(0,o._)`${r.default.vErrors} === null ? ${k} : ${r.default.vErrors}.concat(${k})`),w.assign(r.default.errors,(0,o._)`${r.default.vErrors}.length`)}function m(S){var k;if(!g.opts.unevaluated)return;const T=(k=E?.validate)===null||k===void 0?void 0:k.evaluated;if(g.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(g.props=s.mergeEvaluated.props(w,T.props,g.props));else{const M=w.var("props",(0,o._)`${S}.evaluated.props`);g.props=s.mergeEvaluated.props(w,M,g.props,o.Name)}if(g.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(g.items=s.mergeEvaluated.items(w,T.items,g.items));else{const M=w.var("items",(0,o._)`${S}.evaluated.items`);g.items=s.mergeEvaluated.items(w,M,g.items,o.Name)}}}return ve.callRef=p,ve.default=l,ve}var Lr;function As(){if(Lr)return Ke;Lr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=Cs(),t=Ms(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ke.default=o,Ke}var Ge={},Je={},Ur;function Ds(){if(Ur)return Je;Ur=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=J(),t=e.operators,o={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${o[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${o[s].okStr}, limit: ${l}}`},u={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:f,schemaCode:p}=s;s.fail$data((0,e._)`${f} ${o[l].fail} ${p} || isNaN(${f})`)}};return Je.default=u,Je}var Be={},zr;function Vs(){if(zr)return Be;zr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:u,data:s,schemaCode:l,it:f}=r,p=f.opts.multipleOfPrecision,_=u.let("res"),y=p?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${p}`:(0,e._)`${_} !== parseInt(${_})`;r.fail$data((0,e._)`(${l} === 0 || (${_} = ${s}/${l}, ${y}))`)}};return Be.default=o,Be}var We={},Qe={},Kr;function Fs(){if(Kr)return Qe;Kr=1,Object.defineProperty(Qe,"__esModule",{value:!0});function e(t){const o=t.length;let r=0,u=0,s;for(;u<o;)r++,s=t.charCodeAt(u++),s>=55296&&s<=56319&&u<o&&(s=t.charCodeAt(u),(s&64512)===56320&&u++);return r}return Qe.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Qe}var Hr;function Ls(){if(Hr)return We;Hr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=J(),t=Q(),o=Fs(),u={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const f=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${f} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:f,schemaCode:p,it:_}=s,y=l==="maxLength"?e.operators.GT:e.operators.LT,E=_.opts.unicode===!1?(0,e._)`${f}.length`:(0,e._)`${(0,t.useFunc)(s.gen,o.default)}(${f})`;s.fail$data((0,e._)`${E} ${y} ${p}`)}};return We.default=u,We}var Ze={},Gr;function Us(){if(Gr)return Ze;Gr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=pe(),t=J(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:u})=>(0,t.str)`must match pattern "${u}"`,params:({schemaCode:u})=>(0,t._)`{pattern: ${u}}`},code(u){const{data:s,$data:l,schema:f,schemaCode:p,it:_}=u,y=_.opts.unicodeRegExp?"u":"",E=l?(0,t._)`(new RegExp(${p}, ${y}))`:(0,e.usePattern)(u,f);u.fail$data((0,t._)`!${E}.test(${s})`)}};return Ze.default=r,Ze}var Xe={},Jr;function zs(){if(Jr)return Xe;Jr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:u}){const s=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${u} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:u,data:s,schemaCode:l}=r,f=u==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${s}).length ${f} ${l}`)}};return Xe.default=o,Xe}var Ye={},Br;function Ks(){if(Br)return Ye;Br=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=pe(),t=J(),o=Q(),u={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:f,schemaCode:p,data:_,$data:y,it:E}=s,{opts:v}=E;if(!y&&f.length===0)return;const w=f.length>=v.loopRequired;if(E.allErrors?g():b(),v.strictRequired){const n=s.parentSchema.properties,{definedProperties:c}=s.it;for(const $ of f)if(n?.[$]===void 0&&!c.has($)){const i=E.schemaEnv.baseId+E.errSchemaPath,m=`required property "${$}" is not defined at "${i}" (strictRequired)`;(0,o.checkStrictMode)(E,m,E.opts.strictRequired)}}function g(){if(w||y)s.block$data(t.nil,a);else for(const n of f)(0,e.checkReportMissingProp)(s,n)}function b(){const n=l.let("missing");if(w||y){const c=l.let("valid",!0);s.block$data(c,()=>d(n,c)),s.ok(c)}else l.if((0,e.checkMissingProp)(s,f,n)),(0,e.reportMissingProp)(s,n),l.else()}function a(){l.forOf("prop",p,n=>{s.setParams({missingProperty:n}),l.if((0,e.noPropertyInData)(l,_,n,v.ownProperties),()=>s.error())})}function d(n,c){s.setParams({missingProperty:n}),l.forOf(n,p,()=>{l.assign(c,(0,e.propertyInData)(l,_,n,v.ownProperties)),l.if((0,t.not)(c),()=>{s.error(),l.break()})},t.nil)}}};return Ye.default=u,Ye}var xe={},Wr;function Hs(){if(Wr)return xe;Wr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=J(),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:u}){const s=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${u} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:u,data:s,schemaCode:l}=r,f=u==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${s}.length ${f} ${l}`)}};return xe.default=o,xe}var et={},tt={},Qr;function or(){if(Qr)return tt;Qr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=Fn();return e.code='require("ajv/dist/runtime/equal").default',tt.default=e,tt}var Zr;function Gs(){if(Zr)return et;Zr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=Et(),t=J(),o=Q(),r=or(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:f}})=>(0,t.str)`must NOT have duplicate items (items ## ${f} and ${l} are identical)`,params:({params:{i:l,j:f}})=>(0,t._)`{i: ${l}, j: ${f}}`},code(l){const{gen:f,data:p,$data:_,schema:y,parentSchema:E,schemaCode:v,it:w}=l;if(!_&&!y)return;const g=f.let("valid"),b=E.items?(0,e.getSchemaTypes)(E.items):[];l.block$data(g,a,(0,t._)`${v} === false`),l.ok(g);function a(){const $=f.let("i",(0,t._)`${p}.length`),i=f.let("j");l.setParams({i:$,j:i}),f.assign(g,!0),f.if((0,t._)`${$} > 1`,()=>(d()?n:c)($,i))}function d(){return b.length>0&&!b.some($=>$==="object"||$==="array")}function n($,i){const m=f.name("item"),S=(0,e.checkDataTypes)(b,m,w.opts.strictNumbers,e.DataType.Wrong),k=f.const("indices",(0,t._)`{}`);f.for((0,t._)`;${$}--;`,()=>{f.let(m,(0,t._)`${p}[${$}]`),f.if(S,(0,t._)`continue`),b.length>1&&f.if((0,t._)`typeof ${m} == "string"`,(0,t._)`${m} += "_"`),f.if((0,t._)`typeof ${k}[${m}] == "number"`,()=>{f.assign(i,(0,t._)`${k}[${m}]`),l.error(),f.assign(g,!1).break()}).code((0,t._)`${k}[${m}] = ${$}`)})}function c($,i){const m=(0,o.useFunc)(f,r.default),S=f.name("outer");f.label(S).for((0,t._)`;${$}--;`,()=>f.for((0,t._)`${i} = ${$}; ${i}--;`,()=>f.if((0,t._)`${m}(${p}[${$}], ${p}[${i}])`,()=>{l.error(),f.assign(g,!1).break(S)})))}}};return et.default=s,et}var rt={},Xr;function Js(){if(Xr)return rt;Xr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),t=Q(),o=or(),u={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:f,$data:p,schemaCode:_,schema:y}=s;p||y&&typeof y=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,o.default)}(${f}, ${_})`):s.fail((0,e._)`${y} !== ${f}`)}};return rt.default=u,rt}var nt={},Yr;function Bs(){if(Yr)return nt;Yr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=J(),t=Q(),o=or(),u={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:f,$data:p,schema:_,schemaCode:y,it:E}=s;if(!p&&_.length===0)throw new Error("enum must have non-empty array");const v=_.length>=E.opts.loopEnum;let w;const g=()=>w??(w=(0,t.useFunc)(l,o.default));let b;if(v||p)b=l.let("valid"),s.block$data(b,a);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const n=l.const("vSchema",y);b=(0,e.or)(..._.map((c,$)=>d(n,$)))}s.pass(b);function a(){l.assign(b,!1),l.forOf("v",y,n=>l.if((0,e._)`${g()}(${f}, ${n})`,()=>l.assign(b,!0).break()))}function d(n,c){const $=_[c];return typeof $=="object"&&$!==null?(0,e._)`${g()}(${f}, ${n}[${c}])`:(0,e._)`${f} === ${$}`}}};return nt.default=u,nt}var xr;function Ws(){if(xr)return Ge;xr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=Ds(),t=Vs(),o=Ls(),r=Us(),u=zs(),s=Ks(),l=Hs(),f=Gs(),p=Js(),_=Bs(),y=[e.default,t.default,o.default,r.default,u.default,s.default,l.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,_.default];return Ge.default=y,Ge}var st={},je={},en;function Un(){if(en)return je;en=1,Object.defineProperty(je,"__esModule",{value:!0}),je.validateAdditionalItems=void 0;const e=J(),t=Q(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:f}=s,{items:p}=l;if(!Array.isArray(p)){(0,t.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas');return}u(s,p)}};function u(s,l){const{gen:f,schema:p,data:_,keyword:y,it:E}=s;E.items=!0;const v=f.const("len",(0,e._)`${_}.length`);if(p===!1)s.setParams({len:l.length}),s.pass((0,e._)`${v} <= ${l.length}`);else if(typeof p=="object"&&!(0,t.alwaysValidSchema)(E,p)){const g=f.var("valid",(0,e._)`${v} <= ${l.length}`);f.if((0,e.not)(g),()=>w(g)),s.ok(g)}function w(g){f.forRange("i",l.length,v,b=>{s.subschema({keyword:y,dataProp:b,dataPropType:t.Type.Num},g),E.allErrors||f.if((0,e.not)(g),()=>f.break())})}}return je.validateAdditionalItems=u,je.default=r,je}var ot={},ke={},tn;function zn(){if(tn)return ke;tn=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateTuple=void 0;const e=J(),t=Q(),o=pe(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:f}=s;if(Array.isArray(l))return u(s,"additionalItems",l);f.items=!0,!(0,t.alwaysValidSchema)(f,l)&&s.ok((0,o.validateArray)(s))}};function u(s,l,f=s.schema){const{gen:p,parentSchema:_,data:y,keyword:E,it:v}=s;b(_),v.opts.unevaluated&&f.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(p,f.length,v.items));const w=p.name("valid"),g=p.const("len",(0,e._)`${y}.length`);f.forEach((a,d)=>{(0,t.alwaysValidSchema)(v,a)||(p.if((0,e._)`${g} > ${d}`,()=>s.subschema({keyword:E,schemaProp:d,dataProp:d},w)),s.ok(w))});function b(a){const{opts:d,errSchemaPath:n}=v,c=f.length,$=c===a.minItems&&(c===a.maxItems||a[l]===!1);if(d.strictTuples&&!$){const i=`"${E}" is ${c}-tuple, but minItems or maxItems/${l} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(v,i,d.strictTuples)}}}return ke.validateTuple=u,ke.default=r,ke}var rn;function Qs(){if(rn)return ot;rn=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=zn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return ot.default=t,ot}var it={},nn;function Zs(){if(nn)return it;nn=1,Object.defineProperty(it,"__esModule",{value:!0});const e=J(),t=Q(),o=pe(),r=Un(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:f,parentSchema:p,it:_}=l,{prefixItems:y}=p;_.items=!0,!(0,t.alwaysValidSchema)(_,f)&&(y?(0,r.validateAdditionalItems)(l,y):l.ok((0,o.validateArray)(l)))}};return it.default=s,it}var at={},sn;function Xs(){if(sn)return at;sn=1,Object.defineProperty(at,"__esModule",{value:!0});const e=J(),t=Q(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:u,max:s}})=>s===void 0?(0,e.str)`must contain at least ${u} valid item(s)`:(0,e.str)`must contain at least ${u} and no more than ${s} valid item(s)`,params:({params:{min:u,max:s}})=>s===void 0?(0,e._)`{minContains: ${u}}`:(0,e._)`{minContains: ${u}, maxContains: ${s}}`},code(u){const{gen:s,schema:l,parentSchema:f,data:p,it:_}=u;let y,E;const{minContains:v,maxContains:w}=f;_.opts.next?(y=v===void 0?1:v,E=w):y=1;const g=s.const("len",(0,e._)`${p}.length`);if(u.setParams({min:y,max:E}),E===void 0&&y===0){(0,t.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(E!==void 0&&y>E){(0,t.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),u.fail();return}if((0,t.alwaysValidSchema)(_,l)){let c=(0,e._)`${g} >= ${y}`;E!==void 0&&(c=(0,e._)`${c} && ${g} <= ${E}`),u.pass(c);return}_.items=!0;const b=s.name("valid");E===void 0&&y===1?d(b,()=>s.if(b,()=>s.break())):y===0?(s.let(b,!0),E!==void 0&&s.if((0,e._)`${p}.length > 0`,a)):(s.let(b,!1),a()),u.result(b,()=>u.reset());function a(){const c=s.name("_valid"),$=s.let("count",0);d(c,()=>s.if(c,()=>n($)))}function d(c,$){s.forRange("i",0,g,i=>{u.subschema({keyword:"contains",dataProp:i,dataPropType:t.Type.Num,compositeRule:!0},c),$()})}function n(c){s.code((0,e._)`${c}++`),E===void 0?s.if((0,e._)`${c} >= ${y}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${c} > ${E}`,()=>s.assign(b,!1).break()),y===1?s.assign(b,!0):s.if((0,e._)`${c} >= ${y}`,()=>s.assign(b,!0)))}}};return at.default=r,at}var Gt={},on;function Ys(){return on||(on=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J(),o=Q(),r=pe();e.error={message:({params:{property:p,depsCount:_,deps:y}})=>{const E=_===1?"property":"properties";return(0,t.str)`must have ${E} ${y} when property ${p} is present`},params:({params:{property:p,depsCount:_,deps:y,missingProperty:E}})=>(0,t._)`{property: ${p},
|
|
6
|
+
missingProperty: ${E},
|
|
7
|
+
depsCount: ${_},
|
|
8
|
+
deps: ${y}}`};const u={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(p){const[_,y]=s(p);l(p,_),f(p,y)}};function s({schema:p}){const _={},y={};for(const E in p){if(E==="__proto__")continue;const v=Array.isArray(p[E])?_:y;v[E]=p[E]}return[_,y]}function l(p,_=p.schema){const{gen:y,data:E,it:v}=p;if(Object.keys(_).length===0)return;const w=y.let("missing");for(const g in _){const b=_[g];if(b.length===0)continue;const a=(0,r.propertyInData)(y,E,g,v.opts.ownProperties);p.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),v.allErrors?y.if(a,()=>{for(const d of b)(0,r.checkReportMissingProp)(p,d)}):(y.if((0,t._)`${a} && (${(0,r.checkMissingProp)(p,b,w)})`),(0,r.reportMissingProp)(p,w),y.else())}}e.validatePropertyDeps=l;function f(p,_=p.schema){const{gen:y,data:E,keyword:v,it:w}=p,g=y.name("valid");for(const b in _)(0,o.alwaysValidSchema)(w,_[b])||(y.if((0,r.propertyInData)(y,E,b,w.opts.ownProperties),()=>{const a=p.subschema({keyword:v,schemaProp:b},g);p.mergeValidEvaluated(a,g)},()=>y.var(g,!0)),p.ok(g))}e.validateSchemaDeps=f,e.default=u})(Gt)),Gt}var ut={},an;function xs(){if(an)return ut;an=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),t=Q(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:u})=>(0,e._)`{propertyName: ${u.propertyName}}`},code(u){const{gen:s,schema:l,data:f,it:p}=u;if((0,t.alwaysValidSchema)(p,l))return;const _=s.name("valid");s.forIn("key",f,y=>{u.setParams({propertyName:y}),u.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},_),s.if((0,e.not)(_),()=>{u.error(!0),p.allErrors||s.break()})}),u.ok(_)}};return ut.default=r,ut}var ct={},un;function Kn(){if(un)return ct;un=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=pe(),t=J(),o=we(),r=Q(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:f,schema:p,parentSchema:_,data:y,errsCount:E,it:v}=l;if(!E)throw new Error("ajv implementation error");const{allErrors:w,opts:g}=v;if(v.props=!0,g.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(v,p))return;const b=(0,e.allSchemaProperties)(_.properties),a=(0,e.allSchemaProperties)(_.patternProperties);d(),l.ok((0,t._)`${E} === ${o.default.errors}`);function d(){f.forIn("key",y,m=>{!b.length&&!a.length?$(m):f.if(n(m),()=>$(m))})}function n(m){let S;if(b.length>8){const k=(0,r.schemaRefOrVal)(v,_.properties,"properties");S=(0,e.isOwnProperty)(f,k,m)}else b.length?S=(0,t.or)(...b.map(k=>(0,t._)`${m} === ${k}`)):S=t.nil;return a.length&&(S=(0,t.or)(S,...a.map(k=>(0,t._)`${(0,e.usePattern)(l,k)}.test(${m})`))),(0,t.not)(S)}function c(m){f.code((0,t._)`delete ${y}[${m}]`)}function $(m){if(g.removeAdditional==="all"||g.removeAdditional&&p===!1){c(m);return}if(p===!1){l.setParams({additionalProperty:m}),l.error(),w||f.break();return}if(typeof p=="object"&&!(0,r.alwaysValidSchema)(v,p)){const S=f.name("valid");g.removeAdditional==="failing"?(i(m,S,!1),f.if((0,t.not)(S),()=>{l.reset(),c(m)})):(i(m,S),w||f.if((0,t.not)(S),()=>f.break()))}}function i(m,S,k){const T={keyword:"additionalProperties",dataProp:m,dataPropType:r.Type.Str};k===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(T,S)}}};return ct.default=s,ct}var lt={},cn;function eo(){if(cn)return lt;cn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=Rt(),t=pe(),o=Q(),r=Kn(),u={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:f,parentSchema:p,data:_,it:y}=s;y.opts.removeAdditional==="all"&&p.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(y,r.default,"additionalProperties"));const E=(0,t.allSchemaProperties)(f);for(const a of E)y.definedProperties.add(a);y.opts.unevaluated&&E.length&&y.props!==!0&&(y.props=o.mergeEvaluated.props(l,(0,o.toHash)(E),y.props));const v=E.filter(a=>!(0,o.alwaysValidSchema)(y,f[a]));if(v.length===0)return;const w=l.name("valid");for(const a of v)g(a)?b(a):(l.if((0,t.propertyInData)(l,_,a,y.opts.ownProperties)),b(a),y.allErrors||l.else().var(w,!0),l.endIf()),s.it.definedProperties.add(a),s.ok(w);function g(a){return y.opts.useDefaults&&!y.compositeRule&&f[a].default!==void 0}function b(a){s.subschema({keyword:"properties",schemaProp:a,dataProp:a},w)}}};return lt.default=u,lt}var dt={},ln;function to(){if(ln)return dt;ln=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=pe(),t=J(),o=Q(),r=Q(),u={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:f,data:p,parentSchema:_,it:y}=s,{opts:E}=y,v=(0,e.allSchemaProperties)(f),w=v.filter($=>(0,o.alwaysValidSchema)(y,f[$]));if(v.length===0||w.length===v.length&&(!y.opts.unevaluated||y.props===!0))return;const g=E.strictSchema&&!E.allowMatchingProperties&&_.properties,b=l.name("valid");y.props!==!0&&!(y.props instanceof t.Name)&&(y.props=(0,r.evaluatedPropsToName)(l,y.props));const{props:a}=y;d();function d(){for(const $ of v)g&&n($),y.allErrors?c($):(l.var(b,!0),c($),l.if(b))}function n($){for(const i in g)new RegExp($).test(i)&&(0,o.checkStrictMode)(y,`property ${i} matches pattern ${$} (use allowMatchingProperties)`)}function c($){l.forIn("key",p,i=>{l.if((0,t._)`${(0,e.usePattern)(s,$)}.test(${i})`,()=>{const m=w.includes($);m||s.subschema({keyword:"patternProperties",schemaProp:$,dataProp:i,dataPropType:r.Type.Str},b),y.opts.unevaluated&&a!==!0?l.assign((0,t._)`${a}[${i}]`,!0):!m&&!y.allErrors&&l.if((0,t.not)(b),()=>l.break())})})}}};return dt.default=u,dt}var ft={},dn;function ro(){if(dn)return ft;dn=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=Q(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:r,schema:u,it:s}=o;if((0,e.alwaysValidSchema)(s,u)){o.fail();return}const l=r.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),o.failResult(l,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return ft.default=t,ft}var ht={},fn;function no(){if(fn)return ht;fn=1,Object.defineProperty(ht,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pe().validateUnion,error:{message:"must match a schema in anyOf"}};return ht.default=t,ht}var pt={},hn;function so(){if(hn)return pt;hn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),t=Q(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:u})=>(0,e._)`{passingSchemas: ${u.passing}}`},code(u){const{gen:s,schema:l,parentSchema:f,it:p}=u;if(!Array.isArray(l))throw new Error("ajv implementation error");if(p.opts.discriminator&&f.discriminator)return;const _=l,y=s.let("valid",!1),E=s.let("passing",null),v=s.name("_valid");u.setParams({passing:E}),s.block(w),u.result(y,()=>u.reset(),()=>u.error(!0));function w(){_.forEach((g,b)=>{let a;(0,t.alwaysValidSchema)(p,g)?s.var(v,!0):a=u.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},v),b>0&&s.if((0,e._)`${v} && ${y}`).assign(y,!1).assign(E,(0,e._)`[${E}, ${b}]`).else(),s.if(v,()=>{s.assign(y,!0),s.assign(E,b),a&&u.mergeEvaluated(a,e.Name)})})}}};return pt.default=r,pt}var mt={},pn;function oo(){if(pn)return mt;pn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=Q(),t={keyword:"allOf",schemaType:"array",code(o){const{gen:r,schema:u,it:s}=o;if(!Array.isArray(u))throw new Error("ajv implementation error");const l=r.name("valid");u.forEach((f,p)=>{if((0,e.alwaysValidSchema)(s,f))return;const _=o.subschema({keyword:"allOf",schemaProp:p},l);o.ok(l),o.mergeEvaluated(_)})}};return mt.default=t,mt}var yt={},mn;function io(){if(mn)return yt;mn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=J(),t=Q(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:f,it:p}=s;f.then===void 0&&f.else===void 0&&(0,t.checkStrictMode)(p,'"if" without "then" and "else" is ignored');const _=u(p,"then"),y=u(p,"else");if(!_&&!y)return;const E=l.let("valid",!0),v=l.name("_valid");if(w(),s.reset(),_&&y){const b=l.let("ifClause");s.setParams({ifClause:b}),l.if(v,g("then",b),g("else",b))}else _?l.if(v,g("then")):l.if((0,e.not)(v),g("else"));s.pass(E,()=>s.error(!0));function w(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);s.mergeEvaluated(b)}function g(b,a){return()=>{const d=s.subschema({keyword:b},v);l.assign(E,v),s.mergeValidEvaluated(d,E),a?l.assign(a,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function u(s,l){const f=s.schema[l];return f!==void 0&&!(0,t.alwaysValidSchema)(s,f)}return yt.default=r,yt}var gt={},yn;function ao(){if(yn)return gt;yn=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=Q(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:r,it:u}){r.if===void 0&&(0,e.checkStrictMode)(u,`"${o}" without "if" is ignored`)}};return gt.default=t,gt}var gn;function uo(){if(gn)return st;gn=1,Object.defineProperty(st,"__esModule",{value:!0});const e=Un(),t=Qs(),o=zn(),r=Zs(),u=Xs(),s=Ys(),l=xs(),f=Kn(),p=eo(),_=to(),y=ro(),E=no(),v=so(),w=oo(),g=io(),b=ao();function a(d=!1){const n=[y.default,E.default,v.default,w.default,g.default,b.default,l.default,f.default,s.default,p.default,_.default];return d?n.push(t.default,r.default):n.push(e.default,o.default),n.push(u.default),n}return st.default=a,st}var _t={},vt={},_n;function co(){if(_n)return vt;_n=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=J(),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,u){const{gen:s,data:l,$data:f,schema:p,schemaCode:_,it:y}=r,{opts:E,errSchemaPath:v,schemaEnv:w,self:g}=y;if(!E.validateFormats)return;f?b():a();function b(){const d=s.scopeValue("formats",{ref:g.formats,code:E.code.formats}),n=s.const("fDef",(0,e._)`${d}[${_}]`),c=s.let("fType"),$=s.let("format");s.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>s.assign(c,(0,e._)`${n}.type || "string"`).assign($,(0,e._)`${n}.validate`),()=>s.assign(c,(0,e._)`"string"`).assign($,n)),r.fail$data((0,e.or)(i(),m()));function i(){return E.strictSchema===!1?e.nil:(0,e._)`${_} && !${$}`}function m(){const S=w.$async?(0,e._)`(${n}.async ? await ${$}(${l}) : ${$}(${l}))`:(0,e._)`${$}(${l})`,k=(0,e._)`(typeof ${$} == "function" ? ${S} : ${$}.test(${l}))`;return(0,e._)`${$} && ${$} !== true && ${c} === ${u} && !${k}`}}function a(){const d=g.formats[p];if(!d){i();return}if(d===!0)return;const[n,c,$]=m(d);n===u&&r.pass(S());function i(){if(E.strictSchema===!1){g.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${p}" ignored in schema at path "${v}"`}}function m(k){const T=k instanceof RegExp?(0,e.regexpCode)(k):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(p)}`:void 0,M=s.scopeValue("formats",{key:p,ref:k,code:T});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,e._)`${M}.validate`]:["string",k,M]}function S(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!w.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${l})`}return typeof c=="function"?(0,e._)`${$}(${l})`:(0,e._)`${$}.test(${l})`}}}};return vt.default=o,vt}var vn;function lo(){if(vn)return _t;vn=1,Object.defineProperty(_t,"__esModule",{value:!0});const t=[co().default];return _t.default=t,_t}var Ee={},$n;function fo(){return $n||($n=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contentVocabulary=Ee.metadataVocabulary=void 0,Ee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ee}var wn;function ho(){if(wn)return ze;wn=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=As(),t=Ws(),o=uo(),r=lo(),u=fo(),s=[e.default,t.default,(0,o.default)(),r.default,u.metadataVocabulary,u.contentVocabulary];return ze.default=s,ze}var $t={},qe={},bn;function po(){if(bn)return qe;bn=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(qe.DiscrError=e={})),qe}var Sn;function mo(){if(Sn)return $t;Sn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=J(),t=po(),o=sr(),r=Ot(),u=Q(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:f,tagName:p}})=>f===t.DiscrError.Tag?`tag "${p}" must be string`:`value of tag "${p}" must be in oneOf`,params:({params:{discrError:f,tag:p,tagName:_}})=>(0,e._)`{error: ${f}, tag: ${_}, tagValue: ${p}}`},code(f){const{gen:p,data:_,schema:y,parentSchema:E,it:v}=f,{oneOf:w}=E;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=y.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const b=p.let("valid",!1),a=p.const("tag",(0,e._)`${_}${(0,e.getProperty)(g)}`);p.if((0,e._)`typeof ${a} == "string"`,()=>d(),()=>f.error(!1,{discrError:t.DiscrError.Tag,tag:a,tagName:g})),f.ok(b);function d(){const $=c();p.if(!1);for(const i in $)p.elseIf((0,e._)`${a} === ${i}`),p.assign(b,n($[i]));p.else(),f.error(!1,{discrError:t.DiscrError.Mapping,tag:a,tagName:g}),p.endIf()}function n($){const i=p.name("valid"),m=f.subschema({keyword:"oneOf",schemaProp:$},i);return f.mergeEvaluated(m,e.Name),i}function c(){var $;const i={},m=k(E);let S=!0;for(let V=0;V<w.length;V++){let K=w[V];if(K?.$ref&&!(0,u.schemaHasRulesButRef)(K,v.self.RULES)){const B=K.$ref;if(K=o.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,B),K instanceof o.SchemaEnv&&(K=K.schema),K===void 0)throw new r.default(v.opts.uriResolver,v.baseId,B)}const z=($=K?.properties)===null||$===void 0?void 0:$[g];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);S=S&&(m||k(K)),T(z,V)}if(!S)throw new Error(`discriminator: "${g}" must be required`);return i;function k({required:V}){return Array.isArray(V)&&V.includes(g)}function T(V,K){if(V.const)M(V.const,K);else if(V.enum)for(const z of V.enum)M(z,K);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function M(V,K){if(typeof V!="string"||V in i)throw new Error(`discriminator: "${g}" values must be unique strings`);i[V]=K}}}};return $t.default=l,$t}const yo="http://json-schema.org/draft-07/schema#",go="http://json-schema.org/draft-07/schema#",_o="Core schema meta-schema",vo={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},$o=["object","boolean"],wo={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},bo={$schema:yo,$id:go,title:_o,definitions:vo,type:$o,properties:wo,default:!0};var En;function So(){return En||(En=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const o=qs(),r=ho(),u=mo(),s=bo,l=["/properties"],f="http://json-schema.org/draft-07/schema";class p extends o.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(g,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}t.Ajv=p,e.exports=t=p,e.exports.Ajv=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var _=Rt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var y=J();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var E=nr();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var v=Ot();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(De,De.exports)),De.exports}var Eo=So();const Po=rr(Eo);var wt={exports:{}},Pn;function jo(){return Pn||(Pn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const o={},r={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:y=>{var E;const v=(E=y?.max)!==null&&E!==void 0?E:2;return()=>Math.floor(Math.random()*v)},seq:y=>{var E;const v=(E=y?.name)!==null&&E!==void 0?E:"";return o[v]||(o[v]=0),()=>o[v]++}},u=Object.assign(s,{DEFAULTS:r});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(y,E,v){if(!v.opts.useDefaults||v.compositeRule)return()=>!0;const w={};for(const b in y)w[b]=l(y[b]);const g=v.opts.useDefaults==="empty";return b=>{for(const a in y)(b[a]===void 0||g&&(b[a]===null||b[a]===""))&&(b[a]=w[a]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function l(y){return typeof y=="object"?f(y):p(y)}function f({func:y,args:E}){const v=r[y];return _(y,v),v(E)}function p(y=""){const E=r[y];return _(y,E),E()}function _(y,E){if(!E)throw new Error(`invalid "dynamicDefaults" keyword property value: ${y}`)}t.default=u,e.exports=u})(wt,wt.exports)),wt.exports}var ko=jo();const Hn=rr(ko),le={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},jn={silent:{level:-1},fatal:{level:le.fatal},error:{level:le.error},warn:{level:le.warn},log:{level:le.log},info:{level:le.info},success:{level:le.success},fail:{level:le.fail},ready:{level:le.info},start:{level:le.info},box:{level:le.info},debug:{level:le.debug},trace:{level:le.trace},verbose:{level:le.verbose}};function Jt(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function xt(e,t,o=".",r){if(!Jt(t))return xt(e,{},o);const u=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const l=e[s];l!=null&&(Array.isArray(l)&&Array.isArray(u[s])?u[s]=[...l,...u[s]]:Jt(l)&&Jt(u[s])?u[s]=xt(l,u[s],(o?`${o}.`:"")+s.toString()):u[s]=l)}return u}function Ro(e){return(...t)=>t.reduce((o,r)=>xt(o,r,""),{})}const Oo=Ro();function No(e){return Object.prototype.toString.call(e)==="[object Object]"}function To(e){return!(!No(e)||!e.message&&!e.args||e.stack)}let Bt=!1;const kn=[];class se{options;_lastLog;_mockFn;constructor(t={}){const o=t.types||jn;this.options=Oo({...t,defaults:{...t.defaults},level:Wt(t.level,o),reporters:[...t.reporters||[]]},{types:jn,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const r in o){const u={type:r,...this.options.defaults,...o[r]};this[r]=this._wrapLogFn(u),this[r].raw=this._wrapLogFn(u,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=Wt(t,this.options.types,this.options.level)}prompt(t,o){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,o)}create(t){const o=new se({...this.options,...t});return this._mockFn&&o.mockTypes(this._mockFn),o}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){const o=this.options.reporters.indexOf(t);if(o!==-1)return this.options.reporters.splice(o,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(const t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,o){t&&(t.__write||(t.__write=t.write),t.write=r=>{this[o].raw(String(r).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){Bt=!0}resumeLogs(){Bt=!1;const t=kn.splice(0);for(const o of t)o[0]._logFn(o[1],o[2])}mockTypes(t){const o=t||this.options.mockFn;if(this._mockFn=o,typeof o=="function")for(const r in this.options.types)this[r]=o(r,this.options.types[r])||this[r],this[r].raw=this[r]}_wrapLogFn(t,o){return(...r)=>{if(Bt){kn.push([this,t,r,o]);return}return this._logFn(t,r,o)}}_logFn(t,o,r){if((t.level||0)>this.level)return!1;const u={date:new Date,args:[],...t,level:Wt(t.level,this.options.types)};!r&&o.length===1&&To(o[0])?Object.assign(u,o[0]):u.args=[...o],u.message&&(u.args.unshift(u.message),delete u.message),u.additional&&(Array.isArray(u.additional)||(u.additional=u.additional.split(`
|
|
9
|
+
`)),u.args.push(`
|
|
10
|
+
`+u.additional.join(`
|
|
11
|
+
`)),delete u.additional),u.type=typeof u.type=="string"?u.type.toLowerCase():"log",u.tag=typeof u.tag=="string"?u.tag:"";const s=(f=!1)=>{const p=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&p>0){const _=[...this._lastLog.object.args];p>1&&_.push(`(repeated ${p} times)`),this._log({...this._lastLog.object,args:_}),this._lastLog.count=1}f&&(this._lastLog.object=u,this._log(u))};clearTimeout(this._lastLog.timeout);const l=this._lastLog.time&&u.date?u.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=u.date,l<this.options.throttle)try{const f=JSON.stringify([u.type,u.tag,u.args]),p=this._lastLog.serialized===f;if(this._lastLog.serialized=f,p&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}catch{}s(!0)}_log(t){for(const o of this.options.reporters)o.log(t,{options:this.options})}}function Wt(e,t={},o=3){return e===void 0?o:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:o}se.prototype.add=se.prototype.addReporter;se.prototype.remove=se.prototype.removeReporter;se.prototype.clear=se.prototype.removeReporter;se.prototype.withScope=se.prototype.withTag;se.prototype.mock=se.prototype.mockTypes;se.prototype.pause=se.prototype.pauseLogs;se.prototype.resume=se.prototype.resumeLogs;function Io(e={}){return new se(e)}class qo{options;defaultColor;levelColorMap;typeColorMap;constructor(t){this.options={...t},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(t){return t<1?console.__error||console.error:t===1?console.__warn||console.warn:console.__log||console.log}log(t){const o=this._getLogFn(t.level),r=t.type==="log"?"":t.type,u=t.tag||"",l=`
|
|
12
|
+
background: ${this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor};
|
|
13
|
+
border-radius: 0.5em;
|
|
14
|
+
color: white;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
padding: 2px 0.5em;
|
|
17
|
+
`,f=`%c${[u,r].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?o(`${f}%c ${t.args[0]}`,l,"",...t.args.slice(1)):o(f,l,...t.args)}}function Co(e={}){return Io({reporters:e.reporters||[new qo({})],prompt(o,r={}){return r.type==="confirm"?Promise.resolve(confirm(o)):Promise.resolve(prompt(o))},...e})}const Mo=Co();let Gn;const Nt=e=>Gn=e,Jn=Symbol();function er(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ce;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ce||(Ce={}));function xo(){const e=In(!0),t=e.run(()=>qn({}));let o=[],r=[];const u=Cn({install(s){Nt(u),u._a=s,s.provide(Jn,u),s.config.globalProperties.$pinia=u,r.forEach(l=>o.push(l)),r=[]},use(s){return this._a?o.push(s):r.push(s),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return u}const Bn=()=>{};function Rn(e,t,o,r=Bn){e.add(t);const u=()=>{e.delete(t)&&r()};return!o&&es()&&ts(u),u}function Re(e,...t){e.forEach(o=>{o(...t)})}const Ao=e=>e(),On=Symbol(),Qt=Symbol();function tr(e,t){e instanceof Map&&t instanceof Map?t.forEach((o,r)=>e.set(r,o)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const r=t[o],u=e[o];er(u)&&er(r)&&e.hasOwnProperty(o)&&!Ae(r)&&!Pt(r)?e[o]=tr(u,r):e[o]=r}return e}const Do=Symbol();function Vo(e){return!er(e)||!Object.prototype.hasOwnProperty.call(e,Do)}const{assign:$e}=Object;function Fo(e){return!!(Ae(e)&&e.effect)}function Lo(e,t,o,r){const{state:u,actions:s,getters:l}=t,f=o.state.value[e];let p;function _(){f||(o.state.value[e]=u?u():{});const y=ns(o.state.value[e]);return $e(y,s,Object.keys(l||{}).reduce((E,v)=>(E[v]=Cn(bt(()=>{Nt(o);const w=o._s.get(e);return l[v].call(w,w)})),E),{}))}return p=Wn(e,_,t,o,r,!0),p}function Wn(e,t,o={},r,u,s){let l;const f=$e({actions:{}},o),p={deep:!0};let _,y,E=new Set,v=new Set,w;const g=r.state.value[e];!s&&!g&&(r.state.value[e]={}),qn({});let b;function a(k){let T;_=y=!1,typeof k=="function"?(k(r.state.value[e]),T={type:Ce.patchFunction,storeId:e,events:w}):(tr(r.state.value[e],k),T={type:Ce.patchObject,payload:k,storeId:e,events:w});const M=b=Symbol();rs().then(()=>{b===M&&(_=!0)}),y=!0,Re(E,T,r.state.value[e])}const d=s?function(){const{state:T}=o,M=T?T():{};this.$patch(V=>{$e(V,M)})}:Bn;function n(){l.stop(),E.clear(),v.clear(),r._s.delete(e)}const c=(k,T="")=>{if(On in k)return k[Qt]=T,k;const M=function(){Nt(r);const V=Array.from(arguments),K=new Set,z=new Set;function B(x){K.add(x)}function ee(x){z.add(x)}Re(v,{args:V,name:M[Qt],store:i,after:B,onError:ee});let oe;try{oe=k.apply(this&&this.$id===e?this:i,V)}catch(x){throw Re(z,x),x}return oe instanceof Promise?oe.then(x=>(Re(K,x),x)).catch(x=>(Re(z,x),Promise.reject(x))):(Re(K,oe),oe)};return M[On]=!0,M[Qt]=T,M},$={_p:r,$id:e,$onAction:Rn.bind(null,v),$patch:a,$reset:d,$subscribe(k,T={}){const M=Rn(E,k,T.detached,()=>V()),V=l.run(()=>Zt(()=>r.state.value[e],K=>{(T.flush==="sync"?y:_)&&k({storeId:e,type:Ce.direct,events:w},K)},$e({},p,T)));return M},$dispose:n},i=Oe($);r._s.set(e,i);const S=(r._a&&r._a.runWithContext||Ao)(()=>r._e.run(()=>(l=In()).run(()=>t({action:c}))));for(const k in S){const T=S[k];if(Ae(T)&&!Fo(T)||Pt(T))s||(g&&Vo(T)&&(Ae(T)?T.value=g[k]:tr(T,g[k])),r.state.value[e][k]=T);else if(typeof T=="function"){const M=c(T,k);S[k]=M,f.actions[k]=T}}return $e(i,S),$e(Mn(i),S),Object.defineProperty(i,"$state",{get:()=>r.state.value[e],set:k=>{a(T=>{$e(T,k)})}}),r._p.forEach(k=>{$e(i,l.run(()=>k({store:i,app:r._a,pinia:r,options:f})))}),g&&s&&o.hydrate&&o.hydrate(i.$state,g),_=!0,y=!0,i}function Uo(e,t,o){let r;const u=typeof t=="function";r=u?o:t;function s(l,f){const p=Yn();return l=l||(p?xn(Jn,null):null),l&&Nt(l),l=Gn,l._s.has(e)||(u?Wn(e,t,r,l):Lo(e,r,l)),l._s.get(e)}return s.$id=e,s}function ei(e){const t=Mn(e),o={};for(const r in t){const u=t[r];u.effect?o[r]=bt({get:()=>e[r],set(s){e[r]=s}}):(Ae(u)||Pt(u))&&(o[r]=Xn(e,r))}return o}const zo={$id:"urn:jsonschema:credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},Ko={$id:"urn:jsonschema:data",items:{$ref:"urn:jsonschema:page"},type:"array"},Ho={$id:"urn:jsonschema:feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},Go={$id:"urn:jsonschema:fonts",items:{type:"string"},type:"array"},Jo={$id:"urn:jsonschema:importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},Bo={$id:"urn:jsonschema:log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},Wo={$id:"urn:jsonschema:page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],description:"Классы",items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};Hn.DEFAULTS.uuid=()=>Yt;const Qn=[zo,Ko,Wo,Jo,Ho,Go,Bo],Qo=new Po({code:{esm:!0},coerceTypes:!0,keywords:[Hn()],removeAdditional:!0,schemas:Qn,useDefaults:!0}),Nn=!0,Tn={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},Me=Object.fromEntries(Qn.map(({$id:e})=>[e.split(":").pop(),Qo.getSchema(e)])),ti=async e=>{try{return await ss(e)}catch(t){Mo.error(t)}},ri=Uo("shared",()=>{const e=Oe([]),t={feed:Oe({}),fonts:Oe([]),importmap:Oe({})},{add:o,addChild:r,down:u,left:s,nodes:l,nodesMap:f,remove:p,right:_,up:y}=gs(e);return["feed","fonts","importmap"].forEach(E=>{Me[E]&&Zt(t[E],Me[E],{immediate:Nn})}),Zt(l,async E=>{await Me.data?.(E)?E.forEach(v=>{Object.keys(Tn).some(w=>!(w in v))&&Object.defineProperties(v,Tn)}):(e.length=0,e.push({}))},{immediate:Nn}),{add:o,addChild:r,atlas:f,down:u,left:s,nodes:e,pages:l,remove:p,right:_,up:y,...t}});Me.credentials;Me.log;export{xo as a,Mo as b,Yo as c,Uo as d,ti as f,rr as g,ei as s,ri as u};
|