@vuebro/runtime 1.4.0 → 1.4.2

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{c as Xn,r as Yn,g as Wt}from"./markdown-CKwXX3x9.js";import{computed as nr,toRef as Nn,toRefs as Zn,reactive as On,ref as xn,watch as Tn}from"vue";var jt={exports:{}},sr;function es(){return sr||(sr=1,(function(e){(function(){var t,c=0,o=[],f;for(f=0;f<256;f++)o[f]=(f+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=u,h.clearBuffer=function(){t=null,c=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 n;typeof crypto<"u"?n=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(n=window.msCrypto),typeof Xn=="function"?(n=n||Yn,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var s=new Uint8Array(_);return n.getRandomValues(s),Array.from(s)}:function(_){var s=new Uint8Array(_);return n.getRandomValues(s),s}}return function(_){var s,S=[];for(s=0;s<_;s++)S.push(Math.floor(Math.random()*256));return S}})();function m(_){return(!t||c+_>h.BUFFER_SIZE)&&(c=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(c,c+=_)}function u(){var _=m(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=u();return o[_[0]]+o[_[1]]+o[_[2]]+o[_[3]]+"-"+o[_[4]]+o[_[5]]+"-"+o[_[6]]+o[_[7]]+"-"+o[_[8]]+o[_[9]]+"-"+o[_[10]]+o[_[11]]+o[_[12]]+o[_[13]]+o[_[14]]+o[_[15]]}})()})(jt)),jt.exports}var ts=es();const zt=Wt(ts),or=!0,ir=(e,t)=>[...e].reverse().map(c=>({node:c,parent:t,siblings:e})),rs=(e,{branch:t="branch",children:c="children",id:o="id",index:f="index",next:n="next",parent:m="parent",prev:u="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const g=[this];for(;g[0]?.[m];)g.unshift(g[0][m]);return g}},[f]:{get(){return this[h].findIndex(g=>this[o]===g[o])}},[n]:{get(){return this[h][this[f]+1]}},[u]:{get(){return this[h][this[f]-1]}}},s=function*(g){const b=ir(g.value);for(;b.length;){const{node:a,parent:d,siblings:r}=b.pop()??{};a&&(a[m]!==d&&Object.defineProperty(a,m,{configurable:or,value:d}),a[h]!==r&&Object.defineProperty(a,h,{configurable:or,value:r}),Object.keys(_).some(l=>!(l in a))&&Object.defineProperties(a,_),yield a,b.push(...ir(a[c]??[],a)))}},S=nr(()=>[...s(Nn(e))]),$=nr(()=>Object.fromEntries(S.value.map(g=>[g[o],g]))),v=(g,b)=>{const a=$.value[g];if(a){const[d]=S.value,r=a[f],l=a[n],w=r+1,i=a[m],y=a[u],E=r-1,O=a[h];switch(b){case"add":{const C=zt();return O.splice(w,0,{[o]:C}),C}case"addChild":{const C=zt();return Array.isArray(a[c])||(a[c]=[]),a[c].unshift({[o]:C}),C}case"down":r<O.length-1&&O[r]&&O[w]&&([O[r],O[w]]=[O[w],O[r]]);break;case"left":if(i?.[m])return i[h].splice(i[f]+1,0,...O.splice(r,1)),i[o];break;case"remove":{const C=l?.[o]??y?.[o]??i?.[o]??d?.[o];return O.splice(r,1),C}case"right":if(y){const C=y[c]??[],M=y[o];return y[c]=[...C,...O.splice(r,1)],M}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:g=>v(g,"add"),addChild:g=>v(g,"addChild"),down:g=>v(g,"down"),kvNodes:$,left:g=>v(g,"left"),nodes:S,remove:g=>v(g,"remove"),right:g=>v(g,"right"),up:g=>v(g,"up")}};var ke={exports:{}},Nt={},me={},we={},Ot={},Tt={},kt={},ar;function gt(){return ar||(ar=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 c 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=c;class o 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((l,w)=>`${l}${w}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((l,w)=>(w instanceof c&&(l[w.str]=(l[w.str]||0)+1),l),{})}}e._Code=o,e.nil=new o("");function f(d,...r){const l=[d[0]];let w=0;for(;w<r.length;)u(l,r[w]),l.push(d[++w]);return new o(l)}e._=f;const n=new o("+");function m(d,...r){const l=[v(d[0])];let w=0;for(;w<r.length;)l.push(n),u(l,r[w]),l.push(n,v(d[++w]));return h(l),new o(l)}e.str=m;function u(d,r){r instanceof o?d.push(...r._items):r instanceof c?d.push(r):d.push(S(r))}e.addCodeArg=u;function h(d){let r=1;for(;r<d.length-1;){if(d[r]===n){const l=_(d[r-1],d[r+1]);if(l!==void 0){d.splice(r-1,3,l);continue}d[r++]="+"}r++}}function _(d,r){if(r==='""')return d;if(d==='""')return r;if(typeof d=="string")return r instanceof c||d[d.length-1]!=='"'?void 0:typeof r!="string"?`${d.slice(0,-1)}${r}"`:r[0]==='"'?d.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(d instanceof c))return`"${d}${r.slice(1)}`}function s(d,r){return r.emptyStr()?d:d.emptyStr()?r:m`${d}${r}`}e.strConcat=s;function S(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:v(Array.isArray(d)?d.join(","):d)}function $(d){return new o(v(d))}e.stringify=$;function v(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function g(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):f`[${d}]`}e.getProperty=g;function b(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=b;function a(d){return new o(d.toString())}e.regexpCode=a})(kt)),kt}var qt={},ur;function cr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gt();class c extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var o;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:_,parent:s}={}){this._names={},this._prefixes=_,this._parent=s}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const s=this._names[_]||this._nameGroup(_);return`${_}${s.index++}`}_nameGroup(_){var s,S;if(!((S=(s=this._parent)===null||s===void 0?void 0:s._prefixes)===null||S===void 0)&&S.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=f;class n extends t.Name{constructor(_,s){super(s),this.prefix=_}setValue(_,{property:s,itemIndex:S}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(s)}[${S}]`}}e.ValueScopeName=n;const m=(0,t._)`\n`;class u extends f{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?m:t.nil}}get(){return this._scope}name(_){return new n(_,this._newName(_))}value(_,s){var S;if(s.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:v}=$,g=(S=s.key)!==null&&S!==void 0?S:s.ref;let b=this._values[v];if(b){const r=b.get(g);if(r)return r}else b=this._values[v]=new Map;b.set(g,$);const a=this._scope[v]||(this._scope[v]=[]),d=a.length;return a[d]=s.ref,$.setValue(s,{property:v,itemIndex:d}),$}getValue(_,s){const S=this._values[_];if(S)return S.get(s)}scopeRefs(_,s=this._values){return this._reduceValues(s,S=>{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,t._)`${_}${S.scopePath}`})}scopeCode(_=this._values,s,S){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},s,S)}_reduceValues(_,s,S={},$){let v=t.nil;for(const g in _){const b=_[g];if(!b)continue;const a=S[g]=S[g]||new Map;b.forEach(d=>{if(a.has(d))return;a.set(d,o.Started);let r=s(d);if(r){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${l} ${d} = ${r};${this.opts._n}`}else if(r=$?.(d))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new c(d);a.set(d,o.Completed)})}return v}}e.ValueScope=u})(qt)),qt}var lr;function J(){return lr||(lr=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=gt(),c=cr();var o=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var f=cr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.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 n{optimizeNodes(){return this}optimizeNames(p,P){return this}}class m extends n{constructor(p,P,k){super(),this.varKind=p,this.name=P,this.rhs=k}render({es5:p,_n:P}){const k=p?c.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${k} ${this.name}${L};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,p,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends n{constructor(p,P,k){super(),this.lhs=p,this.rhs=P,this.sideEffects=k}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof t.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,p,P),this}get names(){const p=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(p,this.rhs)}}class h extends u{constructor(p,P,k,L){super(p,k,L),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class _ extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class s extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class S extends n{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends n{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=W(this.code,p,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends n{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,k)=>P+k.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const k=p[P].optimizeNodes();Array.isArray(k)?p.splice(P,1,...k):k?p[P]=k:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:k}=this;let L=k.length;for(;L--;){const U=k[L];U.optimizeNames(p,P)||(x(p,U.names),k.splice(L,1))}return k.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>K(p,P.names),{})}}class g extends v{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class b extends v{}class a extends g{}a.kind="else";class d extends g{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const k=P.optimizeNodes();P=this.else=Array.isArray(k)?new a(k):k}if(P)return p===!1?P instanceof d?P:P.nodes:this.nodes.length?this:new d(he(p),P instanceof d?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var k;if(this.else=(k=this.else)===null||k===void 0?void 0:k.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=W(this.condition,p,P),this}get names(){const p=super.names;return z(p,this.condition),this.else&&K(p,this.else.names),p}}d.kind="if";class r extends g{}r.kind="for";class l extends r{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=W(this.iteration,p,P),this}get names(){return K(super.names,this.iteration.names)}}class w extends r{constructor(p,P,k,L){super(),this.varKind=p,this.name=P,this.from=k,this.to=L}render(p){const P=p.es5?c.varKinds.var:this.varKind,{name:k,from:L,to:U}=this;return`for(${P} ${k}=${L}; ${k}<${U}; ${k}++)`+super.render(p)}get names(){const p=z(super.names,this.from);return z(p,this.to)}}class i extends r{constructor(p,P,k,L){super(),this.loop=p,this.varKind=P,this.name=k,this.iterable=L}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=W(this.iterable,p,P),this}get names(){return K(super.names,this.iterable.names)}}class y extends g{constructor(p,P,k){super(),this.name=p,this.args=P,this.async=k}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}y.kind="func";class E extends v{render(p){return"return "+super.render(p)}}E.kind="return";class O extends g{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var k,L;return super.optimizeNames(p,P),(k=this.catch)===null||k===void 0||k.optimizeNames(p,P),(L=this.finally)===null||L===void 0||L.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&K(p,this.catch.names),this.finally&&K(p,this.finally.names),p}}class C extends g{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}C.kind="catch";class M extends g{render(p){return"finally"+super.render(p)}}M.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
1
+ import{c as Xn,r as Yn,g as Wt}from"./markdown-ZQs2xtk_.js";import{computed as nr,toRef as Nn,toRefs as Zn,reactive as On,ref as xn,watch as Tn}from"vue";var jt={exports:{}},sr;function es(){return sr||(sr=1,(function(e){(function(){var t,c=0,o=[],f;for(f=0;f<256;f++)o[f]=(f+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=u,h.clearBuffer=function(){t=null,c=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 n;typeof crypto<"u"?n=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(n=window.msCrypto),typeof Xn=="function"?(n=n||Yn,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var s=new Uint8Array(_);return n.getRandomValues(s),Array.from(s)}:function(_){var s=new Uint8Array(_);return n.getRandomValues(s),s}}return function(_){var s,S=[];for(s=0;s<_;s++)S.push(Math.floor(Math.random()*256));return S}})();function m(_){return(!t||c+_>h.BUFFER_SIZE)&&(c=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(c,c+=_)}function u(){var _=m(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=u();return o[_[0]]+o[_[1]]+o[_[2]]+o[_[3]]+"-"+o[_[4]]+o[_[5]]+"-"+o[_[6]]+o[_[7]]+"-"+o[_[8]]+o[_[9]]+"-"+o[_[10]]+o[_[11]]+o[_[12]]+o[_[13]]+o[_[14]]+o[_[15]]}})()})(jt)),jt.exports}var ts=es();const zt=Wt(ts),or=!0,ir=(e,t)=>[...e].reverse().map(c=>({node:c,parent:t,siblings:e})),rs=(e,{branch:t="branch",children:c="children",id:o="id",index:f="index",next:n="next",parent:m="parent",prev:u="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const g=[this];for(;g[0]?.[m];)g.unshift(g[0][m]);return g}},[f]:{get(){return this[h].findIndex(g=>this[o]===g[o])}},[n]:{get(){return this[h][this[f]+1]}},[u]:{get(){return this[h][this[f]-1]}}},s=function*(g){const b=ir(g.value);for(;b.length;){const{node:a,parent:d,siblings:r}=b.pop()??{};a&&(a[m]!==d&&Object.defineProperty(a,m,{configurable:or,value:d}),a[h]!==r&&Object.defineProperty(a,h,{configurable:or,value:r}),Object.keys(_).some(l=>!(l in a))&&Object.defineProperties(a,_),yield a,b.push(...ir(a[c]??[],a)))}},S=nr(()=>[...s(Nn(e))]),$=nr(()=>Object.fromEntries(S.value.map(g=>[g[o],g]))),v=(g,b)=>{const a=$.value[g];if(a){const[d]=S.value,r=a[f],l=a[n],w=r+1,i=a[m],y=a[u],E=r-1,O=a[h];switch(b){case"add":{const C=zt();return O.splice(w,0,{[o]:C}),C}case"addChild":{const C=zt();return Array.isArray(a[c])||(a[c]=[]),a[c].unshift({[o]:C}),C}case"down":r<O.length-1&&O[r]&&O[w]&&([O[r],O[w]]=[O[w],O[r]]);break;case"left":if(i?.[m])return i[h].splice(i[f]+1,0,...O.splice(r,1)),i[o];break;case"remove":{const C=l?.[o]??y?.[o]??i?.[o]??d?.[o];return O.splice(r,1),C}case"right":if(y){const C=y[c]??[],M=y[o];return y[c]=[...C,...O.splice(r,1)],M}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:g=>v(g,"add"),addChild:g=>v(g,"addChild"),down:g=>v(g,"down"),kvNodes:$,left:g=>v(g,"left"),nodes:S,remove:g=>v(g,"remove"),right:g=>v(g,"right"),up:g=>v(g,"up")}};var ke={exports:{}},Nt={},me={},we={},Ot={},Tt={},kt={},ar;function gt(){return ar||(ar=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 c 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=c;class o 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((l,w)=>`${l}${w}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((l,w)=>(w instanceof c&&(l[w.str]=(l[w.str]||0)+1),l),{})}}e._Code=o,e.nil=new o("");function f(d,...r){const l=[d[0]];let w=0;for(;w<r.length;)u(l,r[w]),l.push(d[++w]);return new o(l)}e._=f;const n=new o("+");function m(d,...r){const l=[v(d[0])];let w=0;for(;w<r.length;)l.push(n),u(l,r[w]),l.push(n,v(d[++w]));return h(l),new o(l)}e.str=m;function u(d,r){r instanceof o?d.push(...r._items):r instanceof c?d.push(r):d.push(S(r))}e.addCodeArg=u;function h(d){let r=1;for(;r<d.length-1;){if(d[r]===n){const l=_(d[r-1],d[r+1]);if(l!==void 0){d.splice(r-1,3,l);continue}d[r++]="+"}r++}}function _(d,r){if(r==='""')return d;if(d==='""')return r;if(typeof d=="string")return r instanceof c||d[d.length-1]!=='"'?void 0:typeof r!="string"?`${d.slice(0,-1)}${r}"`:r[0]==='"'?d.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(d instanceof c))return`"${d}${r.slice(1)}`}function s(d,r){return r.emptyStr()?d:d.emptyStr()?r:m`${d}${r}`}e.strConcat=s;function S(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:v(Array.isArray(d)?d.join(","):d)}function $(d){return new o(v(d))}e.stringify=$;function v(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function g(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):f`[${d}]`}e.getProperty=g;function b(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=b;function a(d){return new o(d.toString())}e.regexpCode=a})(kt)),kt}var qt={},ur;function cr(){return ur||(ur=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gt();class c extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var o;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:_,parent:s}={}){this._names={},this._prefixes=_,this._parent=s}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const s=this._names[_]||this._nameGroup(_);return`${_}${s.index++}`}_nameGroup(_){var s,S;if(!((S=(s=this._parent)===null||s===void 0?void 0:s._prefixes)===null||S===void 0)&&S.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=f;class n extends t.Name{constructor(_,s){super(s),this.prefix=_}setValue(_,{property:s,itemIndex:S}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(s)}[${S}]`}}e.ValueScopeName=n;const m=(0,t._)`\n`;class u extends f{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?m:t.nil}}get(){return this._scope}name(_){return new n(_,this._newName(_))}value(_,s){var S;if(s.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:v}=$,g=(S=s.key)!==null&&S!==void 0?S:s.ref;let b=this._values[v];if(b){const r=b.get(g);if(r)return r}else b=this._values[v]=new Map;b.set(g,$);const a=this._scope[v]||(this._scope[v]=[]),d=a.length;return a[d]=s.ref,$.setValue(s,{property:v,itemIndex:d}),$}getValue(_,s){const S=this._values[_];if(S)return S.get(s)}scopeRefs(_,s=this._values){return this._reduceValues(s,S=>{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,t._)`${_}${S.scopePath}`})}scopeCode(_=this._values,s,S){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},s,S)}_reduceValues(_,s,S={},$){let v=t.nil;for(const g in _){const b=_[g];if(!b)continue;const a=S[g]=S[g]||new Map;b.forEach(d=>{if(a.has(d))return;a.set(d,o.Started);let r=s(d);if(r){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${l} ${d} = ${r};${this.opts._n}`}else if(r=$?.(d))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new c(d);a.set(d,o.Completed)})}return v}}e.ValueScope=u})(qt)),qt}var lr;function J(){return lr||(lr=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=gt(),c=cr();var o=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var f=cr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.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 n{optimizeNodes(){return this}optimizeNames(p,P){return this}}class m extends n{constructor(p,P,k){super(),this.varKind=p,this.name=P,this.rhs=k}render({es5:p,_n:P}){const k=p?c.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${k} ${this.name}${L};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,p,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends n{constructor(p,P,k){super(),this.lhs=p,this.rhs=P,this.sideEffects=k}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof t.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,p,P),this}get names(){const p=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(p,this.rhs)}}class h extends u{constructor(p,P,k,L){super(p,k,L),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class _ extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class s extends n{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class S extends n{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends n{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=W(this.code,p,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends n{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,k)=>P+k.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const k=p[P].optimizeNodes();Array.isArray(k)?p.splice(P,1,...k):k?p[P]=k:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:k}=this;let L=k.length;for(;L--;){const U=k[L];U.optimizeNames(p,P)||(x(p,U.names),k.splice(L,1))}return k.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>K(p,P.names),{})}}class g extends v{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class b extends v{}class a extends g{}a.kind="else";class d extends g{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const k=P.optimizeNodes();P=this.else=Array.isArray(k)?new a(k):k}if(P)return p===!1?P instanceof d?P:P.nodes:this.nodes.length?this:new d(he(p),P instanceof d?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var k;if(this.else=(k=this.else)===null||k===void 0?void 0:k.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=W(this.condition,p,P),this}get names(){const p=super.names;return z(p,this.condition),this.else&&K(p,this.else.names),p}}d.kind="if";class r extends g{}r.kind="for";class l extends r{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=W(this.iteration,p,P),this}get names(){return K(super.names,this.iteration.names)}}class w extends r{constructor(p,P,k,L){super(),this.varKind=p,this.name=P,this.from=k,this.to=L}render(p){const P=p.es5?c.varKinds.var:this.varKind,{name:k,from:L,to:U}=this;return`for(${P} ${k}=${L}; ${k}<${U}; ${k}++)`+super.render(p)}get names(){const p=z(super.names,this.from);return z(p,this.to)}}class i extends r{constructor(p,P,k,L){super(),this.loop=p,this.varKind=P,this.name=k,this.iterable=L}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=W(this.iterable,p,P),this}get names(){return K(super.names,this.iterable.names)}}class y extends g{constructor(p,P,k){super(),this.name=p,this.args=P,this.async=k}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}y.kind="func";class E extends v{render(p){return"return "+super.render(p)}}E.kind="return";class O extends g{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var k,L;return super.optimizeNames(p,P),(k=this.catch)===null||k===void 0||k.optimizeNames(p,P),(L=this.finally)===null||L===void 0||L.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&K(p,this.catch.names),this.finally&&K(p,this.finally.names),p}}class C extends g{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}C.kind="catch";class M extends g{render(p){return"finally"+super.render(p)}}M.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
2
2
  `:""},this._extScope=p,this._scope=new c.Scope({parent:p}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const k=this._extScope.value(p,P);return(this._values[k.prefix]||(this._values[k.prefix]=new Set)).add(k),k}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,k,L){const U=this._scope.toName(P);return k!==void 0&&L&&(this._constants[U.str]=k),this._leafNode(new m(p,U,k)),U}const(p,P,k){return this._def(c.varKinds.const,p,P,k)}let(p,P,k){return this._def(c.varKinds.let,p,P,k)}var(p,P,k){return this._def(c.varKinds.var,p,P,k)}assign(p,P,k){return this._leafNode(new u(p,P,k))}add(p,P){return this._leafNode(new h(p,e.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==t.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[k,L]of p)P.length>1&&P.push(","),P.push(k),(k!==L||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,L));return P.push("}"),new t._Code(P)}if(p,P,k){if(this._blockNode(new d(p)),P&&k)this.code(P).else().code(k).endIf();else if(P)this.code(P).endIf();else if(k)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new d(p))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(d,a)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,k,L,U=this.opts.es5?c.varKinds.var:c.varKinds.let){const X=this._scope.toName(p);return this._for(new w(U,X,P,k),()=>L(X))}forOf(p,P,k,L=c.varKinds.const){const U=this._scope.toName(p);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,B=>{this.var(U,(0,t._)`${X}[${B}]`),k(U)})}return this._for(new i("of",L,U,P),()=>k(U))}forIn(p,P,k,L=this.opts.es5?c.varKinds.var:c.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,t._)`Object.keys(${P})`,k);const U=this._scope.toName(p);return this._for(new i("in",L,U,P),()=>k(U))}endFor(){return this._endBlockNode(r)}label(p){return this._leafNode(new _(p))}break(p){return this._leafNode(new s(p))}return(p){const P=new E;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(p,P,k){if(!P&&!k)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new O;if(this._blockNode(L),this.code(p),P){const U=this.name("e");this._currNode=L.catch=new C(U),P(U)}return k&&(this._currNode=L.finally=new M,this.code(k)),this._endBlockNode(C,M)}throw(p){return this._leafNode(new S(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const k=this._nodes.length-P;if(k<0||p!==void 0&&k!==p)throw new Error(`CodeGen: wrong number of nodes: ${k} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=t.nil,k,L){return this._blockNode(new y(p,P,k)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const k=this._currNode;if(k instanceof p||P&&k instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}e.CodeGen=V;function K(T,p){for(const P in p)T[P]=(T[P]||0)+(p[P]||0);return T}function z(T,p){return p instanceof t._CodeOrName?K(T,p.names):T}function W(T,p,P){if(T instanceof t.Name)return k(T);if(!L(T))return T;return new t._Code(T._items.reduce((U,X)=>(X instanceof t.Name&&(X=k(X)),X instanceof t._Code?U.push(...X._items):U.push(X),U),[]));function k(U){const X=P[U.str];return X===void 0||p[U.str]!==1?U:(delete p[U.str],X)}function L(U){return U instanceof t._Code&&U._items.some(X=>X instanceof t.Name&&p[X.str]===1&&P[X.str]!==void 0)}}function x(T,p){for(const P in p)T[P]=(T[P]||0)-(p[P]||0)}function he(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${I(T)}`}e.not=he;const pe=j(e.operators.AND);function Z(...T){return T.reduce(pe)}e.and=Z;const _e=j(e.operators.OR);function A(...T){return T.reduce(_e)}e.or=A;function j(T){return(p,P)=>p===t.nil?P:P===t.nil?p:(0,t._)`${I(p)} ${T} ${I(P)}`}function I(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Tt)),Tt}var H={},dr;function Q(){if(dr)return H;dr=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=gt();function c(i){const y={};for(const E of i)y[E]=!0;return y}H.toHash=c;function o(i,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(f(i,y),!n(y,i.self.RULES.all))}H.alwaysValidSchema=o;function f(i,y=i.schema){const{opts:E,self:O}=i;if(!E.strictSchema||typeof y=="boolean")return;const C=O.RULES.keywords;for(const M in y)C[M]||w(i,`unknown keyword: "${M}"`)}H.checkUnknownRules=f;function n(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(y[E])return!0;return!1}H.schemaHasRules=n;function m(i,y){if(typeof i=="boolean")return!i;for(const E in i)if(E!=="$ref"&&y.all[E])return!0;return!1}H.schemaHasRulesButRef=m;function u({topSchemaRef:i,schemaPath:y},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._)`${i}${y}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=u;function h(i){return S(decodeURIComponent(i))}H.unescapeFragment=h;function _(i){return encodeURIComponent(s(i))}H.escapeFragment=_;function s(i){return typeof i=="number"?`${i}`:i.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=s;function S(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=S;function $(i,y){if(Array.isArray(i))for(const E of i)y(E);else y(i)}H.eachItem=$;function v({mergeNames:i,mergeToName:y,mergeValues:E,resultToName:O}){return(C,M,V,K)=>{const z=V===void 0?M:V instanceof e.Name?(M instanceof e.Name?i(C,M,V):y(C,M,V),V):M instanceof e.Name?(y(C,V,M),M):E(M,V);return K===e.Name&&!(z instanceof e.Name)?O(C,z):z}}H.mergeEvaluated={props:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>{i.if((0,e._)`${y} === true`,()=>i.assign(E,!0),()=>i.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${y})`))}),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>{y===!0?i.assign(E,!0):(i.assign(E,(0,e._)`${E} || {}`),b(i,E,y))}),mergeValues:(i,y)=>i===!0?!0:{...i,...y},resultToName:g}),items:v({mergeNames:(i,y,E)=>i.if((0,e._)`${E} !== true && ${y} !== undefined`,()=>i.assign(E,(0,e._)`${y} === true ? true : ${E} > ${y} ? ${E} : ${y}`)),mergeToName:(i,y,E)=>i.if((0,e._)`${E} !== true`,()=>i.assign(E,y===!0?!0:(0,e._)`${E} > ${y} ? ${E} : ${y}`)),mergeValues:(i,y)=>i===!0?!0:Math.max(i,y),resultToName:(i,y)=>i.var("items",y)})};function g(i,y){if(y===!0)return i.var("props",!0);const E=i.var("props",(0,e._)`{}`);return y!==void 0&&b(i,E,y),E}H.evaluatedPropsToName=g;function b(i,y,E){Object.keys(E).forEach(O=>i.assign((0,e._)`${y}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=b;const a={};function d(i,y){return i.scopeValue("func",{ref:y,code:a[y.code]||(a[y.code]=new t._Code(y.code))})}H.useFunc=d;var r;(function(i){i[i.Num=0]="Num",i[i.Str=1]="Str"})(r||(H.Type=r={}));function l(i,y,E){if(i instanceof e.Name){const O=y===r.Num;return E?O?(0,e._)`"[" + ${i} + "]"`:(0,e._)`"['" + ${i} + "']"`:O?(0,e._)`"/" + ${i}`:(0,e._)`"/" + ${i}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(i).toString():"/"+s(i)}H.getErrorPath=l;function w(i,y,E=i.opts.strictSchema){if(E){if(y=`strict mode: ${y}`,E===!0)throw new Error(y);i.self.logger.warn(y)}}return H.checkStrictMode=w,H}var qe={},fr;function $e(){if(fr)return qe;fr=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 hr;function $t(){return hr||(hr=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(),c=Q(),o=$e();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 f(a,d=e.keywordError,r,l){const{it:w}=a,{gen:i,compositeRule:y,allErrors:E}=w,O=S(a,d,r);l??(y||E)?h(i,O):_(w,(0,t._)`[${O}]`)}e.reportError=f;function n(a,d=e.keywordError,r){const{it:l}=a,{gen:w,compositeRule:i,allErrors:y}=l,E=S(a,d,r);h(w,E),i||y||_(l,o.default.vErrors)}e.reportExtraError=n;function m(a,d){a.assign(o.default.errors,d),a.if((0,t._)`${o.default.vErrors} !== null`,()=>a.if(d,()=>a.assign((0,t._)`${o.default.vErrors}.length`,d),()=>a.assign(o.default.vErrors,null)))}e.resetErrorsCount=m;function u({gen:a,keyword:d,schemaValue:r,data:l,errsCount:w,it:i}){if(w===void 0)throw new Error("ajv implementation error");const y=a.name("err");a.forRange("i",w,o.default.errors,E=>{a.const(y,(0,t._)`${o.default.vErrors}[${E}]`),a.if((0,t._)`${y}.instancePath === undefined`,()=>a.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(o.default.instancePath,i.errorPath))),a.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${i.errSchemaPath}/${d}`),i.opts.verbose&&(a.assign((0,t._)`${y}.schema`,r),a.assign((0,t._)`${y}.data`,l))})}e.extendErrors=u;function h(a,d){const r=a.const("err",d);a.if((0,t._)`${o.default.vErrors} === null`,()=>a.assign(o.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${o.default.vErrors}.push(${r})`),a.code((0,t._)`${o.default.errors}++`)}function _(a,d){const{gen:r,validateName:l,schemaEnv:w}=a;w.$async?r.throw((0,t._)`new ${a.ValidationError}(${d})`):(r.assign((0,t._)`${l}.errors`,d),r.return(!1))}const s={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 S(a,d,r){const{createErrors:l}=a.it;return l===!1?(0,t._)`{}`:$(a,d,r)}function $(a,d,r={}){const{gen:l,it:w}=a,i=[v(w,r),g(a,r)];return b(a,d,i),l.object(...i)}function v({errorPath:a},{instancePath:d}){const r=d?(0,t.str)`${a}${(0,c.getErrorPath)(d,c.Type.Str)}`:a;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,r)]}function g({keyword:a,it:{errSchemaPath:d}},{schemaPath:r,parentSchema:l}){let w=l?d:(0,t.str)`${d}/${a}`;return r&&(w=(0,t.str)`${w}${(0,c.getErrorPath)(r,c.Type.Str)}`),[s.schemaPath,w]}function b(a,{params:d,message:r},l){const{keyword:w,data:i,schemaValue:y,it:E}=a,{opts:O,propertyName:C,topSchemaRef:M,schemaPath:V}=E;l.push([s.keyword,w],[s.params,typeof d=="function"?d(a):d||(0,t._)`{}`]),O.messages&&l.push([s.message,typeof r=="function"?r(a):r]),O.verbose&&l.push([s.schema,y],[s.parentSchema,(0,t._)`${M}${V}`],[o.default.data,i]),C&&l.push([s.propertyName,C])}})(Ot)),Ot}var pr;function ns(){if(pr)return we;pr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.boolOrEmptySchema=we.topBoolOrEmptySchema=void 0;const e=$t(),t=J(),c=$e(),o={message:"boolean schema is false"};function f(u){const{gen:h,schema:_,validateName:s}=u;_===!1?m(u,!1):typeof _=="object"&&_.$async===!0?h.return(c.default.data):(h.assign((0,t._)`${s}.errors`,null),h.return(!0))}we.topBoolOrEmptySchema=f;function n(u,h){const{gen:_,schema:s}=u;s===!1?(_.var(h,!1),m(u)):_.var(h,!0)}we.boolOrEmptySchema=n;function m(u,h){const{gen:_,data:s}=u,S={gen:_,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(S,o,void 0,h)}return we}var re={},be={},mr;function kn(){if(mr)return be;mr=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 c(f){return typeof f=="string"&&t.has(f)}be.isJSONType=c;function o(){const f={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...f,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},f.number,f.string,f.array,f.object],post:{rules:[]},all:{},keywords:{}}}return be.getRules=o,be}var ye={},yr;function qn(){if(yr)return ye;yr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:o,self:f},n){const m=f.RULES.types[n];return m&&m!==!0&&t(o,m)}ye.schemaHasRulesForType=e;function t(o,f){return f.rules.some(n=>c(o,n))}ye.shouldUseGroup=t;function c(o,f){var n;return o[f.keyword]!==void 0||((n=f.definition.implements)===null||n===void 0?void 0:n.some(m=>o[m]!==void 0))}return ye.shouldUseRule=c,ye}var gr;function _t(){if(gr)return re;gr=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=kn(),t=qn(),c=$t(),o=J(),f=Q();var n;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(n||(re.DataType=n={}));function m(r){const l=u(r.type);if(l.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&l.push("null")}return l}re.getSchemaTypes=m;function u(r){const l=Array.isArray(r)?r:r?[r]:[];if(l.every(e.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}re.getJSONTypes=u;function h(r,l){const{gen:w,data:i,opts:y}=r,E=s(l,y.coerceTypes),O=l.length>0&&!(E.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(r,l[0]));if(O){const C=g(l,i,y.strictNumbers,n.Wrong);w.if(C,()=>{E.length?S(r,l,E):a(r)})}return O}re.coerceAndCheckDataType=h;const _=new Set(["string","number","integer","boolean","null"]);function s(r,l){return l?r.filter(w=>_.has(w)||l==="array"&&w==="array"):[]}function S(r,l,w){const{gen:i,data:y,opts:E}=r,O=i.let("dataType",(0,o._)`typeof ${y}`),C=i.let("coerced",(0,o._)`undefined`);E.coerceTypes==="array"&&i.if((0,o._)`${O} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>i.assign(y,(0,o._)`${y}[0]`).assign(O,(0,o._)`typeof ${y}`).if(g(l,y,E.strictNumbers),()=>i.assign(C,y))),i.if((0,o._)`${C} !== undefined`);for(const V of w)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&M(V);i.else(),a(r),i.endIf(),i.if((0,o._)`${C} !== undefined`,()=>{i.assign(y,C),$(r,C)});function M(V){switch(V){case"string":i.elseIf((0,o._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,o._)`"" + ${y}`).elseIf((0,o._)`${y} === null`).assign(C,(0,o._)`""`);return;case"number":i.elseIf((0,o._)`${O} == "boolean" || ${y} === null
3
3
  || (${O} == "string" && ${y} && ${y} == +${y})`).assign(C,(0,o._)`+${y}`);return;case"integer":i.elseIf((0,o._)`${O} === "boolean" || ${y} === null
4
4
  || (${O} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(C,(0,o._)`+${y}`);return;case"boolean":i.elseIf((0,o._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(C,!1).elseIf((0,o._)`${y} === "true" || ${y} === 1`).assign(C,!0);return;case"null":i.elseIf((0,o._)`${y} === "" || ${y} === 0 || ${y} === false`),i.assign(C,null);return;case"array":i.elseIf((0,o._)`${O} === "string" || ${O} === "number"
package/dist/index.html CHANGED
@@ -6,10 +6,10 @@
6
6
  <base href="" />
7
7
  <link rel="preload" crossorigin href="./index.json" as="fetch" />
8
8
  <link rel="preload" crossorigin href="./fonts.json" as="fetch" />
9
- <script type="module" crossorigin src="/assets/index-BNJGgvBA.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/mermaid-BQWZaxT1.js">
11
- <link rel="modulepreload" crossorigin href="/assets/markdown-CKwXX3x9.js">
12
- <link rel="modulepreload" crossorigin href="/assets/shared-YQYTrUrb.js">
9
+ <script type="module" crossorigin src="/assets/index-DtvNdQUV.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/markdown-ZQs2xtk_.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/shared-BzxCZaHp.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/mermaid-DJVpeobB.js">
13
13
  <link rel="stylesheet" crossorigin href="/assets/index-vGiKZPT9.css">
14
14
  </head>
15
15
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@vuebro/runtime",
4
- "version": "1.4.0",
4
+ "version": "1.4.2",
5
5
  "description": "Vue.js-based runtime for VueBro applications with dynamic loading, SEO optimization, and intersection observer tracking.",
6
6
  "keywords": [
7
7
  "vue",
@@ -43,8 +43,8 @@
43
43
  "@mdit-vue/plugin-toc": "^3.0.2",
44
44
  "@unhead/vue": "^2.0.19",
45
45
  "@unocss/runtime": "^66.5.9",
46
- "@vuebro/loader-sfc": "^2.4.0",
47
- "@vuebro/shared": "^1.2.11",
46
+ "@vuebro/loader-sfc": "^2.4.2",
47
+ "@vuebro/shared": "^1.2.12",
48
48
  "@vueuse/components": "^14.1.0",
49
49
  "@vueuse/core": "^14.1.0",
50
50
  "consola": "^3.4.2",
@@ -68,7 +68,7 @@
68
68
  "@types/markdown-it-emoji": "^3.0.1",
69
69
  "@types/markdown-it-footnote": "^3.0.4",
70
70
  "@types/node": "^24.10.1",
71
- "@vuebro/configs": "^1.2.16",
71
+ "@vuebro/configs": "^1.2.17",
72
72
  "eslint": "^9.39.1",
73
73
  "unocss": "^66.5.9",
74
74
  "vite": "^7.2.4",