2024-04-07 03:29:13 +08:00
|
|
|
|
function __vite__mapDeps(indexes) {
|
|
|
|
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
|
|
|
__vite__mapDeps.viteFileDeps = []
|
|
|
|
|
}
|
|
|
|
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* @vue/shared v3.4.21
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
* @license MIT
|
2024-04-07 07:42:52 +08:00
|
|
|
|
**/function Va(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const Ce={},Tn=[],rt=()=>{},Q1=()=>!1,Ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ua=e=>e.startsWith("onUpdate:"),Pe=Object.assign,qa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},X1=Object.prototype.hasOwnProperty,ce=(e,t)=>X1.call(e,t),X=Array.isArray,Ln=e=>bl(e)==="[object Map]",gi=e=>bl(e)==="[object Set]",ne=e=>typeof e=="function",Re=e=>typeof e=="string",Fn=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",yi=e=>(we(e)||ne(e))&&ne(e.then)&&ne(e.catch),bi=Object.prototype.toString,bl=e=>bi.call(e),Z1=e=>bl(e).slice(8,-1),wi=e=>bl(e)==="[object Object]",Ga=e=>Re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,An=Va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wl=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},e2=/-(\w)/g,ht=wl(e=>e.replace(e2,(t,n)=>n?n.toUpperCase():"")),t2=/\B([A-Z])/g,Vn=wl(e=>e.replace(t2,"-$1").toLowerCase()),Ls=wl(e=>e.charAt(0).toUpperCase()+e.slice(1)),Dl=wl(e=>e?`on${Ls(e)}`:""),Xt=(e,t)=>!Object.is(e,t),Hl=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},cl=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},n2=e=>{const t=parseFloat(e);return isNaN(t)?e:t},s2=e=>{const t=Re(e)?Number(e):NaN;return isNaN(t)?e:t};let Uo;const ki=()=>Uo||(Uo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Wa(e){if(X(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],l=Re(s)?r2(s):Wa(s);if(l)for(const a in l)t[a]=l[a]}return t}else if(Re(e)||we(e))return e}const l2=/;(?![^(]*\))/g,a2=/:([^]+)/,o2=/\/\*[^]*?\*\//g;function r2(e){const t={};return e.replace(o2,"").split(l2).forEach(n=>{if(n){const s=n.split(a2);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ka(e){let t="";if(Re(e))t=e;else if(X(e))for(let n=0;n<e.length;n++){const s=Ka(e[n]);s&&(t+=s+" ")}else if(we(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const i2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",c2=Va(i2);function _i(e){return!!e||e===""}const Bl=e=>Re(e)?e:e==null?"":X(e)||we(e)&&(e.toString===bi||!ne(e.toString))?JSON.stringify(e,Ei,2):String(e),Ei=(e,t)=>t&&t.__v_isRef?Ei(e,t.value):Ln(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,l],a)=>(n[jl(s,a)+" =>"]=l,n),{})}:gi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>jl(n))}:Fn(t)?jl(t):we(t)&&!X(t)&&!wi(t)?String(t):t,jl=(e,t="")=>{var n;return Fn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
2024-04-07 03:29:13 +08:00
|
|
|
|
* @vue/reactivity v3.4.21
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
* @license MIT
|
2024-04-07 07:42:52 +08:00
|
|
|
|
**/let tt;class u2{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=tt,!t&&tt&&(this.index=(tt.scopes||(tt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=tt;try{return tt=this,t()}finally{tt=n}}}on(){tt=this}off(){tt=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 l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0,this._active=!1}}}function f2(e,t=tt){t&&t.active&&t.effects.push(e)}function Ci(){return tt}function p2(e){tt&&tt.cleanups.push(e)}let pn;class Ya{constructor(t,n,s,l){this.fn=t,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,f2(this,l)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,hn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(d2(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),vn()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Yt,n=pn;try{return Yt=!0,pn=this,this._runnings++,qo(this),this.fn()}finally{Go(this),this._runnings--,pn=n,Yt=t}}stop(){var t;this.active&&(qo(this),Go(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function d2(e){return e.value}function qo(e){e._trackId++,e._depsLength=0}function Go(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)xi(e.deps[t],e);e.deps.length=e._depsLength}}function xi(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Yt=!0,ha=0;const Si=[];function hn(){Si.push(Yt),Yt=!1}function vn(){const e=Si.pop();Yt=e===void 0?!0:e}function Ja(){ha++}function Qa(){for(ha--;!ha&&va.length;)va.shift()()}function Ti(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&xi(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const va=[];function Li(e,t,n){Ja();for(const s of e.keys()){let l;s._dirtyLevel<t&&(l??(l=e.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s._dirtyLevel=t),s._shouldSchedule&&(l??(l=e.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==2&&(s._shouldSchedule=!1,s.scheduler&&va.push(s.scheduler)))}Qa()}const Ai=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ul=new WeakMap,dn=Symbol(""),ma=Symbol("");function Qe(e,t,n){if(Yt&&pn){let s=ul.get(e);s||ul.set(e,s=new Map);let l=s.get(n);l||s.set(n,l=Ai(()=>s.delete(n))),Ti(pn,l)}}function Pt(e,t,n,s,l,a){const o=ul.get(e);if(!o)return;let i=[];if(t==="clear")i=[...o.values()];else if(n==="length"&&X(e)){const c=Number(s);o.forEach((u,f)=>{(f==="length"||!Fn(f)&&f>=c)&&i.push(u)})}else switch(n!==void 0&&i.push(o.get(n)),t){case"add":X(e)?Ga(n)&&i.push(o.get("length")):(i.push(o.get(dn)),Ln(e)&&i.push(o.get(ma)));break;case"delete":X(e)||(i.push(o.get(dn)),Ln(e)&&i.push(o.get(ma)));break;case"set":Ln(e)&&i.push(o.get(dn));break}Ja();for(const c of i)c&&Li(c,4);Qa()}function h2(e,t){var n;return(n=ul.get(e))==null?void 0:n.get(t)}const v2=Va("__proto__,__v_isRef,__isVue"),$i=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fn)),Wo=m2();function m2(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=oe(this);for(let a=0,o=this.length;a<o;a++)Qe(s,"get",a+"");const l=s[t](...n);return l===-1||l===!1?s[t](...n.map(oe)):l}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){hn(),Ja();const s=oe(this)[t].apply(this,n);return Qa(),vn(),s}}),e}function g2(e){const t=oe(this);return Qe(t,"has",e),t.hasOwnProperty(e)}class Ii{constructor(t=!1,n=!1){t
|
2024-04-07 03:29:13 +08:00
|
|
|
|
* @vue/runtime-core v3.4.21
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
* @license MIT
|
2024-04-07 07:42:52 +08:00
|
|
|
|
**/function Qt(e,t,n,s){try{return s?e(...s):e()}catch(l){$s(l,t,n)}}function ct(e,t,n,s){if(ne(e)){const a=Qt(e,t,n,s);return a&&yi(a)&&a.catch(o=>{$s(o,t,n)}),a}const l=[];for(let a=0;a<e.length;a++)l.push(ct(e[a],t,n,s));return l}function $s(e,t,n,s=!0){const l=t?t.vnode:null;if(t){let a=t.parent;const o=t.proxy,i=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,o,i)===!1)return}a=a.parent}const c=t.appContext.config.errorHandler;if(c){Qt(c,null,10,[e,o,i]);return}}j2(e,n,l,s)}function j2(e,t,n,s=!0){console.error(e)}let hs=!1,ga=!1;const ze=[];let Tt=0;const In=[];let Ut=null,cn=0;const Fi=Promise.resolve();let lo=null;function Rt(e){const t=lo||Fi;return e?t.then(this?e.bind(this):e):t}function z2(e){let t=Tt+1,n=ze.length;for(;t<n;){const s=t+n>>>1,l=ze[s],a=vs(l);a<e||a===e&&l.pre?t=s+1:n=s}return t}function _l(e){(!ze.length||!ze.includes(e,hs&&e.allowRecurse?Tt+1:Tt))&&(e.id==null?ze.push(e):ze.splice(z2(e.id),0,e),Vi())}function Vi(){!hs&&!ga&&(ga=!0,lo=Fi.then(Ui))}function F2(e){const t=ze.indexOf(e);t>Tt&&ze.splice(t,1)}function V2(e){X(e)?In.push(...e):(!Ut||!Ut.includes(e,e.allowRecurse?cn+1:cn))&&In.push(e),Vi()}function Xo(e,t,n=hs?Tt+1:0){for(;n<ze.length;n++){const s=ze[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;ze.splice(n,1),n--,s()}}}function pl(e){if(In.length){const t=[...new Set(In)].sort((n,s)=>vs(n)-vs(s));if(In.length=0,Ut){Ut.push(...t);return}for(Ut=t,cn=0;cn<Ut.length;cn++)Ut[cn]();Ut=null,cn=0}}const vs=e=>e.id==null?1/0:e.id,U2=(e,t)=>{const n=vs(e)-vs(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ui(e){ga=!1,hs=!0,ze.sort(U2);try{for(Tt=0;Tt<ze.length;Tt++){const t=ze[Tt];t&&t.active!==!1&&Qt(t,null,14)}}finally{Tt=0,ze.length=0,pl(),hs=!1,lo=null,(ze.length||In.length)&&Ui()}}function q2(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ce;let l=n;const a=t.startsWith("update:"),o=a&&t.slice(7);if(o&&o in s){const f=`${o==="modelValue"?"model":o}Modifiers`,{number:p,trim:d}=s[f]||Ce;d&&(l=n.map(h=>Re(h)?h.trim():h)),p&&(l=n.map(n2))}let i,c=s[i=Dl(t)]||s[i=Dl(ht(t))];!c&&a&&(c=s[i=Dl(Vn(t))]),c&&ct(c,e,6,l);const u=s[i+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ct(u,e,6,l)}}function qi(e,t,n=!1){const s=t.emitsCache,l=s.get(e);if(l!==void 0)return l;const a=e.emits;let o={},i=!1;if(!ne(e)){const c=u=>{const f=qi(u,t,!0);f&&(i=!0,Pe(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!a&&!i?(we(e)&&s.set(e,null),null):(X(a)?a.forEach(c=>o[c]=null):Pe(o,a),we(e)&&s.set(e,o),o)}function El(e,t){return!e||!Ts(t)?!1:(t=t.slice(2).replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,Vn(t))||ce(e,t))}let it=null,Cl=null;function dl(e){const t=it;return it=e,Cl=e&&e.type.__scopeId||null,t}function Gi(e){Cl=e}function Wi(){Cl=null}function G2(e,t=it,n){if(!t||e._n)return e;const s=(...l)=>{s._d&&ur(-1);const a=dl(t);let o;try{o=e(...l)}finally{dl(a),s._d&&ur(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function zl(e){const{type:t,vnode:n,proxy:s,withProxy:l,props:a,propsOptions:[o],slots:i,attrs:c,emit:u,render:f,renderCache:p,data:d,setupState:h,ctx:m,inheritAttrs:_}=e;let b,y;const C=dl(e);try{if(n.shapeFlag&4){const S=l||s,R=S;b=bt(f.call(R,S,p,a,h,d,m)),y=c}else{const S=t;b=bt(S.length>1?S(a,{attrs:c,slots:i,emit:u}):S(a,null)),y=t.props?c:W2(c)}}catch(S){is.length=0,$s(S,e,1),b=Ie(pt)}let w=b;if(y&&_!==!1){const S=Object.keys(y),{shapeFlag:R}=w;S.length&&R&7&&(o&&S.some(Ua)&&(y=K2(y,o)),w=Zt(w,y))}return n.dirs&&(w=Zt(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),b=w,dl(C),b}const W2=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ts(n))&&((t||(t={}))[n]=e[n]);return t},K2=(e,t)=>{const n={};for(const s in e)(!Ua(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Y2(e,t,n){const{props:s,children:l,component:a}=e,{props:o,children:i,patchFlag:c}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)retu
|
2024-04-07 03:29:13 +08:00
|
|
|
|
* @vue/runtime-dom v3.4.21
|
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
|
* @license MIT
|
2024-04-08 10:05:16 +08:00
|
|
|
|
**/const Y0="http://www.w3.org/2000/svg",J0="http://www.w3.org/1998/Math/MathML",Wt=typeof document<"u"?document:null,hr=Wt&&Wt.createElement("template"),Q0={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 l=t==="svg"?Wt.createElementNS(Y0,e):t==="mathml"?Wt.createElementNS(J0,e):Wt.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&l.setAttribute("multiple",s.multiple),l},createText:e=>Wt.createTextNode(e),createComment:e=>Wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,l,a){const o=n?n.previousSibling:t.lastChild;if(l&&(l===a||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),n),!(l===a||!(l=l.nextSibling)););else{hr.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const i=hr.content;if(s==="svg"||s==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},jt="transition",Xn="animation",Dn=Symbol("_vtc"),en=(e,{slots:t})=>r(l0,Ec(e),t);en.displayName="Transition";const _c={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},X0=en.props=Pe({},Zi,_c),on=(e,t=[])=>{X(e)?e.forEach(n=>n(...t)):e&&e(...t)},vr=e=>e?X(e)?e.some(t=>t.length>1):e.length>1:!1;function Ec(e){const t={};for(const O in e)O in _c||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:s,duration:l,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:u=o,appearToClass:f=i,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=Z0(l),_=m&&m[0],b=m&&m[1],{onBeforeEnter:y,onEnter:C,onEnterCancelled:w,onLeave:S,onLeaveCancelled:R,onBeforeAppear:x=y,onAppear:N=C,onAppearCancelled:M=w}=t,Y=(O,Z,Te)=>{Vt(O,Z?f:i),Vt(O,Z?u:o),Te&&Te()},I=(O,Z)=>{O._isLeaving=!1,Vt(O,p),Vt(O,h),Vt(O,d),Z&&Z()},U=O=>(Z,Te)=>{const _e=O?N:C,q=()=>Y(Z,O,Te);on(_e,[Z,q]),mr(()=>{Vt(Z,O?c:a),Mt(Z,O?f:i),vr(_e)||gr(Z,s,_,q)})};return Pe(t,{onBeforeEnter(O){on(y,[O]),Mt(O,a),Mt(O,o)},onBeforeAppear(O){on(x,[O]),Mt(O,c),Mt(O,u)},onEnter:U(!1),onAppear:U(!0),onLeave(O,Z){O._isLeaving=!0;const Te=()=>I(O,Z);Mt(O,p),xc(),Mt(O,d),mr(()=>{O._isLeaving&&(Vt(O,p),Mt(O,h),vr(S)||gr(O,s,b,Te))}),on(S,[O,Te])},onEnterCancelled(O){Y(O,!1),on(w,[O])},onAppearCancelled(O){Y(O,!0),on(M,[O])},onLeaveCancelled(O){I(O),on(R,[O])}})}function Z0(e){if(e==null)return null;if(we(e))return[Gl(e.enter),Gl(e.leave)];{const t=Gl(e);return[t,t]}}function Gl(e){return s2(e)}function Mt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Dn]||(e[Dn]=new Set)).add(t)}function Vt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Dn];n&&(n.delete(t),n.size||(e[Dn]=void 0))}function mr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ef=0;function gr(e,t,n,s){const l=e._endId=++ef,a=()=>{l===e._endId&&s()};if(n)return setTimeout(a,n);const{type:o,timeout:i,propCount:c}=Cc(e,t);if(!o)return s();const u=o+"end";let f=0;const p=()=>{e.removeEventListener(u,d),a()},d=h=>{h.target===e&&++f>=c&&p()};setTimeout(()=>{f<c&&p()},i+1),e.addEventListener(u,d)}function Cc(e,t){const n=window.getComputedStyle(e),s=m=>(n[m]||"").split(", "),l=s(`${jt}Delay`),a=s(`${jt}Duration`),o=yr(l,a),i=s(`${Xn}Delay`),c=s(`${Xn}Duration`),u=yr(i,c);let f=null,p=0,d=0;t===jt?o>0&&(f=jt,p=o,d=a.length):t===Xn?u>0&&(f=Xn,p=u,d=c.length):(p=Math.max(o,u),f=p>0?o>u?jt:Xn:null,d=f?f===jt?a.length:c.length:0);const h=f===jt&&/\b(transform|all)(,|$)/.test(s(`${jt}Property`).toString());re
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<p>配置文件会在首次启动后生成,你可以在<code>config.yml</code>中修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>和<code>nickname</code>。如果不确定字段的含义,请不要修改(部分在自动生成配置文件中未列出,需手动添加)</p>
|
|
|
|
|
<div class="language-yaml" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token comment"># 生成文件的配置项</span>
|
|
|
|
|
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">"/"</span><span class="token punctuation">,</span> <span class="token string">""</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</span>
|
|
|
|
|
<span class="token key atrule">host</span><span class="token punctuation">:</span> 127.0.0.1 <span class="token comment"># 监听地址,默认为本机,若要对外开放请填写0.0.0.0或者你的公网IP</span>
|
|
|
|
|
<span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">20216</span> <span class="token comment"># 绑定端口</span>
|
|
|
|
|
<span class="token key atrule">nickname</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">"liteyuki"</span> <span class="token punctuation">]</span> <span class="token comment"># 机器人昵称</span>
|
|
|
|
|
<span class="token key atrule">superusers</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">"1919810"</span> <span class="token punctuation">]</span> <span class="token comment"># 超级用户</span>
|
|
|
|
|
|
|
|
|
|
<span class="token comment"># 未列出的配置项(如要自定义请手动修改)</span>
|
|
|
|
|
<span class="token key atrule">onebot_access_token</span><span class="token punctuation">:</span> <span class="token string">""</span> <span class="token comment"># 访问令牌,对公网开放时建议设置</span>
|
|
|
|
|
<span class="token key atrule">default_language</span><span class="token punctuation">:</span> <span class="token string">"zh-CN"</span> <span class="token comment"># 默认语言,支持i18n部分语言和自行扩展的语言代码</span>
|
|
|
|
|
<span class="token key atrule">log_level</span><span class="token punctuation">:</span> <span class="token string">"INFO"</span> <span class="token comment"># 日志等级</span>
|
|
|
|
|
<span class="token key atrule">log_icon</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 是否显示日志等级图标(某些控制台字体不可用)</span>
|
|
|
|
|
<span class="token key atrule">auto_report</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 是否自动上报问题给轻雪服务器,仅包含硬件信息和运行软件版本</span>
|
|
|
|
|
<span class="token key atrule">fake_device_info</span><span class="token punctuation">:</span> <span class="token comment"># 统计卡片显示的虚假设备信息,用于保护隐私</span>
|
|
|
|
|
<span class="token key atrule">cpu</span><span class="token punctuation">:</span>
|
|
|
|
|
<span class="token key atrule">brand</span><span class="token punctuation">:</span> AMD
|
|
|
|
|
<span class="token key atrule">cores</span><span class="token punctuation">:</span> <span class="token number">16</span> <span class="token comment"># 物理核心数</span>
|
|
|
|
|
<span class="token key atrule">logical_cores</span><span class="token punctuation">:</span> <span class="token number">32</span> <span class="token comment"># 逻辑核心数</span>
|
|
|
|
|
<span class="token key atrule">frequency</span><span class="token punctuation">:</span> <span class="token number">3600</span> <span class="token comment"># CPU主频:MHz</span>
|
|
|
|
|
<span class="token key atrule">mem</span><span class="token punctuation">:</span>
|
|
|
|
|
<span class="token key atrule">total</span><span class="token punctuation">:</span> <span class="token number">32768000000</span> <span class="token comment"># 内存总数:字节</span>
|
|
|
|
|
<span class="token key atrule">alconna_use_command_start</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># alconna是否使用默认指令前缀,默认false</span>
|
|
|
|
|
<span class="token key atrule">alconna_auto_completion</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># alconna是否自动补全指令,默认false,建议开启</span>
|
|
|
|
|
|
|
|
|
|
<span class="token comment"># 其他Nonebot插件的配置项</span>
|
|
|
|
|
<span class="token key atrule">custom_config_1</span><span class="token punctuation">:</span> <span class="token string">"custom_value1"</span>
|
|
|
|
|
<span class="token key atrule">custom_config_2</span><span class="token punctuation">:</span> <span class="token string">"custom_value2"</span>
|
|
|
|
|
<span class="token punctuation">...</span>
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</code></pre></div>`,r:{minutes:2.12,words:636},t:"配置",i:"cog",O:2,y:"a"}}],["/deployment/fandq.html",{loader:()=>be(()=>import("./fandq.html-b6_6AGyP.js"),__vite__mapDeps([])),meta:{d:1711695504e3,c:"使用指南",g:["配置","部署"],e:`<h3>常见问题</h3>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<p>设备上Python环境太乱了,pip和python不对应怎么办?</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>请使用<code>/path/to/python -m pip install -r requirements.txt</code>来安装依赖,
|
|
|
|
|
然后用<code>/path/to/python main.py</code>来启动Bot,
|
|
|
|
|
其中<code>/path/to/python</code>是你要用来运行Bot的可执行文件</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<p>为什么我启动后机器人没有反应?</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>请检查配置文件的<code>command_start</code>或<code>superusers</code>,确认你有权限使用命令并按照正确的命令发送</li>
|
|
|
|
|
<li>确认命令头没有和<code>nickname{}</code>冲突,例如一个命令是<code>help</code>,但是<code>Bot</code>昵称有一个<code>help</code>,那么将会被解析为nickname而不是命令</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2024-04-07 07:24:41 +08:00
|
|
|
|
<p>更新轻雪失败,报错<code>InvalidGitRepositoryError</code></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>请正确安装<code>Git</code>,并使用克隆而非直接下载的方式部署轻雪</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<p>怎么登录聊天平台,例如QQ?</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>你有这个问题说明你不是很了解这个项目,本项目不负责实现登录功能,只负责处理和回应消息,登录功能由实现端(协议端)提供,
|
|
|
|
|
实现端本身不负责处理响应逻辑,将消息按照OneBot标准处理好上报给轻雪
|
|
|
|
|
你需要使用Onebot标准的实现端来连接到轻雪并将消息上报给轻雪,下面已经列出一些推荐的实现端</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<p><code>Playwright</code>安装失败</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>输入<code>playwright install</code>安装浏览器</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</ul>`,r:{minutes:2.01,words:604},t:"答疑",i:"question",O:3,y:"a"}}],["/deployment/install.html",{loader:()=>be(()=>import("./install.html-B6BbE5T7.js"),__vite__mapDeps([])),meta:{d:1711589926e3,c:"使用指南",g:["安装"],e:`<h3>设备要求</h3>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<ul>
|
|
|
|
|
<li>Windows系统版本最低<code>Windows10+</code>/<code>Windows Server 2019+</code></li>
|
|
|
|
|
<li>Linux系统要支持Python3.10+,推荐<code>Ubuntu 20.04+</code>/<code>CentOS 8+</code>(<s>别用你那b CentOS</s>)</li>
|
|
|
|
|
<li>CPU: 至少<code>1vCPU</code></li>
|
|
|
|
|
<li>内存: Bot无其他插件会占用<code>100MB</code>,其他插件占用视具体插件而定,建议<code>1GB</code>以上</li>
|
|
|
|
|
<li>硬盘: 至少<code>1GB</code>空间</li>
|
|
|
|
|
<li>GPU: 原生轻雪无需GPU,某些插件需要GPU支持,例如AI绘画之类的,具体查看插件文档</li>
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</ul>`,r:{minutes:.8,words:240},t:"安装",i:"download",O:1,y:"a"}}],["/store/",{loader:()=>be(()=>import("./index.html-Bc875A3N.js"),__vite__mapDeps([])),meta:{d:1712364501e3,r:{minutes:0,words:1},t:"",y:"a"}}],["/usage/",{loader:()=>be(()=>import("./index.html-CZGebOyj.js"),__vite__mapDeps([])),meta:{d:1711589926e3,c:"使用手册",r:{minutes:.06,words:17},t:"使用手册",i:"laptop-code",y:"a"}}],["/usage/agreement.html",{loader:()=>be(()=>import("./agreement.html-DQHFZfkV.js"),__vite__mapDeps([])),meta:{d:1711621856e3,c:"使用手册",e:`<ol>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<li>本项目遵循<code>MIT</code>协议,你可以自由使用,修改,分发,但是请保留原作者信息</li>
|
|
|
|
|
<li>你可以选择开启<code>auto_report</code>(默认开启),轻雪会收集以下内容
|
|
|
|
|
<ul>
|
|
|
|
|
<li>运行环境的设备信息:CPU,内存,系统信息,Python信息</li>
|
|
|
|
|
<li>插件信息(不含插件数据),</li>
|
|
|
|
|
<li>部分异常信息,</li>
|
|
|
|
|
<li>会话负载信息(不含隐私部分)
|
|
|
|
|
以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把<code>auto_report</code>设定为<code>false</code></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性</li>
|
|
|
|
|
<li>使用此项目代表你已经同意以上协议</li>
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</ol>`,r:{minutes:.75,words:226},t:"用户协议",i:"user-secret",O:3,y:"a"}}],["/usage/basic_command.html",{loader:()=>be(()=>import("./basic_command.html-Cp1fYXuR.js"),__vite__mapDeps([])),meta:{d:1711598703e3,c:"使用手册",e:`<h2>基础插件命令</h2>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<h4>命令前有[S]的表示仅超级用户可用,[O]和[A]分别为群主和群管可用,[P]为私聊可用</h4>
|
|
|
|
|
<h3>轻雪<code>liteyuki</code></h3>
|
|
|
|
|
<div class="language-bash" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token punctuation">[</span>S<span class="token punctuation">]</span>reload-liteyuki <span class="token comment"># 重载轻雪</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>update-liteyuki <span class="token comment"># 更新轻雪</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>liteecho <span class="token comment"># 查看当前bot</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>config <span class="token builtin class-name">set</span> <span class="token operator"><</span>key<span class="token operator">></span> value <span class="token comment"># 添加配置项,若存在则会覆盖,输入值会被执行,以便于转换为正确的值,"10"和10是不一样的</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>config get <span class="token punctuation">[</span>key<span class="token punctuation">]</span> <span class="token comment"># 查询配置项,不带key返回配置项列表,推荐私聊使用</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>reload-resources <span class="token comment"># 重载资源</span>
|
|
|
|
|
<span class="token punctuation">[</span>S<span class="token punctuation">]</span>switch-image-mode <span class="token comment"># 切换图片模式,该功能需要commit:505468b及以后的Lagrange.OneBot,在普通图片和Markdown图片之间切换,后者更大但有失败的可能</span>
|
|
|
|
|
liteyuki-docs <span class="token comment"># 查看轻雪文档</span>
|
|
|
|
|
<span class="token comment"># 上述两个命令修改的配置项在数据库中保存,但是优先级低于配置文件,如果配置文件中存在相同的配置项,将会使用配置文件中的配置</span>
|
|
|
|
|
------
|
|
|
|
|
别名: reload-liteyuki 重启轻雪, update-liteyuki 更新轻雪, reload-resources 重载资源, config 配置, <span class="token builtin class-name">set</span> 设置, get 查询,
|
|
|
|
|
switch-image-mode 切换图片模式, liteyuki-docs 轻雪文档
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</code></pre></div>`,r:{minutes:2.36,words:709},t:"基础命令",i:"comment",O:1,y:"a"}}],["/usage/extra_command.html",{loader:()=>be(()=>import("./extra_command.html-BTOPrMR5.js"),__vite__mapDeps([])),meta:{d:1711598703e3,c:"使用手册",e:`<h2>功能插件命令</h2>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<h3>轻雪天气<code>liteyuki_weather</code></h3>
|
|
|
|
|
<p>配置项</p>
|
|
|
|
|
<div class="language-yaml" data-ext="yml" data-title="yml"><pre class="language-yaml"><code>weather<span class="token punctuation">-</span>key <span class="token comment"># 和风天气的天气key</span>
|
|
|
|
|
</code></pre></div><p>命令</p>
|
|
|
|
|
<div class="language-bash" data-ext="sh" data-title="sh"><pre class="language-bash"><code>weather <span class="token operator"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># 查询目标地天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"</span>
|
|
|
|
|
bind-city <span class="token operator"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># 绑定查询城市,个人全局生效</span>
|
|
|
|
|
别名:weather 天气
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</code></pre></div>`,r:{minutes:.27,words:82},t:"功能命令",i:"comment",O:2,y:"a"}}],["/usage/resource_pack.html",{loader:()=>be(()=>import("./resource_pack.html-BLxVvC0l.js"),__vite__mapDeps([])),meta:{d:1712365801e3,c:"使用手册",e:`<h2>简介</h2>
|
2024-04-07 04:17:30 +08:00
|
|
|
|
<p>资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码</p>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<ul>
|
2024-04-07 04:17:30 +08:00
|
|
|
|
<li><a href="/store/" target="_blank">资源/主题商店</a>提供了一些资源包供你选择,你也可以自己制作资源包</li>
|
|
|
|
|
<li>资源包的制作很简单,如果你接触过<code>Minecraft</code>的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即刻,讲起打包成一个新的资源包。</li>
|
|
|
|
|
<li>部分内容制作需要一点点前端基础,例如<code>html</code>,<code>css</code></li>
|
|
|
|
|
<li>轻雪原版资源包请查看<code>LiteyukiBot/liteyuki/resources</code>,可以在此基础上进行修改</li>
|
2024-04-07 03:29:13 +08:00
|
|
|
|
<li>欢迎各位投稿资源包到轻雪资源商店</li>
|
2024-04-08 10:05:16 +08:00
|
|
|
|
</ul>`,r:{minutes:1.63,words:490},t:"资源包",i:"paint-brush",O:3,y:"a"}}],["/404.html",{loader:()=>be(()=>import("./404.html-DVJ-1dmD.js"),__vite__mapDeps([])),meta:{t:""}}],["/category/",{loader:()=>be(()=>import("./index.html-BPITf_Ny.js"),__vite__mapDeps([])),meta:{t:"分类",I:!1}}],["/category/%E9%83%A8%E7%BD%B2/",{loader:()=>be(()=>import("./index.html-Bp-vVbfF.js"),__vite__mapDeps([])),meta:{t:"部署 分类",I:!1}}],["/category/%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/",{loader:()=>be(()=>import("./index.html-DbfHB09l.js"),__vite__mapDeps([])),meta:{t:"使用指南 分类",I:!1}}],["/category/%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C/",{loader:()=>be(()=>import("./index.html-B7xVyFXi.js"),__vite__mapDeps([])),meta:{t:"使用手册 分类",I:!1}}],["/tag/",{loader:()=>be(()=>import("./index.html-BHpleQZz.js"),__vite__mapDeps([])),meta:{t:"标签",I:!1}}],["/tag/%E9%85%8D%E7%BD%AE/",{loader:()=>be(()=>import("./index.html-Dow2Y_uV.js"),__vite__mapDeps([])),meta:{t:"标签: 配置",I:!1}}],["/tag/%E9%83%A8%E7%BD%B2/",{loader:()=>be(()=>import("./index.html-C8cNG7Qi.js"),__vite__mapDeps([])),meta:{t:"标签: 部署",I:!1}}],["/tag/%E5%AE%89%E8%A3%85/",{loader:()=>be(()=>import("./index.html-CUEn1rQX.js"),__vite__mapDeps([])),meta:{t:"标签: 安装",I:!1}}],["/article/",{loader:()=>be(()=>import("./index.html-YM9DulNQ.js"),__vite__mapDeps([])),meta:{t:"文章",I:!1}}],["/star/",{loader:()=>be(()=>import("./index.html-aji3sEKR.js"),__vite__mapDeps([])),meta:{t:"星标",I:!1}}],["/timeline/",{loader:()=>be(()=>import("./index.html-CzLq6I25.js"),__vite__mapDeps([])),meta:{t:"时间轴",I:!1}}]]);/*!
|
2024-04-07 03:29:13 +08:00
|
|
|
|
* vue-router v4.3.0
|
|
|
|
|
* (c) 2024 Eduardo San Martin Morote
|
|
|
|
|
* @license MIT
|
2024-04-07 07:42:52 +08:00
|
|
|
|
*/const En=typeof document<"u";function Vf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const de=Object.assign;function Jl(e,t){const n={};for(const s in t){const l=t[s];n[s]=kt(l)?l.map(e):e(l)}return n}const us=()=>{},kt=Array.isArray,Mc=/#/g,Uf=/&/g,qf=/\//g,Gf=/=/g,Wf=/\?/g,Oc=/\+/g,Kf=/%5B/g,Yf=/%5D/g,Pc=/%5E/g,Jf=/%60/g,Rc=/%7B/g,Qf=/%7C/g,Nc=/%7D/g,Xf=/%20/g;function po(e){return encodeURI(""+e).replace(Qf,"|").replace(Kf,"[").replace(Yf,"]")}function Zf(e){return po(e).replace(Rc,"{").replace(Nc,"}").replace(Pc,"^")}function xa(e){return po(e).replace(Oc,"%2B").replace(Xf,"+").replace(Mc,"%23").replace(Uf,"%26").replace(Jf,"`").replace(Rc,"{").replace(Nc,"}").replace(Pc,"^")}function ep(e){return xa(e).replace(Gf,"%3D")}function tp(e){return po(e).replace(Mc,"%23").replace(Wf,"%3F")}function np(e){return e==null?"":tp(e).replace(qf,"%2F")}function bs(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const sp=/\/$/,lp=e=>e.replace(sp,"");function Ql(e,t,n="/"){let s,l={},a="",o="";const i=t.indexOf("#");let c=t.indexOf("?");return i<c&&i>=0&&(c=-1),c>-1&&(s=t.slice(0,c),a=t.slice(c+1,i>-1?i:t.length),l=e(a)),i>-1&&(s=s||t.slice(0,i),o=t.slice(i,t.length)),s=ip(s??t,n),{fullPath:s+(a&&"?")+a+o,path:s,query:l,hash:bs(o)}}function ap(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function $r(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function op(e,t,n){const s=t.matched.length-1,l=n.matched.length-1;return s>-1&&s===l&&Bn(t.matched[s],n.matched[l])&&Dc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Bn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Dc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!rp(e[n],t[n]))return!1;return!0}function rp(e,t){return kt(e)?Ir(e,t):kt(t)?Ir(t,e):e===t}function Ir(e,t){return kt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function ip(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),l=s[s.length-1];(l===".."||l===".")&&s.push("");let a=n.length-1,o,i;for(o=0;o<s.length;o++)if(i=s[o],i!==".")if(i==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+s.slice(o).join("/")}var ws;(function(e){e.pop="pop",e.push="push"})(ws||(ws={}));var fs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(fs||(fs={}));function cp(e){if(!e)if(En){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),lp(e)}const up=/^[^#]+#/;function fp(e,t){return e.replace(up,"#")+t}function pp(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Tl=()=>({left:window.scrollX,top:window.scrollY});function dp(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),l=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!l)return;t=pp(l,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Mr(e,t){return(history.state?history.state.position-t:-1)+e}const Sa=new Map;function hp(e,t){Sa.set(e,t)}function vp(e){const t=Sa.get(e);return Sa.delete(e),t}let mp=()=>location.protocol+"//"+location.host;function Hc(e,t){const{pathname:n,search:s,hash:l}=t,a=e.indexOf("#");if(a>-1){let i=l.includes(e.slice(a))?e.slice(a).length:1,c=l.slice(i);return c[0]!=="/"&&(c="/"+c),$r(c,"")}return $r(n,e)+s+l}function gp(e,t,n,s){let l=[],a=[],o=null;const i=({state:d})=>{const h=Hc(e,location),m=n.value,_=t.value;let b=0;if(d){if(n.value=h,t.value=d,o&&o===m){o=null;return}b=_?d.position-_.position:0}else s(h);l.forEach(y=>{y(n.value,m,{delta:b,type:ws.pop,direction:b?b>0?fs.forward:fs.back:fs.unknown})})};function c(){o=n.value}function u(d){l.push(d);const h=()=>{const m=l.indexOf(d);m>-1&&l.splice(m,1)};retur
|
2024-04-07 03:29:13 +08:00
|
|
|
|
* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
|
|
|
* @license MIT
|
2024-04-08 10:05:16 +08:00
|
|
|
|
*/const ie={settings:{minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'<div class="bar" role="bar"></div>'},status:null,set:e=>{const t=ie.isStarted();e=la(e,ie.settings.minimum,1),ie.status=e===1?null:e;const n=ie.render(!t),s=n.querySelector(ie.settings.barSelector),l=ie.settings.speed,a=ie.settings.easing;return n.offsetWidth,d3(o=>{sl(s,{transform:"translate3d("+Zr(e)+"%,0,0)",transition:"all "+l+"ms "+a}),e===1?(sl(n,{transition:"none",opacity:"1"}),n.offsetWidth,setTimeout(function(){sl(n,{transition:"all "+l+"ms linear",opacity:"0"}),setTimeout(function(){ie.remove(),o()},l)},l)):setTimeout(()=>o(),l)}),ie},isStarted:()=>typeof ie.status=="number",start:()=>{ie.status||ie.set(0);const e=()=>{setTimeout(()=>{ie.status&&(ie.trickle(),e())},ie.settings.trickleSpeed)};return ie.settings.trickle&&e(),ie},done:e=>!e&&!ie.status?ie:ie.inc(.3+.5*Math.random()).set(1),inc:e=>{let t=ie.status;return t?(typeof e!="number"&&(e=(1-t)*la(Math.random()*t,.1,.95)),t=la(t+e,0,.994),ie.set(t)):ie.start()},trickle:()=>ie.inc(Math.random()*ie.settings.trickleRate),render:e=>{if(ie.isRendered())return document.getElementById("nprogress");ei(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=ie.settings.template;const n=t.querySelector(ie.settings.barSelector),s=e?"-100":Zr(ie.status||0),l=document.querySelector(ie.settings.parent);return sl(n,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),l!==document.body&&ei(l,"nprogress-custom-parent"),l==null||l.appendChild(t),t},remove:()=>{ti(document.documentElement,"nprogress-busy"),ti(document.querySelector(ie.settings.parent),"nprogress-custom-parent");const e=document.getElementById("nprogress");e&&h3(e)},isRendered:()=>!!document.getElementById("nprogress")},la=(e,t,n)=>e<t?t:e>n?n:e,Zr=e=>(-1+e)*100,d3=function(){const e=[];function t(){const n=e.shift();n&&n(t)}return function(n){e.push(n),e.length===1&&t()}}(),sl=function(){const e=["Webkit","O","Moz","ms"],t={};function n(o){return o.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(i,c){return c.toUpperCase()})}function s(o){const i=document.body.style;if(o in i)return o;let c=e.length;const u=o.charAt(0).toUpperCase()+o.slice(1);let f;for(;c--;)if(f=e[c]+u,f in i)return f;return o}function l(o){return o=n(o),t[o]??(t[o]=s(o))}function a(o,i,c){i=l(i),o.style[i]=c}return function(o,i){for(const c in i){const u=i[c];u!==void 0&&Object.prototype.hasOwnProperty.call(i,c)&&a(o,c,u)}}}(),du=(e,t)=>(typeof e=="string"?e:_o(e)).indexOf(" "+t+" ")>=0,ei=(e,t)=>{const n=_o(e),s=n+t;du(n,t)||(e.className=s.substring(1))},ti=(e,t)=>{const n=_o(e);if(!du(e,t))return;const s=n.replace(" "+t+" "," ");e.className=s.substring(1,s.length-1)},_o=e=>(" "+(e.className||"")+" ").replace(/\s+/gi," "),h3=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},v3=()=>{pe(()=>{const e=gn(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||ie.start()}),e.afterEach(n=>{t.add(n.path),ie.done()})})},m3=Xe({setup(){v3()}}),g3=JSON.parse('{"encrypt":{"config":{"/demo/encrypt.html":["$2a$10$41W7j77yOU6MV1D839MWiOMqhQE8KPQhpMwGZJAEmjJO.IJcbdG5i"]}},"author":{"name":"远野千束","url":"https://snowykami.me"},"logo":"https://cdn.liteyuki.icu/static/img/liteyuki_icon_640.png","repo":"https://github.com/snowykami/LiteyukiBot","docsDir":"docs","footer":"LiteyukiBot","displayFooter":true,"locales":{"/":{"lang":"zh-CN","navbarLocales":{"langName":"简体中文","selectLangAriaLabel":"选择语言"},"metaLocales":{"author":"作者","date":"写作日期","origin":"原创","views":"访问量","category":"分类","tag":"标签","readingTime":"阅读时间","words":"字数","toc":"此页内容","prev":"上一页","next":"下一页","lastUpdated":"上次编辑于","contributors":"贡献者","editLink":"在 GitHub 上编辑此页","print":"打印"},"blogLocales":{"article":"文章","articleList":"文章列表","category":"分类","tag":"标签","timeline":"时间轴","timelineTitle":"昨日不在"
|
2024-04-07 07:42:52 +08:00
|
|
|
|
${s}}`)),t.appendChild(l)}},Z3=e=>{const t=vt(e),n={html:[],js:[],css:[],isLegal:!1};return["html","js","css"].forEach(s=>{const l=t.filter(a=>ai[s].types.includes(a));if(l.length){const a=l[0];n[s]=[e[a].replace(/^\n|\n$/g,""),ai[s].map[a]||a]}}),n.isLegal=(!n.html.length||n.html[1]==="none")&&(!n.js.length||n.js[1]==="none")&&(!n.css.length||n.css[1]==="none"),n},Pu=e=>e.replace(/<br \/>/g,"<br>").replace(/<((\S+)[^<]*?)\s+\/>/g,"<$1></$2>"),Ru=e=>`<div id="app">
|
|
|
|
|
${Pu(e)}
|
2024-04-07 03:29:13 +08:00
|
|
|
|
</div>`,e4=e=>`${e.replace("export default ","const $reactApp = ").replace(/App\.__style__(\s*)=(\s*)`([\s\S]*)?`/,"")};
|
2024-04-08 10:05:16 +08:00
|
|
|
|
ReactDOM.createRoot(document.getElementById("app")).render(React.createElement($reactApp))`,t4=e=>e.replace(/export\s+default\s*\{(\n*[\s\S]*)\n*\}\s*;?$/u,"Vue.createApp({$1}).mount('#app')").replace(/export\s+default\s*define(Async)?Component\s*\(\s*\{(\n*[\s\S]*)\n*\}\s*\)\s*;?$/u,"Vue.createApp({$1}).mount('#app')").trim(),Nu=e=>`(function(exports){var module={};module.exports=exports;${e};return module.exports.__esModule?module.exports.default:module.exports;})({})`,n4=(e,t)=>{const n=Eo(t),s=e.js[0]||"";return{...n,html:Pu(e.html[0]||""),js:s,css:e.css[0]||"",isLegal:e.isLegal,getScript:()=>{var l;return n.useBabel?((l=window.Babel.transform(s,{presets:["es2015"]}))==null?void 0:l.code)||"":s}}},s4=/<template>([\s\S]+)<\/template>/u,l4=/<script(\s*lang=(['"])(.*?)\2)?>([\s\S]+)<\/script>/u,a4=/<style(\s*lang=(['"])(.*?)\2)?\s*(?:scoped)?>([\s\S]+)<\/style>/u,o4=(e,t)=>{const n=Eo(t),s=e.html[0]||"",l=s4.exec(s),a=l4.exec(s),o=a4.exec(s),i=l?l[1].replace(/^\n|\n$/g,""):"",[c="",u=""]=a?[a[4].replace(/^\n|\n$/g,""),a[3]]:[],[f="",p=""]=o?[o[4].replace(/^\n|\n$/g,""),o[3]]:[],d=u===""&&(p===""||p==="css");return{...n,html:Ru(i),js:t4(c),css:f,isLegal:d,jsLib:[n.vue,...n.jsLib],getScript:()=>{var m,_;const h=t.useBabel?((_=(m=window.Babel)==null?void 0:m.transform(c,{presets:["es2015"]}))==null?void 0:_.code)||"":c.replace(/export\s+default/u,"return");return`const app=window.document.createElement('div');document.firstElementChild.appendChild(app);const appOptions=${Nu(h)};appOptions.template=\`${i.replace("`",'\\`"')}\`;window.Vue.createApp(appOptions).mount(app);`}}},r4=(e,t)=>{const n=Eo(t);return{...n,html:Ru(""),js:e4(e.js[0]||""),css:e.css[0]||(e.js[0]?e.js[0].replace(/App\.__style__(?:\s*)=(?:\s*)`([\s\S]*)?`/,"$1").trim():""),isLegal:e.isLegal,jsLib:[n.react,n.reactDOM,...n.jsLib],jsx:!0,getScript:()=>{var l,a;const s=((a=(l=window.Babel)==null?void 0:l.transform(e.js[0]||"",{presets:["es2015","react"]}))==null?void 0:a.code)||"";return`window.ReactDOM.createRoot(document.firstElementChild).render(window.React.createElement(${Nu(s)}))`}}},On={},i4=e=>Promise.all([Mn(On,e.babel),Mn(On,e.react),Mn(On,e.reactDOM)]),c4=e=>{const t=[Mn(On,e.vue)];return e.useBabel&&t.push(Mn(On,e.babel)),Promise.all(t)},u4=e=>e.useBabel?Mn(On,e.babel):Promise.resolve();var f4=H({name:"CodeDemo",props:{id:{type:String,required:!0},type:{type:String,default:"normal"},title:{type:String,default:""},config:{type:String,default:""},code:{type:String,required:!0}},slots:Object,setup(e,{slots:t}){const[n,s]=_s(!1),l=Ae(),a=Ae(),o=G("0"),i=G(!1),c=k(()=>JSON.parse(e.config?Wr(e.config):"{}")),u=k(()=>{const m=JSON.parse(Wr(e.code));return Z3(m)}),f=k(()=>e.type==="react"?r4(u.value,c.value):e.type==="vue"?o4(u.value,c.value):n4(u.value,c.value)),p=k(()=>f.value.isLegal),d=(m=!1)=>{const _=l.value.attachShadow({mode:"open"}),b=document.createElement("div");b.classList.add("code-demo-app"),_.appendChild(b),p.value?(m&&(b.innerHTML=f.value.html),Q3(_,f.value),X3(e.id,_,f.value),o.value="0"):o.value="auto",i.value=!0},h=()=>{switch(e.type){case"react":return i4(f.value).then(()=>d());case"vue":return c4(f.value).then(()=>d());default:return u4(f.value).then(()=>d(!0))}};return Se("beforeprint",()=>{s(!0)}),pe(()=>{setTimeout(()=>{h()},800)}),()=>{var m;return r("div",{class:"vp-code-demo",id:e.id},[r("div",{class:"vp-code-demo-header"},[f.value.isLegal?r("button",{type:"button",title:"toggle","aria-hidden":!0,class:["vp-code-demo-toggle-button",n.value?"down":"end"],onClick:()=>{o.value=n.value?"0":`${a.value.clientHeight+13.8}px`,s()}}):null,e.title?r("span",{class:"vp-code-demo-title"},decodeURIComponent(e.title)):null,f.value.isLegal&&f.value.jsfiddle!==!1?r("form",{class:"code-demo-jsfiddle",target:"_blank",action:"https://jsfiddle.net/api/post/library/pure/",method:"post"},[r("input",{type:"hidden",name:"html",value:f.value.html}),r("input",{type:"hidden",name:"js",value:f.value.js}),r("input",{type:"hidden",name:"css",value:f.value.css}),r("input",{type:"hidden",name:"wrap",value:"1"}),r("input",{type:"hidden",name:"panel_js",value:"3"}
|