@vuebro/runtime 1.2.20 → 1.3.0

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.
@@ -1,4 +1,4 @@
1
- import{computed as Zt,toRef as vn,toRefs as In,reactive as $n,ref as Cn,watch as wn}from"vue";import{o as An}from"./unocss-GGiNT3_V.js";function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var p=function i(){var m=!1;try{m=this instanceof i}catch{}return m?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};p.prototype=t.prototype}else p={};return Object.defineProperty(p,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var m=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(p,i,m.get?m:{enumerable:!0,get:function(){return e[i]}})}),p}function Dn(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 Pt={exports:{}};const Vn={},Fn=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"})),Ln=Mn(Fn);var Xt;function Un(){return Xt||(Xt=1,(function(e){(function(){var t,p=0,i=[],m;for(m=0;m<256;m++)i[m]=(m+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=l,h.clearBuffer=function(){t=null,p=0},h.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 Dn=="function"?(s=s||Ln,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(s){if(s.randomBytes)return s.randomBytes;if(s.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var g=new Uint8Array(_);return s.getRandomValues(g),Array.from(g)}:function(_){var g=new Uint8Array(_);return s.getRandomValues(g),g}}return function(_){var g,P=[];for(g=0;g<_;g++)P.push(Math.floor(Math.random()*256));return P}})();function f(_){return(!t||p+_>h.BUFFER_SIZE)&&(p=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(p,p+=_)}function l(){var _=f(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=l();return i[_[0]]+i[_[1]]+i[_[2]]+i[_[3]]+"-"+i[_[4]]+i[_[5]]+"-"+i[_[6]]+i[_[7]]+"-"+i[_[8]]+i[_[9]]+"-"+i[_[10]]+i[_[11]]+i[_[12]]+i[_[13]]+i[_[14]]+i[_[15]]}})()})(Pt)),Pt.exports}var zn=Un();const Ft=Ht(zn),Yt=!0,xt=(e,t)=>[...e].reverse().map(p=>({node:p,parent:t,siblings:e})),Kn=(e,{branch:t="branch",children:p="children",id:i="id",index:m="index",next:s="next",parent:f="parent",prev:l="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const y=[this];for(;y[0]?.[f];)y.unshift(y[0][f]);return y}},[m]:{get(){return this[h].findIndex(y=>this[i]===y[i])}},[s]:{get(){return this[h][this[m]+1]}},[l]:{get(){return this[h][this[m]-1]}}},g=function*(y){const b=xt(y.value);for(;b.length;){const{node:o,parent:u,siblings:r}=b.pop()??{};o&&(o[f]!==u&&Object.defineProperty(o,f,{configurable:Yt,value:u}),o[h]!==r&&Object.defineProperty(o,h,{configurable:Yt,value:r}),Object.keys(_).some(a=>!(a in o))&&Object.defineProperties(o,_),yield o,b.push(...xt(o[p]??[],o)))}},P=Zt(()=>[...g(vn(e))]),$=Zt(()=>Object.fromEntries(P.value.map(y=>[y[i],y]))),w=(y,b)=>{const o=$.value[y];if(o){const[u]=P.value,r=o[m],a=o[s],v=r+1,n=o[f],d=o[l],E=r-1,O=o[h];switch(b){case"add":{const C=Ft();return O.splice(v,0,{[i]:C}),C}case"addChild":{const C=Ft();return Array.isArray(o[p])||(o[p]=[]),o[p].unshift({[i]:C}),C}case"down":r<O.length-1&&O[r]&&O[v]&&([O[r],O[v]]=[O[v],O[r]]);break;case"left":if(n?.[f])return n[h].splice(n[m]+1,0,...O.splice(r,1)),n[i];break;case"remove":{const C=a?.[i]??d?.[i]??n?.[i]??u?.[i];return O.splice(r,1),C}case"right":if(d){const C=d[p]??[],D=d[i];return d[p]=[...C,...O.splice(r,1)],D}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:y=>w(y,"add"),addChild:y=>w(y,"addChild"),down:y=>w(y,"down"),kvNodes:$,left:y=>w(y,"left"),nodes:P,remove:y=>w(y,"remove"),right:y=>w(y,"right"),up:y=>w(y,"up")}};var Te={exports:{}},jt={},me={},we={},Rt={},Nt={},Ot={},er;function yt(){return er||(er=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 p extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=p;class i extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((a,v)=>`${a}${v}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((a,v)=>(v instanceof p&&(a[v.str]=(a[v.str]||0)+1),a),{})}}e._Code=i,e.nil=new i("");function m(u,...r){const a=[u[0]];let v=0;for(;v<r.length;)l(a,r[v]),a.push(u[++v]);return new i(a)}e._=m;const s=new i("+");function f(u,...r){const a=[w(u[0])];let v=0;for(;v<r.length;)a.push(s),l(a,r[v]),a.push(s,w(u[++v]));return h(a),new i(a)}e.str=f;function l(u,r){r instanceof i?u.push(...r._items):r instanceof p?u.push(r):u.push(P(r))}e.addCodeArg=l;function h(u){let r=1;for(;r<u.length-1;){if(u[r]===s){const a=_(u[r-1],u[r+1]);if(a!==void 0){u.splice(r-1,3,a);continue}u[r++]="+"}r++}}function _(u,r){if(r==='""')return u;if(u==='""')return r;if(typeof u=="string")return r instanceof p||u[u.length-1]!=='"'?void 0:typeof r!="string"?`${u.slice(0,-1)}${r}"`:r[0]==='"'?u.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(u instanceof p))return`"${u}${r.slice(1)}`}function g(u,r){return r.emptyStr()?u:u.emptyStr()?r:f`${u}${r}`}e.strConcat=g;function P(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:w(Array.isArray(u)?u.join(","):u)}function $(u){return new i(w(u))}e.stringify=$;function w(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function y(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new i(`.${u}`):m`[${u}]`}e.getProperty=y;function b(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new i(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=b;function o(u){return new i(u.toString())}e.regexpCode=o})(Ot)),Ot}var kt={},tr;function rr(){return tr||(tr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=yt();class p extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var i;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class m{constructor({prefixes:_,parent:g}={}){this._names={},this._prefixes=_,this._parent=g}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const g=this._names[_]||this._nameGroup(_);return`${_}${g.index++}`}_nameGroup(_){var g,P;if(!((P=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||P===void 0)&&P.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=m;class s extends t.Name{constructor(_,g){super(g),this.prefix=_}setValue(_,{property:g,itemIndex:P}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(g)}[${P}]`}}e.ValueScopeName=s;const f=(0,t._)`\n`;class l extends m{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?f:t.nil}}get(){return this._scope}name(_){return new s(_,this._newName(_))}value(_,g){var P;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:w}=$,y=(P=g.key)!==null&&P!==void 0?P:g.ref;let b=this._values[w];if(b){const r=b.get(y);if(r)return r}else b=this._values[w]=new Map;b.set(y,$);const o=this._scope[w]||(this._scope[w]=[]),u=o.length;return o[u]=g.ref,$.setValue(g,{property:w,itemIndex:u}),$}getValue(_,g){const P=this._values[_];if(P)return P.get(g)}scopeRefs(_,g=this._values){return this._reduceValues(g,P=>{if(P.scopePath===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return(0,t._)`${_}${P.scopePath}`})}scopeCode(_=this._values,g,P){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},g,P)}_reduceValues(_,g,P={},$){let w=t.nil;for(const y in _){const b=_[y];if(!b)continue;const o=P[y]=P[y]||new Map;b.forEach(u=>{if(o.has(u))return;o.set(u,i.Started);let r=g(u);if(r){const a=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${a} ${u} = ${r};${this.opts._n}`}else if(r=$?.(u))w=(0,t._)`${w}${r}${this.opts._n}`;else throw new p(u);o.set(u,i.Completed)})}return w}}e.ValueScope=l})(kt)),kt}var nr;function J(){return nr||(nr=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=yt(),p=rr();var i=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var m=rr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return m.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return m.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return m.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return m.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(c,S){return this}}class f extends s{constructor(c,S,T){super(),this.varKind=c,this.name=S,this.rhs=T}render({es5:c,_n:S}){const T=c?p.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${F};`+S}optimizeNames(c,S){if(c[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,c,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends s{constructor(c,S,T){super(),this.lhs=c,this.rhs=S,this.sideEffects=T}render({_n:c}){return`${this.lhs} = ${this.rhs};`+c}optimizeNames(c,S){if(!(this.lhs instanceof t.Name&&!c[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,c,S),this}get names(){const c=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(c,this.rhs)}}class h extends l{constructor(c,S,T,F){super(c,T,F),this.op=S}render({_n:c}){return`${this.lhs} ${this.op}= ${this.rhs};`+c}}class _ extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`${this.label}:`+c}}class g extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`break${this.label?` ${this.label}`:""};`+c}}class P extends s{constructor(c){super(),this.error=c}render({_n:c}){return`throw ${this.error};`+c}get names(){return this.error.names}}class $ extends s{constructor(c){super(),this.code=c}render({_n:c}){return`${this.code};`+c}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(c,S){return this.code=W(this.code,c,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends s{constructor(c=[]){super(),this.nodes=c}render(c){return this.nodes.reduce((S,T)=>S+T.render(c),"")}optimizeNodes(){const{nodes:c}=this;let S=c.length;for(;S--;){const T=c[S].optimizeNodes();Array.isArray(T)?c.splice(S,1,...T):T?c[S]=T:c.splice(S,1)}return c.length>0?this:void 0}optimizeNames(c,S){const{nodes:T}=this;let F=T.length;for(;F--;){const U=T[F];U.optimizeNames(c,S)||(x(c,U.names),T.splice(F,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((c,S)=>K(c,S.names),{})}}class y extends w{render(c){return"{"+c._n+super.render(c)+"}"+c._n}}class b extends w{}class o extends y{}o.kind="else";class u extends y{constructor(c,S){super(S),this.condition=c}render(c){let S=`if(${this.condition})`+super.render(c);return this.else&&(S+="else "+this.else.render(c)),S}optimizeNodes(){super.optimizeNodes();const c=this.condition;if(c===!0)return this.nodes;let S=this.else;if(S){const T=S.optimizeNodes();S=this.else=Array.isArray(T)?new o(T):T}if(S)return c===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(he(c),S instanceof u?[S]:S.nodes);if(!(c===!1||!this.nodes.length))return this}optimizeNames(c,S){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(c,S),!!(super.optimizeNames(c,S)||this.else))return this.condition=W(this.condition,c,S),this}get names(){const c=super.names;return z(c,this.condition),this.else&&K(c,this.else.names),c}}u.kind="if";class r extends y{}r.kind="for";class a extends r{constructor(c){super(),this.iteration=c}render(c){return`for(${this.iteration})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iteration=W(this.iteration,c,S),this}get names(){return K(super.names,this.iteration.names)}}class v extends r{constructor(c,S,T,F){super(),this.varKind=c,this.name=S,this.from=T,this.to=F}render(c){const S=c.es5?p.varKinds.var:this.varKind,{name:T,from:F,to:U}=this;return`for(${S} ${T}=${F}; ${T}<${U}; ${T}++)`+super.render(c)}get names(){const c=z(super.names,this.from);return z(c,this.to)}}class n extends r{constructor(c,S,T,F){super(),this.loop=c,this.varKind=S,this.name=T,this.iterable=F}render(c){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iterable=W(this.iterable,c,S),this}get names(){return K(super.names,this.iterable.names)}}class d extends y{constructor(c,S,T){super(),this.name=c,this.args=S,this.async=T}render(c){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(c)}}d.kind="func";class E extends w{render(c){return"return "+super.render(c)}}E.kind="return";class O extends y{render(c){let S="try"+super.render(c);return this.catch&&(S+=this.catch.render(c)),this.finally&&(S+=this.finally.render(c)),S}optimizeNodes(){var c,S;return super.optimizeNodes(),(c=this.catch)===null||c===void 0||c.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(c,S){var T,F;return super.optimizeNames(c,S),(T=this.catch)===null||T===void 0||T.optimizeNames(c,S),(F=this.finally)===null||F===void 0||F.optimizeNames(c,S),this}get names(){const c=super.names;return this.catch&&K(c,this.catch.names),this.finally&&K(c,this.finally.names),c}}class C extends y{constructor(c){super(),this.error=c}render(c){return`catch(${this.error})`+super.render(c)}}C.kind="catch";class D extends y{render(c){return"finally"+super.render(c)}}D.kind="finally";class V{constructor(c,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
1
+ import{computed as Zt,toRef as vn,toRefs as In,reactive as $n,ref as Cn,watch as wn}from"vue";import{o as An}from"./unocss-BKXTr99u.js";function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var p=function i(){var m=!1;try{m=this instanceof i}catch{}return m?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};p.prototype=t.prototype}else p={};return Object.defineProperty(p,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var m=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(p,i,m.get?m:{enumerable:!0,get:function(){return e[i]}})}),p}function Dn(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 Pt={exports:{}};const Vn={},Fn=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"})),Ln=Mn(Fn);var Xt;function Un(){return Xt||(Xt=1,(function(e){(function(){var t,p=0,i=[],m;for(m=0;m<256;m++)i[m]=(m+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=l,h.clearBuffer=function(){t=null,p=0},h.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 Dn=="function"?(s=s||Ln,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(s){if(s.randomBytes)return s.randomBytes;if(s.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var g=new Uint8Array(_);return s.getRandomValues(g),Array.from(g)}:function(_){var g=new Uint8Array(_);return s.getRandomValues(g),g}}return function(_){var g,P=[];for(g=0;g<_;g++)P.push(Math.floor(Math.random()*256));return P}})();function f(_){return(!t||p+_>h.BUFFER_SIZE)&&(p=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(p,p+=_)}function l(){var _=f(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=l();return i[_[0]]+i[_[1]]+i[_[2]]+i[_[3]]+"-"+i[_[4]]+i[_[5]]+"-"+i[_[6]]+i[_[7]]+"-"+i[_[8]]+i[_[9]]+"-"+i[_[10]]+i[_[11]]+i[_[12]]+i[_[13]]+i[_[14]]+i[_[15]]}})()})(Pt)),Pt.exports}var zn=Un();const Ft=Ht(zn),Yt=!0,xt=(e,t)=>[...e].reverse().map(p=>({node:p,parent:t,siblings:e})),Kn=(e,{branch:t="branch",children:p="children",id:i="id",index:m="index",next:s="next",parent:f="parent",prev:l="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const y=[this];for(;y[0]?.[f];)y.unshift(y[0][f]);return y}},[m]:{get(){return this[h].findIndex(y=>this[i]===y[i])}},[s]:{get(){return this[h][this[m]+1]}},[l]:{get(){return this[h][this[m]-1]}}},g=function*(y){const b=xt(y.value);for(;b.length;){const{node:o,parent:u,siblings:r}=b.pop()??{};o&&(o[f]!==u&&Object.defineProperty(o,f,{configurable:Yt,value:u}),o[h]!==r&&Object.defineProperty(o,h,{configurable:Yt,value:r}),Object.keys(_).some(a=>!(a in o))&&Object.defineProperties(o,_),yield o,b.push(...xt(o[p]??[],o)))}},P=Zt(()=>[...g(vn(e))]),$=Zt(()=>Object.fromEntries(P.value.map(y=>[y[i],y]))),w=(y,b)=>{const o=$.value[y];if(o){const[u]=P.value,r=o[m],a=o[s],v=r+1,n=o[f],d=o[l],E=r-1,O=o[h];switch(b){case"add":{const C=Ft();return O.splice(v,0,{[i]:C}),C}case"addChild":{const C=Ft();return Array.isArray(o[p])||(o[p]=[]),o[p].unshift({[i]:C}),C}case"down":r<O.length-1&&O[r]&&O[v]&&([O[r],O[v]]=[O[v],O[r]]);break;case"left":if(n?.[f])return n[h].splice(n[m]+1,0,...O.splice(r,1)),n[i];break;case"remove":{const C=a?.[i]??d?.[i]??n?.[i]??u?.[i];return O.splice(r,1),C}case"right":if(d){const C=d[p]??[],D=d[i];return d[p]=[...C,...O.splice(r,1)],D}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:y=>w(y,"add"),addChild:y=>w(y,"addChild"),down:y=>w(y,"down"),kvNodes:$,left:y=>w(y,"left"),nodes:P,remove:y=>w(y,"remove"),right:y=>w(y,"right"),up:y=>w(y,"up")}};var Te={exports:{}},jt={},me={},we={},Rt={},Nt={},Ot={},er;function yt(){return er||(er=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 p extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=p;class i extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((a,v)=>`${a}${v}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((a,v)=>(v instanceof p&&(a[v.str]=(a[v.str]||0)+1),a),{})}}e._Code=i,e.nil=new i("");function m(u,...r){const a=[u[0]];let v=0;for(;v<r.length;)l(a,r[v]),a.push(u[++v]);return new i(a)}e._=m;const s=new i("+");function f(u,...r){const a=[w(u[0])];let v=0;for(;v<r.length;)a.push(s),l(a,r[v]),a.push(s,w(u[++v]));return h(a),new i(a)}e.str=f;function l(u,r){r instanceof i?u.push(...r._items):r instanceof p?u.push(r):u.push(P(r))}e.addCodeArg=l;function h(u){let r=1;for(;r<u.length-1;){if(u[r]===s){const a=_(u[r-1],u[r+1]);if(a!==void 0){u.splice(r-1,3,a);continue}u[r++]="+"}r++}}function _(u,r){if(r==='""')return u;if(u==='""')return r;if(typeof u=="string")return r instanceof p||u[u.length-1]!=='"'?void 0:typeof r!="string"?`${u.slice(0,-1)}${r}"`:r[0]==='"'?u.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(u instanceof p))return`"${u}${r.slice(1)}`}function g(u,r){return r.emptyStr()?u:u.emptyStr()?r:f`${u}${r}`}e.strConcat=g;function P(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:w(Array.isArray(u)?u.join(","):u)}function $(u){return new i(w(u))}e.stringify=$;function w(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function y(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new i(`.${u}`):m`[${u}]`}e.getProperty=y;function b(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new i(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=b;function o(u){return new i(u.toString())}e.regexpCode=o})(Ot)),Ot}var kt={},tr;function rr(){return tr||(tr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=yt();class p extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var i;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class m{constructor({prefixes:_,parent:g}={}){this._names={},this._prefixes=_,this._parent=g}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const g=this._names[_]||this._nameGroup(_);return`${_}${g.index++}`}_nameGroup(_){var g,P;if(!((P=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||P===void 0)&&P.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=m;class s extends t.Name{constructor(_,g){super(g),this.prefix=_}setValue(_,{property:g,itemIndex:P}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(g)}[${P}]`}}e.ValueScopeName=s;const f=(0,t._)`\n`;class l extends m{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?f:t.nil}}get(){return this._scope}name(_){return new s(_,this._newName(_))}value(_,g){var P;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:w}=$,y=(P=g.key)!==null&&P!==void 0?P:g.ref;let b=this._values[w];if(b){const r=b.get(y);if(r)return r}else b=this._values[w]=new Map;b.set(y,$);const o=this._scope[w]||(this._scope[w]=[]),u=o.length;return o[u]=g.ref,$.setValue(g,{property:w,itemIndex:u}),$}getValue(_,g){const P=this._values[_];if(P)return P.get(g)}scopeRefs(_,g=this._values){return this._reduceValues(g,P=>{if(P.scopePath===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return(0,t._)`${_}${P.scopePath}`})}scopeCode(_=this._values,g,P){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},g,P)}_reduceValues(_,g,P={},$){let w=t.nil;for(const y in _){const b=_[y];if(!b)continue;const o=P[y]=P[y]||new Map;b.forEach(u=>{if(o.has(u))return;o.set(u,i.Started);let r=g(u);if(r){const a=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${a} ${u} = ${r};${this.opts._n}`}else if(r=$?.(u))w=(0,t._)`${w}${r}${this.opts._n}`;else throw new p(u);o.set(u,i.Completed)})}return w}}e.ValueScope=l})(kt)),kt}var nr;function J(){return nr||(nr=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=yt(),p=rr();var i=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var m=rr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return m.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return m.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return m.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return m.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(c,S){return this}}class f extends s{constructor(c,S,T){super(),this.varKind=c,this.name=S,this.rhs=T}render({es5:c,_n:S}){const T=c?p.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${F};`+S}optimizeNames(c,S){if(c[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,c,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends s{constructor(c,S,T){super(),this.lhs=c,this.rhs=S,this.sideEffects=T}render({_n:c}){return`${this.lhs} = ${this.rhs};`+c}optimizeNames(c,S){if(!(this.lhs instanceof t.Name&&!c[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,c,S),this}get names(){const c=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(c,this.rhs)}}class h extends l{constructor(c,S,T,F){super(c,T,F),this.op=S}render({_n:c}){return`${this.lhs} ${this.op}= ${this.rhs};`+c}}class _ extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`${this.label}:`+c}}class g extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`break${this.label?` ${this.label}`:""};`+c}}class P extends s{constructor(c){super(),this.error=c}render({_n:c}){return`throw ${this.error};`+c}get names(){return this.error.names}}class $ extends s{constructor(c){super(),this.code=c}render({_n:c}){return`${this.code};`+c}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(c,S){return this.code=W(this.code,c,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends s{constructor(c=[]){super(),this.nodes=c}render(c){return this.nodes.reduce((S,T)=>S+T.render(c),"")}optimizeNodes(){const{nodes:c}=this;let S=c.length;for(;S--;){const T=c[S].optimizeNodes();Array.isArray(T)?c.splice(S,1,...T):T?c[S]=T:c.splice(S,1)}return c.length>0?this:void 0}optimizeNames(c,S){const{nodes:T}=this;let F=T.length;for(;F--;){const U=T[F];U.optimizeNames(c,S)||(x(c,U.names),T.splice(F,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((c,S)=>K(c,S.names),{})}}class y extends w{render(c){return"{"+c._n+super.render(c)+"}"+c._n}}class b extends w{}class o extends y{}o.kind="else";class u extends y{constructor(c,S){super(S),this.condition=c}render(c){let S=`if(${this.condition})`+super.render(c);return this.else&&(S+="else "+this.else.render(c)),S}optimizeNodes(){super.optimizeNodes();const c=this.condition;if(c===!0)return this.nodes;let S=this.else;if(S){const T=S.optimizeNodes();S=this.else=Array.isArray(T)?new o(T):T}if(S)return c===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(he(c),S instanceof u?[S]:S.nodes);if(!(c===!1||!this.nodes.length))return this}optimizeNames(c,S){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(c,S),!!(super.optimizeNames(c,S)||this.else))return this.condition=W(this.condition,c,S),this}get names(){const c=super.names;return z(c,this.condition),this.else&&K(c,this.else.names),c}}u.kind="if";class r extends y{}r.kind="for";class a extends r{constructor(c){super(),this.iteration=c}render(c){return`for(${this.iteration})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iteration=W(this.iteration,c,S),this}get names(){return K(super.names,this.iteration.names)}}class v extends r{constructor(c,S,T,F){super(),this.varKind=c,this.name=S,this.from=T,this.to=F}render(c){const S=c.es5?p.varKinds.var:this.varKind,{name:T,from:F,to:U}=this;return`for(${S} ${T}=${F}; ${T}<${U}; ${T}++)`+super.render(c)}get names(){const c=z(super.names,this.from);return z(c,this.to)}}class n extends r{constructor(c,S,T,F){super(),this.loop=c,this.varKind=S,this.name=T,this.iterable=F}render(c){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iterable=W(this.iterable,c,S),this}get names(){return K(super.names,this.iterable.names)}}class d extends y{constructor(c,S,T){super(),this.name=c,this.args=S,this.async=T}render(c){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(c)}}d.kind="func";class E extends w{render(c){return"return "+super.render(c)}}E.kind="return";class O extends y{render(c){let S="try"+super.render(c);return this.catch&&(S+=this.catch.render(c)),this.finally&&(S+=this.finally.render(c)),S}optimizeNodes(){var c,S;return super.optimizeNodes(),(c=this.catch)===null||c===void 0||c.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(c,S){var T,F;return super.optimizeNames(c,S),(T=this.catch)===null||T===void 0||T.optimizeNames(c,S),(F=this.finally)===null||F===void 0||F.optimizeNames(c,S),this}get names(){const c=super.names;return this.catch&&K(c,this.catch.names),this.finally&&K(c,this.finally.names),c}}class C extends y{constructor(c){super(),this.error=c}render(c){return`catch(${this.error})`+super.render(c)}}C.kind="catch";class D extends y{render(c){return"finally"+super.render(c)}}D.kind="finally";class V{constructor(c,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
2
2
  `:""},this._extScope=c,this._scope=new p.Scope({parent:c}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(c){return this._scope.name(c)}scopeName(c){return this._extScope.name(c)}scopeValue(c,S){const T=this._extScope.value(c,S);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(c,S){return this._extScope.getValue(c,S)}scopeRefs(c){return this._extScope.scopeRefs(c,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(c,S,T,F){const U=this._scope.toName(S);return T!==void 0&&F&&(this._constants[U.str]=T),this._leafNode(new f(c,U,T)),U}const(c,S,T){return this._def(p.varKinds.const,c,S,T)}let(c,S,T){return this._def(p.varKinds.let,c,S,T)}var(c,S,T){return this._def(p.varKinds.var,c,S,T)}assign(c,S,T){return this._leafNode(new l(c,S,T))}add(c,S){return this._leafNode(new h(c,e.operators.ADD,S))}code(c){return typeof c=="function"?c():c!==t.nil&&this._leafNode(new $(c)),this}object(...c){const S=["{"];for(const[T,F]of c)S.length>1&&S.push(","),S.push(T),(T!==F||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,F));return S.push("}"),new t._Code(S)}if(c,S,T){if(this._blockNode(new u(c)),S&&T)this.code(S).else().code(T).endIf();else if(S)this.code(S).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(c){return this._elseNode(new u(c))}else(){return this._elseNode(new o)}endIf(){return this._endBlockNode(u,o)}_for(c,S){return this._blockNode(c),S&&this.code(S).endFor(),this}for(c,S){return this._for(new a(c),S)}forRange(c,S,T,F,U=this.opts.es5?p.varKinds.var:p.varKinds.let){const Z=this._scope.toName(c);return this._for(new v(U,Z,S,T),()=>F(Z))}forOf(c,S,T,F=p.varKinds.const){const U=this._scope.toName(c);if(this.opts.es5){const Z=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${Z}.length`,B=>{this.var(U,(0,t._)`${Z}[${B}]`),T(U)})}return this._for(new n("of",F,U,S),()=>T(U))}forIn(c,S,T,F=this.opts.es5?p.varKinds.var:p.varKinds.const){if(this.opts.ownProperties)return this.forOf(c,(0,t._)`Object.keys(${S})`,T);const U=this._scope.toName(c);return this._for(new n("in",F,U,S),()=>T(U))}endFor(){return this._endBlockNode(r)}label(c){return this._leafNode(new _(c))}break(c){return this._leafNode(new g(c))}return(c){const S=new E;if(this._blockNode(S),this.code(c),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(c,S,T){if(!S&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new O;if(this._blockNode(F),this.code(c),S){const U=this.name("e");this._currNode=F.catch=new C(U),S(U)}return T&&(this._currNode=F.finally=new D,this.code(T)),this._endBlockNode(C,D)}throw(c){return this._leafNode(new P(c))}block(c,S){return this._blockStarts.push(this._nodes.length),c&&this.code(c).endBlock(S),this}endBlock(c){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-S;if(T<0||c!==void 0&&T!==c)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${c} expected`);return this._nodes.length=S,this}func(c,S=t.nil,T,F){return this._blockNode(new d(c,S,T)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode(d)}optimize(c=1){for(;c-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(c){return this._currNode.nodes.push(c),this}_blockNode(c){this._currNode.nodes.push(c),this._nodes.push(c)}_endBlockNode(c,S){const T=this._currNode;if(T instanceof c||S&&T instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${c.kind}/${S.kind}`:c.kind}"`)}_elseNode(c){const S=this._currNode;if(!(S instanceof u))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=c,this}get _root(){return this._nodes[0]}get _currNode(){const c=this._nodes;return c[c.length-1]}set _currNode(c){const S=this._nodes;S[S.length-1]=c}}e.CodeGen=V;function K(k,c){for(const S in c)k[S]=(k[S]||0)+(c[S]||0);return k}function z(k,c){return c instanceof t._CodeOrName?K(k,c.names):k}function W(k,c,S){if(k instanceof t.Name)return T(k);if(!F(k))return k;return new t._Code(k._items.reduce((U,Z)=>(Z instanceof t.Name&&(Z=T(Z)),Z instanceof t._Code?U.push(...Z._items):U.push(Z),U),[]));function T(U){const Z=S[U.str];return Z===void 0||c[U.str]!==1?U:(delete c[U.str],Z)}function F(U){return U instanceof t._Code&&U._items.some(Z=>Z instanceof t.Name&&c[Z.str]===1&&S[Z.str]!==void 0)}}function x(k,c){for(const S in c)k[S]=(k[S]||0)-(c[S]||0)}function he(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,t._)`!${I(k)}`}e.not=he;const pe=R(e.operators.AND);function Y(...k){return k.reduce(pe)}e.and=Y;const _e=R(e.operators.OR);function A(...k){return k.reduce(_e)}e.or=A;function R(k){return(c,S)=>c===t.nil?S:S===t.nil?c:(0,t._)`${I(c)} ${k} ${I(S)}`}function I(k){return k instanceof t.Name?k:(0,t._)`(${k})`}})(Nt)),Nt}var H={},sr;function Q(){if(sr)return H;sr=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=yt();function p(n){const d={};for(const E of n)d[E]=!0;return d}H.toHash=p;function i(n,d){return typeof d=="boolean"?d:Object.keys(d).length===0?!0:(m(n,d),!s(d,n.self.RULES.all))}H.alwaysValidSchema=i;function m(n,d=n.schema){const{opts:E,self:O}=n;if(!E.strictSchema||typeof d=="boolean")return;const C=O.RULES.keywords;for(const D in d)C[D]||v(n,`unknown keyword: "${D}"`)}H.checkUnknownRules=m;function s(n,d){if(typeof n=="boolean")return!n;for(const E in n)if(d[E])return!0;return!1}H.schemaHasRules=s;function f(n,d){if(typeof n=="boolean")return!n;for(const E in n)if(E!=="$ref"&&d.all[E])return!0;return!1}H.schemaHasRulesButRef=f;function l({topSchemaRef:n,schemaPath:d},E,O,C){if(!C){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${n}${d}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=l;function h(n){return P(decodeURIComponent(n))}H.unescapeFragment=h;function _(n){return encodeURIComponent(g(n))}H.escapeFragment=_;function g(n){return typeof n=="number"?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=g;function P(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=P;function $(n,d){if(Array.isArray(n))for(const E of n)d(E);else d(n)}H.eachItem=$;function w({mergeNames:n,mergeToName:d,mergeValues:E,resultToName:O}){return(C,D,V,K)=>{const z=V===void 0?D:V instanceof e.Name?(D instanceof e.Name?n(C,D,V):d(C,D,V),V):D instanceof e.Name?(d(C,V,D),D):E(D,V);return K===e.Name&&!(z instanceof e.Name)?O(C,z):z}}H.mergeEvaluated={props:w({mergeNames:(n,d,E)=>n.if((0,e._)`${E} !== true && ${d} !== undefined`,()=>{n.if((0,e._)`${d} === true`,()=>n.assign(E,!0),()=>n.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${d})`))}),mergeToName:(n,d,E)=>n.if((0,e._)`${E} !== true`,()=>{d===!0?n.assign(E,!0):(n.assign(E,(0,e._)`${E} || {}`),b(n,E,d))}),mergeValues:(n,d)=>n===!0?!0:{...n,...d},resultToName:y}),items:w({mergeNames:(n,d,E)=>n.if((0,e._)`${E} !== true && ${d} !== undefined`,()=>n.assign(E,(0,e._)`${d} === true ? true : ${E} > ${d} ? ${E} : ${d}`)),mergeToName:(n,d,E)=>n.if((0,e._)`${E} !== true`,()=>n.assign(E,d===!0?!0:(0,e._)`${E} > ${d} ? ${E} : ${d}`)),mergeValues:(n,d)=>n===!0?!0:Math.max(n,d),resultToName:(n,d)=>n.var("items",d)})};function y(n,d){if(d===!0)return n.var("props",!0);const E=n.var("props",(0,e._)`{}`);return d!==void 0&&b(n,E,d),E}H.evaluatedPropsToName=y;function b(n,d,E){Object.keys(E).forEach(O=>n.assign((0,e._)`${d}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=b;const o={};function u(n,d){return n.scopeValue("func",{ref:d,code:o[d.code]||(o[d.code]=new t._Code(d.code))})}H.useFunc=u;var r;(function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"})(r||(H.Type=r={}));function a(n,d,E){if(n instanceof e.Name){const O=d===r.Num;return E?O?(0,e._)`"[" + ${n} + "]"`:(0,e._)`"['" + ${n} + "']"`:O?(0,e._)`"/" + ${n}`:(0,e._)`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(n).toString():"/"+g(n)}H.getErrorPath=a;function v(n,d,E=n.opts.strictSchema){if(E){if(d=`strict mode: ${d}`,E===!0)throw new Error(d);n.self.logger.warn(d)}}return H.checkStrictMode=v,H}var qe={},or;function $e(){if(or)return qe;or=1,Object.defineProperty(qe,"__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 qe.default=t,qe}var ir;function _t(){return ir||(ir=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(),p=Q(),i=$e();e.keywordError={message:({keyword:o})=>(0,t.str)`must pass "${o}" keyword validation`},e.keyword$DataError={message:({keyword:o,schemaType:u})=>u?(0,t.str)`"${o}" keyword must be ${u} ($data)`:(0,t.str)`"${o}" keyword is invalid ($data)`};function m(o,u=e.keywordError,r,a){const{it:v}=o,{gen:n,compositeRule:d,allErrors:E}=v,O=P(o,u,r);a??(d||E)?h(n,O):_(v,(0,t._)`[${O}]`)}e.reportError=m;function s(o,u=e.keywordError,r){const{it:a}=o,{gen:v,compositeRule:n,allErrors:d}=a,E=P(o,u,r);h(v,E),n||d||_(a,i.default.vErrors)}e.reportExtraError=s;function f(o,u){o.assign(i.default.errors,u),o.if((0,t._)`${i.default.vErrors} !== null`,()=>o.if(u,()=>o.assign((0,t._)`${i.default.vErrors}.length`,u),()=>o.assign(i.default.vErrors,null)))}e.resetErrorsCount=f;function l({gen:o,keyword:u,schemaValue:r,data:a,errsCount:v,it:n}){if(v===void 0)throw new Error("ajv implementation error");const d=o.name("err");o.forRange("i",v,i.default.errors,E=>{o.const(d,(0,t._)`${i.default.vErrors}[${E}]`),o.if((0,t._)`${d}.instancePath === undefined`,()=>o.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,n.errorPath))),o.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${n.errSchemaPath}/${u}`),n.opts.verbose&&(o.assign((0,t._)`${d}.schema`,r),o.assign((0,t._)`${d}.data`,a))})}e.extendErrors=l;function h(o,u){const r=o.const("err",u);o.if((0,t._)`${i.default.vErrors} === null`,()=>o.assign(i.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${i.default.vErrors}.push(${r})`),o.code((0,t._)`${i.default.errors}++`)}function _(o,u){const{gen:r,validateName:a,schemaEnv:v}=o;v.$async?r.throw((0,t._)`new ${o.ValidationError}(${u})`):(r.assign((0,t._)`${a}.errors`,u),r.return(!1))}const g={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 P(o,u,r){const{createErrors:a}=o.it;return a===!1?(0,t._)`{}`:$(o,u,r)}function $(o,u,r={}){const{gen:a,it:v}=o,n=[w(v,r),y(o,r)];return b(o,u,n),a.object(...n)}function w({errorPath:o},{instancePath:u}){const r=u?(0,t.str)`${o}${(0,p.getErrorPath)(u,p.Type.Str)}`:o;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,r)]}function y({keyword:o,it:{errSchemaPath:u}},{schemaPath:r,parentSchema:a}){let v=a?u:(0,t.str)`${u}/${o}`;return r&&(v=(0,t.str)`${v}${(0,p.getErrorPath)(r,p.Type.Str)}`),[g.schemaPath,v]}function b(o,{params:u,message:r},a){const{keyword:v,data:n,schemaValue:d,it:E}=o,{opts:O,propertyName:C,topSchemaRef:D,schemaPath:V}=E;a.push([g.keyword,v],[g.params,typeof u=="function"?u(o):u||(0,t._)`{}`]),O.messages&&a.push([g.message,typeof r=="function"?r(o):r]),O.verbose&&a.push([g.schema,d],[g.parentSchema,(0,t._)`${D}${V}`],[i.default.data,n]),C&&a.push([g.propertyName,C])}})(Rt)),Rt}var ar;function Hn(){if(ar)return we;ar=1,Object.defineProperty(we,"__esModule",{value:!0}),we.boolOrEmptySchema=we.topBoolOrEmptySchema=void 0;const e=_t(),t=J(),p=$e(),i={message:"boolean schema is false"};function m(l){const{gen:h,schema:_,validateName:g}=l;_===!1?f(l,!1):typeof _=="object"&&_.$async===!0?h.return(p.default.data):(h.assign((0,t._)`${g}.errors`,null),h.return(!0))}we.topBoolOrEmptySchema=m;function s(l,h){const{gen:_,schema:g}=l;g===!1?(_.var(h,!1),f(l)):_.var(h,!0)}we.boolOrEmptySchema=s;function f(l,h){const{gen:_,data:g}=l,P={gen:_,keyword:"false schema",data:g,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(P,i,void 0,h)}return we}var re={},be={},ur;function bn(){if(ur)return be;ur=1,Object.defineProperty(be,"__esModule",{value:!0}),be.getRules=be.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function p(m){return typeof m=="string"&&t.has(m)}be.isJSONType=p;function i(){const m={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...m,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},m.number,m.string,m.array,m.object],post:{rules:[]},all:{},keywords:{}}}return be.getRules=i,be}var ye={},cr;function En(){if(cr)return ye;cr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:i,self:m},s){const f=m.RULES.types[s];return f&&f!==!0&&t(i,f)}ye.schemaHasRulesForType=e;function t(i,m){return m.rules.some(s=>p(i,s))}ye.shouldUseGroup=t;function p(i,m){var s;return i[m.keyword]!==void 0||((s=m.definition.implements)===null||s===void 0?void 0:s.some(f=>i[f]!==void 0))}return ye.shouldUseRule=p,ye}var lr;function gt(){if(lr)return re;lr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=bn(),t=En(),p=_t(),i=J(),m=Q();var s;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(s||(re.DataType=s={}));function f(r){const a=l(r.type);if(a.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!a.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&a.push("null")}return a}re.getSchemaTypes=f;function l(r){const a=Array.isArray(r)?r:r?[r]:[];if(a.every(e.isJSONType))return a;throw new Error("type must be JSONType or JSONType[]: "+a.join(","))}re.getJSONTypes=l;function h(r,a){const{gen:v,data:n,opts:d}=r,E=g(a,d.coerceTypes),O=a.length>0&&!(E.length===0&&a.length===1&&(0,t.schemaHasRulesForType)(r,a[0]));if(O){const C=y(a,n,d.strictNumbers,s.Wrong);v.if(C,()=>{E.length?P(r,a,E):o(r)})}return O}re.coerceAndCheckDataType=h;const _=new Set(["string","number","integer","boolean","null"]);function g(r,a){return a?r.filter(v=>_.has(v)||a==="array"&&v==="array"):[]}function P(r,a,v){const{gen:n,data:d,opts:E}=r,O=n.let("dataType",(0,i._)`typeof ${d}`),C=n.let("coerced",(0,i._)`undefined`);E.coerceTypes==="array"&&n.if((0,i._)`${O} == 'object' && Array.isArray(${d}) && ${d}.length == 1`,()=>n.assign(d,(0,i._)`${d}[0]`).assign(O,(0,i._)`typeof ${d}`).if(y(a,d,E.strictNumbers),()=>n.assign(C,d))),n.if((0,i._)`${C} !== undefined`);for(const V of v)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&D(V);n.else(),o(r),n.endIf(),n.if((0,i._)`${C} !== undefined`,()=>{n.assign(d,C),$(r,C)});function D(V){switch(V){case"string":n.elseIf((0,i._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,i._)`"" + ${d}`).elseIf((0,i._)`${d} === null`).assign(C,(0,i._)`""`);return;case"number":n.elseIf((0,i._)`${O} == "boolean" || ${d} === null
3
3
  || (${O} == "string" && ${d} && ${d} == +${d})`).assign(C,(0,i._)`+${d}`);return;case"integer":n.elseIf((0,i._)`${O} === "boolean" || ${d} === null
4
4
  || (${O} === "string" && ${d} && ${d} == +${d} && !(${d} % 1))`).assign(C,(0,i._)`+${d}`);return;case"boolean":n.elseIf((0,i._)`${d} === "false" || ${d} === 0 || ${d} === null`).assign(C,!1).elseIf((0,i._)`${d} === "true" || ${d} === 1`).assign(C,!0);return;case"null":n.elseIf((0,i._)`${d} === "" || ${d} === 0 || ${d} === false`),n.assign(C,null);return;case"array":n.elseIf((0,i._)`${O} === "string" || ${O} === "number"