onebots 0.4.31 → 0.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index--pKafL3b.js +2 -0
- package/dist/assets/index-H3-fKIdb.css +1 -0
- package/dist/index.html +29 -0
- package/lib/adapters/icqq/index.js +15 -10
- package/lib/adapters/qq/index.js +7 -4
- package/lib/bin.js +17 -2
- package/lib/config.sample.yaml +0 -2
- package/lib/db.d.ts +19 -14
- package/lib/db.js +141 -50
- package/lib/onebot.d.ts +3 -2
- package/lib/onebot.js +2 -2
- package/lib/server/app.d.ts +16 -8
- package/lib/server/app.js +130 -41
- package/lib/server/router.d.ts +6 -2
- package/lib/server/router.js +41 -2
- package/lib/service/V11/action/common.js +6 -2
- package/lib/service/V11/action/friend.d.ts +1 -1
- package/lib/service/V11/action/friend.js +2 -2
- package/lib/service/V11/db_entities.d.ts +5 -5
- package/lib/service/V11/db_entities.js +0 -61
- package/lib/service/V11/index.d.ts +2 -2
- package/lib/service/V11/index.js +45 -34
- package/lib/service/V12/index.d.ts +2 -0
- package/lib/service/V12/index.js +27 -14
- package/lib/utils.d.ts +10 -3
- package/lib/utils.js +100 -18
- package/package.json +79 -74
- package/lib/service/V11/db_sqlite.d.ts +0 -52
- package/lib/service/V11/db_sqlite.js +0 -115
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function Cn(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const K={},Ge=[],re=()=>{},Ar=()=>!1,jt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),On=e=>e.startsWith("onUpdate:"),Y=Object.assign,Tn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Pr=Object.prototype.hasOwnProperty,F=(e,t)=>Pr.call(e,t),I=Array.isArray,Ye=e=>Ht(e)==="[object Map]",Ps=e=>Ht(e)==="[object Set]",P=e=>typeof e=="function",J=e=>typeof e=="string",nt=e=>typeof e=="symbol",V=e=>e!==null&&typeof e=="object",Rs=e=>(V(e)||P(e))&&P(e.then)&&P(e.catch),Ms=Object.prototype.toString,Ht=e=>Ms.call(e),Rr=e=>Ht(e).slice(8,-1),Fs=e=>Ht(e)==="[object Object]",Sn=e=>J(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,St=Cn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ut=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Mr=/-(\w)/g,Qe=Ut(e=>e.replace(Mr,(t,n)=>n?n.toUpperCase():"")),Fr=/\B([A-Z])/g,Be=Ut(e=>e.replace(Fr,"-$1").toLowerCase()),Ns=Ut(e=>e.charAt(0).toUpperCase()+e.slice(1)),kt=Ut(e=>e?`on${Ns(e)}`:""),Ie=(e,t)=>!Object.is(e,t),It=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Mt=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},un=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Xn;const Ls=()=>Xn||(Xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function In(e){if(I(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=J(s)?jr(s):In(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(J(e)||V(e))return e}const Nr=/;(?![^(]*\))/g,Lr=/:([^]+)/,$r=/\/\*[^]*?\*\//g;function jr(e){const t={};return e.replace($r,"").split(Nr).forEach(n=>{if(n){const s=n.split(Lr);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function An(e){let t="";if(J(e))t=e;else if(I(e))for(let n=0;n<e.length;n++){const s=An(e[n]);s&&(t+=s+" ")}else if(V(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Hr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ur=Cn(Hr);function $s(e){return!!e||e===""}const ze=e=>J(e)?e:e==null?"":I(e)||V(e)&&(e.toString===Ms||!P(e.toString))?JSON.stringify(e,js,2):String(e),js=(e,t)=>t&&t.__v_isRef?js(e,t.value):Ye(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[en(s,o)+" =>"]=r,n),{})}:Ps(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>en(n))}:nt(t)?en(t):V(t)&&!I(t)&&!Fs(t)?String(t):t,en=(e,t="")=>{var n;return nt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ie;class Kr{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ie,!t&&ie&&(this.index=(ie.scopes||(ie.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=ie;try{return ie=this,t()}finally{ie=n}}}on(){ie=this}off(){ie=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function Br(e,t=ie){t&&t.active&&t.effects.push(e)}function Dr(){return ie}let je;class Pn{constructor(t,n,s,r){this.fn=t,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,Br(this,r)}get dirty(){if(this._dirtyLevel===1){this._dirtyLevel=0,this._queryings++,De();for(const t of this.deps)if(t.computed&&(Vr(t.computed),this._dirtyLevel>=2))break;Ve(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Te,n=je;try{return Te=!0,je=this,this._runnings++,Zn(this),this.fn()}finally{Qn(this),this._runnings--,je=n,Te=t}}stop(){var t;this.active&&(Zn(this),Qn(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Vr(e){return e.value}function Zn(e){e._trackId++,e._depsLength=0}function Qn(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Hs(e.deps[t],e);e.deps.length=e._depsLength}}function Hs(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Te=!0,an=0;const Us=[];function De(){Us.push(Te),Te=!1}function Ve(){const e=Us.pop();Te=e===void 0?!0:e}function Rn(){an++}function Mn(){for(an--;!an&&dn.length;)dn.shift()()}function Ks(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&Hs(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const dn=[];function Bs(e,t,n){Rn();for(const s of e.keys())if(!(!s.allowRecurse&&s._runnings)&&s._dirtyLevel<t&&(!s._runnings||t!==2)){const r=s._dirtyLevel;s._dirtyLevel=t,r===0&&(!s._queryings||t!==2)&&(s.trigger(),s.scheduler&&dn.push(s.scheduler))}Mn()}const Ds=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},hn=new WeakMap,He=Symbol(""),pn=Symbol("");function te(e,t,n){if(Te&&je){let s=hn.get(e);s||hn.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=Ds(()=>s.delete(n))),Ks(je,r)}}function ye(e,t,n,s,r,o){const i=hn.get(e);if(!i)return;let c=[];if(t==="clear")c=[...i.values()];else if(n==="length"&&I(e)){const u=Number(s);i.forEach((a,p)=>{(p==="length"||!nt(p)&&p>=u)&&c.push(a)})}else switch(n!==void 0&&c.push(i.get(n)),t){case"add":I(e)?Sn(n)&&c.push(i.get("length")):(c.push(i.get(He)),Ye(e)&&c.push(i.get(pn)));break;case"delete":I(e)||(c.push(i.get(He)),Ye(e)&&c.push(i.get(pn)));break;case"set":Ye(e)&&c.push(i.get(He));break}Rn();for(const u of c)u&&Bs(u,3);Mn()}const Wr=Cn("__proto__,__v_isRef,__isVue"),Vs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt)),kn=qr();function qr(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=L(this);for(let o=0,i=this.length;o<i;o++)te(s,"get",o+"");const r=s[t](...n);return r===-1||r===!1?s[t](...n.map(L)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){De(),Rn();const s=L(this)[t].apply(this,n);return Mn(),Ve(),s}}),e}function zr(e){const t=L(this);return te(t,"has",e),t.hasOwnProperty(e)}class Ws{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,s){const r=this._isReadonly,o=this._shallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?oo:Gs:o?Js:zs).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=I(t);if(!r){if(i&&F(kn,n))return Reflect.get(kn,n,s);if(n==="hasOwnProperty")return zr}const c=Reflect.get(t,n,s);return(nt(n)?Vs.has(n):Wr(n))||(r||te(t,"get",n),o)?c:ne(c)?i&&Sn(n)?c:c.value:V(c)?r?Ys(c):Ln(c):c}}class qs extends Ws{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._shallow){const u=ke(o);if(!Ft(s)&&!ke(s)&&(o=L(o),s=L(s)),!I(t)&&ne(o)&&!ne(s))return u?!1:(o.value=s,!0)}const i=I(t)&&Sn(n)?Number(n)<t.length:F(t,n),c=Reflect.set(t,n,s,r);return t===L(r)&&(i?Ie(s,o)&&ye(t,"set",n,s):ye(t,"add",n,s)),c}deleteProperty(t,n){const s=F(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&ye(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!nt(n)||!Vs.has(n))&&te(t,"has",n),s}ownKeys(t){return te(t,"iterate",I(t)?"length":He),Reflect.ownKeys(t)}}class Jr extends Ws{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Gr=new qs,Yr=new Jr,Xr=new qs(!0),Fn=e=>e,Kt=e=>Reflect.getPrototypeOf(e);function vt(e,t,n=!1,s=!1){e=e.__v_raw;const r=L(e),o=L(t);n||(Ie(t,o)&&te(r,"get",t),te(r,"get",o));const{has:i}=Kt(r),c=s?Fn:n?jn:dt;if(i.call(r,t))return c(e.get(t));if(i.call(r,o))return c(e.get(o));e!==r&&e.get(t)}function wt(e,t=!1){const n=this.__v_raw,s=L(n),r=L(e);return t||(Ie(e,r)&&te(s,"has",e),te(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Et(e,t=!1){return e=e.__v_raw,!t&&te(L(e),"iterate",He),Reflect.get(e,"size",e)}function es(e){e=L(e);const t=L(this);return Kt(t).has.call(t,e)||(t.add(e),ye(t,"add",e,e)),this}function ts(e,t){t=L(t);const n=L(this),{has:s,get:r}=Kt(n);let o=s.call(n,e);o||(e=L(e),o=s.call(n,e));const i=r.call(n,e);return n.set(e,t),o?Ie(t,i)&&ye(n,"set",e,t):ye(n,"add",e,t),this}function ns(e){const t=L(this),{has:n,get:s}=Kt(t);let r=n.call(t,e);r||(e=L(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&ye(t,"delete",e,void 0),o}function ss(){const e=L(this),t=e.size!==0,n=e.clear();return t&&ye(e,"clear",void 0,void 0),n}function Ct(e,t){return function(s,r){const o=this,i=o.__v_raw,c=L(i),u=t?Fn:e?jn:dt;return!e&&te(c,"iterate",He),i.forEach((a,p)=>s.call(r,u(a),u(p),o))}}function Ot(e,t,n){return function(...s){const r=this.__v_raw,o=L(r),i=Ye(o),c=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,a=r[e](...s),p=n?Fn:t?jn:dt;return!t&&te(o,"iterate",u?pn:He),{next(){const{value:x,done:E}=a.next();return E?{value:x,done:E}:{value:c?[p(x[0]),p(x[1])]:p(x),done:E}},[Symbol.iterator](){return this}}}}function Ee(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zr(){const e={get(o){return vt(this,o)},get size(){return Et(this)},has:wt,add:es,set:ts,delete:ns,clear:ss,forEach:Ct(!1,!1)},t={get(o){return vt(this,o,!1,!0)},get size(){return Et(this)},has:wt,add:es,set:ts,delete:ns,clear:ss,forEach:Ct(!1,!0)},n={get(o){return vt(this,o,!0)},get size(){return Et(this,!0)},has(o){return wt.call(this,o,!0)},add:Ee("add"),set:Ee("set"),delete:Ee("delete"),clear:Ee("clear"),forEach:Ct(!0,!1)},s={get(o){return vt(this,o,!0,!0)},get size(){return Et(this,!0)},has(o){return wt.call(this,o,!0)},add:Ee("add"),set:Ee("set"),delete:Ee("delete"),clear:Ee("clear"),forEach:Ct(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Ot(o,!1,!1),n[o]=Ot(o,!0,!1),t[o]=Ot(o,!1,!0),s[o]=Ot(o,!0,!0)}),[e,n,t,s]}const[Qr,kr,eo,to]=Zr();function Nn(e,t){const n=t?e?to:eo:e?kr:Qr;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(F(n,r)&&r in s?n:s,r,o)}const no={get:Nn(!1,!1)},so={get:Nn(!1,!0)},ro={get:Nn(!0,!1)},zs=new WeakMap,Js=new WeakMap,Gs=new WeakMap,oo=new WeakMap;function io(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lo(e){return e.__v_skip||!Object.isExtensible(e)?0:io(Rr(e))}function Ln(e){return ke(e)?e:$n(e,!1,Gr,no,zs)}function co(e){return $n(e,!1,Xr,so,Js)}function Ys(e){return $n(e,!0,Yr,ro,Gs)}function $n(e,t,n,s,r){if(!V(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=lo(e);if(i===0)return e;const c=new Proxy(e,i===2?s:n);return r.set(e,c),c}function Xe(e){return ke(e)?Xe(e.__v_raw):!!(e&&e.__v_isReactive)}function ke(e){return!!(e&&e.__v_isReadonly)}function Ft(e){return!!(e&&e.__v_isShallow)}function Xs(e){return Xe(e)||ke(e)}function L(e){const t=e&&e.__v_raw;return t?L(t):e}function Zs(e){return Mt(e,"__v_skip",!0),e}const dt=e=>V(e)?Ln(e):e,jn=e=>V(e)?Ys(e):e;class Qs{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Pn(()=>t(this._value),()=>gn(this,1)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=L(this);return ks(t),(!t._cacheable||t.effect.dirty)&&Ie(t._value,t._value=t.effect.run())&&gn(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function fo(e,t,n=!1){let s,r;const o=P(e);return o?(s=e,r=re):(s=e.get,r=e.set),new Qs(s,r,o||!r,n)}function ks(e){Te&&je&&(e=L(e),Ks(je,e.dep||(e.dep=Ds(()=>e.dep=void 0,e instanceof Qs?e:void 0))))}function gn(e,t=3,n){e=L(e);const s=e.dep;s&&Bs(s,t)}function ne(e){return!!(e&&e.__v_isRef===!0)}function ot(e){return uo(e,!1)}function uo(e,t){return ne(e)?e:new ao(e,t)}class ao{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:L(t),this._value=n?t:dt(t)}get value(){return ks(this),this._value}set value(t){const n=this.__v_isShallow||Ft(t)||ke(t);t=n?t:L(t),Ie(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:dt(t),gn(this,3))}}function ho(e){return ne(e)?e.value:e}const po={get:(e,t,n)=>ho(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ne(r)&&!ne(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function er(e){return Xe(e)?e:new Proxy(e,po)}function Se(e,t,n,s){let r;try{r=s?e(...s):e()}catch(o){Bt(o,t,n)}return r}function ue(e,t,n,s){if(P(e)){const o=Se(e,t,n,s);return o&&Rs(o)&&o.catch(i=>{Bt(i,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(ue(e[o],t,n,s));return r}function Bt(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let o=t.parent;const i=t.proxy,c=`https://vuejs.org/errors/#runtime-${n}`;for(;o;){const a=o.ec;if(a){for(let p=0;p<a.length;p++)if(a[p](e,i,c)===!1)return}o=o.parent}const u=t.appContext.config.errorHandler;if(u){Se(u,null,10,[e,i,c]);return}}go(e,n,r,s)}function go(e,t,n,s=!0){console.error(e)}let ht=!1,mn=!1;const X=[];let me=0;const Ze=[];let be=null,Le=0;const tr=Promise.resolve();let Hn=null;function nr(e){const t=Hn||tr;return e?t.then(this?e.bind(this):e):t}function mo(e){let t=me+1,n=X.length;for(;t<n;){const s=t+n>>>1,r=X[s],o=pt(r);o<e||o===e&&r.pre?t=s+1:n=s}return t}function Un(e){(!X.length||!X.includes(e,ht&&e.allowRecurse?me+1:me))&&(e.id==null?X.push(e):X.splice(mo(e.id),0,e),sr())}function sr(){!ht&&!mn&&(mn=!0,Hn=tr.then(or))}function _o(e){const t=X.indexOf(e);t>me&&X.splice(t,1)}function bo(e){I(e)?Ze.push(...e):(!be||!be.includes(e,e.allowRecurse?Le+1:Le))&&Ze.push(e),sr()}function rs(e,t,n=ht?me+1:0){for(;n<X.length;n++){const s=X[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;X.splice(n,1),n--,s()}}}function rr(e){if(Ze.length){const t=[...new Set(Ze)];if(Ze.length=0,be){be.push(...t);return}for(be=t,be.sort((n,s)=>pt(n)-pt(s)),Le=0;Le<be.length;Le++)be[Le]();be=null,Le=0}}const pt=e=>e.id==null?1/0:e.id,yo=(e,t)=>{const n=pt(e)-pt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function or(e){mn=!1,ht=!0,X.sort(yo);try{for(me=0;me<X.length;me++){const t=X[me];t&&t.active!==!1&&Se(t,null,14)}}finally{me=0,X.length=0,rr(),ht=!1,Hn=null,(X.length||Ze.length)&&or()}}function xo(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||K;let r=n;const o=t.startsWith("update:"),i=o&&t.slice(7);if(i&&i in s){const p=`${i==="modelValue"?"model":i}Modifiers`,{number:x,trim:E}=s[p]||K;E&&(r=n.map(O=>J(O)?O.trim():O)),x&&(r=n.map(un))}let c,u=s[c=kt(t)]||s[c=kt(Qe(t))];!u&&o&&(u=s[c=kt(Be(t))]),u&&ue(u,e,6,r);const a=s[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,ue(a,e,6,r)}}function ir(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},c=!1;if(!P(e)){const u=a=>{const p=ir(a,t,!0);p&&(c=!0,Y(i,p))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!c?(V(e)&&s.set(e,null),null):(I(o)?o.forEach(u=>i[u]=null):Y(i,o),V(e)&&s.set(e,i),i)}function Dt(e,t){return!e||!jt(t)?!1:(t=t.slice(2).replace(/Once$/,""),F(e,t[0].toLowerCase()+t.slice(1))||F(e,Be(t))||F(e,t))}let ce=null,Vt=null;function Nt(e){const t=ce;return ce=e,Vt=e&&e.type.__scopeId||null,t}function vo(e){Vt=e}function wo(){Vt=null}function Eo(e,t=ce,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&ms(-1);const o=Nt(t);let i;try{i=e(...r)}finally{Nt(o),s._d&&ms(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function tn(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:o,propsOptions:[i],slots:c,attrs:u,emit:a,render:p,renderCache:x,data:E,setupState:O,ctx:R,inheritAttrs:A}=e;let U,q;const ae=Nt(e);try{if(n.shapeFlag&4){const z=r||s,N=z;U=ge(p.call(N,z,x,o,O,E,R)),q=u}else{const z=t;U=ge(z.length>1?z(o,{attrs:u,slots:c,emit:a}):z(o,null)),q=t.props?u:Co(u)}}catch(z){at.length=0,Bt(z,e,1),U=Ue(gt)}let j=U;if(q&&A!==!1){const z=Object.keys(q),{shapeFlag:N}=j;z.length&&N&7&&(i&&z.some(On)&&(q=Oo(q,i)),j=et(j,q))}return n.dirs&&(j=et(j),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&(j.transition=n.transition),U=j,Nt(ae),U}const Co=e=>{let t;for(const n in e)(n==="class"||n==="style"||jt(n))&&((t||(t={}))[n]=e[n]);return t},Oo=(e,t)=>{const n={};for(const s in e)(!On(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function To(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:c,patchFlag:u}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?os(s,i,a):!!i;if(u&8){const p=t.dynamicProps;for(let x=0;x<p.length;x++){const E=p[x];if(i[E]!==s[E]&&!Dt(a,E))return!0}}}else return(r||c)&&(!c||!c.$stable)?!0:s===i?!1:s?i?os(s,i,a):!0:!!i;return!1}function os(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(t[o]!==e[o]&&!Dt(n,o))return!0}return!1}function So({vnode:e,parent:t},n){if(n)for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const Io=Symbol.for("v-ndc"),Ao=e=>e.__isSuspense;function Po(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):bo(e)}const Tt={};function nn(e,t,n){return lr(e,t,n)}function lr(e,t,{immediate:n,deep:s,flush:r,once:o,onTrack:i,onTrigger:c}=K){var u;if(t&&o){const N=t;t=(...ve)=>{N(...ve),z()}}const a=Dr()===((u=Z)==null?void 0:u.scope)?Z:null;let p,x=!1,E=!1;if(ne(e)?(p=()=>e.value,x=Ft(e)):Xe(e)?(p=()=>e,s=!0):I(e)?(E=!0,x=e.some(N=>Xe(N)||Ft(N)),p=()=>e.map(N=>{if(ne(N))return N.value;if(Xe(N))return $e(N);if(P(N))return Se(N,a,2)})):P(e)?t?p=()=>Se(e,a,2):p=()=>{if(!(a&&a.isUnmounted))return O&&O(),ue(e,a,3,[R])}:p=re,t&&s){const N=p;p=()=>$e(N())}let O,R=N=>{O=j.onStop=()=>{Se(N,a,4),O=j.onStop=void 0}},A;if(Jt)if(R=re,t?n&&ue(t,a,3,[p(),E?[]:void 0,R]):p(),r==="sync"){const N=Oi();A=N.__watcherHandles||(N.__watcherHandles=[])}else return re;let U=E?new Array(e.length).fill(Tt):Tt;const q=()=>{if(!(!j.active||!j.dirty))if(t){const N=j.run();(s||x||(E?N.some((ve,Ae)=>Ie(ve,U[Ae])):Ie(N,U)))&&(O&&O(),ue(t,a,3,[N,U===Tt?void 0:E&&U[0]===Tt?[]:U,R]),U=N)}else j.run()};q.allowRecurse=!!t;let ae;r==="sync"?ae=q:r==="post"?ae=()=>ee(q,a&&a.suspense):(q.pre=!0,a&&(q.id=a.uid),ae=()=>Un(q));const j=new Pn(p,re,ae),z=()=>{j.stop(),a&&a.scope&&Tn(a.scope.effects,j)};return t?n?q():U=j.run():r==="post"?ee(j.run.bind(j),a&&a.suspense):j.run(),A&&A.push(z),z}function Ro(e,t,n){const s=this.proxy,r=J(e)?e.includes(".")?cr(s,e):()=>s[e]:e.bind(s,s);let o;P(t)?o=t:(o=t.handler,n=t);const i=Z;tt(this);const c=lr(r,o.bind(s),n);return i?tt(i):Ke(),c}function cr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function $e(e,t){if(!V(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),ne(e))$e(e.value,t);else if(I(e))for(let n=0;n<e.length;n++)$e(e[n],t);else if(Ps(e)||Ye(e))e.forEach(n=>{$e(n,t)});else if(Fs(e))for(const n in e)$e(e[n],t);return e}function is(e,t){const n=ce;if(n===null)return e;const s=Gt(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,c,u,a=K]=t[o];i&&(P(i)&&(i={mounted:i,updated:i}),i.deep&&$e(c),r.push({dir:i,instance:s,value:c,oldValue:void 0,arg:u,modifiers:a}))}return e}function Fe(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const c=r[i];o&&(c.oldValue=o[i].value);let u=c.dir[s];u&&(De(),ue(u,n,8,[e.el,c,e,t]),Ve())}}/*! #__NO_SIDE_EFFECTS__ */function Mo(e,t){return P(e)?Y({name:e.name},t,{setup:e}):e}const At=e=>!!e.type.__asyncLoader,fr=e=>e.type.__isKeepAlive;function Fo(e,t){ur(e,"a",t)}function No(e,t){ur(e,"da",t)}function ur(e,t,n=Z){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Wt(t,s,n),n){let r=n.parent;for(;r&&r.parent;)fr(r.parent.vnode)&&Lo(s,t,n,r),r=r.parent}}function Lo(e,t,n,s){const r=Wt(t,e,s,!0);dr(()=>{Tn(s[t],r)},n)}function Wt(e,t,n=Z,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;De(),tt(n);const c=ue(t,n,e,i);return Ke(),Ve(),c});return s?r.unshift(o):r.push(o),o}}const xe=e=>(t,n=Z)=>(!Jt||e==="sp")&&Wt(e,(...s)=>t(...s),n),$o=xe("bm"),ar=xe("m"),jo=xe("bu"),Ho=xe("u"),Uo=xe("bum"),dr=xe("um"),Ko=xe("sp"),Bo=xe("rtg"),Do=xe("rtc");function Vo(e,t=Z){Wt("ec",e,t)}function ls(e,t,n,s){let r;const o=n&&n[s];if(I(e)||J(e)){r=new Array(e.length);for(let i=0,c=e.length;i<c;i++)r[i]=t(e[i],i,void 0,o&&o[i])}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,o&&o[i])}else if(V(e))if(e[Symbol.iterator])r=Array.from(e,(i,c)=>t(i,c,void 0,o&&o[c]));else{const i=Object.keys(e);r=new Array(i.length);for(let c=0,u=i.length;c<u;c++){const a=i[c];r[c]=t(e[a],a,c,o&&o[c])}}else r=[];return n&&(n[s]=r),r}const _n=e=>e?Cr(e)?Gt(e)||e.proxy:_n(e.parent):null,ut=Y(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>_n(e.parent),$root:e=>_n(e.root),$emit:e=>e.emit,$options:e=>Kn(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Un(e.update)}),$nextTick:e=>e.n||(e.n=nr.bind(e.proxy)),$watch:e=>Ro.bind(e)}),sn=(e,t)=>e!==K&&!e.__isScriptSetup&&F(e,t),Wo={get({_:e},t){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:c,appContext:u}=e;let a;if(t[0]!=="$"){const O=i[t];if(O!==void 0)switch(O){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(sn(s,t))return i[t]=1,s[t];if(r!==K&&F(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&F(a,t))return i[t]=3,o[t];if(n!==K&&F(n,t))return i[t]=4,n[t];bn&&(i[t]=0)}}const p=ut[t];let x,E;if(p)return t==="$attrs"&&te(e,"get",t),p(e);if((x=c.__cssModules)&&(x=x[t]))return x;if(n!==K&&F(n,t))return i[t]=4,n[t];if(E=u.config.globalProperties,F(E,t))return E[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return sn(r,t)?(r[t]=n,!0):s!==K&&F(s,t)?(s[t]=n,!0):F(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let c;return!!n[i]||e!==K&&F(e,i)||sn(t,i)||(c=o[0])&&F(c,i)||F(s,i)||F(ut,i)||F(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:F(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function cs(e){return I(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let bn=!0;function qo(e){const t=Kn(e),n=e.proxy,s=e.ctx;bn=!1,t.beforeCreate&&fs(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:c,provide:u,inject:a,created:p,beforeMount:x,mounted:E,beforeUpdate:O,updated:R,activated:A,deactivated:U,beforeDestroy:q,beforeUnmount:ae,destroyed:j,unmounted:z,render:N,renderTracked:ve,renderTriggered:Ae,errorCaptured:we,serverPrefetch:Yt,expose:Pe,inheritAttrs:st,components:_t,directives:bt,filters:Xt}=t;if(a&&zo(a,s,null),i)for(const D in i){const H=i[D];P(H)&&(s[D]=H.bind(n))}if(r){const D=r.call(n,n);V(D)&&(e.data=Ln(D))}if(bn=!0,o)for(const D in o){const H=o[D],Re=P(H)?H.bind(n,n):P(H.get)?H.get.bind(n,n):re,yt=!P(H)&&P(H.set)?H.set.bind(n):re,Me=Ei({get:Re,set:yt});Object.defineProperty(s,D,{enumerable:!0,configurable:!0,get:()=>Me.value,set:de=>Me.value=de})}if(c)for(const D in c)hr(c[D],s,n,D);if(u){const D=P(u)?u.call(n):u;Reflect.ownKeys(D).forEach(H=>{Qo(H,D[H])})}p&&fs(p,e,"c");function Q(D,H){I(H)?H.forEach(Re=>D(Re.bind(n))):H&&D(H.bind(n))}if(Q($o,x),Q(ar,E),Q(jo,O),Q(Ho,R),Q(Fo,A),Q(No,U),Q(Vo,we),Q(Do,ve),Q(Bo,Ae),Q(Uo,ae),Q(dr,z),Q(Ko,Yt),I(Pe))if(Pe.length){const D=e.exposed||(e.exposed={});Pe.forEach(H=>{Object.defineProperty(D,H,{get:()=>n[H],set:Re=>n[H]=Re})})}else e.exposed||(e.exposed={});N&&e.render===re&&(e.render=N),st!=null&&(e.inheritAttrs=st),_t&&(e.components=_t),bt&&(e.directives=bt)}function zo(e,t,n=re){I(e)&&(e=yn(e));for(const s in e){const r=e[s];let o;V(r)?"default"in r?o=Pt(r.from||s,r.default,!0):o=Pt(r.from||s):o=Pt(r),ne(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function fs(e,t,n){ue(I(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function hr(e,t,n,s){const r=s.includes(".")?cr(n,s):()=>n[s];if(J(e)){const o=t[e];P(o)&&nn(r,o)}else if(P(e))nn(r,e.bind(n));else if(V(e))if(I(e))e.forEach(o=>hr(o,t,n,s));else{const o=P(e.handler)?e.handler.bind(n):t[e.handler];P(o)&&nn(r,o,e)}}function Kn(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let u;return c?u=c:!r.length&&!n&&!s?u=t:(u={},r.length&&r.forEach(a=>Lt(u,a,i,!0)),Lt(u,t,i)),V(t)&&o.set(t,u),u}function Lt(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Lt(e,o,n,!0),r&&r.forEach(i=>Lt(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const c=Jo[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Jo={data:us,props:as,emits:as,methods:ft,computed:ft,beforeCreate:k,created:k,beforeMount:k,mounted:k,beforeUpdate:k,updated:k,beforeDestroy:k,beforeUnmount:k,destroyed:k,unmounted:k,activated:k,deactivated:k,errorCaptured:k,serverPrefetch:k,components:ft,directives:ft,watch:Yo,provide:us,inject:Go};function us(e,t){return t?e?function(){return Y(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function Go(e,t){return ft(yn(e),yn(t))}function yn(e){if(I(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function k(e,t){return e?[...new Set([].concat(e,t))]:t}function ft(e,t){return e?Y(Object.create(null),e,t):t}function as(e,t){return e?I(e)&&I(t)?[...new Set([...e,...t])]:Y(Object.create(null),cs(e),cs(t??{})):t}function Yo(e,t){if(!e)return t;if(!t)return e;const n=Y(Object.create(null),e);for(const s in t)n[s]=k(e[s],t[s]);return n}function pr(){return{app:null,config:{isNativeTag:Ar,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Xo=0;function Zo(e,t){return function(s,r=null){P(s)||(s=Y({},s)),r!=null&&!V(r)&&(r=null);const o=pr(),i=new WeakSet;let c=!1;const u=o.app={_uid:Xo++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:Ti,get config(){return o.config},set config(a){},use(a,...p){return i.has(a)||(a&&P(a.install)?(i.add(a),a.install(u,...p)):P(a)&&(i.add(a),a(u,...p))),u},mixin(a){return o.mixins.includes(a)||o.mixins.push(a),u},component(a,p){return p?(o.components[a]=p,u):o.components[a]},directive(a,p){return p?(o.directives[a]=p,u):o.directives[a]},mount(a,p,x){if(!c){const E=Ue(s,r);return E.appContext=o,x===!0?x="svg":x===!1&&(x=void 0),p&&t?t(E,a):e(E,a,x),c=!0,u._container=a,a.__vue_app__=u,Gt(E.component)||E.component.proxy}},unmount(){c&&(e(null,u._container),delete u._container.__vue_app__)},provide(a,p){return o.provides[a]=p,u},runWithContext(a){$t=u;try{return a()}finally{$t=null}}};return u}}let $t=null;function Qo(e,t){if(Z){let n=Z.provides;const s=Z.parent&&Z.parent.provides;s===n&&(n=Z.provides=Object.create(s)),n[e]=t}}function Pt(e,t,n=!1){const s=Z||ce;if(s||$t){const r=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:$t._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&P(t)?t.call(s&&s.proxy):t}}function ko(e,t,n,s=!1){const r={},o={};Mt(o,zt,1),e.propsDefaults=Object.create(null),gr(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:co(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function ei(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,c=L(r),[u]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const p=e.vnode.dynamicProps;for(let x=0;x<p.length;x++){let E=p[x];if(Dt(e.emitsOptions,E))continue;const O=t[E];if(u)if(F(o,E))O!==o[E]&&(o[E]=O,a=!0);else{const R=Qe(E);r[R]=xn(u,c,R,O,e,!1)}else O!==o[E]&&(o[E]=O,a=!0)}}}else{gr(e,t,r,o)&&(a=!0);let p;for(const x in c)(!t||!F(t,x)&&((p=Be(x))===x||!F(t,p)))&&(u?n&&(n[x]!==void 0||n[p]!==void 0)&&(r[x]=xn(u,c,x,void 0,e,!0)):delete r[x]);if(o!==c)for(const x in o)(!t||!F(t,x))&&(delete o[x],a=!0)}a&&ye(e,"set","$attrs")}function gr(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,c;if(t)for(let u in t){if(St(u))continue;const a=t[u];let p;r&&F(r,p=Qe(u))?!o||!o.includes(p)?n[p]=a:(c||(c={}))[p]=a:Dt(e.emitsOptions,u)||(!(u in s)||a!==s[u])&&(s[u]=a,i=!0)}if(o){const u=L(n),a=c||K;for(let p=0;p<o.length;p++){const x=o[p];n[x]=xn(r,u,x,a[x],e,!F(a,x))}}return i}function xn(e,t,n,s,r,o){const i=e[n];if(i!=null){const c=F(i,"default");if(c&&s===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&P(u)){const{propsDefaults:a}=r;n in a?s=a[n]:(tt(r),s=a[n]=u.call(null,t),Ke())}else s=u}i[0]&&(o&&!c?s=!1:i[1]&&(s===""||s===Be(n))&&(s=!0))}return s}function mr(e,t,n=!1){const s=t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},c=[];let u=!1;if(!P(e)){const p=x=>{u=!0;const[E,O]=mr(x,t,!0);Y(i,E),O&&c.push(...O)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!u)return V(e)&&s.set(e,Ge),Ge;if(I(o))for(let p=0;p<o.length;p++){const x=Qe(o[p]);ds(x)&&(i[x]=K)}else if(o)for(const p in o){const x=Qe(p);if(ds(x)){const E=o[p],O=i[x]=I(E)||P(E)?{type:E}:Y({},E);if(O){const R=gs(Boolean,O.type),A=gs(String,O.type);O[0]=R>-1,O[1]=A<0||R<A,(R>-1||F(O,"default"))&&c.push(x)}}}const a=[i,c];return V(e)&&s.set(e,a),a}function ds(e){return e[0]!=="$"}function hs(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function ps(e,t){return hs(e)===hs(t)}function gs(e,t){return I(t)?t.findIndex(n=>ps(n,e)):P(t)&&ps(t,e)?0:-1}const _r=e=>e[0]==="_"||e==="$stable",Bn=e=>I(e)?e.map(ge):[ge(e)],ti=(e,t,n)=>{if(t._n)return t;const s=Eo((...r)=>Bn(t(...r)),n);return s._c=!1,s},br=(e,t,n)=>{const s=e._ctx;for(const r in e){if(_r(r))continue;const o=e[r];if(P(o))t[r]=ti(r,o,s);else if(o!=null){const i=Bn(o);t[r]=()=>i}}},yr=(e,t)=>{const n=Bn(t);e.slots.default=()=>n},ni=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=L(t),Mt(t,"_",n)):br(t,e.slots={})}else e.slots={},t&&yr(e,t);Mt(e.slots,zt,1)},si=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=K;if(s.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:(Y(r,t),!n&&c===1&&delete r._):(o=!t.$stable,br(t,r)),i=t}else t&&(yr(e,t),i={default:1});if(o)for(const c in r)!_r(c)&&i[c]==null&&delete r[c]};function vn(e,t,n,s,r=!1){if(I(e)){e.forEach((E,O)=>vn(E,t&&(I(t)?t[O]:t),n,s,r));return}if(At(s)&&!r)return;const o=s.shapeFlag&4?Gt(s.component)||s.component.proxy:s.el,i=r?null:o,{i:c,r:u}=e,a=t&&t.r,p=c.refs===K?c.refs={}:c.refs,x=c.setupState;if(a!=null&&a!==u&&(J(a)?(p[a]=null,F(x,a)&&(x[a]=null)):ne(a)&&(a.value=null)),P(u))Se(u,c,12,[i,p]);else{const E=J(u),O=ne(u);if(E||O){const R=()=>{if(e.f){const A=E?F(x,u)?x[u]:p[u]:u.value;r?I(A)&&Tn(A,o):I(A)?A.includes(o)||A.push(o):E?(p[u]=[o],F(x,u)&&(x[u]=p[u])):(u.value=[o],e.k&&(p[e.k]=u.value))}else E?(p[u]=i,F(x,u)&&(x[u]=i)):O&&(u.value=i,e.k&&(p[e.k]=i))};i?(R.id=-1,ee(R,n)):R()}}}const ee=Po;function ri(e){return oi(e)}function oi(e,t){const n=Ls();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:c,createComment:u,setText:a,setElementText:p,parentNode:x,nextSibling:E,setScopeId:O=re,insertStaticContent:R}=e,A=(l,f,d,h=null,g=null,b=null,v=void 0,_=null,y=!!f.dynamicChildren)=>{if(l===f)return;l&&!ct(l,f)&&(h=xt(l),de(l,g,b,!0),l=null),f.patchFlag===-2&&(y=!1,f.dynamicChildren=null);const{type:m,ref:w,shapeFlag:T}=f;switch(m){case qt:U(l,f,d,h);break;case gt:q(l,f,d,h);break;case on:l==null&&ae(f,d,h,v);break;case le:_t(l,f,d,h,g,b,v,_,y);break;default:T&1?N(l,f,d,h,g,b,v,_,y):T&6?bt(l,f,d,h,g,b,v,_,y):(T&64||T&128)&&m.process(l,f,d,h,g,b,v,_,y,We)}w!=null&&g&&vn(w,l&&l.ref,b,f||l,!f)},U=(l,f,d,h)=>{if(l==null)s(f.el=c(f.children),d,h);else{const g=f.el=l.el;f.children!==l.children&&a(g,f.children)}},q=(l,f,d,h)=>{l==null?s(f.el=u(f.children||""),d,h):f.el=l.el},ae=(l,f,d,h)=>{[l.el,l.anchor]=R(l.children,f,d,h,l.el,l.anchor)},j=({el:l,anchor:f},d,h)=>{let g;for(;l&&l!==f;)g=E(l),s(l,d,h),l=g;s(f,d,h)},z=({el:l,anchor:f})=>{let d;for(;l&&l!==f;)d=E(l),r(l),l=d;r(f)},N=(l,f,d,h,g,b,v,_,y)=>{f.type==="svg"?v="svg":f.type==="math"&&(v="mathml"),l==null?ve(f,d,h,g,b,v,_,y):Yt(l,f,g,b,v,_,y)},ve=(l,f,d,h,g,b,v,_)=>{let y,m;const{props:w,shapeFlag:T,transition:C,dirs:S}=l;if(y=l.el=i(l.type,b,w&&w.is,w),T&8?p(y,l.children):T&16&&we(l.children,y,null,h,g,rn(l,b),v,_),S&&Fe(l,null,h,"created"),Ae(y,l,l.scopeId,v,h),w){for(const $ in w)$!=="value"&&!St($)&&o(y,$,null,w[$],b,l.children,h,g,_e);"value"in w&&o(y,"value",null,w.value,b),(m=w.onVnodeBeforeMount)&&pe(m,h,l)}S&&Fe(l,null,h,"beforeMount");const M=ii(g,C);M&&C.beforeEnter(y),s(y,f,d),((m=w&&w.onVnodeMounted)||M||S)&&ee(()=>{m&&pe(m,h,l),M&&C.enter(y),S&&Fe(l,null,h,"mounted")},g)},Ae=(l,f,d,h,g)=>{if(d&&O(l,d),h)for(let b=0;b<h.length;b++)O(l,h[b]);if(g){let b=g.subTree;if(f===b){const v=g.vnode;Ae(l,v,v.scopeId,v.slotScopeIds,g.parent)}}},we=(l,f,d,h,g,b,v,_,y=0)=>{for(let m=y;m<l.length;m++){const w=l[m]=_?Ce(l[m]):ge(l[m]);A(null,w,f,d,h,g,b,v,_)}},Yt=(l,f,d,h,g,b,v)=>{const _=f.el=l.el;let{patchFlag:y,dynamicChildren:m,dirs:w}=f;y|=l.patchFlag&16;const T=l.props||K,C=f.props||K;let S;if(d&&Ne(d,!1),(S=C.onVnodeBeforeUpdate)&&pe(S,d,f,l),w&&Fe(f,l,d,"beforeUpdate"),d&&Ne(d,!0),m?Pe(l.dynamicChildren,m,_,d,h,rn(f,g),b):v||H(l,f,_,null,d,h,rn(f,g),b,!1),y>0){if(y&16)st(_,f,T,C,d,h,g);else if(y&2&&T.class!==C.class&&o(_,"class",null,C.class,g),y&4&&o(_,"style",T.style,C.style,g),y&8){const M=f.dynamicProps;for(let $=0;$<M.length;$++){const B=M[$],G=T[B],oe=C[B];(oe!==G||B==="value")&&o(_,B,G,oe,g,l.children,d,h,_e)}}y&1&&l.children!==f.children&&p(_,f.children)}else!v&&m==null&&st(_,f,T,C,d,h,g);((S=C.onVnodeUpdated)||w)&&ee(()=>{S&&pe(S,d,f,l),w&&Fe(f,l,d,"updated")},h)},Pe=(l,f,d,h,g,b,v)=>{for(let _=0;_<f.length;_++){const y=l[_],m=f[_],w=y.el&&(y.type===le||!ct(y,m)||y.shapeFlag&70)?x(y.el):d;A(y,m,w,null,h,g,b,v,!0)}},st=(l,f,d,h,g,b,v)=>{if(d!==h){if(d!==K)for(const _ in d)!St(_)&&!(_ in h)&&o(l,_,d[_],null,v,f.children,g,b,_e);for(const _ in h){if(St(_))continue;const y=h[_],m=d[_];y!==m&&_!=="value"&&o(l,_,m,y,v,f.children,g,b,_e)}"value"in h&&o(l,"value",d.value,h.value,v)}},_t=(l,f,d,h,g,b,v,_,y)=>{const m=f.el=l?l.el:c(""),w=f.anchor=l?l.anchor:c("");let{patchFlag:T,dynamicChildren:C,slotScopeIds:S}=f;S&&(_=_?_.concat(S):S),l==null?(s(m,d,h),s(w,d,h),we(f.children,d,w,g,b,v,_,y)):T>0&&T&64&&C&&l.dynamicChildren?(Pe(l.dynamicChildren,C,d,g,b,v,_),(f.key!=null||g&&f===g.subTree)&&xr(l,f,!0)):H(l,f,d,w,g,b,v,_,y)},bt=(l,f,d,h,g,b,v,_,y)=>{f.slotScopeIds=_,l==null?f.shapeFlag&512?g.ctx.activate(f,d,h,v,y):Xt(f,d,h,g,b,v,y):Wn(l,f,y)},Xt=(l,f,d,h,g,b,v)=>{const _=l.component=_i(l,h,g);if(fr(l)&&(_.ctx.renderer=We),bi(_),_.asyncDep){if(g&&g.registerDep(_,Q),!l.el){const y=_.subTree=Ue(gt);q(null,y,f,d)}}else Q(_,l,f,d,g,b,v)},Wn=(l,f,d)=>{const h=f.component=l.component;if(To(l,f,d))if(h.asyncDep&&!h.asyncResolved){D(h,f,d);return}else h.next=f,_o(h.update),h.effect.dirty=!0,h.update();else f.el=l.el,h.vnode=f},Q=(l,f,d,h,g,b,v)=>{const _=()=>{if(l.isMounted){let{next:w,bu:T,u:C,parent:S,vnode:M}=l;{const qe=vr(l);if(qe){w&&(w.el=M.el,D(l,w,v)),qe.asyncDep.then(()=>{l.isUnmounted||_()});return}}let $=w,B;Ne(l,!1),w?(w.el=M.el,D(l,w,v)):w=M,T&&It(T),(B=w.props&&w.props.onVnodeBeforeUpdate)&&pe(B,S,w,M),Ne(l,!0);const G=tn(l),oe=l.subTree;l.subTree=G,A(oe,G,x(oe.el),xt(oe),l,g,b),w.el=G.el,$===null&&So(l,G.el),C&&ee(C,g),(B=w.props&&w.props.onVnodeUpdated)&&ee(()=>pe(B,S,w,M),g)}else{let w;const{el:T,props:C}=f,{bm:S,m:M,parent:$}=l,B=At(f);if(Ne(l,!1),S&&It(S),!B&&(w=C&&C.onVnodeBeforeMount)&&pe(w,$,f),Ne(l,!0),T&&Qt){const G=()=>{l.subTree=tn(l),Qt(T,l.subTree,l,g,null)};B?f.type.__asyncLoader().then(()=>!l.isUnmounted&&G()):G()}else{const G=l.subTree=tn(l);A(null,G,d,h,l,g,b),f.el=G.el}if(M&&ee(M,g),!B&&(w=C&&C.onVnodeMounted)){const G=f;ee(()=>pe(w,$,G),g)}(f.shapeFlag&256||$&&At($.vnode)&&$.vnode.shapeFlag&256)&&l.a&&ee(l.a,g),l.isMounted=!0,f=d=h=null}},y=l.effect=new Pn(_,re,()=>Un(m),l.scope),m=l.update=()=>{y.dirty&&y.run()};m.id=l.uid,Ne(l,!0),m()},D=(l,f,d)=>{f.component=l;const h=l.vnode.props;l.vnode=f,l.next=null,ei(l,f.props,h,d),si(l,f.children,d),De(),rs(l),Ve()},H=(l,f,d,h,g,b,v,_,y=!1)=>{const m=l&&l.children,w=l?l.shapeFlag:0,T=f.children,{patchFlag:C,shapeFlag:S}=f;if(C>0){if(C&128){yt(m,T,d,h,g,b,v,_,y);return}else if(C&256){Re(m,T,d,h,g,b,v,_,y);return}}S&8?(w&16&&_e(m,g,b),T!==m&&p(d,T)):w&16?S&16?yt(m,T,d,h,g,b,v,_,y):_e(m,g,b,!0):(w&8&&p(d,""),S&16&&we(T,d,h,g,b,v,_,y))},Re=(l,f,d,h,g,b,v,_,y)=>{l=l||Ge,f=f||Ge;const m=l.length,w=f.length,T=Math.min(m,w);let C;for(C=0;C<T;C++){const S=f[C]=y?Ce(f[C]):ge(f[C]);A(l[C],S,d,null,g,b,v,_,y)}m>w?_e(l,g,b,!0,!1,T):we(f,d,h,g,b,v,_,y,T)},yt=(l,f,d,h,g,b,v,_,y)=>{let m=0;const w=f.length;let T=l.length-1,C=w-1;for(;m<=T&&m<=C;){const S=l[m],M=f[m]=y?Ce(f[m]):ge(f[m]);if(ct(S,M))A(S,M,d,null,g,b,v,_,y);else break;m++}for(;m<=T&&m<=C;){const S=l[T],M=f[C]=y?Ce(f[C]):ge(f[C]);if(ct(S,M))A(S,M,d,null,g,b,v,_,y);else break;T--,C--}if(m>T){if(m<=C){const S=C+1,M=S<w?f[S].el:h;for(;m<=C;)A(null,f[m]=y?Ce(f[m]):ge(f[m]),d,M,g,b,v,_,y),m++}}else if(m>C)for(;m<=T;)de(l[m],g,b,!0),m++;else{const S=m,M=m,$=new Map;for(m=M;m<=C;m++){const se=f[m]=y?Ce(f[m]):ge(f[m]);se.key!=null&&$.set(se.key,m)}let B,G=0;const oe=C-M+1;let qe=!1,Jn=0;const rt=new Array(oe);for(m=0;m<oe;m++)rt[m]=0;for(m=S;m<=T;m++){const se=l[m];if(G>=oe){de(se,g,b,!0);continue}let he;if(se.key!=null)he=$.get(se.key);else for(B=M;B<=C;B++)if(rt[B-M]===0&&ct(se,f[B])){he=B;break}he===void 0?de(se,g,b,!0):(rt[he-M]=m+1,he>=Jn?Jn=he:qe=!0,A(se,f[he],d,null,g,b,v,_,y),G++)}const Gn=qe?li(rt):Ge;for(B=Gn.length-1,m=oe-1;m>=0;m--){const se=M+m,he=f[se],Yn=se+1<w?f[se+1].el:h;rt[m]===0?A(null,he,d,Yn,g,b,v,_,y):qe&&(B<0||m!==Gn[B]?Me(he,d,Yn,2):B--)}}},Me=(l,f,d,h,g=null)=>{const{el:b,type:v,transition:_,children:y,shapeFlag:m}=l;if(m&6){Me(l.component.subTree,f,d,h);return}if(m&128){l.suspense.move(f,d,h);return}if(m&64){v.move(l,f,d,We);return}if(v===le){s(b,f,d);for(let T=0;T<y.length;T++)Me(y[T],f,d,h);s(l.anchor,f,d);return}if(v===on){j(l,f,d);return}if(h!==2&&m&1&&_)if(h===0)_.beforeEnter(b),s(b,f,d),ee(()=>_.enter(b),g);else{const{leave:T,delayLeave:C,afterLeave:S}=_,M=()=>s(b,f,d),$=()=>{T(b,()=>{M(),S&&S()})};C?C(b,M,$):$()}else s(b,f,d)},de=(l,f,d,h=!1,g=!1)=>{const{type:b,props:v,ref:_,children:y,dynamicChildren:m,shapeFlag:w,patchFlag:T,dirs:C}=l;if(_!=null&&vn(_,null,d,l,!0),w&256){f.ctx.deactivate(l);return}const S=w&1&&C,M=!At(l);let $;if(M&&($=v&&v.onVnodeBeforeUnmount)&&pe($,f,l),w&6)Ir(l.component,d,h);else{if(w&128){l.suspense.unmount(d,h);return}S&&Fe(l,null,f,"beforeUnmount"),w&64?l.type.remove(l,f,d,g,We,h):m&&(b!==le||T>0&&T&64)?_e(m,f,d,!1,!0):(b===le&&T&384||!g&&w&16)&&_e(y,f,d),h&&qn(l)}(M&&($=v&&v.onVnodeUnmounted)||S)&&ee(()=>{$&&pe($,f,l),S&&Fe(l,null,f,"unmounted")},d)},qn=l=>{const{type:f,el:d,anchor:h,transition:g}=l;if(f===le){Sr(d,h);return}if(f===on){z(l);return}const b=()=>{r(d),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(l.shapeFlag&1&&g&&!g.persisted){const{leave:v,delayLeave:_}=g,y=()=>v(d,b);_?_(l.el,b,y):y()}else b()},Sr=(l,f)=>{let d;for(;l!==f;)d=E(l),r(l),l=d;r(f)},Ir=(l,f,d)=>{const{bum:h,scope:g,update:b,subTree:v,um:_}=l;h&&It(h),g.stop(),b&&(b.active=!1,de(v,l,f,d)),_&&ee(_,f),ee(()=>{l.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&l.asyncDep&&!l.asyncResolved&&l.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},_e=(l,f,d,h=!1,g=!1,b=0)=>{for(let v=b;v<l.length;v++)de(l[v],f,d,h,g)},xt=l=>l.shapeFlag&6?xt(l.component.subTree):l.shapeFlag&128?l.suspense.next():E(l.anchor||l.el),zn=(l,f,d)=>{l==null?f._vnode&&de(f._vnode,null,null,!0):A(f._vnode||null,l,f,null,null,null,d),rs(),rr(),f._vnode=l},We={p:A,um:de,m:Me,r:qn,mt:Xt,mc:we,pc:H,pbc:Pe,n:xt,o:e};let Zt,Qt;return t&&([Zt,Qt]=t(We)),{render:zn,hydrate:Zt,createApp:Zo(zn,Zt)}}function rn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ne({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ii(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function xr(e,t,n=!1){const s=e.children,r=t.children;if(I(s)&&I(r))for(let o=0;o<s.length;o++){const i=s[o];let c=r[o];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=r[o]=Ce(r[o]),c.el=i.el),n||xr(i,c)),c.type===qt&&(c.el=i.el)}}function li(e){const t=e.slice(),n=[0];let s,r,o,i,c;const u=e.length;for(s=0;s<u;s++){const a=e[s];if(a!==0){if(r=n[n.length-1],e[r]<a){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)c=o+i>>1,e[n[c]]<a?o=c+1:i=c;a<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function vr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:vr(t)}const ci=e=>e.__isTeleport,le=Symbol.for("v-fgt"),qt=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),on=Symbol.for("v-stc"),at=[];let fe=null;function it(e=!1){at.push(fe=e?null:[])}function fi(){at.pop(),fe=at[at.length-1]||null}let mt=1;function ms(e){mt+=e}function ui(e){return e.dynamicChildren=mt>0?fe||Ge:null,fi(),mt>0&&fe&&fe.push(e),e}function lt(e,t,n,s,r,o){return ui(W(e,t,n,s,r,o,!0))}function ai(e){return e?e.__v_isVNode===!0:!1}function ct(e,t){return e.type===t.type&&e.key===t.key}const zt="__vInternal",wr=({key:e})=>e??null,Rt=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?J(e)||ne(e)||P(e)?{i:ce,r:e,k:t,f:!!n}:e:null);function W(e,t=null,n=null,s=0,r=null,o=e===le?0:1,i=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&wr(t),ref:t&&Rt(t),scopeId:Vt,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ce};return c?(Dn(u,n),o&128&&e.normalize(u)):n&&(u.shapeFlag|=J(n)?8:16),mt>0&&!i&&fe&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&fe.push(u),u}const Ue=di;function di(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Io)&&(e=gt),ai(e)){const c=et(e,t,!0);return n&&Dn(c,n),mt>0&&!o&&fe&&(c.shapeFlag&6?fe[fe.indexOf(e)]=c:fe.push(c)),c.patchFlag|=-2,c}if(wi(e)&&(e=e.__vccOpts),t){t=hi(t);let{class:c,style:u}=t;c&&!J(c)&&(t.class=An(c)),V(u)&&(Xs(u)&&!I(u)&&(u=Y({},u)),t.style=In(u))}const i=J(e)?1:Ao(e)?128:ci(e)?64:V(e)?4:P(e)?2:0;return W(e,t,n,s,r,i,o,!0)}function hi(e){return e?Xs(e)||zt in e?Y({},e):e:null}function et(e,t,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=e,c=t?pi(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&wr(c),ref:t&&t.ref?n&&r?I(r)?r.concat(Rt(t)):[r,Rt(t)]:Rt(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&et(e.ssContent),ssFallback:e.ssFallback&&et(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Er(e=" ",t=0){return Ue(qt,null,e,t)}function ge(e){return e==null||typeof e=="boolean"?Ue(gt):I(e)?Ue(le,null,e.slice()):typeof e=="object"?Ce(e):Ue(qt,null,String(e))}function Ce(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:et(e)}function Dn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(I(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Dn(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(zt in t)?t._ctx=ce:r===3&&ce&&(ce.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else P(t)?(t={default:t,_ctx:ce},n=32):(t=String(t),s&64?(n=16,t=[Er(t)]):n=8);e.children=t,e.shapeFlag|=n}function pi(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=An([t.class,s.class]));else if(r==="style")t.style=In([t.style,s.style]);else if(jt(r)){const o=t[r],i=s[r];i&&o!==i&&!(I(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}function pe(e,t,n,s=null){ue(e,t,7,[n,s])}const gi=pr();let mi=0;function _i(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||gi,o={uid:mi++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Kr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:mr(s,r),emitsOptions:ir(s,r),emit:null,emitted:null,propsDefaults:K,inheritAttrs:s.inheritAttrs,ctx:K,data:K,props:K,attrs:K,slots:K,refs:K,setupState:K,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=xo.bind(null,o),e.ce&&e.ce(o),o}let Z=null,Vn,wn;{const e=Ls(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};Vn=t("__VUE_INSTANCE_SETTERS__",n=>Z=n),wn=t("__VUE_SSR_SETTERS__",n=>Jt=n)}const tt=e=>{Vn(e),e.scope.on()},Ke=()=>{Z&&Z.scope.off(),Vn(null)};function Cr(e){return e.vnode.shapeFlag&4}let Jt=!1;function bi(e,t=!1){t&&wn(t);const{props:n,children:s}=e.vnode,r=Cr(e);ko(e,n,r,t),ni(e,s);const o=r?yi(e,t):void 0;return t&&wn(!1),o}function yi(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Zs(new Proxy(e.ctx,Wo));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?vi(e):null;tt(e),De();const o=Se(s,e,0,[e.props,r]);if(Ve(),Ke(),Rs(o)){if(o.then(Ke,Ke),t)return o.then(i=>{_s(e,i,t)}).catch(i=>{Bt(i,e,0)});e.asyncDep=o}else _s(e,o,t)}else Or(e,t)}function _s(e,t,n){P(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:V(t)&&(e.setupState=er(t)),Or(e,n)}let bs;function Or(e,t,n){const s=e.type;if(!e.render){if(!t&&bs&&!s.render){const r=s.template||Kn(e).template;if(r){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:c,compilerOptions:u}=s,a=Y(Y({isCustomElement:o,delimiters:c},i),u);s.render=bs(r,a)}}e.render=s.render||re}{tt(e),De();try{qo(e)}finally{Ve(),Ke()}}}function xi(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return te(e,"get","$attrs"),t[n]}}))}function vi(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return xi(e)},slots:e.slots,emit:e.emit,expose:t}}function Gt(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(er(Zs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ut)return ut[n](e)},has(t,n){return n in t||n in ut}}))}function wi(e){return P(e)&&"__vccOpts"in e}const Ei=(e,t)=>fo(e,t,Jt),Ci=Symbol.for("v-scx"),Oi=()=>Pt(Ci),Ti="3.4.0",Si="http://www.w3.org/2000/svg",Ii="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,ys=Oe&&Oe.createElement("template"),Ai={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Oe.createElementNS(Si,e):t==="mathml"?Oe.createElementNS(Ii,e):Oe.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{ys.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const c=ys.content;if(s==="svg"||s==="mathml"){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Pi=Symbol("_vtc");function Ri(e,t,n){const s=e[Pi];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Mi=Symbol("_vod"),Fi=Symbol("");function Ni(e,t,n){const s=e.style,r=J(n);if(n&&!r){if(t&&!J(t))for(const o in t)n[o]==null&&En(s,o,"");for(const o in n)En(s,o,n[o])}else{const o=s.display;if(r){if(t!==n){const i=s[Fi];i&&(n+=";"+i),s.cssText=n}}else t&&e.removeAttribute("style");Mi in e&&(s.display=o)}}const xs=/\s*!important$/;function En(e,t,n){if(I(n))n.forEach(s=>En(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Li(e,t);xs.test(n)?e.setProperty(Be(s),n.replace(xs,""),"important"):e[s]=n}}const vs=["Webkit","Moz","ms"],ln={};function Li(e,t){const n=ln[t];if(n)return n;let s=Qe(t);if(s!=="filter"&&s in e)return ln[t]=s;s=Ns(s);for(let r=0;r<vs.length;r++){const o=vs[r]+s;if(o in e)return ln[t]=o}return t}const ws="http://www.w3.org/1999/xlink";function $i(e,t,n,s,r){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(ws,t.slice(6,t.length)):e.setAttributeNS(ws,t,n);else{const o=Ur(t);n==null||o&&!$s(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function ji(e,t,n,s,r,o,i){if(t==="innerHTML"||t==="textContent"){s&&i(s,r,o),e[t]=n??"";return}const c=e.tagName;if(t==="value"&&c!=="PROGRESS"&&!c.includes("-")){e._value=n;const a=c==="OPTION"?e.getAttribute("value"):e.value,p=n??"";a!==p&&(e.value=p),n==null&&e.removeAttribute(t);return}let u=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=$s(n):n==null&&a==="string"?(n="",u=!0):a==="number"&&(n=0,u=!0)}try{e[t]=n}catch{}u&&e.removeAttribute(t)}function Je(e,t,n,s){e.addEventListener(t,n,s)}function Hi(e,t,n,s){e.removeEventListener(t,n,s)}const Es=Symbol("_vei");function Ui(e,t,n,s,r=null){const o=e[Es]||(e[Es]={}),i=o[t];if(s&&i)i.value=s;else{const[c,u]=Ki(t);if(s){const a=o[t]=Vi(s,r);Je(e,c,a,u)}else i&&(Hi(e,c,i,u),o[t]=void 0)}}const Cs=/(?:Once|Passive|Capture)$/;function Ki(e){let t;if(Cs.test(e)){t={};let s;for(;s=e.match(Cs);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Be(e.slice(2)),t]}let cn=0;const Bi=Promise.resolve(),Di=()=>cn||(Bi.then(()=>cn=0),cn=Date.now());function Vi(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;ue(Wi(s,n.value),t,5,[s])};return n.value=e,n.attached=Di(),n}function Wi(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,qi=(e,t,n,s,r,o,i,c,u)=>{const a=r==="svg";t==="class"?Ri(e,s,a):t==="style"?Ni(e,n,s):jt(t)?On(t)||Ui(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zi(e,t,s,a))?ji(e,t,s,o,i,c,u):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),$i(e,t,s,a))};function zi(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Os(t)&&P(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Os(t)&&J(n)?!1:t in e}const Ts=e=>{const t=e.props["onUpdate:modelValue"]||!1;return I(t)?n=>It(t,n):t};function Ji(e){e.target.composing=!0}function Ss(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const fn=Symbol("_assign"),Is={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[fn]=Ts(r);const o=s||r.props&&r.props.type==="number";Je(e,t?"change":"input",i=>{if(i.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=un(c)),e[fn](c)}),n&&Je(e,"change",()=>{e.value=e.value.trim()}),t||(Je(e,"compositionstart",Ji),Je(e,"compositionend",Ss),Je(e,"change",Ss))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},o){if(e[fn]=Ts(o),e.composing)return;const i=r||e.type==="number"?un(e.value):e.value,c=t??"";i!==c&&(document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===c)||(e.value=c))}},Gi={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yi=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=Be(r.key);if(t.some(i=>i===o||Gi[i]===o))return e(r)})},Xi=Y({patchProp:qi},Ai);let As;function Zi(){return As||(As=ri(Xi))}const Qi=(...e)=>{const t=Zi().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=el(s);if(!r)return;const o=t._component;!P(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,ki(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function ki(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function el(e){return J(e)?document.querySelector(e):e}const Tr=e=>(vo("data-v-ec68e45c"),e=e(),wo(),e),tl={class:"OneBots"},nl={class:"config"},sl={class:"adapters"},rl=Tr(()=>W("h2",null,"详情",-1)),ol={class:"logs"},il=Tr(()=>W("h2",null,"日志",-1)),ll={class:"input-wrapper"},cl={class:"text"},fl=Mo({__name:"App",setup(e){const t=ot(),n=ot(""),s=ot([]),r=ot(""),o=ot(""),i=()=>{nr(()=>{const O=document.querySelector(".OneBots>.logs>pre"),R=O.scrollHeight;O.scrollTo({top:R,behavior:"smooth"})})},c=O=>{r.value=O,i()},u=()=>{t.value.send(JSON.stringify({action:"system.reload",data:null}))},a=()=>{t.value.send(JSON.stringify({action:"system.saveConfig",data:n.value}))},p=(O,R)=>{switch(O){case"system.sync":console.log(R),n.value=R.config,s.value=R.adapters,c(R.logs);break;case"system.log":c(R)}},x=()=>{const O=localStorage.getItem("OneBots:serverPort")||prompt("请输入服务端监听的端口号",location.port),R=`ws://${location.hostname}:${O}`;t.value=new WebSocket(R),t.value.onerror=A=>{console.error("连接出错",A),localStorage.removeItem("OneBots:serverPort"),x()},t.value.onopen=()=>{console.log("success connect to "+R),localStorage.setItem("OneBots:serverPort",O)},t.value.onclose=A=>{console.log("connect close",A)},t.value.onmessage=A=>{const{event:U,data:q}=JSON.parse(A.data);p(U,q)}},E=()=>{t.value.send(JSON.stringify({action:"system.input",data:o.value})),r.value+=`
|
|
2
|
+
+${o.value}`,i(),o.value=""};return ar(x),(O,R)=>(it(),lt("div",tl,[W("section",nl,[W("h2",null,[Er("配置 "),W("span",{class:"buttons"},[W("button",{onClick:u},"重载配置"),W("button",{onClick:a},"保存")])]),is(W("textarea",{"onUpdate:modelValue":R[0]||(R[0]=A=>n.value=A)},null,512),[[Is,n.value]])]),W("section",sl,[rl,W("ul",null,[(it(!0),lt(le,null,ls(s.value,A=>(it(),lt("li",{key:A.platform},[W("p",null,"所属平台:"+ze(A.platform),1),W("ul",null,[(it(!0),lt(le,null,ls(A.bots,U=>(it(),lt("li",{key:U.uin},[W("p",null,"账号:"+ze(U.uin),1),W("p",null,"状态:"+ze(U.status),1),W("p",null,"URL:"+ze(U.urls),1)]))),128))])]))),128))])]),W("section",ol,[il,W("pre",null,ze(r.value),1),W("div",ll,[W("span",cl,ze(o.value),1),is(W("input",{"onUpdate:modelValue":R[1]||(R[1]=A=>o.value=A),onKeyup:Yi(E,["enter"])},null,544),[[Is,o.value]])])])]))}}),ul=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},al=ul(fl,[["__scopeId","data-v-ec68e45c"]]);Qi(al).mount("#app");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.OneBots[data-v-ec68e45c]{display:flex}.OneBots section[data-v-ec68e45c]{height:95vh;overflow:auto}.OneBots section.config[data-v-ec68e45c]{min-width:400px;display:flex;flex-direction:column}.OneBots section.config h2[data-v-ec68e45c]{display:flex;align-items:center;justify-content:space-between;padding-right:20px}.OneBots section.config h2 .buttons[data-v-ec68e45c]{display:flex;gap:4px}.OneBots section.config h2 .buttons button[data-v-ec68e45c]{background-color:#fff;outline:none;cursor:pointer;border:1px solid #e1e1e1;border-radius:4px;color:#1a1a18;font-size:14px;font-weight:500;padding:2px 10px}.OneBots section.config textarea[data-v-ec68e45c]{flex:auto;resize:none}.OneBots section.adapters[data-v-ec68e45c]{min-width:300px}.OneBots section.logs[data-v-ec68e45c]{flex:auto;display:flex;flex-direction:column}.OneBots section.logs pre[data-v-ec68e45c]{box-sizing:border-box;margin:0;word-break:break-all;white-space:pre-wrap;padding:6px;list-style:none;flex:auto;overflow:auto;background-color:#000;color:#fff}.OneBots section.logs .input-wrapper[data-v-ec68e45c]{position:relative;background-color:#000;padding:0 6px;height:22px;box-sizing:border-box}.OneBots section.logs .input-wrapper .text[data-v-ec68e45c]{color:#0000;z-index:1;position:absolute;pointer-events:none;display:inline-flex;width:100%;height:100%;left:6px;top:0}.OneBots section.logs .input-wrapper .text[data-v-ec68e45c]:after{content:" ";display:block;height:100%;width:5px;z-index:1;background-color:#fff;animation:pointer-ec68e45c 1s infinite steps(1,start)}.OneBots section.logs .input-wrapper input[data-v-ec68e45c]{border:0;display:inline-block;background-color:transparent;width:100%;color:#fff;height:22px;padding:0;padding-block:0;padding-inline:0;margin:0}.OneBots section.logs .input-wrapper input[data-v-ec68e45c]:focus{outline:none;caret-color:transparent}.OneBots section h2[data-v-ec68e45c]{position:sticky;margin-block-start:0;background-color:#f0f8ff;top:0}@keyframes pointer-ec68e45c{0%,to{opacity:0}50%{opacity:1}}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author : yangwenfan
|
|
3
|
+
* @Date : 2021-03-18 18:32:41
|
|
4
|
+
* @LastEditors : yangwenfan
|
|
5
|
+
* @LastEditTime : 2022-01-18 14:07:34
|
|
6
|
+
* @Description :
|
|
7
|
+
* @FilePath : \sass-web\public\index.html
|
|
8
|
+
-->
|
|
9
|
+
<!DOCTYPE html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8">
|
|
13
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
14
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
15
|
+
<title>OneBots</title>
|
|
16
|
+
<style>
|
|
17
|
+
body{margin: 0}
|
|
18
|
+
</style>
|
|
19
|
+
<script type="module" crossorigin src="/assets/index--pKafL3b.js"></script>
|
|
20
|
+
<link rel="stylesheet" crossorigin href="/assets/index-H3-fKIdb.css">
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<noscript>
|
|
24
|
+
<strong>We're sorry but OneBots doesn't work properly without JavaScript enabled. Please enable it to
|
|
25
|
+
continue.</strong>
|
|
26
|
+
</noscript>
|
|
27
|
+
<div id="app"></div>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -96,7 +96,10 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
96
96
|
createOneBot(uin, protocol, versions) {
|
|
97
97
|
const oneBot = super.createOneBot(uin, protocol, versions);
|
|
98
98
|
__classPrivateFieldSet(this, _IcqqAdapter_password, this.app.config[`icqq.${uin}`].password, "f");
|
|
99
|
-
oneBot.internal = new icqq_1.Client((0, utils_1.deepMerge)(protocol, (0, utils_1.deepClone)(
|
|
99
|
+
oneBot.internal = new icqq_1.Client((0, utils_1.deepMerge)(protocol, (0, utils_1.deepClone)({
|
|
100
|
+
...exports.defaultIcqqConfig,
|
|
101
|
+
log_level: this.app.config.log_level
|
|
102
|
+
})));
|
|
100
103
|
return oneBot;
|
|
101
104
|
}
|
|
102
105
|
formatEventPayload(version, event, data) {
|
|
@@ -207,8 +210,8 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
207
210
|
toCqcode(version, messageArr) {
|
|
208
211
|
return [].concat(messageArr).map(item => {
|
|
209
212
|
if (item.type === 'text')
|
|
210
|
-
return item.data.text;
|
|
211
|
-
const dataStr = Object.entries(item.data).map(([key, value]) => {
|
|
213
|
+
return item.data?.text || item.text;
|
|
214
|
+
const dataStr = Object.entries(item.data || item).map(([key, value]) => {
|
|
212
215
|
// is Buffer
|
|
213
216
|
if (value instanceof Buffer)
|
|
214
217
|
return `${key}=${value.toString('base64')}`;
|
|
@@ -219,7 +222,7 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
219
222
|
if (value instanceof Array)
|
|
220
223
|
return `${key}=${value.map(v => JSON.stringify(v)).join(',')}`;
|
|
221
224
|
// is String
|
|
222
|
-
return `${key}=${item.data[key]}`;
|
|
225
|
+
return `${key}=${item.data?.[key] || item[key]}`;
|
|
223
226
|
});
|
|
224
227
|
return `[CQ:${item.type},${dataStr.join(',')}]`;
|
|
225
228
|
}).join('');
|
|
@@ -251,15 +254,17 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
251
254
|
if (input === '1') {
|
|
252
255
|
this.sendSmsCode();
|
|
253
256
|
_this.logger.mark('请输入短信验证码:');
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
+
const terminalInputHandler = (buf) => {
|
|
258
|
+
client.submitSmsCode(buf.toString().trim());
|
|
259
|
+
};
|
|
260
|
+
process_1.default.stdin.once('data', terminalInputHandler);
|
|
257
261
|
}
|
|
258
262
|
else {
|
|
259
263
|
_this.logger.mark(`请前往:${e.url} 完成验证后回车继续`);
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
264
|
+
const terminalInputHandler = () => {
|
|
265
|
+
client.login();
|
|
266
|
+
};
|
|
267
|
+
process_1.default.stdin.once('data', terminalInputHandler);
|
|
263
268
|
}
|
|
264
269
|
});
|
|
265
270
|
disposeArr.push(() => {
|
package/lib/adapters/qq/index.js
CHANGED
|
@@ -26,7 +26,6 @@ class QQAdapter extends adapter_1.Adapter {
|
|
|
26
26
|
}
|
|
27
27
|
qqBot.stop();
|
|
28
28
|
};
|
|
29
|
-
const _this = this;
|
|
30
29
|
const messageHandler = (event) => {
|
|
31
30
|
this.emit('message.receive', oneBot.uin, event);
|
|
32
31
|
};
|
|
@@ -73,10 +72,13 @@ class QQAdapter extends adapter_1.Adapter {
|
|
|
73
72
|
text: item
|
|
74
73
|
}
|
|
75
74
|
};
|
|
76
|
-
const { type,
|
|
75
|
+
const { type, data, ...other } = item;
|
|
77
76
|
return {
|
|
78
77
|
type,
|
|
79
|
-
data
|
|
78
|
+
data: {
|
|
79
|
+
...data,
|
|
80
|
+
...other
|
|
81
|
+
}
|
|
80
82
|
};
|
|
81
83
|
});
|
|
82
84
|
}
|
|
@@ -125,7 +127,7 @@ class QQAdapter extends adapter_1.Adapter {
|
|
|
125
127
|
formatEventPayload(version, event, data) {
|
|
126
128
|
const result = {
|
|
127
129
|
id: data.id,
|
|
128
|
-
type: event,
|
|
130
|
+
[version === 'V12' ? 'type' : 'post_type']: event,
|
|
129
131
|
version: version,
|
|
130
132
|
self: {
|
|
131
133
|
platform: 'qq',
|
|
@@ -133,6 +135,7 @@ class QQAdapter extends adapter_1.Adapter {
|
|
|
133
135
|
},
|
|
134
136
|
detail_type: data.message_type || data.notice_type || data.request_type,
|
|
135
137
|
platform: 'qq',
|
|
138
|
+
time: data.timestamp,
|
|
136
139
|
...data,
|
|
137
140
|
};
|
|
138
141
|
delete result.bot;
|
package/lib/bin.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
7
|
const app_1 = require("./server/app");
|
|
5
|
-
const
|
|
8
|
+
const process_1 = __importDefault(require("process"));
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
10
|
+
const execArgv = process_1.default.argv.splice(2);
|
|
11
|
+
let cp;
|
|
12
|
+
if (process_1.default.env.TS_NODE_DEV) {
|
|
13
|
+
cp = (0, child_process_1.exec)('vite');
|
|
14
|
+
cp.stdout.on('data', (data) => {
|
|
15
|
+
console.log(data);
|
|
16
|
+
});
|
|
17
|
+
cp.stderr.on('data', e => {
|
|
18
|
+
console.error(e);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
6
21
|
const obj = {};
|
|
7
22
|
for (let i = 0; i < execArgv.length; i += 2) {
|
|
8
23
|
const key = execArgv[i];
|
|
@@ -22,4 +37,4 @@ if (obj['-r']) {
|
|
|
22
37
|
app_1.App.registerAdapter(adapter);
|
|
23
38
|
}
|
|
24
39
|
}
|
|
25
|
-
(0, app_1.createOnebots)(obj['-c']).start();
|
|
40
|
+
(0, app_1.createOnebots)(obj['-c'], cp).start();
|
package/lib/config.sample.yaml
CHANGED
package/lib/db.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
private readonly path;
|
|
1
|
+
export declare class JsonDB {
|
|
2
|
+
private readonly filePath;
|
|
4
3
|
private data;
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
constructor(filePath: string);
|
|
5
|
+
private init;
|
|
6
|
+
private write;
|
|
7
|
+
private read;
|
|
8
|
+
findIndex<T>(route: string, predicate: (value: T, index: number, obj: T[]) => unknown): number;
|
|
9
|
+
indexOf<T>(route: string, item: T): number;
|
|
10
|
+
get<T>(route: string, initialValue?: T): T | undefined;
|
|
11
|
+
set<T>(route: string, data: T): T;
|
|
12
|
+
delete(route: string): boolean;
|
|
13
|
+
private getArray;
|
|
14
|
+
unshift<T>(route: string, ...data: T[]): number;
|
|
15
|
+
shift<T>(route: string): T;
|
|
16
|
+
push<T>(route: string, ...data: T[]): number;
|
|
17
|
+
pop<T>(route: string): T;
|
|
18
|
+
splice<T>(route: string, index?: number, deleteCount?: number, ...data: T[]): T[];
|
|
19
|
+
find<T>(route: string, callback: (item: T) => boolean): T | undefined;
|
|
20
|
+
filter<T>(route: string, callback: (item: T) => boolean): T[];
|
|
16
21
|
}
|
package/lib/db.js
CHANGED
|
@@ -1,58 +1,149 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
26
|
+
exports.JsonDB = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const utils_1 = require("./utils");
|
|
30
|
+
class JsonDB {
|
|
31
|
+
constructor(filePath) {
|
|
32
|
+
this.filePath = filePath;
|
|
9
33
|
this.data = {};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
34
|
+
const dir = path.dirname(this.filePath);
|
|
35
|
+
if (fs.existsSync(dir))
|
|
36
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
37
|
+
if (!this.filePath.endsWith('.jsondb'))
|
|
38
|
+
this.filePath = this.filePath + '.jsondb';
|
|
39
|
+
if (!fs.existsSync(this.filePath))
|
|
40
|
+
this.write();
|
|
41
|
+
this.init();
|
|
15
42
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
43
|
+
init() {
|
|
44
|
+
this.read();
|
|
45
|
+
}
|
|
46
|
+
write() {
|
|
47
|
+
fs.writeFileSync(this.filePath, (0, utils_1.stringifyObj)(this.data), 'utf8');
|
|
48
|
+
}
|
|
49
|
+
read() {
|
|
50
|
+
this.data = (0, utils_1.parseObjFromStr)(fs.readFileSync(this.filePath, 'utf8'));
|
|
51
|
+
}
|
|
52
|
+
findIndex(route, predicate) {
|
|
53
|
+
const arr = this.getArray(route);
|
|
54
|
+
return arr.findIndex(predicate);
|
|
55
|
+
}
|
|
56
|
+
indexOf(route, item) {
|
|
57
|
+
return this.findIndex(route, (value) => value === item);
|
|
58
|
+
}
|
|
59
|
+
get(route, initialValue) {
|
|
60
|
+
this.read();
|
|
61
|
+
const parentPath = route.split('.');
|
|
62
|
+
const key = parentPath.pop();
|
|
63
|
+
if (!key)
|
|
64
|
+
return this.data;
|
|
65
|
+
let temp = this.data;
|
|
66
|
+
while (parentPath.length) {
|
|
67
|
+
const currentKey = parentPath.shift();
|
|
68
|
+
if (!Reflect.has(temp, currentKey))
|
|
69
|
+
Reflect.set(temp, key, {});
|
|
70
|
+
temp = Reflect.get(temp, currentKey);
|
|
23
71
|
}
|
|
72
|
+
if (temp[key] !== undefined)
|
|
73
|
+
return temp[key];
|
|
74
|
+
temp[key] = initialValue;
|
|
75
|
+
this.write();
|
|
76
|
+
return initialValue;
|
|
77
|
+
}
|
|
78
|
+
set(route, data) {
|
|
79
|
+
const parentPath = route.split('.');
|
|
80
|
+
const key = parentPath.pop();
|
|
81
|
+
if (!key)
|
|
82
|
+
throw new SyntaxError(`route can't empty`);
|
|
83
|
+
const parentObj = this.get(parentPath.join('.'), {});
|
|
84
|
+
if (!parentObj)
|
|
85
|
+
throw new SyntaxError(`can't set property ${key} of undefined`);
|
|
86
|
+
parentObj[key] = data;
|
|
87
|
+
this.write();
|
|
88
|
+
return data;
|
|
89
|
+
}
|
|
90
|
+
delete(route) {
|
|
91
|
+
const parentPath = route.split('.');
|
|
92
|
+
const key = parentPath.pop();
|
|
93
|
+
if (!key)
|
|
94
|
+
throw new SyntaxError(`route can't empty`);
|
|
95
|
+
const parentObj = this.get(parentPath.join('.'), {});
|
|
96
|
+
if (!parentObj)
|
|
97
|
+
throw new SyntaxError(`property ${key} is not exist of undefined`);
|
|
98
|
+
const result = delete parentObj[key];
|
|
99
|
+
this.write();
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
getArray(route) {
|
|
103
|
+
if (!route)
|
|
104
|
+
throw new Error(`route can't empty`);
|
|
105
|
+
const arr = this.get(route, []);
|
|
106
|
+
if (!arr)
|
|
107
|
+
throw new SyntaxError(`route ${route} is not define`);
|
|
108
|
+
if (!Array.isArray(arr))
|
|
109
|
+
throw new TypeError(`data ${route} is not an Array`);
|
|
110
|
+
return arr;
|
|
111
|
+
}
|
|
112
|
+
unshift(route, ...data) {
|
|
113
|
+
const arr = this.getArray(route);
|
|
114
|
+
const result = arr.unshift(...data);
|
|
115
|
+
this.write();
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
shift(route) {
|
|
119
|
+
const arr = this.getArray(route);
|
|
120
|
+
const result = arr.shift();
|
|
121
|
+
this.write();
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
push(route, ...data) {
|
|
125
|
+
const arr = this.getArray(route);
|
|
126
|
+
const result = arr.push(...data);
|
|
127
|
+
this.write();
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
pop(route) {
|
|
131
|
+
const arr = this.getArray(route);
|
|
132
|
+
const result = arr.pop();
|
|
133
|
+
this.write();
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
splice(route, index = 0, deleteCount = 0, ...data) {
|
|
137
|
+
const arr = this.getArray(route);
|
|
138
|
+
const result = arr.splice(index, deleteCount, ...data);
|
|
139
|
+
this.write();
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
find(route, callback) {
|
|
143
|
+
return this.getArray(route).find(callback);
|
|
24
144
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (typeof value !== "object")
|
|
28
|
-
return value;
|
|
29
|
-
const saveValue = () => {
|
|
30
|
-
this.set(key, value);
|
|
31
|
-
};
|
|
32
|
-
return new Proxy(value, {
|
|
33
|
-
set(target, k, v) {
|
|
34
|
-
const res = Reflect.set(target, k, v);
|
|
35
|
-
saveValue();
|
|
36
|
-
return res;
|
|
37
|
-
},
|
|
38
|
-
deleteProperty(target, p) {
|
|
39
|
-
const res = Reflect.deleteProperty(target, p);
|
|
40
|
-
saveValue();
|
|
41
|
-
return res;
|
|
42
|
-
},
|
|
43
|
-
defineProperty(target, p, r) {
|
|
44
|
-
const res = Reflect.defineProperty(target, p, r);
|
|
45
|
-
saveValue();
|
|
46
|
-
return res;
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
delete(key) {
|
|
51
|
-
return (0, shared_1.deleteValue)(this.data, key);
|
|
52
|
-
}
|
|
53
|
-
set(key, value) {
|
|
54
|
-
(0, shared_1.setValue)(this.data, key, value);
|
|
55
|
-
return (0, fs_1.writeFileSync)(this.path, JSON.stringify(this.data, null, 2), "utf-8");
|
|
145
|
+
filter(route, callback) {
|
|
146
|
+
return this.getArray(route).filter(callback);
|
|
56
147
|
}
|
|
57
148
|
}
|
|
58
|
-
exports.
|
|
149
|
+
exports.JsonDB = JsonDB;
|
package/lib/onebot.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class OneBot<V extends OneBot.Version = OneBot.Version> extends E
|
|
|
14
14
|
readonly uin: string;
|
|
15
15
|
config: OneBot.Config[];
|
|
16
16
|
status: OneBotStatus;
|
|
17
|
+
avatar: string;
|
|
17
18
|
protected password: string;
|
|
18
19
|
internal?: any;
|
|
19
20
|
instances: (V11 | V12)[];
|
|
@@ -28,8 +29,8 @@ export declare class OneBot<V extends OneBot.Version = OneBot.Version> extends E
|
|
|
28
29
|
dispatch(event: any, data: any): Promise<void>;
|
|
29
30
|
}
|
|
30
31
|
export declare enum OneBotStatus {
|
|
31
|
-
Good =
|
|
32
|
-
Bad =
|
|
32
|
+
Good = "good",
|
|
33
|
+
Bad = "bad",
|
|
33
34
|
Online = "online"
|
|
34
35
|
}
|
|
35
36
|
export declare namespace OneBot {
|
package/lib/onebot.js
CHANGED
|
@@ -89,8 +89,8 @@ exports.OneBot = OneBot;
|
|
|
89
89
|
_OneBot_logger = new WeakMap();
|
|
90
90
|
var OneBotStatus;
|
|
91
91
|
(function (OneBotStatus) {
|
|
92
|
-
OneBotStatus[
|
|
93
|
-
OneBotStatus[
|
|
92
|
+
OneBotStatus["Good"] = "good";
|
|
93
|
+
OneBotStatus["Bad"] = "bad";
|
|
94
94
|
OneBotStatus["Online"] = "online";
|
|
95
95
|
})(OneBotStatus || (exports.OneBotStatus = OneBotStatus = {}));
|
|
96
96
|
(function (OneBot) {
|