const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuditView-DQw3Tihm.js","assets/mermaid-vendor-CgeO8NEs.js","assets/AuditView-yB7HIHDv.css","assets/GraphView-BemlfE03.js","assets/GraphView-BAuhQj5R.css","assets/HealthView-D1fBL4Km.js","assets/HealthView-BbCDO8IB.css","assets/ReviewQueueView-B29rVNnB.js","assets/ReviewQueueView-D1PXBL-8.css","assets/SharesView-DkQVTVQy.js","assets/SharesView-B4MuSLtX.css","assets/TablesView-BQ_Rqqzh.js","assets/TablesView-CE4k6td0.css","assets/TagsView-CyHKRuKG.js","assets/TagsView-B7XtL9iP.css","assets/TrashView-BwDran7f.js","assets/TrashView-BFSIJY0M.css"])))=>i.map(i=>d[i]); var pl=Object.defineProperty;var hl=(e,t,n)=>t in e?pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ao=(e,t,n)=>hl(e,typeof t!="symbol"?t+"":t,n);import{_ as Ue}from"./mermaid-vendor-CgeO8NEs.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const ml=(e,t,n)=>{const s=e[t];return s?typeof s=="function"?s():Promise.resolve(s):new Promise((o,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})};/** * @vue/shared v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function no(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const he={},sn=[],bt=()=>{},Ar=()=>!1,is=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ls=e=>e.startsWith("onUpdate:"),je=Object.assign,so=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},vl=Object.prototype.hasOwnProperty,ge=(e,t)=>vl.call(e,t),ee=Array.isArray,Kt=e=>Nn(e)==="[object Map]",At=e=>Nn(e)==="[object Set]",Oo=e=>Nn(e)==="[object Date]",re=e=>typeof e=="function",Ne=e=>typeof e=="string",wt=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Or=e=>(be(e)||re(e))&&re(e.then)&&re(e.catch),Pr=Object.prototype.toString,Nn=e=>Pr.call(e),gl=e=>Nn(e).slice(8,-1),Ir=e=>Nn(e)==="[object Object]",oo=e=>Ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=no(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),as=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},_l=/-\w/g,qe=as(e=>e.replace(_l,t=>t.slice(1).toUpperCase())),yl=/\B([A-Z])/g,Dt=as(e=>e.replace(yl,"-$1").toLowerCase()),cs=as(e=>e.charAt(0).toUpperCase()+e.slice(1)),ks=as(e=>e?`on${cs(e)}`:""),Fe=(e,t)=>!Object.is(e,t),Kn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},us=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Po;const fs=()=>Po||(Po=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ro(e){if(ee(e)){const t={};for(let n=0;n{if(n){const s=n.split(wl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function _e(e){let t="";if(Ne(e))t=e;else if(ee(e))for(let n=0;nOt(n,t))}const Mr=e=>!!(e&&e.__v_isRef===!0),N=e=>Ne(e)?e:e==null?"":ee(e)||be(e)&&(e.toString===Pr||!re(e.toString))?Mr(e)?N(e.value):JSON.stringify(e,Dr,2):String(e),Dr=(e,t)=>Mr(t)?Dr(e,t.value):Kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[Es(s,r)+" =>"]=o,n),{})}:At(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Es(n))}:wt(t)?Es(t):be(t)&&!ee(t)&&!Ir(t)?String(t):t,Es=(e,t="")=>{var n;return wt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Be;class xl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Be&&(Be.active?(this.parent=Be,this.index=(Be.scopes||(Be.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Be===this)Be=this.prevScope;else{let t=Be;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(wn){let t=wn;for(wn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;bn;){let t=bn;for(bn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Hr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Br(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),co(s),Tl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function js(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Fr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cn)||(e.globalVersion=Cn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!js(e))))return;e.flags|=2;const t=e.dep,n=Re,s=it;Re=e,it=!0;try{Hr(e);const o=e.fn(e._value);(t.version===0||Fe(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Re=n,it=s,Br(e),e.flags&=-3}}function co(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)co(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Tl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let it=!0;const zr=[];function Pt(){zr.push(it),it=!1}function It(){const e=zr.pop();it=e===void 0?!0:e}function No(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Re;Re=void 0;try{t()}finally{Re=n}}}let Cn=0;class Al{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ds{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Re||!it||Re===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Re)n=this.activeLink=new Al(Re,this),Re.deps?(n.prevDep=Re.depsTail,Re.depsTail.nextDep=n,Re.depsTail=n):Re.deps=Re.depsTail=n,Kr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Re.depsTail,n.nextDep=void 0,Re.depsTail.nextDep=n,Re.depsTail=n,Re.deps===n&&(Re.deps=s)}return n}trigger(t){this.version++,Cn++,this.notify(t)}notify(t){lo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ao()}}}function Kr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Kr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Hs=new WeakMap,Yt=Symbol(""),Bs=Symbol(""),xn=Symbol("");function Ke(e,t,n){if(it&&Re){let s=Hs.get(e);s||Hs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ds),o.map=s,o.key=n),o.track()}}function Rt(e,t,n,s,o,r){const i=Hs.get(e);if(!i){Cn++;return}const l=a=>{a&&a.trigger()};if(lo(),t==="clear")i.forEach(l);else{const a=ee(e),u=a&&oo(n);if(a&&n==="length"){const c=Number(s);i.forEach((p,g)=>{(g==="length"||g===xn||!wt(g)&&g>=c)&&l(p)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),u&&l(i.get(xn)),t){case"add":a?u&&l(i.get("length")):(l(i.get(Yt)),Kt(e)&&l(i.get(Bs)));break;case"delete":a||(l(i.get(Yt)),Kt(e)&&l(i.get(Bs)));break;case"set":Kt(e)&&l(i.get(Yt));break}}ao()}function en(e){const t=ve(e);return t===e?t:(Ke(t,"iterate",xn),st(e)?t:t.map(at))}function ps(e){return Ke(e=ve(e),"iterate",xn),e}function vt(e,t){return Nt(e)?ln(Zt(e)?at(t):t):at(t)}const Ol={__proto__:null,[Symbol.iterator](){return Cs(this,Symbol.iterator,e=>vt(this,e))},concat(...e){return en(this).concat(...e.map(t=>ee(t)?en(t):t))},entries(){return Cs(this,"entries",e=>(e[1]=vt(this,e[1]),e))},every(e,t){return Et(this,"every",e,t,void 0,arguments)},filter(e,t){return Et(this,"filter",e,t,n=>n.map(s=>vt(this,s)),arguments)},find(e,t){return Et(this,"find",e,t,n=>vt(this,n),arguments)},findIndex(e,t){return Et(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Et(this,"findLast",e,t,n=>vt(this,n),arguments)},findLastIndex(e,t){return Et(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Et(this,"forEach",e,t,void 0,arguments)},includes(...e){return xs(this,"includes",e)},indexOf(...e){return xs(this,"indexOf",e)},join(e){return en(this).join(e)},lastIndexOf(...e){return xs(this,"lastIndexOf",e)},map(e,t){return Et(this,"map",e,t,void 0,arguments)},pop(){return pn(this,"pop")},push(...e){return pn(this,"push",e)},reduce(e,...t){return Vo(this,"reduce",e,t)},reduceRight(e,...t){return Vo(this,"reduceRight",e,t)},shift(){return pn(this,"shift")},some(e,t){return Et(this,"some",e,t,void 0,arguments)},splice(...e){return pn(this,"splice",e)},toReversed(){return en(this).toReversed()},toSorted(e){return en(this).toSorted(e)},toSpliced(...e){return en(this).toSpliced(...e)},unshift(...e){return pn(this,"unshift",e)},values(){return Cs(this,"values",e=>vt(this,e))}};function Cs(e,t,n){const s=ps(e),o=s[t]();return s!==e&&!st(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const Pl=Array.prototype;function Et(e,t,n,s,o,r){const i=ps(e),l=i!==e&&!st(e),a=i[t];if(a!==Pl[t]){const p=a.apply(e,r);return l?at(p):p}let u=n;i!==e&&(l?u=function(p,g){return n.call(this,vt(e,p),g,e)}:n.length>2&&(u=function(p,g){return n.call(this,p,g,e)}));const c=a.call(i,u,s);return l&&o?o(c):c}function Vo(e,t,n,s){const o=ps(e),r=o!==e&&!st(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(u,c,p){return l&&(l=!1,u=vt(e,u)),n.call(this,u,vt(e,c),p,e)}):n.length>3&&(i=function(u,c,p){return n.call(this,u,c,p,e)}));const a=o[t](i,...s);return l?vt(e,a):a}function xs(e,t,n){const s=ve(e);Ke(s,"iterate",xn);const o=s[t](...n);return(o===-1||o===!1)&&po(n[0])?(n[0]=ve(n[0]),s[t](...n)):o}function pn(e,t,n=[]){Pt(),lo();const s=ve(e)[t].apply(e,n);return ao(),It(),s}const Il=no("__proto__,__v_isRef,__isVue"),Wr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(wt));function Nl(e){wt(e)||(e=String(e));const t=ve(this);return Ke(t,"has",e),t.hasOwnProperty(e)}class qr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?zl:Yr:r?Qr:Jr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=ee(t);if(!o){let a;if(i&&(a=Ol[n]))return a;if(n==="hasOwnProperty")return Nl}const l=Reflect.get(t,n,Ge(t)?t:s);if((wt(n)?Wr.has(n):Il(n))||(o||Ke(t,"get",n),r))return l;if(Ge(l)){const a=i&&oo(n)?l:l.value;return o&&be(a)?zs(a):a}return be(l)?o?zs(l):hs(l):l}}class Gr extends qr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=ee(t)&&oo(n);if(!this._isShallow){const u=Nt(r);if(!st(s)&&!Nt(s)&&(r=ve(r),s=ve(s)),!i&&Ge(r)&&!Ge(s))return u||(r.value=s),!0}const l=i?Number(n)e,jn=e=>Reflect.getPrototypeOf(e);function Ul(e,t,n){return function(...s){const o=this.__v_raw,r=ve(o),i=Kt(r),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,u=o[e](...s),c=n?Fs:t?ln:at;return!t&&Ke(r,"iterate",a?Bs:Yt),je(Object.create(u),{next(){const{value:p,done:g}=u.next();return g?{value:p,done:g}:{value:l?[c(p[0]),c(p[1])]:c(p),done:g}}})}}function Hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function jl(e,t){const n={get(o){const r=this.__v_raw,i=ve(r),l=ve(o);e||(Fe(o,l)&&Ke(i,"get",o),Ke(i,"get",l));const{has:a}=jn(i),u=t?Fs:e?ln:at;if(a.call(i,o))return u(r.get(o));if(a.call(i,l))return u(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ke(ve(o),"iterate",Yt),o.size},has(o){const r=this.__v_raw,i=ve(r),l=ve(o);return e||(Fe(o,l)&&Ke(i,"has",o),Ke(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,a=ve(l),u=t?Fs:e?ln:at;return!e&&Ke(a,"iterate",Yt),l.forEach((c,p)=>o.call(r,u(c),u(p),i))}};return je(n,e?{add:Hn("add"),set:Hn("set"),delete:Hn("delete"),clear:Hn("clear")}:{add(o){const r=ve(this),i=jn(r),l=ve(o),a=!t&&!st(o)&&!Nt(o)?l:o;return i.has.call(r,a)||Fe(o,a)&&i.has.call(r,o)||Fe(l,a)&&i.has.call(r,l)||(r.add(a),Rt(r,"add",a,a)),this},set(o,r){!t&&!st(r)&&!Nt(r)&&(r=ve(r));const i=ve(this),{has:l,get:a}=jn(i);let u=l.call(i,o);u||(o=ve(o),u=l.call(i,o));const c=a.call(i,o);return i.set(o,r),u?Fe(r,c)&&Rt(i,"set",o,r):Rt(i,"add",o,r),this},delete(o){const r=ve(this),{has:i,get:l}=jn(r);let a=i.call(r,o);a||(o=ve(o),a=i.call(r,o)),l&&l.call(r,o);const u=r.delete(o);return a&&Rt(r,"delete",o,void 0),u},clear(){const o=ve(this),r=o.size!==0,i=o.clear();return r&&Rt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Ul(o,e,t)}),n}function uo(e,t){const n=jl(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ge(n,o)&&o in s?n:s,o,r)}const Hl={get:uo(!1,!1)},Bl={get:uo(!1,!0)},Fl={get:uo(!0,!1)};const Jr=new WeakMap,Qr=new WeakMap,Yr=new WeakMap,zl=new WeakMap;function Kl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hs(e){return Nt(e)?e:fo(e,!1,Ml,Hl,Jr)}function Zr(e){return fo(e,!1,Ll,Bl,Qr)}function zs(e){return fo(e,!0,Dl,Fl,Yr)}function fo(e,t,n,s,o){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=o.get(e);if(r)return r;const i=Kl(gl(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Zt(e){return Nt(e)?Zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Nt(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function po(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function Wl(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&Nr(e,"__v_skip",!0),e}const at=e=>be(e)?hs(e):e,ln=e=>be(e)?zs(e):e;function Ge(e){return e?e.__v_isRef===!0:!1}function V(e){return Xr(e,!1)}function ql(e){return Xr(e,!0)}function Xr(e,t){return Ge(e)?e:new Gl(e,t)}class Gl{constructor(t,n){this.dep=new ds,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ve(t),this._value=n?t:at(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||st(t)||Nt(t);t=s?t:ve(t),Fe(t,n)&&(this._rawValue=t,this._value=s?t:at(t),this.dep.trigger())}}function _t(e){return Ge(e)?e.value:e}const Jl={get:(e,t,n)=>t==="__v_raw"?e:_t(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ge(o)&&!Ge(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function ei(e){return Zt(e)?e:new Proxy(e,Jl)}class Ql{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new ds,{get:s,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Yl(e){return new Ql(e)}class Zl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ds(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Re!==this)return jr(this,!0),!0}get value(){const t=this.dep.track();return Fr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Xl(e,t,n=!1){let s,o;return re(e)?s=e:(s=e.get,o=e.set),new Zl(s,o,n)}const Bn={},Gn=new WeakMap;let Jt;function ea(e,t=!1,n=Jt){if(n){let s=Gn.get(n);s||Gn.set(n,s=[]),s.push(e)}}function ta(e,t,n=he){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:a}=n,u=b=>o?b:st(b)||o===!1||o===0?Tt(b,1):Tt(b);let c,p,g,h,w=!1,x=!1;if(Ge(e)?(p=()=>e.value,w=st(e)):Zt(e)?(p=()=>u(e),w=!0):ee(e)?(x=!0,w=e.some(b=>Zt(b)||st(b)),p=()=>e.map(b=>{if(Ge(b))return b.value;if(Zt(b))return u(b);if(re(b))return a?a(b,2):b()})):re(e)?t?p=a?()=>a(e,2):e:p=()=>{if(g){Pt();try{g()}finally{It()}}const b=Jt;Jt=c;try{return a?a(e,3,[h]):e(h)}finally{Jt=b}}:p=bt,t&&o){const b=p,q=o===!0?1/0:o;p=()=>Tt(b(),q)}const R=Rl(),M=()=>{c.stop(),R&&R.active&&so(R.effects,c)};if(r&&t){const b=t;t=(...q)=>{const F=b(...q);return M(),F}}let k=x?new Array(e.length).fill(Bn):Bn;const C=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const q=c.run();if(b||o||w||(x?q.some((F,ne)=>Fe(F,k[ne])):Fe(q,k))){g&&g();const F=Jt;Jt=c;try{const ne=[q,k===Bn?void 0:x&&k[0]===Bn?[]:k,h];k=q,a?a(t,3,ne):t(...ne)}finally{Jt=F}}}else c.run()};return l&&l(C),c=new Lr(p),c.scheduler=i?()=>i(C,!1):C,h=b=>ea(b,!1,c),g=c.onStop=()=>{const b=Gn.get(c);if(b){if(a)a(b,4);else for(const q of b)q();Gn.delete(c)}},t?s?C(!0):k=c.run():i?i(C.bind(null,!0),!0):c.run(),M.pause=c.pause.bind(c),M.resume=c.resume.bind(c),M.stop=M,M}function Tt(e,t=1/0,n){if(t<=0||!be(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ge(e))Tt(e.value,t,n);else if(ee(e))for(let s=0;s{Tt(s,t,n)});else if(Ir(e)){for(const s in e)Tt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Tt(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Vn(e,t,n,s){try{return s?e(...s):e()}catch(o){ms(o,t,n)}}function ct(e,t,n,s){if(re(e)){const o=Vn(e,t,n,s);return o&&Or(o)&&o.catch(r=>{ms(r,t,n)}),o}if(ee(e)){const o=[];for(let r=0;r>>1,o=Ye[s],r=Rn(o);r=Rn(n)?Ye.push(e):Ye.splice(sa(t),0,e),e.flags|=1,ni()}}function ni(){Jn||(Jn=ti.then(oi))}function oa(e){if(!ee(e))Bt&&e.id===-1?Bt.splice(tn+1,0,e):e.flags&1||(on.push(e),e.flags|=1);else for(let t=0;tRn(n)-Rn(s));if(on.length=0,Bt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function oi(e){try{for(mt=0;mt{s._d&&es(-1);const r=Qn(t),i=Xt.length;let l;try{l=e(...o)}finally{for(let a=Xt.length;a>i;a--)Ai();Qn(r),s._d&&es(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Ie(e,t){if(tt===null)return e;const n=bs(tt),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&re(t)?t.call(s&&s.proxy):t}}const ra=Symbol.for("v-scx"),ia=()=>lt(ra);function la(e,t){return mo(e,null,{flush:"sync"})}function Wt(e,t,n){return mo(e,t,n)}function mo(e,t,n=he){const{immediate:s,deep:o,flush:r,once:i}=n,l=je({},n),a=t&&s||!t&&r!=="post";let u;if(On){if(r==="sync"){const h=ia();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=bt,h.resume=bt,h.pause=bt,h}}const c=We;l.call=(h,w,x)=>ct(h,c,w,x);let p=!1;r==="post"?l.scheduler=h=>{Xe(h,c&&c.suspense)}:r!=="sync"&&(p=!0,l.scheduler=(h,w)=>{w?h():ho(h)}),l.augmentJob=h=>{t&&(h.flags|=4),p&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const g=ta(e,t,l);return On&&(u?u.push(g):a&&g()),g}function aa(e,t,n){const s=this.proxy,o=Ne(e)?e.includes(".")?ii(s,e):()=>s[e]:e.bind(s,s);let r;re(t)?r=t:(r=t.handler,n=t);const i=Dn(this),l=mo(o,r.bind(s),n);return i(),l}function ii(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Rs=Symbol("_leaveCb");function ua(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Vt){t=n;break}}return t}function li(e){if(!go(e))return vs(e.type)&&e.children?ua(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&re(n.default))return n.default()}}function vo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;vo(vs(n.type)&&li(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ze(e,t){return re(e)?je({name:e.name},t,{setup:e}):e}function ai(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Do(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Yn=new WeakMap;function $n(e,t,n,s,o=!1){if(ee(e)){e.forEach((x,R)=>$n(x,t&&(ee(t)?t[R]:t),n,s,o));return}if(kn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&$n(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?bs(s.component):s.el,i=o?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===he?l.refs={}:l.refs,p=l.setupState,g=ve(p),h=p===he?Ar:x=>Do(c,x)?!1:ge(g,x),w=(x,R)=>!(R&&Do(c,R));if(u!=null&&u!==a){if(Lo(t),Ne(u))c[u]=null,h(u)&&(p[u]=null);else if(Ge(u)){const x=t;w(u,x.k)&&(u.value=null),x.k&&(c[x.k]=null)}}if(re(a))Vn(a,l,12,[i,c]);else{const x=Ne(a),R=Ge(a);if(x||R){const M=()=>{if(e.f){const k=x?h(a)?p[a]:c[a]:w()||!e.k?a.value:c[e.k];if(o)ee(k)&&so(k,r);else if(ee(k))k.includes(r)||k.push(r);else if(x)c[a]=[r],h(a)&&(p[a]=c[a]);else{const C=[r];w(a,e.k)&&(a.value=C),e.k&&(c[e.k]=C)}}else x?(c[a]=i,h(a)&&(p[a]=i)):R&&(w(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const k=()=>{M(),Yn.delete(e)};k.id=-1,Yn.set(e,k),Xe(k,n)}else Lo(e),M()}}}function Lo(e){const t=Yn.get(e);t&&(t.flags|=8,Yn.delete(e))}fs().requestIdleCallback;fs().cancelIdleCallback;const kn=e=>!!e.type.__asyncLoader,go=e=>e.type.__isKeepAlive;function fa(e,t){ci(e,"a",t)}function da(e,t){ci(e,"da",t)}function ci(e,t,n=We){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(gs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)go(o.parent.vnode)&&pa(s,t,n,o),o=o.parent}}function pa(e,t,n,s){const o=gs(t,e,s,!0);ui(()=>{so(s[t],o)},n)}function gs(e,t,n=We,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Pt();const l=Dn(n),a=ct(t,n,e,i);return l(),It(),a});return s?o.unshift(r):o.push(r),r}}const Lt=e=>(t,n=We)=>{(!On||e==="sp")&&gs(e,(...s)=>t(...s),n)},ha=Lt("bm"),kt=Lt("m"),ma=Lt("bu"),va=Lt("u"),_o=Lt("bum"),ui=Lt("um"),ga=Lt("sp"),_a=Lt("rtg"),ya=Lt("rtc");function ba(e,t=We){gs("ec",e,t)}const wa="components";function Ut(e,t){return ka(wa,e,!0,t)||e}const $a=Symbol.for("v-ndc");function ka(e,t,n=!0,s=!1){const o=tt||We;if(o){const r=o.type;{const l=ic(r,!1);if(l&&(l===t||l===qe(t)||l===cs(qe(t))))return r}const i=Uo(o[e]||r[e],t)||Uo(o.appContext[e],t);return!i&&s?r:i}}function Uo(e,t){return e&&(e[t]||e[qe(t)]||e[cs(qe(t))])}function ye(e,t,n,s){let o;const r=n,i=ee(e);if(i||Ne(e)){const l=i&&Zt(e);let a=!1,u=!1;l&&(a=!st(e),u=Nt(e),e=ps(e)),o=new Array(e.length);for(let c=0,p=e.length;ct(l,a,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let a=0,u=l.length;ae?Ni(e)?bs(e):Ks(e.parent):null,En=je(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=>Ks(e.parent),$root:e=>Ks(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>di(e),$forceUpdate:e=>e.f||(e.f=()=>{ho(e.update)}),$nextTick:e=>e.n||(e.n=Mn.bind(e.proxy)),$watch:e=>aa.bind(e)}),Ts=(e,t)=>e!==he&&!e.__isScriptSetup&&ge(e,t),Ea={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Ts(s,t))return i[t]=1,s[t];if(o!==he&&ge(o,t))return i[t]=2,o[t];if(ge(r,t))return i[t]=3,r[t];if(n!==he&&ge(n,t))return i[t]=4,n[t];Ws&&(i[t]=0)}}const u=En[t];let c,p;if(u)return t==="$attrs"&&Ke(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==he&&ge(n,t))return i[t]=4,n[t];if(p=a.config.globalProperties,ge(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Ts(o,t)?(o[t]=n,!0):s!==he&&ge(s,t)?(s[t]=n,!0):ge(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:i}},l){let a;return!!(n[l]||e!==he&&l[0]!=="$"&&ge(e,l)||Ts(t,l)||ge(r,l)||ge(s,l)||ge(En,l)||ge(o.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Zn(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Sa(e,t){return!e||!t?e||t:ee(e)&&ee(t)?e.concat(t):je({},Zn(e),Zn(t))}let Ws=!0;function Ca(e){const t=di(e),n=e.proxy,s=e.ctx;Ws=!1,t.beforeCreate&&jo(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:a,inject:u,created:c,beforeMount:p,mounted:g,beforeUpdate:h,updated:w,activated:x,deactivated:R,beforeDestroy:M,beforeUnmount:k,destroyed:C,unmounted:b,render:q,renderTracked:F,renderTriggered:ne,errorCaptured:xe,serverPrefetch:oe,expose:K,inheritAttrs:Ae,components:z,directives:we,filters:Me}=t;if(u&&xa(u,s,null),i)for(const H in i){const j=i[H];re(j)&&(s[H]=j.bind(n))}if(o){const H=o.call(n,n);be(H)&&(e.data=hs(H))}if(Ws=!0,r)for(const H in r){const j=r[H],X=re(j)?j.bind(n,n):re(j.get)?j.get.bind(n,n):bt,Q=!re(j)&&re(j.set)?j.set.bind(n):bt,ue=Te({get:X,set:Q});Object.defineProperty(s,H,{enumerable:!0,configurable:!0,get:()=>ue.value,set:ae=>ue.value=ae})}if(l)for(const H in l)fi(l[H],s,n,H);if(a){const H=re(a)?a.call(n):a;Reflect.ownKeys(H).forEach(j=>{Wn(j,H[j])})}c&&jo(c,e,"c");function Ee(H,j){ee(j)?j.forEach(X=>H(X.bind(n))):j&&H(j.bind(n))}if(Ee(ha,p),Ee(kt,g),Ee(ma,h),Ee(va,w),Ee(fa,x),Ee(da,R),Ee(ba,xe),Ee(ya,F),Ee(_a,ne),Ee(_o,k),Ee(ui,b),Ee(ga,oe),ee(K))if(K.length){const H=e.exposed||(e.exposed={});K.forEach(j=>{Object.defineProperty(H,j,{get:()=>n[j],set:X=>n[j]=X,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===bt&&(e.render=q),Ae!=null&&(e.inheritAttrs=Ae),z&&(e.components=z),we&&(e.directives=we),oe&&ai(e)}function xa(e,t,n=bt){ee(e)&&(e=qs(e));for(const s in e){const o=e[s];let r;be(o)?"default"in o?r=lt(o.from||s,o.default,!0):r=lt(o.from||s):r=lt(o),Ge(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function jo(e,t,n){ct(ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function fi(e,t,n,s){let o=s.includes(".")?ii(n,s):()=>n[s];if(Ne(e)){const r=t[e];re(r)&&Wt(o,r)}else if(re(e))Wt(o,e.bind(n));else if(be(e))if(ee(e))e.forEach(r=>fi(r,t,n,s));else{const r=re(e.handler)?e.handler.bind(n):t[e.handler];re(r)&&Wt(o,r,e)}}function di(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let a;return l?a=l:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(u=>Xn(a,u,i,!0)),Xn(a,t,i)),be(t)&&r.set(t,a),a}function Xn(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Xn(e,r,n,!0),o&&o.forEach(i=>Xn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Ra[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Ra={data:Ho,props:Bo,emits:Bo,methods:gn,computed:gn,beforeCreate:Je,created:Je,beforeMount:Je,mounted:Je,beforeUpdate:Je,updated:Je,beforeDestroy:Je,beforeUnmount:Je,destroyed:Je,unmounted:Je,activated:Je,deactivated:Je,errorCaptured:Je,serverPrefetch:Je,components:gn,directives:gn,watch:Aa,provide:Ho,inject:Ta};function Ho(e,t){return t?e?function(){return je(re(e)?e.call(this,this):e,re(t)?t.call(this,this):t)}:t:e}function Ta(e,t){return gn(qs(e),qs(t))}function qs(e){if(ee(e)){const t={};for(let n=0;n{let c,p=he,g;return la(()=>{const h=e[o];Fe(c,h)&&(c=h,u())}),{get(){return a(),n.get?n.get(c):c},set(h){const w=n.set?n.set(h):h;if(!Fe(w,c)&&!(p!==he&&Fe(h,p)))return;const x=s.vnode.props,R=!!(x&&(t in x||o in x||r in x)&&(`onUpdate:${t}`in x||`onUpdate:${o}`in x||`onUpdate:${r}`in x));R||(c=h,u()),s.emit(`update:${t}`,w),Fe(h,p)&&(Fe(h,w)&&!Fe(w,g)||R&&p!==he&&!Fe(w,c))&&u(),p=h,g=w}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?i||he:l,done:!1}:{done:!0}}}},l}const mi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${qe(t)}Modifiers`]||e[`${Dt(t)}Modifiers`];function Ia(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||he;let o=n;const r=t.startsWith("update:"),i=r&&mi(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>Ne(c)?c.trim():c)),i.number&&(o=o.map(us)));let l,a=s[l=ks(t)]||s[l=ks(qe(t))];!a&&r&&(a=s[l=ks(Dt(t))]),a&&ct(a,e,6,o);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ct(u,e,6,o)}}const Na=new WeakMap;function vi(e,t,n=!1){const s=n?Na:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!re(e)){const a=u=>{const c=vi(u,t,!0);c&&(l=!0,je(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(be(e)&&s.set(e,null),null):(ee(r)?r.forEach(a=>i[a]=null):je(i,r),be(e)&&s.set(e,i),i)}function _s(e,t){return!e||!is(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,Dt(t))||ge(e,t))}function Fo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:a,render:u,renderCache:c,props:p,data:g,setupState:h,ctx:w,inheritAttrs:x}=e,R=Qn(e);let M,k;try{if(n.shapeFlag&4){const b=o||s,q=b;M=gt(u.call(q,b,c,p,h,g,w)),k=l}else{const b=t;M=gt(b.length>1?b(p,{attrs:l,slots:i,emit:a}):b(p,null)),k=t.props?l:Va(l)}}catch(b){Xt.length=0,ms(b,e,1),M=de(Vt)}let C=M;if(k&&x!==!1){const b=Object.keys(k),{shapeFlag:q}=C;b.length&&q&7&&(r&&b.some(ls)&&(k=Ma(k,r)),C=an(C,k,!1,!0))}if(n.dirs&&(C=an(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition){const b=vs(C.type)&&li(C)||C;vo(b,n.transition)}return M=C,Qn(R),M}const Va=e=>{let t;for(const n in e)(n==="class"||n==="style"||is(n))&&((t||(t={}))[n]=e[n]);return t},Ma=(e,t)=>{const n={};for(const s in e)(!ls(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Da(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?zo(s,i,u):!!i;if(a&8){const c=t.dynamicProps;for(let p=0;pObject.create(_i),bi=e=>Object.getPrototypeOf(e)===_i;function Ua(e,t,n,s=!1){const o={},r=yi();e.propsDefaults=Object.create(null),wi(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Zr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ja(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=ve(o),[a]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let p=0;p{a=!0;const[g,h]=$i(p,t,!0);je(i,g),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return be(e)&&s.set(e,sn),sn;if(ee(r))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",bo=e=>ee(e)?e.map(gt):[gt(e)],Ba=(e,t,n)=>{if(t._n)return t;const s=$e((...o)=>bo(t(...o)),n);return s._c=!1,s},ki=(e,t,n)=>{const s=e._ctx;for(const o in e){if(yo(o))continue;const r=e[o];if(re(r))t[o]=Ba(o,r,s);else if(r!=null){const i=bo(r);t[o]=()=>i}}},Ei=(e,t)=>{const n=bo(t);e.slots.default=()=>n},Si=(e,t,n)=>{for(const s in t)(n||!yo(s))&&(e[s]=t[s])},Fa=(e,t,n)=>{const s=e.slots=yi();if(e.vnode.shapeFlag&32){const o=t._;o?(Si(s,t,n),n&&Nr(s,"_",o,!0)):ki(t,s)}else t&&Ei(e,t)},za=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=he;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Si(o,t,n):(r=!t.$stable,ki(t,o)),i=t}else t&&(Ei(e,t),i={default:1});if(r)for(const l in o)!yo(l)&&i[l]==null&&delete o[l]},Xe=Ja;function Ka(e){return Wa(e)}function Wa(e,t){const n=fs();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:a,setText:u,setElementText:c,parentNode:p,nextSibling:g,setScopeId:h=bt,insertStaticContent:w}=e,x=(d,v,y,O=null,P=null,A=null,U=void 0,D=null,_=!!v.dynamicChildren)=>{if(d===v)return;d&&!hn(d,v)&&(O=T(d),ae(d,P,A,!0),d=null),v.patchFlag===-2&&(_=!1,v.dynamicChildren=null);const{type:m,ref:I,shapeFlag:E}=v;switch(m){case ys:R(d,v,y,O);break;case Vt:M(d,v,y,O);break;case Os:d==null&&k(v,y,O,U);break;case se:z(d,v,y,O,P,A,U,D,_);break;default:E&1?q(d,v,y,O,P,A,U,D,_):E&6?we(d,v,y,O,P,A,U,D,_):(E&64||E&128)&&m.process(d,v,y,O,P,A,U,D,_,Y)}I!=null&&P?$n(I,d&&d.ref,A,v||d,!v):I==null&&d&&d.ref!=null&&$n(d.ref,null,A,d,!0)},R=(d,v,y,O)=>{if(d==null)s(v.el=l(v.children),y,O);else{const P=v.el=d.el;v.children!==d.children&&u(P,v.children)}},M=(d,v,y,O)=>{d==null?s(v.el=a(v.children||""),y,O):v.el=d.el},k=(d,v,y,O)=>{[d.el,d.anchor]=w(d.children,v,y,O,d.el,d.anchor)},C=({el:d,anchor:v},y,O)=>{let P;for(;d&&d!==v;)P=g(d),s(d,y,O),d=P;s(v,y,O)},b=({el:d,anchor:v})=>{let y;for(;d&&d!==v;)y=g(d),o(d),d=y;o(v)},q=(d,v,y,O,P,A,U,D,_)=>{if(v.type==="svg"?U="svg":v.type==="math"&&(U="mathml"),d==null)F(v,y,O,P,A,U,D,_);else{const m=d.el&&d.el._isVueCE?d.el:null;try{m&&m._beginPatch(),oe(d,v,P,A,U,D,_)}finally{m&&m._endPatch()}}},F=(d,v,y,O,P,A,U,D)=>{let _,m;const{props:I,shapeFlag:E,transition:L,dirs:G}=d;if(_=d.el=i(d.type,A,I&&I.is,I),E&8?c(_,d.children):E&16&&xe(d.children,_,null,O,P,As(d,A),U,D),G&&qt(d,null,O,"created"),ne(_,d,d.scopeId,U,O),I){for(const ce in I)ce!=="value"&&!yn(ce)&&r(_,ce,null,I[ce],A,O);"value"in I&&r(_,"value",null,I.value,A),(m=I.onVnodeBeforeMount)&&ht(m,O,d)}G&&qt(d,null,O,"beforeMount");const Z=qa(P,L);Z&&L.beforeEnter(_),s(_,v,y),((m=I&&I.onVnodeMounted)||Z||G)&&Xe(()=>{try{m&&ht(m,O,d),Z&&L.enter(_),G&&qt(d,null,O,"mounted")}finally{}},P)},ne=(d,v,y,O,P)=>{if(y&&h(d,y),O)for(let A=0;A{for(let m=_;m{const D=v.el=d.el;let{patchFlag:_,dynamicChildren:m,dirs:I}=v;_|=d.patchFlag&16;const E=d.props||he,L=v.props||he;let G;if(y&&Gt(y,!1),(G=L.onVnodeBeforeUpdate)&&ht(G,y,v,d),I&&qt(v,d,y,"beforeUpdate"),y&&Gt(y,!0),m&&(!d.dynamicChildren||d.dynamicChildren.length!==m.length)&&(_=0,U=!1,m=null),(E.innerHTML&&L.innerHTML==null||E.textContent&&L.textContent==null)&&c(D,""),m?K(d.dynamicChildren,m,D,y,O,As(v,P),A):U||j(d,v,D,null,y,O,As(v,P),A,!1),_>0){if(_&16)Ae(D,E,L,y,P);else if(_&2&&E.class!==L.class&&r(D,"class",null,L.class,P),_&4&&r(D,"style",E.style,L.style,P),_&8){const Z=v.dynamicProps;for(let ce=0;ce{G&&ht(G,y,v,d),I&&qt(v,d,y,"updated")},O)},K=(d,v,y,O,P,A,U)=>{for(let D=0;D{if(v!==y){if(v!==he)for(const A in v)!yn(A)&&!(A in y)&&r(d,A,v[A],null,P,O);for(const A in y){if(yn(A))continue;const U=y[A],D=v[A];U!==D&&A!=="value"&&r(d,A,D,U,P,O)}"value"in y&&r(d,"value",v.value,y.value,P)}},z=(d,v,y,O,P,A,U,D,_)=>{const m=v.el=d?d.el:l(""),I=v.anchor=d?d.anchor:l("");let{patchFlag:E,dynamicChildren:L,slotScopeIds:G}=v;G&&(D=D?D.concat(G):G),d==null?(s(m,y,O),s(I,y,O),xe(v.children||[],y,I,P,A,U,D,_)):E>0&&E&64&&L&&d.dynamicChildren&&d.dynamicChildren.length===L.length?(K(d.dynamicChildren,L,y,P,A,U,D),(v.key!=null||P&&v===P.subTree)&&Ci(d,v,!0)):j(d,v,y,I,P,A,U,D,_)},we=(d,v,y,O,P,A,U,D,_)=>{v.slotScopeIds=D,d==null?v.shapeFlag&512?P.ctx.activate(v,y,O,U,_):Me(v,y,O,P,A,U,_):Ve(d,v,_)},Me=(d,v,y,O,P,A,U)=>{const D=d.component=tc(d,O,P);if(go(d)&&(D.ctx.renderer=Y),nc(D,!1,U),D.asyncDep){if(P&&P.registerDep(D,Ee,U),!d.el){const _=D.subTree=de(Vt);M(null,_,v,y),d.placeholder=_.el}}else Ee(D,d,v,y,P,A,U)},Ve=(d,v,y)=>{const O=v.component=d.component;if(Da(d,v,y))if(O.asyncDep&&!O.asyncResolved){H(O,v,y);return}else O.next=v,O.update();else v.el=d.el,O.vnode=v},Ee=(d,v,y,O,P,A,U)=>{const D=()=>{if(d.isMounted){let{next:E,bu:L,u:G,parent:Z,vnode:ce}=d;{const dt=xi(d);if(dt){E&&(E.el=ce.el,H(d,E,U)),dt.asyncDep.then(()=>{Xe(()=>{d.isUnmounted||m()},P)});return}}let ie=E,De;Gt(d,!1),E?(E.el=ce.el,H(d,E,U)):E=ce,L&&Kn(L),(De=E.props&&E.props.onVnodeBeforeUpdate)&&ht(De,Z,E,ce),Gt(d,!0);const He=Fo(d),ft=d.subTree;d.subTree=He,x(ft,He,p(ft.el),T(ft),d,P,A),E.el=He.el,ie===null&&La(d,He.el),G&&Xe(G,P),(De=E.props&&E.props.onVnodeUpdated)&&Xe(()=>ht(De,Z,E,ce),P)}else{let E;const{el:L,props:G}=v,{bm:Z,m:ce,parent:ie,root:De,type:He}=d,ft=kn(v);Gt(d,!1),Z&&Kn(Z),!ft&&(E=G&&G.onVnodeBeforeMount)&&ht(E,ie,v),Gt(d,!0);{De.ce&&De.ce._hasShadowRoot()&&De.ce._injectChildStyle(He,d.parent?d.parent.type:void 0);const dt=d.subTree=Fo(d);x(null,dt,y,O,d,P,A),v.el=dt.el}if(ce&&Xe(ce,P),!ft&&(E=G&&G.onVnodeMounted)){const dt=v;Xe(()=>ht(E,ie,dt),P)}(v.shapeFlag&256||ie&&kn(ie.vnode)&&ie.vnode.shapeFlag&256)&&d.a&&Xe(d.a,P),d.isMounted=!0,v=y=O=null}};d.scope.on();const _=d.effect=new Lr(D);d.scope.off();const m=d.update=_.run.bind(_),I=d.job=_.runIfDirty.bind(_);I.i=d,I.id=d.uid,_.scheduler=()=>ho(I),Gt(d,!0),m()},H=(d,v,y)=>{v.component=d;const O=d.vnode.props;d.vnode=v,d.next=null,ja(d,v.props,O,y),za(d,v.children,y),Pt(),Mo(d),It()},j=(d,v,y,O,P,A,U,D,_=!1)=>{const m=d&&d.children,I=d?d.shapeFlag:0,E=v.children,{patchFlag:L,shapeFlag:G}=v;if(L>0){if(L&128){Q(m,E,y,O,P,A,U,D,_);return}else if(L&256){X(m,E,y,O,P,A,U,D,_);return}}G&8?(I&16&&pe(m,P,A),E!==m&&c(y,E)):I&16?G&16?Q(m,E,y,O,P,A,U,D,_):pe(m,P,A,!0):(I&8&&c(y,""),G&16&&xe(E,y,O,P,A,U,D,_))},X=(d,v,y,O,P,A,U,D,_)=>{d=d||sn,v=v||sn;const m=d.length,I=v.length,E=Math.min(m,I);let L;for(L=0;LI?pe(d,P,A,!0,!1,E):xe(v,y,O,P,A,U,D,_,E)},Q=(d,v,y,O,P,A,U,D,_)=>{let m=0;const I=v.length;let E=d.length-1,L=I-1;for(;m<=E&&m<=L;){const G=d[m],Z=v[m]=_?xt(v[m]):gt(v[m]);if(hn(G,Z))x(G,Z,y,null,P,A,U,D,_);else break;m++}for(;m<=E&&m<=L;){const G=d[E],Z=v[L]=_?xt(v[L]):gt(v[L]);if(hn(G,Z))x(G,Z,y,null,P,A,U,D,_);else break;E--,L--}if(m>E){if(m<=L){const G=L+1,Z=GL)for(;m<=E;)ae(d[m],P,A,!0),m++;else{const G=m,Z=m,ce=new Map;for(m=Z;m<=L;m++){const et=v[m]=_?xt(v[m]):gt(v[m]);et.key!=null&&ce.set(et.key,m)}let ie,De=0;const He=L-Z+1;let ft=!1,dt=0;const dn=new Array(He);for(m=0;m=He){ae(et,P,A,!0);continue}let pt;if(et.key!=null)pt=ce.get(et.key);else for(ie=Z;ie<=L;ie++)if(dn[ie-Z]===0&&hn(et,v[ie])){pt=ie;break}pt===void 0?ae(et,P,A,!0):(dn[pt-Z]=m+1,pt>=dt?dt=pt:ft=!0,x(et,v[pt],y,null,P,A,U,D,_),De++)}const xo=ft?Ga(dn):sn;for(ie=xo.length-1,m=He-1;m>=0;m--){const et=Z+m,pt=v[et],Ro=v[et+1],To=et+1{const{el:A,type:U,transition:D,children:_,shapeFlag:m}=d;if(m&6){ue(d.component.subTree,v,y,O);return}if(m&128){d.suspense.move(v,y,O);return}if(m&64){U.move(d,v,y,Y);return}if(U===se){s(A,v,y);for(let E=0;E<_.length;E++)ue(_[E],v,y,O);s(d.anchor,v,y);return}if(U===Os){C(d,v,y);return}if(O!==2&&m&1&&D)if(O===0)D.persisted&&!A[Rs]?s(A,v,y):(D.beforeEnter(A),s(A,v,y),Xe(()=>D.enter(A),P));else{const{leave:E,delayLeave:L,afterLeave:G}=D,Z=()=>{d.ctx.isUnmounted?o(A):s(A,v,y)},ce=()=>{const ie=A._isLeaving||!!A[Rs];A._isLeaving&&A[Rs](!0),D.persisted&&!ie?Z():E(A,()=>{Z(),G&&G()})};L?L(A,Z,ce):ce()}else s(A,v,y)},ae=(d,v,y,O=!1,P=!1)=>{const{type:A,props:U,ref:D,children:_,dynamicChildren:m,shapeFlag:I,patchFlag:E,dirs:L,cacheIndex:G,memo:Z}=d;if(E===-2&&(P=!1),D!=null&&(Pt(),$n(D,null,y,d,!0),It()),G!=null&&(v.renderCache[G]=void 0),I&256){v.ctx.deactivate(d);return}const ce=I&1&&L,ie=!kn(d);let De;if(ie&&(De=U&&U.onVnodeBeforeUnmount)&&ht(De,v,d),I&6)Ce(d.component,y,O);else{if(I&128){d.suspense.unmount(y,O);return}ce&&qt(d,null,v,"beforeUnmount"),I&64?d.type.remove(d,v,y,Y,O):m&&!m.hasOnce&&(A!==se||E>0&&E&64)?pe(m,v,y,!1,!0):(A===se&&E&384||!P&&I&16)&&pe(_,v,y),O&&Oe(d)}const He=Z!=null&&G==null;(ie&&(De=U&&U.onVnodeUnmounted)||ce||He)&&Xe(()=>{De&&ht(De,v,d),ce&&qt(d,null,v,"unmounted"),He&&(d.el=null)},y)},Oe=d=>{const{type:v,el:y,anchor:O,transition:P}=d;if(v===se){Se(y,O);return}if(v===Os){b(d);return}const A=()=>{o(y),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(d.shapeFlag&1&&P&&!P.persisted){const{leave:U,delayLeave:D}=P,_=()=>U(y,A);D?D(d.el,A,_):_()}else A()},Se=(d,v)=>{let y;for(;d!==v;)y=g(d),o(d),d=y;o(v)},Ce=(d,v,y)=>{const{bum:O,scope:P,job:A,subTree:U,um:D,m:_,a:m}=d;Wo(_),Wo(m),O&&Kn(O),P.stop(),A&&(A.flags|=8,ae(U,d,v,y)),D&&Xe(D,v),Xe(()=>{d.isUnmounted=!0},v)},pe=(d,v,y,O=!1,P=!1,A=0)=>{for(let U=A;U{if(d.shapeFlag&6)return T(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const v=g(d.anchor||d.el),y=v&&v[ca];return y?g(y):v};let W=!1;const B=(d,v,y)=>{let O;d==null?v._vnode&&(ae(v._vnode,null,null,!0),O=v._vnode.component):x(v._vnode||null,d,v,null,null,null,y),v._vnode=d,W||(W=!0,Mo(O),si(),W=!1)},Y={p:x,um:ae,m:ue,r:Oe,mt:Me,mc:xe,pc:j,pbc:K,n:T,o:e};return{render:B,hydrate:void 0,createApp:Pa(B)}}function As({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 Gt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function qa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ci(e,t,n=!1){const s=e.children,o=t.children;if(ee(s)&&ee(o))for(let r=0;r>1,e[n[l]]0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-- >0;)n[r]=i,i=t[i];return n}function xi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xi(t)}function Wo(e){if(e)for(let t=0;te.__isSuspense;function Ja(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):oa(e)}const se=Symbol.for("v-fgt"),ys=Symbol.for("v-txt"),Vt=Symbol.for("v-cmt"),Os=Symbol.for("v-stc"),Xt=[];let nt=null;function $(e=!1){Xt.push(nt=e?null:[])}function Ai(){Xt.pop(),nt=Xt[Xt.length-1]||null}let Tn=1;function es(e,t=!1){Tn+=e,e<0&&nt&&t&&(nt.hasOnce=!0)}function Oi(e){return e.dynamicChildren=Tn>0?nt||sn:null,Ai(),Tn>0&&nt&&nt.push(e),e}function S(e,t,n,s,o,r){return Oi(f(e,t,n,s,o,r,!0))}function $t(e,t,n,s,o){return Oi(de(e,t,n,s,o,!0))}function ts(e){return e?e.__v_isVNode===!0:!1}function hn(e,t){return e.type===t.type&&e.key===t.key}const Pi=({key:e})=>e??null,qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ne(e)||Ge(e)||re(e)?{i:tt,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,o=null,r=e===se?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pi(t),ref:t&&qn(t),scopeId:ri,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:tt};return l?(ns(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=Ne(n)?8:16),Tn>0&&!i&&nt&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&nt.push(a),a}const de=Qa;function Qa(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===$a)&&(e=Vt),ts(e)){const l=an(e,t,!0);return n&&ns(l,n),Tn>0&&!r&&nt&&(l.shapeFlag&6?nt[nt.indexOf(e)]=l:nt.push(l)),l.patchFlag=-2,l}if(lc(e)&&(e=e.__vccOpts),t){t=Ya(t);let{class:l,style:a}=t;l&&!Ne(l)&&(t.class=_e(l)),be(a)&&(po(a)&&!ee(a)&&(a=je({},a)),t.style=ro(a))}const i=Ne(e)?1:Ti(e)?128:vs(e)?64:be(e)?4:re(e)?2:0;return f(e,t,n,s,o,i,r,!0)}function Ya(e){return e?po(e)||bi(e)?je({},e):e:null}function an(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:a}=e,u=t?Za(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Pi(u),ref:t&&t.ref?n&&r?ee(r)?r.concat(qn(t)):[r,qn(t)]:qn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==se?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&an(e.ssContent),ssFallback:e.ssFallback&&an(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&vo(c,a.clone(c)),c}function te(e=" ",t=0){return de(ys,null,e,t)}function J(e="",t=!1){return t?($(),$t(Vt,null,e)):de(Vt,null,e)}function gt(e){return e==null||typeof e=="boolean"?de(Vt):ee(e)?de(se,null,e.slice()):ts(e)?xt(e):de(ys,null,String(e))}function xt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:an(e)}function ns(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ns(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bi(t)?t._ctx=tt:o===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(re(t)){if(s&65){ns(e,{default:t});return}t={default:t,_ctx:tt},n=32}else t=String(t),s&64?(n=16,t=[te(t)]):n=8;e.children=t,e.shapeFlag|=n}function Za(...e){const t={};for(let n=0;nWe||tt;let ss,An;{const e=fs(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ss=t("__VUE_INSTANCE_SETTERS__",n=>We=n),An=t("__VUE_SSR_SETTERS__",n=>On=n)}const Dn=e=>{const t=We;return ss(e),e.scope.on(),()=>{e.scope.off(),ss(t)}},qo=()=>{We&&We.scope.off(),ss(null)};function Ni(e){return e.vnode.shapeFlag&4}let On=!1;function nc(e,t=!1,n=!1){t&&An(t);const{props:s,children:o}=e.vnode,r=Ni(e);Ua(e,s,r,t),Fa(e,o,n||t);const i=r?sc(e,t):void 0;return t&&An(!1),i}function sc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ea);const{setup:s}=n;if(s){Pt();const o=e.setupContext=s.length>1?rc(e):null,r=Dn(e),i=Vn(s,e,0,[e.props,o]),l=Or(i);if(It(),r(),(l||e.sp)&&!kn(e)&&ai(e),l){if(i.then(qo,qo),t)return i.then(a=>{An(!0);try{Go(e,a,t)}finally{An(!1)}}).catch(a=>{ms(a,e,0)});e.asyncDep=i}else Go(e,i)}else Vi(e)}function Go(e,t,n){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ei(t)),Vi(e)}function Vi(e,t,n){const s=e.type;e.render||(e.render=s.render||bt);{const o=Dn(e);Pt();try{Ca(e)}finally{It(),o()}}}const oc={get(e,t){return Ke(e,"get",""),e[t]}};function rc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,oc),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ei(Wl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in En)return En[n](e)},has(t,n){return n in t||n in En}})):e.proxy}function ic(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function lc(e){return re(e)&&"__vccOpts"in e}const Te=(e,t)=>Xl(e,t,On);function Mi(e,t,n){try{es(-1);const s=arguments.length;return s===2?be(t)&&!ee(t)?ts(t)?de(e,null,[t]):de(e,t):de(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ts(n)&&(n=[n]),de(e,t,n))}finally{es(1)}}const ac="3.5.42";/** * @vue/runtime-dom v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Js;const Jo=typeof window<"u"&&window.trustedTypes;if(Jo)try{Js=Jo.createPolicy("vue",{createHTML:e=>e})}catch{}const Di=Js?e=>Js.createHTML(e):e=>e,cc="http://www.w3.org/2000/svg",uc="http://www.w3.org/1998/Math/MathML",Ct=typeof document<"u"?document:null,Qo=Ct&&Ct.createElement("template"),fc={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 o=t==="svg"?Ct.createElementNS(cc,e):t==="mathml"?Ct.createElementNS(uc,e):n?Ct.createElement(e,{is:n}):Ct.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Ct.createTextNode(e),createComment:e=>Ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Qo.innerHTML=Di(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Qo.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},dc=Symbol("_vtc");function pc(e,t,n){const s=e[dc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const os=Symbol("_vod"),Li=Symbol("_vsh"),rs={name:"show",beforeMount(e,{value:t},{transition:n}){e[os]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),mn(e,!0),s.enter(e)):s.leave(e,()=>{mn(e,!1)}):mn(e,t))},beforeUnmount(e,{value:t}){mn(e,t)}};function mn(e,t){e.style.display=t?e[os]:"none",e[Li]=!t}const hc=Symbol(""),mc=/(?:^|;)\s*display\s*:/;function vc(e,t,n){const s=e.style,o=Ne(n);let r=!1;if(n&&!o){if(t)if(Ne(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&_n(s,l,"")}else for(const i in t)n[i]==null&&_n(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?_c(e,i,!Ne(t)&&t?t[i]:void 0,l)||_n(s,i,l):_n(s,i,"")}}else if(o){if(t!==n){const i=s[hc];i&&(n+=";"+i),s.cssText=n,r=mc.test(n)}}else t&&e.removeAttribute("style");os in e&&(e[os]=r?s.display:"",e[Li]&&(s.display="none"))}const Fn=/\s*!important$/;function _n(e,t,n){if(ee(n))n.forEach(s=>_n(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Fn.test(n)?e.setProperty(t,n.replace(Fn,""),"important"):e.setProperty(t,n);else{const s=gc(e,t);Fn.test(n)?e.setProperty(Dt(s),n.replace(Fn,""),"important"):e[s]=n}}const Yo=["Webkit","Moz","ms"],Ps={};function gc(e,t){const n=Ps[t];if(n)return n;let s=qe(t);if(s!=="filter"&&s in e)return Ps[t]=s;s=cs(s);for(let o=0;oIs||(Ec.then(()=>Is=0),Is=Date.now());function Cc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(ee(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xc=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?pc(e,s,i):t==="style"?vc(e,n,s):is(t)?ls(t)||bc(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rc(e,t,s,i))?(er(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xo(e,t,s,i,r,t!=="value")):e._isVueCE&&(Tc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ne(s)))?er(e,qe(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Xo(e,t,s,i))};function Rc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&nr(t)&&re(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return nr(t)&&Ne(n)?!1:t in e}function Tc(e,t){const n=e._def.props;if(!n)return!1;const s=qe(t);return Array.isArray(n)?n.some(o=>qe(o)===s):Object.keys(n).some(o=>qe(o)===s)}const cn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Kn(t,n):t};function Ac(e){e.target.composing=!0}function sr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const yt=Symbol("_assign"),zn=Symbol("_initialValue");function Ns(e,t,n){return t&&(e=e.trim()),n&&(e=us(e)),e}const ze={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[zn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[zn]=e.defaultValue.replace(/\r\n?/g,` `))),e[yt]=cn(o);const r=s||o.props&&o.props.type==="number";zt(e,t?"change":"input",i=>{i.target.composing||e[yt](Ns(e.value,n,r))}),(n||r)&&zt(e,"change",()=>{e.value=Ns(e.value,n,r)}),t||(zt(e,"compositionstart",Ac),zt(e,"compositionend",sr),zt(e,"change",sr))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[zn];delete e[zn],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[yt](Ns(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[yt]=cn(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?us(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Oc={deep:!0,created(e,t,n){e[yt]=cn(n),zt(e,"change",()=>{const s=e._modelValue,o=Pn(e),r=e.checked,i=e[yt];if(ee(s)){const l=io(s,o),a=l!==-1;if(r&&!a)i(s.concat(o));else if(!r&&a){const u=[...s];u.splice(l,1),i(u)}}else if(At(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(Ui(e,r))})},mounted:or,beforeUpdate(e,t,n){e[yt]=cn(n),or(e,t,n)}};function or(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(ee(t))o=io(t,s.props.value)>-1;else if(At(t))o=t.has(s.props.value);else{if(t===n)return;o=Ot(t,Ui(e,!0))}e.checked!==o&&(e.checked=o)}const rr={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,zt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?us(Pn(a)):Pn(a)),r=e.multiple,i=r?At(e._modelValue)?new Set(o):o:o[0],l=e._pendingValue=[r,r?ee(i)?o.slice():o:i];try{e[yt](i)}finally{Mn(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[yt]=cn(s)},mounted(e,{value:t}){ir(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[yt]=cn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Pc(t,n[1],n[0]))&&ir(e,t)}};function Pc(e,t,n){if(!n||ee(e))return Ot(e,t);if(At(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ir(e,t){const n=e.multiple,s=ee(t);if(!(n&&!s&&!At(t))){for(let o=0,r=e.options.length;oString(u)===String(l)):i.selected=io(t,l)>-1}else i.selected=t.has(l);else if(Ot(Pn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Pn(e){return"_value"in e?e._value:e.value}function Ui(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ic=["ctrl","shift","alt","meta"],Nc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ic.some(n=>e[`${n}Key`]&&!t.includes(n))},Mt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...r)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const r=Dt(o.key);if(t.some(i=>i===r||Vc[i]===r))return e(o)}))},Mc=je({patchProp:xc},fc);let lr;function Dc(){return lr||(lr=Ka(Mc))}const Lc=((...e)=>{const t=Dc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=jc(s);if(!o)return;const r=t._component;!re(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,Uc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Uc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jc(e){return Ne(e)?document.querySelector(e):e}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */const nn=typeof document<"u";function Hi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Hc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Hi(e.default)}const me=Object.assign;function Vs(e,t){const n={};for(const s in t){const o=t[s];n[s]=ut(o)?o.map(e):e(o)}return n}const Sn=()=>{},ut=Array.isArray;function ar(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Bi=/#/g,Bc=/&/g,Fc=/\//g,zc=/=/g,Kc=/\?/g,Fi=/\+/g,Wc=/%5B/g,qc=/%5D/g,zi=/%5E/g,Gc=/%60/g,Ki=/%7B/g,Jc=/%7C/g,Wi=/%7D/g,Qc=/%20/g;function wo(e){return e==null?"":encodeURI(""+e).replace(Jc,"|").replace(Wc,"[").replace(qc,"]")}function Yc(e){return wo(e).replace(Ki,"{").replace(Wi,"}").replace(zi,"^")}function Qs(e){return wo(e).replace(Fi,"%2B").replace(Qc,"+").replace(Bi,"%23").replace(Bc,"%26").replace(Gc,"`").replace(Ki,"{").replace(Wi,"}").replace(zi,"^")}function Zc(e){return Qs(e).replace(zc,"%3D")}function Xc(e){return wo(e).replace(Bi,"%23").replace(Kc,"%3F")}function eu(e){return Xc(e).replace(Fc,"%2F")}function In(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const tu=/\/$/,nu=e=>e.replace(tu,"");function Ms(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),r=t.slice(a,l>0?l:t.length),o=e(r.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=iu(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:In(i)}}function su(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function cr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ou(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&un(t.matched[s],n.matched[o])&&qi(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function un(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qi(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ru(e[n],t[n]))return!1;return!0}function ru(e,t){return ut(e)?ur(e,t):ut(t)?ur(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function ur(e,t){return ut(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function iu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,i,l;for(i=0;i1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const jt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ys=(function(e){return e.pop="pop",e.push="push",e})({}),Ds=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function lu(e){if(!e)if(nn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),nu(e)}const au=/^[^#]+#/;function cu(e,t){return e.replace(au,"#")+t}function uu(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 ws=()=>({left:window.scrollX,top:window.scrollY});function fu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=uu(o,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 fr(e,t){return(history.state?history.state.position-t:-1)+e}const Zs=new Map;function du(e,t){Zs.set(e,t)}function pu(e){const t=Zs.get(e);return Zs.delete(e),t}function hu(e){return typeof e=="string"||e&&typeof e=="object"}function Gi(e){return typeof e=="string"||typeof e=="symbol"}let Pe=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Ji=Symbol("");Pe.MATCHER_NOT_FOUND+"",Pe.NAVIGATION_GUARD_REDIRECT+"",Pe.NAVIGATION_ABORTED+"",Pe.NAVIGATION_CANCELLED+"",Pe.NAVIGATION_DUPLICATED+"";function fn(e,t){return me(new Error,{type:e,[Ji]:!0},t)}function St(e,t){return e instanceof Error&&Ji in e&&(t==null||!!(e.type&t))}const mu=["params","query","hash"];function vu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of mu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function gu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qs(o)):[s&&Qs(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function _u(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ut(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const yu=Symbol(""),pr=Symbol(""),$s=Symbol(""),$o=Symbol(""),Xs=Symbol("");function vn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ft(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,a)=>{const u=g=>{g===!1?a(fn(Pe.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?a(g):hu(g)?a(fn(Pe.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&s.enterCallbacks[o]===i&&typeof g=="function"&&i.push(g),l())},c=r(()=>e.call(s&&s.instances[o],t,n,u));let p=Promise.resolve(c);e.length<3&&(p=p.then(u)),p.catch(g=>a(g))})}function Ls(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Hi(a)){const u=(a.__vccOpts||a)[t];u&&r.push(Ft(u,n,s,i,l,o))}else{let u=a();r.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const p=Hc(c)?c.default:c;i.mods[l]=c,i.components[l]=p;const g=(p.__vccOpts||p)[t];return g&&Ft(g,n,s,i,l,o)()}))}}return r}function bu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;iun(u,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(u=>un(u,a))||o.push(a))}return[n,s,o]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */let wu=()=>location.protocol+"//"+location.host;function Qi(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),cr(l,"")}return cr(n,e)+s+o}function $u(e,t,n,s){let o=[],r=[],i=null;const l=({state:g})=>{const h=Qi(e,location),w=n.value,x=t.value;let R=0;if(g){if(n.value=h,t.value=g,i&&i===w){i=null;return}R=x?g.position-x.position:0}else s(h);o.forEach(M=>{M(n.value,w,{delta:R,type:Ys.pop,direction:R?R>0?Ds.forward:Ds.back:Ds.unknown})})};function a(){i=n.value}function u(g){o.push(g);const h=()=>{const w=o.indexOf(g);w>-1&&o.splice(w,1)};return r.push(h),h}function c(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(me({},g.state,{scroll:ws()}),"")}}function p(){for(const g of r)g();r=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:a,listen:u,destroy:p}}function hr(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?ws():null}}function ku(e){const{history:t,location:n}=window,s={value:Qi(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(a,u,c){const p=e.indexOf("#"),g=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+a:wu()+e+a;try{t[c?"replaceState":"pushState"](u,"",g),o.value=u}catch(h){console.error(h),n[c?"replace":"assign"](g)}}function i(a,u){r(a,me({},t.state,hr(o.value.back,a,o.value.forward,!0),u,{position:o.value.position}),!0),s.value=a}function l(a,u){const c=me({},o.value,t.state,{forward:a,scroll:ws()});r(c.current,c,!0),r(a,me({},hr(s.value,a,null),{position:c.position+1},u),!1),s.value=a}return{location:s,state:o,push:l,replace:i}}function Eu(e){e=lu(e);const t=ku(e),n=$u(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=me({location:"",base:e,go:s,createHref:cu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Su(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Eu(e)}let Qt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Le=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Le||{});const Cu={type:Qt.Static,value:""},xu=/[a-zA-Z0-9_]/;function Ru(e){if(!e)return[[]];if(e==="/")return[[Cu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=Le.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,a,u="",c="";function p(){u&&(n===Le.Static?r.push({type:Qt.Static,value:u}):n===Le.Param||n===Le.ParamRegExp||n===Le.ParamRegExpEnd?(r.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Qt.Param,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function g(){u+=a}for(;lt.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function Yi(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const Iu={strict:!1,end:!0,sensitive:!1};function Nu(e,t,n){const s=Ou(Ru(e.path),n),o=me(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Vu(e,t){const n=[],s=new Map;t=ar(Iu,t);function o(p){return s.get(p)}function r(p,g,h){const w=!h,x=_r(p);x.aliasOf=h&&h.record;const R=ar(t,p),M=[x];if("alias"in p){const b=typeof p.alias=="string"?[p.alias]:p.alias;for(const q of b)M.push(_r(me({},x,{components:h?h.record.components:x.components,path:q,aliasOf:h?h.record:x})))}let k,C;for(const b of M){const{path:q}=b;if(g&&q[0]!=="/"){const F=g.record.path,ne=F[F.length-1]==="/"?"":"/";b.path=g.record.path+(q&&ne+q)}if(k=Nu(b,g,R),h?h.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),w&&p.name&&!yr(k)&&i(p.name)),Zi(k)&&a(k),x.children){const F=x.children;for(let ne=0;ne{i(C)}:Sn}function i(p){if(Gi(p)){const g=s.get(p);g&&(s.delete(p),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(p);g>-1&&(n.splice(g,1),p.record.name&&s.delete(p.record.name),p.children.forEach(i),p.alias.forEach(i))}}function l(){return n}function a(p){const g=Lu(p,n);n.splice(g,0,p),p.record.name&&!yr(p)&&s.set(p.record.name,p)}function u(p,g){let h,w={},x,R;if("name"in p&&p.name){if(h=s.get(p.name),!h)throw fn(Pe.MATCHER_NOT_FOUND,{location:p});R=h.record.name,w=me(gr(g.params,h.keys.filter(C=>!C.optional).concat(h.parent?h.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),p.params&&gr(p.params,h.keys.map(C=>C.name))),x=h.stringify(w)}else if(p.path!=null)x=p.path,h=n.find(C=>C.re.test(x)),h&&(w=h.parse(x),R=h.record.name);else{if(h=g.name?s.get(g.name):n.find(C=>C.re.test(g.path)),!h)throw fn(Pe.MATCHER_NOT_FOUND,{location:p,currentLocation:g});R=h.record.name,w=me({},g.params,p.params),x=h.stringify(w)}const M=[];let k=h;for(;k;)M.unshift(k.record),k=k.parent;return{name:R,path:x,params:w,matched:M,meta:Du(M)}}e.forEach(p=>r(p));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:o}}function gr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function _r(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Mu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Mu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function yr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Du(e){return e.reduce((t,n)=>me(t,n.meta),{})}function Lu(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Yi(e,t[r])<0?s=r:n=r+1}const o=Uu(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Uu(e){let t=e;for(;t=t.parent;)if(Zi(t)&&Yi(e,t)===0)return t}function Zi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function br(e){const t=lt($s),n=lt($o),s=Te(()=>{const a=_t(e.to);return t.resolve(a)}),o=Te(()=>{const{matched:a}=s.value,{length:u}=a,c=a[u-1],p=n.matched;if(!c||!p.length)return-1;const g=p.findIndex(un.bind(null,c));if(g>-1)return g;const h=wr(a[u-2]);return u>1&&wr(c)===h&&p[p.length-1].path!==h?p.findIndex(un.bind(null,a[u-2])):g}),r=Te(()=>o.value>-1&&zu(n.params,s.value.params)),i=Te(()=>o.value>-1&&o.value===n.matched.length-1&&qi(n.params,s.value.params));function l(a={}){if(Fu(a)){const u=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(Sn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:Te(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function ju(e){return e.length===1?e[0]:e}const Hu=Ze({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:br,setup(e,{slots:t}){const n=hs(br(e)),{options:s}=lt($s),o=Te(()=>({[$r(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[$r(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&ju(t.default(n));return e.custom?r:Mi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),Bu=Hu;function Fu(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function zu(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!ut(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function wr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $r=(e,t,n)=>e??t??n,Ku=Ze({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=lt(Xs),o=Te(()=>e.route||s.value),r=lt(pr,0),i=Te(()=>{let u=_t(r);const{matched:c}=o.value;let p;for(;(p=c[u])&&!p.components;)u++;return u}),l=Te(()=>o.value.matched[i.value]);Wn(pr,Te(()=>i.value+1)),Wn(yu,l),Wn(Xs,o);const a=V();return Wt(()=>[a.value,l.value,e.name],([u,c,p],[g,h,w])=>{c&&(c.instances[p]=u,h&&h!==c&&u&&u===g&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!un(c,h)||!g)&&(c.enterCallbacks[p]||[]).forEach(x=>x(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,p=l.value,g=p&&p.components[c];if(!g)return kr(n.default,{Component:g,route:u});const h=p.props[c],w=h?h===!0?u.params:typeof h=="function"?h(u):h:null,R=Mi(g,me({},w,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(p.instances[c]=null)},ref:a}));return kr(n.default,{Component:R,route:u})||R}}});function kr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Wu=Ku;function qu(e){const t=Vu(e.routes,e),n=e.parseQuery||gu,s=e.stringifyQuery||dr,o=e.history,r=vn(),i=vn(),l=vn(),a=ql(jt);let u=jt;nn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Vs.bind(null,T=>""+T),p=Vs.bind(null,eu),g=Vs.bind(null,In);function h(T,W){let B,Y;return Gi(T)?(B=t.getRecordMatcher(T),Y=W):Y=T,t.addRoute(Y,B)}function w(T){const W=t.getRecordMatcher(T);W&&t.removeRoute(W)}function x(){return t.getRoutes().map(T=>T.record)}function R(T){return!!t.getRecordMatcher(T)}function M(T,W){if(W=me({},W||a.value),typeof T=="string"){const y=Ms(n,T,W.path),O=t.resolve({path:y.path},W),P=o.createHref(y.fullPath);return me(y,O,{params:g(O.params),hash:In(y.hash),redirectedFrom:void 0,href:P})}let B;if(T.path!=null)B=me({},T,{path:Ms(n,T.path,W.path).path});else{const y=me({},T.params);for(const O in y)y[O]==null&&delete y[O];B=me({},T,{params:p(y)}),W.params=p(W.params)}const Y=t.resolve(B,W),fe=T.hash||"";Y.params=c(g(Y.params));const d=su(s,me({},T,{hash:Yc(fe),path:Y.path})),v=o.createHref(d);return me({fullPath:d,hash:fe,query:s===dr?_u(T.query):T.query||{}},Y,{redirectedFrom:void 0,href:v})}function k(T){return typeof T=="string"?Ms(n,T,a.value.path):me({},T)}function C(T,W){if(u!==T)return fn(Pe.NAVIGATION_CANCELLED,{from:W,to:T})}function b(T){return ne(T)}function q(T){return b(me(k(T),{replace:!0}))}function F(T,W){const B=T.matched[T.matched.length-1];if(B&&B.redirect){const{redirect:Y}=B;let fe=typeof Y=="function"?Y(T,W):Y;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=k(fe):{path:fe},fe.params={}),me({query:T.query,hash:T.hash,params:fe.path!=null?{}:T.params},fe)}}function ne(T,W){const B=u=M(T),Y=a.value,fe=T.state,d=T.force,v=T.replace===!0,y=F(B,Y);if(y)return ne(me(k(y),{state:typeof y=="object"?me({},fe,y.state):fe,force:d,replace:v}),W||B);const O=B;O.redirectedFrom=W;let P;return!d&&ou(s,Y,B)&&(P=fn(Pe.NAVIGATION_DUPLICATED,{to:O,from:Y}),ue(Y,Y,!0,!1)),(P?Promise.resolve(P):K(O,Y)).catch(A=>St(A)?St(A,Pe.NAVIGATION_GUARD_REDIRECT)?A:Q(A):j(A,O,Y)).then(A=>{if(A){if(St(A,Pe.NAVIGATION_GUARD_REDIRECT))return ne(me({replace:v},k(A.to),{state:typeof A.to=="object"?me({},fe,A.to.state):fe,force:d}),W||O)}else A=z(O,Y,!0,v,fe);return Ae(O,Y,A),A})}function xe(T,W){const B=C(T,W);return B?Promise.reject(B):Promise.resolve()}function oe(T){const W=Se.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(T):T()}function K(T,W){let B;const[Y,fe,d]=bu(T,W);B=Ls(Y.reverse(),"beforeRouteLeave",T,W);for(const y of Y)y.leaveGuards.forEach(O=>{B.push(Ft(O,T,W))});const v=xe.bind(null,T,W);return B.push(v),pe(B).then(()=>{B=[];for(const y of r.list())B.push(Ft(y,T,W));return B.push(v),pe(B)}).then(()=>{B=Ls(fe,"beforeRouteUpdate",T,W);for(const y of fe)y.updateGuards.forEach(O=>{B.push(Ft(O,T,W))});return B.push(v),pe(B)}).then(()=>{B=[];for(const y of d)if(y.beforeEnter)if(ut(y.beforeEnter))for(const O of y.beforeEnter)B.push(Ft(O,T,W));else B.push(Ft(y.beforeEnter,T,W));return B.push(v),pe(B)}).then(()=>(T.matched.forEach(y=>y.enterCallbacks={}),B=Ls(d,"beforeRouteEnter",T,W,oe),B.push(v),pe(B))).then(()=>{B=[];for(const y of i.list())B.push(Ft(y,T,W));return B.push(v),pe(B)}).catch(y=>St(y,Pe.NAVIGATION_CANCELLED)?y:Promise.reject(y))}function Ae(T,W,B){l.list().forEach(Y=>oe(()=>Y(T,W,B)))}function z(T,W,B,Y,fe){const d=C(T,W);if(d)return d;const v=W===jt,y=nn?history.state:{};B&&(Y||v?o.replace(T.fullPath,me({scroll:v&&y&&y.scroll},fe)):o.push(T.fullPath,fe)),a.value=T,ue(T,W,B,v),Q()}let we;function Me(){we||(we=o.listen((T,W,B)=>{if(!Ce.listening)return;const Y=M(T),fe=F(Y,Ce.currentRoute.value);if(fe){ne(me(fe,{replace:!0,force:!0}),Y).catch(Sn);return}u=Y;const d=a.value;nn&&du(fr(d.fullPath,B.delta),ws()),K(Y,d).catch(v=>St(v,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_CANCELLED)?v:St(v,Pe.NAVIGATION_GUARD_REDIRECT)?(ne(me(k(v.to),{force:!0}),Y).then(y=>{St(y,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&!B.delta&&B.type===Ys.pop&&o.go(-1,!1)}).catch(Sn),Promise.reject()):(B.delta&&o.go(-B.delta,!1),j(v,Y,d))).then(v=>{v=v||z(Y,d,!1),v&&(B.delta&&!St(v,Pe.NAVIGATION_CANCELLED)?o.go(-B.delta,!1):B.type===Ys.pop&&St(v,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Ae(Y,d,v)}).catch(Sn)}))}let Ve=vn(),Ee=vn(),H;function j(T,W,B){Q(T);const Y=Ee.list();return Y.length?Y.forEach(fe=>fe(T,W,B)):console.error(T),Promise.reject(T)}function X(){return H&&a.value!==jt?Promise.resolve():new Promise((T,W)=>{Ve.add([T,W])})}function Q(T){return H||(H=!T,Me(),Ve.list().forEach(([W,B])=>T?B(T):W()),Ve.reset()),T}function ue(T,W,B,Y){const{scrollBehavior:fe}=e;if(!nn||!fe)return Promise.resolve();const d=!B&&pu(fr(T.fullPath,0))||(Y||!B)&&history.state&&history.state.scroll||null;return Mn().then(()=>fe(T,W,d)).then(v=>v&&fu(v)).catch(v=>j(v,T,W))}const ae=T=>o.go(T);let Oe;const Se=new Set,Ce={currentRoute:a,listening:!0,addRoute:h,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:x,resolve:M,options:e,push:b,replace:q,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:Ee.add,isReady:X,install(T){T.component("RouterLink",Bu),T.component("RouterView",Wu),T.config.globalProperties.$router=Ce,Object.defineProperty(T.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(a)}),nn&&!Oe&&a.value===jt&&(Oe=!0,b(o.location).catch(Y=>{}));const W={};for(const Y in jt)Object.defineProperty(W,Y,{get:()=>a.value[Y],enumerable:!0});T.provide($s,Ce),T.provide($o,Zr(W)),T.provide(Xs,a);const B=T.unmount;Se.add(T),T.unmount=function(){Se.delete(T),Se.size<1&&(u=jt,we&&we(),we=null,a.value=jt,Oe=!1,H=!1),B()}}};function pe(T){return T.reduce((W,B)=>W.then(()=>oe(B)),Promise.resolve())}return Ce}function ko(){return lt($s)}function Ln(e){return lt($o)}const eo="zeyu.wiki.token";function le(){return localStorage.getItem(eo)||""}function Xi(e){e?localStorage.setItem(eo,e):localStorage.removeItem(eo)}const Eo=new Set;function Gu(e){const t=e.trim().replace(/^\/+|\.md$/g,"");t&&Eo.add(t)}function Lm(){return[...Eo]}function Um(e){const t=e.replace(/\.md$/i,"");for(const n of Eo)if(n.split("/").pop()===t)return`${n}.md`;return null}let Er=0;function ot(){const e=Date.now();if(location.hash.startsWith("#/login")||e-Er<5e3)return;Er=e;const t=location.hash.startsWith("#")&&location.hash.slice(1)||"/";location.hash=`#/login?next=${encodeURIComponent(t)}`}async function ke(e,t={}){const{auth:n=!0,...s}=t,o={"Content-Type":"application/json",...s.headers};n&&le()&&(o.Authorization=`Bearer ${le()}`);const r=await fetch(e,{...s,headers:o});if(r.status===401)throw ot(),new Error("unauthorized");if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}function Ju(e){const t=e&&typeof e=="object"?e:{};return t.ok===!0||typeof t.ok>"u"&&!t.error}const So=()=>"ui",Un=e=>e.split("/").map(encodeURIComponent).join("/");function jm(e){return e&&typeof e=="object"?e:{}}function Hm(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s)return s;if(typeof s=="number")return String(s)}}const el=()=>ke("/api/categories"),Co=e=>{const t=new URLSearchParams;return e.category&&t.set("category",e.category),e.tag&&t.set("tag",e.tag),t.set("page",String(e.page??1)),t.set("size",String(e.size??500)),ke(`/api/pages?${t}`)},Qu=(e,t=30)=>ke(`/api/search?q=${encodeURIComponent(e)}&limit=${t}`),Bm=()=>ke("/api/tags"),Yu=e=>ke(`/wiki/${e.split("/").map(encodeURIComponent).join("/")}`),Sr=e=>ke(`/api/pages/${Un(e)}?uncached=1`,{auth:!1});class tl extends Error{constructor(n){super("conflict: 页面已被他人修改");Ao(this,"currentRev");this.currentRev=n}}async function Cr(e,t,n){const s={"Content-Type":"application/json"};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch(`/api/pages/${Un(e)}`,{method:"POST",headers:s,body:JSON.stringify({content:t,actor:So(),base_rev:n??void 0})}),r=await o.json().catch(()=>({}));if(o.status===409||r.conflict===!0)throw new tl(String(r.current_rev??""));if(!o.ok)throw new Error(String(r.error??`HTTP ${o.status}`));return Ju(r)&&Gu(e),r}const Zu=e=>ke(`/api/pages/${Un(e)}`,{method:"DELETE"});async function nl(e,t,n=!1){return ke("/api/move",{method:"POST",body:JSON.stringify({path:e,to:t,actor:So(),sync_links:n})})}function Xu(e){return nl(e,e,!1).then(t=>t.backlinks??[])}const Fm=()=>ke("/api/trash"),zm=(e,t)=>ke("/api/restore",{method:"POST",body:JSON.stringify({path:t,trash_name:e,dest:t,actor:So()})}),Km=e=>{const t=new URLSearchParams;e!=null&&e.focus&&t.set("focus",e.focus),e!=null&&e.depth&&t.set("depth",String(e.depth));const n=t.toString();return ke(`/api/graph${n?"?"+n:""}`)},ef=(e=12)=>ke(`/api/recommend?n=${e}`);async function tf(e,t,n,s=""){const o={"Content-Type":"application/json"};le()&&(o.Authorization=`Bearer ${le()}`);const r=await fetch("/api/convert",{method:"POST",headers:o,body:JSON.stringify({content:n,from:e,to:t,title:s,download:!0})});if(r.status===401)throw ot(),new Error("unauthorized");if(!r.ok){let i=`HTTP ${r.status}`;try{const l=await r.json();l!=null&&l.error&&(i=l.error)}catch{}throw new Error(i)}return r.blob()}async function nf(e){return(await ke(`/api/attachments?page=${encodeURIComponent(e)}`)).attachments??[]}async function sf(e,t){const n=new FormData;for(const r of t)n.append("file",r,r.name);const s={};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch(`/api/attachments/${Un(e)}`,{method:"POST",headers:s,body:n});if(o.status===401)throw ot(),new Error("unauthorized");if(!o.ok)throw new Error(`上传失败 HTTP ${o.status}`);return o.json()}const of=(e,t)=>ke(`/api/attachments/${Un(e)}/${encodeURIComponent(t)}`,{method:"DELETE"});async function Wm(){return(await ke("/api/tables")).tables??[]}const qm=(e,t)=>ke("/api/tables",{method:"POST",body:JSON.stringify({title:e,schema:t})}),Gm=e=>ke(`/api/tables/${encodeURIComponent(e)}`,{method:"DELETE"});async function Jm(e){return(await ke(`/api/tables/${encodeURIComponent(e)}/rows?size=200`)).rows??[]}const Qm=(e,t)=>ke(`/api/tables/${encodeURIComponent(e)}/rows`,{method:"POST",body:JSON.stringify(t)}),Ym=(e,t,n)=>ke(`/api/tables/${encodeURIComponent(e)}/rows/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(n)}),Zm=(e,t)=>ke(`/api/tables/${encodeURIComponent(e)}/rows/${encodeURIComponent(t)}`,{method:"DELETE"}),Xm=(e,t)=>ke(`/api/tables/${encodeURIComponent(e)}/import.csv`,{method:"POST",body:JSON.stringify({csv:t})});async function ev(e,t,n){const s={};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch(`/api/tables/${encodeURIComponent(e)}/export.${n}`,{headers:s});if(o.status===401)throw ot(),new Error("unauthorized");if(!o.ok)throw new Error(`导出失败 HTTP ${o.status}`);const r=await o.blob(),i=document.createElement("a");i.href=URL.createObjectURL(r),i.download=`${t||e}.${n}`,i.click(),URL.revokeObjectURL(i.href)}async function rf(e,t="imports"){const n=new FormData;n.append("file",e,e.name);const s={};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch(`/api/import?category=${encodeURIComponent(t)}`,{method:"POST",headers:s,body:n});if(o.status===401)throw ot(),new Error("unauthorized");if(!o.ok){let r=`HTTP ${o.status}`;try{const i=await o.json();i!=null&&i.error&&(r=i.error)}catch{}throw new Error(r)}return o.json()}const lf=(e,t="imports")=>ke("/api/import",{method:"POST",body:JSON.stringify({url:e,category:t})});async function af(){return(await ke("/api/import/queue")).items??[]}const cf=(e,t,n)=>ke(`/api/import/queue/${encodeURIComponent(e)}/confirm`,{method:"POST",body:JSON.stringify({page_path:t,tags:n})});async function uf(e,t="github-collect"){const n=`https://github.com/search?q=${encodeURIComponent(e)}&type=repositories`,s={"Content-Type":"application/json"};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch("/api/import",{method:"POST",headers:s,body:JSON.stringify({url:n,category:t})}),r=await o.json().catch(()=>({}));if(!o.ok||r.error)throw new Error(typeof r.error=="string"&&r.error?r.error:`HTTP ${o.status}`);return r}const ff=()=>ke("/api/ops/cron");async function df(e){const t={"Content-Type":"application/json"};le()&&(t.Authorization=`Bearer ${le()}`);const n=await fetch(`/api/ops/jobs/${encodeURIComponent(e)}/run`,{method:"POST",headers:t}),s=await n.json().catch(()=>({}));if(!n.ok||s.error)throw new Error(typeof s.error=="string"&&s.error?s.error:`HTTP ${n.status}`);return s}const sl=()=>ke("/api/ops/health/deep",{auth:!1}),pf=(e=1)=>{const t={};return le()&&(t.Authorization=`Bearer ${le()}`),fetch(`/api/ai/trends?days=${e}`,{headers:t}).then(async n=>{if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()})},tv=e=>{const t=new URLSearchParams;t.set("limit",String(e.limit)),e!=null&&e.offset&&t.set("offset",String(e.offset)),e!=null&&e.action&&t.set("action",e.action),e!=null&&e.actor&&t.set("actor",e.actor);const n={};return le()&&(n.Authorization=`Bearer ${le()}`),fetch(`/api/audit/recent?${t}`,{headers:n}).then(async s=>{if(s.status===401)throw ot(),new Error("unauthorized");if(!s.ok)throw new Error(`HTTP ${s.status}`);return s.json()})},hf={key:0,class:"sidebar mini","aria-label":"页面目录(折叠)"},mf={class:"mini-bottom"},vf={class:"head"},gf={class:"head-actions"},_f={class:"treebox"},yf={class:"tabs",role:"tablist"},bf=["aria-selected"],wf=["aria-selected"],$f={class:"tree"},kf=["id"],Ef={class:"group-title"},Sf={class:"cats"},Cf=["onClick"],xf={class:"cname"},Rf={class:"ccount"},Tf={class:"foot"},Af=Ze({__name:"Sidebar",props:{open:{type:Boolean,default:!1},openModifiers:{}},emits:Sa(["close"],["update:open"]),setup(e,{expose:t,emit:n}){const s=hi(e,"open"),o=n,r=Ln(),i=V([]),l=V({}),a=V(""),u=V(localStorage.getItem("zeyu.wiki.sbCollapsed")==="1"),c=V(matchMedia("(max-width: 768px)").matches);matchMedia("(max-width: 768px)").addEventListener("change",M=>{c.value=M.matches});const p=Te(()=>u.value&&!c.value);function g(){u.value=!u.value,localStorage.setItem("zeyu.wiki.sbCollapsed",u.value?"1":"0")}const h=V("tree");function w(M){h.value="tree",requestAnimationFrame(()=>{var k;(k=document.getElementById(`sb-group-${CSS.escape(M)}`))==null||k.scrollIntoView({block:"start"})})}const x=M=>!/^(?:_|index\.md$|log\.md$|SCHEMA\.md$|imports?$|e2e$)/.test(M.name);async function R(){i.value=(await el()).filter(x);for(const M of i.value){const k=await Co({category:M.name,size:500});l.value[M.name]=k.pages}}return Wt(()=>r.fullPath,()=>{a.value=r.path.startsWith("/wiki/")?decodeURIComponent(r.path.slice(6)):"",s.value&&o("close")}),kt(()=>{R()}),t({load:R}),(M,k)=>{const C=Ut("router-link");return p.value?($(),S("aside",hf,[f("div",{class:"mini-top"},[f("button",{class:"icon","aria-label":"展开侧栏",title:"展开",onClick:g},"»")]),f("div",mf,[de(C,{to:"/edit/new",class:"icon","aria-label":"新建页面",title:"新建"},{default:$e(()=>[...k[3]||(k[3]=[te("➕",-1)])]),_:1}),de(C,{to:"/trending",class:"icon","aria-label":"GitHub Trending",title:"GitHub"},{default:$e(()=>[...k[4]||(k[4]=[te("🐙",-1)])]),_:1}),de(C,{to:"/manage",class:"icon","aria-label":"管理",title:"管理"},{default:$e(()=>[...k[5]||(k[5]=[te("⚙️",-1)])]),_:1})])])):($(),S("aside",{key:1,class:_e(["sidebar",{open:s.value}]),"aria-label":"页面目录"},[f("div",vf,[de(C,{to:"/",class:"brand"},{default:$e(()=>[...k[6]||(k[6]=[f("span",{class:"logo"},"📚",-1),f("span",{class:"bname"},"ZeyuWiki",-1)])]),_:1}),f("div",gf,[f("button",{class:"icon desktop-collapse","aria-label":"折叠侧栏",title:"折叠",onClick:g},"«"),f("button",{class:"icon mobile-only","aria-label":"关闭目录",onClick:k[0]||(k[0]=b=>o("close"))},"✕")])]),f("div",_f,[f("div",yf,[f("button",{class:_e(["tab",{on:h.value==="tree"}]),role:"tab","aria-selected":h.value==="tree",onClick:k[1]||(k[1]=b=>h.value="tree")},"目录",10,bf),f("button",{class:_e(["tab",{on:h.value==="cats"}]),role:"tab","aria-selected":h.value==="cats",onClick:k[2]||(k[2]=b=>h.value="cats")},"分类",10,wf)]),Ie(f("nav",$f,[($(!0),S(se,null,ye(i.value,b=>($(),S("div",{id:`sb-group-${b.name}`,key:b.name,class:"group"},[f("div",Ef,N(b.name)+" ("+N(b.count)+")",1),($(!0),S(se,null,ye(l.value[b.name]||[],q=>($(),$t(C,{key:q.path,to:`/wiki/${q.path}`,class:_e(["item",{active:q.path===a.value}])},{default:$e(()=>[te(N(q.title),1)]),_:2},1032,["to","class"]))),128))],8,kf))),128)),k[7]||(k[7]=f("div",{class:"tree-tail-spacer","aria-hidden":"true"},null,-1))],512),[[rs,h.value==="tree"]]),Ie(f("nav",Sf,[($(!0),S(se,null,ye(i.value,b=>($(),S("button",{key:b.name,class:"catrow",onClick:q=>w(b.name)},[f("span",xf,N(b.name),1),f("span",Rf,N(b.count),1)],8,Cf))),128)),k[8]||(k[8]=f("div",{class:"tree-tail-spacer","aria-hidden":"true"},null,-1))],512),[[rs,h.value==="cats"]])]),f("div",Tf,[de(C,{to:"/manage",class:"foot-btn manage"},{default:$e(()=>[...k[9]||(k[9]=[te("⚙️ 管理",-1)])]),_:1}),de(C,{to:"/trending",class:"foot-btn gh"},{default:$e(()=>[...k[10]||(k[10]=[te("🐙 GitHub",-1)])]),_:1}),de(C,{to:"/edit/new",class:"foot-btn create"},{default:$e(()=>[...k[11]||(k[11]=[te("➕ 新建",-1)])]),_:1})])],2))}}}),rt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Of=rt(Af,[["__scopeId","data-v-c0dcae59"]]),xr="zeyu.wiki.theme";function ol(){const e=V(localStorage.getItem(xr)||"dark");function t(){document.documentElement.dataset.theme=e.value}function n(){t()}function s(){e.value=e.value==="dark"?"light":"dark"}return Wt(e,o=>{localStorage.setItem(xr,o),t()}),{theme:e,init:n,toggle:s}}const Pf={class:"topbar"},If={class:"left"},Nf={class:"right"},Vf=["value"],Mf=["aria-label"],Df=["aria-label","title"],Lf=Ze({__name:"Topbar",emits:["toggle-sidebar"],setup(e,{emit:t}){const{theme:n,toggle:s}=ol(),o=Ln(),r=ko(),i=V(!!le()),l=Te(()=>o.path==="/"||o.path===""),a=`${location.protocol}//${location.hostname}/`;function u(){var g;(g=r.options.history.state)!=null&&g.back?r.back():r.push("/")}function c(){Xi(""),i.value=!1,r.push("/")}function p(g){const h=g.target.querySelector("input").value.trim();h&&(location.hash=`#/search?q=${encodeURIComponent(h)}`)}return(g,h)=>($(),S("header",Pf,[f("div",If,[f("button",{class:"icon mobile-only","aria-label":"打开目录",onClick:h[0]||(h[0]=w=>g.$emit("toggle-sidebar"))},"☰"),f("a",{href:a,class:"home","aria-label":"门户首页",title:"回到门户首页"},"🏠 首页"),l.value?J("",!0):($(),S("button",{key:0,class:"icon back","aria-label":"返回",title:"返回",onClick:u},"←"))]),f("div",Nf,[f("form",{class:"search",role:"search",onSubmit:Mt(p,["prevent"])},[f("input",{value:g.$route.query.q||"",type:"search",placeholder:"搜索 wiki…(/ 聚焦)","aria-label":"搜索",onInput:h[1]||(h[1]=w=>w.target.value.length>1&&g.$router.replace({path:"/search",query:{q:w.target.value}}))},null,40,Vf)],32),f("button",{class:"icon","aria-label":_t(n)==="dark"?"切换亮色":"切换暗色",title:"主题",onClick:h[2]||(h[2]=(...w)=>_t(s)&&_t(s)(...w))},"🌓",8,Mf),f("button",{class:"icon","aria-label":i.value?"退出登录":"登录",title:i.value?"退出登录":"登录(写入需要 Token)",onClick:h[3]||(h[3]=w=>i.value?c():_t(r).push("/login"))},"👤",8,Df)])]))}}),Uf=rt(Lf,[["__scopeId","data-v-729262a7"]]);async function jf(e,t,n){var a,u,c,p,g;const s={"Content-Type":"application/json"};le()&&(s.Authorization=`Bearer ${le()}`);const o=await fetch("/api/ai/ask/stream",{method:"POST",headers:s,body:JSON.stringify({query:e}),signal:n});if(o.status===401)throw ot(),new Error("unauthorized");if(!o.ok||!o.body)throw new Error(`HTTP ${o.status}`);const r=o.body.getReader(),i=new TextDecoder;let l="";for(;;){const{done:h,value:w}=await r.read();if(h)break;l+=i.decode(w,{stream:!0});let x;for(;(x=l.indexOf(` `))>=0;){const R=l.slice(0,x);l=l.slice(x+2);let M="message";const k=[];for(const b of R.split(` `))b.startsWith("event:")?M=b.slice(6).trim():b.startsWith("data:")&&k.push(b.slice(5).trimStart());if(!k.length)continue;const C=k.join(` `);if(M==="sources")try{(a=t.onSources)==null||a.call(t,JSON.parse(C))}catch{}else if(M==="delta")(u=t.onDelta)==null||u.call(t,C);else if(M==="hint")(c=t.onHint)==null||c.call(t,C);else if(M==="done")try{(p=t.onDone)==null||p.call(t,JSON.parse(C).llm===!0)}catch{(g=t.onDone)==null||g.call(t,!0)}}}}const Hf={key:0,class:"ask-panel"},Bf={class:"ask-head"},Ff={key:0,class:"degraded"},zf={key:0,class:"ask-hint"},Kf={key:1,class:"ask-sources"},Wf=["href"],qf={key:2,class:"slide-bar"},Gf=["disabled"],Jf={key:0,class:"slide-draft"},Qf={key:3,class:"ask-answer"},Yf={key:0,class:"cursor"},Zf={key:4,class:"ask-waiting"},Xf={class:"mode-row"},ed={key:0,class:"stage"},td=["disabled"],nd=["disabled"],sd=Ze({__name:"AskPanel",setup(e){const t=V(!1),n=V(""),s=V(""),o=V([]),r=V(""),i=V(!1),l=V(null);let a=null;const u=V(null),c=V("quick"),p=V(""),g=V(!1),h=V("");async function w(q){g.value=!0,p.value="scheduled",h.value="";try{const F=await ke("/api/ai/ask",{method:"POST",body:JSON.stringify({query:q,mode:"deep",actor:"askpanel-deep"})}),ne=F.report_id||F.id||"";if(!ne)throw new Error("入队失败:"+String(F.error??"无任务 id"));const xe={};le()&&(xe.Authorization=`Bearer ${le()}`);const oe=await fetch(`/api/ai/tasks/${encodeURIComponent(ne)}/events`,{headers:xe});if(!oe.ok||!oe.body)throw new Error(`events HTTP ${oe.status}`);const K=oe.body.getReader(),Ae=new TextDecoder;let z="";for(;;){const{done:we,value:Me}=await K.read();if(we)break;z+=Ae.decode(Me,{stream:!0});let Ve;for(;(Ve=z.indexOf(` `))>=0;){const Ee=z.slice(0,Ve);z=z.slice(Ve+2);let H="message",j="";for(const X of Ee.split(` `))X.startsWith("event:")?H=X.slice(6).trim():X.startsWith("data:")&&(j+=X.slice(5).trimStart());if(H==="status"&&j)try{p.value=JSON.parse(j).status||p.value}catch{}else if(H==="done"&&j)try{const X=JSON.parse(j);p.value=X.status||"done",X.link&&(h.value=location.origin+"/#"+X.link)}catch{p.value="done"}}}h.value&&(s.value+=` 📄 深度报告完成:${h.value}`)}catch(F){p.value="failed",s.value+=` [deep 失败: ${F.message}]`}finally{g.value=!1}}const x=V(!1),R=V("");async function M(){const q=s.value.trim();if(!(!q||x.value)){if(!le()){ot();return}x.value=!0,R.value="";try{const F=`_drafts/ask-${Date.now()}.md`,ne=`--- title: 问答 ${new Date().toISOString().slice(0,10)} tags: [ask, slides-src] category: _drafts --- # 问答 **Q:** ${n.value||"(本轮)"} ${q} `,xe=await fetch(`/api/pages/${encodeURIComponent(F)}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${le()}`},body:JSON.stringify({content:ne,actor:"ask-slides"})});if(!xe.ok)throw new Error(`落页 HTTP ${xe.status}`);const K=await(await fetch("/api/ai/slides",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${le()}`},body:JSON.stringify({path:F,pages:5})})).json();if(K!=null&&K.ok)R.value=K.draft_path,s.value+=` ✅ 幻灯草稿已生成:${K.draft_path}(${K.pages} 页)。到编辑页打开后可"导出 pptx"。`;else throw new Error((K==null?void 0:K.error)??"slides 生成失败")}catch(F){s.value+=` [幻灯生成失败: ${F.message}]`}finally{x.value=!1}}}function k(){t.value=!t.value,le()||ot()}function C(){a==null||a.abort(),a=null,i.value=!1}async function b(){const q=n.value.trim();if(!(!q||i.value)){if(c.value==="deep"){i.value=!0,await w(q),i.value=!1;return}s.value="",o.value=[],r.value="",l.value=null,i.value=!0,a=new AbortController;try{await jf(q,{onSources:F=>{o.value=F},onDelta:F=>{s.value+=F,Mn(()=>{var ne;return(ne=u.value)==null?void 0:ne.scrollTo({top:u.value.scrollHeight})})},onHint:F=>{r.value=F},onDone:F=>{l.value=F}},a.signal)}catch(F){F.name!=="AbortError"&&(s.value+=` [错误: ${F.message}]`)}finally{i.value=!1,a=null}}}return(q,F)=>($(),S(se,null,[f("button",{class:_e(["ask-fab",{active:t.value}]),"aria-label":"AI 问答",onClick:k},"✨",2),t.value?($(),S("div",Hf,[f("div",Bf,[f("span",null,[F[4]||(F[4]=te("✨ AI 问答 ",-1)),l.value===!1?($(),S("small",Ff,"(检索模式)")):J("",!0)]),f("button",{class:"x","aria-label":"关闭",onClick:F[0]||(F[0]=ne=>t.value=!1)},"✕")]),f("div",{ref_key:"bodyEl",ref:u,class:"ask-body"},[r.value?($(),S("div",zf,N(r.value),1)):J("",!0),o.value.length?($(),S("div",Kf,[F[5]||(F[5]=f("span",{class:"src-label"},"来源",-1)),($(!0),S(se,null,ye(o.value,ne=>($(),S("a",{key:ne.path,href:`#/wiki/${ne.path}`,class:"src-link"},N(ne.title||ne.path),9,Wf))),128))])):J("",!0),s.value&&!i.value&&l.value?($(),S("div",qf,[f("button",{class:"slide-btn",disabled:x.value,onClick:M},N(x.value?"生成中…":"🎞 生成幻灯"),9,Gf),R.value?($(),S("span",Jf,N(R.value),1)):J("",!0)])):J("",!0),s.value?($(),S("div",Qf,[te(N(s.value),1),i.value?($(),S("span",Yf,"▌")):J("",!0)])):i.value?($(),S("div",Zf,"检索知识库…")):J("",!0)],512),f("div",Xf,[f("button",{class:_e(["mb",{on:c.value==="quick"}]),onClick:F[1]||(F[1]=ne=>c.value="quick")},"⚡ 快速",2),f("button",{class:_e(["mb",{on:c.value==="deep"}]),onClick:F[2]||(F[2]=ne=>c.value="deep")},"🔬 深度",2),c.value==="deep"&&p.value?($(),S("span",ed,"阶段:"+N(p.value),1)):J("",!0)]),f("form",{class:"ask-form",onSubmit:Mt(b,["prevent"])},[Ie(f("input",{"onUpdate:modelValue":F[3]||(F[3]=ne=>n.value=ne),type:"text",placeholder:"问点什么…(Enter 发送)",disabled:i.value},null,8,td),[[ze,n.value]]),i.value?($(),S("button",{key:0,type:"button",class:"btn stop",onClick:C},"■")):($(),S("button",{key:1,type:"submit",class:"btn go",disabled:!n.value.trim()},"↑",8,nd))],32)])):J("",!0)],64))}}),od=rt(sd,[["__scopeId","data-v-d8f96cb6"]]),rd={class:"layout"},id={class:"main"},ld={class:"content"},ad=Ze({__name:"App",props:{open:{type:Boolean,default:!1},openModifiers:{}},emits:["update:open"],setup(e){const t=hi(e,"open"),{init:n}=ol();return n(),(()=>{const s=localStorage.getItem("zeyu.wiki.font"),o=s==="18"||s==="28"?s:"24";document.documentElement.style.setProperty("--md-fs",`${o}px`)})(),(s,o)=>{const r=Ut("router-view");return $(),S("div",rd,[de(Of,{open:t.value,onClose:o[0]||(o[0]=i=>t.value=!1)},null,8,["open"]),f("div",{class:_e(["mask",{show:t.value}]),onClick:o[1]||(o[1]=i=>t.value=!1)},null,2),f("div",id,[de(Uf,{onToggleSidebar:o[2]||(o[2]=i=>t.value=!t.value)}),f("main",ld,[($(),$t(r,{key:s.$route.fullPath}))])]),de(od)])}}}),cd={key:0,class:"empty"},ud={key:1,class:"md with-rail"},fd={class:"doc-main"},dd={class:"meta"},pd={key:0},hd={key:1},md={key:0,class:"export-bar"},vd=["title","aria-label"],gd=["disabled"],_d={class:"fs-group",role:"group","aria-label":"正文字号"},yd=["aria-pressed","title","onClick"],bd=["innerHTML"],wd={key:1,class:"related mobile-related","aria-label":"相关页推荐"},$d={class:"rel-grid"},kd={class:"rel-title"},Ed={class:"rel-sub"},Sd={class:"rel-reason"},Cd={class:"rail","aria-label":"页面工具与大纲"},xd={class:"rail-tools"},Rd=["title","aria-label"],Td=["disabled"],Ad=["aria-pressed","title"],Od={class:"rail-fs",role:"group","aria-label":"正文字号"},Pd=["aria-pressed","title","onClick"],Id={class:"rail-toc","aria-label":"本页大纲"},Nd=["href","onClick"],Vd={key:0,class:"rail-rel","aria-label":"相关推荐"},Md={class:"rr"},Dd=["src"],Ld={key:3,class:"empty"},Rr="zeyu.wiki.font",Tr="zeyu.wiki.outline",Ud=Ze({__name:"DetailView",props:{path:{}},setup(e){const t=e,n=V(null),s=V(""),o=["18","24","28"],r=localStorage.getItem(Rr),i=V(r==="18"||r==="28"?r:"24"),l=V(localStorage.getItem(Tr)!=="0");function a(){document.documentElement.style.setProperty("--md-fs",`${i.value}px`),localStorage.setItem(Rr,i.value)}function u(H){i.value=H,a()}function c(){l.value=!l.value,localStorage.setItem(Tr,l.value?"1":"0")}a();const p=V(matchMedia("(min-width: 1101px)").matches),g=matchMedia("(min-width: 1101px)"),h=H=>{p.value=H.matches};g.addEventListener("change",h),_o(()=>g.removeEventListener("change",h));const w=V([]);async function x(){w.value=[];try{const H=t.path.split("/").map(encodeURIComponent).join("/"),j=await fetch(`/api/related/${H}?n=6`);if(!j.ok)return;const X=await j.json();w.value=X.items??[]}catch{}}const R={链接:"🔗 链接",共链:"🔀 共链",相似:"✨ 相似"};function M(H){return`#/wiki/${H.split("/").map(encodeURIComponent).join("/")}`}const k=V(null),C=V(null),b=V(!1);async function q(){var H,j;if(!le()){ot();return}b.value=!0;try{const X=await fetch(`/api/pages/${t.path.split("/").map(encodeURIComponent).join("/")}?uncached=1`,{headers:{Authorization:`Bearer ${le()}`}});if(!X.ok)throw new Error(`HTTP ${X.status}`);const Q=await X.json(),ue={"Content-Type":"application/json"};ue.Authorization=`Bearer ${le()}`;const ae=await fetch("/api/convert",{method:"POST",headers:ue,body:JSON.stringify({content:Q.raw,from:"md",to:"pdf",title:((H=n.value)==null?void 0:H.title)??""})});if(!ae.ok){let Ce=`HTTP ${ae.status}`;try{const pe=await ae.json();pe!=null&&pe.error&&(Ce=pe.error)}catch{}throw new Error(Ce)}const Oe=await ae.blob(),Se=document.createElement("a");Se.href=URL.createObjectURL(Oe),Se.download=`${((j=n.value)==null?void 0:j.title)||t.path}.pdf`,Se.click(),URL.revokeObjectURL(Se.href)}catch(X){alert(`PDF 导出失败: ${X.message}`)}finally{b.value=!1}}const F=V("");async function ne(){const H=k.value;if(!H)return;const j=H.querySelectorAll("pre code.language-mermaid, pre:has(> code.language-mermaid)");if(!j.length)return;try{const ue=await Ue(()=>import("./mermaid-vendor-CgeO8NEs.js").then(Oe=>Oe.m),[]),ae=document.documentElement.dataset.theme==="light"?"default":"dark";ue.default.initialize({startOnLoad:!1,theme:ae,securityLevel:"strict"})}catch(ue){console.warn("mermaid load failed",ue);return}const X=(await Ue(async()=>{const{default:ue}=await import("./mermaid-vendor-CgeO8NEs.js").then(ae=>ae.m);return{default:ue}},[])).default;let Q=0;for(const ue of Array.from(j)){const ae=ue.closest("pre")??ue,Oe=ue.textContent??"",Se=`mmd-${Date.now()}-${Q++}`;try{const{svg:Ce}=await X.render(Se,Oe.trim()),pe=document.createElement("div");pe.className="mermaid-box",pe.innerHTML=Ce;const T=document.createElement("button");T.className="mmd-export",T.textContent="⬇ PNG",T.addEventListener("click",()=>void xe(pe,Se)),pe.appendChild(T),ae.replaceWith(pe)}catch{const Ce=document.createElement("div");Ce.className="mermaid-error",Ce.textContent="⚠ mermaid 渲染失败,显示原始代码",ae.prepend(Ce)}}}async function xe(H,j){const X=H.querySelector("svg");if(!X){alert("未找到 SVG(渲染可能失败)");return}try{const Q=new XMLSerializer().serializeToString(X),ue=URL.createObjectURL(new Blob([Q],{type:"image/svg+xml;charset=utf-8"})),ae=new Image;await new Promise((pe,T)=>{ae.onload=()=>pe(),ae.onerror=()=>T(new Error("svg 转图片失败")),ae.src=ue});const Oe=2,Se=document.createElement("canvas");Se.width=(ae.width||X.clientWidth||800)*Oe,Se.height=(ae.height||X.clientHeight||600)*Oe;const Ce=Se.getContext("2d");if(!Ce)throw new Error("canvas 不可用");Ce.fillStyle=document.documentElement.dataset.theme==="light"?"#ffffff":"#1e1e1e",Ce.fillRect(0,0,Se.width,Se.height),Ce.drawImage(ae,0,0,Se.width,Se.height),URL.revokeObjectURL(ue),Se.toBlob(pe=>{var W;if(!pe){alert("PNG 生成失败,可右键图片另存");return}const T=document.createElement("a");T.href=URL.createObjectURL(pe),T.download=`${(((W=n.value)==null?void 0:W.title)||"mermaid").replace(/[^\w\u4e00-\u9fa5-]+/g,"_")}-${j}.png`,T.click(),URL.revokeObjectURL(T.href)},"image/png")}catch(Q){alert(`导出失败: ${Q.message}(可右键图片另存)`)}}function oe(){const H=k.value;H&&H.querySelectorAll("img").forEach(j=>{j.setAttribute("loading","lazy"),j.closest("a")||(j.style.cursor="zoom-in",j.addEventListener("click",()=>{var X;F.value=j.getAttribute("src")??"",(X=C.value)==null||X.showModal()}))})}function K(){var H;(H=C.value)==null||H.close()}const Ae=V([]),z=V(!1);function we(){const H=k.value;if(!H){Ae.value=[];return}const j=Array.from(H.querySelectorAll("h1, h2, h3"));Ae.value=j.map((X,Q)=>{var ue;return X.id||(X.id=`dw-h-${Q}`),{id:X.id,text:((ue=X.textContent)==null?void 0:ue.trim())??"",level:Number(X.tagName.slice(1))}}).filter(X=>X.text)}function Me(H){var j;(j=document.getElementById(H))==null||j.scrollIntoView({behavior:"smooth",block:"start"})}async function Ve(){var H;try{const j=t.path.split("/").map(encodeURIComponent).join("/"),X=await fetch(`/api/pages/${j}?uncached=1`);if(!X.ok)throw new Error(`HTTP ${X.status}`);const Q=await X.json(),ue=`# ${Q.title??((H=n.value)==null?void 0:H.title)??""} ${Q.raw??""}`;await navigator.clipboard.writeText(ue),z.value=!0,setTimeout(()=>{z.value=!1},1600)}catch(j){alert(`复制失败: ${j.message}`)}}async function Ee(){s.value="",n.value=null;try{n.value=await Yu(t.path),document.title=`${n.value.title} · ZeyuWiki`,await Mn(),oe(),ne(),x(),we()}catch(H){s.value=H.message==="unauthorized"?"需要 Token — 点右上角 🔑":`加载失败: ${H}`}}return kt(Ee),Wt(()=>t.path,(H,j)=>{H!==j&&Ee()}),(H,j)=>{const X=Ut("router-link");return $(),S(se,null,[s.value?($(),S("div",cd,N(s.value),1)):n.value?($(),S("article",ud,[f("div",fd,[f("h1",null,N(n.value.title),1),f("div",dd,[($(!0),S(se,null,ye(n.value.tags,Q=>($(),S("a",{key:Q,class:"tag",href:"#/tags"},N(Q),1))),128)),n.value.created?($(),S("time",pd,"创建 "+N(n.value.created.slice(0,10)),1)):J("",!0),n.value.updated?($(),S("time",hd,"更新 "+N(n.value.updated.slice(0,10)),1)):J("",!0)]),p.value?J("",!0):($(),S("div",md,[f("button",{class:"exp ic",title:z.value?"已复制":"复制全文","aria-label":z.value?"已复制":"复制全文",onClick:Ve},N(z.value?"✓":"⧉"),9,vd),f("button",{class:"exp",disabled:b.value,onClick:q},N(b.value?"生成中…":"⬇ 导出 PDF"),9,gd),f("span",_d,[($(),S(se,null,ye(o,Q=>f("button",{key:Q,class:_e(["exp fs-btn",{on:i.value===Q}]),"aria-pressed":i.value===Q,title:`正文字号 ${Q}px`,onClick:ue=>u(Q)},"A"+N(Q==="18"?" 小":Q==="24"?" 中":" 大"),11,yd)),64))])])),f("div",{ref_key:"bodyEl",ref:k,innerHTML:n.value.html},null,8,bd),w.value.length?($(),S("section",wd,[j[1]||(j[1]=f("h2",null,"相关页",-1)),f("div",$d,[($(!0),S(se,null,ye(w.value,Q=>($(),$t(X,{key:Q.path,to:M(Q.path),class:"rel-card"},{default:$e(()=>[f("span",kd,N(Q.title),1),f("span",Ed,N(Q.path),1),f("span",Sd,N(R[Q.reason]??"✨ 相似"),1)]),_:2},1032,["to"]))),128))])])):J("",!0)]),f("aside",Cd,[f("div",xd,[f("button",{class:"rail-ic",title:z.value?"已复制":"复制全文(markdown)","aria-label":z.value?"已复制":"复制全文",onClick:Ve},N(z.value?"✓":"⧉"),9,Rd),f("button",{class:"rail-ic",disabled:b.value,title:"导出 PDF","aria-label":"导出 PDF",onClick:q},"⬇",8,Td),f("button",{class:_e(["rail-ic",{on:l.value}]),"aria-pressed":l.value,title:l.value?"隐藏大纲":"显示大纲","aria-label":"大纲显隐",onClick:c},"🗂",10,Ad)]),f("div",Od,[($(),S(se,null,ye(o,Q=>f("button",{key:Q,class:_e(["fs-btn",{on:i.value===Q}]),"aria-pressed":i.value===Q,title:`正文字号 ${Q}px`,onClick:ue=>u(Q)},"A"+N(Q==="18"?" 小":Q==="24"?" 中":" 大"),11,Pd)),64))]),Ie(f("nav",Id,[j[2]||(j[2]=f("h3",null,"大纲",-1)),($(!0),S(se,null,ye(Ae.value,Q=>($(),S("a",{key:Q.id,class:_e(`lv${Q.level}`),href:`#${Q.id}`,onClick:Mt(ue=>Me(Q.id),["prevent"])},N(Q.text),11,Nd))),128))],512),[[rs,l.value&&Ae.value.length]]),w.value.length?($(),S("nav",Vd,[j[3]||(j[3]=f("h3",null,"相关",-1)),($(!0),S(se,null,ye(w.value.slice(0,8),Q=>($(),$t(X,{key:Q.path,to:M(Q.path),class:"rlink"},{default:$e(()=>[te(N(Q.title),1),f("span",Md,N(R[Q.reason]??"✨"),1)]),_:2},1032,["to"]))),128))])):J("",!0)])])):J("",!0),n.value?($(),S("dialog",{key:2,ref_key:"lightbox",ref:C,class:"lightbox",onClick:K},[F.value?($(),S("img",{key:0,src:F.value,alt:"预览",onClick:j[0]||(j[0]=Mt(()=>{},["stop"]))},null,8,Dd)):J("",!0)],512)):($(),S("div",Ld,"加载中…"))],64)}}}),rl=rt(Ud,[["__scopeId","data-v-9fce32bd"]]),jd=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"})),Hd={class:"edit"},Bd={class:"bar"},Fd={key:0},zd={key:1},Kd={class:"ops"},Wd=["disabled"],qd=["disabled"],Gd=["disabled"],Jd=["disabled"],Qd={key:0,class:"note ok"},Yd={key:1,class:"note bad"},Zd={key:0},Xd={class:"fields"},ep={class:"fl"},tp=["disabled"],np={key:0,class:"meta"},sp={class:"editor-tools"},op=["disabled"],rp=["disabled"],ip={key:0,class:"up-note"},lp={key:0,class:"atts-panel"},ap={key:0,class:"att-empty"},cp=["src","alt"],up={key:1,class:"att-icon"},fp=["title"],dp={class:"att-size"},pp=["onClick"],hp=["onClick"],mp={class:"mode-tabs"},vp={key:1,class:"fm-form"},gp=["disabled"],_p={key:0,class:"alias-hint"},yp={key:3,class:"loading"},bp=["value"],wp={key:0,class:"bk-list"},$p={class:"bk-head"},kp=["title"],Ep={key:1,class:"bk-none"},Sp={class:"dlg-ops"},Cp=["disabled"],xp={class:"csv-ops"},Rp=["disabled"],Tp=Ze({__name:"EditView",setup(e){const t=Ln(),n=ko(),s=Te(()=>typeof t.query.path=="string"?t.query.path:""),o=Te(()=>t.path==="/edit/new"||!s.value),r=V(s.value),i=V(""),l=V(null),a=V("source"),u=V({title:"",tags:"",category:"",aliases:""}),c=V(!1),p=V("");function g(){const _=i.value.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(!_){u.value={title:F.value,tags:"",category:"",aliases:""};return}const m=L=>{const G=_[1].split(/\r?\n/).find(Z=>Z.toLowerCase().startsWith(L+":"));return G?G.slice(L.length+1).trim().replace(/^"|"$/g,""):""},I=m("tags").replace(/^\[|\]$/g,""),E=m("aliases").replace(/^\[|\]$/g,"");u.value={title:m("title"),tags:I,category:m("category"),aliases:E}}function h(){const _=u.value;let m=i.value.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"");const I=_.tags.split(/[,,]/).map(ie=>ie.trim()).filter(Boolean),E=I.length?`[${I.map(ie=>`"${ie}"`).join(", ")}]`:"[]",L=_.aliases.split(/[,,]/).map(ie=>ie.trim()).filter(Boolean),G=L.length?`[${L.map(ie=>`"${ie}"`).join(", ")}]`:"",Z=["---",`title: ${_.title||"未命名"}`,`tags: ${E}`,`category: ${_.category}`];L.length&&Z.push(`aliases: ${G}`);const ce=Z.concat(["---",""]).join(` `);i.value=ce+` `+m}async function w(){if(!c.value){c.value=!0,p.value="";try{const _=await fetch(`/api/alias-suggest/${r.value.split("/").map(encodeURIComponent).join("/")}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${le()}`},body:"{}"}),m=await _.json();if(!_.ok)throw new Error((m==null?void 0:m.error)??`HTTP ${_.status}`);const I=m.aliases??[];if(I.length){const E=u.value.aliases.split(/[,,]/).map(G=>G.trim()).filter(Boolean),L=Array.from(new Set([...E,...I]));u.value.aliases=L.join(", "),p.value=`已并入 ${I.length} 个候选,保存后生效`}else p.value=m.hint||"无建议"}catch(_){p.value=`失败: ${_.message}`}finally{c.value=!1}}}function x(_){_==="form"?g():a.value==="form"&&h(),a.value=_}const R=V(s.value),M=V(!1),k=V(!1),C=V(""),b=V(""),q=Te(()=>{const _=i.value.match(/^---\r?\n([\s\S]*?)\r?\n---/),m={};if(_)for(const I of _[1].split(/\r?\n/)){const E=I.indexOf(":");E>0&&(m[I.slice(0,E).trim().toLowerCase()]=I.slice(E+1).trim().replace(/^"|"$/g,""))}return m}),F=Te(()=>q.value.title||"(未命名)"),ne=Te(()=>i.value.length);function xe(_){return _.trim().replace(/^\/+|\/+$/g,"").replace(/\.md$/i,"")}async function oe(){if(!s.value){M.value=!0;return}k.value=!0,b.value="";try{const _=await Sr(s.value);i.value=_.raw||"",R.value=s.value,r.value=s.value,l.value=_.rev??null}catch(_){b.value=`加载失败: ${_.message}`}finally{k.value=!1,M.value=!0}}function K(){return le()?!0:(ot(),C.value="写操作需要 Token,请先登录",!1)}async function Ae(){if(!K()||k.value)return;const _=xe(r.value);if(!_){b.value="请填写页面路径";return}k.value=!0,b.value="",C.value="";try{const I=await Cr(_,i.value,l.value);I.ok===!0||!I.error&&I.ok===void 0?(C.value=`已保存(${String(I.action??"create")},commit ${String(I.commit??"").slice(0,8)})`,R.value=_,l.value=String(I.commit??""),Y(),s.value!==_&&n.replace({path:"/edit",query:{path:_}})):b.value=String(I.error??"保存失败")}catch(m){if(m instanceof tl)if(prompt(`⚠ 页面已被他人修改(当前版本 ${m.currentRev.slice(0,8)})。 输入 1 = 用我的版本覆盖;输入 2 = 放弃我的修改并加载最新版`,"2")==="1")try{const L=await Cr(_,i.value,null);C.value=`已强制覆盖(commit ${String(L.commit??"").slice(0,8)})`,l.value=String(L.commit??""),R.value=_}catch(E){b.value=`覆盖失败: ${E.message}`}else try{const E=await Sr(_);i.value=E.raw||"",l.value=E.rev??null,R.value=_,b.value="已放弃本地修改,已加载最新版"}catch(E){b.value=`加载最新失败: ${E.message}`}else b.value=`保存失败: ${m.message}`}finally{k.value=!1}}function z(){i.value=`--- title: 新页面 tags: [] category: --- # 新页面 `}const we=V(!1),Me=V(""),Ve=V([]),Ee=V(!0),H=V(!1);function j(){K()&&(Me.value=R.value,Ve.value=[],we.value=!0,Xu(R.value).then(_=>{Ve.value=_}).catch(()=>{Ve.value=[]}))}async function X(){const _=xe(Me.value);if(!_||_===R.value){we.value=!1;return}H.value=!0,b.value="";try{const m=await nl(R.value,_,Ee.value);if(m.ok){const I=m.links_updated?`(同步更新 ${m.links_updated} 处引用)`:"";C.value=`已移动 → ${m.to}${I}`,r.value=m.to,R.value=m.to,we.value=!1,n.replace({path:"/edit",query:{path:m.to}})}else b.value=m.error??"移动失败"}catch(m){b.value=`移动失败: ${m.message}`}finally{H.value=!1}}async function Q(){if(!(!K()||k.value)&&confirm(`确认删除「${R.value}」?(进入回收站,可在回收站页恢复)`)){k.value=!0,b.value="",C.value="";try{const _=await Zu(R.value);_.ok===!0?(C.value="已删除,可到「回收站」恢复",i.value="",r.value="",n.replace({path:"/trash"})):b.value=String(_.error??"删除失败")}catch(_){b.value=`删除失败: ${_.message}`}finally{k.value=!1}}}const ue=V(null),ae=V(!1),Oe=V([]),Se=V(!1);function Ce(_){const m=ue.value;if(!m){i.value+=_;return}const I=m.selectionStart??i.value.length,E=m.selectionEnd??I;i.value=i.value.slice(0,I)+_+i.value.slice(E),requestAnimationFrame(()=>{m.focus();const L=I+_.length;m.setSelectionRange(L,L)})}function pe(){return xe(r.value)||R.value||"drafts/未分类"}async function T(_){if(!_.length||!K())return;const m=_.filter(E=>E.type.startsWith("image/")),I=_.filter(E=>!E.type.startsWith("image/"));ae.value=!0,b.value="";try{const E=pe(),L=await sf(E,_),G=new Map(L.files.map(Z=>[Z.file_name,Z.url]));for(const Z of m){const ce=G.get(Z.name)??`/api/attachments/${E}/${encodeURIComponent(Z.name)}`;Ce(` ![](${ce}) `)}for(const Z of I){const ce=G.get(Z.name)??`/api/attachments/${E}/${encodeURIComponent(Z.name)}`;Ce(` [📎 ${Z.name}](${ce}) `)}C.value=`已上传 ${_.length} 个文件`,await Y()}catch(E){b.value=`上传失败: ${E.message}`}finally{ae.value=!1}}function W(_){var I;const m=Array.from(((I=_.clipboardData)==null?void 0:I.files)??[]);m.length&&(_.preventDefault(),T(m))}function B(_){var I;const m=Array.from(((I=_.dataTransfer)==null?void 0:I.files)??[]);m.length&&(_.preventDefault(),T(m))}async function Y(){const _=pe();try{Oe.value=await nf(_)}catch{Oe.value=[]}}async function fe(_){if(K()&&confirm(`删除附件「${_.file_name}」?(页面中的引用需手动清理)`))try{await of(pe(),_.file_name),await Y()}catch(m){b.value=`删除失败: ${m.message}`}}function d(_){const m=_.mime_type.startsWith("image/")?` ![](${_.url}) `:` [📎 ${_.file_name}](${_.url}) `;Ce(m)}const v=V(!1),y=V("");function O(){const _=prompt("插入表格 行×列(如 3×4):","3×4");if(!_)return;const[m,I]=_.split(/[×x*]/).map(Z=>parseInt(Z.trim(),10));if(!m||!I||m<1||I<1||m>50||I>20){b.value="行列数无效(1≤行≤50,1≤列≤20)";return}const E=Array.from({length:I},(Z,ce)=>`列${ce+1}`).join(" | "),L=Array.from({length:I},()=>"---").join(" | "),G=Array.from({length:m},()=>Array.from({length:I},()=>" ").join(" | "));Ce(` | ${E} | | ${L} | ${G.map(Z=>`| ${Z} |`).join(` `)} `)}async function P(){const _=ue.value;if(!_)return;const m=_.selectionStart??0,I=i.value;let E=I.lastIndexOf(` `,m);E=E===-1?0:E+2;let L=I.indexOf(` `,m);L=L===-1?I.length:L;const G=I.slice(E,L);if(!G.includes("|")){b.value="光标处未找到表格";return}const Z={"Content-Type":"application/json"};le()&&(Z.Authorization=`Bearer ${le()}`);const ce=await fetch("/api/text/table",{method:"POST",headers:Z,body:JSON.stringify({op:"format",text:G})});if(!ce.ok){b.value=`格式化失败 HTTP ${ce.status}`;return}const ie=await ce.json();if(ie!=null&&ie.error){b.value=ie.error;return}i.value=I.slice(0,E)+ie.result+I.slice(L),C.value="表格已格式化"}async function A(){if(!y.value.trim())return;const _={"Content-Type":"application/json"};le()&&(_.Authorization=`Bearer ${le()}`);const I=await(await fetch("/api/text/table",{method:"POST",headers:_,body:JSON.stringify({op:"from_csv",text:y.value})})).json();if(I!=null&&I.error){b.value=I.error;return}Ce(` ${I.result} `),v.value=!1,y.value=""}async function U(){if(K())try{const _=await tf("md","docx",i.value,F.value),m=document.createElement("a");m.href=URL.createObjectURL(_),m.download=`${F.value||"page"}.docx`,m.click(),URL.revokeObjectURL(m.href)}catch(_){b.value=`导出失败: ${_.message}`}}function D(){const _=xe(r.value)||R.value;_&&n.push(`/wiki/${_}`)}return kt(()=>{oe(),Y()}),(_,m)=>{const I=Ut("router-link");return $(),S("div",Hd,[f("div",Bd,[o.value?($(),S("h1",Fd,"新建页面")):($(),S("h1",zd,"编辑:"+N(F.value),1)),f("div",Kd,[o.value?($(),S("button",{key:0,class:"btn",onClick:z},"插入模板")):J("",!0),o.value?J("",!0):($(),S("button",{key:1,class:"btn",disabled:k.value,onClick:D},"预览",8,Wd)),o.value?J("",!0):($(),S("button",{key:2,class:"btn",disabled:k.value,onClick:j},"移动/重命名",8,qd)),o.value?J("",!0):($(),S("button",{key:3,class:"btn danger",disabled:k.value,onClick:Q},"删除",8,Gd)),f("button",{class:"btn primary",disabled:k.value,onClick:Ae},"保存",8,Jd)])]),C.value?($(),S("div",Qd,N(C.value),1)):J("",!0),b.value?($(),S("div",Yd,[te(N(b.value),1),b.value.includes("unauthorized")?($(),S("span",Zd,[m[21]||(m[21]=te(" — 请先 ",-1)),de(I,{to:"/login",class:"lk"},{default:$e(()=>[...m[20]||(m[20]=[te("登录",-1)])]),_:1})])):J("",!0)])):J("",!0),M.value?($(),S(se,{key:2},[f("div",Xd,[f("label",ep,[m[22]||(m[22]=f("span",null,"页面路径(不含 .md,如 concepts/foo/bar)",-1)),Ie(f("input",{"onUpdate:modelValue":m[0]||(m[0]=E=>r.value=E),type:"text",spellcheck:"false",disabled:!o.value},null,8,tp),[[ze,r.value]])]),o.value?J("",!0):($(),S("div",np,"tags: "+N(q.value.tags||"—")+" · category: "+N(q.value.category||"—")+" · "+N(ne.value)+" 字符",1))]),f("div",sp,[f("label",{class:_e(["btn file-btn",{dis:ae.value}])},[m[23]||(m[23]=te(" 🖼 图片/文件 ",-1)),f("input",{type:"file",multiple:"",hidden:"",disabled:ae.value,onChange:m[1]||(m[1]=E=>{T(Array.from(E.target.files??[])),E.target.value=""})},null,40,op)],2),f("button",{class:"btn",disabled:ae.value||!Oe.value.length,onClick:m[2]||(m[2]=E=>Se.value=!Se.value)}," 📎 附件("+N(Oe.value.length)+") ",9,rp),m[24]||(m[24]=f("span",{class:"tool-sep"},null,-1)),f("button",{class:"btn",onClick:O},"▦ 插入表格"),f("button",{class:"btn",onClick:P},"⇋ 格式化表格"),f("button",{class:"btn",onClick:m[3]||(m[3]=E=>v.value=!0)},"📋 CSV→表格"),f("button",{class:"btn",onClick:U},"⬇ 导出 docx"),ae.value?($(),S("span",ip,"上传中…")):J("",!0),m[25]||(m[25]=f("span",{class:"up-hint"},"支持粘贴截图 / 拖拽文件到编辑器",-1))]),Se.value?($(),S("div",lp,[Oe.value.length?J("",!0):($(),S("div",ap,"本页暂无附件")),($(!0),S(se,null,ye(Oe.value,E=>($(),S("div",{key:E.id,class:"att-row"},[E.mime_type.startsWith("image/")?($(),S("img",{key:0,src:E.url,class:"att-thumb",alt:E.file_name},null,8,cp)):($(),S("span",up,"📄")),f("span",{class:"att-name",title:E.file_name},N(E.file_name),9,fp),f("span",dp,N((E.size/1024).toFixed(1))+"KB",1),f("button",{class:"btn mini",onClick:L=>d(E)},"插入",8,pp),f("button",{class:"btn mini danger",onClick:L=>fe(E)},"删除",8,hp)]))),128))])):J("",!0),f("div",mp,[f("button",{class:_e({on:a.value==="source"}),onClick:m[4]||(m[4]=E=>x("source"))},"源码",2),f("button",{class:_e({on:a.value==="form"}),onClick:m[5]||(m[5]=E=>x("form"))},"属性表单",2)]),a.value==="form"?($(),S("div",vp,[f("label",null,[m[26]||(m[26]=te("标题",-1)),Ie(f("input",{"onUpdate:modelValue":m[6]||(m[6]=E=>u.value.title=E),type:"text",onChange:h},null,544),[[ze,u.value.title]])]),f("label",null,[m[27]||(m[27]=te("标签(逗号分隔)",-1)),Ie(f("input",{"onUpdate:modelValue":m[7]||(m[7]=E=>u.value.tags=E),type:"text",onChange:h},null,544),[[ze,u.value.tags]])]),f("label",null,[m[28]||(m[28]=te("分类",-1)),Ie(f("input",{"onUpdate:modelValue":m[8]||(m[8]=E=>u.value.category=E),type:"text",onChange:h},null,544),[[ze,u.value.category]])]),f("label",null,[m[29]||(m[29]=te("别名(逗号分隔,用于搜索)",-1)),Ie(f("input",{"onUpdate:modelValue":m[9]||(m[9]=E=>u.value.aliases=E),type:"text",onChange:h},null,544),[[ze,u.value.aliases]])]),f("button",{class:"btn alias-ai",disabled:c.value,onClick:w},N(c.value?"建议中…":"✨ AI 建议"),9,gp),p.value?($(),S("span",_p,N(p.value),1)):J("",!0),m[30]||(m[30]=f("p",{class:"fm-hint"},"表单修改会实时写回 frontmatter;切回源码可看结果。密级/属主走治理面(/api/govern/security)。",-1))])):J("",!0),Ie(f("textarea",{ref_key:"editorRef",ref:ue,"onUpdate:modelValue":m[10]||(m[10]=E=>i.value=E),class:"md-editor",onPaste:W,onDrop:B,spellcheck:"false",placeholder:`Markdown 内容;标题/标签写在顶部 frontmatter: --- title: 页面标题 tags: [tag1, tag2] category: 分类 --- 正文…`},null,544),[[rs,a.value==="source"],[ze,i.value]])],64)):($(),S("div",yp,N(k.value?"加载中…":""),1)),we.value?($(),S("dialog",{key:4,class:"move-dlg",open:"",onClick:m[15]||(m[15]=E=>we.value=!1)},[f("div",{class:"move-box",onClick:m[14]||(m[14]=Mt(()=>{},["stop"]))},[m[33]||(m[33]=f("h3",null,"移动 / 重命名",-1)),f("label",null,[m[31]||(m[31]=te("当前路径",-1)),f("input",{type:"text",value:R.value,disabled:""},null,8,bp)]),f("label",null,[m[32]||(m[32]=te("目标路径",-1)),Ie(f("input",{"onUpdate:modelValue":m[11]||(m[11]=E=>Me.value=E),type:"text",placeholder:"entities/新路径"},null,512),[[ze,Me.value]])]),Ve.value.length?($(),S("div",wp,[f("label",$p,[Ie(f("input",{"onUpdate:modelValue":m[12]||(m[12]=E=>Ee.value=E),type:"checkbox"},null,512),[[Oc,Ee.value]]),te(" 同步更新以下 "+N(Ve.value.length)+" 处引用",1)]),($(!0),S(se,null,ye(Ve.value,E=>($(),S("div",{key:E.path,class:"bk-row",title:E.line},N(E.path),9,kp))),128))])):($(),S("div",Ep,"无 wikilink 引用(可直接移动)")),f("div",Sp,[f("button",{class:"btn",onClick:m[13]||(m[13]=E=>we.value=!1)},"取消"),f("button",{class:"btn primary",disabled:H.value,onClick:X},N(H.value?"移动中…":"移动"),9,Cp)])])])):J("",!0),v.value?($(),S("dialog",{key:5,class:"csv-dlg",open:"",onClick:m[19]||(m[19]=E=>v.value=!1)},[f("div",{class:"csv-box",onClick:m[18]||(m[18]=Mt(()=>{},["stop"]))},[m[34]||(m[34]=f("h3",null,"粘贴 CSV → 转为 md 表格",-1)),Ie(f("textarea",{"onUpdate:modelValue":m[16]||(m[16]=E=>y.value=E),rows:"9",placeholder:`名称,数量 Alpha,3 Beta,4`},null,512),[[ze,y.value]]),f("div",xp,[f("button",{class:"btn",onClick:m[17]||(m[17]=E=>v.value=!1)},"取消"),f("button",{class:"btn primary",disabled:!y.value.trim(),onClick:A},"转换并插入",8,Rp)])])])):J("",!0)])}}}),to=rt(Tp,[["__scopeId","data-v-54411488"]]),Ap=Object.freeze(Object.defineProperty({__proto__:null,default:to},Symbol.toStringTag,{value:"Module"})),Op={key:0,class:"empty"},Pp={key:1,class:"empty"},Ip={key:2,class:"export-row"},Np={class:"path"},Vp=["innerHTML"],Mp=Ze({__name:"SearchView",setup(e){const t=Ln(),n=V(t.query.q||""),s=V([]),o=V(!1);async function r(){if(!n.value){s.value=[],o.value=!1;return}const l=await Qu(n.value);s.value=l.results||[],o.value=!0}kt(r),Wt(()=>t.query.q,l=>{n.value=l||"",r()});function i(){const l=[`# 搜索: ${n.value}`,"",`> 导出于 ${new Date().toLocaleString()} · ${s.value.length} 条`,"",...s.value.map((c,p)=>`${p+1}. [${c.title||c.path}](${c.path})${c.snippet?` ${String(c.snippet).replace(/\n/g," ").slice(0,160)}`:""}`)],a=new Blob([l.join(` `)],{type:"text/markdown;charset=utf-8"}),u=document.createElement("a");u.href=URL.createObjectURL(a),u.download=`search-${n.value.replace(/[^\w\u4e00-\u9fa5]+/g,"_").slice(0,40)}.md`,u.click(),URL.revokeObjectURL(u.href)}return(l,a)=>{const u=Ut("router-link");return $(),S("div",null,[f("h1",null,"搜索结果: "+N(n.value),1),o.value?s.value.length?J("",!0):($(),S("div",Pp,"没有找到 “"+N(n.value)+"” 的结果",1)):($(),S("div",Op,"搜索中…")),s.value.length?($(),S("div",Ip,[f("button",{class:"export-btn",onClick:i},"⬇ 导出 md ("+N(s.value.length)+")",1)])):J("",!0),($(!0),S(se,null,ye(s.value,c=>($(),S("div",{key:c.path,class:"result"},[de(u,{to:`/wiki/${c.path}`},{default:$e(()=>[te(N(c.title||c.path),1)]),_:2},1032,["to"]),f("div",Np,N(c.path),1),f("div",{class:"snippet",innerHTML:c.snippet},null,8,Vp)]))),128))])}}}),il=rt(Mp,[["__scopeId","data-v-e1db4dc7"]]),Dp=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"})),Lp={class:"login-wrap"},Up={class:"login-box"},jp={class:"actions"},Hp=["disabled"],Bp={key:0,class:"msg"},Fp=Ze({__name:"LoginView",setup(e){const t=Ln(),n=ko(),s=V(le()),o=V(!1),r=V(""),i=Te(()=>!!le());function l(){const a=s.value.trim();o.value=!0;try{Xi(a),r.value=a?"Token 已保存":"Token 已清除";const u=typeof t.query.next=="string"?t.query.next:"";setTimeout(()=>{n.replace(u&&u.startsWith("/")?u:"/")},400)}finally{o.value=!1}}return(a,u)=>($(),S("div",Lp,[f("div",Up,[u[2]||(u[2]=f("h1",null,"🔐 登录 ZeyuWiki",-1)),u[3]||(u[3]=f("p",{class:"tip"},"只读浏览无需登录。写入(编辑/删除/移动/恢复/审核/分享)需要 Bearer Token,保存在本机 localStorage。",-1)),u[4]||(u[4]=f("label",{class:"lbl",for:"tk"},"Bearer Token",-1)),Ie(f("input",{id:"tk","onUpdate:modelValue":u[0]||(u[0]=c=>s.value=c),type:"password",placeholder:"粘贴 ZYWIKI_WRITE_TOKEN",autocomplete:"off",onKeyup:ji(l,["enter"])},null,544),[[ze,s.value]]),f("div",jp,[i.value?($(),S("button",{key:0,class:"btn",onClick:u[1]||(u[1]=c=>{s.value="",l()})},"清除 Token")):J("",!0),f("button",{class:"btn primary",disabled:o.value,onClick:l},"保存并返回",8,Hp)]),r.value?($(),S("p",Bp,N(r.value),1)):J("",!0)])]))}}),ll=rt(Fp,[["__scopeId","data-v-0bca6570"]]),zp=Object.freeze(Object.defineProperty({__proto__:null,default:ll},Symbol.toStringTag,{value:"Module"})),Kp={class:"wrap"},Wp={class:"grid"},qp={class:"label"},Gp={class:"desc"},Jp={class:"group"},Qp={class:"grid"},Yp={class:"label"},Zp=["title"],Xp=Ze({__name:"ManageView",setup(e){const t=V(0);kt(async()=>{try{const o=(await sl()).cron_unhealthy;t.value=typeof o=="number"?o:0}catch{}});const n=[{title:"内容",links:[{to:"/edit/new",label:"✏️ 新建页面",desc:"创建 wiki 页面"},{to:"/imports",label:"📦 导入工作台",desc:"文件/URL/zip 导入与待整理队列"},{to:"/tables",label:"📊 智能表格",desc:"结构化数据表管理"},{to:"/trash",label:"🗑 回收站",desc:"已删页面恢复"}]},{title:"知识运营",links:[{to:"/health",label:"🩺 知识体检",desc:"死链/孤儿/僵尸/stub/无标签"},{to:"/graph",label:"🕸 关系图谱",desc:"页面关联可视化"},{to:"/reviews",label:"📋 审核队列",desc:"审批待裁决内容"}]}];return(s,o)=>{const r=Ut("router-link");return $(),S("section",Kp,[o[7]||(o[7]=f("h2",null,"⚙️ 管理中心",-1)),o[8]||(o[8]=f("p",{class:"muted"},"wiki 管理入口集中在此(原侧栏顶部按钮迁移)。",-1)),($(),S(se,null,ye(n,i=>f("div",{key:i.title,class:"group"},[f("h3",null,N(i.title),1),f("div",Wp,[($(!0),S(se,null,ye(i.links,l=>($(),$t(r,{key:l.to,to:l.to,class:"card"},{default:$e(()=>[f("span",qp,N(l.label),1),f("span",Gp,N(l.desc),1)]),_:2},1032,["to"]))),128))])])),64)),f("div",Jp,[o[6]||(o[6]=f("h3",null,"系统",-1)),f("div",Qp,[de(r,{to:"/cron",class:"card"},{default:$e(()=>[f("span",Yp,[o[0]||(o[0]=te("⏰ 定时任务",-1)),t.value>0?($(),S("sup",{key:0,class:"dot",title:`${t.value} 个任务 failed/stale`},N(t.value),9,Zp)):J("",!0)]),o[1]||(o[1]=f("span",{class:"desc"},"自管 timer+hermes 合并看板 · 故障横幅 · 手动触发",-1))]),_:1}),de(r,{to:"/audit",class:"card"},{default:$e(()=>[...o[2]||(o[2]=[f("span",{class:"label"},"📊 审计看板",-1),f("span",{class:"desc"},"操作记录聚合与明细",-1)])]),_:1}),de(r,{to:"/health",class:"card"},{default:$e(()=>[...o[3]||(o[3]=[f("span",{class:"label"},"📐 内容质量基线",-1),f("span",{class:"desc"},"trends 三轴 LLM 评估均分与差评(zywiki quality)",-1)])]),_:1}),de(r,{to:"/shares",class:"card"},{default:$e(()=>[...o[4]||(o[4]=[f("span",{class:"label"},"🔗 分享管理",-1),f("span",{class:"desc"},"公开读链接签发",-1)])]),_:1}),de(r,{to:"/trending",class:"card"},{default:$e(()=>[...o[5]||(o[5]=[f("span",{class:"label"},"🐙 GitHub Trending",-1),f("span",{class:"desc"},"趋势采集视图(trend-collect)",-1)])]),_:1})])])])}}}),al=rt(Xp,[["__scopeId","data-v-12355a74"]]),eh=Object.freeze(Object.defineProperty({__proto__:null,default:al},Symbol.toStringTag,{value:"Module"})),th={class:"imports"},nh={key:0,class:"note ok pre"},sh={key:1,class:"note bad"},oh={key:0,class:"spin"},rh={class:"btn primary"},ih={class:"url-row"},lh=["disabled"],ah={class:"sec"},ch={class:"cnt"},uh={key:2,class:"empty"},fh={class:"q-main"},dh={class:"q-name"},ph={class:"q-meta"},hh=["href"],mh=["title"],vh=["title"],gh={key:0,class:"q-confirm"},_h=["onClick"],yh=Ze({__name:"ImportView",setup(e){const t=V([]),n=V(!1),s=V(""),o=V(""),r=V(!1),i=V(""),l=V(!1),a=V(""),u=V(""),c=V("");async function p(){n.value=!0,o.value="";try{t.value=await af()}catch(k){const C=k.message;o.value=C==="unauthorized"?"需要 Token — 请先登录":`加载失败: ${C}`}finally{n.value=!1}}async function g(k){if(!k.length)return;l.value=!0,o.value="",s.value="";let C=0;const b=[];for(const q of k)try{const F=await rf(q);C++,F.path&&b.push(F.duplicate?`${q.name} → 已存在 ${F.path}`:`${q.name} → ${F.path}`)}catch(F){o.value=`${q.name}: ${F.message}`}C&&(s.value=`已导入 ${C} 个文件 ${b.join(` `)}`),l.value=!1,await p()}function h(k){var b;r.value=!1;const C=Array.from(((b=k.dataTransfer)==null?void 0:b.files)??[]);g(C)}async function w(){const k=i.value.trim();if(k){l.value=!0,o.value="",s.value="";try{const C=await lf(k);s.value=C.duplicate?`已存在:${C.path}`:`已导入 → ${C.path}`,i.value="",await p()}catch(C){o.value=`导入失败: ${C.message}`}finally{l.value=!1}}}const x=V("");function R(k){a.value=k.id,u.value=(k.page_path??"").replace(/\.md$/i,"");const b=(k.suggestion??"").match(/兜底: (.+)$/);c.value=b?b[1]:""}async function M(){const k=u.value.trim().replace(/^\/+|\.md$/ig,"");if(!k){o.value="请填写目标路径";return}try{await cf(a.value,k,c.value.split(/[,,]/).map(C=>C.trim()).filter(Boolean)),s.value=`已归类 → ${k}`,a.value="",await p()}catch(C){o.value=`归类失败: ${C.message}`}}return kt(()=>{le()||ot(),p()}),(k,C)=>($(),S("div",th,[C[10]||(C[10]=f("div",{class:"bar"},[f("h1",null,"📦 导入工作台")],-1)),s.value?($(),S("div",nh,N(s.value),1)):J("",!0),o.value?($(),S("div",sh,N(o.value),1)):J("",!0),f("div",{class:_e(["drop",{over:r.value}]),onDragover:C[1]||(C[1]=Mt(b=>r.value=!0,["prevent"])),onDragleave:C[2]||(C[2]=b=>r.value=!1),onDrop:Mt(h,["prevent"])},[l.value?($(),S("span",oh,"⏳ 导入中…")):($(),S(se,{key:1},[f("label",rh,[C[7]||(C[7]=te("选择文件(docx / html / txt / md) ",-1)),f("input",{type:"file",multiple:"",hidden:"",accept:".docx,.html,.htm,.txt,.md,.zip",onChange:C[0]||(C[0]=b=>{g(Array.from(b.target.files??[])),b.target.value=""})},null,32)]),C[8]||(C[8]=f("span",{class:"hint"},"或拖拽文件到此处 · 原件归档 raw/import/,sha256 幂等去重",-1))],64))],34),f("div",ih,[Ie(f("input",{"onUpdate:modelValue":C[3]||(C[3]=b=>i.value=b),type:"url",placeholder:"https://… 网页 URL 导入(抓取→转 md→溯源入库)",onKeyup:ji(w,["enter"])},null,544),[[ze,i.value]]),f("button",{class:"btn",disabled:l.value||!i.value.trim(),onClick:w},"抓取导入",8,lh)]),f("h2",ah,[C[9]||(C[9]=te("待整理队列 ",-1)),f("span",ch,N(t.value.filter(b=>b.status!=="confirmed").length),1)]),!t.value.length&&!n.value?($(),S("div",uh,"队列为空 — 导入文件后会出现在这里")):J("",!0),($(!0),S(se,null,ye(t.value,b=>($(),S("div",{key:b.id,class:_e(["q-row",{done:b.status==="confirmed"}])},[f("div",fh,[f("div",dh,[te(N(b.original_name)+" ",1),f("span",{class:_e(["badge",b.status])},N(b.status==="confirmed"?"已归类":b.status==="auto"?"待整理":b.status),3)]),f("div",ph,[b.page_path?($(),S("a",{key:0,href:`#/wiki/${b.page_path}`,class:"lk"},N(b.page_path),9,hh)):J("",!0),b.source?($(),S("span",{key:1,class:"src",title:b.source},N(b.source),9,mh)):J("",!0),f("span",{class:"sha",title:b.sha256},"sha256 "+N(b.sha256.slice(0,10))+"…",9,vh),f("time",null,N((b.imported_at||"").slice(0,16).replace("T"," ")),1)])]),a.value===b.id?($(),S("div",gh,[Ie(f("input",{"onUpdate:modelValue":C[4]||(C[4]=q=>u.value=q),type:"text",placeholder:"目标路径(如 entities/xxx)"},null,512),[[ze,u.value]]),Ie(f("input",{"onUpdate:modelValue":C[5]||(C[5]=q=>c.value=q),type:"text",placeholder:"标签(逗号分隔)"},null,512),[[ze,c.value]]),f("button",{class:"btn mini primary",onClick:M},"确认"),f("button",{class:"btn mini",onClick:C[6]||(C[6]=q=>a.value="")},"取消")])):b.status!=="confirmed"?($(),S("button",{key:1,class:"btn mini",onClick:q=>x.value===b.id?null:R(b)},N(x.value===b.id?"AI…":"归类…"),9,_h)):J("",!0)],2))),128))]))}}),cl=rt(yh,[["__scopeId","data-v-ff1aaa41"]]),bh=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"})),wh={class:"wrap"},$h={key:0},kh={class:"cron-box"},Eh={class:"cron-head"},Sh={class:"muted small"},Ch=["disabled"],xh={key:0,class:"muted small"},Rh={key:2,class:"cron-table"},Th={key:0,class:"src-tag",title:"zywiki 自管(systemd timer)"},Ah={key:1,class:"src-tag hermes",title:"hermes 调度(只读)"},Oh={key:2,class:"muted small"},Ph={class:"sched"},Ih=["title"],Nh={class:"muted"},Vh={class:"muted small"},Mh=["disabled","title","onClick"],Dh={key:3,class:"muted small"},Lh={class:"queue-row"},Uh={class:"kw-row"},jh=["disabled"],Hh=["disabled"],Bh=["disabled"],Fh=Ze({__name:"CronView",setup(e){const t=V([]),n=V(""),s=V(!1);async function o(){s.value=!0;try{const oe=await ff();t.value=oe.jobs??[],n.value=oe.note??""}catch{n.value="cron 状态拉取失败"}finally{s.value=!1}}function r(oe){if(!oe)return"—";const K=Date.parse(oe);if(Number.isNaN(K))return oe;const Ae=Date.now()-K;if(Ae<0)return"刚刚";const z=Math.floor(Ae/6e4);if(z<1)return"刚刚";if(z<60)return`${z} 分钟前`;const we=Math.floor(z/60);if(we<24)return`${we} 小时前`;const Me=Math.floor(we/24);return Me<30?`${Me} 天前`:oe.slice(0,10)}const i=Te(()=>t.value.filter(oe=>oe.derived==="failed")),l=Te(()=>t.value.filter(oe=>oe.derived==="stale")),a=Te(()=>i.value.length>0||l.value.length>0);function u(oe){return oe.derived?oe.derived:oe.enabled?oe.last_status==="ok"?"ok":oe.last_status?"failed":"unknown":"unknown"}const c={ok:{cls:"ok",label:"✓ ok"},failed:{cls:"bad",label:"! failed"},stale:{cls:"stale",label:"⏰ stale"},running:{cls:"running",label:"↻ running"},unknown:{cls:"muted",label:"? 未知"}},p=V(""),g=V(""),h=V(!1);async function w(oe){p.value=oe,g.value="";try{const K=await df(oe);h.value=!0,g.value=`已触发 ${K.name}(pid=${K.pid}),状态流转见列表(约 10s 内)`,o()}catch(K){h.value=!1,g.value=K instanceof Error?K.message:"触发失败"}finally{p.value=""}}const x=V(null);async function R(){try{const K=(await sl()).queue_pending;x.value=typeof K=="number"?K:null}catch{x.value=null}}const M=V(""),k=V("github-collect"),C=V(!1),b=V(""),q=V(!1);async function F(){const oe=M.value.trim();if(!oe){q.value=!1,b.value="请输入关键词";return}C.value=!0,b.value="";try{await uf(oe,k.value.trim()||"github-collect"),q.value=!0,b.value=`已入待整理队列(关键词「${oe}」)`,M.value="",R()}catch(K){q.value=!1,b.value=K instanceof Error?K.message:"采集失败"}finally{C.value=!1}}let ne;kt(()=>{o(),R(),ne=setInterval(()=>{document.visibilityState!=="hidden"&&o()},1e4),document.addEventListener("visibilitychange",xe)});function xe(){document.visibilityState==="visible"&&o()}return _o(()=>{ne&&clearInterval(ne),document.removeEventListener("visibilitychange",xe)}),(oe,K)=>{const Ae=Ut("router-link");return $(),S("section",wh,[K[9]||(K[9]=f("h2",null,"⏰ 定时任务",-1)),K[10]||(K[10]=f("p",{class:"muted"},"自管任务(zywiki timer,可手动触发)+ hermes 调度(只读)合并看板。",-1)),a.value?($(),S("div",{key:0,class:_e(["alert-banner",i.value.length?"alert-failed":"alert-stale"]),role:"alert"},[f("strong",null,N(i.value.length?"⚠ 任务故障":"⏰ 任务停摆"),1),i.value.length?($(!0),S(se,{key:0},ye(i.value,z=>($(),S("span",{key:z.name,class:"alert-job"},[te(N(z.name),1),z.error?($(),S("em",$h," — "+N(z.error.slice(0,80)),1)):J("",!0)]))),128)):J("",!0),($(!0),S(se,null,ye(l.value,z=>($(),S("span",{key:z.name,class:"alert-job"},[te(N(z.name),1),f("em",null,"(超期未运行,上次 "+N(r(z.last_run_at))+")",1)]))),128))],2)):J("",!0),f("div",kh,[f("div",Eh,[f("span",Sh,"zywiki timer + hermes · "+N(t.value.length)+" 个任务",1),f("button",{class:"refresh",disabled:s.value,onClick:K[0]||(K[0]=z=>o())},N(s.value?"…":"🔄 刷新"),9,Ch)]),n.value?($(),S("p",xh,N(n.value),1)):J("",!0),g.value?($(),S("p",{key:1,class:_e(["kw-msg",h.value?"good":"err"])},N(g.value),3)):J("",!0),t.value.length?($(),S("table",Rh,[K[3]||(K[3]=f("thead",null,[f("tr",null,[f("th",null,"任务"),f("th",null,"调度"),f("th",null,"状态"),f("th",null,"上次执行"),f("th",null,"耗时/产出"),f("th")])],-1)),f("tbody",null,[($(!0),S(se,null,ye(t.value,z=>{var we,Me;return $(),S("tr",{key:`${z.source??""}-${z.name}`,class:_e({"row-bad":u(z)==="failed","row-stale":u(z)==="stale"})},[f("td",{class:_e(["jname",{disabled:!z.enabled}])},[te(N(z.name)+" ",1),z.source==="zywiki"?($(),S("span",Th,"zywiki")):($(),S("span",Ah,"hermes")),z.enabled?J("",!0):($(),S("span",Oh," (已停用)"))],2),f("td",null,[f("code",Ph,N(z.schedule||"—"),1)]),f("td",null,[f("span",{class:_e(["badge",((we=c[u(z)])==null?void 0:we.cls)??"muted"]),title:z.error?`错误:${z.error}`:u(z)==="stale"?"超过预期周期未运行":""},N(((Me=c[u(z)])==null?void 0:Me.label)??"? 未知"),11,Ih)]),f("td",Nh,N(r(z.last_run_at)),1),f("td",Vh,[z.duration_ms?($(),S(se,{key:0},[te(N((z.duration_ms/1e3).toFixed(1))+"s",1),z.items?($(),S(se,{key:0},[te(" · "+N(z.items)+" 项",1)],64)):J("",!0)],64)):($(),S(se,{key:1},[te("—")],64))]),f("td",null,[z.source==="zywiki"?($(),S("button",{key:0,class:"run-btn",disabled:p.value===z.name||u(z)==="running",title:u(z)==="running"?"运行中":"立即运行一次(分离进程)",onClick:Ve=>w(z.name)},N(u(z)==="running"?"↻ 运行中":p.value===z.name?"…":"▶ 运行"),9,Mh)):J("",!0)])],2)}),128))])])):!n.value&&!s.value?($(),S("p",Dh,"暂无任务数据")):J("",!0),f("div",Lh,[f("span",null,[K[4]||(K[4]=te("待整理队列: ",-1)),f("strong",null,N(x.value===null?"—":x.value),1)]),de(Ae,{to:"/imports",class:"mini-link"},{default:$e(()=>[...K[5]||(K[5]=[te("去导入工作台 →",-1)])]),_:1})]),f("form",{class:"kw-form",onSubmit:Mt(F,["prevent"])},[K[7]||(K[7]=f("label",{class:"kw-label",for:"kw-input"},"按关键词采集",-1)),f("div",Uh,[Ie(f("input",{id:"kw-input","onUpdate:modelValue":K[1]||(K[1]=z=>M.value=z),type:"text",placeholder:"如:rust cli、rag、向量数据库…",disabled:C.value},null,8,jh),[[ze,M.value]]),Ie(f("input",{"onUpdate:modelValue":K[2]||(K[2]=z=>k.value=z),type:"text",class:"cat",placeholder:"分类","aria-label":"采集分类",disabled:C.value},null,8,Hh),[[ze,k.value]]),f("button",{type:"submit",disabled:C.value},N(C.value?"采集中…":"🐙 采集"),9,Bh)]),b.value?($(),S("p",{key:0,class:_e(["kw-msg",q.value?"good":"err"])},[te(N(b.value)+" ",1),q.value?($(),$t(Ae,{key:0,to:"/imports",class:"mini-link"},{default:$e(()=>[...K[6]||(K[6]=[te("查看队列 →",-1)])]),_:1})):J("",!0)],2)):J("",!0),K[8]||(K[8]=f("p",{class:"muted small"},"把 GitHub 仓库搜索结果页投进导入管线(抓取→清洗→待整理队列);一次性投递,定时采集由上方自管任务承担。",-1))],32)])])}}}),ul=rt(Fh,[["__scopeId","data-v-b829a1d8"]]),zh=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),Kh={class:"home"},Wh={class:"muted"},qh={key:0,class:"block"},Gh={class:"feats"},Jh={class:"ftitle"},Qh={key:0,class:"rsum"},Yh={class:"chips"},Zh={class:"block"},Xh={key:0,class:"feats"},em=["href"],tm={class:"ftitle"},nm={class:"fpath"},sm={key:1,class:"muted quick"},om={class:"entries"},rm={class:"block"},im={class:"cats"},lm=["onClick"],am={class:"cname"},cm={class:"ccount"},um={key:0,class:"cat-pages"},fm={class:"src"},dm={class:"plist"},pm=Ze({__name:"HomeView",setup(e){const t=V([]),n=V(""),s=V([]),o=V(!1),r=h=>h.replace(/\.md$/,"");async function i(h){if(n.value===h.name){n.value="",s.value=[];return}n.value=h.name,o.value=!0;try{const w=await Co({category:h.name,size:200});s.value=(w.pages??[]).map(x=>({path:x.path,title:x.title}))}catch{s.value=[]}finally{o.value=!1}}const l=V([]),a=V([]);async function u(){try{const h=await ef(12);a.value=h.items??[]}catch{a.value=[]}}const c=V(!1),p=h=>!/^(?:_|index\.md$|log\.md$|SCHEMA\.md$|e2e$)/.test(h.name)&&h.count>=3;async function g(){try{const h=await fetch("/wiki/_system/featured.md");if(!h.ok)return;const w=await h.json(),x=new DOMParser().parseFromString(w.html??"","text/html");l.value=Array.from(x.querySelectorAll('a[href^="#/wiki/"]')).map(R=>{var M;return{href:R.getAttribute("href")??"",title:((M=R.textContent)==null?void 0:M.trim())||"",label:(R.getAttribute("href")??"").replace("#/wiki/","").split("/").pop()??""}}).filter(R=>R.href&&R.title)}catch{}}return kt(async()=>{try{const h=await el();t.value=h.filter(p).sort((w,x)=>x.count-w.count).slice(0,8)}catch{}g(),u(),c.value=!0}),(h,w)=>{const x=Ut("router-link");return $(),S("div",Kh,[w[11]||(w[11]=f("h1",null,"欢迎使用 ZeyuWiki",-1)),f("p",Wh,"TechNotes 个人知识库 · "+N(t.value.reduce((R,M)=>R+M.count,0))+"+ 页",1),a.value.length?($(),S("section",qh,[w[0]||(w[0]=f("h2",null,[te("🤖 智能推荐 "),f("span",{class:"src",title:"热词/最新采集/近期更新/活跃主题四因子实时计算"},"/api/recommend 实时评分")],-1)),f("div",Gh,[($(!0),S(se,null,ye(a.value,R=>($(),$t(x,{key:R.path,class:"feat rec",to:`/wiki/${R.path}`},{default:$e(()=>[f("span",Jh,N(R.title),1),R.summary?($(),S("span",Qh,N(R.summary.slice(0,60))+N(R.summary.length>60?"…":""),1)):J("",!0),f("span",Yh,[($(!0),S(se,null,ye(R.reasons.slice(0,3),M=>($(),S("i",{key:M,class:"chip"},N(M),1))),128))])]),_:2},1032,["to"]))),128))])])):J("",!0),f("section",Zh,[w[9]||(w[9]=f("h2",null,[te("⭐ 精选推荐 "),f("span",{class:"src",title:"编辑 wiki 的 _system/featured.md 即可维护"},"来源 _system/featured.md")],-1)),l.value.length?($(),S("div",Xh,[($(!0),S(se,null,ye(l.value,R=>($(),S("a",{key:R.href,class:"feat",href:R.href},[f("span",tm,N(R.title),1),f("span",nm,N(decodeURIComponent(R.label)),1)],8,em))),128))])):($(),S("div",sm,[c.value?($(),S(se,{key:0},[w[1]||(w[1]=te("暂无精选(在 wiki 编辑 ",-1)),w[2]||(w[2]=f("code",null,"_system/featured.md",-1)),w[3]||(w[3]=te(" 添加 ",-1)),w[4]||(w[4]=f("code",null,"- [[页面|说明]]",-1)),w[5]||(w[5]=te(" 即上首页)",-1))],64)):J("",!0),f("div",om,[de(x,{class:"cat",to:"/search"},{default:$e(()=>[...w[6]||(w[6]=[te("🔍 搜索",-1)])]),_:1}),de(x,{class:"cat",to:"/graph"},{default:$e(()=>[...w[7]||(w[7]=[te("🕸 关系图谱",-1)])]),_:1}),de(x,{class:"cat",to:"/health"},{default:$e(()=>[...w[8]||(w[8]=[te("🩺 知识体检",-1)])]),_:1})])]))]),f("section",rm,[w[10]||(w[10]=f("h2",null,"📚 主要类目",-1)),f("div",im,[($(!0),S(se,null,ye(t.value,R=>($(),S("button",{key:R.name,class:_e(["cat",{on:n.value===R.name}]),onClick:M=>i(R)},[f("span",am,N(R.name),1),f("span",cm,N(R.count),1)],10,lm))),128))]),n.value?($(),S("div",um,[f("h3",null,[te(N(n.value)+" ",1),f("span",fm,N(o.value?"加载中…":`${s.value.length} 页`),1)]),f("div",dm,[($(!0),S(se,null,ye(s.value,R=>($(),$t(x,{key:R.path,class:"plink",to:`/wiki/${r(R.path)}`},{default:$e(()=>[te(N(R.title||R.path),1)]),_:2},1032,["to"]))),128))])])):J("",!0)])])}}}),fl=rt(pm,[["__scopeId","data-v-4c631801"]]),hm=Object.freeze(Object.defineProperty({__proto__:null,default:fl},Symbol.toStringTag,{value:"Module"})),mm={class:"wrap"},vm={class:"muted src-note"},gm={class:"toolbar"},_m=["value"],ym={class:"muted count"},bm={key:0,class:"snaps"},wm={class:"snap-lang"},$m={class:"snap-list"},km={class:"snap-repo"},Em={key:0,class:"muted stars"},Sm={key:1,class:"muted"},Cm={key:2,class:"err"},xm={key:3,class:"muted"},Rm={class:"win-title"},Tm={class:"muted"},Am={class:"rows"},Om={class:"rname"},Pm={class:"rmeta"},Us="entities/trends/",Im=Ze({__name:"TrendingView",setup(e){const t=V([]),n=V(!0),s=V(""),o=V(""),r=V(0),i=V("(all)");function l(h){const x=(h.startsWith(Us)?h.slice(Us.length):h).split("/");return x.length>1?x[0]:"(根)"}const a=Te(()=>{const h=new Set;for(const w of t.value)h.add(l(w.path));return[...h].sort()});function u(h,w){if(!w)return!0;if(!h)return!1;const x=Date.parse(h+"T00:00:00Z");return Number.isNaN(x)?!1:Date.now()-x<=w*864e5}const c=Te(()=>t.value.filter(h=>i.value==="(all)"?!0:l(h.path)===i.value).filter(h=>u(h.updated,r.value)).filter(h=>{const w=o.value.trim().toLowerCase();return w?h.title.toLowerCase().includes(w)||h.path.toLowerCase().includes(w):!0}).sort((h,w)=>(w.updated??"").localeCompare(h.updated??"")||h.title.localeCompare(w.title))),p=Te(()=>{const h=new Map;for(const w of c.value){const x=l(w.path);h.has(x)||h.set(x,[]),h.get(x).push(w)}return[...h.entries()]}),g=V([]);return kt(async()=>{try{const h=await Co({category:"entities",size:500});t.value=(h.pages??[]).filter(w=>w.path.startsWith(Us))}catch(h){s.value=h instanceof Error?h.message:"加载失败"}finally{n.value=!1}try{const h=await pf(1);g.value=(h.windows??[]).filter(w=>(w.top_repos??[]).length>0).slice(0,3)}catch{g.value=[]}}),(h,w)=>{const x=Ut("router-link");return $(),S("section",mm,[w[7]||(w[7]=f("h2",null,"🐙 GitHub Trending",-1)),f("p",vm,[w[4]||(w[4]=te(" 数据来源:trend-collect 定时采集(每日 2/8/14/20 点)编译成 wiki 页; ",-1)),de(x,{to:"/manage",class:"mini-link"},{default:$e(()=>[...w[3]||(w[3]=[te("去采集更多 →",-1)])]),_:1})]),f("div",gm,[Ie(f("input",{"onUpdate:modelValue":w[0]||(w[0]=R=>o.value=R),type:"search",class:"kw",placeholder:"过滤关键词(title/path)…"},null,512),[[ze,o.value]]),Ie(f("select",{"onUpdate:modelValue":w[1]||(w[1]=R=>r.value=R),"aria-label":"时间过滤"},[...w[5]||(w[5]=[f("option",{value:0},"全部时间",-1),f("option",{value:1},"近 1 天",-1),f("option",{value:3},"近 3 天",-1),f("option",{value:7},"近 7 天",-1)])],512),[[rr,r.value,void 0,{number:!0}]]),Ie(f("select",{"onUpdate:modelValue":w[2]||(w[2]=R=>i.value=R),"aria-label":"窗口过滤"},[w[6]||(w[6]=f("option",{value:"(all)"},"全部窗口",-1)),($(!0),S(se,null,ye(a.value,R=>($(),S("option",{key:R,value:R},N(R),9,_m))),128))],512),[[rr,i.value]]),f("span",ym,N(c.value.length)+" 页",1)]),g.value.length?($(),S("div",bm,[($(!0),S(se,null,ye(g.value,R=>($(),S("div",{key:R.lang,class:"snap-card"},[f("div",wm,N(R.lang||"?")+" · 快照 top",1),f("ol",$m,[($(!0),S(se,null,ye((R.top_repos??[]).slice(0,5),M=>($(),S("li",{key:M.repo},[f("span",km,N(M.repo),1),M.stars_total!=null?($(),S("span",Em,"★"+N(M.stars_total),1)):J("",!0)]))),128))])]))),128))])):J("",!0),n.value?($(),S("p",Sm,"加载中…")):s.value?($(),S("p",Cm,N(s.value),1)):c.value.length?J("",!0):($(),S("p",xm,"无匹配的趋势页(试试放宽过滤,或去管理页采集)。")),($(!0),S(se,null,ye(p.value,([R,M])=>($(),S("div",{key:R,class:"win-group"},[f("h3",Rm,[te(N(R)+" ",1),f("span",Tm,"("+N(M.length)+")",1)]),f("div",Am,[($(!0),S(se,null,ye(M,k=>($(),$t(x,{key:k.path,to:`/wiki/${k.path}`,class:"trow"},{default:$e(()=>[f("span",Om,N(k.title),1),f("span",{class:_e(["rsum",{none:!k.summary}])},N(k.summary||"(暂无摘要)"),3),f("span",Pm,"更新 "+N(k.updated||"—")+" · "+N(k.path),1)]),_:2},1032,["to"]))),128))])]))),128))])}}}),dl=rt(Im,[["__scopeId","data-v-3f250d95"]]),Nm=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"})),Ht=e=>()=>ml(Object.assign({"./views/AuditView.vue":()=>Ue(()=>import("./AuditView-DQw3Tihm.js"),__vite__mapDeps([0,1,2])),"./views/CronView.vue":()=>Ue(()=>Promise.resolve().then(()=>zh),void 0),"./views/DetailView.vue":()=>Ue(()=>Promise.resolve().then(()=>jd),void 0),"./views/EditView.vue":()=>Ue(()=>Promise.resolve().then(()=>Ap),void 0),"./views/GraphView.vue":()=>Ue(()=>import("./GraphView-BemlfE03.js"),__vite__mapDeps([3,1,4])),"./views/HealthView.vue":()=>Ue(()=>import("./HealthView-D1fBL4Km.js"),__vite__mapDeps([5,1,6])),"./views/HomeView.vue":()=>Ue(()=>Promise.resolve().then(()=>hm),void 0),"./views/ImportView.vue":()=>Ue(()=>Promise.resolve().then(()=>bh),void 0),"./views/LoginView.vue":()=>Ue(()=>Promise.resolve().then(()=>zp),void 0),"./views/ManageView.vue":()=>Ue(()=>Promise.resolve().then(()=>eh),void 0),"./views/ReviewQueueView.vue":()=>Ue(()=>import("./ReviewQueueView-B29rVNnB.js"),__vite__mapDeps([7,1,8])),"./views/SearchView.vue":()=>Ue(()=>Promise.resolve().then(()=>Dp),void 0),"./views/SharesView.vue":()=>Ue(()=>import("./SharesView-DkQVTVQy.js"),__vite__mapDeps([9,1,10])),"./views/TablesView.vue":()=>Ue(()=>import("./TablesView-BQ_Rqqzh.js"),__vite__mapDeps([11,1,12])),"./views/TagsView.vue":()=>Ue(()=>import("./TagsView-CyHKRuKG.js"),__vite__mapDeps([13,1,14])),"./views/TrashView.vue":()=>Ue(()=>import("./TrashView-BwDran7f.js"),__vite__mapDeps([15,1,16])),"./views/TrendingView.vue":()=>Ue(()=>Promise.resolve().then(()=>Nm),void 0)}),`./views/${e}.vue`,3),Vm=qu({history:Su(),routes:[{path:"/",component:fl},{path:"/wiki/:path(.*)",component:rl,props:!0},{path:"/search",component:il},{path:"/tags",component:Ht("TagsView")},{path:"/login",component:ll},{path:"/edit",component:to},{path:"/edit/new",component:to,props:{isNew:!0}},{path:"/trash",component:Ht("TrashView")},{path:"/reviews",component:Ht("ReviewQueueView")},{path:"/shares",component:Ht("SharesView")},{path:"/graph",component:Ht("GraphView")},{path:"/tables",component:Ht("TablesView")},{path:"/imports",component:cl},{path:"/audit",component:Ht("AuditView")},{path:"/health",component:Ht("HealthView")},{path:"/manage",component:al},{path:"/trending",component:dl},{path:"/cron",component:ul}]});Lc(ad).use(Vm).mount("#app");export{Ut as A,ke as B,Hm as C,jm as D,Sr as E,se as F,Wm as G,qm as H,Qm as I,Xm as J,ev as K,Jm as L,Gm as M,Ym as N,Zm as O,Bm as P,Co as Q,Ln as R,$t as S,Lm as T,Fm as U,Um as V,zm as W,ko as X,rt as _,f as a,J as b,S as c,Ze as d,ji as e,V as f,le as g,tv as h,$ as i,ro as j,ot as k,Te as l,te as m,_e as n,kt as o,Km as p,Mt as q,ye as r,Qu as s,N as t,Mn as u,ze as v,Ie as w,rs as x,de as y,$e as z};