diff --git a/docs/release-notes-v0.4.0.md b/docs/release-notes-v0.4.0.md new file mode 100644 index 0000000..bb892b8 --- /dev/null +++ b/docs/release-notes-v0.4.0.md @@ -0,0 +1,25 @@ +# v0.4.0 发布记录 + +发布日期:2026-10-16 + +## 新功能:计划模式 + +- 新增「计划」页:按天规划时间段(开始/结束时间、类别、备注),侧边栏"记录"组新增入口,手机端底部标签直达 +- 条目级打卡:完成 / 跳过 / 恢复,日汇总(计划项数、完成数、计划时长、实际投入) +- 计时时钟:任意条目一键开始/停止计时,自动累计实际投入分钟;同刻仅一个计时,开始新计时自动停止上一个 +- 计划数据进入同步体系,多端实时互通 + +## 新功能:范围化导出 + +- 设置 → 工作详情导出:当日 / 当周 / 当月 / 自定义时间段一键导出 CSV(含分类、项目、耗时、成果、待跟进、收获、备注) + +## 新功能:分类自定义 + +- 工作记录分类改为用户自定义(默认:制度学习 / 产品学习 / 打杂 / 项目实操 / 售后服务),设置页可添加、改名、删除,随账号同步 +- 记账支出 / 收入分类同样自定义,记账弹窗内可直接"新增分类" +- 历史数据自动迁移:旧固定分类(开发/BUG修复/学习成长…)按语义映射到新分类,报表与统计自动跟随 + +## 升级说明 + +- 服务器:cd /opt/daywork && git pull && cd server && docker compose up -d --build(需包含本次 plan 表的服务端支持) +- 客户端覆盖安装即可,本地库自动升级到 v5 并完成分类迁移 diff --git a/intern-log/dist/assets/index-D8vVtKDY.js b/intern-log/dist/assets/index-D8vVtKDY.js deleted file mode 100644 index 01d7c4d..0000000 --- a/intern-log/dist/assets/index-D8vVtKDY.js +++ /dev/null @@ -1,26 +0,0 @@ -(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 a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** -* @vue/shared v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ha(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ft={},Pr=[],Tn=()=>{},Bu=()=>!1,li=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ui=e=>e.startsWith("onUpdate:"),$t=Object.assign,Wa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ef=Object.prototype.hasOwnProperty,ut=(e,t)=>ef.call(e,t),Re=Array.isArray,sr=e=>qs(e)==="[object Map]",Ir=e=>qs(e)==="[object Set]",Yl=e=>qs(e)==="[object Date]",We=e=>typeof e=="function",bt=e=>typeof e=="string",Pn=e=>typeof e=="symbol",ct=e=>e!==null&&typeof e=="object",Uu=e=>(ct(e)||We(e))&&We(e.then)&&We(e.catch),qu=Object.prototype.toString,qs=e=>qu.call(e),tf=e=>qs(e).slice(8,-1),Hu=e=>qs(e)==="[object Object]",za=e=>bt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ks=Ha(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ci=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},nf=/-\w/g,mn=ci(e=>e.replace(nf,t=>t.slice(1).toUpperCase())),rf=/\B([A-Z])/g,dr=ci(e=>e.replace(rf,"-$1").toLowerCase()),Wu=ci(e=>e.charAt(0).toUpperCase()+e.slice(1)),ra=ci(e=>e?`on${Wu(e)}`:""),$n=(e,t)=>!Object.is(e,t),Po=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sf=e=>{const t=bt(e)?Number(e):NaN;return isNaN(t)?e:t};let Jl;const fi=()=>Jl||(Jl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Re(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(of).forEach(n=>{if(n){const s=n.split(af);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function et(e){let t="";if(bt(e))t=e;else if(Re(e))for(let n=0;nar(n,t))}const Yu=e=>!!(e&&e.__v_isRef===!0),te=e=>bt(e)?e:e==null?"":Re(e)||ct(e)&&(e.toString===qu||!We(e.toString))?Yu(e)?te(e.value):JSON.stringify(e,Ju,2):String(e),Ju=(e,t)=>Yu(t)?Ju(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[sa(s,a)+" =>"]=o,n),{})}:Ir(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sa(n))}:Pn(t)?sa(t):ct(t)&&!Re(t)&&!Hu(t)?String(t):t,sa=(e,t="")=>{var n;return Pn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Dt;class hf{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&&Dt&&(Dt.active?(this.parent=Dt,this.index=(Dt.scopes||(Dt.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(Dt===this)Dt=this.prevScope;else{let t=Dt;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(Cs){let t=Cs;for(Cs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;xs;){let t=xs;for(xs=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 ec(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function tc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ja(s),yf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ba(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(nc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function nc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Os)||(e.globalVersion=Os,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ba(e))))return;e.flags|=2;const t=e.dep,n=vt,s=yn;vt=e,yn=!0;try{ec(e);const o=e.fn(e._value);(t.version===0||$n(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{vt=n,yn=s,tc(e),e.flags&=-3}}function Ja(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 a=n.computed.deps;a;a=a.nextDep)Ja(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function yf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let yn=!0;const rc=[];function An(){rc.push(yn),yn=!1}function On(){const e=rc.pop();yn=e===void 0?!0:e}function Zl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=vt;vt=void 0;try{t()}finally{vt=n}}}let Os=0;class gf{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 Xa{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(!vt||!yn||vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==vt)n=this.activeLink=new gf(vt,this),vt.deps?(n.prevDep=vt.depsTail,vt.depsTail.nextDep=n,vt.depsTail=n):vt.deps=vt.depsTail=n,sc(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=vt.depsTail,n.nextDep=void 0,vt.depsTail.nextDep=n,vt.depsTail=n,vt.deps===n&&(vt.deps=s)}return n}trigger(t){this.version++,Os++,this.notify(t)}notify(t){Ga();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ya()}}}function sc(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)sc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const wa=new WeakMap,Or=Symbol(""),_a=Symbol(""),Ms=Symbol("");function Bt(e,t,n){if(yn&&vt){let s=wa.get(e);s||wa.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Xa),o.map=s,o.key=n),o.track()}}function Kn(e,t,n,s,o,a){const c=wa.get(e);if(!c){Os++;return}const f=h=>{h&&h.trigger()};if(Ga(),t==="clear")c.forEach(f);else{const h=Re(e),g=h&&za(n);if(h&&n==="length"){const y=Number(s);c.forEach((_,C)=>{(C==="length"||C===Ms||!Pn(C)&&C>=y)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),g&&f(c.get(Ms)),t){case"add":h?g&&f(c.get("length")):(f(c.get(Or)),sr(e)&&f(c.get(_a)));break;case"delete":h||(f(c.get(Or)),sr(e)&&f(c.get(_a)));break;case"set":sr(e)&&f(c.get(Or));break}}Ya()}function Wr(e){const t=lt(e);return t===e||(Bt(t,"iterate",Ms),cn(e))?t:Mn(e)?ir(e)?t.map(n=>lr(dn(n))):t.map(lr):t.map(dn)}function pi(e){return Bt(e=lt(e),"iterate",Ms),e}function Cn(e,t){return Mn(e)?lr(ir(e)?dn(t):t):dn(t)}const bf={__proto__:null,[Symbol.iterator](){return ia(this,Symbol.iterator,e=>Cn(this,e))},concat(...e){return Wr(this).concat(...e.map(t=>Re(t)?Wr(t):t))},entries(){return ia(this,"entries",e=>(e[1]=Cn(this,e[1]),e))},every(e,t){return Dn(this,"every",e,t,void 0,arguments)},filter(e,t){return Dn(this,"filter",e,t,n=>n.map(s=>Cn(this,s)),arguments)},find(e,t){return Dn(this,"find",e,t,n=>Cn(this,n),arguments)},findIndex(e,t){return Dn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Dn(this,"findLast",e,t,n=>Cn(this,n),arguments)},findLastIndex(e,t){return Dn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Dn(this,"forEach",e,t,void 0,arguments)},includes(...e){return aa(this,"includes",e)},indexOf(...e){return aa(this,"indexOf",e)},join(e){return Wr(this).join(e)},lastIndexOf(...e){return aa(this,"lastIndexOf",e)},map(e,t){return Dn(this,"map",e,t,void 0,arguments)},pop(){return ms(this,"pop")},push(...e){return ms(this,"push",e)},reduce(e,...t){return tu(this,"reduce",e,t)},reduceRight(e,...t){return tu(this,"reduceRight",e,t)},shift(){return ms(this,"shift")},some(e,t){return Dn(this,"some",e,t,void 0,arguments)},splice(...e){return ms(this,"splice",e)},toReversed(){return Wr(this).toReversed()},toSorted(e){return Wr(this).toSorted(e)},toSpliced(...e){return Wr(this).toSpliced(...e)},unshift(...e){return ms(this,"unshift",e)},values(){return ia(this,"values",e=>Cn(this,e))}};function ia(e,t,n){const s=pi(e),o=s[t],a=o.call(s);if(s!==e&&!cn(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(a));return c.next=()=>eu(a.next(),n),o!==oc[t]&&Object.defineProperties(c,{return:{get(){const f=a.return;return typeof f=="function"?f.bind(a):f}},throw:{get(){const f=a.throw;return typeof f=="function"?f.bind(a):f}}}),c}a._next=a.next,a.next=()=>eu(a._next(),n)}return a}function eu(e,t){return e.done||(e.value=t(e.value)),e}const oc=Array.prototype;function Dn(e,t,n,s,o,a){const c=pi(e),f=c!==e&&!cn(e),h=c[t];if(h!==oc[t]){const _=h.apply(e,a);return f?dn(_):_}let g=n;c!==e&&(f?g=function(_,C){return n.call(this,Cn(e,_),C,e)}:n.length>2&&(g=function(_,C){return n.call(this,_,C,e)}));const y=h.call(c,g,s);return f&&o?o(y):y}function tu(e,t,n,s){const o=pi(e),a=o!==e&&!cn(e);let c=n,f=!1;o!==e&&(a?(f=s.length===0,c=function(g,y,_){return f&&(f=!1,g=Cn(e,g)),n.call(this,g,Cn(e,y),_,e)}):n.length>3&&(c=function(g,y,_){return n.call(this,g,y,_,e)}));const h=o[t](c,...s);return f?Cn(e,h):h}function aa(e,t,n){const s=lt(e);Bt(s,"iterate",Ms);const o=s[t](...n);return(o===-1||o===!1)&&tl(n[0])?(n[0]=lt(n[0]),s[t](...n)):o}function ms(e,t,n=[]){An(),Ga();const s=lt(e)[t].apply(e,n);return Ya(),On(),s}const wf=Ha("__proto__,__v_isRef,__isVue"),ic=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pn));function _f(e){Pn(e)||(e=String(e));const t=lt(this);return Bt(t,"has",e),t.hasOwnProperty(e)}class ac{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,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Of:dc:a?cc:uc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=Re(t);if(!o){let h;if(c&&(h=bf[n]))return h;if(n==="hasOwnProperty")return _f}const f=Reflect.get(t,n,Ht(t)?t:s);if((Pn(n)?ic.has(n):wf(n))||(o||Bt(t,"get",n),a))return f;if(Ht(f)){const h=c&&za(n)?f:f.value;return o&&ct(h)?xa(h):h}return ct(f)?o?xa(f):Za(f):f}}class lc extends ac{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const c=Re(t)&&za(n);if(!this._isShallow){const g=Mn(a);if(!cn(s)&&!Mn(s)&&(a=lt(a),s=lt(s)),!c&&Ht(a)&&!Ht(s))return g||(a.value=s),!0}const f=c?Number(n)e,ko=e=>Reflect.getPrototypeOf(e);function Ef(e,t,n){return function(...s){const o=this.__v_raw,a=lt(o),c=sr(a),f=e==="entries"||e===Symbol.iterator&&c,h=e==="keys"&&c,g=o[e](...s),y=n?ka:t?lr:dn;return!t&&Bt(a,"iterate",h?_a:Or),$t(Object.create(g),{next(){const{value:_,done:C}=g.next();return C?{value:_,done:C}:{value:f?[y(_[0]),y(_[1])]:y(_),done:C}}})}}function xo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $f(e,t){const n={get(o){const a=this.__v_raw,c=lt(a),f=lt(o);e||($n(o,f)&&Bt(c,"get",o),Bt(c,"get",f));const{has:h}=ko(c),g=t?ka:e?lr:dn;if(h.call(c,o))return g(a.get(o));if(h.call(c,f))return g(a.get(f));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Bt(lt(o),"iterate",Or),o.size},has(o){const a=this.__v_raw,c=lt(a),f=lt(o);return e||($n(o,f)&&Bt(c,"has",o),Bt(c,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const c=this,f=c.__v_raw,h=lt(f),g=t?ka:e?lr:dn;return!e&&Bt(h,"iterate",Or),f.forEach((y,_)=>o.call(a,g(y),g(_),c))}};return $t(n,e?{add:xo("add"),set:xo("set"),delete:xo("delete"),clear:xo("clear")}:{add(o){const a=lt(this),c=ko(a),f=lt(o),h=!t&&!cn(o)&&!Mn(o)?f:o;return c.has.call(a,h)||$n(o,h)&&c.has.call(a,o)||$n(f,h)&&c.has.call(a,f)||(a.add(h),Kn(a,"add",h,h)),this},set(o,a){!t&&!cn(a)&&!Mn(a)&&(a=lt(a));const c=lt(this),{has:f,get:h}=ko(c);let g=f.call(c,o);g||(o=lt(o),g=f.call(c,o));const y=h.call(c,o);return c.set(o,a),g?$n(a,y)&&Kn(c,"set",o,a):Kn(c,"add",o,a),this},delete(o){const a=lt(this),{has:c,get:f}=ko(a);let h=c.call(a,o);h||(o=lt(o),h=c.call(a,o)),f&&f.call(a,o);const g=a.delete(o);return h&&Kn(a,"delete",o,void 0),g},clear(){const o=lt(this),a=o.size!==0,c=o.clear();return a&&Kn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Ef(o,e,t)}),n}function Qa(e,t){const n=$f(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(ut(n,o)&&o in s?n:s,o,a)}const Tf={get:Qa(!1,!1)},Pf={get:Qa(!1,!0)},Af={get:Qa(!0,!1)};const uc=new WeakMap,cc=new WeakMap,dc=new WeakMap,Of=new WeakMap;function Mf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Za(e){return Mn(e)?e:el(e,!1,xf,Tf,uc)}function If(e){return el(e,!1,Sf,Pf,cc)}function xa(e){return el(e,!0,Cf,Af,dc)}function el(e,t,n,s,o){if(!ct(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const c=Mf(tf(e));if(c===0)return e;const f=new Proxy(e,c===2?s:n);return o.set(e,f),f}function ir(e){return Mn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Mn(e){return!!(e&&e.__v_isReadonly)}function cn(e){return!!(e&&e.__v_isShallow)}function tl(e){return e?!!e.__v_raw:!1}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function jf(e){return!ut(e,"__v_skip")&&Object.isExtensible(e)&&zu(e,"__v_skip",!0),e}const dn=e=>ct(e)?Za(e):e,lr=e=>ct(e)?xa(e):e;function Ht(e){return e?e.__v_isRef===!0:!1}function L(e){return Df(e,!1)}function Df(e,t){return Ht(e)?e:new Lf(e,t)}class Lf{constructor(t,n){this.dep=new Xa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:lt(t),this._value=n?t:dn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||cn(t)||Mn(t);t=s?t:lt(t),$n(t,n)&&(this._rawValue=t,this._value=s?t:dn(t),this.dep.trigger())}}function Ut(e){return Ht(e)?e.value:e}const Rf={get:(e,t,n)=>t==="__v_raw"?e:Ut(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ht(o)&&!Ht(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function fc(e){return ir(e)?e:new Proxy(e,Rf)}class Kf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Xa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Os-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&vt!==this)return Zu(this,!0),!0}get value(){const t=this.dep.track();return nc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ff(e,t,n=!1){let s,o;return We(e)?s=e:(s=e.get,o=e.set),new Kf(s,o,n)}const Co={},Fo=new WeakMap;let Sr;function Nf(e,t=!1,n=Sr){if(n){let s=Fo.get(n);s||Fo.set(n,s=[]),s.push(e)}}function Vf(e,t,n=ft){const{immediate:s,deep:o,once:a,scheduler:c,augmentJob:f,call:h}=n,g=Q=>o?Q:cn(Q)||o===!1||o===0?Fn(Q,1):Fn(Q);let y,_,C,E,B=!1,ne=!1;if(Ht(e)?(_=()=>e.value,B=cn(e)):ir(e)?(_=()=>g(e),B=!0):Re(e)?(ne=!0,B=e.some(Q=>ir(Q)||cn(Q)),_=()=>e.map(Q=>{if(Ht(Q))return Q.value;if(ir(Q))return g(Q);if(We(Q))return h?h(Q,2):Q()})):We(e)?t?_=h?()=>h(e,2):e:_=()=>{if(C){An();try{C()}finally{On()}}const Q=Sr;Sr=y;try{return h?h(e,3,[E]):e(E)}finally{Sr=Q}}:_=Tn,t&&o){const Q=_,ce=o===!0?1/0:o;_=()=>Fn(Q(),ce)}const re=mf(),oe=()=>{y.stop(),re&&re.active&&Wa(re.effects,y)};if(a&&t){const Q=t;t=(...ce)=>{try{return Q(...ce)}finally{oe()}}}let $=ne?new Array(e.length).fill(Co):Co;const M=Q=>{if(!(!(y.flags&1)||!y.dirty&&!Q))if(t){const ce=y.run();if(Q||o||B||(ne?ce.some((ie,Y)=>$n(ie,$[Y])):$n(ce,$))){const ie=Sr;An();try{C&&C(),Sr=y;const Y=[ce,$===Co?void 0:ne&&$[0]===Co?[]:$,E];$=ce,h?h(t,3,Y):t(...Y)}finally{Sr=ie,On()}}}else y.run()};return f&&f(M),y=new Xu(_),y.scheduler=c?()=>c(M,!1):M,E=Q=>Nf(Q,!1,y),C=y.onStop=()=>{const Q=Fo.get(y);if(Q){if(h)h(Q,4);else for(const ce of Q)ce();Fo.delete(y)}},t?s?M(!0):$=y.run():c?c(M.bind(null,!0),!0):y.run(),oe.pause=y.pause.bind(y),oe.resume=y.resume.bind(y),oe.stop=oe,oe}function Fn(e,t=1/0,n){if(t<=0||!ct(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ht(e))Fn(e.value,t,n);else if(Re(e))for(let s=0;s{Fn(s,t,n)});else if(Hu(e)){for(const s in e)Fn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Fn(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Hs(e,t,n,s){try{return s?e(...s):e()}catch(o){vi(o,t,n)}}function fn(e,t,n,s){if(We(e)){const o=Hs(e,t,n,s);return o&&Uu(o)&&o.catch(a=>{vi(a,t,n)}),o}if(Re(e)){const o=[];for(let a=0;a>>1,o=Xt[s],a=Is(o);a=Is(n)?Xt.push(e):Xt.splice(Uf(t),0,e),e.flags|=1,vc()}}function vc(){No||(No=pc.then(yc))}function qf(e){if(!Re(e))nr&&e.id===-1?nr.splice(zr+1,0,e):e.flags&1||(Sn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Xt.splice(s,1),s=e?s-1:hn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function mc(e,t,n=0){if(Sn.length){let s=Sn,o=0;if(t){s=[];for(let c=0;cIs(c)-Is(f));if(Sn.length=o,nr){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function yc(e){try{for(hn=0;hn{s._d&&Ho(-1);const a=Vo(t),c=Mr.length;let f;try{f=e(...o)}finally{for(let h=Mr.length;h>c;h--)Wc();Vo(a),s._d&&Ho(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function Te(e,t){if(un===null)return e;const n=wi(un),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&We(t)?t.call(s&&s.proxy):t}}const zf=Symbol.for("v-scx"),Gf=()=>Ao(zf);function ht(e,t,n){return bc(e,t,n)}function bc(e,t,n=ft){const{immediate:s,deep:o,flush:a,once:c}=n,f=$t({},n),h=t&&s||!t&&a!=="post";let g;if(Fs){if(a==="sync"){const E=Gf();g=E.__watcherHandles||(E.__watcherHandles=[])}else if(!h){const E=()=>{};return E.stop=Tn,E.resume=Tn,E.pause=Tn,E}}const y=Qt;f.call=(E,B,ne)=>fn(E,y,B,ne);let _=!1;a==="post"?f.scheduler=E=>{E.i=y,Jt(E,y&&y.suspense)}:a!=="sync"&&(_=!0,f.scheduler=(E,B)=>{B?E():nl(E)}),f.augmentJob=E=>{t&&(E.flags|=4),_&&(E.flags|=2,y&&(E.id=y.uid,E.i=y))};const C=Vf(e,t,f);return Fs&&(g?g.push(C):h&&C()),C}function Yf(e,t,n){const s=this.proxy,o=bt(e)?e.includes(".")?wc(s,e):()=>s[e]:e.bind(s,s);let a;We(t)?a=t:(a=t.handler,n=t);const c=Ws(this),f=bc(o,a.bind(s),n);return c(),f}function wc(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),Jf=e=>e&&(e.defer||e.defer===""),nu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ru=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ca=(e,t)=>{const n=e&&e.to;return bt(n)?t?t(n):null:n},Xf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,c,f,h,g){const{mc:y,pc:_,pbc:C,o:{insert:E,querySelector:B,createText:ne,createComment:re,parentNode:oe}}=g,$=Er(t.props);let{dynamicChildren:M}=t;const Q=(Y,A,x)=>{Y.shapeFlag&16&&y(Y.children,A,x,o,a,c,f,h)},ce=(Y=t)=>{const A=Er(Y.props),x=Y.target=Ca(Y.props,B),N=Sa(x,Y,ne,E);x&&(c!=="svg"&&nu(x)?c="svg":c!=="mathml"&&ru(x)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(x),A||(Q(Y,x,N),bs(Y,!1)))},ie=Y=>{const A=()=>{if(er.get(Y)===A){if(er.delete(Y),Er(Y.props)){const x=oe(Y.el)||n;Q(Y,x,Y.anchor),bs(Y,!0)}ce(Y)}};er.set(Y,A),Jt(A,a)};if(e==null){const Y=t.el=ne(""),A=t.anchor=ne("");if(E(Y,n,s),E(A,n,s),Jf(t.props)||a&&a.pendingBranch){ie(t);return}$&&(Q(t,n,A),bs(t,!0)),ce()}else{t.el=e.el;const Y=t.anchor=e.anchor,A=er.get(e);if(A){A.flags|=8,er.delete(e),ie(t);return}t.targetStart=e.targetStart;const x=t.target=e.target,N=t.targetAnchor=e.targetAnchor,le=Er(e.props),W=le?n:x,ke=le?Y:N;if(c==="svg"||nu(x)?c="svg":(c==="mathml"||ru(x))&&(c="mathml"),M?(C(e.dynamicChildren,M,W,o,a,c,f),il(e,t,!0)):h||_(e,t,W,ke,o,a,c,f,!1),$)le?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):So(t,n,Y,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Pe=Ca(t.props,B);Pe&&(t.target=Pe,So(t,Pe,null,g,0))}else le&&So(t,x,N,g,1);bs(t,$)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:c,children:f,anchor:h,targetStart:g,targetAnchor:y,target:_,props:C}=e,E=Er(C),B=a||!E,ne=er.get(e);if(ne&&(ne.flags|=8,er.delete(e)),_&&(o(g),o(y)),a&&o(h),!ne&&(E||_)&&c&16)for(let re=0;re{e.isMounted=!0}),Pc(()=>{e.isUnmounting=!0}),e}const an=[Function,Array],xc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:an,onEnter:an,onAfterEnter:an,onEnterCancelled:an,onBeforeLeave:an,onLeave:an,onAfterLeave:an,onLeaveCancelled:an,onBeforeAppear:an,onAppear:an,onAfterAppear:an,onAppearCancelled:an},Zf={name:"BaseTransition",props:xc,setup(e,{slots:t}){const n=al(),s=kc();return()=>{const o=t.default&&rl(t.default(),!0),a=o&&o.length?Cc(o):n.subTree?Ce():void 0;if(!a)return;const c=lt(e),{mode:f}=c;if(s.isLeaving)return ua(a);const h=Bo(a);if(!h)return ua(a);let g=js(h,c,s,n,_=>g=_);h.type!==qt&&ur(h,g);let y=n.subTree&&Bo(n.subTree);if(y&&y.type!==qt&&!$r(y,h)&&Ds(n.subTree)){let _=js(y,c,s,n);if(ur(y,_),f==="out-in"&&h.type!==qt)return s.isLeaving=!0,_.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,y=void 0},ua(a);f==="in-out"&&h.type!==qt?_.delayLeave=(C,E,B)=>{const ne=Sc(s,y);ne[String(y.key)]=y,C[ln]=()=>{E(),C[ln]=void 0,delete g.delayedLeave,y=void 0},g.delayedLeave=()=>{B(),delete g.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return a}}};function Cc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qt){t=n;break}}return t}const ep=Zf;function Sc(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function js(e,t,n,s,o){const{appear:a,mode:c,persisted:f=!1,onBeforeEnter:h,onEnter:g,onAfterEnter:y,onEnterCancelled:_,onBeforeLeave:C,onLeave:E,onAfterLeave:B,onLeaveCancelled:ne,onBeforeAppear:re,onAppear:oe,onAfterAppear:$,onAppearCancelled:M}=t,Q=String(e.key),ce=Sc(n,e),ie=(x,N)=>{x&&fn(x,s,9,N)},Y=(x,N)=>{const le=N[1];ie(x,N),Re(x)?x.every(W=>W.length<=1)&&le():x.length<=1&&le()},A={mode:c,persisted:f,beforeEnter(x){let N=h;if(!n.isMounted)if(a)N=re||h;else return;x[ln]&&x[ln](!0);const le=ce[Q];if(le&&$r(e,le)){let W=le.el[ln];if(!W){const ke=Ds(le);W=ke&&ke.el[ln]}W&&W()}ie(N,[x])},enter(x){if(ce[Q]===e)return;let N=g,le=y,W=_;if(!n.isMounted)if(a)N=oe||g,le=$||y,W=M||_;else return;let ke=!1;x[ys]=Je=>{ke||(ke=!0,Je?ie(W,[x]):ie(le,[x]),A.delayedLeave&&A.delayedLeave(),x[ys]=void 0)};const Pe=x[ys].bind(null,!1);N?Y(N,[x,Pe]):Pe()},leave(x,N){const le=String(e.key);if(x[ys]&&x[ys](!0),n.isUnmounting)return N();ie(C,[x]);let W=!1;x[ln]=Pe=>{W||(W=!0,N(),Pe?ie(ne,[x]):ie(B,[x]),x[ln]=void 0,ce[le]===e&&delete ce[le])};const ke=x[ln].bind(null,!1);ce[le]=e,E?Y(E,[x,ke]):ke()},clone(x){const N=js(x,t,n,s,o);return o&&o(N),N}};return A}function ua(e){if(mi(e))return e=cr(e),e.children=null,e}function Bo(e){if(!mi(e))return hi(e.type)&&e.children?Cc(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&&We(n.default))return n.default()}}function ur(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ur(hi(n.type)&&Bo(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Ie&&Re(e.children)){const n=jc(e.children,!1);n&&ur(n,t)}}function rl(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aSs(ne,t&&(Re(t)?t[re]:t),n,s,o));return}if(Es(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ss(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?wi(s.component):s.el,c=o?null:a,{i:f,r:h}=e,g=t&&t.r,y=f.refs===ft?f.refs={}:f.refs,_=f.setupState,C=lt(_),E=_===ft?Bu:ne=>su(y,ne)?!1:ut(C,ne),B=(ne,re)=>!(re&&su(y,re));if(g!=null&&g!==h){if(ou(t),bt(g))y[g]=null,E(g)&&(_[g]=null);else if(Ht(g)){const ne=t;B(g,ne.k)&&(g.value=null),ne.k&&(y[ne.k]=null)}}if(We(h))Hs(h,f,12,[c,y]);else{const ne=bt(h),re=Ht(h);if(ne||re){const oe=()=>{if(e.f){const $=ne?E(h)?_[h]:y[h]:B()||!e.k?h.value:y[e.k];if(o)Re($)&&Wa($,a);else if(Re($))$.includes(a)||$.push(a);else if(ne)y[h]=[a],E(h)&&(_[h]=y[h]);else{const M=[a];B(h,e.k)&&(h.value=M),e.k&&(y[e.k]=M)}}else ne?(y[h]=c,E(h)&&(_[h]=c)):re&&(B(h,e.k)&&(h.value=c),e.k&&(y[e.k]=c))};if(c){const $=()=>{oe(),Uo.delete(e)};$.id=-1,Uo.set(e,$),Jt($,n)}else ou(e),oe()}}}function ou(e){const t=Uo.get(e);t&&(t.flags|=8,Uo.delete(e))}fi().requestIdleCallback;fi().cancelIdleCallback;const Es=e=>!!e.type.__asyncLoader,mi=e=>e.type.__isKeepAlive;function tp(e,t){$c(e,"a",t)}function np(e,t){$c(e,"da",t)}function $c(e,t,n=Qt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(yi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)mi(o.parent.vnode)&&rp(s,t,n,o),o=o.parent}}function rp(e,t,n,s){const o=yi(t,e,s,!0);pr(()=>{Wa(s[t],o)},n)}function yi(e,t,n=Qt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{An();const f=Ws(n),h=fn(t,n,e,c);return f(),On(),h});return s?o.unshift(a):o.push(a),a}}const Hn=e=>(t,n=Qt)=>{(!Fs||e==="sp")&&yi(e,(...s)=>t(...s),n)},sp=Hn("bm"),pn=Hn("m"),op=Hn("bu"),Tc=Hn("u"),Pc=Hn("bum"),pr=Hn("um"),ip=Hn("sp"),ap=Hn("rtg"),lp=Hn("rtc");function up(e,t=Qt){yi("ec",e,t)}const cp=Symbol.for("v-ndc");function ot(e,t,n,s){let o;const a=n,c=Re(e);if(c||bt(e)){const f=c&&ir(e);let h=!1,g=!1;f&&(h=!cn(e),g=Mn(e),e=pi(e)),o=new Array(e.length);for(let y=0,_=e.length;y<_;y++)o[y]=t(h?g?lr(dn(e[y])):dn(e[y]):e[y],y,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let f=0;ft(f,h,void 0,a));else{const f=Object.keys(e);o=new Array(f.length);for(let h=0,g=f.length;he?Jc(e)?wi(e):Ea(e.parent):null,$s=$t(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=>Ea(e.parent),$root:e=>Ea(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Oc(e),$forceUpdate:e=>e.f||(e.f=()=>{nl(e.update)}),$nextTick:e=>e.n||(e.n=ss.bind(e.proxy)),$watch:e=>Yf.bind(e)}),ca=(e,t)=>e!==ft&&!e.__isScriptSetup&&ut(e,t),dp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:c,type:f,appContext:h}=e;if(t[0]!=="$"){const C=c[t];if(C!==void 0)switch(C){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ca(s,t))return c[t]=1,s[t];if(o!==ft&&ut(o,t))return c[t]=2,o[t];if(ut(a,t))return c[t]=3,a[t];if(n!==ft&&ut(n,t))return c[t]=4,n[t];$a&&(c[t]=0)}}const g=$s[t];let y,_;if(g)return t==="$attrs"&&Bt(e.attrs,"get",""),g(e);if((y=f.__cssModules)&&(y=y[t]))return y;if(n!==ft&&ut(n,t))return c[t]=4,n[t];if(_=h.config.globalProperties,ut(_,t))return _[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return ca(o,t)?(o[t]=n,!0):s!==ft&&ut(s,t)?(s[t]=n,!0):ut(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:c}},f){let h;return!!(n[f]||e!==ft&&f[0]!=="$"&&ut(e,f)||ca(t,f)||ut(a,f)||ut(s,f)||ut($s,f)||ut(o.config.globalProperties,f)||(h=c.__cssModules)&&h[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ut(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function iu(e){return Re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let $a=!0;function fp(e){const t=Oc(e),n=e.proxy,s=e.ctx;$a=!1,t.beforeCreate&&au(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:f,provide:h,inject:g,created:y,beforeMount:_,mounted:C,beforeUpdate:E,updated:B,activated:ne,deactivated:re,beforeDestroy:oe,beforeUnmount:$,destroyed:M,unmounted:Q,render:ce,renderTracked:ie,renderTriggered:Y,errorCaptured:A,serverPrefetch:x,expose:N,inheritAttrs:le,components:W,directives:ke,filters:Pe}=t;if(g&&pp(g,s,null),c)for(const qe in c){const Ne=c[qe];We(Ne)&&(s[qe]=Ne.bind(n))}if(o){const qe=o.call(n,n);ct(qe)&&(e.data=Za(qe))}if($a=!0,a)for(const qe in a){const Ne=a[qe],it=We(Ne)?Ne.bind(n,n):We(Ne.get)?Ne.get.bind(n,n):Tn,Ge=!We(Ne)&&We(Ne.set)?Ne.set.bind(n):Tn,Qe=st({get:it,set:Ge});Object.defineProperty(s,qe,{enumerable:!0,configurable:!0,get:()=>Qe.value,set:Se=>Qe.value=Se})}if(f)for(const qe in f)Ac(f[qe],s,n,qe);if(h){const qe=We(h)?h.call(n):h;Reflect.ownKeys(qe).forEach(Ne=>{Wf(Ne,qe[Ne])})}y&&au(y,e,"c");function Le(qe,Ne){Re(Ne)?Ne.forEach(it=>qe(it.bind(n))):Ne&&qe(Ne.bind(n))}if(Le(sp,_),Le(pn,C),Le(op,E),Le(Tc,B),Le(tp,ne),Le(np,re),Le(up,A),Le(lp,ie),Le(ap,Y),Le(Pc,$),Le(pr,Q),Le(ip,x),Re(N))if(N.length){const qe=e.exposed||(e.exposed={});N.forEach(Ne=>{Object.defineProperty(qe,Ne,{get:()=>n[Ne],set:it=>n[Ne]=it,enumerable:!0})})}else e.exposed||(e.exposed={});ce&&e.render===Tn&&(e.render=ce),le!=null&&(e.inheritAttrs=le),W&&(e.components=W),ke&&(e.directives=ke),x&&Ec(e)}function pp(e,t,n=Tn){Re(e)&&(e=Ta(e));for(const s in e){const o=e[s];let a;ct(o)?"default"in o?a=Ao(o.from||s,o.default,!0):a=Ao(o.from||s):a=Ao(o),Ht(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[s]=a}}function au(e,t,n){fn(Re(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ac(e,t,n,s){let o=s.includes(".")?wc(n,s):()=>n[s];if(bt(e)){const a=t[e];We(a)&&ht(o,a)}else if(We(e))ht(o,e.bind(n));else if(ct(e))if(Re(e))e.forEach(a=>Ac(a,t,n,s));else{const a=We(e.handler)?e.handler.bind(n):t[e.handler];We(a)&&ht(o,a,e)}}function Oc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,f=a.get(t);let h;return f?h=f:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(g=>qo(h,g,c,!0)),qo(h,t,c)),ct(t)&&a.set(t,h),h}function qo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&qo(e,a,n,!0),o&&o.forEach(c=>qo(e,c,n,!0));for(const c in t)if(!(s&&c==="expose")){const f=vp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const vp={data:lu,props:uu,emits:uu,methods:ws,computed:ws,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:ws,directives:ws,watch:mp,provide:lu,inject:hp};function lu(e,t){return t?e?function(){return $t(We(e)?e.call(this,this):e,We(t)?t.call(this,this):t)}:t:e}function hp(e,t){return ws(Ta(e),Ta(t))}function Ta(e){if(Re(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function wp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ft;let o=n;const a=t.startsWith("update:"),c=a&&bp(s,t.slice(7));c&&(c.trim&&(o=n.map(y=>bt(y)?y.trim():y)),c.number&&(o=o.map(di)));let f,h=s[f=ra(t)]||s[f=ra(mn(t))];!h&&a&&(h=s[f=ra(dr(t))]),h&&fn(h,e,6,o);const g=s[f+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,fn(g,e,6,o)}}const _p=new WeakMap;function Ic(e,t,n=!1){const s=n?_p:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let c={},f=!1;if(!We(e)){const h=g=>{const y=Ic(g,t,!0);y&&(f=!0,$t(c,y))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!f?(ct(e)&&s.set(e,null),null):(Re(a)?a.forEach(h=>c[h]=null):$t(c,a),ct(e)&&s.set(e,c),c)}function gi(e,t){return!e||!li(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ut(e,t[0].toLowerCase()+t.slice(1))||ut(e,dr(t))||ut(e,t))}function cu(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:c,attrs:f,emit:h,render:g,renderCache:y,props:_,data:C,setupState:E,ctx:B,inheritAttrs:ne}=e,re=Vo(e);let oe,$;try{if(n.shapeFlag&4){const Q=o||s,ce=Q;oe=En(g.call(ce,Q,y,_,E,C,B)),$=f}else{const Q=t;oe=En(Q.length>1?Q(_,{attrs:f,slots:c,emit:h}):Q(_,null)),$=t.props?f:kp(f)}}catch(Q){Mr.length=0,vi(Q,e,1),oe=$e(qt)}let M=oe;if($&&ne!==!1){const Q=Object.keys($),{shapeFlag:ce}=M;Q.length&&ce&7&&(a&&Q.some(ui)&&($=xp($,a)),M=cr(M,$,!1,!0))}if(n.dirs&&(M=cr(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(n.dirs):n.dirs),n.transition){const Q=hi(M.type)&&Bo(M)||M;ur(Q,n.transition)}return oe=M,Vo(re),oe}function jc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||li(n))&&((t||(t={}))[n]=e[n]);return t},xp=(e,t)=>{const n={};for(const s in e)(!ui(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Cp(e,t,n){const{props:s,children:o,component:a}=e,{props:c,children:f,patchFlag:h}=t,g=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?du(s,c,g):!!c;if(h&8){const y=t.dynamicProps;for(let _=0;_Object.create(Lc),Kc=e=>Object.getPrototypeOf(e)===Lc;function Ep(e,t,n,s=!1){const o={},a=Rc();e.propsDefaults=Object.create(null),Fc(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=s?o:If(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function $p(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,f=lt(o),[h]=e.propsOptions;let g=!1;if((s||c>0)&&!(c&16)){if(c&8){const y=e.vnode.dynamicProps;for(let _=0;_{h=!0;const[C,E]=Nc(_,t,!0);$t(c,C),E&&f.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!a&&!h)return ct(e)&&s.set(e,Pr),Pr;if(Re(a))for(let y=0;ye==="_"||e==="_ctx"||e==="$stable",ol=e=>Re(e)?e.map(En):[En(e)],Pp=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>ol(t(...o)),n);return s._c=!1,s},Vc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(sl(o))continue;const a=e[o];if(We(a))t[o]=Pp(o,a,s);else if(a!=null){const c=ol(a);t[o]=()=>c}}},Bc=(e,t)=>{const n=ol(t);e.slots.default=()=>n},Uc=(e,t,n)=>{for(const s in t)(n||!sl(s))&&(e[s]=t[s])},Ap=(e,t,n)=>{const s=e.slots=Rc();if(e.vnode.shapeFlag&32){const o=t._;o?(Uc(s,t,n),n&&zu(s,"_",o,!0)):Vc(t,s)}else t&&Bc(e,t)},Op=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,c=ft;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:Uc(o,t,n):(a=!t.$stable,Vc(t,o)),c=t}else t&&(Bc(e,t),c={default:1});if(a)for(const f in o)!sl(f)&&c[f]==null&&delete o[f]},Jt=Lp;function Mp(e){return Ip(e)}function Ip(e,t){const n=fi();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:c,createText:f,createComment:h,setText:g,setElementText:y,parentNode:_,nextSibling:C,setScopeId:E=Tn,insertStaticContent:B}=e,ne=(v,b,U,fe=null,V=null,ae=null,ue=void 0,ye=null,xe=!!b.dynamicChildren)=>{if(v===b)return;v&&!$r(v,b)&&(fe=dt(v),Se(v,V,ae,!0),v=null),b.patchFlag===-2&&(xe=!1,b.dynamicChildren=null),b.dynamicChildren&&v&&v.dynamicChildren&&v.dynamicChildren.hasOnce&&(b.dynamicChildren===Pr&&(b.dynamicChildren=[]),b.dynamicChildren.hasOnce=!0);const{type:G,ref:z,shapeFlag:X}=b;switch(G){case bi:re(v,b,U,fe);break;case qt:oe(v,b,U,fe);break;case Oo:v==null&&$(b,U,fe,ue);break;case Ie:W(v,b,U,fe,V,ae,ue,ye,xe);break;default:X&1?ce(v,b,U,fe,V,ae,ue,ye,xe):X&6?ke(v,b,U,fe,V,ae,ue,ye,xe):(X&64||X&128)&&G.process(v,b,U,fe,V,ae,ue,ye,xe,Tt)}z!=null&&V?Ss(z,v&&v.ref,ae,b||v,!b):z==null&&v&&v.ref!=null&&Ss(v.ref,null,ae,v,!0)},re=(v,b,U,fe)=>{if(v==null)s(b.el=f(b.children),U,fe);else{const V=b.el=v.el;b.children!==v.children&&g(V,b.children)}},oe=(v,b,U,fe)=>{v==null?s(b.el=h(b.children||""),U,fe):b.el=v.el},$=(v,b,U,fe)=>{[v.el,v.anchor]=B(v.children,b,U,fe,v.el,v.anchor)},M=({el:v,anchor:b},U,fe)=>{let V;for(;v&&v!==b;)V=C(v),s(v,U,fe),v=V;s(b,U,fe)},Q=({el:v,anchor:b})=>{let U;for(;v&&v!==b;)U=C(v),o(v),v=U;o(b)},ce=(v,b,U,fe,V,ae,ue,ye,xe)=>{if(b.type==="svg"?ue="svg":b.type==="math"&&(ue="mathml"),v==null)ie(b,U,fe,V,ae,ue,ye,xe);else{const G=v.el&&v.el._isVueCE?v.el:null;try{G&&G._beginPatch(),x(v,b,V,ae,ue,ye,xe)}finally{G&&G._endPatch()}}},ie=(v,b,U,fe,V,ae,ue,ye)=>{let xe,G;const{props:z,shapeFlag:X,transition:Ae,dirs:Ve}=v;if(xe=v.el=c(v.type,ae,z&&z.is,z),X&8?y(xe,v.children):X&16&&A(v.children,xe,null,fe,V,da(v,ae),ue,ye),Ve&&kr(v,null,fe,"created"),Y(xe,v,v.scopeId,ue,fe),z){for(const Ye in z)Ye!=="value"&&!ks(Ye)&&a(xe,Ye,null,z[Ye],ae,fe);"value"in z&&a(xe,"value",null,z.value,ae),(G=z.onVnodeBeforeMount)&&_n(G,fe,v)}Ve&&kr(v,null,fe,"beforeMount");const Ze=jp(V,Ae);Ze&&Ae.beforeEnter(xe),s(xe,b,U),((G=z&&z.onVnodeMounted)||Ze||Ve)&&Jt(()=>{try{G&&_n(G,fe,v),Ze&&Ae.enter(xe),Ve&&kr(v,null,fe,"mounted")}finally{}},V)},Y=(v,b,U,fe,V)=>{if(U&&E(v,U),fe)for(let ae=0;ae{for(let G=xe;G{const ye=b.el=v.el;let{patchFlag:xe,dynamicChildren:G,dirs:z}=b;xe|=v.patchFlag&16;const X=v.props||ft,Ae=b.props||ft;let Ve;if(U&&xr(U,!1),(Ve=Ae.onVnodeBeforeUpdate)&&_n(Ve,U,b,v),z&&kr(b,v,U,"beforeUpdate"),U&&xr(U,!0),G&&(!v.dynamicChildren||v.dynamicChildren.length!==G.length)&&(xe=0,ue=!1,G=null),(X.innerHTML&&Ae.innerHTML==null||X.textContent&&Ae.textContent==null)&&y(ye,""),G?N(v.dynamicChildren,G,ye,U,fe,da(b,V),ae):ue||Ne(v,b,ye,null,U,fe,da(b,V),ae,!1),xe>0){if(xe&16)le(ye,X,Ae,U,V);else if(xe&2&&X.class!==Ae.class&&a(ye,"class",null,Ae.class,V),xe&4&&a(ye,"style",X.style,Ae.style,V),xe&8){const Ze=b.dynamicProps;for(let Ye=0;Ye{Ve&&_n(Ve,U,b,v),z&&kr(b,v,U,"updated")},fe)},N=(v,b,U,fe,V,ae,ue)=>{for(let ye=0;ye{if(b!==U){if(b!==ft)for(const ae in b)!ks(ae)&&!(ae in U)&&a(v,ae,b[ae],null,V,fe);for(const ae in U){if(ks(ae))continue;const ue=U[ae],ye=b[ae];ue!==ye&&ae!=="value"&&a(v,ae,ye,ue,V,fe)}"value"in U&&a(v,"value",b.value,U.value,V)}},W=(v,b,U,fe,V,ae,ue,ye,xe)=>{const G=b.el=v?v.el:f(""),z=b.anchor=v?v.anchor:f("");let{patchFlag:X,dynamicChildren:Ae,slotScopeIds:Ve}=b;Ve&&(ye=ye?ye.concat(Ve):Ve),v==null?(s(G,U,fe),s(z,U,fe),A(b.children||[],U,z,V,ae,ue,ye,xe)):X>0&&X&64&&Ae&&v.dynamicChildren&&v.dynamicChildren.length===Ae.length?(N(v.dynamicChildren,Ae,U,V,ae,ue,ye),(b.key!=null||V&&b===V.subTree)&&il(v,b,!0)):Ne(v,b,U,z,V,ae,ue,ye,xe)},ke=(v,b,U,fe,V,ae,ue,ye,xe)=>{b.slotScopeIds=ye,v==null?b.shapeFlag&512?V.ctx.activate(b,U,fe,ue,xe):Pe(b,U,fe,V,ae,ue,xe):Je(v,b,xe)},Pe=(v,b,U,fe,V,ae,ue)=>{const ye=v.component=Up(v,fe,V);if(mi(v)&&(ye.ctx.renderer=Tt),qp(ye,!1,ue),ye.asyncDep){if(V&&V.registerDep(ye,Le,ue,ae),!v.el){const xe=ye.subTree=$e(qt);oe(null,xe,b,U),v.placeholder=xe.el}}else Le(ye,v,b,U,V,ae,ue)},Je=(v,b,U)=>{const fe=b.component=v.component;if(Cp(v,b,U))if(fe.asyncDep&&!fe.asyncResolved){b.el=v.el,b.placeholder=v.placeholder,qe(fe,b,U);return}else fe.next=b,fe.update();else b.el=v.el,b.placeholder=v.placeholder,fe.vnode=b},Le=(v,b,U,fe,V,ae,ue)=>{const ye=()=>{if(v.isMounted){let{next:X,bu:Ae,u:Ve,parent:Ze,vnode:Ye}=v;{const zt=qc(v);if(zt){X&&(X.el=Ye.el,qe(v,X,ue)),zt.asyncDep.then(()=>{Jt(()=>{v.isUnmounted||G()},V)});return}}let tt=X,mt;xr(v,!1),X?(X.el=Ye.el,qe(v,X,ue)):X=Ye,Ae&&Po(Ae),(mt=X.props&&X.props.onVnodeBeforeUpdate)&&_n(mt,Ze,X,Ye),xr(v,!0);const kt=cu(v),Zt=v.subTree;v.subTree=kt,ne(Zt,kt,_(Zt.el),dt(Zt),v,V,ae),X.el=kt.el,tt===null&&Sp(v,kt.el),Ve&&Jt(Ve,V),(mt=X.props&&X.props.onVnodeUpdated)&&Jt(()=>_n(mt,Ze,X,Ye),V)}else{let X;const{el:Ae,props:Ve}=b,{bm:Ze,m:Ye,parent:tt,root:mt,type:kt}=v,Zt=Es(b);xr(v,!1),Ze&&Po(Ze),!Zt&&(X=Ve&&Ve.onVnodeBeforeMount)&&_n(X,tt,b),xr(v,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(kt,v.parent?v.parent.type:void 0);const zt=v.subTree=cu(v);ne(null,zt,U,fe,v,V,ae),b.el=zt.el}if(Ye&&Jt(Ye,V),!Zt&&(X=Ve&&Ve.onVnodeMounted)){const zt=b;Jt(()=>_n(X,tt,zt),V)}(b.shapeFlag&256||tt&&Es(tt.vnode)&&tt.vnode.shapeFlag&256)&&v.a&&Jt(v.a,V),v.isMounted=!0,b=U=fe=null}};v.scope.on();const xe=v.effect=new Xu(ye);v.scope.off();const G=v.update=xe.run.bind(xe),z=v.job=xe.runIfDirty.bind(xe);z.i=v,z.id=v.uid,xe.scheduler=()=>nl(z),xr(v,!0),G()},qe=(v,b,U)=>{b.component=v;const fe=v.vnode.props;v.vnode=b,v.next=null,$p(v,b.props,fe,U),Op(v,b.children,U),An(),hc(v),On()},Ne=(v,b,U,fe,V,ae,ue,ye,xe=!1)=>{const G=v&&v.children,z=v?v.shapeFlag:0,X=b.children,{patchFlag:Ae,shapeFlag:Ve}=b;if(Ae>0){if(Ae&128){Ge(G,X,U,fe,V,ae,ue,ye,xe);return}else if(Ae&256){it(G,X,U,fe,V,ae,ue,ye,xe);return}}Ve&8?(z&16&&Ke(G,V,ae),X!==G&&y(U,X)):z&16?Ve&16?Ge(G,X,U,fe,V,ae,ue,ye,xe):Ke(G,V,ae,!0):(z&8&&y(U,""),Ve&16&&A(X,U,fe,V,ae,ue,ye,xe))},it=(v,b,U,fe,V,ae,ue,ye,xe)=>{v=v||Pr,b=b||Pr;const G=v.length,z=b.length,X=Math.min(G,z);let Ae;for(Ae=0;Aez?Ke(v,V,ae,!0,!1,X):A(b,U,fe,V,ae,ue,ye,xe,X)},Ge=(v,b,U,fe,V,ae,ue,ye,xe)=>{let G=0;const z=b.length;let X=v.length-1,Ae=z-1;for(;G<=X&&G<=Ae;){const Ve=v[G],Ze=b[G]=xe?Rn(b[G]):En(b[G]);if($r(Ve,Ze))ne(Ve,Ze,U,null,V,ae,ue,ye,xe);else break;G++}for(;G<=X&&G<=Ae;){const Ve=v[X],Ze=b[Ae]=xe?Rn(b[Ae]):En(b[Ae]);if($r(Ve,Ze))ne(Ve,Ze,U,null,V,ae,ue,ye,xe);else break;X--,Ae--}if(G>X){if(G<=Ae){const Ve=Ae+1,Ze=VeAe)for(;G<=X;)Se(v[G],V,ae,!0),G++;else{const Ve=G,Ze=G,Ye=new Map;for(G=Ze;G<=Ae;G++){const jt=b[G]=xe?Rn(b[G]):En(b[G]);jt.key!=null&&Ye.set(jt.key,G)}let tt,mt=0;const kt=Ae-Ze+1;let Zt=!1,zt=0;const tn=new Array(kt);for(G=0;G=kt){Se(jt,V,ae,!0);continue}let Pt;if(jt.key!=null)Pt=Ye.get(jt.key);else for(tt=Ze;tt<=Ae;tt++)if(tn[tt-Ze]===0&&$r(jt,b[tt])){Pt=tt;break}Pt===void 0?Se(jt,V,ae,!0):(tn[Pt-Ze]=G+1,Pt>=zt?zt=Pt:Zt=!0,ne(jt,b[Pt],U,null,V,ae,ue,ye,xe),mt++)}const vr=Zt?Dp(tn):Pr;for(tt=vr.length-1,G=kt-1;G>=0;G--){const jt=Ze+G,Pt=b[jt],De=b[jt+1],Wn=jt+1{const{el:ae,type:ue,transition:ye,children:xe,shapeFlag:G}=v;if(G&6){Qe(v.component.subTree,b,U,fe);return}if(G&128){v.suspense.move(b,U,fe);return}if(G&64){ue.move(v,b,U,Tt);return}if(ue===Ie){s(ae,b,U);for(let X=0;Xye.enter(ae),V));else{const{leave:X,delayLeave:Ae,afterLeave:Ve}=ye,Ze=()=>{v.ctx.isUnmounted?o(ae):s(ae,b,U)},Ye=()=>{const tt=ae._isLeaving||!!ae[ln];ae._isLeaving&&ae[ln](!0),ye.persisted&&!tt?Ze():X(ae,()=>{Ze(),Ve&&Ve()})};Ae?Ae(ae,Ze,Ye):Ye()}else s(ae,b,U)},Se=(v,b,U,fe=!1,V=!1)=>{const{type:ae,props:ue,ref:ye,children:xe,dynamicChildren:G,shapeFlag:z,patchFlag:X,dirs:Ae,cacheIndex:Ve,memo:Ze}=v;if((X===-2||G&&G.hasOnce)&&(V=!1),ye!=null&&(An(),Ss(ye,null,U,v,!0),On()),Ve!=null&&(!v.ctx||v.ctx===b)&&(b.renderCache[Ve]=void 0),z&256){b.ctx.deactivate(v);return}const Ye=z&1&&Ae,tt=!Es(v);let mt;if(tt&&(mt=ue&&ue.onVnodeBeforeUnmount)&&_n(mt,b,v),z&6)we(v.component,U,fe);else{if(z&128){v.suspense.unmount(U,fe);return}Ye&&kr(v,null,b,"beforeUnmount"),z&64?v.type.remove(v,b,U,Tt,fe):G&&!G.hasOnce&&(ae!==Ie||X>0&&X&64)?Ke(G,b,U,!1,!0):(ae===Ie&&X&384||!V&&z&16)&&Ke(xe,b,U),fe&&Z(v)}const kt=Ze!=null&&Ve==null;(tt&&(mt=ue&&ue.onVnodeUnmounted)||Ye||kt)&&Jt(()=>{mt&&_n(mt,b,v),Ye&&kr(v,null,b,"unmounted"),kt&&(v.el=null)},U)},Z=v=>{const{type:b,el:U,anchor:fe,transition:V}=v,ae=b===Ie;if(ae&&!V){ee(U,fe);return}if(b===Oo){Q(v),V&&!V.persisted&&V.afterLeave&&V.afterLeave();return}const ue=ae?Ds(v):v,ye=()=>{ae?_(U)&&ee(U,fe):o(U),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(ue&&ue.shapeFlag&1&&V&&!V.persisted){const{leave:xe,delayLeave:G}=V,z=ue.el,X=()=>xe(z,ye);G?G(z,ye,X):X()}else ye()},ee=(v,b)=>{let U;for(;v!==b;)U=C(v),o(v),v=U;o(b)},we=(v,b,U)=>{const{bum:fe,scope:V,job:ae,subTree:ue,um:ye,m:xe,a:G}=v;pu(xe),pu(G),fe&&Po(fe),V.stop(),ae?(ae.flags|=8,Se(ue,v,b,U)):v.vnode.el&&ue&&(ue.transition=v.vnode.transition,Se(ue,v,b,U)),ye&&Jt(ye,b),Jt(()=>{v.isUnmounted=!0},b)},Ke=(v,b,U,fe=!1,V=!1,ae=0)=>{for(let ue=ae;ue{if(v.shapeFlag&6)return dt(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const b=C(v.anchor||v.el),U=b&&b[_c];return U?C(U):b},Kt=(v,b,U)=>{const fe=v&&b._vnode?void 0:v&&v.component?v.component.uid:Bp();Hf(()=>{v==null?b._vnode&&Se(b._vnode,null,null,!0):ne(b._vnode||null,v,b,null,null,null,U),b._vnode=v},fe)},Tt={p:ne,um:Se,m:Qe,r:Z,mt:Pe,mc:A,pc:Ne,pbc:N,n:dt,o:e};return{render:Kt,hydrate:void 0,createApp:gp(Kt)}}function da({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 xr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function jp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function il(e,t,n=!1){const s=e.children,o=t.children;if(Re(s)&&Re(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function qc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:qc(t)}function pu(e){if(e)for(let t=0;te.__isSuspense;function Lp(e,t){t&&t.pendingBranch?Re(e)?t.effects.push(...e):t.effects.push(e):qf(e)}const Ie=Symbol.for("v-fgt"),bi=Symbol.for("v-txt"),qt=Symbol.for("v-cmt"),Oo=Symbol.for("v-stc"),Mr=[];let on=null;function S(e=!1){Mr.push(on=e?null:[])}function Wc(){Mr.pop(),on=Mr[Mr.length-1]||null}let Ls=1;function Ho(e,t=!1){Ls+=e,e<0&&on&&t&&(on.hasOnce=!0)}function zc(e){return e.dynamicChildren=Ls>0?on||Pr:null,Wc(),Ls>0&&on&&on.push(e),e}function j(e,t,n,s,o,a){return zc(l(e,t,n,s,o,a,!0))}function At(e,t,n,s,o){return zc($e(e,t,n,s,o,!0))}function Rs(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Gc=({key:e})=>e??null,Mo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?bt(e)||Ht(e)||We(e)?{i:un,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,s=0,o=null,a=e===Ie?0:1,c=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gc(t),ref:t&&Mo(t),scopeId:gc,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:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:un};return f?(Wo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=bt(n)?8:16),Ls>0&&!c&&on&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&on.push(h),h}const $e=Rp;function Rp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===cp)&&(e=qt),Rs(e)){const f=cr(e,t,!0);return n&&Wo(f,n),Ls>0&&!a&&on&&(f.shapeFlag&6?on[on.indexOf(e)]=f:on.push(f)),f.patchFlag=-2,f}if(Gp(e)&&(e=e.__vccOpts),t){t=Kp(t);let{class:f,style:h}=t;f&&!bt(f)&&(t.class=et(f)),ct(h)&&(tl(h)&&!Re(h)&&(h=$t({},h)),t.style=or(h))}const c=bt(e)?1:Hc(e)?128:hi(e)?64:ct(e)?4:We(e)?2:0;return l(e,t,n,s,o,c,a,!0)}function Kp(e){return e?tl(e)||Kc(e)?$t({},e):e:null}function cr(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:c,children:f,transition:h}=e,g=t?Np(o||{},t):o,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Gc(g),ref:t&&t.ref?n&&a?Re(a)?a.concat(Mo(t)):[a,Mo(t)]:Mo(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cr(e.ssContent),ssFallback:e.ssFallback&&cr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&ur(y,h.clone(y)),y}function en(e=" ",t=0){return $e(bi,null,e,t)}function Fp(e,t){const n=$e(Oo,null,e);return n.staticCount=t,n}function Ce(e="",t=!1){return t?(S(),At(qt,null,e)):$e(qt,null,e)}function En(e){return e==null||typeof e=="boolean"?$e(qt):Re(e)?$e(Ie,null,e.slice()):Rs(e)?Rn(e):$e(bi,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cr(e)}function Wo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Re(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Wo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Kc(t)?t._ctx=un:o===3&&un&&(un.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(We(t)){if(s&65){Wo(e,{default:t});return}t={default:t,_ctx:un},n=32}else t=String(t),s&64?(n=16,t=[en(t)]):n=8;e.children=t,e.shapeFlag|=n}function Np(...e){const t={};for(let n=0;nQt||un;let zo,Ks;{const e=fi(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};zo=t("__VUE_INSTANCE_SETTERS__",n=>Qt=n),Ks=t("__VUE_SSR_SETTERS__",n=>Fs=n)}const Ws=e=>{const t=Qt;return zo(e),e.scope.on(),()=>{e.scope.off(),zo(t)}},vu=()=>{Qt&&Qt.scope.off(),zo(null)};function Jc(e){return e.vnode.shapeFlag&4}let Fs=!1;function qp(e,t=!1,n=!1){t&&Ks(t);const{props:s,children:o}=e.vnode,a=Jc(e);Ep(e,s,a,t),Ap(e,o,n||t);const c=a?Hp(e,t):void 0;return t&&Ks(!1),c}function Hp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,dp);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?zp(e):null,a=Ws(e),c=Hs(s,e,0,[e.props,o]),f=Uu(c);if(On(),a(),(f||e.sp)&&!Es(e)&&Ec(e),f){if(c.then(vu,vu),t)return c.then(h=>{Ks(!0);try{hu(e,h,t)}finally{Ks(!1)}}).catch(h=>{vi(h,e,0)});e.asyncDep=c}else hu(e,c)}else Xc(e)}function hu(e,t,n){We(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ct(t)&&(e.setupState=fc(t)),Xc(e)}function Xc(e,t,n){const s=e.type;e.render||(e.render=s.render||Tn);{const o=Ws(e);An();try{fp(e)}finally{On(),o()}}}const Wp={get(e,t){return Bt(e,"get",""),e[t]}};function zp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Wp),slots:e.slots,emit:e.emit,expose:t}}function wi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(fc(jf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $s)return $s[n](e)},has(t,n){return n in t||n in $s}})):e.proxy}function Gp(e){return We(e)&&"__vccOpts"in e}const st=(e,t)=>Ff(e,t,Fs);function Yp(e,t,n){try{Ho(-1);const s=arguments.length;return s===2?ct(t)&&!Re(t)?Rs(t)?$e(e,null,[t]):$e(e,t):$e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Rs(n)&&(n=[n]),$e(e,t,n))}finally{Ho(1)}}const Jp="3.5.44";/** -* @vue/runtime-dom v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Oa;const mu=typeof window<"u"&&window.trustedTypes;if(mu)try{Oa=mu.createPolicy("vue",{createHTML:e=>e})}catch{}const Qc=Oa?e=>Oa.createHTML(e):e=>e,Xp="http://www.w3.org/2000/svg",Qp="http://www.w3.org/1998/Math/MathML",Ln=typeof document<"u"?document:null,yu=Ln&&Ln.createElement("template"),Zp={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"?Ln.createElementNS(Xp,e):t==="mathml"?Ln.createElementNS(Qp,e):n?Ln.createElement(e,{is:n}):Ln.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Ln.createTextNode(e),createComment:e=>Ln.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ln.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{yu.innerHTML=Qc(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=yu.content;if(s==="svg"||s==="mathml"){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zn="transition",gs="animation",es=Symbol("_vtc"),Zc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ed=$t({},xc,Zc),ev=e=>(e.displayName="Transition",e.props=ed,e),os=ev((e,{slots:t})=>Yp(ep,td(e),t)),Cr=(e,t=[])=>{Re(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?Re(e)?e.some(t=>t.length>1):e.length>1:!1;function td(e){const t={};for(const W in e)W in Zc||(t[W]=e[W]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:g=c,appearToClass:y=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:C=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,B=tv(o),ne=B&&B[0],re=B&&B[1],{onBeforeEnter:oe,onEnter:$,onEnterCancelled:M,onLeave:Q,onLeaveCancelled:ce,onBeforeAppear:ie=oe,onAppear:Y=$,onAppearCancelled:A=M}=t,x=(W,ke,Pe,Je)=>{W._enterCancelled=Je,tr(W,ke?y:f),tr(W,ke?g:c),Pe&&Pe()},N=(W,ke)=>{W._isLeaving=!1,tr(W,_),tr(W,E),tr(W,C),ke&&ke()},le=W=>(ke,Pe)=>{const Je=W?Y:$,Le=()=>x(ke,W,Pe);Cr(Je,[ke,Le]),bu(()=>{tr(ke,W?h:a),kn(ke,W?y:f),gu(Je)||wu(ke,s,ne,Le)})};return $t(t,{onBeforeEnter(W){Cr(oe,[W]),kn(W,a),kn(W,c)},onBeforeAppear(W){Cr(ie,[W]),kn(W,h),kn(W,g)},onEnter:le(!1),onAppear:le(!0),onLeave(W,ke){W._isLeaving=!0;const Pe=()=>N(W,ke);kn(W,_),W._enterCancelled?(kn(W,C),Ma(W)):(Ma(W),kn(W,C)),bu(()=>{W._isLeaving&&(tr(W,_),kn(W,E),gu(Q)||wu(W,s,re,Pe))}),Cr(Q,[W,Pe])},onEnterCancelled(W){x(W,!1,void 0,!0),Cr(M,[W])},onAppearCancelled(W){x(W,!0,void 0,!0),Cr(A,[W])},onLeaveCancelled(W){N(W),Cr(ce,[W])}})}function tv(e){if(e==null)return null;if(ct(e))return[fa(e.enter),fa(e.leave)];{const t=fa(e);return[t,t]}}function fa(e){return sf(e)}function kn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[es]||(e[es]=new Set)).add(t)}function tr(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[es];n&&(n.delete(t),n.size||(e[es]=void 0))}function bu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let nv=0;function wu(e,t,n,s){const o=e._endId=++nv,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:f,propCount:h}=nd(e,t);if(!c)return s();const g=c+"end";let y=0;const _=()=>{e.removeEventListener(g,C),a()},C=E=>{E.target===e&&++y>=h&&_()};setTimeout(()=>{y(n[B]||"").split(", "),o=s(`${Zn}Delay`),a=s(`${Zn}Duration`),c=_u(o,a),f=s(`${gs}Delay`),h=s(`${gs}Duration`),g=_u(f,h);let y=null,_=0,C=0;t===Zn?c>0&&(y=Zn,_=c,C=a.length):t===gs?g>0&&(y=gs,_=g,C=h.length):(_=Math.max(c,g),y=_>0?c>g?Zn:gs:null,C=y?y===Zn?a.length:h.length:0);const E=y===Zn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Zn}Property`).toString());return{type:y,timeout:_,propCount:C,hasTransform:E}}function _u(e,t){for(;e.lengthku(n)+ku(e[s])))}function ku(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ma(e){return(e?e.ownerDocument:document).body.offsetHeight}function rv(e,t,n){const s=e[es];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const xu=Symbol("_vod"),rd=Symbol("_vsh"),sv=Symbol(""),ov=/(?:^|;)\s*display\s*:/;function iv(e,t,n){const s=e.style,o=bt(n);let a=!1;if(n&&!o){if(t)if(bt(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&_s(s,f,"")}else for(const c in t)n[c]==null&&_s(s,c,"");for(const c in n){c==="display"&&(a=!0);const f=n[c];f!=null?lv(e,c,!bt(t)&&t?t[c]:void 0,f)||_s(s,c,f):_s(s,c,"")}}else if(o){if(t!==n){const c=s[sv];c&&(n+=";"+c),s.cssText=n,a=ov.test(n)}}else t&&e.removeAttribute("style");xu in e&&((!o||t!==n)&&(e[xu]=a?s.display:""),e[rd]&&(s.display="none"))}const Eo=/\s*!important$/;function _s(e,t,n){if(Re(n))n.forEach(s=>_s(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Eo.test(n)?e.setProperty(t,n.replace(Eo,""),"important"):e.setProperty(t,n);else{const s=av(e,t);Eo.test(n)?e.setProperty(dr(s),n.replace(Eo,""),"important"):e[s]=n}}const Cu=["Webkit","Moz","ms"],pa={};function av(e,t){const n=pa[t];if(n)return n;let s=mn(t);if(s!=="filter"&&s in e)return pa[t]=s;s=Wu(s);for(let o=0;ova||(vv.then(()=>va=0),va=Date.now());function mv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Re(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const c=o.slice(),f=[s];for(let h=0;he.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yv=(e,t,n,s,o,a)=>{const c=o==="svg";t==="class"?rv(e,s,c):t==="style"?iv(e,n,s):li(t)?ui(t)||cv(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gv(e,t,s,c))?($u(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Eu(e,t,s,c,a,t!=="value")):e._isVueCE&&(bv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!bt(s)))?$u(e,mn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Eu(e,t,s,c))};function gv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&We(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 Pu(t)&&bt(n)?!1:t in e}function bv(e,t){const n=e._def.props;if(!n)return!1;const s=mn(t);return Array.isArray(n)?n.some(o=>mn(o)===s):Object.keys(n).some(o=>mn(o)===s)}const sd=new WeakMap,od=new WeakMap,Go=Symbol("_moveCb"),Au=Symbol("_enterCb"),Ia=new WeakMap,wv=e=>(delete e.props.mode,e),_v=wv({name:"TransitionGroup",props:$t({},ed,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=al(),s=kc();let o,a,c,f;const h=()=>(f===void 0&&(f=o.length>0&&Pv(o[0].el,n.vnode.el,Ou(e))),f);return Tc(()=>{if(Ia.delete(n),!h()){o=[],c=void 0;return}const g=Ou(e);o.forEach(xv);const y=c&&Tv(c,n.vnode.el);c=void 0,o.forEach(C=>Cv(C,y));const _=o.filter(Sv);Ma(n.vnode.el),_.forEach(C=>{const E=C.el,B=E.style;kn(E,g),B.transform=B.webkitTransform=B.transitionDuration="";const ne=E[Go]=re=>{re&&re.target!==E||(!re||re.propertyName.endsWith("transform"))&&(E.removeEventListener("transitionend",ne),E[Go]=null,tr(E,g))};E.addEventListener("transitionend",ne)}),o=[]}),()=>{const g=lt(e),y=td(g);let _=g.tag||Ie;if(o=[],f=void 0,a)for(let C=0;Cs.willMove()&&s.item.contains(t));return n&&_i(n.item,n)}function Pv(e,t,n){const s=e.cloneNode(),o=e[es];o&&o.forEach(f=>{f.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(f=>f&&s.classList.add(f)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:c}=nd(s);return a.removeChild(s),c}const Yo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Re(t)?n=>Po(t,n):t};function Av(e){e.target.composing=!0}function Mu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ar=Symbol("_assign"),$o=Symbol("_initialValue");function ha(e,t,n){return t&&(e=e.trim()),n&&(e=di(e)),e}const je={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[$o]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[$o]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Ar]=Yo(o);const a=s||o.props&&o.props.type==="number";Tr(e,t?"change":"input",c=>{c.target.composing||e[Ar](ha(e.value,n,a))}),(n||a)&&Tr(e,"change",()=>{e.value=ha(e.value,n,a)}),t||(Tr(e,"compositionstart",Av),Tr(e,"compositionend",Mu),Tr(e,"change",Mu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[$o];delete e[$o],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Ar](ha(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},c){if(e[Ar]=Yo(c),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?di(e.value):e.value,h=t??"";if(f===h)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Vn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Tr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?di(Jo(h)):Jo(h)),a=e.multiple,c=a?Ir(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Re(c)?o.slice():o:c];try{e[Ar](c)}finally{ss(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Ar]=Yo(s)},mounted(e,{value:t}){Iu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ar]=Yo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Ov(t,n[1],n[0]))&&Iu(e,t)}};function Ov(e,t,n){if(!n||Re(e))return ar(e,t);if(Ir(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Iu(e,t){const n=e.multiple,s=Re(t);if(!(n&&!s&&!Ir(t))){for(let o=0,a=e.options.length;oString(g)===String(f)):c.selected=vf(t,f)>-1}else c.selected=t.has(f);else if(ar(Jo(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return"_value"in e?e._value:e.value}const Mv=["ctrl","shift","alt","meta"],Iv={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)=>Mv.some(n=>e[`${n}Key`]&&!t.includes(n))},sn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=dr(o.key);if(t.some(c=>c===a||jv[c]===a))return e(o)})},Dv=$t({patchProp:yv},Zp);let ju;function Lv(){return ju||(ju=Mp(Dv))}const Rv=(...e)=>{const t=Lv().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Fv(s);if(!o)return;const a=t._component;!We(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,Kv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function Kv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Fv(e){return bt(e)?document.querySelector(e):e}function Et(e){return''+e+""}const Nv={calendar:Et(''),clock:Et(''),"check-circle":Et(''),edit:Et(''),tag:Et(''),star:Et(''),close:Et(''),flag:Et(''),chart:Et(''),export:Et(''),"chevron-left":Et(''),"chevron-right":Et(''),"chevron-down":Et(''),plus:Et(''),search:Et(''),settings:Et(''),memo:Et(''),lock:Et(''),wallet:Et(''),more:Et(''),shield:Et('')},Vv=["innerHTML"],Xe=Rt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=st(()=>Nv[t.name]||"");return(s,o)=>(S(),j("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Vv))}}),Bv=["aria-label"],Uv={class:"dialog-title"},qv={class:"dialog-msg"},Hv={class:"dialog-btns"},Wv=Rt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return ht(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,c)=>(S(),At(jr,{to:"body"},[$e(os,{name:"modal"},{default:fr(()=>[e.open?(S(),j("div",{key:0,class:"mask",onClick:c[2]||(c[2]=sn(f=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Uv,te(e.title),1),l("div",qv,te(e.message),1),l("div",Hv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>s("cancel"))},te(e.cancelText),1),l("button",{class:et(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>s("confirm"))},te(e.confirmText),3)])],8,Bv)])):Ce("",!0)]),_:1})]))}}),Wt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},qn=Wt(Wv,[["__scopeId","data-v-f27041d4"]]);var Du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var id={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Du,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,u=1,d=arguments.length;u"u"||a.Promise||(a.Promise=Promise);var g=Object.getPrototypeOf,y={}.hasOwnProperty;function _(r,i){return y.call(r,i)}function C(r,i){typeof i=="function"&&(i=i(g(r))),(typeof Reflect>"u"?c:Reflect.ownKeys)(i).forEach(function(u){B(r,u,i[u])})}var E=Object.defineProperty;function B(r,i,u,d){E(r,i,h(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function ne(r){return{from:function(i){return r.prototype=Object.create(i.prototype),B(r.prototype,"constructor",r),{extend:C.bind(null,r.prototype)}}}}var re=Object.getOwnPropertyDescriptor,oe=[].slice;function $(r,i,u){return oe.call(r,i,u)}function M(r,i){return i(r)}function Q(r){if(!r)throw new Error("Assertion Failed")}function ce(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&_(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var u=[],d=0,p=i.length;d"u"?[]:(Ye=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Ze=crypto.subtle.digest("SHA-512",new Uint8Array([0])),g(Ze),Ye]:[Ye,g(Ye),Ye]),Ye=Ze[0],qr=Ze[1],qr=qr&&qr.then,tt=Ye&&Ye.constructor,mt=!!Ze[2],kt=function(r,i){Wn.push([r,i]),zt&&(queueMicrotask(Ad),zt=!1)},Zt=!0,zt=!0,tn=[],vr=[],jt=U,Pt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:b,pgp:!1,env:{},finalize:b},De=Pt,Wn=[],hr=0,Js=[];function Ee(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=De;if(typeof r!="function"){if(r!==Ae)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&$i(this,this._value)}else this._state=null,this._value=null,++i.ref,function u(d,p){try{p(function(m){if(d._state===null){if(m===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Kr();m&&typeof m.then=="function"?u(d,function(k,P){m instanceof Ee?m._then(k,P):m.then(k,P)}):(d._state=!0,d._value=m,yl(d)),w&&Fr()}},$i.bind(null,d))}catch(m){$i(d,m)}}(this,r)}var Ei={get:function(){var r=De,i=eo;function u(d,p){var m=this,w=!r.global&&(r!==De||i!==eo),k=w&&!Gn(),P=new Ee(function(q,I){Ti(m,new ml(bl(d,r,w,k),bl(p,r,w,k),q,I,r))});return this._consoleTask&&(P._consoleTask=this._consoleTask),P}return u.prototype=Ae,u},set:function(r){B(this,"then",r&&r.prototype===Ae?Ei:{get:function(){return r},set:Ei.set})}};function ml(r,i,u,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=u,this.reject=d,this.psd=p}function $i(r,i){var u,d;vr.push(i),r._state===null&&(u=r._lib&&Kr(),i=jt(i),r._state=!1,r._value=i,d=r,tn.some(function(p){return p._value===d._value})||tn.push(d),yl(r),u)&&Fr()}function yl(r){var i=r._listeners;r._listeners=[];for(var u=0,d=i.length;u{for(var w=tn.length;w;)if(tn[--w]._value===m._value)return tn.splice(w,1)})(i),u.resolve(d)}catch(m){u.reject(m)}finally{--hr==0&&Pi(),--u.psd.ref||u.psd.finalize()}}function Ad(){mr(Pt,function(){Kr()&&Fr()})}function Kr(){var r=Zt;return zt=Zt=!1,r}function Fr(){var r,i,u;do for(;0.",wl="String expected.",no="__dbnames",Oi="readonly",Mi="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var _l={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ro(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=ke(i))[r],i}}function kl(){throw de.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function rt(r,i){try{var u=xl(r),d=xl(i);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return i{var k=I,P=w;if(typeof P!="function"&&P!==null)throw new TypeError("Class extends value "+String(P)+" is not a constructor or null");function q(){this.constructor=k}function I(){return w!==null&&w.apply(this,arguments)||this}return n(k,P),k.prototype=P===null?Object.create(P):(q.prototype=P.prototype,new q),Object.defineProperty(I.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),I.prototype.table=function(){return u},I})(r)),new Set),p=r.prototype;p;p=g(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function m(w){if(!w)return w;var k,P=Object.create(r.prototype);for(k in w)if(!d.has(k))try{P[k]=w[k]}catch{}return P}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=m,this.hook("reading",m),r},pt.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},pt.prototype.add=function(r,i){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,w=r;return m&&p&&(w=ro(m)(r)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"add",keys:i!=null?[i]:null,values:[w]})}).then(function(k){return k.numFailures?Ee.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{Y(r,m,k)}catch{}return k})},pt.prototype.upsert=function(r,i){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return u.core.get({trans:p,key:r}).then(function(m){var w=m??{};return El(w,i),d&&Y(w,d,r),u.core.mutate({trans:p,type:"put",values:[w],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(k){return k.numFailures?Ee.reject(k.failures[0]):!!m})})})},pt.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?Ct(new de.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},pt.prototype.put=function(r,i){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,w=r;return m&&p&&(w=ro(m)(r)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:i!=null?[i]:null})}).then(function(k){return k.numFailures?Ee.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{Y(r,m,k)}catch{}return k})},pt.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(u){return i.core.mutate({trans:u,type:"delete",keys:[r]}).then(function(d){return so(i,[r],d)}).then(function(d){return d.numFailures?Ee.reject(d.failures[0]):void 0})})},pt.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:_l}).then(function(u){return so(r,null,u)})}).then(function(i){return i.numFailures?Ee.reject(i.failures[0]):void 0})},pt.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(u){return i.core.getMany({keys:r,trans:u}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},pt.prototype.bulkAdd=function(r,i,u){var d=this,p=Array.isArray(i)?i:void 0,m=(u=u||(p?void 0:i))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,q=k.auto,k=k.keyPath;if(k&&p)throw new de.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new de.InvalidArgument("Arguments objects and keys must have the same length");var P=r.length,q=k&&q?r.map(ro(k)):r;return d.core.mutate({trans:w,type:"add",keys:p,values:q,wantResults:m}).then(function(I){var T=I.numFailures,O=I.failures;if(T===0)return m?I.results:I.lastResult;throw new dt("".concat(d.name,".bulkAdd(): ").concat(T," of ").concat(P," operations failed"),O)})})},pt.prototype.bulkPut=function(r,i,u){var d=this,p=Array.isArray(i)?i:void 0,m=(u=u||(p?void 0:i))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,q=k.auto,k=k.keyPath;if(k&&p)throw new de.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new de.InvalidArgument("Arguments objects and keys must have the same length");var P=r.length,q=k&&q?r.map(ro(k)):r;return d.core.mutate({trans:w,type:"put",keys:p,values:q,wantResults:m}).then(function(I){var T=I.numFailures,O=I.failures;if(T===0)return m?I.results:I.lastResult;throw new dt("".concat(d.name,".bulkPut(): ").concat(T," of ").concat(P," operations failed"),O)})})},pt.prototype.bulkUpdate=function(r){var i=this,u=this.core,d=r.map(function(w){return w.key}),p=r.map(function(w){return w.changes}),m=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(k){var P=[],q=[],I=(r.forEach(function(T,O){var F=T.key,R=T.changes,D=k[O];if(D){for(var K=0,J=Object.keys(R);KH+se&&K(H+q)})})}var J=Vr(u)&&u.limit===1/0&&(typeof r!="function"||R)&&{index:u.index,range:u.range};return K(0).then(function(){if(0{for(var Ue=Math.min(ge.length,Me.length),ze=-1,nt=0;nt=O})).length===0?Ee.resolve():(K.forEach(function(H){D.push(function(){var se,ve,me,_e=J,ge=H._cfg.dbschema,Oe=(vo(T,_e,R),vo(T,ge,R),J=T._dbSchema=ge,Ni(_e,ge)),be=(Oe.add.forEach(function(Me){Vi(R,Me[0],Me[1].primKey,Me[1].indexes)}),Oe.change.forEach(function(Me){if(Me.recreate)throw new de.Upgrade("Not yet support for changing primary key");var he=R.objectStore(Me.name);Me.add.forEach(function(Be){return fo(he,Be)}),Me.change.forEach(function(Be){he.deleteIndex(Be.name),fo(he,Be)}),Me.del.forEach(function(Be){return he.deleteIndex(Be)})}),H._cfg.contentUpgrade);if(be&&H._cfg.version>O)return uo(T,R),F._memoizedTables={},se=A(ge),Oe.del.forEach(function(Me){se[Me]=_e[Me]}),Fi(T,[T.Transaction.prototype]),co(T,[T.Transaction.prototype],c(se),se),F.schema=se,(ve=Qe(be))&&Nr(),ge=Ee.follow(function(){var Me;(me=be(F))&&ve&&(Me=Gn.bind(null,null),me.then(Me,Me))}),me&&typeof me.then=="function"?Ee.resolve(me):ge.then(function(){return me})}),D.push(function(se){var ve,me,_e=H._cfg.dbschema;ve=_e,me=se,[].slice.call(me.db.objectStoreNames).forEach(function(ge){return ve[ge]==null&&me.db.deleteObjectStore(ge)}),Fi(T,[T.Transaction.prototype]),co(T,[T.Transaction.prototype],T._storeNames,T._dbSchema),F.schema=T._dbSchema}),D.push(function(se){T.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(T.idbdb.version/10)===H._cfg.version?(T.idbdb.deleteObjectStore("$meta"),delete T._dbSchema.$meta,T._storeNames=T._storeNames.filter(function(ve){return ve!=="$meta"})):se.objectStore("$meta").put(H._cfg.version,"version"))})}),function H(){return D.length?Ee.resolve(D.shift()(F.idbtrans)).then(H):Ee.resolve()}().then(function(){Dl(J,R)}))}).catch(w);var P,q;c(p).forEach(function(I){Vi(u,I,p[I].primKey,p[I].indexes)}),uo(r,u),Ee.follow(function(){return r.on.populate.fire(m)}).catch(w)})}function Ud(r,i){Dl(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var u=po(0,r.idbdb,i);vo(r,r._dbSchema,i);for(var d=0,p=Ni(u,r._dbSchema).change;d{if(w.change.length||w.recreate)return console.warn("Unable to patch indexes of table ".concat(w.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=i.objectStore(w.name);w.add.forEach(function(P){z&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(P.src)),fo(k,P)})})(p[d]);if(typeof m=="object")return m.value}}function Ni(r,i){var u,d={del:[],add:[],change:[]};for(u in r)i[u]||d.del.push(u);for(u in i){var p=r[u],m=i[u];if(p){var w={name:u,def:m,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(m.primKey.keyPath||"")||p.primKey.auto!==m.primKey.auto)w.recreate=!0,d.change.push(w);else{var k=p.idxByName,P=m.idxByName,q=void 0;for(q in k)P[q]||w.del.push(q);for(q in P){var I=k[q],T=P[q];I?I.src!==T.src&&w.change.push(T):w.add.push(T)}(0{var r,i,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(d){r.delete(d)}),{toArray:function(){return Array.from(r).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);r.add(p),i.register(d._novip,p,p),r.size>d._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(d){if(d)for(var p=r.values(),m=p.next();!m.done;){var w=m.value;if(w.deref()===d._novip)return r.delete(w),void i.unregister(w);m=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function Bi(r,i){var u=r._dbNamesDB;return u||(u=r._dbNamesDB=new jn(no,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ui(r){return r&&typeof r.databases=="function"}function qi(r){return zn(function(){return De.letThrough=!0,r()})}function Hi(r){return!("from"in r)}var Ft=function(r,i){var u;if(!this)return u=new Ft,r&&"d"in r&&h(u,r),u;h(this,arguments.length?{d:1,from:r,to:1Math.pow(2,62)?0:K.oldVersion,T=J<1,r.idbdb=D.result,m&&Ud(r,I),Bd(r,J/10,I,F))},F),D.onsuccess=yt(function(){I=null;var K,J,H,se,ve,me,_e=r.idbdb=D.result,ge=$(_e.objectStoreNames);if(0"u"?Ee.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(O){function F(){return indexedDB.databases().finally(O)}P=setInterval(F,100),F()}).finally(function(){return clearInterval(P)}):Promise.resolve()).then(k)]).then(function(){return w(),i.onReadyBeingFired=[],Ee.resolve(qi(function(){return r.on.ready.fire(r.vip)})).then(function O(){var F;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((u=rt(u,d))===0){if(p&&m)return 0;if(p)return 1;if(m)return-1}return u})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((u,d,p,m)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=rt(u,d))===0){if(p&&m)return 0;if(p)return-1;if(m)return 1}return u})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function Xd(r,i,u,d){r.subscribers.add(u),d.addEventListener("abort",function(){var p,m;r.subscribers.delete(u),r.subscribers.size===0&&(p=r,m=i,setTimeout(function(){p.subscribers.size===0&&Ne(m,p)},3e3))})}var Qd={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(u,d,p){var m,w,k=r.transaction(u,d,p);return d==="readwrite"&&(p=(m=new AbortController).signal,k.addEventListener("abort",(w=function(P){return function(){if(m.abort(),d==="readwrite"){for(var q=new Set,I=0,T=u;I{var J=br["idb://".concat(F,"/").concat(R)];if(!J)return[];if(!(F=J.queries[D]))return[null,!1,J,null];var H=F[(K.query?K.query.index.name:null)||""];if(!H)return[null,!1,J,null];switch(D){case"query":var se=(ve=K.direction)!=null?ve:"next",ve=H.find(function(me){var _e;return me.req.limit===K.limit&&me.req.values===K.values&&((_e=me.req.direction)!=null?_e:"next")===se&&Wl(me.req.query.range,K.query.range)});return ve?[ve,!0,J,H]:[H.find(function(me){var _e;return("limit"in me.req?me.req.limit:1/0)>=K.limit&&((_e=me.req.direction)!=null?_e:"next")===se&&(!K.values||me.req.values)&&Jd(me.req.query.range,K.query.range)}),!1,J,H];case"count":return ve=H.find(function(me){return Wl(me.req.query.range,K.query.range)}),[ve,!!ve,J,H]}})(i,u,"query",m),O=T[0],q=T[2],I=T[3],O&&T[1]?O.obsSet=m.obsSet:(T=d.query(m).then(function(F){var R=F.result;if(O&&(O.res=R),w){for(var D=0,K=R.length;D{var ve=Kr();try{m&&Nr();var me=zn(r,se);return me=m?me.finally(Gn):me}finally{ve&&Fr()}})(J={subscr:K,signal:w.signal,requery:O,querier:r,trans:null}),T||(Xn.storagemutated.subscribe(R),T=!0),Promise.resolve(H).then(function(se){u=!0,i=se,k||J.signal.aborted||(F()||(q=K,F())?O():(P={},Ai(function(){return!k&&p.next&&p.next(se)})))},function(se){u=!1,["DatabaseClosedError","AbortError"].includes(se==null?void 0:se.name)||k||Ai(function(){k||p.error&&p.error(se)})}))};return setTimeout(O,0),I});return d.hasValue=function(){return u},d.getValue=function(){return i},d}var wr=jn;function ta(r){var i=Qn;try{Qn=!0,Xn.storagemutated.fire(r),Yi(r,!0)}finally{Qn=i}}C(wr,s(s({},Se),{delete:function(r){return new wr(r,{addons:[]}).delete()},exists:function(r){return new wr(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=wr.dependencies,u=i.indexedDB,i=i.IDBKeyRange,(Ui(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==no})}):Bi(u,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new de.MissingAPI)}var i,u},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return De.trans?mr(De.transless||Pt,r):r()},vip:qi,async:function(r){return function(){try{var i=Ji(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Ee.resolve(i)}catch(u){return Ct(u)}}},spawn:function(r,i,u){try{var d=Ji(r.apply(u,i||[]));return d&&typeof d.then=="function"?d:Ee.resolve(d)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return De.trans||null}},waitFor:function(r,i){return r=Ee.resolve(typeof r=="function"?wr.ignoreTransaction(r):r).timeout(i||6e4),De.trans?De.trans.waitFor(r):r},Promise:Ee,debug:{get:function(){return z},set:function(r){X(r)}},derive:ne,extend:h,props:C,override:M,Events:ls,on:Xn,liveQuery:zl,extendObservabilitySet:mo,getByKeyPath:ie,setByKeyPath:Y,delByKeyPath:function(r,i){typeof i=="string"?Y(r,i,void 0):"length"in i&&[].map.call(i,function(u){Y(r,u,void 0)})},shallowClone:A,deepClone:ke,getObjectDiff:Xi,cmp:rt,asap:ce,minKey:-1/0,addons:[],connections:{get:ps.toArray},errnames:Kt,dependencies:wo,cache:br,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,u){return r+i/Math.pow(10,2*u)})})),wr.maxKey=ds(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Xn(lo,function(r){Qn||(r=new CustomEvent(Di,{detail:r}),Qn=!0,dispatchEvent(r),Qn=!1)}),addEventListener(Di,function(r){r=r.detail,Qn||ta(r)}));var Hr,Qn=!1,Gl=function(){};return typeof BroadcastChannel<"u"&&((Gl=function(){(Hr=new BroadcastChannel(Di)).onmessage=function(r){return r.data&&ta(r.data)}})(),typeof Hr.unref=="function"&&Hr.unref(),Xn(lo,function(r){Qn||Hr.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!jn.disableBfCache&&r.persisted){z&&console.debug("Dexie: handling persisted pagehide"),Hr!=null&&Hr.close();for(var i=0,u=ps.toArray();in.key===e);return t?t.label:"其他"}const Zv={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},eh={class:"dialog-head"},th={key:0,class:"muted dialog-sub"},nh={class:"dialog-body"},rh={class:"form-grid"},sh={class:"field span2"},oh={key:0,class:"form-error"},ih={class:"field"},ah=["value"],lh={class:"field"},uh=["value"],ch={class:"field"},dh={class:"field"},fh={class:"field span2"},ph={class:"field"},vh={class:"field"},hh={class:"dialog-btns"},mh=Rt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L(""),a=L(null),c=L("dev"),f=L(null),h=L(""),g=L(""),y=L(0),_=L(0),C=L(""),E=L(null),B=st(()=>{var M;const oe=n.projects.filter(Q=>Q.archived!==1),$=(M=n.item)==null?void 0:M.project_id;if($&&!oe.some(Q=>Q.id===$)){const Q=n.projects.find(ie=>ie.id===$),ce=oe.slice();return Q&&ce.unshift({...Q,name:Q.name+"(已归档)"}),ce}return oe});function ne(oe){n.open&&oe.key==="Escape"&&s("cancel")}ht(()=>n.open,async oe=>{var $;if(oe){const M=n.item;o.value=(M==null?void 0:M.content)??"",a.value=(M==null?void 0:M.project_id)??null,c.value=(M==null?void 0:M.category)??"dev",f.value=(M==null?void 0:M.minutes)??null,h.value=(M==null?void 0:M.takeaway)??"",g.value=(M==null?void 0:M.remark)??"",y.value=(M==null?void 0:M.is_milestone)??0,_.value=(M==null?void 0:M.needs_followup)??0,C.value="",window.addEventListener("keydown",ne),await ss(),($=E.value)==null||$.focus()}else window.removeEventListener("keydown",ne)}),pr(()=>window.removeEventListener("keydown",ne)),ht(o,()=>{C.value&&(C.value="")});function re(){const oe=o.value.trim();if(!oe){C.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:oe,project_id:a.value,category:c.value,minutes:f.value&&f.value>0?f.value:null,takeaway:h.value.trim()||null,remark:g.value.trim()||null,is_milestone:y.value?1:0,needs_followup:_.value?1:0})}return(oe,$)=>(S(),At(jr,{to:"body"},[$e(os,{name:"modal"},{default:fr(()=>[e.open?(S(),j("div",{key:0,class:"mask",onClick:$[10]||($[10]=sn(M=>s("cancel"),["self"]))},[l("div",Zv,[l("div",eh,[l("div",null,[$[11]||($[11]=l("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(S(),j("div",th,te(e.date),1)):Ce("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:$[0]||($[0]=M=>s("cancel"))},[$e(Xe,{name:"close",size:16})])]),l("div",nh,[l("div",rh,[l("div",sh,[$[12]||($[12]=l("label",null,"工作内容(必填)",-1)),Te(l("input",{ref_key:"contentInput",ref:E,class:et(["input",{invalid:C.value}]),"onUpdate:modelValue":$[1]||($[1]=M=>o.value=M),onKeydown:Ot(re,["enter"])},null,34),[[je,o.value]]),C.value?(S(),j("div",oh,te(C.value),1)):Ce("",!0)]),l("div",ih,[$[14]||($[14]=l("label",null,"所属项目",-1)),Te(l("select",{class:"select","onUpdate:modelValue":$[2]||($[2]=M=>a.value=M)},[$[13]||($[13]=l("option",{value:null},"无项目",-1)),(S(!0),j(Ie,null,ot(B.value,M=>(S(),j("option",{key:M.id,value:M.id},te(M.name),9,ah))),128))],512),[[Vn,a.value]])]),l("div",lh,[$[15]||($[15]=l("label",null,"工作分类",-1)),Te(l("select",{class:"select","onUpdate:modelValue":$[3]||($[3]=M=>c.value=M)},[(S(!0),j(Ie,null,ot(Ut(zs),M=>(S(),j("option",{key:M.key,value:M.key},te(M.label),9,uh))),128))],512),[[Vn,c.value]])]),l("div",ch,[$[16]||($[16]=l("label",null,"耗时(分钟)",-1)),Te(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":$[4]||($[4]=M=>f.value=M),placeholder:"选填"},null,512),[[je,f.value,void 0,{number:!0}]])]),l("div",dh,[$[17]||($[17]=l("label",null,"主要收获",-1)),Te(l("input",{class:"input","onUpdate:modelValue":$[5]||($[5]=M=>h.value=M),placeholder:"一句话:学到了什么"},null,512),[[je,h.value]])]),l("div",fh,[$[18]||($[18]=l("label",null,"备注",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":$[6]||($[6]=M=>g.value=M),placeholder:"背景、链接、未决事项(选填)"},null,512),[[je,g.value]])]),l("div",ph,[$[19]||($[19]=l("label",null,"成果标记",-1)),l("button",{class:et(["toggle-btn",{on:y.value===1}]),onClick:$[7]||($[7]=M=>y.value=y.value===1?0:1)},te(y.value===1?"已标记为成果":"未标记"),3)]),l("div",vh,[$[20]||($[20]=l("label",null,"待跟进",-1)),l("button",{class:et(["toggle-btn",{onwarn:_.value===1}]),onClick:$[8]||($[8]=M=>_.value=_.value===1?0:1)},te(_.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",hh,[l("button",{class:"btn btn-sm",onClick:$[9]||($[9]=M=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:re},"保存修改")])])])):Ce("",!0)]),_:1})]))}}),yh=Wt(mh,[["__scopeId","data-v-63bc0b48"]]);function Ts(e){return e<10?"0"+e:String(e)}function Bn(e){return e.getFullYear()+"-"+Ts(e.getMonth()+1)+"-"+Ts(e.getDate())}function xt(){return Bn(new Date)}function wt(){const e=new Date;return Bn(e)+"T"+Ts(e.getHours())+":"+Ts(e.getMinutes())+":"+Ts(e.getSeconds())}function Un(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function is(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Nn(e,t){const n=is(e);return n.setDate(n.getDate()+t),Bn(n)}function ei(e,t){const n=is(e),s=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(s,o)),Bn(n)}function Ps(e){const t=is(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Bn(t)}function gh(e){const t=is(e).getDay();return t===0||t===6}function bh(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ad(e){const t=is(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const wh=15e4;function Da(e){const t=new Uint8Array(e);let n="";for(let s=0;s({}));if(!o.ok){const c=a&&a.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!a.userId||!a.username)throw new Error("登录响应异常");return{userId:String(a.userId),username:String(a.username)}}async function fl(e,t,n){const s=await Fh(n,e,t);oi(s.userId);const o={userId:s.userId,username:s.username};return Rh(o),pd(s.username,t),o}async function Nh(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return fl(n,t,"login")}async function Vh(e,t,n){const s=(e||"").trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return fl(s,t,"register")}async function Bh(){const e=gn();if(!e)return null;try{return await fl(e.username,e.password,"login")}catch{return null}}async function Uh(){ri(),ll(),si=null,fd()}function qh(){ri(),ll(),si=null,fd(),Kh()}async function Hh(e,t){if(!Vs())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=gn();if(!s||s.password!==e)throw new Error("旧密码不正确");const o=await Rr();let a;try{a=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+vd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!a.ok){const c=await a.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+a.status)}pd(s.username,t)}async function Wh(){if(!Vs())throw new Error("未登录");const t=await Rr();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+vd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s&&s.error||"删除失败 "+n.status)}qh()}function vd(){return xi()}const Ka=L(null),Fa=L(null),Gs=L(0);function rr(){Gs.value++}const Xr=L(""),Bs=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Yr=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Io(e){return JSON.stringify(e)}async function zh(e){return pe.table(e).toArray()}function jo(e,t){return e==="setting"?t.key:t.id}async function Gh(){for(const e of Bs){const t=pe.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Yr.has(s.key))continue;const o={};s.uuid||(o.uuid=Yh()),!s.updated_at&&s.created_at&&(o.updated_at=s.created_at),Object.keys(o).length&&await t.update(jo(e,s),o)}}}function Yh(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Jh(){return gn()!=null}async function Xh(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Qh(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function hd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function Zh(e,t){let n=xi();return n||(n=await hd(e,t),Ns(n),n)}async function md(){const e=gn();if(!e)throw new Error("未登录");const t=await Rr(),n=await fetch(t+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e.username,password:e.password})});if(!n.ok)throw new Error("云端账号校验失败:"+n.status)}async function Na(){const e=gn();if(!e)throw new Error("未登录,无法同步");return wd({baseUrl:await Rr(),username:e.username,password:e.password})}async function yd(){try{await Na()}catch(e){Xr.value=e instanceof Error?e.message:String(e);try{await Na()}catch{}throw e}}function gd(e,t,n){const s={};for(const o of Object.keys(t))o!=="id"&&(s[o]=t[o]);if(e==="log_item"){delete s.work_log_id,delete s.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(s.wuuid=o.uuid);const a=t.project_id?n.project.get(t.project_id):null;a&&a.uuid&&(s.puuid=a.uuid)}return s}async function bd(){const e=await pe.work_log.toArray(),t=await pe.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let As=!1,Do=!1,Va=!1,Qr=null,xn=null,Ba="",Ua=!1,Lo=null;async function Zr(){if(As){Do=!0;return}try{if(!await Jh())return;await wd(await em()),Xr.value=""}catch(e){Xr.value=e instanceof Error?e.message:String(e)}}async function em(){const e=gn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Rr(),username:e.username,password:e.password}}function tm(){if(Ua)return;Ua=!0,Lo=Yv(async()=>{const t={};for(const n of Bs)t[n]=await pe.table(n).count();return t}).subscribe({next:()=>{Va||As||(Qr&&globalThis.clearTimeout(Qr),Qr=globalThis.setTimeout(()=>{Zr()},3e3))},error:()=>{}})}function nm(){Lo&&(Lo.unsubscribe(),Lo=null),xn&&(xn.close(),xn=null,Ba=""),Qr&&(globalThis.clearTimeout(Qr),Qr=null),Ua=!1}function rm(e,t){const n=e+"|"+t;if(!(xn&&Ba===n)){xn&&(xn.close(),xn=null);try{xn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ba=n,xn.onmessage=()=>{Zr()}}catch{xn=null}}}async function wd(e){if(As)return Do=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};As=!0,Va=!0;try{const t=await sm(e);return Do&&(Do=!1,globalThis.setTimeout(()=>{Zr()},800)),t}finally{As=!1,Va=!1}}async function sm(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Gh();const n=await bd(),s=await pe.sync_mirror.toArray(),o=new Map;for(const re of s)o.set(re.table+"|"+re.uuid,re);const a={},c=[];let f=0;for(const re of Bs){let oe=await zh(re);re==="setting"&&(oe=oe.filter(M=>!Yr.has(M.key)));const $=new Map;for(const M of oe)$.set(M.uuid,M);for(const[M,Q]of $){const ce=gd(re,Q,n),ie=Io(ce),Y=o.get(re+"|"+M);(!Y||Y.hash!==ie)&&(a[re]=a[re]||[],a[re].push(ce),f++)}for(const[M,Q]of o)M.startsWith(re+"|")&&!$.has(Q.uuid)&&c.push({table:re,uuid:Q.uuid,deleted_at:wt()});a[re]=a[re]||[]}c.push(...um());const h=await Zh(t,e),g=re=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+re},body:JSON.stringify({device:"client",tables:a,tombstones:c})});let y=await g(h);if(y.status===401){Ns("");const re=await hd(t,e);Ns(re),y=await g(re)}if(!y.ok)throw new Error("同步服务返回 "+y.status);const _=await y.json(),C=_.tables||{},E=_.tombstones||[],B=await am(C,E);rm(t,xi()||h);const ne=wt();return await Qh(ne),(B.changed>0||B.removed>0||f>0)&&rr(),{pushed:f,pulled:B.changed,removed:B.removed,errors:0,at:ne}}function _d(){var t;return"dsh_idmap_"+(((t=gn())==null?void 0:t.username)||"anon")}function om(){try{const e=localStorage.getItem(_d());if(e)return JSON.parse(e)}catch{}return{}}function im(e){try{localStorage.setItem(_d(),JSON.stringify(e))}catch{}}async function am(e,t){const n=om(),s=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await pe.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const a=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,f=0;const h={},g={};for(const C of Bs){const E=pe.table(C),B=await E.toArray(),ne=new Map(B.map(x=>[jo(C,x),x])),re=new Map(B.filter(x=>x.uuid).map(x=>[x.uuid,x])),oe=(e[C]||[]).filter(x=>!s.has(C+"|"+x.uuid)),$=oe.filter(x=>!(C==="setting"&&Yr.has(x.key))),M=oe.filter(x=>C==="setting"&&Yr.has(x.key));for(const x of M)lm(C,x.uuid);const Q=C==="setting"?[]:B.filter(x=>x.uuid&&!a.has(x.uuid)&&!s.has(C+"|"+x.uuid)),ce={v:Math.max(0,...B.map(x=>Number(x.id)||0))};$.length;const ie=[];for(const x of $){const N={...x};if(C==="log_item"){const ke=N.wuuid?h[N.wuuid]:void 0;if(!ke)continue;N.work_log_id=ke,delete N.wuuid,N.project_id=N.puuid?g[N.puuid]??null:null,delete N.puuid}let le=jo(C,x);if(C==="setting")le=x.key;else{const ke=n[C]&&n[C][x.uuid],Pe=re.get(x.uuid);Pe&&Pe.id!=null?le=Pe.id:typeof ke=="number"?le=ke:le=++ce.v}const W={...N,id:le};C==="setting"&&Yr.has(W.key)||(ie.push(W),C==="work_log"&&(h[x.uuid]=le),C==="project"&&(g[x.uuid]=le))}const Y=ie.concat(Q);for(const x of Y){const N=ne.get(jo(C,x));(!N||Io(N)!==Io(x))&&c++}f+=B.filter(x=>x.uuid&&!ie.some(N=>N.uuid===x.uuid)&&!s.has(C+"|"+x.uuid)).length,await E.clear(),Y.length&&await E.bulkPut(Y);const A={};for(const x of Y)x.uuid&&(A[x.uuid]=x.id);n[C]=A}im(n);const y=await bd(),_=[];for(const C of Bs){const E=await pe.table(C).toArray();for(const B of E)C==="setting"&&Yr.has(B.key)||B.uuid&&_.push({table:C,uuid:B.uuid,hash:Io(gd(C,B,y))})}return await pe.sync_mirror.clear(),_.length&&await pe.sync_mirror.bulkAdd(_.map(C=>({...C}))),await pe.tombstone.clear(),{changed:c,removed:f+ii.length}}const ii=[];function lm(e,t){ii.some(n=>n.table===e&&n.uuid===t)||ii.push({table:e,uuid:t,deleted_at:wt()})}function um(){return ii.splice(0)}const cm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function _t(){await yd()}async function gt(e,t){const n=await pe.setting.get(e);return n?n.value:t}async function Lt(e,t){await pe.setting.put({key:e,value:t}),cm.has(e)||await _t()}async function Lr(){const e=await Promise.all([gt("work_start","09:00"),gt("work_end","18:00"),gt("grace_minutes","10"),gt("lunch_minutes","60"),gt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function dm(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function fm(){return gt("last_location","")}async function pm(e,t){const n=t.trim();await Lt("last_location",n),n&&await ai(n);let s=!1;const o=await bn(e);o&&o.id?(o.location||"")!==n&&(await pe.attendance.update(o.id,{location:n||null}),s=!0):n&&(await pe.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:wt()}),s=!0),s&&await _t()}async function pl(){const e=await gt("location_presets","");if(!e)return Ru.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Ru.slice()}async function kd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Lt("location_presets",JSON.stringify(t))}async function ai(e){const t=e.trim();if(!t)return;const n=await pl();n.includes(t)||await kd([...n,t])}async function Us(e=!1){const t=await pe.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function vm(e){await pe.project.add({name:e.trim(),archived:0,created_at:wt()}),await _t()}async function hm(e,t){await pe.project.update(e,{name:t.trim()}),await _t()}async function mm(e,t){await pe.project.update(e,{archived:t?1:0}),await _t()}async function bn(e){return pe.attendance.where("date").equals(e).first()}async function xd(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim();let s=!1;const o=await bn(e);if(o&&o.id){if(!o.clock_in_at){const a={clock_in_at:wt()};n&&(a.location=n),await pe.attendance.update(o.id,a),s=!0}n&&(await gt("last_location","")!==n&&await Lt("last_location",n),await ai(n)),s&&await _t();return}await pe.attendance.add({date:e,clock_in_at:wt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:wt()}),n&&(await Lt("last_location",n),await ai(n)),await _t()}async function ym(e){const t=await bn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await pe.attendance.update(t.id,{clock_out_at:wt()}),await _t())}async function gm(){const e=new Date,t=Bn(e);let n="";if(e.getHours()<4){const s=await bn(Nn(t,-1));s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await pe.attendance.update(s.id,{clock_out_at:wt()}),n=s.date)}if(!n){const s=await bn(t);s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await pe.attendance.update(s.id,{clock_out_at:wt()}),n=s.date)}if(!n)throw new Error("没有进行中的打卡");return await _t(),n}async function bm(e,t,n,s,o){(o||"").trim()&&await ai(o);const a=await bn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:wt()};a&&a.id?await pe.attendance.update(a.id,c):await pe.attendance.add(c),await _t()}async function wm(e,t,n){const s=(n||"").trim();if(!s)return;const o=await bn(e);o&&o.id&&(await pe.attendance.update(o.id,{[t]:e+"T"+s+":00"}),await _t())}async function Ci(e,t){return pe.attendance.where("date").between(e,t,!0,!0).toArray()}async function _m(e,t){const n=await bn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:wt()};n&&n.id?await pe.attendance.update(n.id,s):await pe.attendance.add({...s,note:null,location:null})}else n&&n.id&&await pe.attendance.update(n.id,{kind:"normal"});await _t()}async function km(e){const t=await pe.work_log.where("date").equals(e).first();return t||{id:await pe.work_log.add({date:e,created_at:wt()}),date:e,created_at:wt()}}async function xm(e){return pe.work_log.where("date").equals(e).first()}async function Cm(e){const t=await xm(e);return!t||!t.id?[]:(await pe.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Sm(e,t){const n=await pe.work_log.where("date").equals(e).first();let s;n&&n.id?s=n:s=await km(e),await pe.table("log_item").add({work_log_id:s.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:wt()});const o=t.project_id?String(t.project_id):"";await gt("last_project","")!==o&&await Lt("last_project",o),await gt("last_category","")!==t.category&&await Lt("last_category",t.category),await _t()}async function ya(e,t){await pe.table("log_item").update(e,t),await _t()}async function Em(e){await pe.table("log_item").delete(e),await _t()}async function Si(e,t){const n=await pe.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await pe.table("log_item").where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,c)=>a.date===c.date?a.id-c.id:a.datet.updated_at[c.id,c.date]));return(await pe.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function jm(e,t=4){const n=e.trim().toLowerCase();return n?(await pe.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([pe.project.clear(),pe.work_log.clear(),s.clear(),pe.attendance.clear(),pe.weekly_note.clear(),pe.setting.clear(),pe.memo.clear(),pe.credential.clear(),o.clear()]),n.project&&n.project.length&&await pe.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await pe.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await s.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await pe.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await pe.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await pe.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await pe.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await pe.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction)}),await _t()}function To(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ys(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(gh(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=To(Un(e.clock_in_at)),c=To(Un(e.clock_out_at)),f=To(n.work_start),h=To(n.work_end);let g="normal";!o&&a>f+n.grace_minutes?g="late":!o&&c{Ro.value=Ro.value.filter(n=>n.id!==t)},2e3)}function Um(){return Ro}const qm={class:"day-panel"},Hm={class:"dp-head"},Wm={class:"dp-date"},zm={class:"card sec"},Gm={class:"att-grid"},Ym={class:"att-cell"},Jm={key:0,class:"edit-row"},Xm={key:1,class:"att-val"},Qm={class:"att-cell"},Zm={key:0,class:"edit-row"},ey={key:1,class:"att-val"},ty={class:"att-cell"},ny=["list"],ry=["id"],sy=["value"],oy={class:"att-cell"},iy={class:"att-val status-val"},ay={key:0,class:"tag"},ly={key:1,class:"muted"},uy={key:0,class:"att-note muted"},cy={class:"att-actions"},dy=["disabled"],fy=["disabled"],py=["disabled"],vy=["disabled"],hy={key:0,class:"card sec makeup"},my={class:"form-grid"},yy={class:"field"},gy={class:"field"},by={class:"field span2"},wy=["list"],_y={class:"field span2"},ky={key:0,class:"form-error"},xy={class:"form-footer"},Cy={class:"card sec"},Sy={class:"form-grid"},Ey={class:"field span2"},$y={key:0,class:"form-error"},Ty={class:"field"},Py=["value"],Ay={class:"field"},Oy=["value"],My={class:"field"},Iy={class:"field"},jy={class:"field span2"},Dy={class:"form-footer"},Ly=["disabled"],Ry=["disabled"],Ky={class:"list-sec"},Fy={class:"sec-title"},Ny={key:0,class:"empty muted"},Vy={class:"item-main"},By={class:"tag"},Uy=["onClick"],qy={key:0,class:"muted item-meta"},Hy={key:1,class:"muted num item-meta"},Wy=["onClick"],zy=["onClick"],Gy=["onClick"],Yy=["onClick"],Jy={key:0,class:"item-sub"},Xy={key:0,class:"muted2"},Qy={key:1,class:"muted"},Zy={key:1,class:"dp-foot muted num"},eg=Rt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=L(!0),s=L(null),o=L(void 0),a=L([]),c=L([]),f=L(""),h=L([]),g=st(()=>"loc-list-"+t.date),y=st(()=>t.date===xt());async function _(){n.value=!0,s.value=await Lr(),o.value=await bn(t.date),a.value=await Cm(t.date),c.value=await Us(!0),h.value=await pl(),f.value=o.value&&o.value.location||await fm(),n.value=!1}pn(_),ht(()=>t.date,_),ht(Gs,()=>{_()});const C=st(()=>c.value.filter(G=>G.archived!==1));function E(G){if(!G)return"";const z=c.value.find(X=>X.id===G);return z?z.name:"已删除项目"}const B=st(()=>s.value?Ys(o.value,t.date,s.value,y.value):null),ne=st(()=>a.value.reduce((G,z)=>G+(z.minutes||0),0)),re=L(!1);async function oe(){re.value||(re.value=!0,await xd(t.date,f.value),await _(),rr(),Fe("上班打卡成功"),re.value=!1)}async function $(){re.value||(re.value=!0,await ym(t.date),await _(),rr(),Fe("下班打卡成功"),re.value=!1)}async function M(){await pm(t.date,f.value),rr(),Fe("地点已更新")}const Q=L(!1),ce=st(()=>{var G;return((G=o.value)==null?void 0:G.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){Q.value=!0;return}Y(!0)}async function Y(G){Q.value=!1,await _m(t.date,G),await _(),rr(),Fe(G?"已标记为休假":"已取消休假")}const A=L(null),x=L(""),N=L(null);ht(A,async G=>{var z;G&&(await ss(),(z=N.value)==null||z.focus())});function le(G){var X,Ae;const z=G==="in"?(X=o.value)==null?void 0:X.clock_in_at:(Ae=o.value)==null?void 0:Ae.clock_out_at;A.value=G,x.value=z?Un(z):G==="in"?"09:00":"18:00"}function W(){A.value=null}async function ke(){const G=A.value;G&&(A.value=null,x.value&&(await wm(t.date,G==="in"?"clock_in_at":"clock_out_at",x.value),await _(),rr(),Fe("打卡时间已修改")))}const Pe=L(!1),Je=L("09:00"),Le=L("18:00"),qe=L(""),Ne=L(""),it=L("");function Ge(){Ne.value=f.value,it.value="",Pe.value=!Pe.value}async function Qe(){if(!Je.value||!Le.value){it.value="请填写上班与下班时间";return}await bm(t.date,t.date+"T"+Je.value+":00",t.date+"T"+Le.value+":00",qe.value.trim(),Ne.value),Pe.value=!1,qe.value="",it.value="",await _(),rr(),Fe("补卡已保存")}const Se=L(""),Z=L("");ht(Se,()=>{Z.value&&(Z.value="")});const ee=L(null),we=L("dev"),Ke=L(null),dt=L(""),Kt=L(""),Tt=L(!1),de=st(()=>!!(Se.value.trim()||Ke.value||dt.value.trim()||Kt.value.trim()));pn(async()=>{const G=await dm();ee.value=G.project_id,we.value=G.category});function v(){Se.value="",Ke.value=null,dt.value="",Kt.value="",Z.value=""}async function b(){const G=Se.value.trim();if(!G){Z.value="请填写工作内容";return}Tt.value||(Tt.value=!0,await Sm(t.date,{content:G,project_id:ee.value,category:we.value,minutes:Ke.value&&Ke.value>0?Ke.value:null,takeaway:dt.value.trim()||null,remark:Kt.value.trim()||null}),v(),await _(),Fe("记录已添加"),Tt.value=!1)}const U=L(null);function fe(G){U.value=G}async function V(G){const z=G.id,X={content:G.content,project_id:G.project_id,category:G.category,minutes:G.minutes,takeaway:G.takeaway,remark:G.remark,is_milestone:G.is_milestone,needs_followup:G.needs_followup};await ya(z,X),U.value=null,await _(),Fe("修改已保存")}async function ae(G){await ya(G.id,{is_milestone:G.is_milestone?0:1}),await _()}async function ue(G){await ya(G.id,{needs_followup:G.needs_followup?0:1}),await _()}const ye=L(null);async function xe(){ye.value&&ye.value.id&&await Em(ye.value.id),ye.value=null,await _(),Fe("记录已删除")}return(G,z)=>(S(),j("div",qm,[l("div",Hm,[l("div",Wm,te(Ut(ad)(e.date)),1)]),l("div",zm,[z[25]||(z[25]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",Gm,[l("div",Ym,[z[21]||(z[21]=l("label",null,"上班时间",-1)),A.value==="in"?(S(),j("div",Jm,[Te(l("input",{ref_key:"timeInput",ref:N,type:"time",class:"input time-input","onUpdate:modelValue":z[0]||(z[0]=X=>x.value=X),onKeydown:[Ot(ke,["enter"]),Ot(W,["esc"])]},null,544),[[je,x.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ke},"确认"),l("button",{class:"btn btn-sm",onClick:W},"取消")])):(S(),j("div",Xm,[l("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},te(o.value&&o.value.clock_in_at?Ut(Un)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(S(),j("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:z[1]||(z[1]=X=>le("in"))},[$e(Xe,{name:"edit",size:13})])):Ce("",!0)]))]),l("div",Qm,[z[22]||(z[22]=l("label",null,"下班时间",-1)),A.value==="out"?(S(),j("div",Zm,[Te(l("input",{ref_key:"timeInput",ref:N,type:"time",class:"input time-input","onUpdate:modelValue":z[2]||(z[2]=X=>x.value=X),onKeydown:[Ot(ke,["enter"]),Ot(W,["esc"])]},null,544),[[je,x.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ke},"确认"),l("button",{class:"btn btn-sm",onClick:W},"取消")])):(S(),j("div",ey,[l("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},te(o.value&&o.value.clock_out_at?Ut(Un)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(S(),j("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:z[3]||(z[3]=X=>le("out"))},[$e(Xe,{name:"edit",size:13})])):Ce("",!0)]))]),l("div",ty,[z[23]||(z[23]=l("label",null,"上班地点",-1)),Te(l("input",{class:"input","onUpdate:modelValue":z[4]||(z[4]=X=>f.value=X),list:g.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:M},null,40,ny),[[je,f.value]]),l("datalist",{id:g.value},[(S(!0),j(Ie,null,ot(h.value,X=>(S(),j("option",{key:X,value:X},null,8,sy))),128))],8,ry)]),l("div",oy,[z[24]||(z[24]=l("label",null,"考勤状态",-1)),l("div",iy,[B.value?(S(),j(Ie,{key:0},[l("span",{class:et(["dot",B.value.status])},null,2),l("span",null,te(B.value.label),1),o.value&&o.value.kind==="makeup"?(S(),j("span",ay,"补卡")):Ce("",!0)],64)):(S(),j("span",ly,"--"))])])]),o.value&&o.value.note?(S(),j("div",uy,"补卡说明:"+te(o.value.note),1)):Ce("",!0),l("div",cy,[y.value&&(!o.value||!o.value.clock_in_at)?(S(),j("button",{key:0,class:"btn btn-primary btn-sm",disabled:re.value,onClick:oe},"上班打卡",8,dy)):y.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(S(),j("button",{key:1,class:"btn btn-primary btn-sm",disabled:re.value,onClick:$},"下班打卡",8,fy)):Ce("",!0),!y.value&&(!o.value||!o.value.clock_in_at)?(S(),j("button",{key:2,class:"btn btn-sm",onClick:Ge},"补卡")):Ce("",!0),ce.value?(S(),j("button",{key:4,class:"btn btn-sm",disabled:re.value,onClick:z[5]||(z[5]=X=>Y(!1))},"取消休假",8,vy)):(S(),j("button",{key:3,class:"btn btn-sm",disabled:re.value,onClick:ie},"标记休假",8,py))])]),Pe.value?(S(),j("div",hy,[z[30]||(z[30]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",my,[l("div",yy,[z[26]||(z[26]=l("label",null,"上班时间",-1)),Te(l("input",{type:"time",class:"input","onUpdate:modelValue":z[6]||(z[6]=X=>Je.value=X)},null,512),[[je,Je.value]])]),l("div",gy,[z[27]||(z[27]=l("label",null,"下班时间",-1)),Te(l("input",{type:"time",class:"input","onUpdate:modelValue":z[7]||(z[7]=X=>Le.value=X)},null,512),[[je,Le.value]])]),l("div",by,[z[28]||(z[28]=l("label",null,"上班地点",-1)),Te(l("input",{class:"input",list:g.value,"onUpdate:modelValue":z[8]||(z[8]=X=>Ne.value=X),placeholder:"可直接输入"},null,8,wy),[[je,Ne.value]])]),l("div",_y,[z[29]||(z[29]=l("label",null,"补卡原因",-1)),Te(l("input",{class:"input","onUpdate:modelValue":z[9]||(z[9]=X=>qe.value=X),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[je,qe.value]])])]),it.value?(S(),j("div",ky,te(it.value),1)):Ce("",!0),l("div",xy,[l("button",{class:"btn btn-sm",onClick:z[10]||(z[10]=X=>Pe.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Qe},"保存补卡")])])):Ce("",!0),l("div",Cy,[z[38]||(z[38]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增工作记录"),l("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),l("div",Sy,[l("div",Ey,[z[31]||(z[31]=l("label",null,"工作内容(必填)",-1)),Te(l("input",{class:et(["input",{invalid:Z.value}]),"onUpdate:modelValue":z[11]||(z[11]=X=>Se.value=X),placeholder:"做了什么,一句话一条",onKeydown:Ot(b,["enter"])},null,34),[[je,Se.value]]),Z.value?(S(),j("div",$y,te(Z.value),1)):Ce("",!0)]),l("div",Ty,[z[33]||(z[33]=l("label",null,"所属项目",-1)),Te(l("select",{class:"select","onUpdate:modelValue":z[12]||(z[12]=X=>ee.value=X)},[z[32]||(z[32]=l("option",{value:null},"无项目",-1)),(S(!0),j(Ie,null,ot(C.value,X=>(S(),j("option",{key:X.id,value:X.id},te(X.name),9,Py))),128))],512),[[Vn,ee.value]])]),l("div",Ay,[z[34]||(z[34]=l("label",null,"工作分类",-1)),Te(l("select",{class:"select","onUpdate:modelValue":z[13]||(z[13]=X=>we.value=X)},[(S(!0),j(Ie,null,ot(Ut(zs),X=>(S(),j("option",{key:X.key,value:X.key},te(X.label),9,Oy))),128))],512),[[Vn,we.value]])]),l("div",My,[z[35]||(z[35]=l("label",null,"耗时(分钟)",-1)),Te(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":z[14]||(z[14]=X=>Ke.value=X),placeholder:"选填"},null,512),[[je,Ke.value,void 0,{number:!0}]])]),l("div",Iy,[z[36]||(z[36]=l("label",null,"主要收获",-1)),Te(l("input",{class:"input","onUpdate:modelValue":z[15]||(z[15]=X=>dt.value=X),placeholder:"一句话:学到了什么"},null,512),[[je,dt.value]])]),l("div",jy,[z[37]||(z[37]=l("label",null,"备注",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":z[16]||(z[16]=X=>Kt.value=X),placeholder:"背景、链接、未决事项(选填)"},null,512),[[je,Kt.value]])])]),l("div",Dy,[l("button",{class:"btn btn-sm",disabled:!de.value,onClick:v},"重置",8,Ly),l("button",{class:"btn btn-primary btn-sm",disabled:Tt.value,onClick:b},"添加记录",8,Ry)])]),l("div",Ky,[l("div",Fy,"工作记录("+te(a.value.length)+")",1),!a.value.length&&!n.value?(S(),j("div",Ny,"暂无记录")):Ce("",!0),(S(!0),j(Ie,null,ot(a.value,X=>(S(),j("div",{key:X.id,class:"item"},[l("div",Vy,[l("span",By,te(Ut(Zo)(X.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:Ae=>fe(X)},te(X.content),9,Uy),X.project_id?(S(),j("span",qy,te(E(X.project_id)),1)):Ce("",!0),X.minutes?(S(),j("span",Hy,te(X.minutes)+" 分钟",1)):Ce("",!0),z[39]||(z[39]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:Ae=>fe(X)},[$e(Xe,{name:"edit",size:14})],8,Wy),l("button",{class:et(["icon-btn",{active:X.is_milestone===1}]),title:"成果标记",onClick:Ae=>ae(X)},[$e(Xe,{name:"star",size:14})],10,zy),l("button",{class:et(["icon-btn",{"active-warn":X.needs_followup===1}]),title:"待跟进",onClick:Ae=>ue(X)},[$e(Xe,{name:"flag",size:14})],10,Gy),l("button",{class:"icon-btn",title:"删除",onClick:Ae=>ye.value=X},[$e(Xe,{name:"close",size:14})],8,Yy)]),X.takeaway||X.remark?(S(),j("div",Jy,[X.takeaway?(S(),j("div",Xy,"收获:"+te(X.takeaway),1)):Ce("",!0),X.remark?(S(),j("div",Qy,"备注:"+te(X.remark),1)):Ce("",!0)])):Ce("",!0)]))),128)),a.value.length?(S(),j("div",Zy,[en(" 共 "+te(a.value.length)+" 条事项 ",1),ne.value?(S(),j(Ie,{key:0},[en(" · "+te((ne.value/60).toFixed(1))+" 小时",1)],64)):Ce("",!0)])):Ce("",!0)]),$e(qn,{open:!!ye.value,title:"删除确认",message:ye.value?"将删除工作记录「"+ye.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:z[17]||(z[17]=X=>ye.value=null),onConfirm:xe},null,8,["open","message"]),$e(qn,{open:Q.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:z[18]||(z[18]=X=>Q.value=!1),onConfirm:z[19]||(z[19]=X=>Y(!0))},null,8,["open"]),$e(yh,{open:!!U.value,item:U.value,projects:c.value,date:e.date,onCancel:z[20]||(z[20]=X=>U.value=null),onSave:V},null,8,["open","item","projects","date"])]))}}),Cd=Wt(eg,[["__scopeId","data-v-2e90c9d8"]]),tg={class:"cal-page"},ng={class:"cal-toolbar"},rg={class:"cal-title num"},sg={class:"cal-head"},og={class:"cal-grid"},ig=["title","onClick"],ag={class:"cal-marks"},lg={key:0,class:"drawer"},ug={class:"drawer-head"},cg={class:"drawer-body"},dg=Rt({__name:"CalendarView",setup(e){const t=L(xt()),n=st(()=>Number(t.value.slice(0,4))),s=st(()=>Number(t.value.slice(5,7))-1),o=st(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],c=st(()=>{const Q=(new Date(n.value,s.value,1).getDay()+6)%7,ce=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let Y=0;Y[le.date,le])),A=ce[2],x=new Map;for(const le of c.value){if(!le.inMonth)continue;const W=Ys(Y.get(le.date),le.date,ie,le.date===h),ke=A.filter(Pe=>Pe.date===le.date);x.set(le.date,{status:W.status,label:W.label,location:((N=Y.get(le.date))==null?void 0:N.location)||"",hasLog:ke.length>0,hasMilestone:ke.some(Pe=>Pe.is_milestone===1)})}f.value=x}ht([n,s],g,{immediate:!0}),ht(Gs,()=>{g()});function y(M){var Q;return((Q=f.value.get(M))==null?void 0:Q.status)??""}function _(M){const Q=f.value.get(M);return Q?M+" · "+Q.label+(Q.location?" · "+Q.location:""):M}function C(M){var Q;return!!((Q=f.value.get(M))!=null&&Q.hasLog)}function E(M){var Q;return!!((Q=f.value.get(M))!=null&&Q.hasMilestone)}function B(){t.value=ei(t.value,-1)}function ne(){t.value=ei(t.value,1)}function re(){t.value=xt()}const oe=L(null);function $(M,Q){Q&&(oe.value=M)}return ht(Ka,M=>{M&&(t.value=M,oe.value=M,Ka.value=null)},{immediate:!0}),(M,Q)=>(S(),j("div",tg,[l("div",ng,[l("button",{class:"icon-btn",onClick:B},[$e(Xe,{name:"chevron-left",size:16})]),l("span",rg,te(o.value),1),l("button",{class:"icon-btn",onClick:ne},[$e(Xe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:re},"回到今天")]),l("div",sg,[(S(),j(Ie,null,ot(a,ce=>l("span",{key:ce,class:"cal-week muted"},te(ce),1)),64))]),l("div",og,[(S(!0),j(Ie,null,ot(c.value,(ce,ie)=>(S(),j("button",{key:ie,class:et(["cal-cell",{blank:!ce.inMonth,weekend:ce.weekend,selected:oe.value===ce.date}]),title:ce.inMonth?_(ce.date):void 0,onClick:Y=>$(ce.date,ce.inMonth)},[ce.inMonth?(S(),j(Ie,{key:0},[l("span",{class:et(["daynum num",{today:ce.date===Ut(h)}])},te(Number(ce.date.slice(8,10))),3),l("span",ag,[y(ce.date)?(S(),j("span",{key:0,class:et(["dot",y(ce.date)])},null,2)):Ce("",!0),C(ce.date)?(S(),At(Xe,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ce("",!0),E(ce.date)?(S(),At(Xe,{key:2,name:"star",size:12,class:"mark-star"})):Ce("",!0)])],64)):Ce("",!0)],10,ig))),128))]),$e(os,{name:"drawer"},{default:fr(()=>[oe.value?(S(),j("aside",lg,[l("div",ug,[Q[1]||(Q[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:Q[0]||(Q[0]=ce=>oe.value=null)},[$e(Xe,{name:"close",size:16})])]),l("div",cg,[$e(Cd,{date:oe.value},null,8,["date"])])])):Ce("",!0)]),_:1})]))}}),fg=Wt(dg,[["__scopeId","data-v-2404dfbe"]]),pg={class:"detail-page"},vg={class:"detail-toolbar"},hg=["value"],mg=["disabled"],yg=Rt({__name:"TodayView",setup(e){const t=L(xt()),n=st(()=>t.value===xt());function s(){t.value=Nn(t.value,-1)}function o(){t.value=Nn(t.value,1)}function a(){t.value=xt()}function c(f){const h=f.target.value;h&&(t.value=h)}return(f,h)=>(S(),j("div",pg,[l("div",vg,[l("button",{class:"icon-btn",title:"前一天",onClick:s},[$e(Xe,{name:"chevron-left",size:16})]),l("span",{class:et(["date-title num",{"is-today":n.value}])},te(Ut(ad)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[$e(Xe,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,hg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,mg)]),$e(Cd,{date:t.value},null,8,["date"])]))}}),gg=Wt(yg,[["__scopeId","data-v-76243d98"]]),bg={class:"stats"},wg={class:"cards"},_g={class:"card stat-card"},kg={class:"stat-num num"},xg={class:"card stat-card"},Cg={class:"stat-num num"},Sg={class:"card stat-card"},Eg={class:"stat-num num"},$g={class:"card stat-card"},Tg={class:"stat-num num"},Pg={class:"card section"},Ag={class:"heat"},Og=["title"],Mg={class:"two-col"},Ig={class:"card section"},jg={class:"bar-label"},Dg={class:"bar-track"},Lg={class:"muted num bar-num"},Rg={key:0,class:"muted"},Kg={class:"card section"},Fg={class:"bar-label"},Ng={class:"bar-track"},Vg={class:"muted num bar-num"},Bg={key:0,class:"muted"},Ug={class:"card section"},qg={class:"bar-label loc-label"},Hg={class:"bar-track"},Wg={class:"muted num bar-num"},zg={key:0,class:"muted"},Gg=Rt({__name:"StatsView",setup(e){const t=L({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=L([]),s=L([]),o=L([]),a=L([]);async function c(){const g=xt(),y="2000-01-01",_=await Promise.all([Lr(),Ci(y,g),Si(y,g),Us(!0)]),C=_[0],E=_[1],B=_[2],ne=_[3],re=E.filter(W=>W.clock_in_at||W.kind==="makeup");let oe=0;for(const W of re){const ke=Ys(W,W.date,C,W.date===g);oe+=ke.workedMinutes??0}const $=new Set(B.map(W=>W.date));let M=0,Q=g;for($.has(Q)||(Q=Nn(g,-1));$.has(Q);)M++,Q=Nn(Q,-1);t.value={attendDays:re.length,totalHours:(oe/60).toFixed(1),itemCount:B.length,streak:M};const ce=new Map;for(const W of re){const ke=W.location||"未记录";ce.set(ke,(ce.get(ke)||0)+1)}a.value=Array.from(ce.entries()).map(W=>({name:W[0],count:W[1],percent:Math.round(W[1]/(re.length||1)*100)})).sort((W,ke)=>ke.count-W.count);const ie=B.length||1;s.value=zs.map(W=>{const ke=B.filter(Pe=>Pe.category===W.key).length;return{key:W.key,label:W.label,count:ke,percent:Math.round(ke/ie*100)}}).filter(W=>W.count>0).sort((W,ke)=>ke.count-W.count);const Y=new Map(ne.map(W=>[W.id,W.name])),A=new Map;for(const W of B){const ke=W.project_id?Y.get(W.project_id)||"已删除项目":"无项目";A.set(ke,(A.get(ke)||0)+1)}o.value=Array.from(A.entries()).map(W=>({name:W[0],count:W[1],percent:Math.round(W[1]/ie*100)})).sort((W,ke)=>ke.count-W.count);const x=new Map;for(const W of B)x.set(W.date,(x.get(W.date)||0)+1);const N=Ps(g),le=[];for(let W=11;W>=0;W--){const ke=Nn(N,-7*W),Pe=[];for(let Je=0;Je<7;Je++){const Le=Nn(ke,Je);Pe.push({date:Le,count:x.get(Le)||0})}le.push(Pe)}n.value=le}pn(async()=>{await c()}),ht(Gs,()=>{c()});function f(g){return g===0?0:g===1?1:g<=3?2:g<=5?3:4}function h(g,y){return g+" · "+(y?y+" 条":"无记录")}return(g,y)=>(S(),j("div",bg,[l("div",wg,[l("div",_g,[y[0]||(y[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",kg,te(t.value.attendDays),1)]),l("div",xg,[y[1]||(y[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",Cg,te(t.value.totalHours),1)]),l("div",Sg,[y[2]||(y[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",Eg,te(t.value.itemCount),1)]),l("div",$g,[y[3]||(y[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",Tg,te(t.value.streak),1)])]),l("div",Pg,[y[4]||(y[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",Ag,[(S(!0),j(Ie,null,ot(n.value,(_,C)=>(S(),j("div",{key:C,class:"heat-col"},[(S(!0),j(Ie,null,ot(_,E=>(S(),j("span",{key:E.date,class:et(["heat-cell","lv"+f(E.count)]),title:h(E.date,E.count)},null,10,Og))),128))]))),128))]),y[5]||(y[5]=Fp('
少多
',1))]),l("div",Mg,[l("div",Ig,[y[6]||(y[6]=l("div",{class:"section-title"},"分类分布",-1)),(S(!0),j(Ie,null,ot(s.value,_=>(S(),j("div",{key:_.key,class:"bar-row"},[l("span",jg,te(_.label),1),l("span",Dg,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Lg,te(_.count)+" 条 · "+te(_.percent)+"%",1)]))),128)),s.value.length?Ce("",!0):(S(),j("div",Rg,"暂无数据"))]),l("div",Kg,[y[7]||(y[7]=l("div",{class:"section-title"},"项目投入",-1)),(S(!0),j(Ie,null,ot(o.value,_=>(S(),j("div",{key:_.name,class:"bar-row"},[l("span",Fg,te(_.name),1),l("span",Ng,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Vg,te(_.count)+" 条 · "+te(_.percent)+"%",1)]))),128)),o.value.length?Ce("",!0):(S(),j("div",Bg,"暂无数据"))])]),l("div",Ug,[y[8]||(y[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(S(!0),j(Ie,null,ot(a.value,_=>(S(),j("div",{key:_.name,class:"bar-row"},[l("span",qg,te(_.name),1),l("span",Hg,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Wg,te(_.count)+" 天 · "+te(_.percent)+"%",1)]))),128)),a.value.length?Ce("",!0):(S(),j("div",zg,"暂无数据"))])]))}}),Yg=Wt(Gg,[["__scopeId","data-v-73e5ba49"]]);async function Jg(e,t,n){const s=xt(),o=await Promise.all([Lr(),Ci(e,t),Si(e,t),Us(!0),Tm(e,t)]),a=o[0],c=o[1],f=o[2],h=o[3],g=o[4];let y=0,_=0,C=0;for(const A of c){(A.clock_in_at||A.kind==="makeup")&&y++,A.kind==="makeup"&&C++;const x=Ys(A,A.date,a,A.date===s);_+=x.workedMinutes??0}const E=new Map;for(const A of c){if(!(A.clock_in_at||A.kind==="makeup"))continue;const x=A.location||"未记录";E.set(x,(E.get(x)||0)+1)}const B=Array.from(E.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),ne=f.length||1,re=zs.map(A=>{const x=f.filter(N=>N.category===A.key).length;return{key:A.key,label:A.label,count:x,percent:Math.round(x/ne*100)}}).filter(A=>A.count>0).sort((A,x)=>x.count-A.count),oe=new Map(h.map(A=>[A.id,A.name])),$=new Map;for(const A of f){const x=A.project_id?oe.get(A.project_id)||"已删除项目":"无项目";$.set(x,($.get(x)||0)+1)}const M=Array.from($.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),Q=f.filter(A=>A.is_milestone===1).map(A=>({date:A.date,content:A.content})),ce=f.filter(A=>A.needs_followup===1).map(A=>({date:A.date,content:A.content,remark:A.remark||""})),ie=f.filter(A=>!!A.takeaway).map(A=>({date:A.date,text:A.takeaway})),Y=g.map(A=>({weekStart:A.week_start,highlights:A.highlights||"",challenges:A.challenges||"",plan_next:A.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:y,totalHours:(_/60).toFixed(1),makeupCount:C,leaveCount:c.filter(A=>A.kind==="leave").length,itemCount:f.length,categoryStats:re,projectStats:M,locationStats:B,milestones:Q,followups:ce,takeaways:ie,weekNotes:Y}}function Xg(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(` -`)}const Qg="modulepreload",Zg=function(e,t){return new URL(e,t).href},Ku={},Sd=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(g=>{if(g=Zg(g,s),g in Ku)return;Ku[g]=!0;const y=g.endsWith(".css"),_=y?'[rel="stylesheet"]':"";if(!!s)for(let B=c.length-1;B>=0;B--){const ne=c[B];if(ne.href===g&&(!y||ne.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${_}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":Qg,y||(E.as="script"),E.crossOrigin="",E.href=g,h&&E.setAttribute("nonce",h),document.head.appendChild(E),y)return new Promise((B,ne)=>{E.addEventListener("load",B),E.addEventListener("error",()=>ne(new Error(`Unable to preload CSS for ${g}`)))})}))}function a(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&a(f.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const eb=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,c)=>{n.platforms.set(a,c)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},tb=e=>e.CapacitorPlatforms=eb(e),Ed=tb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Ed.addPlatform;Ed.setPlatform;var ns;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ns||(ns={}));class ga extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const nb=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},rb=e=>{var t,n,s,o,a;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},h=f.Plugins=f.Plugins||{},g=e.CapacitorPlatforms,y=()=>c!==null?c.name:nb(e),_=((t=g==null?void 0:g.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||y,C=()=>_()!=="web",E=((n=g==null?void 0:g.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||C,B=Y=>{const A=Q.get(Y);return!!(A!=null&&A.platforms.has(_())||oe(Y))},ne=((s=g==null?void 0:g.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||B,re=Y=>{var A;return(A=f.PluginHeaders)===null||A===void 0?void 0:A.find(x=>x.name===Y)},oe=((o=g==null?void 0:g.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||re,$=Y=>e.console.error(Y),M=(Y,A,x)=>Promise.reject(`${x} does not have an implementation of "${A}".`),Q=new Map,ce=(Y,A={})=>{const x=Q.get(Y);if(x)return console.warn(`Capacitor plugin "${Y}" already registered. Cannot register plugins twice.`),x.proxy;const N=_(),le=oe(Y);let W;const ke=async()=>(!W&&N in A?W=typeof A[N]=="function"?W=await A[N]():W=A[N]:c!==null&&!W&&"web"in A&&(W=typeof A.web=="function"?W=await A.web():W=A.web),W),Pe=(Ge,Qe)=>{var Se,Z;if(le){const ee=le==null?void 0:le.methods.find(we=>Qe===we.name);if(ee)return ee.rtype==="promise"?we=>f.nativePromise(Y,Qe.toString(),we):(we,Ke)=>f.nativeCallback(Y,Qe.toString(),we,Ke);if(Ge)return(Se=Ge[Qe])===null||Se===void 0?void 0:Se.bind(Ge)}else{if(Ge)return(Z=Ge[Qe])===null||Z===void 0?void 0:Z.bind(Ge);throw new ga(`"${Y}" plugin is not implemented on ${N}`,ns.Unimplemented)}},Je=Ge=>{let Qe;const Se=(...Z)=>{const ee=ke().then(we=>{const Ke=Pe(we,Ge);if(Ke){const dt=Ke(...Z);return Qe=dt==null?void 0:dt.remove,dt}else throw new ga(`"${Y}.${Ge}()" is not implemented on ${N}`,ns.Unimplemented)});return Ge==="addListener"&&(ee.remove=async()=>Qe()),ee};return Se.toString=()=>`${Ge.toString()}() { [capacitor code] }`,Object.defineProperty(Se,"name",{value:Ge,writable:!1,configurable:!1}),Se},Le=Je("addListener"),qe=Je("removeListener"),Ne=(Ge,Qe)=>{const Se=Le({eventName:Ge},Qe),Z=async()=>{const we=await Se;qe({eventName:Ge,callbackId:we},Qe)},ee=new Promise(we=>Se.then(()=>we({remove:Z})));return ee.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await Z()},ee},it=new Proxy({},{get(Ge,Qe){switch(Qe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return le?Ne:Le;case"removeListener":return qe;default:return Je(Qe)}}});return h[Y]=it,Q.set(Y,{name:Y,proxy:it,platforms:new Set([...Object.keys(A),...le?[N]:[]])}),it},ie=((a=g==null?void 0:g.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||ce;return f.convertFileSrc||(f.convertFileSrc=Y=>Y),f.getPlatform=_,f.handleError=$,f.isNativePlatform=E,f.isPluginAvailable=ne,f.pluginMethodNoop=M,f.registerPlugin=ie,f.Exception=ga,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},sb=e=>e.Capacitor=rb(e),rs=sb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),$d=rs.registerPlugin;rs.Plugins;class Td{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new rs.Exception(t,ns.Unimplemented)}unavailable(t="not available"){return new rs.Exception(t,ns.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(s=>{this.notifyListeners(t,s)}))}}const Fu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Nu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ob extends Td{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Nu(o).trim(),a=Nu(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Fu(t.key),s=Fu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}$d("CapacitorCookies",{web:()=>new ob});const ib=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),ab=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,c)=>(o[a]=e[t[c]],o),{})},lb=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,c]=o;let f,h;return Array.isArray(c)?(h="",c.forEach(g=>{f=t?encodeURIComponent(g):g,h+=`${a}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(c):c,h=`${a}=${f}`),`${s}&${h}`},"").substr(1):null,ub=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=ab(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))a.set(c,f);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((f,h)=>{a.append(h,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class cb extends Td{async request(t){const n=ub(t,t.webFetchExtra),s=lb(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),c=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};c.includes("application/json")&&(f="json");let h,g;switch(f){case"arraybuffer":case"blob":g=await a.blob(),h=await ib(g);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const y={};return a.headers.forEach((_,C)=>{y[C]=_}),{data:h,headers:y,status:a.status,url:a.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}$d("CapacitorHttp",{web:()=>new cb});async function hl(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(rs.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:h}=await Sd(async()=>{const{Filesystem:g,Directory:y,Encoding:_}=await import("./index-BE9xlWZ7.js");return{Filesystem:g,Directory:y,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:h.UTF8,recursive:!0})).uri}}const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const db=Object.freeze(Object.defineProperty({__proto__:null,downloadText:hl},Symbol.toStringTag,{value:"Module"}));async function qa(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function fb(e){const t=await Promise.all([gt("ai_base_url",""),gt("ai_api_key",""),gt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",c={"Content-Type":"application/json"};s&&(c.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let g;try{g=await fetch(a,{method:"POST",headers:c,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!g.ok){let C="接口返回 "+g.status;try{const E=await g.json();E&&E.error&&E.error.message&&(C+=":"+E.error.message)}catch{}throw new Error(C)}const y=await g.json(),_=y&&y.choices&&y.choices[0]&&y.choices[0].message&&y.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const pb={class:"report"},vb={class:"report-toolbar"},hb={class:"seg"},mb=["onClick"],yb=["disabled"],gb=["disabled"],bb={key:0,class:"ai-error"},wb={class:"report-grid"},_b={class:"report-left"},kb={class:"card section"},xb={class:"section-title"},Cb={class:"muted note-saved"},Sb={class:"card section"},Eb={class:"report-right"},$b={key:0,class:"card section"},Tb={class:"sum-row"},Pb={class:"num"},Ab={class:"sum-row"},Ob={class:"num"},Mb={class:"sum-row"},Ib={class:"num"},jb={class:"sum-row"},Db={class:"num"},Lb={class:"sum-row"},Rb={class:"num"},Kb={class:"muted"},Fb={class:"num"},Nb={key:0,class:"muted sum-empty"},Vb={class:"muted"},Bb={key:1,class:"muted sum-empty"},Ub={class:"muted"},qb={key:2,class:"muted sum-empty"},Hb={class:"muted"},Wb={key:3,class:"muted sum-empty"},zb=Rt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=L("week"),s=L(Ps(xt())),o=L(xt()),a=L(null),c=L(""),f=L(!1),h=L(!1),g=L(null),y=L(""),_=L(Ps(xt())),C=L(""),E=L(""),B=L(""),ne=L(!1);async function re(){const A=await vl(_.value);C.value=(A==null?void 0:A.highlights)||"",E.value=(A==null?void 0:A.challenges)||"",B.value=(A==null?void 0:A.plan_next)||"",ne.value=!1}async function oe(){await $m(_.value,{highlights:C.value.trim()||null,challenges:E.value.trim()||null,plan_next:B.value.trim()||null}),ne.value=!0,await M()}function $(A){const x=xt();if(A==="week"){const N=Ps(x);return{start:N,end:Nn(N,6),label:"本周"}}if(A==="month"){const N=x.slice(0,7);return{start:N+"-01",end:x,label:N+" 本月"}}return A==="all"?{start:"2000-01-01",end:x,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function M(){f.value=!0;const A=$(n.value),x=await Jg(A.start,A.end,A.label);a.value=x,c.value=Xg(x),f.value=!1}ht(n,M),ht([s,o],()=>{n.value==="custom"&&M()}),pn(async()=>{await re(),await M()});async function Q(){const A=xt().replace(/-/g,""),x=await hl("实习工作总结_"+A+".md",c.value);Fe(x?"总结已导出到:"+x:"总结已导出到系统下载目录")}async function ce(){await qa(c.value),Fe("总结已复制到剪贴板")}async function ie(){if(h.value)return;y.value="";const A=c.value.trim();if(!A){y.value="当前草稿为空,无法润色";return}h.value=!0;try{g.value=c.value,c.value=await fb(A),Fe("AI 润色完成")}catch(x){g.value=null,y.value=x instanceof Error?x.message:"润色失败"}h.value=!1}function Y(){g.value!==null&&(c.value=g.value),g.value=null}return(A,x)=>(S(),j("div",pb,[l("div",vb,[l("div",hb,[(S(),j(Ie,null,ot(t,N=>l("button",{key:N.key,class:et(["seg-btn",{active:n.value===N.key}]),onClick:le=>n.value=N.key},te(N.label),11,mb)),64))]),n.value==="custom"?(S(),j(Ie,{key:0},[Te(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[0]||(x[0]=N=>s.value=N)},null,512),[[je,s.value]]),x[6]||(x[6]=l("span",{class:"muted"},"至",-1)),Te(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[1]||(x[1]=N=>o.value=N)},null,512),[[je,o.value]])],64)):Ce("",!0),x[10]||(x[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[$e(Xe,{name:"edit",size:14}),x[7]||(x[7]=en("AI 润色 ",-1))],8,yb),g.value!==null?(S(),j("button",{key:1,class:"btn btn-sm",onClick:Y},"还原润色前")):Ce("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:M},[$e(Xe,{name:"edit",size:14}),x[8]||(x[8]=en("重新生成 ",-1))],8,gb),l("button",{class:"btn btn-sm",onClick:ce},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:Q},[$e(Xe,{name:"export",size:14}),x[9]||(x[9]=en("导出 Markdown ",-1))])]),y.value?(S(),j("div",bb,te(y.value),1)):Ce("",!0),l("div",wb,[l("div",_b,[l("div",kb,[l("div",xb,"本周周记("+te(_.value)+" 起)",1),x[11]||(x[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":x[2]||(x[2]=N=>C.value=N),placeholder:"本周最有价值的一件事",onBlur:oe},null,544),[[je,C.value]]),x[12]||(x[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":x[3]||(x[3]=N=>E.value=N),placeholder:"遇到的问题与教训",onBlur:oe},null,544),[[je,E.value]]),x[13]||(x[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":x[4]||(x[4]=N=>B.value=N),placeholder:"下周准备做什么",onBlur:oe},null,544),[[je,B.value]]),l("div",Cb,te(ne.value?"已保存":"失焦自动保存"),1)]),l("div",Sb,[x[14]||(x[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Te(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":x[5]||(x[5]=N=>c.value=N),spellcheck:"false"},null,512),[[je,c.value]])])]),l("div",Eb,[a.value?(S(),j("div",$b,[x[20]||(x[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",Tb,[x[15]||(x[15]=l("span",{class:"muted"},"出勤",-1)),l("span",Pb,te(a.value.attendDays)+" 天",1)]),l("div",Ab,[x[16]||(x[16]=l("span",{class:"muted"},"工时",-1)),l("span",Ob,te(a.value.totalHours)+" 小时",1)]),l("div",Mb,[x[17]||(x[17]=l("span",{class:"muted"},"补卡",-1)),l("span",Ib,te(a.value.makeupCount)+" 次",1)]),l("div",jb,[x[18]||(x[18]=l("span",{class:"muted"},"请假",-1)),l("span",Db,te(a.value.leaveCount)+" 天",1)]),l("div",Lb,[x[19]||(x[19]=l("span",{class:"muted"},"记录",-1)),l("span",Rb,te(a.value.itemCount)+" 条",1)]),x[21]||(x[21]=l("div",{class:"section-sub"},"分类分布",-1)),(S(!0),j(Ie,null,ot(a.value.categoryStats,N=>(S(),j("div",{key:N.key,class:"sum-row"},[l("span",Kb,te(N.label),1),l("span",Fb,te(N.count)+" 条 · "+te(N.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ce("",!0):(S(),j("div",Nb,"(无)")),x[22]||(x[22]=l("div",{class:"section-sub"},"主要成果",-1)),(S(!0),j(Ie,null,ot(a.value.milestones,(N,le)=>(S(),j("div",{key:"m"+le,class:"sum-item"},[en(te(N.content),1),l("span",Vb,"("+te(N.date)+")",1)]))),128)),a.value.milestones.length?Ce("",!0):(S(),j("div",Bb,"(无)")),x[23]||(x[23]=l("div",{class:"section-sub"},"待跟进",-1)),(S(!0),j(Ie,null,ot(a.value.followups,(N,le)=>(S(),j("div",{key:"f"+le,class:"sum-item"},[en(te(N.content),1),l("span",Ub,"("+te(N.date)+")",1)]))),128)),a.value.followups.length?Ce("",!0):(S(),j("div",qb,"(无)")),x[24]||(x[24]=l("div",{class:"section-sub"},"学习与成长",-1)),(S(!0),j(Ie,null,ot(a.value.takeaways,(N,le)=>(S(),j("div",{key:"t"+le,class:"sum-item"},[en(te(N.text),1),l("span",Hb,"("+te(N.date)+")",1)]))),128)),a.value.takeaways.length?Ce("",!0):(S(),j("div",Wb,"(无)"))])):Ce("",!0)])])]))}}),Gb=Wt(zb,[["__scopeId","data-v-43f9c59b"]]),Yb=["aria-label"],Jb={class:"dialog-head"},Xb={class:"dialog-title"},Qb={class:"dialog-body"},Zb={class:"form-grid"},ew={class:"field span2"},tw={class:"seg"},nw={class:"field"},rw={class:"field"},sw={class:"field"},ow=["value"],iw={key:0,class:"field"},aw={class:"seg"},lw={class:"field span2"},uw={key:0,class:"form-error"},cw={class:"dialog-btns"},dw=Rt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L("expense"),a=L("餐饮"),c=L(""),f=L(""),h=L(""),g=L(!1),y=L(!1),_=L(""),C=L(null);function E(oe){n.open&&oe.key==="Escape"&&s("cancel")}ht(()=>n.open,async oe=>{var $;oe?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,h.value=n.initial.note,g.value=n.initial.reimbursable===1,y.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",E),await ss(),($=C.value)==null||$.focus()):window.removeEventListener("keydown",E)}),pr(()=>window.removeEventListener("keydown",E)),ht(o,oe=>{a.value=oe==="expense"?Gr[0]:Qo[0]});const B=st(()=>o.value==="expense"?Gr:Qo);function ne(){return a.value&&B.value.includes(a.value)?a.value:B.value[0]}function re(){const oe=String(c.value??"").trim(),$=Number(oe);if(!oe||!isFinite($)||$<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const M=o.value==="expense"&&g.value?1:0;s("save",{type:o.value,category:ne(),amount:Math.round($*100),date:f.value,note:String(h.value??"").trim(),reimbursable:M,reimbursed:M&&y.value?1:0})}return(oe,$)=>(S(),At(jr,{to:"body"},[$e(os,{name:"modal"},{default:fr(()=>[e.open?(S(),j("div",{key:0,class:"mask",onClick:$[11]||($[11]=sn(M=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Jb,[l("span",Xb,te(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:$[0]||($[0]=M=>s("cancel"))},[$e(Xe,{name:"close",size:16})])]),l("div",Qb,[l("div",Zb,[l("div",ew,[$[12]||($[12]=l("label",null,"类型",-1)),l("div",tw,[l("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:$[1]||($[1]=M=>o.value="expense")},"支出",2),l("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:$[2]||($[2]=M=>o.value="income")},"收入",2)])]),l("div",nw,[$[13]||($[13]=l("label",null,"金额(元,必填)",-1)),Te(l("input",{ref_key:"amountInput",ref:C,class:et(["input",{invalid:_.value}]),"onUpdate:modelValue":$[3]||($[3]=M=>c.value=M),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[je,c.value]])]),l("div",rw,[$[14]||($[14]=l("label",null,"日期(必填)",-1)),Te(l("input",{class:"input",type:"date","onUpdate:modelValue":$[4]||($[4]=M=>f.value=M)},null,512),[[je,f.value]])]),l("div",sw,[$[15]||($[15]=l("label",null,"分类",-1)),Te(l("select",{class:"select","onUpdate:modelValue":$[5]||($[5]=M=>a.value=M)},[(S(!0),j(Ie,null,ot(B.value,M=>(S(),j("option",{key:M,value:M},te(M),9,ow))),128))],512),[[Vn,a.value]])]),o.value==="expense"?(S(),j("div",iw,[$[16]||($[16]=l("label",null,"报销状态",-1)),l("div",aw,[l("button",{class:et(["seg-btn",{active:!g.value}]),onClick:$[6]||($[6]=M=>{g.value=!1,y.value=!1})},"无需报销",2),l("button",{class:et(["seg-btn",{active:g.value&&!y.value}]),onClick:$[7]||($[7]=M=>{g.value=!0,y.value=!1})},"待报销",2),l("button",{class:et(["seg-btn",{active:g.value&&y.value}]),onClick:$[8]||($[8]=M=>{g.value=!0,y.value=!0})},"已报销",2)])])):Ce("",!0),l("div",lw,[$[17]||($[17]=l("label",null,"备注",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":$[9]||($[9]=M=>h.value=M),placeholder:"选填"},null,512),[[je,h.value]])])]),_.value?(S(),j("div",uw,te(_.value),1)):Ce("",!0)]),l("div",cw,[l("button",{class:"btn btn-sm",onClick:$[10]||($[10]=M=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:re},"保存")])],8,Yb)])):Ce("",!0)]),_:1})]))}}),fw=Wt(dw,[["__scopeId","data-v-edca3327"]]),pw={class:"ledger-page"},vw={class:"ledger-toolbar"},hw={class:"month-title num"},mw={class:"cards"},yw={class:"card stat-card"},gw={class:"stat-num num amt-income"},bw={class:"card stat-card"},ww={class:"stat-num num"},_w={class:"card stat-card"},kw={class:"card stat-card"},xw={class:"stat-num num amt-warn"},Cw={class:"card sec"},Sw={class:"form-grid"},Ew={class:"field span2"},$w={class:"seg"},Tw={class:"field"},Pw={class:"field"},Aw={class:"field"},Ow=["value"],Mw={key:0,class:"field"},Iw={class:"field span2"},jw={key:0,class:"form-error"},Dw={class:"form-footer"},Lw=["disabled"],Rw=["disabled"],Kw={key:0,class:"card sec"},Fw={class:"bar-label"},Nw={class:"bar-track"},Vw={class:"muted num bar-num"},Bw={key:1,class:"card section"},Uw={class:"form-error"},qw={class:"card table-card"},Hw={class:"tx-table"},Ww={class:"num","data-label":"日期"},zw={"data-label":"分类"},Gw={class:"tag"},Yw={class:"td-note","data-label":"备注"},Jw={"data-label":"报销"},Xw={key:0,class:"muted"},Qw={key:1,class:"tx-done"},Zw={key:2,class:"tx-pending"},e_={class:"ops-cell"},t_={class:"ops"},n_=["onClick"],r_=["onClick"],s_=["onClick"],o_={key:0},i_={class:"muted vault-note num"},a_=Rt({__name:"LedgerView",setup(e){const t=L(xt()),n=L([]),s=L(!0),o=L("expense"),a=L(""),c=L(Gr[0]),f=L(xt()),h=L(""),g=L(!1),y=L(""),_=L(""),C=L(!1),E=L(!1),B=L(null),ne=L({type:"expense",category:Gr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),re=L(null),oe=st(()=>t.value.slice(0,7)+"-01"),$=st(()=>{const Z=Number(t.value.slice(0,4)),ee=Number(t.value.slice(5,7))-1,we=new Date(Z,ee+1,0).getDate();return t.value.slice(0,7)+"-"+(we<10?"0"+we:String(we))}),M=st(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function Q(){s.value=!0;try{n.value=await Dm(oe.value,$.value),_.value=""}catch(Z){_.value="账目加载失败:"+(Z instanceof Error?Z.stack||Z.message:String(Z)),Fe("账目加载失败")}s.value=!1}pn(Q),ht(t,Q),ht(o,Z=>{c.value=Z==="expense"?Gr[0]:Qo[0]});const ce=st(()=>n.value.slice().sort((Z,ee)=>Z.date===ee.date?ee.id-Z.id:Z.date{let Z=0,ee=0,we=0;for(const Ke of n.value)Ke.type==="income"?Z+=Ke.amount:(ee+=Ke.amount,Ke.reimbursable===1&&Ke.reimbursed!==1&&(we+=Ke.amount));return{income:Z,expense:ee,pending:we,balance:Z-ee}}),Y=L("all"),A=L("all"),x=st(()=>ce.value.filter(Z=>!(Y.value!=="all"&&Z.type!==Y.value||A.value==="pending"&&!(Z.type==="expense"&&Z.reimbursable===1&&Z.reimbursed!==1)||A.value==="done"&&!(Z.reimbursable===1&&Z.reimbursed===1)))),N=st(()=>{const Z=new Map;let ee=0;for(const Ke of n.value)Ke.type==="expense"&&(Z.set(Ke.category,(Z.get(Ke.category)||0)+Ke.amount),ee+=Ke.amount);const we=ee||1;return Array.from(Z.entries()).map(Ke=>({name:Ke[0],amount:Ke[1],percent:Math.round(Ke[1]/we*100)})).sort((Ke,dt)=>dt.amount-Ke.amount)});function le(Z){return(Z/100).toFixed(2)}function W(Z){return(Z.type==="income"?"+":"-")+le(Z.amount)}function ke(){t.value=ei(t.value,-1)}function Pe(){t.value=ei(t.value,1)}function Je(){t.value=xt()}ht(a,()=>{y.value&&(y.value="")});async function Le(){const Z=String(a.value??"").trim(),ee=Number(Z);if(!Z||!isFinite(ee)||ee<=0){y.value="请填写大于 0 的金额";return}if(!f.value){y.value="请选择日期";return}if(!C.value){C.value=!0;try{await Lm({type:o.value,category:c.value,amount:Math.round(ee*100),date:f.value,note:String(h.value??"").trim(),reimbursable:o.value==="expense"&&g.value?1:0,reimbursed:0})}catch(we){Fe("添加失败:"+(we instanceof Error?we.message:String(we))),C.value=!1;return}a.value="",h.value="",g.value=!1,y.value="",await Q(),Fe("记账已添加"),C.value=!1}}const qe=st(()=>String(a.value??"").trim()!==""||String(h.value??"").trim()!=="");function Ne(){a.value="",h.value="",g.value=!1,y.value=""}async function it(Z){await Fm(Z.id),await Q(),Fe("已标记为已报销")}function Ge(Z){B.value=Z.id,ne.value={type:Z.type,category:Z.category,amountYuan:le(Z.amount),date:Z.date,note:Z.note||"",reimbursable:Z.reimbursable,reimbursed:Z.reimbursed},E.value=!0}async function Qe(Z){const ee=B.value;await Rm(ee,Z),E.value=!1,await Q(),Fe("账目已更新")}async function Se(){re.value&&re.value.id&&await Km(re.value.id),re.value=null,await Q(),Fe("账目已删除")}return(Z,ee)=>(S(),j("div",pw,[l("div",vw,[l("button",{class:"icon-btn",onClick:ke},[$e(Xe,{name:"chevron-left",size:16})]),l("span",hw,te(M.value),1),l("button",{class:"icon-btn",onClick:Pe},[$e(Xe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:Je},"回到本月"),ee[13]||(ee[13]=l("span",{class:"flex1"},null,-1)),Te(l("select",{class:"select w-filter","onUpdate:modelValue":ee[0]||(ee[0]=we=>Y.value=we)},[...ee[11]||(ee[11]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[Vn,Y.value]]),Te(l("select",{class:"select w-filter","onUpdate:modelValue":ee[1]||(ee[1]=we=>A.value=we)},[...ee[12]||(ee[12]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[Vn,A.value]])]),l("div",mw,[l("div",yw,[ee[14]||(ee[14]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",gw,te(le(ie.value.income)),1)]),l("div",bw,[ee[15]||(ee[15]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",ww,te(le(ie.value.expense)),1)]),l("div",_w,[ee[16]||(ee[16]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:et(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},te(le(ie.value.balance)),3)]),l("div",kw,[ee[17]||(ee[17]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",xw,te(le(ie.value.pending)),1)])]),l("div",Cw,[ee[24]||(ee[24]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增一笔"),l("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),l("div",Sw,[l("div",Ew,[ee[18]||(ee[18]=l("label",null,"类型",-1)),l("div",$w,[l("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:ee[2]||(ee[2]=we=>o.value="expense")},"支出",2),l("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:ee[3]||(ee[3]=we=>o.value="income")},"收入",2)])]),l("div",Tw,[ee[19]||(ee[19]=l("label",null,"金额(元,必填)",-1)),Te(l("input",{class:et(["input",{invalid:y.value}]),"onUpdate:modelValue":ee[4]||(ee[4]=we=>a.value=we),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:Ot(Le,["enter"])},null,34),[[je,a.value]])]),l("div",Pw,[ee[20]||(ee[20]=l("label",null,"日期",-1)),Te(l("input",{class:"input",type:"date","onUpdate:modelValue":ee[5]||(ee[5]=we=>f.value=we)},null,512),[[je,f.value]])]),l("div",Aw,[ee[21]||(ee[21]=l("label",null,"分类",-1)),Te(l("select",{class:"select","onUpdate:modelValue":ee[6]||(ee[6]=we=>c.value=we)},[(S(!0),j(Ie,null,ot(o.value==="expense"?Ut(Gr):Ut(Qo),we=>(S(),j("option",{key:we,value:we},te(we),9,Ow))),128))],512),[[Vn,c.value]])]),o.value==="expense"?(S(),j("div",Mw,[ee[22]||(ee[22]=l("label",null,"报销",-1)),l("button",{class:et(["toggle-btn",{on:g.value}]),onClick:ee[7]||(ee[7]=we=>g.value=!g.value)},te(g.value?"需要报销":"无需报销"),3)])):Ce("",!0),l("div",Iw,[ee[23]||(ee[23]=l("label",null,"备注",-1)),Te(l("input",{class:"input","onUpdate:modelValue":ee[8]||(ee[8]=we=>h.value=we),placeholder:"选填,如:客户现场午餐",onKeydown:Ot(Le,["enter"])},null,544),[[je,h.value]])])]),y.value?(S(),j("div",jw,te(y.value),1)):Ce("",!0),l("div",Dw,[l("button",{class:"btn btn-sm",disabled:!qe.value,onClick:Ne},"重置",8,Lw),l("button",{class:"btn btn-primary btn-sm",disabled:C.value,onClick:Le},"添加记录",8,Rw)])]),N.value.length?(S(),j("div",Kw,[ee[25]||(ee[25]=l("div",{class:"sec-title"},"本月支出分类",-1)),(S(!0),j(Ie,null,ot(N.value,we=>(S(),j("div",{key:we.name,class:"bar-row"},[l("span",Fw,te(we.name),1),l("span",Nw,[l("span",{class:"bar-fill",style:or({width:we.percent+"%"})},null,4)]),l("span",Vw,te(le(we.amount))+" 元 · "+te(we.percent)+"%",1)]))),128))])):Ce("",!0),_.value?(S(),j("div",Bw,[l("div",Uw,te(_.value),1),ee[26]||(ee[26]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Ce("",!0),l("div",qw,[l("table",Hw,[ee[28]||(ee[28]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(S(!0),j(Ie,null,ot(x.value,we=>(S(),j("tr",{key:we.id},[l("td",Ww,te(we.date),1),l("td",zw,[l("span",Gw,te(we.category),1)]),l("td",{class:et(["num",we.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},te(W(we)),3),l("td",Yw,te(we.note||"--"),1),l("td",Jw,[we.type!=="expense"||we.reimbursable!==1?(S(),j("span",Xw,"--")):we.reimbursed===1?(S(),j("span",Qw,"已报销")):(S(),j("span",Zw,"待报销"))]),l("td",e_,[l("div",t_,[we.type==="expense"&&we.reimbursable===1&&we.reimbursed!==1?(S(),j("button",{key:0,class:"btn btn-xs",onClick:Ke=>it(we)},"标记已报销",8,n_)):Ce("",!0),l("button",{class:"btn btn-xs",onClick:Ke=>Ge(we)},"编辑",8,r_),l("button",{class:"btn btn-xs",onClick:Ke=>re.value=we},"删除",8,s_)])])]))),128)),!x.value.length&&!s.value?(S(),j("tr",o_,[...ee[27]||(ee[27]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ce("",!0)])])]),l("div",i_,"本月 "+te(n.value.length)+" 条 · 当前筛选 "+te(x.value.length)+" 条",1),$e(fw,{open:E.value,title:(B.value,"编辑账目"),initial:ne.value,onCancel:ee[9]||(ee[9]=we=>E.value=!1),onSave:Qe},null,8,["open","title","initial"]),$e(qn,{open:!!re.value,title:"删除确认",message:re.value?"将删除 "+re.value.date+" 的账目("+re.value.category+" "+le(re.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[10]||(ee[10]=we=>re.value=null),onConfirm:Se},null,8,["open","message"])]))}}),l_=Wt(a_,[["__scopeId","data-v-5490dec1"]]),u_={class:"memo-page"},c_={class:"card memo-list"},d_={class:"pane-head"},f_={class:"pane-title"},p_={class:"memo-scroll"},v_=["onClick"],h_={class:"memo-item-title"},m_={class:"muted memo-item-sub"},y_={class:"muted num memo-item-time"},g_={key:0,class:"muted empty"},b_={class:"card memo-editor"},w_={class:"editor-foot"},__={class:"muted foot-info"},k_=["disabled"],x_=["disabled"],C_={key:1,class:"empty muted editor-empty"},S_=Rt({__name:"MemoView",setup(e){const t=L([]),n=L(null),s=L(!1),o=L(""),a=L(""),c=L(null),f=L(null);async function h(){if(t.value=await Pm(),n.value&&n.value.id){const ie=t.value.find(Y=>Y.id===n.value.id);ie&&(n.value=ie)}}pn(async()=>{await h(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",g)}),pr(()=>window.removeEventListener("keydown",g)),ht(Fa,async ie=>{if(!ie)return;t.value.length||await h();const Y=t.value.find(A=>A.id===ie);Fa.value=null,Y&&C(Y)},{immediate:!0});function g(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&y.value&&(ie.preventDefault(),re())}const y=st(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",Y=n.value?n.value.content:"";return o.value!==ie||a.value!==Y});function _(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function C(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(y.value){f.value={type:"select",memo:ie};return}_(ie)}}function E(){if(y.value){f.value={type:"new"};return}B()}function B(){n.value=null,s.value=!0,o.value="",a.value=""}function ne(){n.value?_(n.value):B()}async function re(){if(!o.value.trim()&&!a.value.trim()){Fe("标题与内容不能都为空");return}if(n.value&&n.value.id)await Om(n.value.id,o.value,a.value),Fe("备忘已保存");else{const ie=await Am(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,Fe("备忘已创建")}await h()}function oe(){n.value&&n.value.id&&(c.value=n.value)}async function $(){c.value&&c.value.id&&(await Mm(c.value.id),Fe("备忘已删除")),c.value=null,await h(),B()}function M(){const ie=f.value;f.value=null,ie&&(ie.type==="select"?_(ie.memo):B())}function Q(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function ce(ie){return ie.replace("T"," ").slice(0,16)}return(ie,Y)=>(S(),j("div",u_,[l("aside",c_,[l("div",d_,[l("span",f_,"备忘录("+te(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:E},"新建")]),l("div",p_,[(S(!0),j(Ie,null,ot(t.value,A=>(S(),j("div",{key:A.id,class:et(["memo-item",{active:s.value&&n.value&&n.value.id===A.id}]),onClick:x=>C(A)},[l("div",h_,te(A.title||"无标题"),1),l("div",m_,te(Q(A)||"空"),1),l("div",y_,te(ce(A.updated_at)),1)],10,v_))),128)),t.value.length?Ce("",!0):(S(),j("div",g_,"暂无备忘"))])]),l("section",b_,[s.value?(S(),j(Ie,{key:0},[Te(l("input",{class:"input title-input","onUpdate:modelValue":Y[0]||(Y[0]=A=>o.value=A),placeholder:"标题"},null,512),[[je,o.value]]),Te(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":Y[1]||(Y[1]=A=>a.value=A),placeholder:"内容"},null,512),[[je,a.value]]),l("div",w_,[l("span",__,[y.value?(S(),j(Ie,{key:0},[en("有未保存修改")],64)):n.value&&n.value.id?(S(),j(Ie,{key:1},[en("更新于 "+te(ce(n.value.updated_at)),1)],64)):(S(),j(Ie,{key:2},[en("新备忘")],64))]),Y[4]||(Y[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(S(),j("button",{key:0,class:"btn btn-sm",onClick:oe},"删除")):Ce("",!0),l("button",{class:"btn btn-sm",disabled:!y.value,onClick:ne},"放弃修改",8,k_),l("button",{class:"btn btn-primary btn-sm",disabled:!y.value,onClick:re},"保存",8,x_)])],64)):(S(),j("div",C_,"选择左侧备忘,或点击右上角新建"))]),$e(qn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Y[2]||(Y[2]=A=>c.value=null),onConfirm:$},null,8,["open","message"]),$e(qn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:Y[3]||(Y[3]=A=>f.value=null),onConfirm:M},null,8,["open"])]))}}),E_=Wt(S_,[["__scopeId","data-v-74d60dba"]]),$_=["aria-label"],T_={class:"dialog-head"},P_={class:"dialog-title"},A_={class:"dialog-body"},O_={class:"form-grid"},M_={class:"field span2"},I_={class:"field span2"},j_={class:"field span2"},D_={class:"pwd-row"},L_={class:"field span2"},R_={key:0,class:"form-error"},K_={class:"dialog-btns"},F_=Rt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L(""),a=L(""),c=L(""),f=L(""),h=L(""),g=L(null);function y(E){n.open&&E.key==="Escape"&&s("cancel")}ht(()=>n.open,async E=>{var B;E?(o.value=n.initial.system,a.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,h.value="",window.addEventListener("keydown",y),await ss(),(B=g.value)==null||B.focus()):window.removeEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y));function _(){const E="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",B="!@#$%^&*",ne=crypto.getRandomValues(new Uint8Array(14));let re="";for(let oe=0;oe(S(),At(jr,{to:"body"},[$e(os,{name:"modal"},{default:fr(()=>[e.open?(S(),j("div",{key:0,class:"mask",onClick:B[6]||(B[6]=sn(ne=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",T_,[l("span",P_,te(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:B[0]||(B[0]=ne=>s("cancel"))},[$e(Xe,{name:"close",size:16})])]),l("div",A_,[l("div",O_,[l("div",M_,[B[7]||(B[7]=l("label",null,"系统名称(必填)",-1)),Te(l("input",{ref_key:"systemInput",ref:g,class:"input","onUpdate:modelValue":B[1]||(B[1]=ne=>o.value=ne),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[je,o.value]])]),l("div",I_,[B[8]||(B[8]=l("label",null,"账号(必填)",-1)),Te(l("input",{class:"input","onUpdate:modelValue":B[2]||(B[2]=ne=>a.value=ne),placeholder:"用户名、工号或邮箱"},null,512),[[je,a.value]])]),l("div",j_,[B[9]||(B[9]=l("label",null,"密码(必填)",-1)),l("div",D_,[Te(l("input",{class:"input","onUpdate:modelValue":B[3]||(B[3]=ne=>c.value=ne),placeholder:"输入或点击生成"},null,512),[[je,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",L_,[B[10]||(B[10]=l("label",null,"备注",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":B[4]||(B[4]=ne=>f.value=ne),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[je,f.value]])])]),h.value?(S(),j("div",R_,te(h.value),1)):Ce("",!0)]),l("div",K_,[l("button",{class:"btn btn-sm",onClick:B[5]||(B[5]=ne=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:C},"保存")])],8,$_)])):Ce("",!0)]),_:1})]))}}),N_=Wt(F_,[["__scopeId","data-v-f383b0a6"]]),V_={class:"vault-page"},B_={key:0,class:"empty muted"},U_={key:1,class:"card lock-card"},q_={class:"lock-badge"},H_={key:0,class:"form-error"},W_=["disabled"],z_={key:0,class:"form-error"},G_=["disabled"],Y_={class:"vault-toolbar"},J_={class:"search-wrap"},X_={class:"card table-card"},Q_={class:"cred-table"},Z_={class:"td-system"},e1=["onClick"],t1={class:"pwd-cell"},n1={class:"num pwd-text"},r1=["onClick"],s1=["onClick"],o1={class:"td-remark"},i1={class:"td-ops"},a1={class:"ops"},l1=["onClick"],u1=["onClick"],c1={key:0},d1={class:"muted vault-note num"},f1={class:"dialog pwd-dialog"},p1={class:"dialog-head"},v1={class:"dialog-body"},h1={class:"vp-field"},m1={class:"vp-field"},y1={class:"vp-field"},g1={key:0,class:"form-error"},b1={class:"dialog-btns"},w1=5*60*1e3,_1=Rt({__name:"VaultView",setup(e){const t=L(null),n=L(kh()),s=L(!1),o=L(""),a=L(""),c=L(""),f=L(""),h=L(""),g=L([]),y=L(""),_=L({}),C=L(!1),E=L(null),B=L({system:"",account:"",password:"",remark:""}),ne=L(null),re=L(!1),oe=L(""),$=L(""),M=L(""),Q=L("");async function ce(){g.value=await $h(),_.value={}}let ie=null;function Y(){ie!==null&&window.clearTimeout(ie),ie=window.setTimeout(()=>{n.value&&(ri(),n.value=!1,g.value=[],_.value={},Fe("长时间未操作,密码库已自动锁定"))},w1)}function A(){n.value&&Y()}pn(async()=>{t.value=await ud(),window.addEventListener("click",A),window.addEventListener("keydown",A),n.value&&Y()}),pr(()=>{window.removeEventListener("click",A),window.removeEventListener("keydown",A),ie!==null&&window.clearTimeout(ie)});const x=st(()=>{const Se=y.value.trim().toLowerCase();return Se?g.value.filter(Z=>(Z.system+" "+Z.account+" "+(Z.remark||"")).toLowerCase().includes(Se)):g.value});async function N(){if(!s.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==a.value){c.value="两次输入的主密码不一致";return}s.value=!0;try{await xh(o.value),o.value="",a.value="",n.value=!0,Y(),await ce(),Fe("主密码已设置,密码库已解锁")}catch(Se){c.value=Se instanceof Error?Se.message:"设置失败"}s.value=!1}}async function le(){if(!s.value){if(h.value="",!f.value){h.value="请输入主密码";return}s.value=!0;try{await Ch(f.value),f.value="",n.value=!0,Y(),await ce()}catch(Se){h.value=Se instanceof Error?Se.message:"解锁失败"}s.value=!1}}function W(){ri(),n.value=!1,g.value=[],_.value={},ie!==null&&window.clearTimeout(ie),Fe("密码库已锁定")}async function ke(Se){const Z=Se.id;if(_.value[Z]){_.value[Z]=!1;return}try{Se.passwordPlain=await ma(Z),_.value[Z]=!0}catch(ee){Fe(ee instanceof Error?ee.message:"解密失败")}}async function Pe(Se){try{const Z=await ma(Se.id);await qa(Z),Fe("密码已复制")}catch(Z){Fe(Z instanceof Error?Z.message:"复制失败")}}async function Je(Se){await qa(Se.account),Fe("账号已复制")}function Le(){E.value=null,B.value={system:"",account:"",password:"",remark:""},C.value=!0}async function qe(Se){try{const Z=await ma(Se.id);E.value=Se.id,B.value={system:Se.system,account:Se.account,password:Z,remark:Se.remark||""},C.value=!0}catch(Z){Fe(Z instanceof Error?Z.message:"解密失败")}}async function Ne(Se){const Z=E.value??void 0;await Th(Se,Z),C.value=!1,await ce(),Fe(Z?"账号已更新":"账号已添加")}async function it(){ne.value&&ne.value.id&&(await Ph(ne.value.id),Fe("账号已删除")),ne.value=null,await ce()}function Ge(){oe.value="",$.value="",M.value="",Q.value="",re.value=!0}async function Qe(){Q.value="";try{const Se=await Ah(oe.value,$.value);re.value=!1,oe.value="",$.value="",M.value="",Fe("主密码已修改,"+Se+" 条账号密码已重新加密")}catch(Se){Q.value=Se instanceof Error?Se.message:"修改失败"}}return(Se,Z)=>(S(),j("div",V_,[t.value===null?(S(),j("div",B_,"加载中")):n.value?(S(),j(Ie,{key:2},[l("div",Y_,[l("div",J_,[$e(Xe,{name:"search",size:14,class:"search-icon"}),Te(l("input",{class:"input","onUpdate:modelValue":Z[3]||(Z[3]=ee=>y.value=ee),placeholder:"搜索系统名称、账号或备注"},null,512),[[je,y.value]])]),Z[16]||(Z[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:Ge},"修改主密码"),l("button",{class:"btn btn-sm",onClick:W},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Le},"新增账号")]),l("div",X_,[l("table",Q_,[Z[18]||(Z[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(S(!0),j(Ie,null,ot(x.value,ee=>(S(),j("tr",{key:ee.id},[l("td",Z_,te(ee.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:we=>Je(ee)},te(ee.account),9,e1)]),l("td",null,[l("div",t1,[l("span",n1,te(_.value[ee.id]?ee.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:we=>ke(ee)},te(_.value[ee.id]?"隐藏":"显示"),9,r1),l("button",{class:"btn btn-xs",onClick:we=>Pe(ee)},"复制",8,s1)])]),l("td",o1,te(ee.remark||"--"),1),l("td",i1,[l("div",a1,[l("button",{class:"btn btn-xs",onClick:we=>qe(ee)},"编辑",8,l1),l("button",{class:"btn btn-xs",onClick:we=>ne.value=ee},"删除",8,u1)])])]))),128)),x.value.length?Ce("",!0):(S(),j("tr",c1,[...Z[17]||(Z[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",d1,"共 "+te(g.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):(S(),j("div",U_,[l("div",q_,[$e(Xe,{name:"lock",size:26})]),t.value===!1?(S(),j(Ie,{key:0},[Z[12]||(Z[12]=l("div",{class:"lock-title"},"设置主密码",-1)),Z[13]||(Z[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[0]||(Z[0]=ee=>o.value=ee),placeholder:"设置主密码(至少 6 位)",onKeydown:Ot(N,["enter"])},null,544),[[je,o.value]]),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[1]||(Z[1]=ee=>a.value=ee),placeholder:"再次输入主密码",onKeydown:Ot(N,["enter"])},null,544),[[je,a.value]]),c.value?(S(),j("div",H_,te(c.value),1)):Ce("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:N},"完成设置并解锁",8,W_)],64)):(S(),j(Ie,{key:1},[Z[14]||(Z[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),Z[15]||(Z[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[2]||(Z[2]=ee=>f.value=ee),placeholder:"主密码",onKeydown:Ot(le,["enter"])},null,544),[[je,f.value]]),h.value?(S(),j("div",z_,te(h.value),1)):Ce("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:le},"解锁",8,G_)],64))])),$e(N_,{open:C.value,title:E.value?"编辑账号":"新增账号",initial:B.value,onCancel:Z[4]||(Z[4]=ee=>C.value=!1),onSave:Ne},null,8,["open","title","initial"]),$e(qn,{open:!!ne.value,title:"删除确认",message:ne.value?"将删除系统「"+ne.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[5]||(Z[5]=ee=>ne.value=null),onConfirm:it},null,8,["open","message"]),(S(),At(jr,{to:"body"},[$e(os,{name:"modal"},{default:fr(()=>[re.value?(S(),j("div",{key:0,class:"mask",onClick:Z[11]||(Z[11]=sn(ee=>re.value=!1,["self"]))},[l("div",f1,[l("div",p1,[Z[19]||(Z[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:Z[6]||(Z[6]=ee=>re.value=!1)},[$e(Xe,{name:"close",size:16})])]),l("div",v1,[l("div",h1,[Z[20]||(Z[20]=l("label",null,"旧主密码",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[7]||(Z[7]=ee=>oe.value=ee)},null,512),[[je,oe.value]])]),l("div",m1,[Z[21]||(Z[21]=l("label",null,"新主密码(至少 6 位)",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[8]||(Z[8]=ee=>$.value=ee)},null,512),[[je,$.value]])]),l("div",y1,[Z[22]||(Z[22]=l("label",null,"确认新主密码",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":Z[9]||(Z[9]=ee=>M.value=ee)},null,512),[[je,M.value]])]),Q.value?(S(),j("div",g1,te(Q.value),1)):Ce("",!0),Z[23]||(Z[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",b1,[l("button",{class:"btn btn-sm",onClick:Z[10]||(Z[10]=ee=>re.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Qe},"确认修改")])])])):Ce("",!0)]),_:1})]))]))}}),k1=Wt(_1,[["__scopeId","data-v-c2db283d"]]);function x1(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Vu(e,t){const s="\uFEFF"+t.map(f=>f.map(x1).join(",")).join(`\r -`);if(rs.isNativePlatform()){const{downloadText:f}=await Sd(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>db);return{downloadText:h}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),c=document.createElement("a");return c.href=a,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}const C1={class:"settings"},S1={class:"card section"},E1={class:"muted acc-line"},$1={class:"ai-grid"},T1={class:"rule-item"},P1={class:"rule-item"},A1={class:"rule-item"},O1={key:0,class:"form-error"},M1={class:"rule-save"},I1={class:"card section"},j1={class:"rule-grid"},D1={class:"rule-item"},L1={class:"rule-item"},R1={class:"rule-item"},K1={class:"rule-item"},F1={class:"rule-item"},N1={class:"card section"},V1={class:"proj-add"},B1={key:0,class:"muted proj-tip"},U1=["onKeydown"],q1=["onClick"],H1=["onClick"],W1=["onClick"],z1={key:1,class:"muted"},G1={class:"card section"},Y1={class:"card section"},J1={class:"muted acc-line"},X1={class:"rule-save"},Q1=["disabled"],Z1={key:0,class:"muted acc-line"},e0={key:1,class:"form-error"},t0={key:2,class:"form-error"},n0={class:"card section"},r0={class:"ai-grid"},s0={class:"rule-item"},o0={class:"rule-item"},i0={class:"rule-item"},a0={class:"card section"},l0={class:"backup-row"},u0={key:0,class:"import-error"},c0=Rt({__name:"SettingsView",setup(e){var Tt;const t=L({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=L([]),s=L(""),o=L(""),a=L(""),c=L(""),f=L(""),h=L(""),g=L(null),y=L(""),_=L(null),C=L(null),E=L(""),B=L(((Tt=Vs())==null?void 0:Tt.username)||""),ne=L(""),re=L(""),oe=L(""),$=L(""),M=L(!1),Q="0.3.0",ce=L(""),ie=L(""),Y=L(""),A=L(""),x=L(!1),N=L("");async function le(){var de;ce.value=((de=gn())==null?void 0:de.username)||"",N.value=await Xh(),A.value=Xr.value}ht(Xr,de=>{A.value=de});async function W(){Y.value="";try{await md(),Fe("云端绑定已重建")}catch(de){Y.value=de instanceof Error?de.message:"绑定失败"}}async function ke(){if(!x.value){Y.value="",A.value=Xr.value,x.value=!0;try{const de=await Na();N.value=de.at,ie.value="推送 "+de.pushed+" 条 · 拉取 "+de.pulled+" 条 · 删除 "+de.removed+" 条",A.value="",Fe("同步完成")}catch(de){Y.value=de instanceof Error?de.message:"同步失败"}x.value=!1}}async function Pe(){if($.value="",re.value!==oe.value){$.value="两次输入的新密码不一致";return}try{await Hh(ne.value,re.value),ne.value="",re.value="",oe.value="",Fe("登录密码已修改")}catch(de){$.value=de instanceof Error?de.message:"修改失败"}}async function Je(){await Wh(),window.location.reload()}async function Le(){t.value=await Lr(),n.value=await Us(!0),a.value=(await pl()).join(` -`),c.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),h.value=await gt("ai_model",""),await le()}async function qe(){await Lt("ai_base_url",c.value.trim()),await Lt("ai_api_key",f.value.trim()),await Lt("ai_model",h.value.trim()),Fe("AI 配置已保存")}async function Ne(){const de=xt(),v=await Promise.all([Si("2000-01-01",de),Us(!0)]),b=v[0],U=v[1],fe=new Map(U.map(ue=>[ue.id,ue.name])),V=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const ue of b)V.push([ue.date,Zo(ue.category),ue.project_id&&fe.get(ue.project_id)||"",ue.content,ue.minutes==null?"":ue.minutes,ue.is_milestone?"是":"",ue.needs_followup?"是":"",ue.takeaway||"",ue.remark||""]);const ae=await Vu("工作记录_"+de.replace(/-/g,"")+".csv",V);Fe(ae?"CSV 已导出到:"+ae:"CSV 已导出到系统下载目录")}async function it(){const de=xt(),v=await Promise.all([Lr(),Ci("2000-01-01",de)]),b=v[0],U=v[1],fe=["周日","周一","周二","周三","周四","周五","周六"],V=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const ue of U){const ye=Ys(ue,ue.date,b,ue.date===de);V.push([ue.date,fe[is(ue.date).getDay()],ye.label,ue.clock_in_at?Un(ue.clock_in_at):"",ue.clock_out_at?Un(ue.clock_out_at):"",ue.location||"",ue.kind==="makeup"?"补卡":ue.kind==="leave"?"休假":"正常",ue.note||""])}const ae=await Vu("考勤记录_"+de.replace(/-/g,"")+".csv",V);Fe(ae?"CSV 已导出到:"+ae:"CSV 已导出到系统下载目录")}pn(Le);async function Ge(){await Lt("work_start",t.value.work_start),await Lt("work_end",t.value.work_end),await Lt("grace_minutes",String(t.value.grace_minutes)),await Lt("lunch_minutes",String(t.value.lunch_minutes)),await Lt("remind_weekly",t.value.remind_weekly),Fe("打卡规则已保存")}async function Qe(){await kd(a.value.split(` -`)),Fe("常用地点已保存")}async function Se(){const de=s.value.trim();if(de){try{await vm(de),o.value="",s.value=""}catch{o.value="项目名已存在"}await Le()}}function Z(de){g.value=de.id,y.value=de.name}async function ee(de){const v=y.value.trim();if(v)try{await hm(de.id,v),o.value=""}catch{o.value="项目名已存在"}g.value=null,await Le()}async function we(de){await mm(de.id,de.archived!==1),await Le()}async function Ke(){try{const de=await Nm(),v=await hl("实习日志备份_"+xt().replace(/-/g,"")+".json",de);Fe(v?"备份已导出到:"+v:"备份已导出到系统下载目录")}catch(de){Fe("导出失败:"+(de instanceof Error?de.message:String(de)))}}function dt(de){const v=de.target,b=v.files&&v.files[0];if(E.value="",!b)return;const U=b.name;b.text().then(fe=>{C.value={name:U,text:fe}}),v.value=""}async function Kt(){if(C.value)try{await Vm(C.value.text),C.value=null,E.value="",await Le(),Fe("数据导入完成")}catch(de){C.value=null,E.value=de instanceof Error?de.message:"导入失败"}}return(de,v)=>(S(),j("div",C1,[l("div",S1,[v[22]||(v[22]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",E1,"v"+te(Ut(Q))+" · 当前账号 "+te(B.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",$1,[l("div",T1,[v[19]||(v[19]=l("label",null,"旧登录密码",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":v[0]||(v[0]=b=>ne.value=b)},null,512),[[je,ne.value]])]),l("div",P1,[v[20]||(v[20]=l("label",null,"新登录密码(至少 6 位)",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":v[1]||(v[1]=b=>re.value=b)},null,512),[[je,re.value]])]),l("div",A1,[v[21]||(v[21]=l("label",null,"确认新登录密码",-1)),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":v[2]||(v[2]=b=>oe.value=b)},null,512),[[je,oe.value]])])]),$.value?(S(),j("div",O1,te($.value),1)):Ce("",!0),l("div",M1,[l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:v[3]||(v[3]=b=>M.value=!0)},"删除此用户及全部数据")])]),l("div",I1,[v[29]||(v[29]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",j1,[l("div",D1,[v[23]||(v[23]=l("label",null,"上班时间",-1)),Te(l("input",{type:"time",class:"input","onUpdate:modelValue":v[4]||(v[4]=b=>t.value.work_start=b)},null,512),[[je,t.value.work_start]])]),l("div",L1,[v[24]||(v[24]=l("label",null,"下班时间",-1)),Te(l("input",{type:"time",class:"input","onUpdate:modelValue":v[5]||(v[5]=b=>t.value.work_end=b)},null,512),[[je,t.value.work_end]])]),l("div",R1,[v[25]||(v[25]=l("label",null,"迟到宽限(分钟)",-1)),Te(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":v[6]||(v[6]=b=>t.value.grace_minutes=b)},null,512),[[je,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",K1,[v[26]||(v[26]=l("label",null,"午休扣除(分钟)",-1)),Te(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":v[7]||(v[7]=b=>t.value.lunch_minutes=b)},null,512),[[je,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",F1,[v[28]||(v[28]=l("label",null,"周记提醒",-1)),Te(l("select",{class:"select","onUpdate:modelValue":v[8]||(v[8]=b=>t.value.remind_weekly=b)},[...v[27]||(v[27]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[Vn,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Ge},"保存规则")])]),l("div",N1,[v[30]||(v[30]=l("div",{class:"section-title"},"项目管理",-1)),l("div",V1,[Te(l("input",{class:"input","onUpdate:modelValue":v[9]||(v[9]=b=>s.value=b),placeholder:"新项目名称",onKeydown:Ot(Se,["enter"])},null,544),[[je,s.value]]),l("button",{class:"btn btn-sm",onClick:Se},"添加")]),o.value?(S(),j("div",B1,te(o.value),1)):Ce("",!0),(S(!0),j(Ie,null,ot(n.value,b=>(S(),j("div",{key:b.id,class:"proj-row"},[g.value===b.id?(S(),j(Ie,{key:0},[Te(l("input",{class:"input","onUpdate:modelValue":v[10]||(v[10]=U=>y.value=U),onKeydown:Ot(U=>ee(b),["enter"])},null,40,U1),[[je,y.value]]),l("button",{class:"btn btn-sm",onClick:U=>ee(b)},"保存",8,q1),l("button",{class:"btn btn-sm",onClick:v[11]||(v[11]=U=>g.value=null)},"取消")],64)):(S(),j(Ie,{key:1},[l("span",{class:et(["proj-name",{archived:b.archived===1}])},te(b.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:U=>Z(b)},[$e(Xe,{name:"edit",size:14})],8,H1),l("button",{class:"btn btn-sm",onClick:U=>we(b)},te(b.archived===1?"恢复":"归档"),9,W1)],64))]))),128)),n.value.length?Ce("",!0):(S(),j("div",z1,"暂无项目,先添加一个"))]),l("div",G1,[v[32]||(v[32]=l("div",{class:"section-title"},"常用地点",-1)),Te(l("textarea",{class:"textarea","onUpdate:modelValue":v[12]||(v[12]=b=>a.value=b),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[je,a.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Qe},"保存地点"),v[31]||(v[31]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",Y1,[v[33]||(v[33]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",J1,"云端账号:"+te(ce.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",X1,[l("button",{class:"btn btn-primary btn-sm",disabled:x.value,onClick:ke},te(x.value?"同步中":"立即同步"),9,Q1),l("button",{class:"btn btn-sm",onClick:W},"重新校验连接")]),ie.value?(S(),j("div",Z1,"上次同步:"+te(N.value||"--")+" · "+te(ie.value),1)):Ce("",!0),Y.value?(S(),j("div",e0,te(Y.value),1)):Ce("",!0),A.value?(S(),j("div",t0,"最近自动同步失败:"+te(A.value)+"(可点「立即同步」重试)",1)):Ce("",!0)]),l("div",n0,[v[38]||(v[38]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",r0,[l("div",s0,[v[34]||(v[34]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Te(l("input",{class:"input","onUpdate:modelValue":v[13]||(v[13]=b=>c.value=b),placeholder:"https://api.example.com/v1"},null,512),[[je,c.value]])]),l("div",o0,[v[35]||(v[35]=l("label",null,"API Key",-1)),Te(l("input",{class:"input","onUpdate:modelValue":v[14]||(v[14]=b=>f.value=b),placeholder:"sk-..."},null,512),[[je,f.value]])]),l("div",i0,[v[36]||(v[36]=l("label",null,"模型名称",-1)),Te(l("input",{class:"input","onUpdate:modelValue":v[15]||(v[15]=b=>h.value=b),placeholder:"如:deepseek-chat"},null,512),[[je,h.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:qe},"保存 AI 配置"),v[37]||(v[37]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",a0,[v[39]||(v[39]=l("div",{class:"section-title"},"数据备份",-1)),l("div",l0,[l("button",{class:"btn btn-sm",onClick:Ke},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:v[16]||(v[16]=b=>{var U;return(U=_.value)==null?void 0:U.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:Ne},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:it},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:_,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:dt},null,544)]),E.value?(S(),j("div",u0,te(E.value),1)):Ce("",!0),v[40]||(v[40]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),$e(qn,{open:!!C.value,title:"导入确认",message:C.value?"将从文件「"+C.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:v[17]||(v[17]=b=>C.value=null),onConfirm:Kt},null,8,["open","message"]),$e(qn,{open:M.value,title:"删除用户确认",message:"将永久删除云端账号「"+B.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:v[18]||(v[18]=b=>M.value=!1),onConfirm:Je},null,8,["open","message"])]))}}),d0=Wt(c0,[["__scopeId","data-v-904000ea"]]),f0={class:"admin-page"},p0={class:"card sec"},v0={class:"toolbar"},h0={key:0,class:"form-error"},m0={class:"card table-card admin-table-card"},y0={class:"admin-table"},g0={class:"td-name","data-label":"用户名"},b0={"data-label":"角色"},w0={key:0,class:"role-badge"},_0={key:1,class:"muted"},k0={class:"muted num","data-label":"创建时间"},x0={class:"muted num","data-label":"数据量"},C0={class:"td-ops"},S0={class:"ops"},E0=["onClick"],$0=["disabled","onClick"],T0={key:0},P0={key:0,class:"muted load-line"},A0={class:"dialog create-dialog",role:"dialog","aria-label":"新增用户"},O0={class:"dialog-head"},M0={class:"dialog-body"},I0={class:"form-row"},j0={class:"form-row"},D0={class:"form-row"},L0={key:0,class:"form-error"},R0={class:"dialog-btns"},K0=["disabled"],F0={class:"dialog create-dialog",role:"dialog","aria-label":"重置密码"},N0={class:"dialog-head"},V0={class:"dialog-title"},B0={class:"dialog-body"},U0={class:"form-row"},q0={key:0,class:"form-error"},H0={class:"dialog-btns"},W0=["disabled"],z0=Rt({__name:"UserAdminView",setup(e){const t=L([]),n=L(""),s=L(!0),o=L("");async function a(x,N){const le=await Rr();let W=xi();if(!W){const Pe=gn(),Je=await fetch(le+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Pe==null?void 0:Pe.username,password:Pe==null?void 0:Pe.password})});if(Je.ok){const Le=await Je.json();W=String(Le.token||""),Ns(W)}}const ke=await fetch(le+x,{method:N?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+W},body:N?JSON.stringify(N):void 0});if(ke.status===401&&gn()){const Pe=gn(),Je=await fetch(le+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Pe==null?void 0:Pe.username,password:Pe==null?void 0:Pe.password})});if(Je.ok){const Le=await Je.json();W=String(Le.token||""),Ns(W);const qe=await fetch(le+x,{method:N?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+W},body:N?JSON.stringify(N):void 0});return{ok:qe.ok,status:qe.status,data:await qe.json().catch(()=>({}))}}}return{ok:ke.ok,status:ke.status,data:await ke.json().catch(()=>({}))}}async function c(){s.value=!0,o.value="";const x=await a("/api/admin/users");if(!x.ok){s.value=!1,o.value=x.data&&x.data.error||"加载失败 "+x.status;return}t.value=x.data.users||[],n.value=x.data.me||"",s.value=!1}function f(x){return x<=0?"--":x<1024?x+" B":x<1024*1024?(x/1024).toFixed(1)+" KB":(x/1024/1024).toFixed(2)+" MB"}function h(x){return(x||"").slice(0,10)}const g=L(!1),y=L(""),_=L(""),C=L(""),E=L(""),B=L(!1);function ne(){g.value=!0,E.value="",y.value="",_.value="",C.value=""}async function re(){const x=y.value.trim();if(_.value!==C.value){E.value="两次输入的密码不一致";return}if(_.value.length<6){E.value="密码至少 6 位";return}B.value=!0;const N=await a("/api/admin/users/create",{username:x,password:_.value});if(B.value=!1,!N.ok){E.value=N.data&&N.data.error||"创建失败 "+N.status;return}Fe("用户「"+x+"」已创建"),g.value=!1,await c()}const oe=L(null),$=L(""),M=L(""),Q=L(!1);function ce(x){oe.value=x,$.value="",M.value=""}async function ie(){if(!oe.value)return;if($.value.length<6){M.value="密码至少 6 位";return}Q.value=!0;const x=await a("/api/admin/users/password",{userId:oe.value.id,newPassword:$.value});if(Q.value=!1,!x.ok){M.value=x.data&&x.data.error||"重置失败 "+x.status;return}Fe("已重置「"+oe.value.username+"」的登录密码"),oe.value=null}const Y=L(null);async function A(){if(!Y.value)return;const x=await a("/api/admin/users/delete",{userId:Y.value.id});if(!x.ok){Y.value=null,Fe(x.data&&x.data.error||"删除失败");return}Fe("已删除账号「"+Y.value.username+"」及其全部云端数据"),Y.value=null,await c()}return pn(c),(x,N)=>(S(),j("div",f0,[l("div",p0,[l("div",v0,[N[12]||(N[12]=l("div",{class:"head-wrap"},[l("div",{class:"sec-title"},"用户管理"),l("div",{class:"muted head-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:ne},[$e(Xe,{name:"plus",size:14}),N[11]||(N[11]=en(" 新增用户 ",-1))])]),o.value?(S(),j("div",h0,te(o.value),1)):Ce("",!0)]),l("div",m0,[l("table",y0,[N[14]||(N[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(S(!0),j(Ie,null,ot(t.value,le=>(S(),j("tr",{key:le.id},[l("td",g0,te(le.username),1),l("td",b0,[le.role==="admin"?(S(),j("span",w0,"管理员")):(S(),j("span",_0,"普通用户"))]),l("td",k0,te(h(le.created_at)),1),l("td",x0,te(f(le.data_bytes)),1),l("td",C0,[l("div",S0,[l("button",{class:"btn btn-xs",onClick:W=>ce(le)},"重置密码",8,E0),l("button",{class:"btn btn-xs btn-danger",disabled:le.id===n.value,onClick:W=>Y.value=le},"删除",8,$0)])])]))),128)),!s.value&&!t.value.length?(S(),j("tr",T0,[...N[13]||(N[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):Ce("",!0)])]),s.value?(S(),j("div",P0,"加载中")):Ce("",!0)]),N[20]||(N[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),(S(),At(jr,{to:"body"},[g.value?(S(),j("div",{key:0,class:"fixed-mask",onClick:N[5]||(N[5]=sn(le=>g.value=!1,["self"]))},[l("div",A0,[l("div",O0,[N[15]||(N[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:N[0]||(N[0]=le=>g.value=!1)},[$e(Xe,{name:"close",size:16})])]),l("div",M0,[l("div",I0,[N[16]||(N[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Te(l("input",{class:"input","onUpdate:modelValue":N[1]||(N[1]=le=>y.value=le),placeholder:"如:xiaowang"},null,512),[[je,y.value]])]),l("div",j0,[N[17]||(N[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Te(l("input",{class:"input",type:"password","onUpdate:modelValue":N[2]||(N[2]=le=>_.value=le),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[je,_.value]])]),l("div",D0,[N[18]||(N[18]=l("label",null,"确认密码",-1)),Te(l("input",{class:"input",type:"password","onUpdate:modelValue":N[3]||(N[3]=le=>C.value=le),onKeydown:Ot(re,["enter"])},null,544),[[je,C.value]])]),E.value?(S(),j("div",L0,te(E.value),1)):Ce("",!0)]),l("div",R0,[l("button",{class:"btn btn-sm",onClick:N[4]||(N[4]=le=>g.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:B.value||!y.value.trim(),onClick:re},te(B.value?"创建中":"创建"),9,K0)])])])):Ce("",!0)])),(S(),At(jr,{to:"body"},[oe.value?(S(),j("div",{key:0,class:"fixed-mask",onClick:N[9]||(N[9]=sn(le=>oe.value=null,["self"]))},[l("div",F0,[l("div",N0,[l("span",V0,"重置「"+te(oe.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:N[6]||(N[6]=le=>oe.value=null)},[$e(Xe,{name:"close",size:16})])]),l("div",B0,[l("div",U0,[N[19]||(N[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Te(l("input",{class:"input",type:"password","onUpdate:modelValue":N[7]||(N[7]=le=>$.value=le),onKeydown:Ot(ie,["enter"])},null,544),[[je,$.value]])]),M.value?(S(),j("div",q0,te(M.value),1)):Ce("",!0)]),l("div",H0,[l("button",{class:"btn btn-sm",onClick:N[8]||(N[8]=le=>oe.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:Q.value,onClick:ie},te(Q.value?"提交中":"重置"),9,W0)])])])):Ce("",!0)])),$e(qn,{open:!!Y.value,title:"删除用户确认",message:Y.value?"将永久删除云端账号「"+Y.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:N[10]||(N[10]=le=>Y.value=null),onConfirm:A},null,8,["open","message"])]))}}),G0=Wt(z0,[["__scopeId","data-v-06be07ff"]]),Y0={class:"login-page"},J0={class:"card login-card"},X0={class:"login-brand"},Q0={class:"brand-icon"},Z0={class:"seg"},ek=["placeholder"],tk={key:1,class:"form-error"},nk=["disabled"],rk=Rt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=L("login"),o=L(""),a=L(""),c=L(""),f=L(""),h=L(!1);function g(_){s.value=_,f.value="",c.value=""}async function y(){if(!h.value){f.value="",h.value=!0;try{let _;if(s.value==="login")_=await Nh(o.value,a.value);else{if(a.value.length<6){f.value="登录密码至少 6 位",h.value=!1;return}if(a.value!==c.value){f.value="两次输入的密码不一致",h.value=!1;return}_=await Vh(o.value,a.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}h.value=!1}}return(_,C)=>(S(),j("div",Y0,[l("div",J0,[l("div",X0,[l("div",Q0,[$e(Xe,{name:"calendar",size:22})]),C[5]||(C[5]=l("div",{class:"login-title"},"实习工作日志",-1)),C[6]||(C[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),C[7]||(C[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",Z0,[l("button",{class:et(["seg-btn",{active:s.value==="login"}]),onClick:C[0]||(C[0]=E=>g("login"))},"登录",2),l("button",{class:et(["seg-btn",{active:s.value==="create"}]),onClick:C[1]||(C[1]=E=>g("create"))},"创建用户",2)]),Te(l("input",{class:"input","onUpdate:modelValue":C[2]||(C[2]=E=>o.value=E),placeholder:"用户名(2 到 20 个字符)",onKeydown:Ot(y,["enter"])},null,544),[[je,o.value]]),Te(l("input",{type:"password",class:"input","onUpdate:modelValue":C[3]||(C[3]=E=>a.value=E),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Ot(y,["enter"])},null,40,ek),[[je,a.value]]),s.value==="create"?Te((S(),j("input",{key:0,type:"password",class:"input","onUpdate:modelValue":C[4]||(C[4]=E=>c.value=E),placeholder:"再次输入密码",onKeydown:Ot(y,["enter"])},null,544)),[[je,c.value]]):Ce("",!0),f.value?(S(),j("div",tk,te(f.value),1)):Ce("",!0),l("button",{class:"btn btn-primary login-btn",disabled:h.value,onClick:y},te(s.value==="login"?"登录":"创建并进入"),9,nk),C[8]||(C[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),sk=Wt(rk,[["__scopeId","data-v-bf714afa"]]),ok={key:1,class:"app"},ik={class:"side"},ak={key:0,class:"nav-sep"},lk=["data-tip","onClick"],uk={class:"main"},ck={class:"topbar"},dk={class:"title"},fk={class:"gsearch"},pk={key:0,class:"gs-panel"},vk={key:0,class:"gs-group muted"},hk=["onMousedown"],mk={class:"tag"},yk={class:"gs-text"},gk={class:"muted num gs-date"},bk={key:1,class:"gs-group muted"},wk=["onMousedown"],_k={class:"gs-text"},kk={class:"muted gs-sub"},xk={key:1,class:"gs-empty muted"},Ck={class:"topbar-actions"},Sk={class:"user-chip num mobile-hide"},Ek=["disabled"],$k={class:"num"},Tk={class:"content"},Pk={class:"content-inner"},Ak={class:"tabbar"},Ok=["onClick"],Mk={class:"sheet-user num"},Ik=["onClick"],jk={class:"sheet-name"},Dk={class:"msw"},Lk={class:"msw-bar"},Rk={class:"msw-results"},Kk={key:0,class:"gs-group muted"},Fk=["onMousedown"],Nk={class:"tag"},Vk={class:"gs-text"},Bk={class:"muted num gs-date"},Uk={key:1,class:"gs-group muted"},qk=["onMousedown"],Hk={class:"gs-text"},Wk={class:"muted gs-sub"},zk={key:1,class:"gs-empty muted"},Gk={class:"toast-wrap"},Yk=Rt({__name:"App",setup(e){const t=Um(),n=L(Vs());async function s(v){n.value=v,oi(v.userId),location.hash="#/calendar",ce.value="calendar",await ee(),await de(),c();try{await md(),await Zr()}catch{}Fe("欢迎,"+v.username);const b=sessionStorage.getItem("dsh_migrate_toast");b&&(sessionStorage.removeItem("dsh_migrate_toast"),Fe("已迁移原有数据 "+b+" 条"))}async function o(){Le.value=!1,Pe.value=!1,nm(),a!==null&&(window.clearInterval(a),a=null),await Uh(),n.value=null,ce.value="calendar",location.hash="#/calendar",Fe("已退出登录")}let a=null;function c(){tm(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Zr()},60*1e3),Zr()}const f=L(null),h=L(""),g=L(!1),y=L({logs:[],memos:[]});let _=null;const C=st(()=>!!(y.value.logs.length||y.value.memos.length));function E(){_&&window.clearTimeout(_);const v=h.value;_=window.setTimeout(async()=>{const b=v.trim();if(!b){y.value={logs:[],memos:[]};return}const U=await Promise.all([Im(b,8),jm(b,4)]);y.value={logs:U[0],memos:U[1]}},200)}function B(){h.value="",y.value={logs:[],memos:[]},g.value=!1}function ne(v){Ka.value=v.date,ie("calendar"),B()}function re(v){Fa.value=v.id,ie("memo"),B()}function oe(){window.setTimeout(()=>{g.value=!1},150)}function $(v){var b;(v.ctrlKey||v.metaKey)&&v.key.toLowerCase()==="k"&&(v.preventDefault(),(b=f.value)==null||b.focus())}const M=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function Q(){var b;const v=(location.hash||"").replace("#/","");return!M.some(U=>U.key===v)||v==="admin"&&(((b=Vs())==null?void 0:b.username)||"")!=="xionglin"?"calendar":v}const ce=L(Q());window.addEventListener("hashchange",()=>{ce.value=Q()});function ie(v){location.hash="#/"+v}const Y=st(()=>M.find(v=>v.key===ce.value)||M[0]),A=st(()=>{var v;return(((v=n.value)==null?void 0:v.username)||"")==="xionglin"}),x=st(()=>A.value?M:M.filter(v=>v.key!=="admin")),N=st(()=>{const v=M.filter(b=>!W.includes(b.key));return A.value?v:v.filter(b=>b.key!=="admin")}),le=st(()=>N.value.some(v=>v.key===ce.value));ht([A,ce],()=>{ce.value==="admin"&&!A.value&&ie("calendar")},{immediate:!0});const W=["calendar","today","ledger","memo"],ke=M.filter(v=>W.includes(v.key)),Pe=L(!1);function Je(v){Pe.value=!1,ie(v)}const Le=L(!1),qe=L(null);function Ne(){Le.value=!0,window.setTimeout(()=>{var v;return(v=qe.value)==null?void 0:v.focus()},60)}function it(v){ne(v),Le.value=!1}function Ge(v){re(v),Le.value=!1}const Qe=L(xt()),Se=L(void 0),Z=L(!1);async function ee(){if(Se.value=await bn(Qe.value),Z.value=!1,new Date().getHours()<4){const b=await bn(Nn(Qe.value,-1));Z.value=!!(b&&b.clock_in_at&&!b.clock_out_at)}}const we=st(()=>{const v=Se.value;return v&&v.clock_in_at&&!v.clock_out_at?!0:Z.value&&!(v&&v.clock_in_at)}),Ke=st(()=>{const v=Se.value;return!!(v&&v.clock_in_at&&v.clock_out_at)}),dt=st(()=>{const v=Se.value;return we.value?"下班打卡":Ke.value?"已打卡 "+Un(v==null?void 0:v.clock_in_at)+" - "+Un(v==null?void 0:v.clock_out_at):"上班打卡"});async function Kt(){if(we.value)try{await gm()}catch{}else await xd(Qe.value);await ee(),rr()}ht(Gs,()=>{n.value&&ee()});const Tt=L(!1);async function de(){if((await Lr()).remind_weekly==="off"){Tt.value=!1;return}const b=new Date().getDay();if(b===5||b===6||b===0){const U=await vl(Ps(Qe.value));Tt.value=!U||!U.highlights&&!U.challenges&&!U.plan_next}else Tt.value=!1}return pn(async()=>{window.addEventListener("keydown",$),n.value&&(oi(n.value.userId),await ee(),await de(),c())}),(v,b)=>{var U,fe;return n.value?(S(),j("div",ok,[l("nav",ik,[(S(!0),j(Ie,null,ot(x.value,(V,ae)=>(S(),j(Ie,{key:V.key},[ae>0&&V.group!==x.value[ae-1].group?(S(),j("div",ak)):Ce("",!0),l("button",{class:et(["nav-btn",{active:ce.value===V.key}]),"data-tip":V.name,onClick:ue=>ie(V.key)},[$e(Xe,{name:V.icon,size:18},null,8,["name"])],10,lk)],64))),128))]),l("div",uk,[l("header",ck,[l("span",dk,te(Y.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:Ne},[$e(Xe,{name:"search",size:16})]),l("div",fk,[$e(Xe,{name:"search",size:14,class:"gs-icon"}),Te(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":b[0]||(b[0]=V=>h.value=V),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:E,onFocus:b[1]||(b[1]=V=>g.value=!0),onBlur:oe,onKeydown:Ot(B,["esc"])},null,544),[[je,h.value]]),g.value&&h.value.trim()?(S(),j("div",pk,[C.value?(S(),j(Ie,{key:0},[y.value.logs.length?(S(),j("div",vk,"工作记录")):Ce("",!0),(S(!0),j(Ie,null,ot(y.value.logs,V=>(S(),j("div",{key:"l"+V.id,class:"gs-item",onMousedown:sn(ae=>ne(V),["prevent"])},[l("span",mk,te(Ut(Zo)(V.category)),1),l("span",yk,te(V.content),1),l("span",gk,te(V.date),1)],40,hk))),128)),y.value.memos.length?(S(),j("div",bk,"备忘录")):Ce("",!0),(S(!0),j(Ie,null,ot(y.value.memos,V=>(S(),j("div",{key:"m"+V.id,class:"gs-item",onMousedown:sn(ae=>re(V),["prevent"])},[l("span",_k,te(V.title||"无标题"),1),l("span",kk,te(V.content),1)],40,wk))),128))],64)):(S(),j("div",xk,"无匹配结果"))])):Ce("",!0)]),b[12]||(b[12]=l("span",{class:"flex1"},null,-1)),l("div",Ck,[Tt.value?(S(),j("button",{key:0,class:"week-tip",onClick:b[2]||(b[2]=V=>ie("report"))},[...b[11]||(b[11]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),en(" 填写本周周记 ",-1)])])):Ce("",!0),l("span",Sk,te((U=n.value)==null?void 0:U.username),1),l("button",{class:"btn btn-sm mobile-hide",onClick:o},"退出"),l("button",{class:"btn btn-primary btn-sm",disabled:Ke.value,onClick:Kt},[$e(Xe,{name:Ke.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",$k,te(dt.value),1)],8,Ek)])]),l("main",Tk,[l("div",Pk,[ce.value==="calendar"?(S(),At(fg,{key:0})):ce.value==="today"?(S(),At(gg,{key:1})):ce.value==="stats"?(S(),At(Yg,{key:2})):ce.value==="report"?(S(),At(Gb,{key:3})):ce.value==="ledger"?(S(),At(l_,{key:4})):ce.value==="memo"?(S(),At(E_,{key:5})):ce.value==="vault"?(S(),At(k1,{key:6})):ce.value==="admin"?(S(),At(G0,{key:7})):(S(),At(d0,{key:8}))])]),l("nav",Ak,[(S(!0),j(Ie,null,ot(Ut(ke),V=>(S(),j("button",{key:V.key,class:et(["tab-btn",{active:ce.value===V.key}]),onClick:ae=>ie(V.key)},[$e(Xe,{name:V.icon,size:20},null,8,["name"]),l("span",null,te(V.name),1)],10,Ok))),128)),l("button",{class:et(["tab-btn",{active:le.value}]),onClick:b[3]||(b[3]=V=>Pe.value=!0)},[$e(Xe,{name:"more",size:20}),b[13]||(b[13]=l("span",null,"更多",-1))],2)]),Pe.value?(S(),j("div",{key:0,class:"sheet-mask",onClick:b[6]||(b[6]=V=>Pe.value=!1)},[l("div",{class:"more-sheet",onClick:b[5]||(b[5]=sn(()=>{},["stop"]))},[l("div",Mk,te((fe=n.value)==null?void 0:fe.username),1),(S(!0),j(Ie,null,ot(N.value,V=>(S(),j("button",{key:V.key,class:"sheet-row",onClick:ae=>Je(V.key)},[$e(Xe,{name:V.icon,size:18},null,8,["name"]),l("span",jk,te(V.name),1),$e(Xe,{name:"chevron-right",size:14,class:"sheet-go"})],8,Ik))),128)),b[15]||(b[15]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:b[4]||(b[4]=V=>{Pe.value=!1,o()})},[$e(Xe,{name:"close",size:18}),b[14]||(b[14]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):Ce("",!0),Le.value?(S(),j("div",{key:1,class:"msw-mask",onClick:b[10]||(b[10]=sn(V=>Le.value=!1,["self"]))},[l("div",Dk,[l("div",Lk,[$e(Xe,{name:"search",size:16,class:"msw-icon"}),Te(l("input",{ref_key:"msInput",ref:qe,class:"msw-input","onUpdate:modelValue":b[7]||(b[7]=V=>h.value=V),placeholder:"搜索工作记录与备忘录",onInput:E,onKeydown:b[8]||(b[8]=Ot(V=>Le.value=!1,["esc"]))},null,544),[[je,h.value]]),l("button",{class:"icon-btn",onClick:b[9]||(b[9]=V=>{B(),Le.value=!1})},[$e(Xe,{name:"close",size:16})])]),l("div",Rk,[C.value?(S(),j(Ie,{key:0},[y.value.logs.length?(S(),j("div",Kk,"工作记录")):Ce("",!0),(S(!0),j(Ie,null,ot(y.value.logs,V=>(S(),j("div",{key:"l"+V.id,class:"msw-item",onMousedown:sn(ae=>it(V),["prevent"])},[l("span",Nk,te(Ut(Zo)(V.category)),1),l("span",Vk,te(V.content),1),l("span",Bk,te(V.date),1)],40,Fk))),128)),y.value.memos.length?(S(),j("div",Uk,"备忘录")):Ce("",!0),(S(!0),j(Ie,null,ot(y.value.memos,V=>(S(),j("div",{key:"m"+V.id,class:"msw-item",onMousedown:sn(ae=>Ge(V),["prevent"])},[l("span",Hk,te(V.title||"无标题"),1),l("span",Wk,te(V.content),1)],40,qk))),128))],64)):h.value.trim()?(S(),j("div",zk,"无匹配结果")):Ce("",!0)])])])):Ce("",!0)]),l("div",Gk,[$e(kv,{name:"toast"},{default:fr(()=>[(S(!0),j(Ie,null,ot(Ut(t),V=>(S(),j("div",{key:V.id,class:"toast"},te(V.text),1))),128))]),_:1})])])):(S(),At(sk,{key:0,onLogin:s}))}}}),Jk=Wt(Yk,[["__scopeId","data-v-4b4a9c88"]]);function Ko(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",a=>{a.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const s=document.createElement("div");s.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",s.textContent=e+` -`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(s),n.appendChild(o)}catch{}}async function Xk(){const e=await Bh();e&&oi(e.userId);const t=Rv(Jk);t.config.errorHandler=(n,s,o)=>{const a=n;Ko("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",a&&(a.stack||a.message)||String(n)+` -触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const s=n.reason;Ko("未处理的异步错误(点击空白处关闭)",s&&(s.stack||s.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Ko("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}Xk().catch(e=>{Ko("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Td as W,Sd as _,ub as b,$d as r}; diff --git a/intern-log/dist/assets/index-DxgZcHRE.css b/intern-log/dist/assets/index-DxgZcHRE.css deleted file mode 100644 index 91fa5aa..0000000 --- a/intern-log/dist/assets/index-DxgZcHRE.css +++ /dev/null @@ -1 +0,0 @@ -.mask[data-v-f27041d4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:100}.dialog[data-v-f27041d4]{width:380px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);padding:20px}.dialog-title[data-v-f27041d4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-msg[data-v-f27041d4]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-f27041d4]{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.btn-danger-solid[data-v-f27041d4]{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid[data-v-f27041d4]:hover{background:#d13a3f}.modal-enter-active[data-v-f27041d4],.modal-leave-active[data-v-f27041d4]{transition:opacity .15s ease}.modal-enter-from[data-v-f27041d4],.modal-leave-to[data-v-f27041d4]{opacity:0}.mask[data-v-63bc0b48]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-63bc0b48]{width:560px;max-width:calc(100vw - 32px);max-height:85vh;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head[data-v-63bc0b48]{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title[data-v-63bc0b48]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-63bc0b48]{font-size:12px;margin-top:2px}.dialog-body[data-v-63bc0b48]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-63bc0b48]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-63bc0b48]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-63bc0b48]{grid-column:span 2}.field label[data-v-63bc0b48]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-63bc0b48]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-63bc0b48],.input.invalid[data-v-63bc0b48]:focus{border-color:var(--danger)}.toggle-btn[data-v-63bc0b48]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-63bc0b48]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-63bc0b48]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-63bc0b48]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-63bc0b48],.modal-leave-active[data-v-63bc0b48]{transition:opacity .15s ease}.modal-enter-from[data-v-63bc0b48],.modal-leave-to[data-v-63bc0b48]{opacity:0}.dp-head[data-v-2e90c9d8]{margin-bottom:12px}.dp-date[data-v-2e90c9d8]{font-size:14px;font-weight:600}.sec[data-v-2e90c9d8]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-2e90c9d8]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-2e90c9d8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2e90c9d8]{margin-bottom:0}.form-hint[data-v-2e90c9d8]{font-size:12px}.att-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-2e90c9d8],.field label[data-v-2e90c9d8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-2e90c9d8]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-2e90c9d8]{min-height:32px}.val-empty[data-v-2e90c9d8]{color:var(--text-3)}.edit-row[data-v-2e90c9d8]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-2e90c9d8]{width:104px}.att-note[data-v-2e90c9d8]{margin-top:10px;font-size:12px}.att-actions[data-v-2e90c9d8]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2e90c9d8]{grid-column:span 2}.form-footer[data-v-2e90c9d8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-2e90c9d8]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-2e90c9d8]{border-color:var(--danger)}.input.invalid[data-v-2e90c9d8]:focus{border-color:var(--danger)}.list-sec[data-v-2e90c9d8]{margin-bottom:4px}.item[data-v-2e90c9d8]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-2e90c9d8]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-2e90c9d8]{cursor:text;word-break:break-all}.item-meta[data-v-2e90c9d8]{font-size:12px}.item-sub[data-v-2e90c9d8]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.empty[data-v-2e90c9d8]{text-align:center;padding:24px 0}.dp-foot[data-v-2e90c9d8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-2e90c9d8],.form-grid[data-v-2e90c9d8]{grid-template-columns:1fr}.field.span2[data-v-2e90c9d8]{grid-column:auto}}.cal-toolbar[data-v-2404dfbe]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-2404dfbe]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-head[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-week[data-v-2404dfbe]{text-align:center;padding:6px 0;font-size:12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}.cal-grid[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-cell[data-v-2404dfbe]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border);cursor:pointer;display:block;font-size:13px}.cal-cell[data-v-2404dfbe]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-2404dfbe]{cursor:default}.cal-cell.blank[data-v-2404dfbe]:hover{background:var(--bg-page)}.cal-cell.selected[data-v-2404dfbe]{background:var(--accent-bg)}.daynum.today[data-v-2404dfbe]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-2404dfbe]{color:var(--text-3)}.cal-marks[data-v-2404dfbe]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-2404dfbe]{color:var(--text-3)}.mark-star[data-v-2404dfbe]{color:var(--accent)}.drawer[data-v-2404dfbe]{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-2404dfbe]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-2404dfbe]{font-weight:600}.drawer-body[data-v-2404dfbe]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-2404dfbe],.drawer-leave-active[data-v-2404dfbe]{transition:opacity .15s ease}.drawer-enter-from[data-v-2404dfbe],.drawer-leave-to[data-v-2404dfbe]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-2404dfbe]{min-height:60px;padding:4px 5px}.cal-title[data-v-2404dfbe]{min-width:76px;font-size:13px}.cal-marks[data-v-2404dfbe]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-2404dfbe]{width:100%}}.detail-toolbar[data-v-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.cards[data-v-73e5ba49]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-73e5ba49]{padding:14px 16px}.stat-num[data-v-73e5ba49]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-73e5ba49]{padding:14px 16px;margin-top:12px}.section-title[data-v-73e5ba49]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-73e5ba49]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-73e5ba49]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-73e5ba49]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-73e5ba49]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-73e5ba49]{background:#d8ecdf}.lv2[data-v-73e5ba49]{background:#a9d8bc}.lv3[data-v-73e5ba49]{background:#6fbf92}.lv4[data-v-73e5ba49]{background:var(--ok)}.heat-legend[data-v-73e5ba49]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-73e5ba49]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-73e5ba49]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-73e5ba49]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-73e5ba49]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-73e5ba49]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-73e5ba49]{font-size:12px;width:92px;flex:none}.loc-label[data-v-73e5ba49]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-73e5ba49]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-73e5ba49]{grid-template-columns:1fr}}.report-toolbar[data-v-43f9c59b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-43f9c59b]{color:var(--danger);font-size:12px;margin:0 0 8px}.seg[data-v-43f9c59b]{display:inline-flex;border:1px solid var(--border-strong);border-radius:6px;overflow:hidden}.seg-btn[data-v-43f9c59b]{height:28px;padding:0 12px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;border-right:1px solid var(--border)}.seg-btn[data-v-43f9c59b]:last-child{border-right:none}.seg-btn[data-v-43f9c59b]:hover{background:var(--bg-hover)}.seg-btn.active[data-v-43f9c59b]{background:var(--accent-bg);color:var(--accent)}.w-date[data-v-43f9c59b]{width:140px}.report-grid[data-v-43f9c59b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section[data-v-43f9c59b]{padding:14px 16px}.section-title[data-v-43f9c59b]{font-weight:600;margin-bottom:8px;font-size:13px}.section+.section[data-v-43f9c59b]{margin-top:12px}.note-label[data-v-43f9c59b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-43f9c59b]{font-size:12px;margin-top:6px}.md-editor[data-v-43f9c59b]{min-height:420px;line-height:1.7}.sum-row[data-v-43f9c59b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-43f9c59b]{font-weight:600;margin:10px 0 4px;font-size:12px}.sum-item[data-v-43f9c59b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-43f9c59b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-43f9c59b]{grid-template-columns:1fr}}.mask[data-v-edca3327]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-edca3327]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-edca3327]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-edca3327]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-edca3327]{padding:16px 20px}.dialog-btns[data-v-edca3327]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-edca3327]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-edca3327]{grid-column:span 2}.field label[data-v-edca3327]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-edca3327]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-edca3327]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-edca3327]{border-left:1px solid var(--border)}.seg-btn.active[data-v-edca3327]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-edca3327]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-edca3327],.input.invalid[data-v-edca3327]:focus{border-color:var(--danger)}.modal-enter-active[data-v-edca3327],.modal-leave-active[data-v-edca3327]{transition:opacity .15s ease}.modal-enter-from[data-v-edca3327],.modal-leave-to[data-v-edca3327]{opacity:0}.ledger-toolbar[data-v-5490dec1]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-5490dec1]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-5490dec1]{width:110px;flex:none}.cards[data-v-5490dec1]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-5490dec1]{padding:14px 16px}.stat-num[data-v-5490dec1]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-5490dec1]{color:var(--ok)}.amt-expense[data-v-5490dec1]{color:var(--text-1)}.amt-warn[data-v-5490dec1]{color:var(--warn)}.sec[data-v-5490dec1]{padding:14px 16px;margin-top:12px}.sec-title[data-v-5490dec1]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-5490dec1]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-5490dec1]{margin-bottom:0}.form-hint[data-v-5490dec1]{font-size:12px}.form-grid[data-v-5490dec1]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-5490dec1]{grid-column:span 2}.field label[data-v-5490dec1]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-5490dec1]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-5490dec1]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-5490dec1]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-5490dec1]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-5490dec1]{border-left:1px solid var(--border)}.seg-btn.active[data-v-5490dec1]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-5490dec1]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-5490dec1]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-5490dec1]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-5490dec1]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-5490dec1]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-5490dec1]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-5490dec1]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-5490dec1]{font-size:12px;width:110px;flex:none}.table-card[data-v-5490dec1]{overflow-x:auto}.tx-table[data-v-5490dec1]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-5490dec1]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td[data-v-5490dec1]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-5490dec1]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-5490dec1]{border-bottom:none}.td-note[data-v-5490dec1]{color:var(--text-2)}.tx-pending[data-v-5490dec1]{color:var(--warn);font-size:12px}.tx-done[data-v-5490dec1]{color:var(--ok);font-size:12px}.th-ops[data-v-5490dec1]{width:220px}.ops[data-v-5490dec1]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-5490dec1]{text-align:center;padding:24px 0}.vault-note[data-v-5490dec1]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-5490dec1]{grid-template-columns:1fr}.field.span2[data-v-5490dec1]{grid-column:auto}.ledger-toolbar .w-filter[data-v-5490dec1]{flex:1;min-width:0;width:auto}}.memo-page[data-v-74d60dba]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-74d60dba]{display:flex;flex-direction:column;max-height:calc(100vh - 140px)}.pane-head[data-v-74d60dba]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-74d60dba]{font-size:13px;font-weight:600}.memo-scroll[data-v-74d60dba]{overflow:auto;padding:6px}.memo-item[data-v-74d60dba]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-74d60dba]:hover{background:var(--bg-hover)}.memo-item.active[data-v-74d60dba]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-74d60dba]{color:var(--accent)}.memo-item-title[data-v-74d60dba]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-74d60dba]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-74d60dba]{font-size:11px;margin-top:2px}.memo-editor[data-v-74d60dba]{padding:16px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-74d60dba]{font-size:14px;font-weight:500;margin-bottom:10px}.content-textarea[data-v-74d60dba]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-74d60dba]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-74d60dba]{font-size:12px}.editor-empty[data-v-74d60dba]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-74d60dba]{grid-template-columns:1fr}.memo-list[data-v-74d60dba]{max-height:240px}.content-textarea[data-v-74d60dba]{min-height:240px}}.mask[data-v-f383b0a6]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-f383b0a6]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-f383b0a6]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-f383b0a6]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-f383b0a6]{padding:16px 20px}.dialog-btns[data-v-f383b0a6]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-f383b0a6]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-f383b0a6]{grid-column:span 2}.field label[data-v-f383b0a6]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.pwd-row[data-v-f383b0a6]{display:flex;gap:8px}.pwd-row .input[data-v-f383b0a6]{flex:1}.form-error[data-v-f383b0a6]{color:var(--danger);font-size:12px;margin-top:8px}.modal-enter-active[data-v-f383b0a6],.modal-leave-active[data-v-f383b0a6]{transition:opacity .15s ease}.modal-enter-from[data-v-f383b0a6],.modal-leave-to[data-v-f383b0a6]{opacity:0}.lock-card[data-v-c2db283d]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-c2db283d]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--bg-subtle);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.lock-title[data-v-c2db283d]{font-size:14px;font-weight:600}.lock-tip[data-v-c2db283d]{font-size:12px;line-height:1.7}.lock-btn[data-v-c2db283d]{margin-top:4px}.form-error[data-v-c2db283d]{color:var(--danger);font-size:12px}.empty[data-v-c2db283d]{text-align:center;padding:24px 0}.vault-toolbar[data-v-c2db283d]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-c2db283d]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-c2db283d]{padding-left:30px}.search-icon[data-v-c2db283d]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-c2db283d]{overflow-x:auto}.cred-table[data-v-c2db283d]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-c2db283d]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.cred-table td[data-v-c2db283d]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-c2db283d]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-c2db283d]{border-bottom:none}.td-system[data-v-c2db283d]{font-weight:500}.th-ops[data-v-c2db283d]{width:150px}.pwd-cell[data-v-c2db283d]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-c2db283d]{letter-spacing:1px}.copyable[data-v-c2db283d]{cursor:pointer}.copyable[data-v-c2db283d]:hover{color:var(--accent)}.ops[data-v-c2db283d]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-c2db283d]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-c2db283d]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-c2db283d]{width:440px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-c2db283d]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-c2db283d]{font-size:14px;font-weight:600}.dialog-body[data-v-c2db283d]{padding:16px 20px}.dialog-btns[data-v-c2db283d]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-c2db283d]{margin-bottom:10px}.vp-field label[data-v-c2db283d]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-c2db283d]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-c2db283d],.modal-leave-active[data-v-c2db283d]{transition:opacity .15s ease}.modal-enter-from[data-v-c2db283d],.modal-leave-to[data-v-c2db283d]{opacity:0}.settings[data-v-904000ea]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-904000ea]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-904000ea]{padding:14px 16px}.section-title[data-v-904000ea]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-904000ea]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-904000ea]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-904000ea]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-904000ea]{display:flex;gap:8px}.proj-tip[data-v-904000ea]{font-size:12px;margin-top:6px}.proj-row[data-v-904000ea]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-904000ea]:last-child{border-bottom:none}.proj-name[data-v-904000ea]{flex:1;word-break:break-all}.proj-name.archived[data-v-904000ea]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-904000ea]{font-size:12px}.ai-grid[data-v-904000ea]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-904000ea]{display:flex;gap:8px}.import-error[data-v-904000ea]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-904000ea]{font-size:12px;margin-top:10px}.admin-page[data-v-06be07ff]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-06be07ff]{display:flex;align-items:center;gap:12px}.head-wrap[data-v-06be07ff]{flex:1;min-width:0}.sec-title[data-v-06be07ff]{font-weight:600;font-size:13px}.head-sub[data-v-06be07ff]{font-size:12px;margin-top:2px}.sec[data-v-06be07ff]{padding:14px 16px}.admin-table-card[data-v-06be07ff]{overflow-x:auto}.admin-table[data-v-06be07ff]{width:100%;border-collapse:collapse;font-size:13px}.admin-table th[data-v-06be07ff]{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;padding:8px 12px;border-bottom:1px solid var(--border)}.admin-table td[data-v-06be07ff]{padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.admin-table td[data-v-06be07ff]:last-child{border-bottom:none}.td-name[data-v-06be07ff]{font-weight:500}.role-badge[data-v-06be07ff]{display:inline-flex;align-items:center;border:1px solid var(--accent);color:var(--accent);border-radius:999px;font-size:12px;line-height:16px;padding:1px 8px}.load-line[data-v-06be07ff]{padding:12px;font-size:12px}.admin-note[data-v-06be07ff]{font-size:12px;padding:0 2px}.ops[data-v-06be07ff]{display:inline-flex;gap:6px}.form-row[data-v-06be07ff]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row label[data-v-06be07ff]{font-size:12px;color:var(--text-2)}.fixed-mask[data-v-06be07ff]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;background:#1d212959;display:flex;align-items:center;justify-content:center;padding:16px}.dialog[data-v-06be07ff]{background:var(--bg-page);border-radius:12px;width:420px;max-width:100%}.dialog-head[data-v-06be07ff]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 0}.dialog-title[data-v-06be07ff]{font-weight:600;font-size:14px}.dialog-body[data-v-06be07ff]{padding:6px 16px 4px}.dialog-btns[data-v-06be07ff]{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px}.btn-danger[data-v-06be07ff]{color:var(--danger)}.empty[data-v-06be07ff]{text-align:center}@media (max-width: 720px){.toolbar[data-v-06be07ff]{flex-wrap:wrap;row-gap:8px}.admin-table td[data-v-06be07ff],.admin-table th[data-v-06be07ff]{white-space:normal}}.login-page[data-v-bf714afa]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-bf714afa]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-bf714afa]{text-align:center;margin-bottom:6px}.brand-icon[data-v-bf714afa]{width:46px;height:46px;margin:0 auto 10px;border-radius:var(--radius-md);background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.login-title[data-v-bf714afa]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-bf714afa]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-bf714afa]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-bf714afa]{flex:1;height:30px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-bf714afa]{border-left:1px solid var(--border)}.seg-btn.active[data-v-bf714afa]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-bf714afa]{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-2);cursor:pointer;line-height:1.6}.mig-row input[data-v-bf714afa]{margin-top:3px}.form-error[data-v-bf714afa]{color:var(--danger);font-size:12px}.login-btn[data-v-bf714afa]{margin-top:2px}.login-note[data-v-bf714afa]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-4b4a9c88]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-4b4a9c88]{width:56px;flex:none;border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:10px;gap:4px;background:var(--bg-page)}.nav-btn[data-v-4b4a9c88]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-3);cursor:pointer;border:none;background:transparent;position:relative}.nav-btn[data-v-4b4a9c88]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-4b4a9c88]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-4b4a9c88]:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}.nav-btn[data-v-4b4a9c88]:hover:after{opacity:1}.nav-sep[data-v-4b4a9c88]{width:26px;height:1px;flex:none;background:var(--border);margin:5px 0}[data-v-4b4a9c88]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.main[data-v-4b4a9c88]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-4b4a9c88]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-4b4a9c88]{font-size:14px;font-weight:600}.topbar-actions[data-v-4b4a9c88]{display:flex;align-items:center;gap:8px}.gsearch[data-v-4b4a9c88]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-4b4a9c88]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-4b4a9c88]{height:30px;padding-left:30px}.gs-panel[data-v-4b4a9c88]{position:absolute;top:36px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-4b4a9c88]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-4b4a9c88]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-4b4a9c88]:hover{background:var(--bg-hover)}.gs-text[data-v-4b4a9c88],.gs-sub[data-v-4b4a9c88]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-4b4a9c88]{font-size:13px}.gs-sub[data-v-4b4a9c88]{font-size:12px}.gs-date[data-v-4b4a9c88]{font-size:12px;flex:none}.gs-empty[data-v-4b4a9c88]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-4b4a9c88]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-4b4a9c88]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:26px;padding:0 10px;font-size:12px;cursor:pointer}.week-tip[data-v-4b4a9c88]:hover{background:var(--bg-subtle)}.content[data-v-4b4a9c88]{flex:1;overflow:auto}.content-inner[data-v-4b4a9c88]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-4b4a9c88]{position:fixed;top:68px;right:20px;z-index:60;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}.toast[data-v-4b4a9c88]{background:var(--bg-page);border:1px solid var(--border);box-shadow:var(--shadow-float);border-radius:var(--radius-sm);padding:8px 14px;font-size:13px;color:var(--text-1)}.toast-enter-from[data-v-4b4a9c88],.toast-leave-to[data-v-4b4a9c88]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-4b4a9c88],.toast-leave-active[data-v-4b4a9c88]{transition:all .15s ease}.mob-search-btn[data-v-4b4a9c88]{display:none;width:30px;height:30px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.mobile-hide[data-v-4b4a9c88]{display:initial}.tabbar[data-v-4b4a9c88]{display:none;position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--bg-page);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tab-btn[data-v-4b4a9c88]{flex:1;height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px}.tab-btn.active[data-v-4b4a9c88]{color:var(--accent)}.sheet-mask[data-v-4b4a9c88]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212959}.more-sheet[data-v-4b4a9c88]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:14px 14px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-user[data-v-4b4a9c88]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-4b4a9c88]{display:flex;align-items:center;gap:12px;height:46px;border:none;background:transparent;color:var(--text-1);font-size:14px;cursor:pointer;border-radius:var(--radius-sm);text-align:left;padding:0 6px}.sheet-row[data-v-4b4a9c88]:hover,.sheet-row[data-v-4b4a9c88]:active{background:var(--bg-hover)}.sheet-name[data-v-4b4a9c88]{flex:1}.sheet-go[data-v-4b4a9c88]{color:var(--text-3)}.sheet-divider[data-v-4b4a9c88]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-4b4a9c88]{color:var(--danger)}.msw-mask[data-v-4b4a9c88]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-4b4a9c88]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-4b4a9c88]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-4b4a9c88]{color:var(--text-3)}.msw-input[data-v-4b4a9c88]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-4b4a9c88]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-4b4a9c88]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-4b4a9c88]:hover,.msw-item[data-v-4b4a9c88]:active{background:var(--bg-hover)}@media (max-width: 720px){.app[data-v-4b4a9c88]{display:block;height:100dvh}.side[data-v-4b4a9c88]{display:none}.main[data-v-4b4a9c88]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-4b4a9c88]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-4b4a9c88]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-4b4a9c88],.gsearch .gs-panel[data-v-4b4a9c88]{display:none}.mob-search-btn[data-v-4b4a9c88]{display:flex}.topbar-actions[data-v-4b4a9c88]{margin-left:auto;gap:6px}.mobile-hide[data-v-4b4a9c88]{display:none!important}.week-tip[data-v-4b4a9c88]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-4b4a9c88]{padding:0 10px}.topbar-actions .btn .num[data-v-4b4a9c88]{font-size:12px}.tabbar[data-v-4b4a9c88]{display:flex}.content[data-v-4b4a9c88]{flex:1;min-height:0}.content-inner[data-v-4b4a9c88]{max-width:none;padding:12px 12px calc(66px + env(safe-area-inset-bottom))}.card[data-v-4b4a9c88]{border-radius:var(--radius-md)}input.input[data-v-4b4a9c88],select.select[data-v-4b4a9c88],textarea.textarea[data-v-4b4a9c88]{width:100%;box-sizing:border-box}.btn[data-v-4b4a9c88]{touch-action:manipulation}.topbar-actions .btn-primary[data-v-4b4a9c88]{height:32px}.toast-wrap[data-v-4b4a9c88]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--border: #EBEDF0;--border-strong: #DCDEE3;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--accent: #3370FF;--accent-bg: #F0F5FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--shadow-float: 0 4px 16px rgba(29, 33, 41, .08)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-page);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap}.btn:hover{background:var(--bg-hover)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#2b5fd9}.btn-danger{color:var(--danger);border-color:var(--danger)}.btn-sm{height:26px;padding:0 10px;font-size:12px}.btn-xs{height:22px;padding:0 8px;font-size:12px}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%}.textarea{height:auto;min-height:56px;padding:8px 10px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}.dot.rest{background:var(--border)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){.card{border-radius:12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:86vh;max-height:86dvh;overflow:auto}.dialog-body{padding:14px!important}.form-grid{grid-template-columns:1fr!important}.dialog-btns{gap:8px}.dialog-btns .btn{flex:1}.drawer{top:auto!important;left:0!important;width:100%!important;height:min(86vh,86dvh)!important;border-left:none!important;border-top:1px solid var(--border);border-radius:14px 14px 0 0!important}.drawer-enter-active,.drawer-leave-active{transition:transform .2s ease,opacity .2s ease}.drawer-enter-from,.drawer-leave-to{transform:translateY(28px);opacity:0}.drawer-head{border-radius:14px 14px 0 0}.drawer-body{padding:12px!important}.tx-table{min-width:0!important}.tx-table thead{display:none!important}.tx-table tr{display:block;padding:10px 12px;border-bottom:1px solid var(--border);background:transparent}.tx-table tbody tr:last-child{border-bottom:none}.tx-table td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:3px 0!important;border:none!important;white-space:normal!important}.tx-table td:before{content:attr(data-label);color:var(--text-3);font-size:12px;flex:none}.tx-table td.ops-cell:before{content:none}.tx-table td.ops-cell{justify-content:flex-end}.tx-table td.empty{justify-content:center}.tx-table td.empty:before{content:none!important}.table-card,.tx-card{overflow-x:auto}.cred-table{min-width:560px!important}.th-ops{width:auto!important}.vault-toolbar{flex-wrap:wrap;row-gap:8px}.vault-toolbar .search-wrap{width:100%;max-width:none!important}.vault-toolbar .flex1{display:none}.vault-toolbar .btn{flex:none}.cal-toolbar{margin-bottom:8px}.cal-cell{min-height:54px!important;padding:4px 5px!important}.cal-marks{margin-top:3px!important;height:12px!important;gap:3px!important}.section,.sec{padding:12px!important}.rule-grid{grid-template-columns:1fr!important}} diff --git a/intern-log/dist/assets/index-IuJhwbTi.js b/intern-log/dist/assets/index-IuJhwbTi.js new file mode 100644 index 0000000..7d6184a --- /dev/null +++ b/intern-log/dist/assets/index-IuJhwbTi.js @@ -0,0 +1,26 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** +* @vue/shared v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function zi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const _t={},Os=[],An=()=>{},qu=()=>!1,la=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ua=e=>e.startsWith("onUpdate:"),It=Object.assign,Gi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},af=Object.prototype.hasOwnProperty,vt=(e,t)=>af.call(e,t),Ye=Array.isArray,os=e=>zr(e)==="[object Map]",Ds=e=>zr(e)==="[object Set]",Ql=e=>zr(e)==="[object Date]",st=e=>typeof e=="function",St=e=>typeof e=="string",On=e=>typeof e=="symbol",ht=e=>e!==null&&typeof e=="object",Hu=e=>(ht(e)||st(e))&&st(e.then)&&st(e.catch),Wu=Object.prototype.toString,zr=e=>Wu.call(e),lf=e=>zr(e).slice(8,-1),zu=e=>zr(e)==="[object Object]",Yi=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$r=zi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ca=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},uf=/-\w/g,yn=ca(e=>e.replace(uf,t=>t.slice(1).toUpperCase())),cf=/\B([A-Z])/g,ps=ca(e=>e.replace(cf,"-$1").toLowerCase()),Gu=ca(e=>e.charAt(0).toUpperCase()+e.slice(1)),ni=ca(e=>e?`on${Gu(e)}`:""),Tn=(e,t)=>!Object.is(e,t),Oo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},da=e=>{const t=parseFloat(e);return isNaN(t)?e:t},df=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let Zl;const fa=()=>Zl||(Zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function as(e){if(Ye(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(ff).forEach(n=>{if(n){const r=n.split(pf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function tt(e){let t="";if(St(e))t=e;else if(Ye(e))for(let n=0;nls(n,t))}const Xu=e=>!!(e&&e.__v_isRef===!0),z=e=>St(e)?e:e==null?"":Ye(e)||ht(e)&&(e.toString===Wu||!st(e.toString))?Xu(e)?z(e.value):JSON.stringify(e,Qu,2):String(e),Qu=(e,t)=>Xu(t)?Qu(e,t.value):os(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[si(r,i)+" =>"]=o,n),{})}:Ds(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>si(n))}:On(t)?si(t):ht(t)&&!Ye(t)&&!zu(t)?String(t):t,si=(e,t="")=>{var n;return On(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Bt;class _f{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&&Bt&&(Bt.active?(this.parent=Bt,this.index=(Bt.scopes||(Bt.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 r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Bt===this)Bt=this.prevScope;else{let t=Bt;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,r;for(n=0,r=this.effects.length;n0)return;if(Er){let t=Er;for(Er=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Sr;){let t=Sr;for(Sr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function nc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Qi(r),xf(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function rc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ir)||(e.globalVersion=Ir,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wi(e))))return;e.flags|=2;const t=e.dep,n=xt,r=gn;xt=e,gn=!0;try{nc(e);const o=e.fn(e._value);(t.version===0||Tn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{xt=n,gn=r,sc(e),e.flags&=-3}}function Qi(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Qi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gn=!0;const oc=[];function Mn(){oc.push(gn),gn=!1}function In(){const e=oc.pop();gn=e===void 0?!0:e}function nu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xt;xt=void 0;try{t()}finally{xt=n}}}let Ir=0;class Cf{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 Zi{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(!xt||!gn||xt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xt)n=this.activeLink=new Cf(xt,this),xt.deps?(n.prevDep=xt.depsTail,xt.depsTail.nextDep=n,xt.depsTail=n):xt.deps=xt.depsTail=n,ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=xt.depsTail,n.nextDep=void 0,xt.depsTail.nextDep=n,xt.depsTail=n,xt.deps===n&&(xt.deps=r)}return n}trigger(t){this.version++,Ir++,this.notify(t)}notify(t){Ji();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Xi()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ac(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _i=new WeakMap,Is=Symbol(""),ki=Symbol(""),jr=Symbol("");function zt(e,t,n){if(gn&&xt){let r=_i.get(e);r||_i.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Zi),o.map=r,o.key=n),o.track()}}function Fn(e,t,n,r,o,i){const c=_i.get(e);if(!c){Ir++;return}const f=v=>{v&&v.trigger()};if(Ji(),t==="clear")c.forEach(f);else{const v=Ye(e),y=v&&Yi(n);if(v&&n==="length"){const h=Number(r);c.forEach((w,C)=>{(C==="length"||C===jr||!On(C)&&C>=h)&&f(w)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),y&&f(c.get(jr)),t){case"add":v?y&&f(c.get("length")):(f(c.get(Is)),os(e)&&f(c.get(ki)));break;case"delete":v||(f(c.get(Is)),os(e)&&f(c.get(ki)));break;case"set":os(e)&&f(c.get(Is));break}}Xi()}function Gs(e){const t=pt(e);return t===e||(zt(t,"iterate",jr),fn(e))?t:jn(e)?is(e)?t.map(n=>us(pn(n))):t.map(us):t.map(pn)}function pa(e){return zt(e=pt(e),"iterate",jr),e}function $n(e,t){return jn(e)?us(is(e)?pn(t):t):pn(t)}const $f={__proto__:null,[Symbol.iterator](){return oi(this,Symbol.iterator,e=>$n(this,e))},concat(...e){return Gs(this).concat(...e.map(t=>Ye(t)?Gs(t):t))},entries(){return oi(this,"entries",e=>(e[1]=$n(this,e[1]),e))},every(e,t){return Kn(this,"every",e,t,void 0,arguments)},filter(e,t){return Kn(this,"filter",e,t,n=>n.map(r=>$n(this,r)),arguments)},find(e,t){return Kn(this,"find",e,t,n=>$n(this,n),arguments)},findIndex(e,t){return Kn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kn(this,"findLast",e,t,n=>$n(this,n),arguments)},findLastIndex(e,t){return Kn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kn(this,"forEach",e,t,void 0,arguments)},includes(...e){return ai(this,"includes",e)},indexOf(...e){return ai(this,"indexOf",e)},join(e){return Gs(this).join(e)},lastIndexOf(...e){return ai(this,"lastIndexOf",e)},map(e,t){return Kn(this,"map",e,t,void 0,arguments)},pop(){return br(this,"pop")},push(...e){return br(this,"push",e)},reduce(e,...t){return ru(this,"reduce",e,t)},reduceRight(e,...t){return ru(this,"reduceRight",e,t)},shift(){return br(this,"shift")},some(e,t){return Kn(this,"some",e,t,void 0,arguments)},splice(...e){return br(this,"splice",e)},toReversed(){return Gs(this).toReversed()},toSorted(e){return Gs(this).toSorted(e)},toSpliced(...e){return Gs(this).toSpliced(...e)},unshift(...e){return br(this,"unshift",e)},values(){return oi(this,"values",e=>$n(this,e))}};function oi(e,t,n){const r=pa(e),o=r[t],i=o.call(r);if(r!==e&&!fn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>su(i.next(),n),o!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>su(i._next(),n)}return i}function su(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Kn(e,t,n,r,o,i){const c=pa(e),f=c!==e&&!fn(e),v=c[t];if(v!==ic[t]){const w=v.apply(e,i);return f?pn(w):w}let y=n;c!==e&&(f?y=function(w,C){return n.call(this,$n(e,w),C,e)}:n.length>2&&(y=function(w,C){return n.call(this,w,C,e)}));const h=v.call(c,y,r);return f&&o?o(h):h}function ru(e,t,n,r){const o=pa(e),i=o!==e&&!fn(e);let c=n,f=!1;o!==e&&(i?(f=r.length===0,c=function(y,h,w){return f&&(f=!1,y=$n(e,y)),n.call(this,y,$n(e,h),w,e)}):n.length>3&&(c=function(y,h,w){return n.call(this,y,h,w,e)}));const v=o[t](c,...r);return f?$n(e,v):v}function ai(e,t,n){const r=pt(e);zt(r,"iterate",jr);const o=r[t](...n);return(o===-1||o===!1)&&sl(n[0])?(n[0]=pt(n[0]),r[t](...n)):o}function br(e,t,n=[]){Mn(),Ji();const r=pt(e)[t].apply(e,n);return Xi(),In(),r}const Sf=zi("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(On));function Ef(e){On(e)||(e=String(e));const t=pt(this);return zt(t,"has",e),t.hasOwnProperty(e)}class uc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Kf:pc:i?fc:dc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const c=Ye(t);if(!o){let v;if(c&&(v=$f[n]))return v;if(n==="hasOwnProperty")return Ef}const f=Reflect.get(t,n,Yt(t)?t:r);if((On(n)?lc.has(n):Sf(n))||(o||zt(t,"get",n),i))return f;if(Yt(f)){const v=c&&Yi(n)?f:f.value;return o&&ht(v)?Ci(v):v}return ht(f)?o?Ci(f):tl(f):f}}class cc extends uc{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const c=Ye(t)&&Yi(n);if(!this._isShallow){const y=jn(i);if(!fn(r)&&!jn(r)&&(i=pt(i),r=pt(r)),!c&&Yt(i)&&!Yt(r))return y||(i.value=r),!0}const f=c?Number(n)e,Co=e=>Reflect.getPrototypeOf(e);function Mf(e,t,n){return function(...r){const o=this.__v_raw,i=pt(o),c=os(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,y=o[e](...r),h=n?xi:t?us:pn;return!t&&zt(i,"iterate",v?ki:Is),It(Object.create(y),{next(){const{value:w,done:C}=y.next();return C?{value:w,done:C}:{value:f?[h(w[0]),h(w[1])]:h(w),done:C}}})}}function $o(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function If(e,t){const n={get(o){const i=this.__v_raw,c=pt(i),f=pt(o);e||(Tn(o,f)&&zt(c,"get",o),zt(c,"get",f));const{has:v}=Co(c),y=t?xi:e?us:pn;if(v.call(c,o))return y(i.get(o));if(v.call(c,f))return y(i.get(f));i!==c&&i.get(o)},get size(){const o=this.__v_raw;return!e&&zt(pt(o),"iterate",Is),o.size},has(o){const i=this.__v_raw,c=pt(i),f=pt(o);return e||(Tn(o,f)&&zt(c,"has",o),zt(c,"has",f)),o===f?i.has(o):i.has(o)||i.has(f)},forEach(o,i){const c=this,f=c.__v_raw,v=pt(f),y=t?xi:e?us:pn;return!e&&zt(v,"iterate",Is),f.forEach((h,w)=>o.call(i,y(h),y(w),c))}};return It(n,e?{add:$o("add"),set:$o("set"),delete:$o("delete"),clear:$o("clear")}:{add(o){const i=pt(this),c=Co(i),f=pt(o),v=!t&&!fn(o)&&!jn(o)?f:o;return c.has.call(i,v)||Tn(o,v)&&c.has.call(i,o)||Tn(f,v)&&c.has.call(i,f)||(i.add(v),Fn(i,"add",v,v)),this},set(o,i){!t&&!fn(i)&&!jn(i)&&(i=pt(i));const c=pt(this),{has:f,get:v}=Co(c);let y=f.call(c,o);y||(o=pt(o),y=f.call(c,o));const h=v.call(c,o);return c.set(o,i),y?Tn(i,h)&&Fn(c,"set",o,i):Fn(c,"add",o,i),this},delete(o){const i=pt(this),{has:c,get:f}=Co(i);let v=c.call(i,o);v||(o=pt(o),v=c.call(i,o)),f&&f.call(i,o);const y=i.delete(o);return v&&Fn(i,"delete",o,void 0),y},clear(){const o=pt(this),i=o.size!==0,c=o.clear();return i&&Fn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Mf(o,e,t)}),n}function el(e,t){const n=If(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?r:Reflect.get(vt(n,o)&&o in r?n:r,o,i)}const jf={get:el(!1,!1)},Df={get:el(!1,!0)},Lf={get:el(!0,!1)};const dc=new WeakMap,fc=new WeakMap,pc=new WeakMap,Kf=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function tl(e){return jn(e)?e:nl(e,!1,Af,jf,dc)}function Nf(e){return nl(e,!1,Of,Df,fc)}function Ci(e){return nl(e,!0,Pf,Lf,pc)}function nl(e,t,n,r,o){if(!ht(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const c=Rf(lf(e));if(c===0)return e;const f=new Proxy(e,c===2?r:n);return o.set(e,f),f}function is(e){return jn(e)?is(e.__v_raw):!!(e&&e.__v_isReactive)}function jn(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function sl(e){return e?!!e.__v_raw:!1}function pt(e){const t=e&&e.__v_raw;return t?pt(t):e}function Ff(e){return!vt(e,"__v_skip")&&Object.isExtensible(e)&&Yu(e,"__v_skip",!0),e}const pn=e=>ht(e)?tl(e):e,us=e=>ht(e)?Ci(e):e;function Yt(e){return e?e.__v_isRef===!0:!1}function P(e){return Vf(e,!1)}function Vf(e,t){return Yt(e)?e:new Bf(e,t)}class Bf{constructor(t,n){this.dep=new Zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:pt(t),this._value=n?t:pn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||fn(t)||jn(t);t=r?t:pt(t),Tn(t,n)&&(this._rawValue=t,this._value=r?t:pn(t),this.dep.trigger())}}function cn(e){return Yt(e)?e.value:e}const Uf={get:(e,t,n)=>t==="__v_raw"?e:cn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Yt(o)&&!Yt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function vc(e){return is(e)?e:new Proxy(e,Uf)}class qf{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ir-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&xt!==this)return tc(this,!0),!0}get value(){const t=this.dep.track();return rc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Hf(e,t,n=!1){let r,o;return st(e)?r=e:(r=e.get,o=e.set),new qf(r,o,n)}const So={},Vo=new WeakMap;let Ss;function Wf(e,t=!1,n=Ss){if(n){let r=Vo.get(n);r||Vo.set(n,r=[]),r.push(e)}}function zf(e,t,n=_t){const{immediate:r,deep:o,once:i,scheduler:c,augmentJob:f,call:v}=n,y=T=>o?T:fn(T)||o===!1||o===0?Vn(T,1):Vn(T);let h,w,C,O,B=!1,te=!1;if(Yt(e)?(w=()=>e.value,B=fn(e)):is(e)?(w=()=>y(e),B=!0):Ye(e)?(te=!0,B=e.some(T=>is(T)||fn(T)),w=()=>e.map(T=>{if(Yt(T))return T.value;if(is(T))return y(T);if(st(T))return v?v(T,2):T()})):st(e)?t?w=v?()=>v(e,2):e:w=()=>{if(C){Mn();try{C()}finally{In()}}const T=Ss;Ss=h;try{return v?v(e,3,[O]):e(O)}finally{Ss=T}}:w=An,t&&o){const T=w,U=o===!0?1/0:o;w=()=>Vn(T(),U)}const se=kf(),ae=()=>{h.stop(),se&&se.active&&Gi(se.effects,h)};if(i&&t){const T=t;t=(...U)=>{try{return T(...U)}finally{ae()}}}let re=te?new Array(e.length).fill(So):So;const V=T=>{if(!(!(h.flags&1)||!h.dirty&&!T))if(t){const U=h.run();if(T||o||B||(te?U.some((J,Y)=>Tn(J,re[Y])):Tn(U,re))){const J=Ss;Mn();try{C&&C(),Ss=h;const Y=[U,re===So?void 0:te&&re[0]===So?[]:re,O];re=U,v?v(t,3,Y):t(...Y)}finally{Ss=J,In()}}}else h.run()};return f&&f(V),h=new Zu(w),h.scheduler=c?()=>c(V,!1):V,O=T=>Wf(T,!1,h),C=h.onStop=()=>{const T=Vo.get(h);if(T){if(v)v(T,4);else for(const U of T)U();Vo.delete(h)}},t?r?V(!0):re=h.run():c?c(V.bind(null,!0),!0):h.run(),ae.pause=h.pause.bind(h),ae.resume=h.resume.bind(h),ae.stop=ae,ae}function Vn(e,t=1/0,n){if(t<=0||!ht(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Yt(e))Vn(e.value,t,n);else if(Ye(e))for(let r=0;r{Vn(r,t,n)});else if(zu(e)){for(const r in e)Vn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Vn(e[r],t,n)}return e}/** +* @vue/runtime-core v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Gr(e,t,n,r){try{return r?e(...r):e()}catch(o){va(o,t,n)}}function vn(e,t,n,r){if(st(e)){const o=Gr(e,t,n,r);return o&&Hu(o)&&o.catch(i=>{va(i,t,n)}),o}if(Ye(e)){const o=[];for(let i=0;i>>1,o=Zt[r],i=Dr(o);i=Dr(n)?Zt.push(e):Zt.splice(Yf(t),0,e),e.flags|=1,hc()}}function hc(){Bo||(Bo=mc.then(bc))}function Jf(e){if(!Ye(e))ss&&e.id===-1?ss.splice(Ys+1,0,e):e.flags&1||(Sn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Zt.splice(r,1),r=e?r-1:hn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function gc(e,t,n=0){if(Sn.length){let r=Sn,o=0;if(t){r=[];for(let c=0;cDr(c)-Dr(f));if(Sn.length=o,ss){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function bc(e){try{for(hn=0;hn{r._d&&zo(-1);const i=Uo(t),c=js.length;let f;try{f=e(...o)}finally{for(let v=js.length;v>c;v--)Gc();Uo(i),r._d&&zo(1)}return f};return r._n=!0,r._c=!0,r._d=!0,r}function Oe(e,t){if(dn===null)return e;const n=wa(dn),r=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&st(t)?t.call(r&&r.proxy):t}}const Zf=Symbol.for("v-scx"),ep=()=>Mo(Zf);function wt(e,t,n){return _c(e,t,n)}function _c(e,t,n=_t){const{immediate:r,deep:o,flush:i,once:c}=n,f=It({},n),v=t&&r||!t&&i!=="post";let y;if(Vr){if(i==="sync"){const O=ep();y=O.__watcherHandles||(O.__watcherHandles=[])}else if(!v){const O=()=>{};return O.stop=An,O.resume=An,O.pause=An,O}}const h=tn;f.call=(O,B,te)=>vn(O,h,B,te);let w=!1;i==="post"?f.scheduler=O=>{O.i=h,Qt(O,h&&h.suspense)}:i!=="sync"&&(w=!0,f.scheduler=(O,B)=>{B?O():rl(O)}),f.augmentJob=O=>{t&&(O.flags|=4),w&&(O.flags|=2,h&&(O.id=h.uid,O.i=h))};const C=zf(e,t,f);return Vr&&(y?y.push(C):v&&C()),C}function tp(e,t,n){const r=this.proxy,o=St(e)?e.includes(".")?kc(r,e):()=>r[e]:e.bind(r,r);let i;st(t)?i=t:(i=t.handler,n=t);const c=Yr(this),f=_c(o,i.bind(r),n);return c(),f}function kc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;oe.__isTeleport,Ts=e=>e&&(e.disabled||e.disabled===""),np=e=>e&&(e.defer||e.defer===""),ou=e=>typeof SVGElement<"u"&&e instanceof SVGElement,au=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,$i=(e,t)=>{const n=e&&e.to;return St(n)?t?t(n):null:n},sp={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,c,f,v,y){const{mc:h,pc:w,pbc:C,o:{insert:O,querySelector:B,createText:te,createComment:se,parentNode:ae}}=y,re=Ts(t.props);let{dynamicChildren:V}=t;const T=(Y,ne,$)=>{Y.shapeFlag&16&&h(Y.children,ne,$,o,i,c,f,v)},U=(Y=t)=>{const ne=Ts(Y.props),$=Y.target=$i(Y.props,B),R=Si($,Y,te,O);$&&(c!=="svg"&&ou($)?c="svg":c!=="mathml"&&au($)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add($),ne||(T(Y,$,R),kr(Y,!1)))},J=Y=>{const ne=()=>{if(ts.get(Y)===ne){if(ts.delete(Y),Ts(Y.props)){const $=ae(Y.el)||n;T(Y,$,Y.anchor),kr(Y,!0)}U(Y)}};ts.set(Y,ne),Qt(ne,i)};if(e==null){const Y=t.el=te(""),ne=t.anchor=te("");if(O(Y,n,r),O(ne,n,r),np(t.props)||i&&i.pendingBranch){J(t);return}re&&(T(t,n,ne),kr(t,!0)),U()}else{t.el=e.el;const Y=t.anchor=e.anchor,ne=ts.get(e);if(ne){ne.flags|=8,ts.delete(e),J(t);return}t.targetStart=e.targetStart;const $=t.target=e.target,R=t.targetAnchor=e.targetAnchor,F=Ts(e.props),ee=F?n:$,Ie=F?Y:R;if(c==="svg"||ou($)?c="svg":(c==="mathml"||au($))&&(c="mathml"),V?(C(e.dynamicChildren,V,ee,o,i,c,f),ll(e,t,!0)):v||w(e,t,ee,Ie,o,i,c,f,!1),re)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Eo(t,n,Y,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Pe=$i(t.props,B);Pe&&(t.target=Pe,Eo(t,Pe,null,y,0))}else F&&Eo(t,$,R,y,1);kr(t,re)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:y,targetAnchor:h,target:w,props:C}=e,O=Ts(C),B=i||!O,te=ts.get(e);if(te&&(te.flags|=8,ts.delete(e)),w&&(o(y),o(h)),i&&o(v),!te&&(O||w)&&c&16)for(let se=0;se{e.isMounted=!0}),Oc(()=>{e.isUnmounting=!0}),e}const ln=[Function,Array],$c={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ln,onEnter:ln,onAfterEnter:ln,onEnterCancelled:ln,onBeforeLeave:ln,onLeave:ln,onAfterLeave:ln,onLeaveCancelled:ln,onBeforeAppear:ln,onAppear:ln,onAfterAppear:ln,onAppearCancelled:ln},op={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=ul(),r=Cc();return()=>{const o=t.default&&ol(t.default(),!0),i=o&&o.length?Sc(o):n.subTree?we():void 0;if(!i)return;const c=pt(e),{mode:f}=c;if(r.isLeaving)return li(i);const v=qo(i);if(!v)return li(i);let y=Lr(v,c,r,n,w=>y=w);v.type!==Gt&&ds(v,y);let h=n.subTree&&qo(n.subTree);if(h&&h.type!==Gt&&!As(h,v)&&Kr(n.subTree)){let w=Lr(h,c,r,n);if(ds(h,w),f==="out-in"&&v.type!==Gt)return r.isLeaving=!0,w.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete w.afterLeave,h=void 0},li(i);f==="in-out"&&v.type!==Gt?w.delayLeave=(C,O,B)=>{const te=Ec(r,h);te[String(h.key)]=h,C[un]=()=>{O(),C[un]=void 0,delete y.delayedLeave,h=void 0},y.delayedLeave=()=>{B(),delete y.delayedLeave,h=void 0}}:h=void 0}else h&&(h=void 0);return i}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Gt){t=n;break}}return t}const ap=op;function Ec(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Lr(e,t,n,r,o){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:y,onAfterEnter:h,onEnterCancelled:w,onBeforeLeave:C,onLeave:O,onAfterLeave:B,onLeaveCancelled:te,onBeforeAppear:se,onAppear:ae,onAfterAppear:re,onAppearCancelled:V}=t,T=String(e.key),U=Ec(n,e),J=($,R)=>{$&&vn($,r,9,R)},Y=($,R)=>{const F=R[1];J($,R),Ye($)?$.every(ee=>ee.length<=1)&&F():$.length<=1&&F()},ne={mode:c,persisted:f,beforeEnter($){let R=v;if(!n.isMounted)if(i)R=se||v;else return;$[un]&&$[un](!0);const F=U[T];if(F&&As(e,F)){let ee=F.el[un];if(!ee){const Ie=Kr(F);ee=Ie&&Ie.el[un]}ee&&ee()}J(R,[$])},enter($){if(U[T]===e)return;let R=y,F=h,ee=w;if(!n.isMounted)if(i)R=ae||y,F=re||h,ee=V||w;else return;let Ie=!1;$[wr]=ke=>{Ie||(Ie=!0,ke?J(ee,[$]):J(F,[$]),ne.delayedLeave&&ne.delayedLeave(),$[wr]=void 0)};const Pe=$[wr].bind(null,!1);R?Y(R,[$,Pe]):Pe()},leave($,R){const F=String(e.key);if($[wr]&&$[wr](!0),n.isUnmounting)return R();J(C,[$]);let ee=!1;$[un]=Pe=>{ee||(ee=!0,R(),Pe?J(te,[$]):J(B,[$]),$[un]=void 0,U[F]===e&&delete U[F])};const Ie=$[un].bind(null,!1);U[F]=e,O?Y(O,[$,Ie]):Ie()},clone($){const R=Lr($,t,n,r,o);return o&&o(R),R}};return ne}function li(e){if(ha(e))return e=fs(e),e.children=null,e}function qo(e){if(!ha(e))return ma(e.type)&&e.children?Sc(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&&st(n.default))return n.default()}}function ds(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ds(ma(n.type)&&qo(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Ke&&Ye(e.children)){const n=Lc(e.children,!1);n&&ds(n,t)}}function ol(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;iTr(te,t&&(Ye(t)?t[se]:t),n,r,o));return}if(Ar(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Tr(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?wa(r.component):r.el,c=o?null:i,{i:f,r:v}=e,y=t&&t.r,h=f.refs===_t?f.refs={}:f.refs,w=f.setupState,C=pt(w),O=w===_t?qu:te=>iu(h,te)?!1:vt(C,te),B=(te,se)=>!(se&&iu(h,se));if(y!=null&&y!==v){if(lu(t),St(y))h[y]=null,O(y)&&(w[y]=null);else if(Yt(y)){const te=t;B(y,te.k)&&(y.value=null),te.k&&(h[te.k]=null)}}if(st(v))Gr(v,f,12,[c,h]);else{const te=St(v),se=Yt(v);if(te||se){const ae=()=>{if(e.f){const re=te?O(v)?w[v]:h[v]:B()||!e.k?v.value:h[e.k];if(o)Ye(re)&&Gi(re,i);else if(Ye(re))re.includes(i)||re.push(i);else if(te)h[v]=[i],O(v)&&(w[v]=h[v]);else{const V=[i];B(v,e.k)&&(v.value=V),e.k&&(h[e.k]=V)}}else te?(h[v]=c,O(v)&&(w[v]=c)):se&&(B(v,e.k)&&(v.value=c),e.k&&(h[e.k]=c))};if(c){const re=()=>{ae(),Ho.delete(e)};re.id=-1,Ho.set(e,re),Qt(re,n)}else lu(e),ae()}}}function lu(e){const t=Ho.get(e);t&&(t.flags|=8,Ho.delete(e))}fa().requestIdleCallback;fa().cancelIdleCallback;const Ar=e=>!!e.type.__asyncLoader,ha=e=>e.type.__isKeepAlive;function ip(e,t){Ac(e,"a",t)}function lp(e,t){Ac(e,"da",t)}function Ac(e,t,n=tn){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ya(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ha(o.parent.vnode)&&up(r,t,n,o),o=o.parent}}function up(e,t,n,r){const o=ya(t,e,r,!0);Wn(()=>{Gi(r[t],o)},n)}function ya(e,t,n=tn,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{Mn();const f=Yr(n),v=vn(t,n,e,c);return f(),In(),v});return r?o.unshift(i):o.push(i),i}}const Hn=e=>(t,n=tn)=>{(!Vr||e==="sp")&&ya(e,(...r)=>t(...r),n)},cp=Hn("bm"),an=Hn("m"),dp=Hn("bu"),Pc=Hn("u"),Oc=Hn("bum"),Wn=Hn("um"),fp=Hn("sp"),pp=Hn("rtg"),vp=Hn("rtc");function mp(e,t=tn){ya("ec",e,t)}const hp=Symbol.for("v-ndc");function at(e,t,n,r){let o;const i=n,c=Ye(e);if(c||St(e)){const f=c&&is(e);let v=!1,y=!1;f&&(v=!fn(e),y=jn(e),e=pa(e)),o=new Array(e.length);for(let h=0,w=e.length;ht(f,v,void 0,i));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,y=f.length;ve?Qc(e)?wa(e):Ei(e.parent):null,Pr=It(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=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ic(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=ir.bind(e.proxy)),$watch:e=>tp.bind(e)}),ui=(e,t)=>e!==_t&&!e.__isScriptSetup&&vt(e,t),yp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const C=c[t];if(C!==void 0)switch(C){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(ui(r,t))return c[t]=1,r[t];if(o!==_t&&vt(o,t))return c[t]=2,o[t];if(vt(i,t))return c[t]=3,i[t];if(n!==_t&&vt(n,t))return c[t]=4,n[t];Ti&&(c[t]=0)}}const y=Pr[t];let h,w;if(y)return t==="$attrs"&&zt(e.attrs,"get",""),y(e);if((h=f.__cssModules)&&(h=h[t]))return h;if(n!==_t&&vt(n,t))return c[t]=4,n[t];if(w=v.config.globalProperties,vt(w,t))return w[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return ui(o,t)?(o[t]=n,!0):r!==_t&&vt(r,t)?(r[t]=n,!0):vt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:c}},f){let v;return!!(n[f]||e!==_t&&f[0]!=="$"&&vt(e,f)||ui(t,f)||vt(i,f)||vt(r,f)||vt(Pr,f)||vt(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:vt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function uu(e){return Ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ti=!0;function gp(e){const t=Ic(e),n=e.proxy,r=e.ctx;Ti=!1,t.beforeCreate&&cu(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:c,watch:f,provide:v,inject:y,created:h,beforeMount:w,mounted:C,beforeUpdate:O,updated:B,activated:te,deactivated:se,beforeDestroy:ae,beforeUnmount:re,destroyed:V,unmounted:T,render:U,renderTracked:J,renderTriggered:Y,errorCaptured:ne,serverPrefetch:$,expose:R,inheritAttrs:F,components:ee,directives:Ie,filters:Pe}=t;if(y&&bp(y,r,null),c)for(const xe in c){const me=c[xe];st(me)&&(r[xe]=me.bind(n))}if(o){const xe=o.call(n,n);ht(xe)&&(e.data=tl(xe))}if(Ti=!0,i)for(const xe in i){const me=i[xe],_e=st(me)?me.bind(n,n):st(me.get)?me.get.bind(n,n):An,We=!st(me)&&st(me.set)?me.set.bind(n):An,Xe=it({get:_e,set:We});Object.defineProperty(r,xe,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Ae=>Xe.value=Ae})}if(f)for(const xe in f)Mc(f[xe],r,n,xe);if(v){const xe=st(v)?v.call(n):v;Reflect.ownKeys(xe).forEach(me=>{Qf(me,xe[me])})}h&&cu(h,e,"c");function Re(xe,me){Ye(me)?me.forEach(_e=>xe(_e.bind(n))):me&&xe(me.bind(n))}if(Re(cp,w),Re(an,C),Re(dp,O),Re(Pc,B),Re(ip,te),Re(lp,se),Re(mp,ne),Re(vp,J),Re(pp,Y),Re(Oc,re),Re(Wn,T),Re(fp,$),Ye(R))if(R.length){const xe=e.exposed||(e.exposed={});R.forEach(me=>{Object.defineProperty(xe,me,{get:()=>n[me],set:_e=>n[me]=_e,enumerable:!0})})}else e.exposed||(e.exposed={});U&&e.render===An&&(e.render=U),F!=null&&(e.inheritAttrs=F),ee&&(e.components=ee),Ie&&(e.directives=Ie),$&&Tc(e)}function bp(e,t,n=An){Ye(e)&&(e=Ai(e));for(const r in e){const o=e[r];let i;ht(o)?"default"in o?i=Mo(o.from||r,o.default,!0):i=Mo(o.from||r):i=Mo(o),Yt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function cu(e,t,n){vn(Ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mc(e,t,n,r){let o=r.includes(".")?kc(n,r):()=>n[r];if(St(e)){const i=t[e];st(i)&&wt(o,i)}else if(st(e))wt(o,e.bind(n));else if(ht(e))if(Ye(e))e.forEach(i=>Mc(i,t,n,r));else{const i=st(e.handler)?e.handler.bind(n):t[e.handler];st(i)&&wt(o,i,e)}}function Ic(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!o.length&&!n&&!r?v=t:(v={},o.length&&o.forEach(y=>Wo(v,y,c,!0)),Wo(v,t,c)),ht(t)&&i.set(t,v),v}function Wo(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Wo(e,i,n,!0),o&&o.forEach(c=>Wo(e,c,n,!0));for(const c in t)if(!(r&&c==="expose")){const f=wp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const wp={data:du,props:fu,emits:fu,methods:xr,computed:xr,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:xr,directives:xr,watch:kp,provide:du,inject:_p};function du(e,t){return t?e?function(){return It(st(e)?e.call(this,this):e,st(t)?t.call(this,this):t)}:t:e}function _p(e,t){return xr(Ai(e),Ai(t))}function Ai(e){if(Ye(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yn(t)}Modifiers`]||e[`${ps(t)}Modifiers`];function Sp(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||_t;let o=n;const i=t.startsWith("update:"),c=i&&$p(r,t.slice(7));c&&(c.trim&&(o=n.map(h=>St(h)?h.trim():h)),c.number&&(o=o.map(da)));let f,v=r[f=ni(t)]||r[f=ni(yn(t))];!v&&i&&(v=r[f=ni(ps(t))]),v&&vn(v,e,6,o);const y=r[f+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,vn(y,e,6,o)}}const Ep=new WeakMap;function Dc(e,t,n=!1){const r=n?Ep:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let c={},f=!1;if(!st(e)){const v=y=>{const h=Dc(y,t,!0);h&&(f=!0,It(c,h))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(ht(e)&&r.set(e,null),null):(Ye(i)?i.forEach(v=>c[v]=null):It(c,i),ht(e)&&r.set(e,c),c)}function ga(e,t){return!e||!la(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),vt(e,t[0].toLowerCase()+t.slice(1))||vt(e,ps(t))||vt(e,t))}function pu(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:c,attrs:f,emit:v,render:y,renderCache:h,props:w,data:C,setupState:O,ctx:B,inheritAttrs:te}=e,se=Uo(e);let ae,re;try{if(n.shapeFlag&4){const T=o||r,U=T;ae=En(y.call(U,T,h,w,O,C,B)),re=f}else{const T=t;ae=En(T.length>1?T(w,{attrs:f,slots:c,emit:v}):T(w,null)),re=t.props?f:Tp(f)}}catch(T){js.length=0,va(T,e,1),ae=Me(Gt)}let V=ae;if(re&&te!==!1){const T=Object.keys(re),{shapeFlag:U}=V;T.length&&U&7&&(i&&T.some(ua)&&(re=Ap(re,i)),V=fs(V,re,!1,!0))}if(n.dirs&&(V=fs(V,null,!1,!0),V.dirs=V.dirs?V.dirs.concat(n.dirs):n.dirs),n.transition){const T=ma(V.type)&&qo(V)||V;ds(T,n.transition)}return ae=V,Uo(se),ae}function Lc(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||la(n))&&((t||(t={}))[n]=e[n]);return t},Ap=(e,t)=>{const n={};for(const r in e)(!ua(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Pp(e,t,n){const{props:r,children:o,component:i}=e,{props:c,children:f,patchFlag:v}=t,y=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return r?vu(r,c,y):!!c;if(v&8){const h=t.dynamicProps;for(let w=0;wObject.create(Rc),Fc=e=>Object.getPrototypeOf(e)===Rc;function Mp(e,t,n,r=!1){const o={},i=Nc();e.propsDefaults=Object.create(null),Vc(e,t,o,i);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=r?o:Nf(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Ip(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,f=pt(o),[v]=e.propsOptions;let y=!1;if((r||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let w=0;w{v=!0;const[C,O]=Bc(w,t,!0);It(c,C),O&&f.push(...O)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!v)return ht(e)&&r.set(e,Os),Os;if(Ye(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",il=e=>Ye(e)?e.map(En):[En(e)],Dp=(e,t,n)=>{if(t._n)return t;const r=vs((...o)=>il(t(...o)),n);return r._c=!1,r},Uc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(al(o))continue;const i=e[o];if(st(i))t[o]=Dp(o,i,r);else if(i!=null){const c=il(i);t[o]=()=>c}}},qc=(e,t)=>{const n=il(t);e.slots.default=()=>n},Hc=(e,t,n)=>{for(const r in t)(n||!al(r))&&(e[r]=t[r])},Lp=(e,t,n)=>{const r=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(Hc(r,t,n),n&&Yu(r,"_",o,!0)):Uc(t,r)}else t&&qc(e,t)},Kp=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,c=_t;if(r.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:Hc(o,t,n):(i=!t.$stable,Uc(t,o)),c=t}else t&&(qc(e,t),c={default:1});if(i)for(const f in o)!al(f)&&c[f]==null&&delete o[f]},Qt=Bp;function Rp(e){return Np(e)}function Np(e,t){const n=fa();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:c,createText:f,createComment:v,setText:y,setElementText:h,parentNode:w,nextSibling:C,setScopeId:O=An,insertStaticContent:B}=e,te=(b,_,X,de=null,H=null,ie=null,Se=void 0,Ee=null,ge=!!_.dynamicChildren)=>{if(b===_)return;b&&!As(b,_)&&(de=fe(b),Ae(b,H,ie,!0),b=null),_.patchFlag===-2&&(ge=!1,_.dynamicChildren=null),_.dynamicChildren&&b&&b.dynamicChildren&&b.dynamicChildren.hasOnce&&(_.dynamicChildren===Os&&(_.dynamicChildren=[]),_.dynamicChildren.hasOnce=!0);const{type:ce,ref:le,shapeFlag:S}=_;switch(ce){case ba:se(b,_,X,de);break;case Gt:ae(b,_,X,de);break;case Io:b==null&&re(_,X,de,Se);break;case Ke:ee(b,_,X,de,H,ie,Se,Ee,ge);break;default:S&1?U(b,_,X,de,H,ie,Se,Ee,ge):S&6?Ie(b,_,X,de,H,ie,Se,Ee,ge):(S&64||S&128)&&ce.process(b,_,X,de,H,ie,Se,Ee,ge,rt)}le!=null&&H?Tr(le,b&&b.ref,ie,_||b,!_):le==null&&b&&b.ref!=null&&Tr(b.ref,null,ie,b,!0)},se=(b,_,X,de)=>{if(b==null)r(_.el=f(_.children),X,de);else{const H=_.el=b.el;_.children!==b.children&&y(H,_.children)}},ae=(b,_,X,de)=>{b==null?r(_.el=v(_.children||""),X,de):_.el=b.el},re=(b,_,X,de)=>{[b.el,b.anchor]=B(b.children,_,X,de,b.el,b.anchor)},V=({el:b,anchor:_},X,de)=>{let H;for(;b&&b!==_;)H=C(b),r(b,X,de),b=H;r(_,X,de)},T=({el:b,anchor:_})=>{let X;for(;b&&b!==_;)X=C(b),o(b),b=X;o(_)},U=(b,_,X,de,H,ie,Se,Ee,ge)=>{if(_.type==="svg"?Se="svg":_.type==="math"&&(Se="mathml"),b==null)J(_,X,de,H,ie,Se,Ee,ge);else{const ce=b.el&&b.el._isVueCE?b.el:null;try{ce&&ce._beginPatch(),$(b,_,H,ie,Se,Ee,ge)}finally{ce&&ce._endPatch()}}},J=(b,_,X,de,H,ie,Se,Ee)=>{let ge,ce;const{props:le,shapeFlag:S,transition:x,dirs:Z}=b;if(ge=b.el=c(b.type,ie,le&&le.is,le),S&8?h(ge,b.children):S&16&&ne(b.children,ge,null,de,H,ci(b,ie),Se,Ee),Z&&xs(b,null,de,"created"),Y(ge,b,b.scopeId,Se,de),le){for(const Ue in le)Ue!=="value"&&!$r(Ue)&&i(ge,Ue,null,le[Ue],ie,de);"value"in le&&i(ge,"value",null,le.value,ie),(ce=le.onVnodeBeforeMount)&&kn(ce,de,b)}Z&&xs(b,null,de,"beforeMount");const Te=Fp(H,x);Te&&x.beforeEnter(ge),r(ge,_,X),((ce=le&&le.onVnodeMounted)||Te||Z)&&Qt(()=>{try{ce&&kn(ce,de,b),Te&&x.enter(ge),Z&&xs(b,null,de,"mounted")}finally{}},H)},Y=(b,_,X,de,H)=>{if(X&&O(b,X),de)for(let ie=0;ie{for(let ce=ge;ce{const Ee=_.el=b.el;let{patchFlag:ge,dynamicChildren:ce,dirs:le}=_;ge|=b.patchFlag&16;const S=b.props||_t,x=_.props||_t;let Z;if(X&&Cs(X,!1),(Z=x.onVnodeBeforeUpdate)&&kn(Z,X,_,b),le&&xs(_,b,X,"beforeUpdate"),X&&Cs(X,!0),ce&&(!b.dynamicChildren||b.dynamicChildren.length!==ce.length)&&(ge=0,Se=!1,ce=null),(S.innerHTML&&x.innerHTML==null||S.textContent&&x.textContent==null)&&h(Ee,""),ce?R(b.dynamicChildren,ce,Ee,X,de,ci(_,H),ie):Se||me(b,_,Ee,null,X,de,ci(_,H),ie,!1),ge>0){if(ge&16)F(Ee,S,x,X,H);else if(ge&2&&S.class!==x.class&&i(Ee,"class",null,x.class,H),ge&4&&i(Ee,"style",S.style,x.style,H),ge&8){const Te=_.dynamicProps;for(let Ue=0;Ue{Z&&kn(Z,X,_,b),le&&xs(_,b,X,"updated")},de)},R=(b,_,X,de,H,ie,Se)=>{for(let Ee=0;Ee<_.length;Ee++){const ge=b[Ee],ce=_[Ee],le=ge.el||Oi(ge),S=le&&(ge.type===Ke||!As(ge,ce)||ge.shapeFlag&198)?w(le):X;te(ge,ce,S,null,de,H,ie,Se,!0)}},F=(b,_,X,de,H)=>{if(_!==X){if(_!==_t)for(const ie in _)!$r(ie)&&!(ie in X)&&i(b,ie,_[ie],null,H,de);for(const ie in X){if($r(ie))continue;const Se=X[ie],Ee=_[ie];Se!==Ee&&ie!=="value"&&i(b,ie,Ee,Se,H,de)}"value"in X&&i(b,"value",_.value,X.value,H)}},ee=(b,_,X,de,H,ie,Se,Ee,ge)=>{const ce=_.el=b?b.el:f(""),le=_.anchor=b?b.anchor:f("");let{patchFlag:S,dynamicChildren:x,slotScopeIds:Z}=_;Z&&(Ee=Ee?Ee.concat(Z):Z),b==null?(r(ce,X,de),r(le,X,de),ne(_.children||[],X,le,H,ie,Se,Ee,ge)):S>0&&S&64&&x&&b.dynamicChildren&&b.dynamicChildren.length===x.length?(R(b.dynamicChildren,x,X,H,ie,Se,Ee),(_.key!=null||H&&_===H.subTree)&&ll(b,_,!0)):me(b,_,X,le,H,ie,Se,Ee,ge)},Ie=(b,_,X,de,H,ie,Se,Ee,ge)=>{_.slotScopeIds=Ee,b==null?_.shapeFlag&512?H.ctx.activate(_,X,de,Se,ge):Pe(_,X,de,H,ie,Se,ge):ke(b,_,ge)},Pe=(b,_,X,de,H,ie,Se)=>{const Ee=b.component=Yp(b,de,H);if(ha(b)&&(Ee.ctx.renderer=rt),Jp(Ee,!1,Se),Ee.asyncDep){if(H&&H.registerDep(Ee,Re,Se,ie),!b.el){const ge=Ee.subTree=Me(Gt);ae(null,ge,_,X),b.placeholder=ge.el}}else Re(Ee,b,_,X,H,ie,Se)},ke=(b,_,X)=>{const de=_.component=b.component;if(Pp(b,_,X))if(de.asyncDep&&!de.asyncResolved){_.el=b.el,_.placeholder=b.placeholder,xe(de,_,X);return}else de.next=_,de.update();else _.el=b.el,_.placeholder=b.placeholder,de.vnode=_},Re=(b,_,X,de,H,ie,Se)=>{const Ee=()=>{if(b.isMounted){let{next:S,bu:x,u:Z,parent:Te,vnode:Ue}=b;{const Kt=Wc(b);if(Kt){S&&(S.el=Ue.el,xe(b,S,Se)),Kt.asyncDep.then(()=>{Qt(()=>{b.isUnmounted||ce()},H)});return}}let Je=S,ct;Cs(b,!1),S?(S.el=Ue.el,xe(b,S,Se)):S=Ue,x&&Oo(x),(ct=S.props&&S.props.onVnodeBeforeUpdate)&&kn(ct,Te,S,Ue),Cs(b,!0);const Ge=pu(b),Lt=b.subTree;b.subTree=Ge,te(Lt,Ge,w(Lt.el),fe(Lt),b,H,ie),S.el=Ge.el,Je===null&&Op(b,Ge.el),Z&&Qt(Z,H),(ct=S.props&&S.props.onVnodeUpdated)&&Qt(()=>kn(ct,Te,S,Ue),H)}else{let S;const{el:x,props:Z}=_,{bm:Te,m:Ue,parent:Je,root:ct,type:Ge}=b,Lt=Ar(_);Cs(b,!1),Te&&Oo(Te),!Lt&&(S=Z&&Z.onVnodeBeforeMount)&&kn(S,Je,_),Cs(b,!0);{ct.ce&&ct.ce._hasShadowRoot()&&ct.ce._injectChildStyle(Ge,b.parent?b.parent.type:void 0);const Kt=b.subTree=pu(b);te(null,Kt,X,de,b,H,ie),_.el=Kt.el}if(Ue&&Qt(Ue,H),!Lt&&(S=Z&&Z.onVnodeMounted)){const Kt=_;Qt(()=>kn(S,Je,Kt),H)}(_.shapeFlag&256||Je&&Ar(Je.vnode)&&Je.vnode.shapeFlag&256)&&b.a&&Qt(b.a,H),b.isMounted=!0,_=X=de=null}};b.scope.on();const ge=b.effect=new Zu(Ee);b.scope.off();const ce=b.update=ge.run.bind(ge),le=b.job=ge.runIfDirty.bind(ge);le.i=b,le.id=b.uid,ge.scheduler=()=>rl(le),Cs(b,!0),ce()},xe=(b,_,X)=>{_.component=b;const de=b.vnode.props;b.vnode=_,b.next=null,Ip(b,_.props,de,X),Kp(b,_.children,X),Mn(),yc(b),In()},me=(b,_,X,de,H,ie,Se,Ee,ge=!1)=>{const ce=b&&b.children,le=b?b.shapeFlag:0,S=_.children,{patchFlag:x,shapeFlag:Z}=_;if(x>0){if(x&128){We(ce,S,X,de,H,ie,Se,Ee,ge);return}else if(x&256){_e(ce,S,X,de,H,ie,Se,Ee,ge);return}}Z&8?(le&16&&je(ce,H,ie),S!==ce&&h(X,S)):le&16?Z&16?We(ce,S,X,de,H,ie,Se,Ee,ge):je(ce,H,ie,!0):(le&8&&h(X,""),Z&16&&ne(S,X,de,H,ie,Se,Ee,ge))},_e=(b,_,X,de,H,ie,Se,Ee,ge)=>{b=b||Os,_=_||Os;const ce=b.length,le=_.length,S=Math.min(ce,le);let x;for(x=0;xle?je(b,H,ie,!0,!1,S):ne(_,X,de,H,ie,Se,Ee,ge,S)},We=(b,_,X,de,H,ie,Se,Ee,ge)=>{let ce=0;const le=_.length;let S=b.length-1,x=le-1;for(;ce<=S&&ce<=x;){const Z=b[ce],Te=_[ce]=ge?Nn(_[ce]):En(_[ce]);if(As(Z,Te))te(Z,Te,X,null,H,ie,Se,Ee,ge);else break;ce++}for(;ce<=S&&ce<=x;){const Z=b[S],Te=_[x]=ge?Nn(_[x]):En(_[x]);if(As(Z,Te))te(Z,Te,X,null,H,ie,Se,Ee,ge);else break;S--,x--}if(ce>S){if(ce<=x){const Z=x+1,Te=Zx)for(;ce<=S;)Ae(b[ce],H,ie,!0),ce++;else{const Z=ce,Te=ce,Ue=new Map;for(ce=Te;ce<=x;ce++){const Vt=_[ce]=ge?Nn(_[ce]):En(_[ce]);Vt.key!=null&&Ue.set(Vt.key,ce)}let Je,ct=0;const Ge=x-Te+1;let Lt=!1,Kt=0;const gt=new Array(Ge);for(ce=0;ce=Ge){Ae(Vt,H,ie,!0);continue}let jt;if(Vt.key!=null)jt=Ue.get(Vt.key);else for(Je=Te;Je<=x;Je++)if(gt[Je-Te]===0&&As(Vt,_[Je])){jt=Je;break}jt===void 0?Ae(Vt,H,ie,!0):(gt[jt-Te]=ce+1,jt>=Kt?Kt=jt:Lt=!0,te(Vt,_[jt],X,null,H,ie,Se,Ee,ge),ct++)}const ms=Lt?Vp(gt):Os;for(Je=ms.length-1,ce=Ge-1;ce>=0;ce--){const Vt=Te+ce,jt=_[Vt],ze=_[Vt+1],zn=Vt+1{const{el:ie,type:Se,transition:Ee,children:ge,shapeFlag:ce}=b;if(ce&6){Xe(b.component.subTree,_,X,de);return}if(ce&128){b.suspense.move(_,X,de);return}if(ce&64){Se.move(b,_,X,rt);return}if(Se===Ke){r(ie,_,X);for(let S=0;SEe.enter(ie),H));else{const{leave:S,delayLeave:x,afterLeave:Z}=Ee,Te=()=>{b.ctx.isUnmounted?o(ie):r(ie,_,X)},Ue=()=>{const Je=ie._isLeaving||!!ie[un];ie._isLeaving&&ie[un](!0),Ee.persisted&&!Je?Te():S(ie,()=>{Te(),Z&&Z()})};x?x(ie,Te,Ue):Ue()}else r(ie,_,X)},Ae=(b,_,X,de=!1,H=!1)=>{const{type:ie,props:Se,ref:Ee,children:ge,dynamicChildren:ce,shapeFlag:le,patchFlag:S,dirs:x,cacheIndex:Z,memo:Te}=b;if((S===-2||ce&&ce.hasOnce)&&(H=!1),Ee!=null&&(Mn(),Tr(Ee,null,X,b,!0),In()),Z!=null&&(!b.ctx||b.ctx===_)&&(_.renderCache[Z]=void 0),le&256){_.ctx.deactivate(b);return}const Ue=le&1&&x,Je=!Ar(b);let ct;if(Je&&(ct=Se&&Se.onVnodeBeforeUnmount)&&kn(ct,_,b),le&6)dt(b.component,X,de);else{if(le&128){b.suspense.unmount(X,de);return}Ue&&xs(b,null,_,"beforeUnmount"),le&64?b.type.remove(b,_,X,rt,de):ce&&!ce.hasOnce&&(ie!==Ke||S>0&&S&64)?je(ce,_,X,!1,!0):(ie===Ke&&S&384||!H&&le&16)&&je(ge,_,X),de&&pe(b)}const Ge=Te!=null&&Z==null;(Je&&(ct=Se&&Se.onVnodeUnmounted)||Ue||Ge)&&Qt(()=>{ct&&kn(ct,_,b),Ue&&xs(b,null,_,"unmounted"),Ge&&(b.el=null)},X)},pe=b=>{const{type:_,el:X,anchor:de,transition:H}=b,ie=_===Ke;if(ie&&!H){Ne(X,de);return}if(_===Io){T(b),H&&!H.persisted&&H.afterLeave&&H.afterLeave();return}const Se=ie?Kr(b):b,Ee=()=>{ie?w(X)&&Ne(X,de):o(X),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(Se&&Se.shapeFlag&1&&H&&!H.persisted){const{leave:ge,delayLeave:ce}=H,le=Se.el,S=()=>ge(le,Ee);ce?ce(le,Ee,S):S()}else Ee()},Ne=(b,_)=>{let X;for(;b!==_;)X=C(b),o(b),b=X;o(_)},dt=(b,_,X)=>{const{bum:de,scope:H,job:ie,subTree:Se,um:Ee,m:ge,a:ce}=b;hu(ge),hu(ce),de&&Oo(de),H.stop(),ie?(ie.flags|=8,Ae(Se,b,_,X)):b.vnode.el&&Se&&(Se.transition=b.vnode.transition,Ae(Se,b,_,X)),Ee&&Qt(Ee,_),Qt(()=>{b.isUnmounted=!0},_)},je=(b,_,X,de=!1,H=!1,ie=0)=>{for(let Se=ie;Se{if(b.shapeFlag&6)return fe(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const _=C(b.anchor||b.el),X=_&&_[xc];return X?C(X):_},De=(b,_,X)=>{const de=b&&_._vnode?void 0:b&&b.component?b.component.uid:Gp();Xf(()=>{b==null?_._vnode&&Ae(_._vnode,null,null,!0):te(_._vnode||null,b,_,null,null,null,X),_._vnode=b},de)},rt={p:te,um:Ae,m:Xe,r:pe,mt:Pe,mc:ne,pc:me,pbc:R,n:fe,o:e};return{render:De,hydrate:void 0,createApp:Cp(De)}}function ci({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 Cs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ll(e,t,n=!1){const r=e.children,o=t.children;if(Ye(r)&&Ye(o))for(let i=0;i>1,e[n[f]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function Wc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Wc(t)}function hu(e){if(e)for(let t=0;te.__isSuspense;function Bp(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):Jf(e)}const Ke=Symbol.for("v-fgt"),ba=Symbol.for("v-txt"),Gt=Symbol.for("v-cmt"),Io=Symbol.for("v-stc"),js=[];let rn=null;function E(e=!1){js.push(rn=e?null:[])}function Gc(){js.pop(),rn=js[js.length-1]||null}let Rr=1;function zo(e,t=!1){Rr+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Yc(e){return e.dynamicChildren=Rr>0?rn||Os:null,Gc(),Rr>0&&rn&&rn.push(e),e}function A(e,t,n,r,o,i){return Yc(l(e,t,n,r,o,i,!0))}function At(e,t,n,r,o){return Yc(Me(e,t,n,r,o,!0))}function Nr(e){return e?e.__v_isVNode===!0:!1}function As(e,t){return e.type===t.type&&e.key===t.key}const Jc=({key:e})=>e??null,jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||Yt(e)||st(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,r=0,o=null,i=e===Ke?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jc(t),ref:t&&jo(t),scopeId:wc,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:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:dn};return f?(Go(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=St(n)?8:16),Rr>0&&!c&&rn&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&rn.push(v),v}const Me=Up;function Up(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===hp)&&(e=Gt),Nr(e)){const f=fs(e,t,!0);return n&&Go(f,n),Rr>0&&!i&&rn&&(f.shapeFlag&6?rn[rn.indexOf(e)]=f:rn.push(f)),f.patchFlag=-2,f}if(ev(e)&&(e=e.__vccOpts),t){t=qp(t);let{class:f,style:v}=t;f&&!St(f)&&(t.class=tt(f)),ht(v)&&(sl(v)&&!Ye(v)&&(v=It({},v)),t.style=as(v))}const c=St(e)?1:zc(e)?128:ma(e)?64:ht(e)?4:st(e)?2:0;return l(e,t,n,r,o,c,i,!0)}function qp(e){return e?sl(e)||Fc(e)?It({},e):e:null}function fs(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:c,children:f,transition:v}=e,y=t?Wp(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Jc(y),ref:t&&t.ref?n&&i?Ye(i)?i.concat(jo(t)):[i,jo(t)]:jo(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ke?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fs(e.ssContent),ssFallback:e.ssFallback&&fs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&r&&ds(h,v.clone(h)),h}function Pt(e=" ",t=0){return Me(ba,null,e,t)}function Hp(e,t){const n=Me(Io,null,e);return n.staticCount=t,n}function we(e="",t=!1){return t?(E(),At(Gt,null,e)):Me(Gt,null,e)}function En(e){return e==null||typeof e=="boolean"?Me(Gt):Ye(e)?Me(Ke,null,e.slice()):Nr(e)?Nn(e):Me(ba,null,String(e))}function Nn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fs(e)}function Go(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Go(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Fc(t)?t._ctx=dn:o===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(st(t)){if(r&65){Go(e,{default:t});return}t={default:t,_ctx:dn},n=32}else t=String(t),r&64?(n=16,t=[Pt(t)]):n=8;e.children=t,e.shapeFlag|=n}function Wp(...e){const t={};for(let n=0;ntn||dn;let Yo,Fr;{const e=fa(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(c=>c(i)):o[0](i)}};Yo=t("__VUE_INSTANCE_SETTERS__",n=>tn=n),Fr=t("__VUE_SSR_SETTERS__",n=>Vr=n)}const Yr=e=>{const t=tn;return Yo(e),e.scope.on(),()=>{e.scope.off(),Yo(t)}},yu=()=>{tn&&tn.scope.off(),Yo(null)};function Qc(e){return e.vnode.shapeFlag&4}let Vr=!1;function Jp(e,t=!1,n=!1){t&&Fr(t);const{props:r,children:o}=e.vnode,i=Qc(e);Mp(e,r,i,t),Lp(e,o,n||t);const c=i?Xp(e,t):void 0;return t&&Fr(!1),c}function Xp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yp);const{setup:r}=n;if(r){Mn();const o=e.setupContext=r.length>1?Zp(e):null,i=Yr(e),c=Gr(r,e,0,[e.props,o]),f=Hu(c);if(In(),i(),(f||e.sp)&&!Ar(e)&&Tc(e),f){if(c.then(yu,yu),t)return c.then(v=>{Fr(!0);try{gu(e,v,t)}finally{Fr(!1)}}).catch(v=>{va(v,e,0)});e.asyncDep=c}else gu(e,c)}else Zc(e)}function gu(e,t,n){st(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ht(t)&&(e.setupState=vc(t)),Zc(e)}function Zc(e,t,n){const r=e.type;e.render||(e.render=r.render||An);{const o=Yr(e);Mn();try{gp(e)}finally{In(),o()}}}const Qp={get(e,t){return zt(e,"get",""),e[t]}};function Zp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Qp),slots:e.slots,emit:e.emit,expose:t}}function wa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Ff(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Pr)return Pr[n](e)},has(t,n){return n in t||n in Pr}})):e.proxy}function ev(e){return st(e)&&"__vccOpts"in e}const it=(e,t)=>Hf(e,t,Vr);function tv(e,t,n){try{zo(-1);const r=arguments.length;return r===2?ht(t)&&!Ye(t)?Nr(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Nr(n)&&(n=[n]),Me(e,t,n))}finally{zo(1)}}const nv="3.5.44";/** +* @vue/runtime-dom v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Mi;const bu=typeof window<"u"&&window.trustedTypes;if(bu)try{Mi=bu.createPolicy("vue",{createHTML:e=>e})}catch{}const ed=Mi?e=>Mi.createHTML(e):e=>e,sv="http://www.w3.org/2000/svg",rv="http://www.w3.org/1998/Math/MathML",Rn=typeof document<"u"?document:null,wu=Rn&&Rn.createElement("template"),ov={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Rn.createElementNS(sv,e):t==="mathml"?Rn.createElementNS(rv,e):n?Rn.createElement(e,{is:n}):Rn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Rn.createTextNode(e),createComment:e=>Rn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const c=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{wu.innerHTML=ed(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const f=wu.content;if(r==="svg"||r==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},es="transition",_r="animation",sr=Symbol("_vtc"),td={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nd=It({},$c,td),av=e=>(e.displayName="Transition",e.props=nd,e),lr=av((e,{slots:t})=>tv(ap,sd(e),t)),$s=(e,t=[])=>{Ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},_u=e=>e?Ye(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const ee in e)ee in td||(t[ee]=e[ee]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:y=c,appearToClass:h=f,leaveFromClass:w=`${n}-leave-from`,leaveActiveClass:C=`${n}-leave-active`,leaveToClass:O=`${n}-leave-to`}=e,B=iv(o),te=B&&B[0],se=B&&B[1],{onBeforeEnter:ae,onEnter:re,onEnterCancelled:V,onLeave:T,onLeaveCancelled:U,onBeforeAppear:J=ae,onAppear:Y=re,onAppearCancelled:ne=V}=t,$=(ee,Ie,Pe,ke)=>{ee._enterCancelled=ke,ns(ee,Ie?h:f),ns(ee,Ie?y:c),Pe&&Pe()},R=(ee,Ie)=>{ee._isLeaving=!1,ns(ee,w),ns(ee,O),ns(ee,C),Ie&&Ie()},F=ee=>(Ie,Pe)=>{const ke=ee?Y:re,Re=()=>$(Ie,ee,Pe);$s(ke,[Ie,Re]),ku(()=>{ns(Ie,ee?v:i),xn(Ie,ee?h:f),_u(ke)||xu(Ie,r,te,Re)})};return It(t,{onBeforeEnter(ee){$s(ae,[ee]),xn(ee,i),xn(ee,c)},onBeforeAppear(ee){$s(J,[ee]),xn(ee,v),xn(ee,y)},onEnter:F(!1),onAppear:F(!0),onLeave(ee,Ie){ee._isLeaving=!0;const Pe=()=>R(ee,Ie);xn(ee,w),ee._enterCancelled?(xn(ee,C),Ii(ee)):(Ii(ee),xn(ee,C)),ku(()=>{ee._isLeaving&&(ns(ee,w),xn(ee,O),_u(T)||xu(ee,r,se,Pe))}),$s(T,[ee,Pe])},onEnterCancelled(ee){$(ee,!1,void 0,!0),$s(V,[ee])},onAppearCancelled(ee){$(ee,!0,void 0,!0),$s(ne,[ee])},onLeaveCancelled(ee){R(ee),$s(U,[ee])}})}function iv(e){if(e==null)return null;if(ht(e))return[di(e.enter),di(e.leave)];{const t=di(e);return[t,t]}}function di(e){return df(e)}function xn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[sr]||(e[sr]=new Set)).add(t)}function ns(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[sr];n&&(n.delete(t),n.size||(e[sr]=void 0))}function ku(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lv=0;function xu(e,t,n,r){const o=e._endId=++lv,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=rd(e,t);if(!c)return r();const y=c+"end";let h=0;const w=()=>{e.removeEventListener(y,C),i()},C=O=>{O.target===e&&++h>=v&&w()};setTimeout(()=>{h(n[B]||"").split(", "),o=r(`${es}Delay`),i=r(`${es}Duration`),c=Cu(o,i),f=r(`${_r}Delay`),v=r(`${_r}Duration`),y=Cu(f,v);let h=null,w=0,C=0;t===es?c>0&&(h=es,w=c,C=i.length):t===_r?y>0&&(h=_r,w=y,C=v.length):(w=Math.max(c,y),h=w>0?c>y?es:_r:null,C=h?h===es?i.length:v.length:0);const O=h===es&&/\b(?:transform|all)(?:,|$)/.test(r(`${es}Property`).toString());return{type:h,timeout:w,propCount:C,hasTransform:O}}function Cu(e,t){for(;e.length$u(n)+$u(e[r])))}function $u(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ii(e){return(e?e.ownerDocument:document).body.offsetHeight}function uv(e,t,n){const r=e[sr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Su=Symbol("_vod"),od=Symbol("_vsh"),cv=Symbol(""),dv=/(?:^|;)\s*display\s*:/;function fv(e,t,n){const r=e.style,o=St(n);let i=!1;if(n&&!o){if(t)if(St(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&Cr(r,f,"")}else for(const c in t)n[c]==null&&Cr(r,c,"");for(const c in n){c==="display"&&(i=!0);const f=n[c];f!=null?vv(e,c,!St(t)&&t?t[c]:void 0,f)||Cr(r,c,f):Cr(r,c,"")}}else if(o){if(t!==n){const c=r[cv];c&&(n+=";"+c),r.cssText=n,i=dv.test(n)}}else t&&e.removeAttribute("style");Su in e&&((!o||t!==n)&&(e[Su]=i?r.display:""),e[od]&&(r.display="none"))}const To=/\s*!important$/;function Cr(e,t,n){if(Ye(n))n.forEach(r=>Cr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))To.test(n)?e.setProperty(t,n.replace(To,""),"important"):e.setProperty(t,n);else{const r=pv(e,t);To.test(n)?e.setProperty(ps(r),n.replace(To,""),"important"):e[r]=n}}const Eu=["Webkit","Moz","ms"],fi={};function pv(e,t){const n=fi[t];if(n)return n;let r=yn(t);if(r!=="filter"&&r in e)return fi[t]=r;r=Gu(r);for(let o=0;opi||(wv.then(()=>pi=0),pi=Date.now());function kv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const o=n.value;if(Ye(o)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const c=o.slice(),f=[r];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,r,o,i)=>{const c=o==="svg";t==="class"?uv(e,r,c):t==="style"?fv(e,n,r):la(t)?ua(t)||hv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cv(e,t,r,c))?(Pu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Au(e,t,r,c,i,t!=="value")):e._isVueCE&&($v(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!St(r)))?Pu(e,yn(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Au(e,t,r,c))};function Cv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mu(t)&&st(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 Mu(t)&&St(n)?!1:t in e}function $v(e,t){const n=e._def.props;if(!n)return!1;const r=yn(t);return Array.isArray(n)?n.some(o=>yn(o)===r):Object.keys(n).some(o=>yn(o)===r)}const ad=new WeakMap,id=new WeakMap,Jo=Symbol("_moveCb"),Iu=Symbol("_enterCb"),ji=new WeakMap,Sv=e=>(delete e.props.mode,e),Ev=Sv({name:"TransitionGroup",props:It({},nd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ul(),r=Cc();let o,i,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Dv(o[0].el,n.vnode.el,ju(e))),f);return Pc(()=>{if(ji.delete(n),!v()){o=[],c=void 0;return}const y=ju(e);o.forEach(Av);const h=c&&jv(c,n.vnode.el);c=void 0,o.forEach(C=>Pv(C,h));const w=o.filter(Ov);Ii(n.vnode.el),w.forEach(C=>{const O=C.el,B=O.style;xn(O,y),B.transform=B.webkitTransform=B.transitionDuration="";const te=O[Jo]=se=>{se&&se.target!==O||(!se||se.propertyName.endsWith("transform"))&&(O.removeEventListener("transitionend",te),O[Jo]=null,ns(O,y))};O.addEventListener("transitionend",te)}),o=[]}),()=>{const y=pt(e),h=sd(y);let w=y.tag||Ke;if(o=[],f=void 0,i)for(let C=0;Cr.willMove()&&r.item.contains(t));return n&&_a(n.item,n)}function Dv(e,t,n){const r=e.cloneNode(),o=e[sr];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&r.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&r.classList.add(f)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:c}=rd(r);return i.removeChild(r),c}const Xo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>Oo(t,n):t};function Lv(e){e.target.composing=!0}function Du(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ms=Symbol("_assign"),Ao=Symbol("_initialValue");function vi(e,t,n){return t&&(e=e.trim()),n&&(e=da(e)),e}const Fe={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e.parentNode&&(e.type==="text"?e[Ao]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Ao]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Ms]=Xo(o);const i=r||o.props&&o.props.type==="number";Ps(e,t?"change":"input",c=>{c.target.composing||e[Ms](vi(e.value,n,i))}),(n||i)&&Ps(e,"change",()=>{e.value=vi(e.value,n,i)}),t||(Ps(e,"compositionstart",Lv),Ps(e,"compositionend",Du),Ps(e,"change",Du))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const o=t??"",i=e[Ao];delete e[Ao],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Ms](vi(e.value,n,r)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},c){if(e[Ms]=Xo(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?da(e.value):e.value,v=t??"";if(f===v)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===v)||(e.value=v)}},Pn={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Ps(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?da(Qo(v)):Qo(v)),i=e.multiple,c=i?Ds(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[i,i?Ye(c)?o.slice():o:c];try{e[Ms](c)}finally{ir(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Ms]=Xo(r)},mounted(e,{value:t}){Lu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ms]=Xo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Kv(t,n[1],n[0]))&&Lu(e,t)}};function Kv(e,t,n){if(!n||Ye(e))return ls(e,t);if(Ds(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function Lu(e,t){const n=e.multiple,r=Ye(t);if(!(n&&!r&&!Ds(t))){for(let o=0,i=e.options.length;oString(y)===String(f)):c.selected=wf(t,f)>-1}else c.selected=t.has(f);else if(ls(Qo(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qo(e){return"_value"in e?e._value:e.value}const Rv=["ctrl","shift","alt","meta"],Nv={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)=>Rv.some(n=>e[`${n}Key`]&&!t.includes(n))},en=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=ps(o.key);if(t.some(c=>c===i||Fv[c]===i))return e(o)})},Vv=It({patchProp:xv},ov);let Ku;function Bv(){return Ku||(Ku=Rp(Vv))}const Uv=(...e)=>{const t=Bv().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Hv(r);if(!o)return;const i=t._component;!st(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,qv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function qv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hv(e){return St(e)?document.querySelector(e):e}function Tt(e){return''+e+""}const Wv={calendar:Tt(''),clock:Tt(''),"check-circle":Tt(''),edit:Tt(''),tag:Tt(''),star:Tt(''),close:Tt(''),flag:Tt(''),chart:Tt(''),export:Tt(''),"chevron-left":Tt(''),"chevron-right":Tt(''),"chevron-down":Tt(''),plus:Tt(''),search:Tt(''),settings:Tt(''),memo:Tt(''),lock:Tt(''),wallet:Tt(''),more:Tt(''),shield:Tt(''),plan:Tt('')},zv=["innerHTML"],et=Ft({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=it(()=>Wv[t.name]||"");return(r,o)=>(E(),A("span",{class:"icon",style:as({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,zv))}}),Gv=["aria-label"],Yv={class:"dialog-title"},Jv={class:"dialog-msg"},Xv={class:"dialog-btns"},Qv=Ft({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,r=t;function o(i){n.open&&i.key==="Escape"&&r("cancel")}return wt(()=>n.open,i=>{i?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Wn(()=>window.removeEventListener("keydown",o)),(i,c)=>(E(),At(cs,{to:"body"},[Me(lr,{name:"modal"},{default:vs(()=>[e.open?(E(),A("div",{key:0,class:"mask",onClick:c[2]||(c[2]=en(f=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Yv,z(e.title),1),l("div",Jv,z(e.message),1),l("div",Xv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>r("cancel"))},z(e.cancelText),1),l("button",{class:tt(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>r("confirm"))},z(e.confirmText),3)])],8,Gv)])):we("",!0)]),_:1})]))}}),Ut=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},qn=Ut(Qv,[["__scopeId","data-v-f27041d4"]]);var Ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}};(function(e,t){((n,r)=>{e.exports=r()})(Ru,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(s,a)},r=function(){return(r=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||i.Promise||(i.Promise=Promise);var y=Object.getPrototypeOf,h={}.hasOwnProperty;function w(s,a){return h.call(s,a)}function C(s,a){typeof a=="function"&&(a=a(y(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){B(s,u,a[u])})}var O=Object.defineProperty;function B(s,a,u,d){O(s,a,v(u&&w(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function te(s){return{from:function(a){return s.prototype=Object.create(a.prototype),B(s.prototype,"constructor",s),{extend:C.bind(null,s.prototype)}}}}var se=Object.getOwnPropertyDescriptor,ae=[].slice;function re(s,a,u){return ae.call(s,a,u)}function V(s,a){return a(s)}function T(s){if(!s)throw new Error("Assertion Failed")}function U(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function J(s,a){if(typeof a=="string"&&w(s,a))return s[a];if(!a)return s;if(typeof a!="string"){for(var u=[],d=0,p=a.length;d"u"?[]:(Ue=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Te=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Te),Ue]:[Ue,y(Ue),Ue]),Ue=Te[0],Ws=Te[1],Ws=Ws&&Ws.then,Je=Ue&&Ue.constructor,ct=!!Te[2],Ge=function(s,a){zn.push([s,a]),Kt&&(queueMicrotask(Ld),Kt=!1)},Lt=!0,Kt=!0,gt=[],ms=[],Vt=X,jt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:_,pgp:!1,env:{},finalize:_},ze=jt,zn=[],hs=0,Qr=[];function Le(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=ze;if(typeof s!="function"){if(s!==x)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Sa(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(m){if(d._state===null){if(m===d)throw new TypeError("A promise cannot be resolved with itself.");var g=d._lib&&Fs();m&&typeof m.then=="function"?u(d,function(k,I){m instanceof Le?m._then(k,I):m.then(k,I)}):(d._state=!0,d._value=m,wl(d)),g&&Vs()}},Sa.bind(null,d))}catch(m){Sa(d,m)}}(this,s)}var $a={get:function(){var s=ze,a=no;function u(d,p){var m=this,g=!s.global&&(s!==ze||a!==no),k=g&&!Yn(),I=new Le(function(W,D){Ea(m,new bl(kl(d,s,g,k),kl(p,s,g,k),W,D,s))});return this._consoleTask&&(I._consoleTask=this._consoleTask),I}return u.prototype=x,u},set:function(s){B(this,"then",s&&s.prototype===x?$a:{get:function(){return s},set:$a.set})}};function bl(s,a,u,d,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=p}function Sa(s,a){var u,d;ms.push(a),s._state===null&&(u=s._lib&&Fs(),a=Vt(a),s._state=!1,s._value=a,d=s,gt.some(function(p){return p._value===d._value})||gt.push(d),wl(s),u)&&Vs()}function wl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var g=gt.length;g;)if(gt[--g]._value===m._value)return gt.splice(g,1)})(a),u.resolve(d)}catch(m){u.reject(m)}finally{--hs==0&&Ta(),--u.psd.ref||u.psd.finalize()}}function Ld(){ys(jt,function(){Fs()&&Vs()})}function Fs(){var s=Lt;return Kt=Lt=!1,s}function Vs(){var s,a,u;do for(;0.",xl="String expected.",ro="__dbnames",Pa="readonly",Oa="readwrite";function bs(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var Cl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function oo(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Ie(a))[s],a}}function $l(){throw Ve.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function ut(s,a){try{var u=Sl(s),d=Sl(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=D,I=g;if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function W(){this.constructor=k}function D(){return g!==null&&g.apply(this,arguments)||this}return n(k,I),k.prototype=I===null?Object.create(I):(W.prototype=I.prototype,new W),Object.defineProperty(D.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),D.prototype.table=function(){return u},D})(s)),new Set),p=s.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(g){return d.add(g)});function m(g){if(!g)return g;var k,I=Object.create(s.prototype);for(k in g)if(!d.has(k))try{I[k]=g[k]}catch{}return I}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=m,this.hook("reading",m),s},kt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},kt.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,g=s;return m&&p&&(g=oo(m)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"add",keys:a!=null?[a]:null,values:[g]})}).then(function(k){return k.numFailures?Le.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{Y(s,m,k)}catch{}return k})},kt.prototype.upsert=function(s,a){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return u.core.get({trans:p,key:s}).then(function(m){var g=m??{};return Al(g,a),d&&Y(g,d,s),u.core.mutate({trans:p,type:"put",values:[g],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(k){return k.numFailures?Le.reject(k.failures[0]):!!m})})})},kt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=J(s,this.schema.primKey.keyPath))===void 0?Ot(new Ve.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},kt.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,g=s;return m&&p&&(g=oo(m)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"put",values:[g],keys:a!=null?[a]:null})}).then(function(k){return k.numFailures?Le.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{Y(s,m,k)}catch{}return k})},kt.prototype.delete=function(s){var a=this;return this._trans("readwrite",function(u){return a.core.mutate({trans:u,type:"delete",keys:[s]}).then(function(d){return ao(a,[s],d)}).then(function(d){return d.numFailures?Le.reject(d.failures[0]):void 0})})},kt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:Cl}).then(function(u){return ao(s,null,u)})}).then(function(a){return a.numFailures?Le.reject(a.failures[0]):void 0})},kt.prototype.bulkGet=function(s){var a=this;return this._trans("readonly",function(u){return a.core.getMany({keys:s,trans:u}).then(function(d){return d.map(function(p){return a.hook.reading.fire(p)})})})},kt.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,m=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(g){var k=d.schema.primKey,W=k.auto,k=k.keyPath;if(k&&p)throw new Ve.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var I=s.length,W=k&&W?s.map(oo(k)):s;return d.core.mutate({trans:g,type:"add",keys:p,values:W,wantResults:m}).then(function(D){var M=D.numFailures,j=D.failures;if(M===0)return m?D.results:D.lastResult;throw new fe("".concat(d.name,".bulkAdd(): ").concat(M," of ").concat(I," operations failed"),j)})})},kt.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,m=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(g){var k=d.schema.primKey,W=k.auto,k=k.keyPath;if(k&&p)throw new Ve.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var I=s.length,W=k&&W?s.map(oo(k)):s;return d.core.mutate({trans:g,type:"put",keys:p,values:W,wantResults:m}).then(function(D){var M=D.numFailures,j=D.failures;if(M===0)return m?D.results:D.lastResult;throw new fe("".concat(d.name,".bulkPut(): ").concat(M," of ").concat(I," operations failed"),j)})})},kt.prototype.bulkUpdate=function(s){var a=this,u=this.core,d=s.map(function(g){return g.key}),p=s.map(function(g){return g.changes}),m=[];return this._trans("readwrite",function(g){return u.getMany({trans:g,keys:d,cache:"clone"}).then(function(k){var I=[],W=[],D=(s.forEach(function(M,j){var q=M.key,K=M.changes,L=k[j];if(L){for(var N=0,Q=Object.keys(K);NG+oe&&N(G+W)})})}var Q=Us(u)&&u.limit===1/0&&(typeof s!="function"||K)&&{index:u.index,range:u.range};return N(0).then(function(){if(0{for(var Ze=Math.min(be.length,qe.length),ot=-1,lt=0;lt=j})).length===0?Le.resolve():(N.forEach(function(G){L.push(function(){var oe,ve,ye,$e=Q,be=G._cfg.dbschema,Be=(ho(M,$e,K),ho(M,be,K),Q=M._dbSchema=be,Na($e,be)),Ce=(Be.add.forEach(function(qe){Fa(K,qe[0],qe[1].primKey,qe[1].indexes)}),Be.change.forEach(function(qe){if(qe.recreate)throw new Ve.Upgrade("Not yet support for changing primary key");var he=K.objectStore(qe.name);qe.add.forEach(function(Qe){return vo(he,Qe)}),qe.change.forEach(function(Qe){he.deleteIndex(Qe.name),vo(he,Qe)}),qe.del.forEach(function(Qe){return he.deleteIndex(Qe)})}),G._cfg.contentUpgrade);if(Ce&&G._cfg.version>j)return fo(M,K),q._memoizedTables={},oe=ne(be),Be.del.forEach(function(qe){oe[qe]=$e[qe]}),Ra(M,[M.Transaction.prototype]),po(M,[M.Transaction.prototype],c(oe),oe),q.schema=oe,(ve=Xe(Ce))&&Bs(),be=Le.follow(function(){var qe;(ye=Ce(q))&&ve&&(qe=Yn.bind(null,null),ye.then(qe,qe))}),ye&&typeof ye.then=="function"?Le.resolve(ye):be.then(function(){return ye})}),L.push(function(oe){var ve,ye,$e=G._cfg.dbschema;ve=$e,ye=oe,[].slice.call(ye.db.objectStoreNames).forEach(function(be){return ve[be]==null&&ye.db.deleteObjectStore(be)}),Ra(M,[M.Transaction.prototype]),po(M,[M.Transaction.prototype],M._storeNames,M._dbSchema),q.schema=M._dbSchema}),L.push(function(oe){M.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(M.idbdb.version/10)===G._cfg.version?(M.idbdb.deleteObjectStore("$meta"),delete M._dbSchema.$meta,M._storeNames=M._storeNames.filter(function(ve){return ve!=="$meta"})):oe.objectStore("$meta").put(G._cfg.version,"version"))})}),function G(){return L.length?Le.resolve(L.shift()(q.idbtrans)).then(G):Le.resolve()}().then(function(){Rl(Q,K)}))}).catch(g);var I,W;c(p).forEach(function(D){Fa(u,D,p[D].primKey,p[D].indexes)}),fo(s,u),Le.follow(function(){return s.on.populate.fire(m)}).catch(g)})}function Yd(s,a){Rl(s._dbSchema,a),a.db.version%10!=0||a.objectStoreNames.contains("$meta")||a.db.createObjectStore("$meta").add(Math.ceil(a.db.version/10-1),"version");var u=mo(0,s.idbdb,a);ho(s,s._dbSchema,a);for(var d=0,p=Na(u,s._dbSchema).change;d{if(g.change.length||g.recreate)return console.warn("Unable to patch indexes of table ".concat(g.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=a.objectStore(g.name);g.add.forEach(function(I){le&&console.debug("Dexie upgrade patch: Creating missing index ".concat(g.name,".").concat(I.src)),vo(k,I)})})(p[d]);if(typeof m=="object")return m.value}}function Na(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var p=s[u],m=a[u];if(p){var g={name:u,def:m,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(m.primKey.keyPath||"")||p.primKey.auto!==m.primKey.auto)g.recreate=!0,d.change.push(g);else{var k=p.idxByName,I=m.idxByName,W=void 0;for(W in k)I[W]||g.del.push(W);for(W in I){var D=k[W],M=I[W];D?D.src!==M.src&&g.change.push(M):g.add.push(M)}(0{var s,a,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(s=new Set,a=new FinalizationRegistry(function(d){s.delete(d)}),{toArray:function(){return Array.from(s).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);s.add(p),a.register(d._novip,p,p),s.size>d._options.maxConnections&&(p=s.values().next().value,s.delete(p),a.unregister(p))},remove:function(d){if(d)for(var p=s.values(),m=p.next();!m.done;){var g=m.value;if(g.deref()===d._novip)return s.delete(g),void a.unregister(g);m=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function Va(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Ln(ro,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ba(s){return s&&typeof s.databases=="function"}function Ua(s){return Gn(function(){return ze.letThrough=!0,s()})}function qa(s){return!("from"in s)}var qt=function(s,a){var u;if(!this)return u=new qt,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:N.oldVersion,M=Q<1,s.idbdb=L.result,m&&Yd(s,D),Gd(s,Q/10,D,q))},q),L.onsuccess=$t(function(){D=null;var N,Q,G,oe,ve,ye,$e=s.idbdb=L.result,be=re($e.objectStoreNames);if(0"u"?Le.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(j){function q(){return indexedDB.databases().finally(j)}I=setInterval(q,100),q()}).finally(function(){return clearInterval(I)}):Promise.resolve()).then(k)]).then(function(){return g(),a.onReadyBeingFired=[],Le.resolve(Ua(function(){return s.on.ready.fire(s.vip)})).then(function j(){var q;if(0a.limit?d.length=a.limit:s.length===a.limit&&d.length{if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((u=ut(u,d))===0){if(p&&m)return 0;if(p)return 1;if(m)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,m)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=ut(u,d))===0){if(p&&m)return 0;if(p)return-1;if(m)return 1}return u})(s.upper,a.upper,s.upperOpen,a.upperOpen)}function sf(s,a,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var p,m;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,m=a,setTimeout(function(){p.subscribers.size===0&&me(m,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return r(r({},s),{transaction:function(u,d,p){var m,g,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(m=new AbortController).signal,k.addEventListener("abort",(g=function(I){return function(){if(m.abort(),d==="readwrite"){for(var W=new Set,D=0,M=u;D{var Q=ws["idb://".concat(q,"/").concat(K)];if(!Q)return[];if(!(q=Q.queries[L]))return[null,!1,Q,null];var G=q[(N.query?N.query.index.name:null)||""];if(!G)return[null,!1,Q,null];switch(L){case"query":var oe=(ve=N.direction)!=null?ve:"next",ve=G.find(function(ye){var $e;return ye.req.limit===N.limit&&ye.req.values===N.values&&(($e=ye.req.direction)!=null?$e:"next")===oe&&Yl(ye.req.query.range,N.query.range)});return ve?[ve,!0,Q,G]:[G.find(function(ye){var $e;return("limit"in ye.req?ye.req.limit:1/0)>=N.limit&&(($e=ye.req.direction)!=null?$e:"next")===oe&&(!N.values||ye.req.values)&&nf(ye.req.query.range,N.query.range)}),!1,Q,G];case"count":return ve=G.find(function(ye){return Yl(ye.req.query.range,N.query.range)}),[ve,!!ve,Q,G]}})(a,u,"query",m),j=M[0],W=M[2],D=M[3],j&&M[1]?j.obsSet=m.obsSet:(M=d.query(m).then(function(q){var K=q.result;if(j&&(j.res=K),g){for(var L=0,N=K.length;L{var ve=Fs();try{m&&Bs();var ye=Gn(s,oe);return ye=m?ye.finally(Yn):ye}finally{ve&&Vs()}})(Q={subscr:N,signal:g.signal,requery:j,querier:s,trans:null}),M||(Qn.storagemutated.subscribe(K),M=!0),Promise.resolve(G).then(function(oe){u=!0,a=oe,k||Q.signal.aborted||(q()||(W=N,q())?j():(I={},Aa(function(){return!k&&p.next&&p.next(oe)})))},function(oe){u=!1,["DatabaseClosedError","AbortError"].includes(oe==null?void 0:oe.name)||k||Aa(function(){k||p.error&&p.error(oe)})}))};return setTimeout(j,0),D});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var _s=Ln;function ei(s){var a=Zn;try{Zn=!0,Qn.storagemutated.fire(s),Ga(s,!0)}finally{Zn=a}}C(_s,r(r({},Ae),{delete:function(s){return new _s(s,{addons:[]}).delete()},exists:function(s){return new _s(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=_s.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(Ba(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ro})}):Va(u,a).toCollection().primaryKeys()).then(s)}catch{return Ot(new Ve.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return ze.trans?ys(ze.transless||jt,s):s()},vip:Ua,async:function(s){return function(){try{var a=Ya(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Le.resolve(a)}catch(u){return Ot(u)}}},spawn:function(s,a,u){try{var d=Ya(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Le.resolve(d)}catch(p){return Ot(p)}},currentTransaction:{get:function(){return ze.trans||null}},waitFor:function(s,a){return s=Le.resolve(typeof s=="function"?_s.ignoreTransaction(s):s).timeout(a||6e4),ze.trans?ze.trans.waitFor(s):s},Promise:Le,debug:{get:function(){return le},set:function(s){S(s)}},derive:te,extend:v,props:C,override:V,Events:dr,on:Qn,liveQuery:Jl,extendObservabilitySet:go,getByKeyPath:J,setByKeyPath:Y,delByKeyPath:function(s,a){typeof a=="string"?Y(s,a,void 0):"length"in a&&[].map.call(a,function(u){Y(s,u,void 0)})},shallowClone:ne,deepClone:Ie,getObjectDiff:Ja,cmp:ut,asap:U,minKey:-1/0,addons:[],connections:{get:hr.toArray},errnames:De,dependencies:ko,cache:ws,semVer:"4.4.6",version:"4.4.6".split(".").map(function(s){return parseInt(s)}).reduce(function(s,a,u){return s+a/Math.pow(10,2*u)})})),_s.maxKey=vr(_s.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Qn(co,function(s){Zn||(s=new CustomEvent(ja,{detail:s}),Zn=!0,dispatchEvent(s),Zn=!1)}),addEventListener(ja,function(s){s=s.detail,Zn||ei(s)}));var zs,Zn=!1,Xl=function(){};return typeof BroadcastChannel<"u"&&((Xl=function(){(zs=new BroadcastChannel(ja)).onmessage=function(s){return s.data&&ei(s.data)}})(),typeof zs.unref=="function"&&zs.unref(),Qn(co,function(s){Zn||zs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Ln.disableBfCache&&s.persisted){le&&console.debug("Dexie: handling persisted pagehide"),zs!=null&&zs.close();for(var a=0,u=hr.toArray();a{const r={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(o=>{o.category&&r[o.category]&&(o.category=r[o.category])})})}}let ue;function sm(e){ue=e}function cl(){ue&&ue.close(),ue=void 0}const rm=5,Fu=["公司","客户现场","出差","居家办公"],om={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function Li(e){return om[e]||e}function Or(e){return e<10?"0"+e:String(e)}function Bn(e){return e.getFullYear()+"-"+Or(e.getMonth()+1)+"-"+Or(e.getDate())}function bt(){return Bn(new Date)}function mt(){const e=new Date;return Bn(e)+"T"+Or(e.getHours())+":"+Or(e.getMinutes())+":"+Or(e.getSeconds())}function Un(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function Rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function on(e,t){const n=Rs(e);return n.setDate(n.getDate()+t),Bn(n)}function ea(e,t){const n=Rs(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),Bn(n)}function Qs(e){const t=Rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Bn(t)}function am(e){const t=Rs(e).getDay();return t===0||t===6}function im(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ud(e){const t=Rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const lm=15e4;function Ki(e){const t=new Uint8Array(e);let n="";for(let r=0;r({}));if(!o.ok){const c=i&&i.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function vl(e,t,n){const r=await Em(n,e,t);oa(r.userId);const o={userId:r.userId,username:r.username};return $m(o),md(r.username,t),o}async function Tm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return vl(n,t,"login")}async function Am(e,t,n){const r=(e||"").trim();if(r.length<2||r.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return vl(r,t,"register")}async function Pm(){const e=bn();if(!e)return null;try{return await vl(e.username,e.password,"login")}catch{return null}}async function Om(){sa(),cl(),ra=null,vd()}function Mm(){sa(),cl(),ra=null,vd(),Sm()}async function Im(e,t){if(!Ur())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const r=bn();if(!r||r.password!==e)throw new Error("旧密码不正确");const o=await Ns();let i;try{i=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+hd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!i.ok){const c=await i.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+i.status)}md(r.username,t)}async function jm(){if(!Ur())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+hd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r&&r.error||"删除失败 "+n.status)}Mm()}function hd(){return xa()}const Fi=P(null),Vi=P(null),ur=P(0);function rs(){ur.value++}const Zs=P(""),qr=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction","plan"],Js=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Do(e){return JSON.stringify(e)}async function Dm(e){return ue.table(e).toArray()}function Lo(e,t){return e==="setting"?t.key:t.id}async function Lm(){for(const e of qr){const t=ue.table(e),n=await t.toArray();for(const r of n){if(e==="setting"&&Js.has(r.key))continue;const o={};r.uuid||(o.uuid=Km()),!r.updated_at&&r.created_at&&(o.updated_at=r.created_at),Object.keys(o).length&&await t.update(Lo(e,r),o)}}}function Km(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Rm(){return bn()!=null}async function Nm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Fm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function yd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const r=await n.json();if(!r||!r.token)throw new Error("云端登录异常");return String(r.token)}async function Vm(e,t){let n=xa();return n||(n=await yd(e,t),Br(n),n)}async function gd(){const e=bn();if(!e)throw new Error("未登录");const t=await Ns(),n=await fetch(t+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e.username,password:e.password})});if(!n.ok)throw new Error("云端账号校验失败:"+n.status)}async function Bi(){const e=bn();if(!e)throw new Error("未登录,无法同步");return kd({baseUrl:await Ns(),username:e.username,password:e.password})}async function bd(){try{await Bi()}catch(e){Zs.value=e instanceof Error?e.message:String(e);try{await Bi()}catch{}throw e}}function wd(e,t,n){const r={};for(const o of Object.keys(t))o!=="id"&&(r[o]=t[o]);if(e==="log_item"){delete r.work_log_id,delete r.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(r.wuuid=o.uuid);const i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(r.puuid=i.uuid)}return r}async function _d(){const e=await ue.work_log.toArray(),t=await ue.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let Mr=!1,Ko=!1,Ui=!1,er=null,Cn=null,qi="",Hi=!1,Ro=null;async function tr(){if(Mr){Ko=!0;return}try{if(!await Rm())return;await kd(await Bm()),Zs.value=""}catch(e){Zs.value=e instanceof Error?e.message:String(e)}}async function Bm(){const e=bn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function Um(){if(Hi)return;Hi=!0,Ro=tm(async()=>{const t={};for(const n of qr)t[n]=await ue.table(n).count();return t}).subscribe({next:()=>{Ui||Mr||(er&&globalThis.clearTimeout(er),er=globalThis.setTimeout(()=>{tr()},3e3))},error:()=>{}})}function qm(){Ro&&(Ro.unsubscribe(),Ro=null),Cn&&(Cn.close(),Cn=null,qi=""),er&&(globalThis.clearTimeout(er),er=null),Hi=!1}function Hm(e,t){const n=e+"|"+t;if(!(Cn&&qi===n)){Cn&&(Cn.close(),Cn=null);try{Cn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),qi=n,Cn.onmessage=()=>{tr()}}catch{Cn=null}}}async function kd(e){if(Mr)return Ko=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};Mr=!0,Ui=!0;try{const t=await Wm(e);return Ko&&(Ko=!1,globalThis.setTimeout(()=>{tr()},800)),t}finally{Mr=!1,Ui=!1}}async function Wm(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Lm();const n=await _d(),r=await ue.sync_mirror.toArray(),o=new Map;for(const se of r)o.set(se.table+"|"+se.uuid,se);const i={},c=[];let f=0;for(const se of qr){let ae=await Dm(se);se==="setting"&&(ae=ae.filter(V=>!Js.has(V.key)));const re=new Map;for(const V of ae)re.set(V.uuid,V);for(const[V,T]of re){const U=wd(se,T,n),J=Do(U),Y=o.get(se+"|"+V);(!Y||Y.hash!==J)&&(i[se]=i[se]||[],i[se].push(U),f++)}for(const[V,T]of o)V.startsWith(se+"|")&&!re.has(T.uuid)&&c.push({table:se,uuid:T.uuid,deleted_at:mt()});i[se]=i[se]||[]}c.push(...Xm());const v=await Vm(t,e),y=se=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+se},body:JSON.stringify({device:"client",tables:i,tombstones:c})});let h=await y(v);if(h.status===401){Br("");const se=await yd(t,e);Br(se),h=await y(se)}if(!h.ok)throw new Error("同步服务返回 "+h.status);const w=await h.json(),C=w.tables||{},O=w.tombstones||[],B=await Ym(C,O);Hm(t,xa()||v);const te=mt();return await Fm(te),(B.changed>0||B.removed>0||f>0)&&rs(),{pushed:f,pulled:B.changed,removed:B.removed,errors:0,at:te}}function xd(){var t;return"dsh_idmap_"+(((t=bn())==null?void 0:t.username)||"anon")}function zm(){try{const e=localStorage.getItem(xd());if(e)return JSON.parse(e)}catch{}return{}}function Gm(e){try{localStorage.setItem(xd(),JSON.stringify(e))}catch{}}async function Ym(e,t){const n=zm(),r=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await ue.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const i=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,f=0;const v={},y={};for(const C of qr){const O=ue.table(C),B=await O.toArray(),te=new Map(B.map($=>[Lo(C,$),$])),se=new Map(B.filter($=>$.uuid).map($=>[$.uuid,$])),ae=(e[C]||[]).filter($=>!r.has(C+"|"+$.uuid)),re=ae.filter($=>!(C==="setting"&&Js.has($.key))),V=ae.filter($=>C==="setting"&&Js.has($.key));for(const $ of V)Jm(C,$.uuid);const T=C==="setting"?[]:B.filter($=>$.uuid&&!i.has($.uuid)&&!r.has(C+"|"+$.uuid)),U={v:Math.max(0,...B.map($=>Number($.id)||0))};re.length;const J=[];for(const $ of re){const R={...$};if(C==="log_item"){const Ie=R.wuuid?v[R.wuuid]:void 0;if(!Ie)continue;R.work_log_id=Ie,delete R.wuuid,R.project_id=R.puuid?y[R.puuid]??null:null,delete R.puuid}let F=Lo(C,$);if(C==="setting")F=$.key;else{const Ie=n[C]&&n[C][$.uuid],Pe=se.get($.uuid);Pe&&Pe.id!=null?F=Pe.id:typeof Ie=="number"?F=Ie:F=++U.v}const ee={...R,id:F};C==="setting"&&Js.has(ee.key)||(J.push(ee),C==="work_log"&&(v[$.uuid]=F),C==="project"&&(y[$.uuid]=F))}const Y=J.concat(T);for(const $ of Y){const R=te.get(Lo(C,$));(!R||Do(R)!==Do($))&&c++}f+=B.filter($=>$.uuid&&!J.some(R=>R.uuid===$.uuid)&&!r.has(C+"|"+$.uuid)).length,await O.clear(),Y.length&&await O.bulkPut(Y);const ne={};for(const $ of Y)$.uuid&&(ne[$.uuid]=$.id);n[C]=ne}Gm(n);const h=await _d(),w=[];for(const C of qr){const O=await ue.table(C).toArray();for(const B of O)C==="setting"&&Js.has(B.key)||B.uuid&&w.push({table:C,uuid:B.uuid,hash:Do(wd(C,B,h))})}return await ue.sync_mirror.clear(),w.length&&await ue.sync_mirror.bulkAdd(w.map(C=>({...C}))),await ue.tombstone.clear(),{changed:c,removed:f+aa.length}}const aa=[];function Jm(e,t){aa.some(n=>n.table===e&&n.uuid===t)||aa.push({table:e,uuid:t,deleted_at:mt()})}function Xm(){return aa.splice(0)}const Qm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function yt(){await bd()}async function Ct(e,t){const n=await ue.setting.get(e);return n?n.value:t}async function Dt(e,t){await ue.setting.put({key:e,value:t}),Qm.has(e)||await yt()}async function Ks(){const e=await Promise.all([Ct("work_start","09:00"),Ct("work_end","18:00"),Ct("grace_minutes","10"),Ct("lunch_minutes","60"),Ct("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function Zm(){const e=await Ct("last_project",""),t=await Ct("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function eh(){return Ct("last_location","")}async function th(e,t){const n=t.trim();await Dt("last_location",n),n&&await ia(n);let r=!1;const o=await wn(e);o&&o.id?(o.location||"")!==n&&(await ue.attendance.update(o.id,{location:n||null}),r=!0):n&&(await ue.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:mt()}),r=!0),r&&await yt()}async function ml(){const e=await Ct("location_presets","");if(!e)return Fu.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Fu.slice()}async function Cd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Dt("location_presets",JSON.stringify(t))}async function ia(e){const t=e.trim();if(!t)return;const n=await ml();n.includes(t)||await Cd([...n,t])}async function nr(e=!1){const t=await ue.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function nh(e){await ue.project.add({name:e.trim(),archived:0,created_at:mt()}),await yt()}async function sh(e,t){await ue.project.update(e,{name:t.trim()}),await yt()}async function rh(e,t){await ue.project.update(e,{archived:t?1:0}),await yt()}async function wn(e){return ue.attendance.where("date").equals(e).first()}async function $d(e,t){const n=((t===void 0?await Ct("last_location",""):t)||"").trim();let r=!1;const o=await wn(e);if(o&&o.id){if(!o.clock_in_at){const i={clock_in_at:mt()};n&&(i.location=n),await ue.attendance.update(o.id,i),r=!0}n&&(await Ct("last_location","")!==n&&await Dt("last_location",n),await ia(n)),r&&await yt();return}await ue.attendance.add({date:e,clock_in_at:mt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:mt()}),n&&(await Dt("last_location",n),await ia(n)),await yt()}async function oh(e){const t=await wn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await ue.attendance.update(t.id,{clock_out_at:mt()}),await yt())}async function ah(){const e=new Date,t=Bn(e);let n="";if(e.getHours()<4){const r=await wn(on(t,-1));r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ue.attendance.update(r.id,{clock_out_at:mt()}),n=r.date)}if(!n){const r=await wn(t);r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ue.attendance.update(r.id,{clock_out_at:mt()}),n=r.date)}if(!n)throw new Error("没有进行中的打卡");return await yt(),n}async function ih(e,t,n,r,o){(o||"").trim()&&await ia(o);const i=await wn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:r||null,location:(o||"").trim()||null,created_at:mt()};i&&i.id?await ue.attendance.update(i.id,c):await ue.attendance.add(c),await yt()}async function lh(e,t,n){const r=(n||"").trim();if(!r)return;const o=await wn(e);o&&o.id&&(await ue.attendance.update(o.id,{[t]:e+"T"+r+":00"}),await yt())}async function Ca(e,t){return ue.attendance.where("date").between(e,t,!0,!0).toArray()}async function uh(e,t){const n=await wn(e);if(t){const r={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:mt()};n&&n.id?await ue.attendance.update(n.id,r):await ue.attendance.add({...r,note:null,location:null})}else n&&n.id&&await ue.attendance.update(n.id,{kind:"normal"});await yt()}async function ch(e){const t=await ue.work_log.where("date").equals(e).first();return t||{id:await ue.work_log.add({date:e,created_at:mt()}),date:e,created_at:mt()}}async function dh(e){return ue.work_log.where("date").equals(e).first()}async function fh(e){const t=await dh(e);return!t||!t.id?[]:(await ue.log_item.where("work_log_id").equals(t.id).toArray()).sort((r,o)=>o.id-r.id)}async function ph(e,t){const n=await ue.work_log.where("date").equals(e).first();let r;n&&n.id?r=n:r=await ch(e),await ue.table("log_item").add({work_log_id:r.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:mt()});const o=t.project_id?String(t.project_id):"";await Ct("last_project","")!==o&&await Dt("last_project",o),await Ct("last_category","")!==t.category&&await Dt("last_category",t.category),await yt()}async function hi(e,t){await ue.table("log_item").update(e,t),await yt()}async function vh(e){await ue.table("log_item").delete(e),await yt()}async function Hr(e,t){const n=await ue.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const r=new Map(n.map(i=>[i.id,i.date]));return(await ue.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:r.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await yl(n.id);await ue.plan.update(e,{timer_started_at:mt(),updated_at:mt()}),await yt()}async function yl(e){const t=await ue.plan.get(e);if(!t||!t.timer_started_at)return;const n=Math.max(0,Math.round((Date.now()-new Date(t.timer_started_at).getTime())/6e4));await ue.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:mt()}),await yt()}async function xh(){return(await ue.memo.toArray()).sort((t,n)=>t.updated_at[c.id,c.date]));return(await ue.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Th(e,t=4){const n=e.trim().toLowerCase();return n?(await ue.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,i)=>o.updated_at{await Promise.all([ue.project.clear(),ue.work_log.clear(),r.clear(),ue.attendance.clear(),ue.weekly_note.clear(),ue.setting.clear(),ue.memo.clear(),ue.credential.clear(),o.clear(),i.clear()]),n.project&&n.project.length&&await ue.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ue.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await r.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ue.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ue.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ue.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ue.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ue.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction),n.plan&&n.plan.length&&await i.bulkAdd(n.plan)}),await yt()}const Lh=["制度学习","产品学习","打杂","项目实操","售后服务"],Kh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Rh=["工资","报销","其他"],Sd="log_categories",Ed="ledger_expense_categories",Td="ledger_income_categories";function Ad(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const r=n.filter(o=>typeof o=="string"&&o.trim()).map(o=>o.trim());if(r.length)return Array.from(new Set(r))}}catch{}return t.slice()}async function Jr(){return Ad(await Ct(Sd,""),Lh)}async function yi(e){await Dt(Sd,JSON.stringify(e))}async function Wr(e){return Ad(await Ct(e==="expense"?Ed:Td,""),e==="expense"?Kh:Rh)}async function Es(e,t){await Dt(e==="expense"?Ed:Td,JSON.stringify(t))}const Nh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Fh={class:"dialog-head"},Vh={key:0,class:"muted dialog-sub"},Bh={class:"dialog-body"},Uh={class:"form-grid"},qh={class:"field span2"},Hh={key:0,class:"form-error"},Wh={class:"field"},zh=["value"],Gh={class:"field"},Yh=["value"],Jh={class:"field"},Xh={class:"field"},Qh={class:"field span2"},Zh={class:"field"},ey={class:"field"},ty={class:"dialog-btns"},ny=Ft({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=P([]);Jr().then(re=>{n.value=re});const r=e,o=t,i=P(""),c=P(null),f=P("dev"),v=P(null),y=P(""),h=P(""),w=P(0),C=P(0),O=P(""),B=P(null),te=it(()=>{var T;const re=r.projects.filter(U=>U.archived!==1),V=(T=r.item)==null?void 0:T.project_id;if(V&&!re.some(U=>U.id===V)){const U=r.projects.find(Y=>Y.id===V),J=re.slice();return U&&J.unshift({...U,name:U.name+"(已归档)"}),J}return re});function se(re){r.open&&re.key==="Escape"&&o("cancel")}wt(()=>r.open,async re=>{var V;if(re){const T=r.item;i.value=(T==null?void 0:T.content)??"",c.value=(T==null?void 0:T.project_id)??null,f.value=(T==null?void 0:T.category)??"dev",v.value=(T==null?void 0:T.minutes)??null,y.value=(T==null?void 0:T.takeaway)??"",h.value=(T==null?void 0:T.remark)??"",w.value=(T==null?void 0:T.is_milestone)??0,C.value=(T==null?void 0:T.needs_followup)??0,O.value="",window.addEventListener("keydown",se),await ir(),(V=B.value)==null||V.focus()}else window.removeEventListener("keydown",se)}),Wn(()=>window.removeEventListener("keydown",se)),wt(i,()=>{O.value&&(O.value="")});function ae(){const re=i.value.trim();if(!re){O.value="请填写工作内容";return}if(!r.item||!r.item.id){o("cancel");return}o("save",{id:r.item.id,content:re,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:y.value.trim()||null,remark:h.value.trim()||null,is_milestone:w.value?1:0,needs_followup:C.value?1:0})}return(re,V)=>(E(),At(cs,{to:"body"},[Me(lr,{name:"modal"},{default:vs(()=>[e.open?(E(),A("div",{key:0,class:"mask",onClick:V[10]||(V[10]=en(T=>o("cancel"),["self"]))},[l("div",Nh,[l("div",Fh,[l("div",null,[V[11]||(V[11]=l("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(E(),A("div",Vh,z(e.date),1)):we("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:V[0]||(V[0]=T=>o("cancel"))},[Me(et,{name:"close",size:16})])]),l("div",Bh,[l("div",Uh,[l("div",qh,[V[12]||(V[12]=l("label",null,"工作内容(必填)",-1)),Oe(l("input",{ref_key:"contentInput",ref:B,class:tt(["input",{invalid:O.value}]),"onUpdate:modelValue":V[1]||(V[1]=T=>i.value=T),onKeydown:Et(ae,["enter"])},null,34),[[Fe,i.value]]),O.value?(E(),A("div",Hh,z(O.value),1)):we("",!0)]),l("div",Wh,[V[14]||(V[14]=l("label",null,"所属项目",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":V[2]||(V[2]=T=>c.value=T)},[V[13]||(V[13]=l("option",{value:null},"无项目",-1)),(E(!0),A(Ke,null,at(te.value,T=>(E(),A("option",{key:T.id,value:T.id},z(T.name),9,zh))),128))],512),[[Pn,c.value]])]),l("div",Gh,[V[15]||(V[15]=l("label",null,"工作分类",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":V[3]||(V[3]=T=>f.value=T)},[(E(!0),A(Ke,null,at(n.value,T=>(E(),A("option",{key:T,value:T},z(T),9,Yh))),128))],512),[[Pn,f.value]])]),l("div",Jh,[V[16]||(V[16]=l("label",null,"耗时(分钟)",-1)),Oe(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":V[4]||(V[4]=T=>v.value=T),placeholder:"选填"},null,512),[[Fe,v.value,void 0,{number:!0}]])]),l("div",Xh,[V[17]||(V[17]=l("label",null,"主要收获",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":V[5]||(V[5]=T=>y.value=T),placeholder:"一句话:学到了什么"},null,512),[[Fe,y.value]])]),l("div",Qh,[V[18]||(V[18]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":V[6]||(V[6]=T=>h.value=T),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Fe,h.value]])]),l("div",Zh,[V[19]||(V[19]=l("label",null,"成果标记",-1)),l("button",{class:tt(["toggle-btn",{on:w.value===1}]),onClick:V[7]||(V[7]=T=>w.value=w.value===1?0:1)},z(w.value===1?"已标记为成果":"未标记"),3)]),l("div",ey,[V[20]||(V[20]=l("label",null,"待跟进",-1)),l("button",{class:tt(["toggle-btn",{onwarn:C.value===1}]),onClick:V[8]||(V[8]=T=>C.value=C.value===1?0:1)},z(C.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",ty,[l("button",{class:"btn btn-sm",onClick:V[9]||(V[9]=T=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ae},"保存修改")])])])):we("",!0)]),_:1})]))}}),sy=Ut(ny,[["__scopeId","data-v-aaf87f80"]]);function Po(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Xr(e,t,n,r){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(am(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return r?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:r?"进行中":"未完成",makeup:o,workedMinutes:null};const i=Po(Un(e.clock_in_at)),c=Po(Un(e.clock_out_at)),f=Po(n.work_start),v=Po(n.work_end);let y="normal";!o&&i>f+n.grace_minutes?y="late":!o&&c{No.value=No.value.filter(n=>n.id!==t)},2e3)}function oy(){return No}const ay={class:"day-panel"},iy={class:"dp-head"},ly={class:"dp-date"},uy={class:"card sec"},cy={class:"att-grid"},dy={class:"att-cell"},fy={key:0,class:"edit-row"},py={key:1,class:"att-val"},vy={class:"att-cell"},my={key:0,class:"edit-row"},hy={key:1,class:"att-val"},yy={class:"att-cell"},gy=["list"],by=["id"],wy=["value"],_y={class:"att-cell"},ky={class:"att-val status-val"},xy={key:0,class:"tag"},Cy={key:1,class:"muted"},$y={key:0,class:"att-note muted"},Sy={class:"att-actions"},Ey=["disabled"],Ty=["disabled"],Ay=["disabled"],Py=["disabled"],Oy={key:0,class:"card sec makeup"},My={class:"form-grid"},Iy={class:"field"},jy={class:"field"},Dy={class:"field span2"},Ly=["list"],Ky={class:"field span2"},Ry={key:0,class:"form-error"},Ny={class:"form-footer"},Fy={class:"card sec"},Vy={class:"form-grid"},By={class:"field span2"},Uy={key:0,class:"form-error"},qy={class:"field"},Hy=["value"],Wy={class:"field"},zy=["value"],Gy={class:"field"},Yy={class:"field"},Jy={class:"field span2"},Xy={class:"form-footer"},Qy=["disabled"],Zy=["disabled"],eg={class:"list-sec"},tg={class:"sec-title"},ng={key:0,class:"empty muted"},sg={class:"item-main"},rg={class:"tag"},og=["onClick"],ag={key:0,class:"muted item-meta"},ig={key:1,class:"muted num item-meta"},lg=["onClick"],ug=["onClick"],cg=["onClick"],dg=["onClick"],fg={key:0,class:"item-sub"},pg={key:0,class:"muted2"},vg={key:1,class:"muted"},mg={key:1,class:"dp-foot muted num"},hg=Ft({__name:"DayPanel",props:{date:{}},setup(e){const t=P([]);Jr().then(le=>{t.value=le});const n=e,r=P(!0),o=P(null),i=P(void 0),c=P([]),f=P([]),v=P(""),y=P([]),h=it(()=>"loc-list-"+n.date),w=it(()=>n.date===bt());async function C(){r.value=!0,o.value=await Ks(),i.value=await wn(n.date),c.value=await fh(n.date),f.value=await nr(!0),y.value=await ml(),v.value=i.value&&i.value.location||await eh(),r.value=!1}an(C),wt(()=>n.date,C),wt(ur,()=>{C()});const O=it(()=>f.value.filter(le=>le.archived!==1));function B(le){if(!le)return"";const S=f.value.find(x=>x.id===le);return S?S.name:"已删除项目"}const te=it(()=>o.value?Xr(i.value,n.date,o.value,w.value):null),se=it(()=>c.value.reduce((le,S)=>le+(S.minutes||0),0)),ae=P(!1);async function re(){ae.value||(ae.value=!0,await $d(n.date,v.value),await C(),rs(),He("上班打卡成功"),ae.value=!1)}async function V(){ae.value||(ae.value=!0,await oh(n.date),await C(),rs(),He("下班打卡成功"),ae.value=!1)}async function T(){await th(n.date,v.value),rs(),He("地点已更新")}const U=P(!1),J=it(()=>{var le;return((le=i.value)==null?void 0:le.kind)==="leave"});function Y(){if(i.value&&i.value.clock_in_at){U.value=!0;return}ne(!0)}async function ne(le){U.value=!1,await uh(n.date,le),await C(),rs(),He(le?"已标记为休假":"已取消休假")}const $=P(null),R=P(""),F=P(null);wt($,async le=>{var S;le&&(await ir(),(S=F.value)==null||S.focus())});function ee(le){var x,Z;const S=le==="in"?(x=i.value)==null?void 0:x.clock_in_at:(Z=i.value)==null?void 0:Z.clock_out_at;$.value=le,R.value=S?Un(S):le==="in"?"09:00":"18:00"}function Ie(){$.value=null}async function Pe(){const le=$.value;le&&($.value=null,R.value&&(await lh(n.date,le==="in"?"clock_in_at":"clock_out_at",R.value),await C(),rs(),He("打卡时间已修改")))}const ke=P(!1),Re=P("09:00"),xe=P("18:00"),me=P(""),_e=P(""),We=P("");function Xe(){_e.value=v.value,We.value="",ke.value=!ke.value}async function Ae(){if(!Re.value||!xe.value){We.value="请填写上班与下班时间";return}await ih(n.date,n.date+"T"+Re.value+":00",n.date+"T"+xe.value+":00",me.value.trim(),_e.value),ke.value=!1,me.value="",We.value="",await C(),rs(),He("补卡已保存")}const pe=P(""),Ne=P("");wt(pe,()=>{Ne.value&&(Ne.value="")});const dt=P(null),je=P("dev"),fe=P(null),De=P(""),rt=P(""),Ve=P(!1),b=it(()=>!!(pe.value.trim()||fe.value||De.value.trim()||rt.value.trim()));an(async()=>{const le=await Zm();dt.value=le.project_id,je.value=le.category});function _(){pe.value="",fe.value=null,De.value="",rt.value="",Ne.value=""}async function X(){const le=pe.value.trim();if(!le){Ne.value="请填写工作内容";return}Ve.value||(Ve.value=!0,await ph(n.date,{content:le,project_id:dt.value,category:je.value,minutes:fe.value&&fe.value>0?fe.value:null,takeaway:De.value.trim()||null,remark:rt.value.trim()||null}),_(),await C(),He("记录已添加"),Ve.value=!1)}const de=P(null);function H(le){de.value=le}async function ie(le){const S=le.id,x={content:le.content,project_id:le.project_id,category:le.category,minutes:le.minutes,takeaway:le.takeaway,remark:le.remark,is_milestone:le.is_milestone,needs_followup:le.needs_followup};await hi(S,x),de.value=null,await C(),He("修改已保存")}async function Se(le){await hi(le.id,{is_milestone:le.is_milestone?0:1}),await C()}async function Ee(le){await hi(le.id,{needs_followup:le.needs_followup?0:1}),await C()}const ge=P(null);async function ce(){ge.value&&ge.value.id&&await vh(ge.value.id),ge.value=null,await C(),He("记录已删除")}return(le,S)=>(E(),A("div",ay,[l("div",iy,[l("div",ly,z(cn(ud)(e.date)),1)]),l("div",uy,[S[25]||(S[25]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",cy,[l("div",dy,[S[21]||(S[21]=l("label",null,"上班时间",-1)),$.value==="in"?(E(),A("div",fy,[Oe(l("input",{ref_key:"timeInput",ref:F,type:"time",class:"input time-input","onUpdate:modelValue":S[0]||(S[0]=x=>R.value=x),onKeydown:[Et(Pe,["enter"]),Et(Ie,["esc"])]},null,544),[[Fe,R.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:Ie},"取消")])):(E(),A("div",py,[l("span",{class:tt(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},z(i.value&&i.value.clock_in_at?cn(Un)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?(E(),A("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:S[1]||(S[1]=x=>ee("in"))},[Me(et,{name:"edit",size:13})])):we("",!0)]))]),l("div",vy,[S[22]||(S[22]=l("label",null,"下班时间",-1)),$.value==="out"?(E(),A("div",my,[Oe(l("input",{ref_key:"timeInput",ref:F,type:"time",class:"input time-input","onUpdate:modelValue":S[2]||(S[2]=x=>R.value=x),onKeydown:[Et(Pe,["enter"]),Et(Ie,["esc"])]},null,544),[[Fe,R.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:Ie},"取消")])):(E(),A("div",hy,[l("span",{class:tt(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},z(i.value&&i.value.clock_out_at?cn(Un)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?(E(),A("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:S[3]||(S[3]=x=>ee("out"))},[Me(et,{name:"edit",size:13})])):we("",!0)]))]),l("div",yy,[S[23]||(S[23]=l("label",null,"上班地点",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":S[4]||(S[4]=x=>v.value=x),list:h.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:T},null,40,gy),[[Fe,v.value]]),l("datalist",{id:h.value},[(E(!0),A(Ke,null,at(y.value,x=>(E(),A("option",{key:x,value:x},null,8,wy))),128))],8,by)]),l("div",_y,[S[24]||(S[24]=l("label",null,"考勤状态",-1)),l("div",ky,[te.value?(E(),A(Ke,{key:0},[l("span",{class:tt(["dot",te.value.status])},null,2),l("span",null,z(te.value.label),1),i.value&&i.value.kind==="makeup"?(E(),A("span",xy,"补卡")):we("",!0)],64)):(E(),A("span",Cy,"--"))])])]),i.value&&i.value.note?(E(),A("div",$y,"补卡说明:"+z(i.value.note),1)):we("",!0),l("div",Sy,[w.value&&(!i.value||!i.value.clock_in_at)?(E(),A("button",{key:0,class:"btn btn-primary btn-sm",disabled:ae.value,onClick:re},"上班打卡",8,Ey)):w.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?(E(),A("button",{key:1,class:"btn btn-primary btn-sm",disabled:ae.value,onClick:V},"下班打卡",8,Ty)):we("",!0),!w.value&&(!i.value||!i.value.clock_in_at)?(E(),A("button",{key:2,class:"btn btn-sm",onClick:Xe},"补卡")):we("",!0),J.value?(E(),A("button",{key:4,class:"btn btn-sm",disabled:ae.value,onClick:S[5]||(S[5]=x=>ne(!1))},"取消休假",8,Py)):(E(),A("button",{key:3,class:"btn btn-sm",disabled:ae.value,onClick:Y},"标记休假",8,Ay))])]),ke.value?(E(),A("div",Oy,[S[30]||(S[30]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",My,[l("div",Iy,[S[26]||(S[26]=l("label",null,"上班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":S[6]||(S[6]=x=>Re.value=x)},null,512),[[Fe,Re.value]])]),l("div",jy,[S[27]||(S[27]=l("label",null,"下班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":S[7]||(S[7]=x=>xe.value=x)},null,512),[[Fe,xe.value]])]),l("div",Dy,[S[28]||(S[28]=l("label",null,"上班地点",-1)),Oe(l("input",{class:"input",list:h.value,"onUpdate:modelValue":S[8]||(S[8]=x=>_e.value=x),placeholder:"可直接输入"},null,8,Ly),[[Fe,_e.value]])]),l("div",Ky,[S[29]||(S[29]=l("label",null,"补卡原因",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":S[9]||(S[9]=x=>me.value=x),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Fe,me.value]])])]),We.value?(E(),A("div",Ry,z(We.value),1)):we("",!0),l("div",Ny,[l("button",{class:"btn btn-sm",onClick:S[10]||(S[10]=x=>ke.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Ae},"保存补卡")])])):we("",!0),l("div",Fy,[S[38]||(S[38]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增工作记录"),l("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),l("div",Vy,[l("div",By,[S[31]||(S[31]=l("label",null,"工作内容(必填)",-1)),Oe(l("input",{class:tt(["input",{invalid:Ne.value}]),"onUpdate:modelValue":S[11]||(S[11]=x=>pe.value=x),placeholder:"做了什么,一句话一条",onKeydown:Et(X,["enter"])},null,34),[[Fe,pe.value]]),Ne.value?(E(),A("div",Uy,z(Ne.value),1)):we("",!0)]),l("div",qy,[S[33]||(S[33]=l("label",null,"所属项目",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":S[12]||(S[12]=x=>dt.value=x)},[S[32]||(S[32]=l("option",{value:null},"无项目",-1)),(E(!0),A(Ke,null,at(O.value,x=>(E(),A("option",{key:x.id,value:x.id},z(x.name),9,Hy))),128))],512),[[Pn,dt.value]])]),l("div",Wy,[S[34]||(S[34]=l("label",null,"工作分类",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":S[13]||(S[13]=x=>je.value=x)},[(E(!0),A(Ke,null,at(t.value,x=>(E(),A("option",{key:x,value:x},z(x),9,zy))),128))],512),[[Pn,je.value]])]),l("div",Gy,[S[35]||(S[35]=l("label",null,"耗时(分钟)",-1)),Oe(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":S[14]||(S[14]=x=>fe.value=x),placeholder:"选填"},null,512),[[Fe,fe.value,void 0,{number:!0}]])]),l("div",Yy,[S[36]||(S[36]=l("label",null,"主要收获",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":S[15]||(S[15]=x=>De.value=x),placeholder:"一句话:学到了什么"},null,512),[[Fe,De.value]])]),l("div",Jy,[S[37]||(S[37]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":S[16]||(S[16]=x=>rt.value=x),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Fe,rt.value]])])]),l("div",Xy,[l("button",{class:"btn btn-sm",disabled:!b.value,onClick:_},"重置",8,Qy),l("button",{class:"btn btn-primary btn-sm",disabled:Ve.value,onClick:X},"添加记录",8,Zy)])]),l("div",eg,[l("div",tg,"工作记录("+z(c.value.length)+")",1),!c.value.length&&!r.value?(E(),A("div",ng,"暂无记录")):we("",!0),(E(!0),A(Ke,null,at(c.value,x=>(E(),A("div",{key:x.id,class:"item"},[l("div",sg,[l("span",rg,z(cn(Li)(x.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:Z=>H(x)},z(x.content),9,og),x.project_id?(E(),A("span",ag,z(B(x.project_id)),1)):we("",!0),x.minutes?(E(),A("span",ig,z(x.minutes)+" 分钟",1)):we("",!0),S[39]||(S[39]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:Z=>H(x)},[Me(et,{name:"edit",size:14})],8,lg),l("button",{class:tt(["icon-btn",{active:x.is_milestone===1}]),title:"成果标记",onClick:Z=>Se(x)},[Me(et,{name:"star",size:14})],10,ug),l("button",{class:tt(["icon-btn",{"active-warn":x.needs_followup===1}]),title:"待跟进",onClick:Z=>Ee(x)},[Me(et,{name:"flag",size:14})],10,cg),l("button",{class:"icon-btn",title:"删除",onClick:Z=>ge.value=x},[Me(et,{name:"close",size:14})],8,dg)]),x.takeaway||x.remark?(E(),A("div",fg,[x.takeaway?(E(),A("div",pg,"收获:"+z(x.takeaway),1)):we("",!0),x.remark?(E(),A("div",vg,"备注:"+z(x.remark),1)):we("",!0)])):we("",!0)]))),128)),c.value.length?(E(),A("div",mg,[Pt(" 共 "+z(c.value.length)+" 条事项 ",1),se.value?(E(),A(Ke,{key:0},[Pt(" · "+z((se.value/60).toFixed(1))+" 小时",1)],64)):we("",!0)])):we("",!0)]),Me(qn,{open:!!ge.value,title:"删除确认",message:ge.value?"将删除工作记录「"+ge.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:S[17]||(S[17]=x=>ge.value=null),onConfirm:ce},null,8,["open","message"]),Me(qn,{open:U.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:S[18]||(S[18]=x=>U.value=!1),onConfirm:S[19]||(S[19]=x=>ne(!0))},null,8,["open"]),Me(sy,{open:!!de.value,item:de.value,projects:f.value,date:e.date,onCancel:S[20]||(S[20]=x=>de.value=null),onSave:ie},null,8,["open","item","projects","date"])]))}}),Pd=Ut(hg,[["__scopeId","data-v-de6fe794"]]),yg={class:"cal-page"},gg={class:"cal-toolbar"},bg={class:"cal-title num"},wg={class:"cal-head"},_g={class:"cal-grid"},kg=["title","onClick"],xg={class:"cal-marks"},Cg={key:0,class:"drawer"},$g={class:"drawer-head"},Sg={class:"drawer-body"},Eg=Ft({__name:"CalendarView",setup(e){const t=P(bt()),n=it(()=>Number(t.value.slice(0,4))),r=it(()=>Number(t.value.slice(5,7))-1),o=it(()=>n.value+" 年 "+(r.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=it(()=>{const T=(new Date(n.value,r.value,1).getDay()+6)%7,U=new Date(n.value,r.value+1,0).getDate(),J=[];for(let Y=0;Y[F.date,F])),ne=U[2],$=new Map;for(const F of c.value){if(!F.inMonth)continue;const ee=Xr(Y.get(F.date),F.date,J,F.date===v),Ie=ne.filter(Pe=>Pe.date===F.date);$.set(F.date,{status:ee.status,label:ee.label,location:((R=Y.get(F.date))==null?void 0:R.location)||"",hasLog:Ie.length>0,hasMilestone:Ie.some(Pe=>Pe.is_milestone===1)})}f.value=$}wt([n,r],y,{immediate:!0}),wt(ur,()=>{y()});function h(V){var T;return((T=f.value.get(V))==null?void 0:T.status)??""}function w(V){const T=f.value.get(V);return T?V+" · "+T.label+(T.location?" · "+T.location:""):V}function C(V){var T;return!!((T=f.value.get(V))!=null&&T.hasLog)}function O(V){var T;return!!((T=f.value.get(V))!=null&&T.hasMilestone)}function B(){t.value=ea(t.value,-1)}function te(){t.value=ea(t.value,1)}function se(){t.value=bt()}const ae=P(null);function re(V,T){T&&(ae.value=V)}return wt(Fi,V=>{V&&(t.value=V,ae.value=V,Fi.value=null)},{immediate:!0}),(V,T)=>(E(),A("div",yg,[l("div",gg,[l("button",{class:"icon-btn",onClick:B},[Me(et,{name:"chevron-left",size:16})]),l("span",bg,z(o.value),1),l("button",{class:"icon-btn",onClick:te},[Me(et,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:se},"回到今天")]),l("div",wg,[(E(),A(Ke,null,at(i,U=>l("span",{key:U,class:"cal-week muted"},z(U),1)),64))]),l("div",_g,[(E(!0),A(Ke,null,at(c.value,(U,J)=>(E(),A("button",{key:J,class:tt(["cal-cell",{blank:!U.inMonth,weekend:U.weekend,selected:ae.value===U.date}]),title:U.inMonth?w(U.date):void 0,onClick:Y=>re(U.date,U.inMonth)},[U.inMonth?(E(),A(Ke,{key:0},[l("span",{class:tt(["daynum num",{today:U.date===cn(v)}])},z(Number(U.date.slice(8,10))),3),l("span",xg,[h(U.date)?(E(),A("span",{key:0,class:tt(["dot",h(U.date)])},null,2)):we("",!0),C(U.date)?(E(),At(et,{key:1,name:"check-circle",size:12,class:"mark-log"})):we("",!0),O(U.date)?(E(),At(et,{key:2,name:"star",size:12,class:"mark-star"})):we("",!0)])],64)):we("",!0)],10,kg))),128))]),Me(lr,{name:"drawer"},{default:vs(()=>[ae.value?(E(),A("aside",Cg,[l("div",$g,[T[1]||(T[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:T[0]||(T[0]=U=>ae.value=null)},[Me(et,{name:"close",size:16})])]),l("div",Sg,[Me(Pd,{date:ae.value},null,8,["date"])])])):we("",!0)]),_:1})]))}}),Tg=Ut(Eg,[["__scopeId","data-v-2404dfbe"]]),Ag={class:"detail-page"},Pg={class:"detail-toolbar"},Og=["value"],Mg=["disabled"],Ig=Ft({__name:"TodayView",setup(e){const t=P(bt()),n=it(()=>t.value===bt());function r(){t.value=on(t.value,-1)}function o(){t.value=on(t.value,1)}function i(){t.value=bt()}function c(f){const v=f.target.value;v&&(t.value=v)}return(f,v)=>(E(),A("div",Ag,[l("div",Pg,[l("button",{class:"icon-btn",title:"前一天",onClick:r},[Me(et,{name:"chevron-left",size:16})]),l("span",{class:tt(["date-title num",{"is-today":n.value}])},z(cn(ud)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[Me(et,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,Og),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Mg)]),Me(Pd,{date:t.value},null,8,["date"])]))}}),jg=Ut(Ig,[["__scopeId","data-v-76243d98"]]),Dg={class:"plan-page"},Lg={class:"card sec plan-head"},Kg={class:"nav-row"},Rg={class:"date-box"},Ng={class:"date-main num"},Fg={class:"muted date-sub num"},Vg={class:"muted sum-line"},Bg={class:"plan-list"},Ug={key:0,class:"card sec empty muted"},qg={class:"pi-time num"},Hg={class:"muted"},Wg={class:"pi-main"},zg={class:"pi-title"},Gg={class:"tag"},Yg={key:0,class:"state-done"},Jg={key:1,class:"state-skip"},Xg={key:0,class:"muted pi-note"},Qg={class:"muted pi-meta num"},Zg={key:0,class:"timer-live"},eb={class:"pi-ops"},tb=["onClick"],nb=["onClick"],sb=["onClick"],rb=["onClick"],ob=["onClick"],ab=["onClick"],ib={class:"dialog",role:"dialog","aria-label":"计划"},lb={class:"dialog-head"},ub={class:"dialog-title"},cb={class:"dialog-body"},db={class:"form-row"},fb={class:"form-row"},pb=["value"],vb={class:"form-row two"},mb={class:"form-row"},hb={key:0,class:"form-error"},yb={class:"dialog-btns"},gb=Ft({__name:"PlanView",setup(e){const t=P(bt()),n=P([]),r=P(!0),o=P(Date.now());let i=null;const c=it(()=>t.value===bt());async function f(){r.value=!0,n.value=await yh(t.value),r.value=!1}wt(t,f),wt(ur,f),an(()=>{f(),i=window.setInterval(()=>{o.value=Date.now()},3e4)}),Wn(()=>{i&&window.clearInterval(i)});function v(){t.value=on(t.value,-1)}function y(){t.value=on(t.value,1)}function h(){t.value=bt()}const w=it(()=>{const xe=n.value.length,me=n.value.filter(Ae=>Ae.status==="done").length,_e=n.value.reduce((Ae,pe)=>Ae+C(pe),0),We=n.value.reduce((Ae,pe)=>Ae+(pe.actual_minutes||0),0),Xe=B.value;if(Xe){const Ae=n.value.find(pe=>pe.id===Xe);Ae&&We+elapsedMinutes(Ae)}return{total:xe,done:me,plannedMin:_e,actualMin:We}});function C(xe){const[me,_e]=xe.start_time.split(":").map(Number),[We,Xe]=xe.end_time.split(":").map(Number);return Math.max(0,We*60+Xe-(me*60+_e))}function O(xe){return xe<60?xe+" 分钟":Math.floor(xe/60)+" 小时 "+xe%60+" 分"}const B=it(()=>{const xe=n.value.find(me=>!!me.timer_started_at);return xe?xe.id:null});function te(xe){if(!xe.timer_started_at)return xe.actual_minutes||0;const me=Math.max(0,Math.round((o.value-new Date(xe.timer_started_at).getTime())/6e4));return(xe.actual_minutes||0)+me}async function se(xe){xe.timer_started_at?(await yl(xe.id),He("已停止计时:"+xe.title)):(await kh(xe.id),He("开始计时:"+xe.title)),await f()}async function ae(xe,me){await _h(xe.id,me),await f()}const re=P(!1),V=P(null),T=P(""),U=P("学习"),J=P("09:00"),Y=P("10:00"),ne=P(""),$=P(""),R=["学习","健身","自律","工作","阅读","其他"];function F(){V.value=null,T.value="",U.value="学习",J.value="09:00",Y.value="10:00",ne.value="",$.value="",re.value=!0}function ee(xe){V.value=xe.id,T.value=xe.title,U.value=xe.kind,J.value=xe.start_time,Y.value=xe.end_time,ne.value=xe.note||"",$.value="",re.value=!0}async function Ie(){if(!T.value.trim()){$.value="请填写计划内容";return}if(Y.value<=J.value){$.value="结束时间需晚于开始时间";return}V.value?(await bh(V.value,{title:T.value.trim(),kind:U.value,start_time:J.value,end_time:Y.value,note:ne.value}),He("计划已更新")):(await gh({date:t.value,start_time:J.value,end_time:Y.value,title:T.value,kind:U.value,note:ne.value}),He("计划已添加")),re.value=!1,await f()}async function Pe(xe){await wh(xe.id),He("已删除"),await f()}const ke=["周日","周一","周二","周三","周四","周五","周六"];function Re(xe){return ke[Rs(xe).getDay()]}return(xe,me)=>(E(),A("div",Dg,[l("div",Lg,[l("div",Kg,[l("button",{class:"icon-btn",onClick:v},[Me(et,{name:"chevron-left",size:16})]),l("div",Rg,[l("span",Ng,z(t.value.slice(5))+" "+z(Re(t.value)),1),l("span",Fg,z(t.value),1)]),l("button",{class:"icon-btn",onClick:y},[Me(et,{name:"chevron-right",size:16})]),l("button",{class:tt(["btn btn-sm",{"btn-primary":!c.value}]),onClick:h},"今天",2),me[9]||(me[9]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-primary btn-sm",onClick:F},[Me(et,{name:"plus",size:14}),me[8]||(me[8]=Pt(" 添加计划",-1))])]),l("div",Vg,[Pt(" 共 "+z(w.value.total)+" 项 · 完成 "+z(w.value.done)+" 项 · 计划 "+z(O(w.value.plannedMin))+" · 实际投入 "+z(O(w.value.actualMin))+" ",1),B.value?(E(),A(Ke,{key:0},[me[10]||(me[10]=Pt(" · ",-1)),me[11]||(me[11]=l("span",{class:"timer-live"},"计时中",-1))],64)):we("",!0)])]),l("div",Bg,[!r.value&&!n.value.length?(E(),A("div",Ug," 今天还没有计划,点右上角「添加计划」开始规划:学习、健身、自律…… ")):we("",!0),(E(!0),A(Ke,null,at(n.value,_e=>(E(),A("div",{key:_e.id,class:tt(["card sec plan-item",{done:_e.status==="done",skip:_e.status==="skip",running:!!_e.timer_started_at}])},[l("div",qg,[Pt(z(_e.start_time),1),l("span",Hg," - "+z(_e.end_time),1)]),l("div",Wg,[l("div",zg,[l("span",Gg,z(_e.kind),1),l("span",{class:tt(["pi-text",{strike:_e.status==="done"}])},z(_e.title),3),_e.status==="done"?(E(),A("span",Yg,"已完成")):_e.status==="skip"?(E(),A("span",Jg,"已跳过")):we("",!0)]),_e.note?(E(),A("div",Xg,z(_e.note),1)):we("",!0),l("div",Qg,[_e.timer_started_at?(E(),A("span",Zg,"计时中 · 已 "+z(te(_e))+" 分钟",1)):_e.actual_minutes>0?(E(),A(Ke,{key:1},[Pt("实际投入 "+z(_e.actual_minutes)+" 分钟",1)],64)):we("",!0)])]),l("div",eb,[_e.status!=="done"?(E(),A("button",{key:0,class:tt(["btn btn-xs",{"timer-on":!!_e.timer_started_at}]),onClick:We=>se(_e)},z(_e.timer_started_at?"停止计时":"计时"),11,tb)):we("",!0),_e.status!=="done"?(E(),A("button",{key:1,class:"btn btn-xs",onClick:We=>ae(_e,"done")},"完成",8,nb)):we("",!0),_e.status==="todo"?(E(),A("button",{key:2,class:"btn btn-xs",onClick:We=>ae(_e,"skip")},"跳过",8,sb)):we("",!0),_e.status!=="todo"?(E(),A("button",{key:3,class:"btn btn-xs",onClick:We=>ae(_e,"todo")},"恢复",8,rb)):we("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:We=>ee(_e)},[Me(et,{name:"edit",size:14})],8,ob),l("button",{class:"icon-btn",title:"删除",onClick:We=>Pe(_e)},[Me(et,{name:"close",size:14})],8,ab)])],2))),128))]),(E(),At(cs,{to:"body"},[re.value?(E(),A("div",{key:0,class:"fixed-mask",onClick:me[7]||(me[7]=en(_e=>re.value=!1,["self"]))},[l("div",ib,[l("div",lb,[l("span",ub,z(V.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:me[0]||(me[0]=_e=>re.value=!1)},[Me(et,{name:"close",size:16})])]),l("div",cb,[l("div",db,[me[12]||(me[12]=l("label",null,"计划内容(学什么、做什么)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":me[1]||(me[1]=_e=>T.value=_e),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Et(Ie,["enter"])},null,544),[[Fe,T.value]])]),l("div",fb,[me[13]||(me[13]=l("label",null,"类别",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":me[2]||(me[2]=_e=>U.value=_e)},[(E(),A(Ke,null,at(R,_e=>l("option",{key:_e,value:_e},z(_e),9,pb)),64))],512),[[Pn,U.value]])]),l("div",vb,[l("div",null,[me[14]||(me[14]=l("label",null,"开始时间",-1)),Oe(l("input",{class:"input",type:"time","onUpdate:modelValue":me[3]||(me[3]=_e=>J.value=_e)},null,512),[[Fe,J.value]])]),l("div",null,[me[15]||(me[15]=l("label",null,"结束时间",-1)),Oe(l("input",{class:"input",type:"time","onUpdate:modelValue":me[4]||(me[4]=_e=>Y.value=_e)},null,512),[[Fe,Y.value]])])]),l("div",mb,[me[16]||(me[16]=l("label",null,"备注(选填)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":me[5]||(me[5]=_e=>ne.value=_e),placeholder:"目标、资料、提醒等",onKeydown:Et(Ie,["enter"])},null,544),[[Fe,ne.value]])]),$.value?(E(),A("div",hb,z($.value),1)):we("",!0)]),l("div",yb,[l("button",{class:"btn btn-sm",onClick:me[6]||(me[6]=_e=>re.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Ie},z(V.value?"保存":"添加"),1)])])])):we("",!0)]))]))}}),bb=Ut(gb,[["__scopeId","data-v-dd89fae2"]]),wb={class:"stats"},_b={class:"cards"},kb={class:"card stat-card"},xb={class:"stat-num num"},Cb={class:"card stat-card"},$b={class:"stat-num num"},Sb={class:"card stat-card"},Eb={class:"stat-num num"},Tb={class:"card stat-card"},Ab={class:"stat-num num"},Pb={class:"card section"},Ob={class:"heat"},Mb=["title"],Ib={class:"two-col"},jb={class:"card section"},Db={class:"bar-label"},Lb={class:"bar-track"},Kb={class:"muted num bar-num"},Rb={key:0,class:"muted"},Nb={class:"card section"},Fb={class:"bar-label"},Vb={class:"bar-track"},Bb={class:"muted num bar-num"},Ub={key:0,class:"muted"},qb={class:"card section"},Hb={class:"bar-label loc-label"},Wb={class:"bar-track"},zb={class:"muted num bar-num"},Gb={key:0,class:"muted"},Yb=Ft({__name:"StatsView",setup(e){const t=P({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=P([]),r=P([]),o=P([]),i=P([]);async function c(){const y=bt(),h="2000-01-01",w=await Promise.all([Ks(),Ca(h,y),Hr(h,y),nr(!0)]),C=w[0],O=w[1],B=w[2],te=w[3],se=O.filter(ke=>ke.clock_in_at||ke.kind==="makeup");let ae=0;for(const ke of se){const Re=Xr(ke,ke.date,C,ke.date===y);ae+=Re.workedMinutes??0}const re=new Set(B.map(ke=>ke.date));let V=0,T=y;for(re.has(T)||(T=on(y,-1));re.has(T);)V++,T=on(T,-1);t.value={attendDays:se.length,totalHours:(ae/60).toFixed(1),itemCount:B.length,streak:V};const U=new Map;for(const ke of se){const Re=ke.location||"未记录";U.set(Re,(U.get(Re)||0)+1)}i.value=Array.from(U.entries()).map(ke=>({name:ke[0],count:ke[1],percent:Math.round(ke[1]/(se.length||1)*100)})).sort((ke,Re)=>Re.count-ke.count);const J=B.length||1,Y=await Jr(),ne=new Map;for(const ke of B)ne.set(ke.category,(ne.get(ke.category)||0)+1);const $=new Set(Y);for(const ke of ne.keys())$.has(ke)||Y.push(ke);r.value=Y.map(ke=>{const Re=ne.get(ke)||0;return{key:ke,label:ke,count:Re,percent:Math.round(Re/J*100)}}).filter(ke=>ke.count>0).sort((ke,Re)=>Re.count-ke.count);const R=new Map(te.map(ke=>[ke.id,ke.name])),F=new Map;for(const ke of B){const Re=ke.project_id?R.get(ke.project_id)||"已删除项目":"无项目";F.set(Re,(F.get(Re)||0)+1)}o.value=Array.from(F.entries()).map(ke=>({name:ke[0],count:ke[1],percent:Math.round(ke[1]/J*100)})).sort((ke,Re)=>Re.count-ke.count);const ee=new Map;for(const ke of B)ee.set(ke.date,(ee.get(ke.date)||0)+1);const Ie=Qs(y),Pe=[];for(let ke=11;ke>=0;ke--){const Re=on(Ie,-7*ke),xe=[];for(let me=0;me<7;me++){const _e=on(Re,me);xe.push({date:_e,count:ee.get(_e)||0})}Pe.push(xe)}n.value=Pe}an(async()=>{await c()}),wt(ur,()=>{c()});function f(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function v(y,h){return y+" · "+(h?h+" 条":"无记录")}return(y,h)=>(E(),A("div",wb,[l("div",_b,[l("div",kb,[h[0]||(h[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",xb,z(t.value.attendDays),1)]),l("div",Cb,[h[1]||(h[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",$b,z(t.value.totalHours),1)]),l("div",Sb,[h[2]||(h[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",Eb,z(t.value.itemCount),1)]),l("div",Tb,[h[3]||(h[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",Ab,z(t.value.streak),1)])]),l("div",Pb,[h[4]||(h[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",Ob,[(E(!0),A(Ke,null,at(n.value,(w,C)=>(E(),A("div",{key:C,class:"heat-col"},[(E(!0),A(Ke,null,at(w,O=>(E(),A("span",{key:O.date,class:tt(["heat-cell","lv"+f(O.count)]),title:v(O.date,O.count)},null,10,Mb))),128))]))),128))]),h[5]||(h[5]=Hp('
少多
',1))]),l("div",Ib,[l("div",jb,[h[6]||(h[6]=l("div",{class:"section-title"},"分类分布",-1)),(E(!0),A(Ke,null,at(r.value,w=>(E(),A("div",{key:w.key,class:"bar-row"},[l("span",Db,z(w.label),1),l("span",Lb,[l("span",{class:"bar-fill",style:as({width:w.percent+"%"})},null,4)]),l("span",Kb,z(w.count)+" 条 · "+z(w.percent)+"%",1)]))),128)),r.value.length?we("",!0):(E(),A("div",Rb,"暂无数据"))]),l("div",Nb,[h[7]||(h[7]=l("div",{class:"section-title"},"项目投入",-1)),(E(!0),A(Ke,null,at(o.value,w=>(E(),A("div",{key:w.name,class:"bar-row"},[l("span",Fb,z(w.name),1),l("span",Vb,[l("span",{class:"bar-fill",style:as({width:w.percent+"%"})},null,4)]),l("span",Bb,z(w.count)+" 条 · "+z(w.percent)+"%",1)]))),128)),o.value.length?we("",!0):(E(),A("div",Ub,"暂无数据"))])]),l("div",qb,[h[8]||(h[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(E(!0),A(Ke,null,at(i.value,w=>(E(),A("div",{key:w.name,class:"bar-row"},[l("span",Hb,z(w.name),1),l("span",Wb,[l("span",{class:"bar-fill",style:as({width:w.percent+"%"})},null,4)]),l("span",zb,z(w.count)+" 天 · "+z(w.percent)+"%",1)]))),128)),i.value.length?we("",!0):(E(),A("div",Gb,"暂无数据"))])]))}}),Jb=Ut(Yb,[["__scopeId","data-v-f8410651"]]);async function Xb(e,t,n){const r=bt(),o=await Promise.all([Ks(),Ca(e,t),Hr(e,t),nr(!0),hh(e,t),Jr()]),i=o[0],c=o[1],f=o[2],v=o[3],y=o[4],h=o[5];let w=0,C=0,O=0;for(const F of c){(F.clock_in_at||F.kind==="makeup")&&w++,F.kind==="makeup"&&O++;const ee=Xr(F,F.date,i,F.date===r);C+=ee.workedMinutes??0}const B=new Map;for(const F of c){if(!(F.clock_in_at||F.kind==="makeup"))continue;const ee=F.location||"未记录";B.set(ee,(B.get(ee)||0)+1)}const te=Array.from(B.entries()).map(F=>({name:F[0],count:F[1]})).sort((F,ee)=>ee.count-F.count),se=f.length||1,ae=new Map;for(const F of f)ae.set(F.category,(ae.get(F.category)||0)+1);const re=new Set(h);for(const F of ae.keys())re.has(F)||h.push(F);const V=h.map(F=>{const ee=ae.get(F)||0;return{key:F,label:F,count:ee,percent:Math.round(ee/se*100)}}).filter(F=>F.count>0).sort((F,ee)=>ee.count-F.count),T=new Map(v.map(F=>[F.id,F.name])),U=new Map;for(const F of f){const ee=F.project_id?T.get(F.project_id)||"已删除项目":"无项目";U.set(ee,(U.get(ee)||0)+1)}const J=Array.from(U.entries()).map(F=>({name:F[0],count:F[1]})).sort((F,ee)=>ee.count-F.count),Y=f.filter(F=>F.is_milestone===1).map(F=>({date:F.date,content:F.content})),ne=f.filter(F=>F.needs_followup===1).map(F=>({date:F.date,content:F.content,remark:F.remark||""})),$=f.filter(F=>!!F.takeaway).map(F=>({date:F.date,text:F.takeaway})),R=y.map(F=>({weekStart:F.week_start,highlights:F.highlights||"",challenges:F.challenges||"",plan_next:F.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:w,totalHours:(C/60).toFixed(1),makeupCount:O,leaveCount:c.filter(F=>F.kind==="leave").length,itemCount:f.length,categoryStats:V,projectStats:J,locationStats:te,milestones:Y,followups:ne,takeaways:$,weekNotes:R}}function Qb(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(r=>r.name!=="未记录");n.length&&t.push("其中:"+n.map(r=>r.name+" "+r.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(r=>r.label+" "+r.percent+"%("+r.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(r=>r.name+" "+r.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((r,o)=>t.push(o+1+". 【成果】"+r.content+"("+r.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(r=>t.push("- 【待跟进】"+r.content+(r.remark?"("+r.date+" 备注:"+r.remark+")":"("+r.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(r=>t.push("- "+r.text+"("+r.date+")")):t.push("(无)");for(const r of e.weekNotes)t.push(""),t.push("### 周记("+r.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(r.highlights||"(无)")),t.push("- 踩的坑:"+(r.challenges||"(无)")),t.push("- 下周计划:"+(r.plan_next||"(无)"));return t.push(""),t.join(` +`)}const Zb="modulepreload",ew=function(e,t){return new URL(e,t).href},Vu={},Od=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=ew(y,r),y in Vu)return;Vu[y]=!0;const h=y.endsWith(".css"),w=h?'[rel="stylesheet"]':"";if(!!r)for(let B=c.length-1;B>=0;B--){const te=c[B];if(te.href===y&&(!h||te.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${w}`))return;const O=document.createElement("link");if(O.rel=h?"stylesheet":Zb,h||(O.as="script"),O.crossOrigin="",O.href=y,v&&O.setAttribute("nonce",v),document.head.appendChild(O),h)return new Promise((B,te)=>{O.addEventListener("load",B),O.addEventListener("error",()=>te(new Error(`Unable to preload CSS for ${y}`)))})}))}function i(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const tw=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},r=(i,c)=>{n.platforms.set(i,c)},o=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=r,n.setPlatform=o,n},nw=e=>e.CapacitorPlatforms=tw(e),Md=nw(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Md.addPlatform;Md.setPlatform;var or;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(or||(or={}));class gi extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const sw=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},rw=e=>{var t,n,r,o,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,h=()=>c!==null?c.name:sw(e),w=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||h,C=()=>w()!=="web",O=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||C,B=Y=>{const ne=T.get(Y);return!!(ne!=null&&ne.platforms.has(w())||ae(Y))},te=((r=y==null?void 0:y.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||B,se=Y=>{var ne;return(ne=f.PluginHeaders)===null||ne===void 0?void 0:ne.find($=>$.name===Y)},ae=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||se,re=Y=>e.console.error(Y),V=(Y,ne,$)=>Promise.reject(`${$} does not have an implementation of "${ne}".`),T=new Map,U=(Y,ne={})=>{const $=T.get(Y);if($)return console.warn(`Capacitor plugin "${Y}" already registered. Cannot register plugins twice.`),$.proxy;const R=w(),F=ae(Y);let ee;const Ie=async()=>(!ee&&R in ne?ee=typeof ne[R]=="function"?ee=await ne[R]():ee=ne[R]:c!==null&&!ee&&"web"in ne&&(ee=typeof ne.web=="function"?ee=await ne.web():ee=ne.web),ee),Pe=(We,Xe)=>{var Ae,pe;if(F){const Ne=F==null?void 0:F.methods.find(dt=>Xe===dt.name);if(Ne)return Ne.rtype==="promise"?dt=>f.nativePromise(Y,Xe.toString(),dt):(dt,je)=>f.nativeCallback(Y,Xe.toString(),dt,je);if(We)return(Ae=We[Xe])===null||Ae===void 0?void 0:Ae.bind(We)}else{if(We)return(pe=We[Xe])===null||pe===void 0?void 0:pe.bind(We);throw new gi(`"${Y}" plugin is not implemented on ${R}`,or.Unimplemented)}},ke=We=>{let Xe;const Ae=(...pe)=>{const Ne=Ie().then(dt=>{const je=Pe(dt,We);if(je){const fe=je(...pe);return Xe=fe==null?void 0:fe.remove,fe}else throw new gi(`"${Y}.${We}()" is not implemented on ${R}`,or.Unimplemented)});return We==="addListener"&&(Ne.remove=async()=>Xe()),Ne};return Ae.toString=()=>`${We.toString()}() { [capacitor code] }`,Object.defineProperty(Ae,"name",{value:We,writable:!1,configurable:!1}),Ae},Re=ke("addListener"),xe=ke("removeListener"),me=(We,Xe)=>{const Ae=Re({eventName:We},Xe),pe=async()=>{const dt=await Ae;xe({eventName:We,callbackId:dt},Xe)},Ne=new Promise(dt=>Ae.then(()=>dt({remove:pe})));return Ne.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await pe()},Ne},_e=new Proxy({},{get(We,Xe){switch(Xe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return F?me:Re;case"removeListener":return xe;default:return ke(Xe)}}});return v[Y]=_e,T.set(Y,{name:Y,proxy:_e,platforms:new Set([...Object.keys(ne),...F?[R]:[]])}),_e},J=((i=y==null?void 0:y.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||U;return f.convertFileSrc||(f.convertFileSrc=Y=>Y),f.getPlatform=w,f.handleError=re,f.isNativePlatform=O,f.isPluginAvailable=te,f.pluginMethodNoop=V,f.registerPlugin=J,f.Exception=gi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},ow=e=>e.Capacitor=rw(e),ar=ow(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Id=ar.registerPlugin;ar.Plugins;class jd{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const o=this.listeners[t];if(!o){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}o.forEach(i=>i(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new ar.Exception(t,or.Unimplemented)}unavailable(t="not available"){return new ar.Exception(t,or.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const Bu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Uu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class aw extends jd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Uu(o).trim(),i=Uu(i).trim(),n[o]=i}),n}async setCookie(t){try{const n=Bu(t.key),r=Bu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${o}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Id("CapacitorCookies",{web:()=>new aw});const iw=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),lw=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,i,c)=>(o[i]=e[t[c]],o),{})},uw=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[i,c]=o;let f,v;return Array.isArray(c)?(v="",c.forEach(y=>{f=t?encodeURIComponent(y):y,v+=`${i}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${i}=${f}`),`${r}&${v}`},"").substr(1):null,cw=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=lw(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class dw extends jd{async request(t){const n=cw(t,t.webFetchExtra),r=uw(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,i=await fetch(o,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,y;switch(f){case"arraybuffer":case"blob":y=await i.blob(),v=await iw(y);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const h={};return i.headers.forEach((w,C)=>{h[C]=w}),{data:v,headers:h,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Id("CapacitorHttp",{web:()=>new dw});async function gl(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(ar.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Od(async()=>{const{Filesystem:y,Directory:h,Encoding:w}=await import("./index-NiysaoXd.js");return{Filesystem:y,Directory:h,Encoding:w}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:v.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:v.UTF8,recursive:!0})).uri}}const r=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");return i.href=o,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const fw=Object.freeze(Object.defineProperty({__proto__:null,downloadText:gl},Symbol.toStringTag,{value:"Module"}));async function Wi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function pw(e){const t=await Promise.all([Ct("ai_base_url",""),Ct("ai_api_key",""),Ct("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),r=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};r&&(c.Authorization="Bearer "+r);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let C="接口返回 "+y.status;try{const O=await y.json();O&&O.error&&O.error.message&&(C+=":"+O.error.message)}catch{}throw new Error(C)}const h=await y.json(),w=h&&h.choices&&h.choices[0]&&h.choices[0].message&&h.choices[0].message.content;if(!w)throw new Error("接口未返回内容");return String(w)}const vw={class:"report"},mw={class:"report-toolbar"},hw={class:"seg"},yw=["onClick"],gw=["disabled"],bw=["disabled"],ww={key:0,class:"ai-error"},_w={class:"report-grid"},kw={class:"report-left"},xw={class:"card section"},Cw={class:"section-title"},$w={class:"muted note-saved"},Sw={class:"card section"},Ew={class:"report-right"},Tw={key:0,class:"card section"},Aw={class:"sum-row"},Pw={class:"num"},Ow={class:"sum-row"},Mw={class:"num"},Iw={class:"sum-row"},jw={class:"num"},Dw={class:"sum-row"},Lw={class:"num"},Kw={class:"sum-row"},Rw={class:"num"},Nw={class:"muted"},Fw={class:"num"},Vw={key:0,class:"muted sum-empty"},Bw={class:"muted"},Uw={key:1,class:"muted sum-empty"},qw={class:"muted"},Hw={key:2,class:"muted sum-empty"},Ww={class:"muted"},zw={key:3,class:"muted sum-empty"},Gw=Ft({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=P("week"),r=P(Qs(bt())),o=P(bt()),i=P(null),c=P(""),f=P(!1),v=P(!1),y=P(null),h=P(""),w=P(Qs(bt())),C=P(""),O=P(""),B=P(""),te=P(!1);async function se(){const ne=await hl(w.value);C.value=(ne==null?void 0:ne.highlights)||"",O.value=(ne==null?void 0:ne.challenges)||"",B.value=(ne==null?void 0:ne.plan_next)||"",te.value=!1}async function ae(){await mh(w.value,{highlights:C.value.trim()||null,challenges:O.value.trim()||null,plan_next:B.value.trim()||null}),te.value=!0,await V()}function re(ne){const $=bt();if(ne==="week"){const R=Qs($);return{start:R,end:on(R,6),label:"本周"}}if(ne==="month"){const R=$.slice(0,7);return{start:R+"-01",end:$,label:R+" 本月"}}return ne==="all"?{start:"2000-01-01",end:$,label:"全部实习期"}:{start:r.value,end:o.value,label:r.value+" ~ "+o.value}}async function V(){f.value=!0;const ne=re(n.value),$=await Xb(ne.start,ne.end,ne.label);i.value=$,c.value=Qb($),f.value=!1}wt(n,V),wt([r,o],()=>{n.value==="custom"&&V()}),an(async()=>{await se(),await V()});async function T(){const ne=bt().replace(/-/g,""),$=await gl("实习工作总结_"+ne+".md",c.value);He($?"总结已导出到:"+$:"总结已导出到系统下载目录")}async function U(){await Wi(c.value),He("总结已复制到剪贴板")}async function J(){if(v.value)return;h.value="";const ne=c.value.trim();if(!ne){h.value="当前草稿为空,无法润色";return}v.value=!0;try{y.value=c.value,c.value=await pw(ne),He("AI 润色完成")}catch($){y.value=null,h.value=$ instanceof Error?$.message:"润色失败"}v.value=!1}function Y(){y.value!==null&&(c.value=y.value),y.value=null}return(ne,$)=>(E(),A("div",vw,[l("div",mw,[l("div",hw,[(E(),A(Ke,null,at(t,R=>l("button",{key:R.key,class:tt(["seg-btn",{active:n.value===R.key}]),onClick:F=>n.value=R.key},z(R.label),11,yw)),64))]),n.value==="custom"?(E(),A(Ke,{key:0},[Oe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":$[0]||($[0]=R=>r.value=R)},null,512),[[Fe,r.value]]),$[6]||($[6]=l("span",{class:"muted"},"至",-1)),Oe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":$[1]||($[1]=R=>o.value=R)},null,512),[[Fe,o.value]])],64)):we("",!0),$[10]||($[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:J},[Me(et,{name:"edit",size:14}),$[7]||($[7]=Pt("AI 润色 ",-1))],8,gw),y.value!==null?(E(),A("button",{key:1,class:"btn btn-sm",onClick:Y},"还原润色前")):we("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:V},[Me(et,{name:"edit",size:14}),$[8]||($[8]=Pt("重新生成 ",-1))],8,bw),l("button",{class:"btn btn-sm",onClick:U},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:T},[Me(et,{name:"export",size:14}),$[9]||($[9]=Pt("导出 Markdown ",-1))])]),h.value?(E(),A("div",ww,z(h.value),1)):we("",!0),l("div",_w,[l("div",kw,[l("div",xw,[l("div",Cw,"本周周记("+z(w.value)+" 起)",1),$[11]||($[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":$[2]||($[2]=R=>C.value=R),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[Fe,C.value]]),$[12]||($[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":$[3]||($[3]=R=>O.value=R),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[Fe,O.value]]),$[13]||($[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":$[4]||($[4]=R=>B.value=R),placeholder:"下周准备做什么",onBlur:ae},null,544),[[Fe,B.value]]),l("div",$w,z(te.value?"已保存":"失焦自动保存"),1)]),l("div",Sw,[$[14]||($[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Oe(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":$[5]||($[5]=R=>c.value=R),spellcheck:"false"},null,512),[[Fe,c.value]])])]),l("div",Ew,[i.value?(E(),A("div",Tw,[$[20]||($[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",Aw,[$[15]||($[15]=l("span",{class:"muted"},"出勤",-1)),l("span",Pw,z(i.value.attendDays)+" 天",1)]),l("div",Ow,[$[16]||($[16]=l("span",{class:"muted"},"工时",-1)),l("span",Mw,z(i.value.totalHours)+" 小时",1)]),l("div",Iw,[$[17]||($[17]=l("span",{class:"muted"},"补卡",-1)),l("span",jw,z(i.value.makeupCount)+" 次",1)]),l("div",Dw,[$[18]||($[18]=l("span",{class:"muted"},"请假",-1)),l("span",Lw,z(i.value.leaveCount)+" 天",1)]),l("div",Kw,[$[19]||($[19]=l("span",{class:"muted"},"记录",-1)),l("span",Rw,z(i.value.itemCount)+" 条",1)]),$[21]||($[21]=l("div",{class:"section-sub"},"分类分布",-1)),(E(!0),A(Ke,null,at(i.value.categoryStats,R=>(E(),A("div",{key:R.key,class:"sum-row"},[l("span",Nw,z(R.label),1),l("span",Fw,z(R.count)+" 条 · "+z(R.percent)+"%",1)]))),128)),i.value.categoryStats.length?we("",!0):(E(),A("div",Vw,"(无)")),$[22]||($[22]=l("div",{class:"section-sub"},"主要成果",-1)),(E(!0),A(Ke,null,at(i.value.milestones,(R,F)=>(E(),A("div",{key:"m"+F,class:"sum-item"},[Pt(z(R.content),1),l("span",Bw,"("+z(R.date)+")",1)]))),128)),i.value.milestones.length?we("",!0):(E(),A("div",Uw,"(无)")),$[23]||($[23]=l("div",{class:"section-sub"},"待跟进",-1)),(E(!0),A(Ke,null,at(i.value.followups,(R,F)=>(E(),A("div",{key:"f"+F,class:"sum-item"},[Pt(z(R.content),1),l("span",qw,"("+z(R.date)+")",1)]))),128)),i.value.followups.length?we("",!0):(E(),A("div",Hw,"(无)")),$[24]||($[24]=l("div",{class:"section-sub"},"学习与成长",-1)),(E(!0),A(Ke,null,at(i.value.takeaways,(R,F)=>(E(),A("div",{key:"t"+F,class:"sum-item"},[Pt(z(R.text),1),l("span",Ww,"("+z(R.date)+")",1)]))),128)),i.value.takeaways.length?we("",!0):(E(),A("div",zw,"(无)"))])):we("",!0)])])]))}}),Yw=Ut(Gw,[["__scopeId","data-v-43f9c59b"]]),Jw=["aria-label"],Xw={class:"dialog-head"},Qw={class:"dialog-title"},Zw={class:"dialog-body"},e_={class:"form-grid"},t_={class:"field span2"},n_={class:"seg"},s_={class:"field"},r_={class:"field"},o_={class:"field"},a_=["value"],i_={class:"add-cat"},l_=["onKeydown"],u_={key:0,class:"field"},c_={class:"seg"},d_={class:"field span2"},f_={key:0,class:"form-error"},p_={class:"dialog-btns"},v_=Ft({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=P("expense"),i=P(""),c=P(""),f=P(""),v=P(""),y=P(!1),h=P(!1),w=P(""),C=P(null);function O(T){n.open&&T.key==="Escape"&&r("cancel")}wt(()=>n.open,async T=>{var U;T?(await te(),o.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,y.value=n.initial.reimbursable===1,h.value=n.initial.reimbursed===1,w.value="",window.addEventListener("keydown",O),await ir(),(U=C.value)==null||U.focus()):window.removeEventListener("keydown",O)}),Wn(()=>window.removeEventListener("keydown",O)),wt(o,T=>{i.value=T==="expense"?EXPENSE_CATEGORIES[0]:INCOME_CATEGORIES[0]});const B=P([]);async function te(){B.value=await Wr(o.value)}const se=P("");async function ae(){const T=se.value.trim();if(T){if(B.value.includes(T)){se.value="";return}B.value.push(T),await Es(o.value,B.value),i.value=T,se.value=""}}function re(){return i.value&&B.value.includes(i.value)?i.value:B.value[0]}function V(){const T=String(c.value??"").trim(),U=Number(T);if(!T||!isFinite(U)||U<=0){w.value="请填写大于 0 的金额";return}if(!f.value){w.value="请选择日期";return}const J=o.value==="expense"&&y.value?1:0;r("save",{type:o.value,category:re(),amount:Math.round(U*100),date:f.value,note:String(v.value??"").trim(),reimbursable:J,reimbursed:J&&h.value?1:0})}return(T,U)=>(E(),At(cs,{to:"body"},[Me(lr,{name:"modal"},{default:vs(()=>[e.open?(E(),A("div",{key:0,class:"mask",onClick:U[12]||(U[12]=en(J=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Xw,[l("span",Qw,z(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=J=>r("cancel"))},[Me(et,{name:"close",size:16})])]),l("div",Zw,[l("div",e_,[l("div",t_,[U[13]||(U[13]=l("label",null,"类型",-1)),l("div",n_,[l("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:U[1]||(U[1]=J=>o.value="expense")},"支出",2),l("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:U[2]||(U[2]=J=>o.value="income")},"收入",2)])]),l("div",s_,[U[14]||(U[14]=l("label",null,"金额(元,必填)",-1)),Oe(l("input",{ref_key:"amountInput",ref:C,class:tt(["input",{invalid:w.value}]),"onUpdate:modelValue":U[3]||(U[3]=J=>c.value=J),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Fe,c.value]])]),l("div",r_,[U[15]||(U[15]=l("label",null,"日期(必填)",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":U[4]||(U[4]=J=>f.value=J)},null,512),[[Fe,f.value]])]),l("div",o_,[U[16]||(U[16]=l("label",null,"分类(可直接新增)",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":U[5]||(U[5]=J=>i.value=J)},[(E(!0),A(Ke,null,at(B.value,J=>(E(),A("option",{key:J,value:J},z(J),9,a_))),128))],512),[[Pn,i.value]]),l("div",i_,[Oe(l("input",{class:"input add-cat-input","onUpdate:modelValue":U[6]||(U[6]=J=>se.value=J),placeholder:"新增分类名",onKeydown:Et(en(ae,["prevent"]),["enter"])},null,40,l_),[[Fe,se.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ae},"添加")])]),o.value==="expense"?(E(),A("div",u_,[U[17]||(U[17]=l("label",null,"报销状态",-1)),l("div",c_,[l("button",{class:tt(["seg-btn",{active:!y.value}]),onClick:U[7]||(U[7]=J=>{y.value=!1,h.value=!1})},"无需报销",2),l("button",{class:tt(["seg-btn",{active:y.value&&!h.value}]),onClick:U[8]||(U[8]=J=>{y.value=!0,h.value=!1})},"待报销",2),l("button",{class:tt(["seg-btn",{active:y.value&&h.value}]),onClick:U[9]||(U[9]=J=>{y.value=!0,h.value=!0})},"已报销",2)])])):we("",!0),l("div",d_,[U[18]||(U[18]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":U[10]||(U[10]=J=>v.value=J),placeholder:"选填"},null,512),[[Fe,v.value]])])]),w.value?(E(),A("div",f_,z(w.value),1)):we("",!0)]),l("div",p_,[l("button",{class:"btn btn-sm",onClick:U[11]||(U[11]=J=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:V},"保存")])],8,Jw)])):we("",!0)]),_:1})]))}}),m_=Ut(v_,[["__scopeId","data-v-9f38206c"]]),h_={class:"ledger-page"},y_={class:"ledger-toolbar"},g_={class:"month-title num"},b_={class:"cards"},w_={class:"card stat-card"},__={class:"stat-num num amt-income"},k_={class:"card stat-card"},x_={class:"stat-num num"},C_={class:"card stat-card"},$_={class:"card stat-card"},S_={class:"stat-num num amt-warn"},E_={class:"card sec"},T_={class:"form-grid"},A_={class:"field span2"},P_={class:"seg"},O_={class:"field"},M_={class:"field"},I_={class:"field"},j_=["value"],D_={key:0,class:"field"},L_={class:"field span2"},K_={key:0,class:"form-error"},R_={class:"form-footer"},N_=["disabled"],F_=["disabled"],V_={key:0,class:"card sec"},B_={class:"bar-label"},U_={class:"bar-track"},q_={class:"muted num bar-num"},H_={key:1,class:"card section"},W_={class:"form-error"},z_={class:"card table-card"},G_={class:"tx-table"},Y_={class:"num","data-label":"日期"},J_={"data-label":"分类"},X_={class:"tag"},Q_={class:"td-note","data-label":"备注"},Z_={"data-label":"报销"},e1={key:0,class:"muted"},t1={key:1,class:"tx-done"},n1={key:2,class:"tx-pending"},s1={class:"ops-cell"},r1={class:"ops"},o1=["onClick"],a1=["onClick"],i1=["onClick"],l1={key:0},u1={class:"muted vault-note num"},c1=Ft({__name:"LedgerView",setup(e){const t=P(bt()),n=P([]),r=P(!0),o=P("expense"),i=P(""),c=P(""),f=P(bt()),v=P(""),y=P(!1),h=P(""),w=P(""),C=P(!1),O=P(!1),B=P(null),te=P({type:"expense",category:"",amountYuan:"",date:bt(),note:"",reimbursable:0,reimbursed:0}),se=P(null),ae=it(()=>t.value.slice(0,7)+"-01"),re=it(()=>{const je=Number(t.value.slice(0,4)),fe=Number(t.value.slice(5,7))-1,De=new Date(je,fe+1,0).getDate();return t.value.slice(0,7)+"-"+(De<10?"0"+De:String(De))}),V=it(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function T(){r.value=!0;try{n.value=await Ah(ae.value,re.value),w.value=""}catch(je){w.value="账目加载失败:"+(je instanceof Error?je.stack||je.message:String(je)),He("账目加载失败")}r.value=!1}an(T),wt(t,T);const U=P([]),J=P([]);async function Y(){U.value=await Wr("expense"),J.value=await Wr("income"),o.value==="expense"&&!U.value.includes(c.value)&&(c.value=U.value[0]||""),o.value==="income"&&!J.value.includes(c.value)&&(c.value=J.value[0]||"")}Y(),wt(o,je=>{c.value=je==="expense"?U.value[0]||"":J.value[0]||""});const ne=it(()=>n.value.slice().sort((je,fe)=>je.date===fe.date?fe.id-je.id:je.date{let je=0,fe=0,De=0;for(const rt of n.value)rt.type==="income"?je+=rt.amount:(fe+=rt.amount,rt.reimbursable===1&&rt.reimbursed!==1&&(De+=rt.amount));return{income:je,expense:fe,pending:De,balance:je-fe}}),R=P("all"),F=P("all"),ee=it(()=>ne.value.filter(je=>!(R.value!=="all"&&je.type!==R.value||F.value==="pending"&&!(je.type==="expense"&&je.reimbursable===1&&je.reimbursed!==1)||F.value==="done"&&!(je.reimbursable===1&&je.reimbursed===1)))),Ie=it(()=>{const je=new Map;let fe=0;for(const rt of n.value)rt.type==="expense"&&(je.set(rt.category,(je.get(rt.category)||0)+rt.amount),fe+=rt.amount);const De=fe||1;return Array.from(je.entries()).map(rt=>({name:rt[0],amount:rt[1],percent:Math.round(rt[1]/De*100)})).sort((rt,Ve)=>Ve.amount-rt.amount)});function Pe(je){return(je/100).toFixed(2)}function ke(je){return(je.type==="income"?"+":"-")+Pe(je.amount)}function Re(){t.value=ea(t.value,-1)}function xe(){t.value=ea(t.value,1)}function me(){t.value=bt()}wt(i,()=>{h.value&&(h.value="")});async function _e(){const je=String(i.value??"").trim(),fe=Number(je);if(!je||!isFinite(fe)||fe<=0){h.value="请填写大于 0 的金额";return}if(!f.value){h.value="请选择日期";return}if(!C.value){C.value=!0;try{await Ph({type:o.value,category:c.value,amount:Math.round(fe*100),date:f.value,note:String(v.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(De){He("添加失败:"+(De instanceof Error?De.message:String(De))),C.value=!1;return}i.value="",v.value="",y.value=!1,h.value="",await T(),He("记账已添加"),C.value=!1}}const We=it(()=>String(i.value??"").trim()!==""||String(v.value??"").trim()!=="");function Xe(){i.value="",v.value="",y.value=!1,h.value=""}async function Ae(je){await Ih(je.id),await T(),He("已标记为已报销")}function pe(je){B.value=je.id,te.value={type:je.type,category:je.category,amountYuan:Pe(je.amount),date:je.date,note:je.note||"",reimbursable:je.reimbursable,reimbursed:je.reimbursed},O.value=!0}async function Ne(je){const fe=B.value;await Oh(fe,je),O.value=!1,await T(),He("账目已更新")}async function dt(){se.value&&se.value.id&&await Mh(se.value.id),se.value=null,await T(),He("账目已删除")}return(je,fe)=>(E(),A("div",h_,[l("div",y_,[l("button",{class:"icon-btn",onClick:Re},[Me(et,{name:"chevron-left",size:16})]),l("span",g_,z(V.value),1),l("button",{class:"icon-btn",onClick:xe},[Me(et,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:me},"回到本月"),fe[13]||(fe[13]=l("span",{class:"flex1"},null,-1)),Oe(l("select",{class:"select w-filter","onUpdate:modelValue":fe[0]||(fe[0]=De=>R.value=De)},[...fe[11]||(fe[11]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[Pn,R.value]]),Oe(l("select",{class:"select w-filter","onUpdate:modelValue":fe[1]||(fe[1]=De=>F.value=De)},[...fe[12]||(fe[12]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[Pn,F.value]])]),l("div",b_,[l("div",w_,[fe[14]||(fe[14]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",__,z(Pe($.value.income)),1)]),l("div",k_,[fe[15]||(fe[15]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",x_,z(Pe($.value.expense)),1)]),l("div",C_,[fe[16]||(fe[16]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:tt(["stat-num num",{"amt-income":$.value.balance>=0,"amt-expense":$.value.balance<0}])},z(Pe($.value.balance)),3)]),l("div",$_,[fe[17]||(fe[17]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",S_,z(Pe($.value.pending)),1)])]),l("div",E_,[fe[24]||(fe[24]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增一笔"),l("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),l("div",T_,[l("div",A_,[fe[18]||(fe[18]=l("label",null,"类型",-1)),l("div",P_,[l("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:fe[2]||(fe[2]=De=>o.value="expense")},"支出",2),l("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:fe[3]||(fe[3]=De=>o.value="income")},"收入",2)])]),l("div",O_,[fe[19]||(fe[19]=l("label",null,"金额(元,必填)",-1)),Oe(l("input",{class:tt(["input",{invalid:h.value}]),"onUpdate:modelValue":fe[4]||(fe[4]=De=>i.value=De),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:Et(_e,["enter"])},null,34),[[Fe,i.value]])]),l("div",M_,[fe[20]||(fe[20]=l("label",null,"日期",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":fe[5]||(fe[5]=De=>f.value=De)},null,512),[[Fe,f.value]])]),l("div",I_,[fe[21]||(fe[21]=l("label",null,"分类",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":fe[6]||(fe[6]=De=>c.value=De)},[(E(!0),A(Ke,null,at(o.value==="expense"?U.value:J.value,De=>(E(),A("option",{key:De,value:De},z(De),9,j_))),128))],512),[[Pn,c.value]])]),o.value==="expense"?(E(),A("div",D_,[fe[22]||(fe[22]=l("label",null,"报销",-1)),l("button",{class:tt(["toggle-btn",{on:y.value}]),onClick:fe[7]||(fe[7]=De=>y.value=!y.value)},z(y.value?"需要报销":"无需报销"),3)])):we("",!0),l("div",L_,[fe[23]||(fe[23]=l("label",null,"备注",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":fe[8]||(fe[8]=De=>v.value=De),placeholder:"选填,如:客户现场午餐",onKeydown:Et(_e,["enter"])},null,544),[[Fe,v.value]])])]),h.value?(E(),A("div",K_,z(h.value),1)):we("",!0),l("div",R_,[l("button",{class:"btn btn-sm",disabled:!We.value,onClick:Xe},"重置",8,N_),l("button",{class:"btn btn-primary btn-sm",disabled:C.value,onClick:_e},"添加记录",8,F_)])]),Ie.value.length?(E(),A("div",V_,[fe[25]||(fe[25]=l("div",{class:"sec-title"},"本月支出分类",-1)),(E(!0),A(Ke,null,at(Ie.value,De=>(E(),A("div",{key:De.name,class:"bar-row"},[l("span",B_,z(De.name),1),l("span",U_,[l("span",{class:"bar-fill",style:as({width:De.percent+"%"})},null,4)]),l("span",q_,z(Pe(De.amount))+" 元 · "+z(De.percent)+"%",1)]))),128))])):we("",!0),w.value?(E(),A("div",H_,[l("div",W_,z(w.value),1),fe[26]||(fe[26]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):we("",!0),l("div",z_,[l("table",G_,[fe[28]||(fe[28]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(E(!0),A(Ke,null,at(ee.value,De=>(E(),A("tr",{key:De.id},[l("td",Y_,z(De.date),1),l("td",J_,[l("span",X_,z(De.category),1)]),l("td",{class:tt(["num",De.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},z(ke(De)),3),l("td",Q_,z(De.note||"--"),1),l("td",Z_,[De.type!=="expense"||De.reimbursable!==1?(E(),A("span",e1,"--")):De.reimbursed===1?(E(),A("span",t1,"已报销")):(E(),A("span",n1,"待报销"))]),l("td",s1,[l("div",r1,[De.type==="expense"&&De.reimbursable===1&&De.reimbursed!==1?(E(),A("button",{key:0,class:"btn btn-xs",onClick:rt=>Ae(De)},"标记已报销",8,o1)):we("",!0),l("button",{class:"btn btn-xs",onClick:rt=>pe(De)},"编辑",8,a1),l("button",{class:"btn btn-xs",onClick:rt=>se.value=De},"删除",8,i1)])])]))),128)),!ee.value.length&&!r.value?(E(),A("tr",l1,[...fe[27]||(fe[27]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):we("",!0)])])]),l("div",u1,"本月 "+z(n.value.length)+" 条 · 当前筛选 "+z(ee.value.length)+" 条",1),Me(m_,{open:O.value,title:(B.value,"编辑账目"),initial:te.value,onCancel:fe[9]||(fe[9]=De=>O.value=!1),onSave:Ne},null,8,["open","title","initial"]),Me(qn,{open:!!se.value,title:"删除确认",message:se.value?"将删除 "+se.value.date+" 的账目("+se.value.category+" "+Pe(se.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[10]||(fe[10]=De=>se.value=null),onConfirm:dt},null,8,["open","message"])]))}}),d1=Ut(c1,[["__scopeId","data-v-2660d908"]]),f1={class:"memo-page"},p1={class:"card memo-list"},v1={class:"pane-head"},m1={class:"pane-title"},h1={class:"memo-scroll"},y1=["onClick"],g1={class:"memo-item-title"},b1={class:"muted memo-item-sub"},w1={class:"muted num memo-item-time"},_1={key:0,class:"muted empty"},k1={class:"card memo-editor"},x1={class:"editor-foot"},C1={class:"muted foot-info"},$1=["disabled"],S1=["disabled"],E1={key:1,class:"empty muted editor-empty"},T1=Ft({__name:"MemoView",setup(e){const t=P([]),n=P(null),r=P(!1),o=P(""),i=P(""),c=P(null),f=P(null);async function v(){if(t.value=await xh(),n.value&&n.value.id){const J=t.value.find(Y=>Y.id===n.value.id);J&&(n.value=J)}}an(async()=>{await v(),t.value.length&&w(t.value[0]),window.addEventListener("keydown",y)}),Wn(()=>window.removeEventListener("keydown",y)),wt(Vi,async J=>{if(!J)return;t.value.length||await v();const Y=t.value.find(ne=>ne.id===J);Vi.value=null,Y&&C(Y)},{immediate:!0});function y(J){(J.ctrlKey||J.metaKey)&&J.key.toLowerCase()==="s"&&r.value&&h.value&&(J.preventDefault(),se())}const h=it(()=>{if(!r.value)return!1;const J=n.value?n.value.title:"",Y=n.value?n.value.content:"";return o.value!==J||i.value!==Y});function w(J){n.value=J,r.value=!0,o.value=J.title,i.value=J.content}function C(J){if(!(r.value&&n.value&&n.value.id===J.id)){if(h.value){f.value={type:"select",memo:J};return}w(J)}}function O(){if(h.value){f.value={type:"new"};return}B()}function B(){n.value=null,r.value=!0,o.value="",i.value=""}function te(){n.value?w(n.value):B()}async function se(){if(!o.value.trim()&&!i.value.trim()){He("标题与内容不能都为空");return}if(n.value&&n.value.id)await $h(n.value.id,o.value,i.value),He("备忘已保存");else{const J=await Ch(o.value,i.value);n.value=J,o.value=J.title,i.value=J.content,He("备忘已创建")}await v()}function ae(){n.value&&n.value.id&&(c.value=n.value)}async function re(){c.value&&c.value.id&&(await Sh(c.value.id),He("备忘已删除")),c.value=null,await v(),B()}function V(){const J=f.value;f.value=null,J&&(J.type==="select"?w(J.memo):B())}function T(J){return(J.content||"").replace(/\s+/g," ").slice(0,30)}function U(J){return J.replace("T"," ").slice(0,16)}return(J,Y)=>(E(),A("div",f1,[l("aside",p1,[l("div",v1,[l("span",m1,"备忘录("+z(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:O},"新建")]),l("div",h1,[(E(!0),A(Ke,null,at(t.value,ne=>(E(),A("div",{key:ne.id,class:tt(["memo-item",{active:r.value&&n.value&&n.value.id===ne.id}]),onClick:$=>C(ne)},[l("div",g1,z(ne.title||"无标题"),1),l("div",b1,z(T(ne)||"空"),1),l("div",w1,z(U(ne.updated_at)),1)],10,y1))),128)),t.value.length?we("",!0):(E(),A("div",_1,"暂无备忘"))])]),l("section",k1,[r.value?(E(),A(Ke,{key:0},[Oe(l("input",{class:"input title-input","onUpdate:modelValue":Y[0]||(Y[0]=ne=>o.value=ne),placeholder:"标题"},null,512),[[Fe,o.value]]),Oe(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":Y[1]||(Y[1]=ne=>i.value=ne),placeholder:"内容"},null,512),[[Fe,i.value]]),l("div",x1,[l("span",C1,[h.value?(E(),A(Ke,{key:0},[Pt("有未保存修改")],64)):n.value&&n.value.id?(E(),A(Ke,{key:1},[Pt("更新于 "+z(U(n.value.updated_at)),1)],64)):(E(),A(Ke,{key:2},[Pt("新备忘")],64))]),Y[4]||(Y[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(E(),A("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):we("",!0),l("button",{class:"btn btn-sm",disabled:!h.value,onClick:te},"放弃修改",8,$1),l("button",{class:"btn btn-primary btn-sm",disabled:!h.value,onClick:se},"保存",8,S1)])],64)):(E(),A("div",E1,"选择左侧备忘,或点击右上角新建"))]),Me(qn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Y[2]||(Y[2]=ne=>c.value=null),onConfirm:re},null,8,["open","message"]),Me(qn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:Y[3]||(Y[3]=ne=>f.value=null),onConfirm:V},null,8,["open"])]))}}),A1=Ut(T1,[["__scopeId","data-v-74d60dba"]]),P1=["aria-label"],O1={class:"dialog-head"},M1={class:"dialog-title"},I1={class:"dialog-body"},j1={class:"form-grid"},D1={class:"field span2"},L1={class:"field span2"},K1={class:"field span2"},R1={class:"pwd-row"},N1={class:"field span2"},F1={key:0,class:"form-error"},V1={class:"dialog-btns"},B1=Ft({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=P(""),i=P(""),c=P(""),f=P(""),v=P(""),y=P(null);function h(O){n.open&&O.key==="Escape"&&r("cancel")}wt(()=>n.open,async O=>{var B;O?(o.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",h),await ir(),(B=y.value)==null||B.focus()):window.removeEventListener("keydown",h)}),Wn(()=>window.removeEventListener("keydown",h));function w(){const O="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",B="!@#$%^&*",te=crypto.getRandomValues(new Uint8Array(14));let se="";for(let ae=0;ae(E(),At(cs,{to:"body"},[Me(lr,{name:"modal"},{default:vs(()=>[e.open?(E(),A("div",{key:0,class:"mask",onClick:B[6]||(B[6]=en(te=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",O1,[l("span",M1,z(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:B[0]||(B[0]=te=>r("cancel"))},[Me(et,{name:"close",size:16})])]),l("div",I1,[l("div",j1,[l("div",D1,[B[7]||(B[7]=l("label",null,"系统名称(必填)",-1)),Oe(l("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":B[1]||(B[1]=te=>o.value=te),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Fe,o.value]])]),l("div",L1,[B[8]||(B[8]=l("label",null,"账号(必填)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":B[2]||(B[2]=te=>i.value=te),placeholder:"用户名、工号或邮箱"},null,512),[[Fe,i.value]])]),l("div",K1,[B[9]||(B[9]=l("label",null,"密码(必填)",-1)),l("div",R1,[Oe(l("input",{class:"input","onUpdate:modelValue":B[3]||(B[3]=te=>c.value=te),placeholder:"输入或点击生成"},null,512),[[Fe,c.value]]),l("button",{class:"btn btn-sm",onClick:w},"生成")])]),l("div",N1,[B[10]||(B[10]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":B[4]||(B[4]=te=>f.value=te),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Fe,f.value]])])]),v.value?(E(),A("div",F1,z(v.value),1)):we("",!0)]),l("div",V1,[l("button",{class:"btn btn-sm",onClick:B[5]||(B[5]=te=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:C},"保存")])],8,P1)])):we("",!0)]),_:1})]))}}),U1=Ut(B1,[["__scopeId","data-v-f383b0a6"]]),q1={class:"vault-page"},H1={key:0,class:"empty muted"},W1={key:1,class:"card lock-card"},z1={class:"lock-badge"},G1={key:0,class:"form-error"},Y1=["disabled"],J1={key:0,class:"form-error"},X1=["disabled"],Q1={class:"vault-toolbar"},Z1={class:"search-wrap"},e0={class:"card table-card"},t0={class:"cred-table"},n0={class:"td-system"},s0=["onClick"],r0={class:"pwd-cell"},o0={class:"num pwd-text"},a0=["onClick"],i0=["onClick"],l0={class:"td-remark"},u0={class:"td-ops"},c0={class:"ops"},d0=["onClick"],f0=["onClick"],p0={key:0},v0={class:"muted vault-note num"},m0={class:"dialog pwd-dialog"},h0={class:"dialog-head"},y0={class:"dialog-body"},g0={class:"vp-field"},b0={class:"vp-field"},w0={class:"vp-field"},_0={key:0,class:"form-error"},k0={class:"dialog-btns"},x0=5*60*1e3,C0=Ft({__name:"VaultView",setup(e){const t=P(null),n=P(cm()),r=P(!1),o=P(""),i=P(""),c=P(""),f=P(""),v=P(""),y=P([]),h=P(""),w=P({}),C=P(!1),O=P(null),B=P({system:"",account:"",password:"",remark:""}),te=P(null),se=P(!1),ae=P(""),re=P(""),V=P(""),T=P("");async function U(){y.value=await mm(),w.value={}}let J=null;function Y(){J!==null&&window.clearTimeout(J),J=window.setTimeout(()=>{n.value&&(sa(),n.value=!1,y.value=[],w.value={},He("长时间未操作,密码库已自动锁定"))},x0)}function ne(){n.value&&Y()}an(async()=>{t.value=await dd(),window.addEventListener("click",ne),window.addEventListener("keydown",ne),n.value&&Y()}),Wn(()=>{window.removeEventListener("click",ne),window.removeEventListener("keydown",ne),J!==null&&window.clearTimeout(J)});const $=it(()=>{const Ae=h.value.trim().toLowerCase();return Ae?y.value.filter(pe=>(pe.system+" "+pe.account+" "+(pe.remark||"")).toLowerCase().includes(Ae)):y.value});async function R(){if(!r.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==i.value){c.value="两次输入的主密码不一致";return}r.value=!0;try{await dm(o.value),o.value="",i.value="",n.value=!0,Y(),await U(),He("主密码已设置,密码库已解锁")}catch(Ae){c.value=Ae instanceof Error?Ae.message:"设置失败"}r.value=!1}}async function F(){if(!r.value){if(v.value="",!f.value){v.value="请输入主密码";return}r.value=!0;try{await fm(f.value),f.value="",n.value=!0,Y(),await U()}catch(Ae){v.value=Ae instanceof Error?Ae.message:"解锁失败"}r.value=!1}}function ee(){sa(),n.value=!1,y.value=[],w.value={},J!==null&&window.clearTimeout(J),He("密码库已锁定")}async function Ie(Ae){const pe=Ae.id;if(w.value[pe]){w.value[pe]=!1;return}try{Ae.passwordPlain=await mi(pe),w.value[pe]=!0}catch(Ne){He(Ne instanceof Error?Ne.message:"解密失败")}}async function Pe(Ae){try{const pe=await mi(Ae.id);await Wi(pe),He("密码已复制")}catch(pe){He(pe instanceof Error?pe.message:"复制失败")}}async function ke(Ae){await Wi(Ae.account),He("账号已复制")}function Re(){O.value=null,B.value={system:"",account:"",password:"",remark:""},C.value=!0}async function xe(Ae){try{const pe=await mi(Ae.id);O.value=Ae.id,B.value={system:Ae.system,account:Ae.account,password:pe,remark:Ae.remark||""},C.value=!0}catch(pe){He(pe instanceof Error?pe.message:"解密失败")}}async function me(Ae){const pe=O.value??void 0;await hm(Ae,pe),C.value=!1,await U(),He(pe?"账号已更新":"账号已添加")}async function _e(){te.value&&te.value.id&&(await ym(te.value.id),He("账号已删除")),te.value=null,await U()}function We(){ae.value="",re.value="",V.value="",T.value="",se.value=!0}async function Xe(){T.value="";try{const Ae=await gm(ae.value,re.value);se.value=!1,ae.value="",re.value="",V.value="",He("主密码已修改,"+Ae+" 条账号密码已重新加密")}catch(Ae){T.value=Ae instanceof Error?Ae.message:"修改失败"}}return(Ae,pe)=>(E(),A("div",q1,[t.value===null?(E(),A("div",H1,"加载中")):n.value?(E(),A(Ke,{key:2},[l("div",Q1,[l("div",Z1,[Me(et,{name:"search",size:14,class:"search-icon"}),Oe(l("input",{class:"input","onUpdate:modelValue":pe[3]||(pe[3]=Ne=>h.value=Ne),placeholder:"搜索系统名称、账号或备注"},null,512),[[Fe,h.value]])]),pe[16]||(pe[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:We},"修改主密码"),l("button",{class:"btn btn-sm",onClick:ee},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Re},"新增账号")]),l("div",e0,[l("table",t0,[pe[18]||(pe[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(E(!0),A(Ke,null,at($.value,Ne=>(E(),A("tr",{key:Ne.id},[l("td",n0,z(Ne.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:dt=>ke(Ne)},z(Ne.account),9,s0)]),l("td",null,[l("div",r0,[l("span",o0,z(w.value[Ne.id]?Ne.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:dt=>Ie(Ne)},z(w.value[Ne.id]?"隐藏":"显示"),9,a0),l("button",{class:"btn btn-xs",onClick:dt=>Pe(Ne)},"复制",8,i0)])]),l("td",l0,z(Ne.remark||"--"),1),l("td",u0,[l("div",c0,[l("button",{class:"btn btn-xs",onClick:dt=>xe(Ne)},"编辑",8,d0),l("button",{class:"btn btn-xs",onClick:dt=>te.value=Ne},"删除",8,f0)])])]))),128)),$.value.length?we("",!0):(E(),A("tr",p0,[...pe[17]||(pe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",v0,"共 "+z(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):(E(),A("div",W1,[l("div",z1,[Me(et,{name:"lock",size:26})]),t.value===!1?(E(),A(Ke,{key:0},[pe[12]||(pe[12]=l("div",{class:"lock-title"},"设置主密码",-1)),pe[13]||(pe[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[0]||(pe[0]=Ne=>o.value=Ne),placeholder:"设置主密码(至少 6 位)",onKeydown:Et(R,["enter"])},null,544),[[Fe,o.value]]),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[1]||(pe[1]=Ne=>i.value=Ne),placeholder:"再次输入主密码",onKeydown:Et(R,["enter"])},null,544),[[Fe,i.value]]),c.value?(E(),A("div",G1,z(c.value),1)):we("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:R},"完成设置并解锁",8,Y1)],64)):(E(),A(Ke,{key:1},[pe[14]||(pe[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),pe[15]||(pe[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[2]||(pe[2]=Ne=>f.value=Ne),placeholder:"主密码",onKeydown:Et(F,["enter"])},null,544),[[Fe,f.value]]),v.value?(E(),A("div",J1,z(v.value),1)):we("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:F},"解锁",8,X1)],64))])),Me(U1,{open:C.value,title:O.value?"编辑账号":"新增账号",initial:B.value,onCancel:pe[4]||(pe[4]=Ne=>C.value=!1),onSave:me},null,8,["open","title","initial"]),Me(qn,{open:!!te.value,title:"删除确认",message:te.value?"将删除系统「"+te.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:pe[5]||(pe[5]=Ne=>te.value=null),onConfirm:_e},null,8,["open","message"]),(E(),At(cs,{to:"body"},[Me(lr,{name:"modal"},{default:vs(()=>[se.value?(E(),A("div",{key:0,class:"mask",onClick:pe[11]||(pe[11]=en(Ne=>se.value=!1,["self"]))},[l("div",m0,[l("div",h0,[pe[19]||(pe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:pe[6]||(pe[6]=Ne=>se.value=!1)},[Me(et,{name:"close",size:16})])]),l("div",y0,[l("div",g0,[pe[20]||(pe[20]=l("label",null,"旧主密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[7]||(pe[7]=Ne=>ae.value=Ne)},null,512),[[Fe,ae.value]])]),l("div",b0,[pe[21]||(pe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[8]||(pe[8]=Ne=>re.value=Ne)},null,512),[[Fe,re.value]])]),l("div",w0,[pe[22]||(pe[22]=l("label",null,"确认新主密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[9]||(pe[9]=Ne=>V.value=Ne)},null,512),[[Fe,V.value]])]),T.value?(E(),A("div",_0,z(T.value),1)):we("",!0),pe[23]||(pe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",k0,[l("button",{class:"btn btn-sm",onClick:pe[10]||(pe[10]=Ne=>se.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Xe},"确认修改")])])])):we("",!0)]),_:1})]))]))}}),$0=Ut(C0,[["__scopeId","data-v-c2db283d"]]);function S0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function bi(e,t){const r="\uFEFF"+t.map(f=>f.map(S0).join(",")).join(`\r +`);if(ar.isNativePlatform()){const{downloadText:f}=await Od(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>fw);return{downloadText:v}},void 0,import.meta.url);return f(e,r)}const o=new Blob([r],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(o),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const E0={class:"settings"},T0={class:"card section"},A0={class:"muted acc-line"},P0={class:"ai-grid"},O0={class:"rule-item"},M0={class:"rule-item"},I0={class:"rule-item"},j0={key:0,class:"form-error"},D0={class:"rule-save"},L0={class:"card section"},K0={class:"rule-grid"},R0={class:"rule-item"},N0={class:"rule-item"},F0={class:"rule-item"},V0={class:"rule-item"},B0={class:"rule-item"},U0={class:"card section"},q0={class:"proj-add"},H0={key:0,class:"muted proj-tip"},W0=["onKeydown"],z0=["onClick"],G0=["onClick"],Y0=["onClick"],J0={key:1,class:"muted"},X0={class:"card section"},Q0={class:"card section"},Z0={class:"muted acc-line"},ek={class:"rule-save"},tk=["disabled"],nk={key:0,class:"muted acc-line"},sk={key:1,class:"form-error"},rk={key:2,class:"form-error"},ok={class:"card section"},ak={class:"ai-grid"},ik={class:"rule-item"},lk={class:"rule-item"},uk={class:"rule-item"},ck={class:"card section"},dk={class:"cat-block"},fk={class:"cat-head"},pk={class:"cat-chips"},vk=["onClick"],mk=["onClick"],hk={class:"cat-block"},yk={class:"cat-head"},gk={class:"cat-chips"},bk=["onClick"],wk=["onClick"],_k={class:"cat-block"},kk={class:"cat-head"},xk={class:"cat-chips"},Ck=["onClick"],$k=["onClick"],Sk={class:"card section"},Ek={class:"seg"},Tk={class:"exp-dates"},Ak={class:"muted loc-note"},Pk={class:"card section"},Ok={class:"backup-row"},Mk={key:0,class:"import-error"},Ik=Ft({__name:"SettingsView",setup(e){var le;const t=P({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=P([]),r=P(""),o=P(""),i=P(""),c=P(""),f=P(""),v=P(""),y=P(null),h=P(""),w=P([]),C=P([]),O=P([]);async function B(){w.value=await Jr(),C.value=await Wr("expense"),O.value=await Wr("income")}async function te(S){const x=window.prompt("新分类名称");if(!x||!x.trim())return;const Z=S==="log"?w.value:S==="expense"?C.value:O.value,Te=x.trim();if(Z.includes(Te)){He("分类已存在");return}const Ue=[...Z,Te];S==="log"?(w.value=Ue,await yi(Ue)):S==="expense"?(C.value=Ue,await Es("expense",Ue)):(O.value=Ue,await Es("income",Ue)),He("分类已添加")}async function se(S,x,Z){const Te=window.prompt("修改分类名称",Z);if(!Te||!Te.trim()||Te.trim()===Z)return;const Je=(S==="log"?w.value:S==="expense"?C.value:O.value).map((ct,Ge)=>Ge===x?Te.trim():ct);S==="log"?(w.value=Je,await yi(Je)):S==="expense"?(C.value=Je,await Es("expense",Je)):(O.value=Je,await Es("income",Je)),He("分类已更新(历史记录自动跟随显示)")}async function ae(S,x){const Z=S==="log"?w.value:S==="expense"?C.value:O.value;if(Z.length<=1){He("至少保留一个分类");return}if(!window.confirm("删除分类「"+Z[x]+"」?历史记录不受影响。"))return;const Te=Z.filter((Ue,Je)=>Je!==x);S==="log"?(w.value=Te,await yi(Te)):S==="expense"?(C.value=Te,await Es("expense",Te)):(O.value=Te,await Es("income",Te)),He("分类已删除")}const re=P("day"),V=P(bt()),T=P(bt());function U(){if(bt(),re.value==="day")return{start:V.value,end:V.value,label:V.value};if(re.value==="week"){const S=Qs(V.value);return{start:S,end:on(S,6),label:S+" ~ "+on(S,6)}}if(re.value==="month"){const S=V.value.slice(0,4),x=V.value.slice(5,7),Z=new Date(Number(S),Number(x),0).getDate();return{start:S+"-"+x+"-01",end:S+"-"+x+"-"+Z,label:S+"-"+x}}return{start:V.value,end:T.value,label:V.value+" ~ "+T.value}}async function J(){const{start:S,end:x,label:Z}=U(),Te=await Promise.all([Hr(S,x),nr(!0)]),Ue=Te[0],Je=Te[1],ct=new Map(Je.map(gt=>[gt.id,gt.name])),Ge=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const gt of Ue)Ge.push([gt.date,categoryLabel(gt.category),gt.project_id&&ct.get(gt.project_id)||"",gt.content,gt.minutes==null?"":gt.minutes,gt.is_milestone?"是":"",gt.needs_followup?"是":"",gt.takeaway||"",gt.remark||""]);const Lt="工作详情_"+Z.replace(/[~s]/g,"_")+".csv",Kt=await bi(Lt,Ge);He(Kt?"已导出:"+Kt:"已导出到系统下载目录("+Ue.length+" 条)")}const Y=P(null),ne=P(null),$=P(""),R=P(((le=Ur())==null?void 0:le.username)||""),F=P(""),ee=P(""),Ie=P(""),Pe=P(""),ke=P(!1),Re="0.3.1",xe=P(""),me=P(""),_e=P(""),We=P(""),Xe=P(!1),Ae=P("");async function pe(){var S;xe.value=((S=bn())==null?void 0:S.username)||"",Ae.value=await Nm(),We.value=Zs.value}wt(Zs,S=>{We.value=S});async function Ne(){_e.value="";try{await gd(),He("云端绑定已重建")}catch(S){_e.value=S instanceof Error?S.message:"绑定失败"}}async function dt(){if(!Xe.value){_e.value="",We.value=Zs.value,Xe.value=!0;try{const S=await Bi();Ae.value=S.at,me.value="推送 "+S.pushed+" 条 · 拉取 "+S.pulled+" 条 · 删除 "+S.removed+" 条",We.value="",He("同步完成")}catch(S){_e.value=S instanceof Error?S.message:"同步失败"}Xe.value=!1}}async function je(){if(Pe.value="",ee.value!==Ie.value){Pe.value="两次输入的新密码不一致";return}try{await Im(F.value,ee.value),F.value="",ee.value="",Ie.value="",He("登录密码已修改")}catch(S){Pe.value=S instanceof Error?S.message:"修改失败"}}async function fe(){await jm(),window.location.reload()}async function De(){t.value=await Ks(),n.value=await nr(!0),i.value=(await ml()).join(` +`),c.value=await Ct("ai_base_url",""),f.value=await Ct("ai_api_key",""),v.value=await Ct("ai_model",""),await pe(),await B()}async function rt(){await Dt("ai_base_url",c.value.trim()),await Dt("ai_api_key",f.value.trim()),await Dt("ai_model",v.value.trim()),He("AI 配置已保存")}async function Ve(){const S=bt(),x=await Promise.all([Hr("2000-01-01",S),nr(!0)]),Z=x[0],Te=x[1],Ue=new Map(Te.map(Ge=>[Ge.id,Ge.name])),Je=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Ge of Z)Je.push([Ge.date,categoryLabel(Ge.category),Ge.project_id&&Ue.get(Ge.project_id)||"",Ge.content,Ge.minutes==null?"":Ge.minutes,Ge.is_milestone?"是":"",Ge.needs_followup?"是":"",Ge.takeaway||"",Ge.remark||""]);const ct=await bi("工作记录_"+S.replace(/-/g,"")+".csv",Je);He(ct?"CSV 已导出到:"+ct:"CSV 已导出到系统下载目录")}async function b(){const S=bt(),x=await Promise.all([Ks(),Ca("2000-01-01",S)]),Z=x[0],Te=x[1],Ue=["周日","周一","周二","周三","周四","周五","周六"],Je=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Ge of Te){const Lt=Xr(Ge,Ge.date,Z,Ge.date===S);Je.push([Ge.date,Ue[Rs(Ge.date).getDay()],Lt.label,Ge.clock_in_at?Un(Ge.clock_in_at):"",Ge.clock_out_at?Un(Ge.clock_out_at):"",Ge.location||"",Ge.kind==="makeup"?"补卡":Ge.kind==="leave"?"休假":"正常",Ge.note||""])}const ct=await bi("考勤记录_"+S.replace(/-/g,"")+".csv",Je);He(ct?"CSV 已导出到:"+ct:"CSV 已导出到系统下载目录")}an(De);async function _(){await Dt("work_start",t.value.work_start),await Dt("work_end",t.value.work_end),await Dt("grace_minutes",String(t.value.grace_minutes)),await Dt("lunch_minutes",String(t.value.lunch_minutes)),await Dt("remind_weekly",t.value.remind_weekly),He("打卡规则已保存")}async function X(){await Cd(i.value.split(` +`)),He("常用地点已保存")}async function de(){const S=r.value.trim();if(S){try{await nh(S),o.value="",r.value=""}catch{o.value="项目名已存在"}await De()}}function H(S){y.value=S.id,h.value=S.name}async function ie(S){const x=h.value.trim();if(x)try{await sh(S.id,x),o.value=""}catch{o.value="项目名已存在"}y.value=null,await De()}async function Se(S){await rh(S.id,S.archived!==1),await De()}async function Ee(){try{const S=await jh(),x=await gl("实习日志备份_"+bt().replace(/-/g,"")+".json",S);He(x?"备份已导出到:"+x:"备份已导出到系统下载目录")}catch(S){He("导出失败:"+(S instanceof Error?S.message:String(S)))}}function ge(S){const x=S.target,Z=x.files&&x.files[0];if($.value="",!Z)return;const Te=Z.name;Z.text().then(Ue=>{ne.value={name:Te,text:Ue}}),x.value=""}async function ce(){if(ne.value)try{await Dh(ne.value.text),ne.value=null,$.value="",await De(),He("数据导入完成")}catch(S){ne.value=null,$.value=S instanceof Error?S.message:"导入失败"}}return(S,x)=>(E(),A("div",E0,[l("div",T0,[x[32]||(x[32]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",A0,"v"+z(cn(Re))+" · 当前账号 "+z(R.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",P0,[l("div",O0,[x[29]||(x[29]=l("label",null,"旧登录密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":x[0]||(x[0]=Z=>F.value=Z)},null,512),[[Fe,F.value]])]),l("div",M0,[x[30]||(x[30]=l("label",null,"新登录密码(至少 6 位)",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":x[1]||(x[1]=Z=>ee.value=Z)},null,512),[[Fe,ee.value]])]),l("div",I0,[x[31]||(x[31]=l("label",null,"确认新登录密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":x[2]||(x[2]=Z=>Ie.value=Z)},null,512),[[Fe,Ie.value]])])]),Pe.value?(E(),A("div",j0,z(Pe.value),1)):we("",!0),l("div",D0,[l("button",{class:"btn btn-primary btn-sm",onClick:je},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:x[3]||(x[3]=Z=>ke.value=!0)},"删除此用户及全部数据")])]),l("div",L0,[x[39]||(x[39]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",K0,[l("div",R0,[x[33]||(x[33]=l("label",null,"上班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":x[4]||(x[4]=Z=>t.value.work_start=Z)},null,512),[[Fe,t.value.work_start]])]),l("div",N0,[x[34]||(x[34]=l("label",null,"下班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":x[5]||(x[5]=Z=>t.value.work_end=Z)},null,512),[[Fe,t.value.work_end]])]),l("div",F0,[x[35]||(x[35]=l("label",null,"迟到宽限(分钟)",-1)),Oe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":x[6]||(x[6]=Z=>t.value.grace_minutes=Z)},null,512),[[Fe,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",V0,[x[36]||(x[36]=l("label",null,"午休扣除(分钟)",-1)),Oe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":x[7]||(x[7]=Z=>t.value.lunch_minutes=Z)},null,512),[[Fe,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",B0,[x[38]||(x[38]=l("label",null,"周记提醒",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":x[8]||(x[8]=Z=>t.value.remind_weekly=Z)},[...x[37]||(x[37]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[Pn,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:_},"保存规则")])]),l("div",U0,[x[40]||(x[40]=l("div",{class:"section-title"},"项目管理",-1)),l("div",q0,[Oe(l("input",{class:"input","onUpdate:modelValue":x[9]||(x[9]=Z=>r.value=Z),placeholder:"新项目名称",onKeydown:Et(de,["enter"])},null,544),[[Fe,r.value]]),l("button",{class:"btn btn-sm",onClick:de},"添加")]),o.value?(E(),A("div",H0,z(o.value),1)):we("",!0),(E(!0),A(Ke,null,at(n.value,Z=>(E(),A("div",{key:Z.id,class:"proj-row"},[y.value===Z.id?(E(),A(Ke,{key:0},[Oe(l("input",{class:"input","onUpdate:modelValue":x[10]||(x[10]=Te=>h.value=Te),onKeydown:Et(Te=>ie(Z),["enter"])},null,40,W0),[[Fe,h.value]]),l("button",{class:"btn btn-sm",onClick:Te=>ie(Z)},"保存",8,z0),l("button",{class:"btn btn-sm",onClick:x[11]||(x[11]=Te=>y.value=null)},"取消")],64)):(E(),A(Ke,{key:1},[l("span",{class:tt(["proj-name",{archived:Z.archived===1}])},z(Z.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:Te=>H(Z)},[Me(et,{name:"edit",size:14})],8,G0),l("button",{class:"btn btn-sm",onClick:Te=>Se(Z)},z(Z.archived===1?"恢复":"归档"),9,Y0)],64))]))),128)),n.value.length?we("",!0):(E(),A("div",J0,"暂无项目,先添加一个"))]),l("div",X0,[x[42]||(x[42]=l("div",{class:"section-title"},"常用地点",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":x[12]||(x[12]=Z=>i.value=Z),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Fe,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:X},"保存地点"),x[41]||(x[41]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",Q0,[x[43]||(x[43]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",Z0,"云端账号:"+z(xe.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",ek,[l("button",{class:"btn btn-primary btn-sm",disabled:Xe.value,onClick:dt},z(Xe.value?"同步中":"立即同步"),9,tk),l("button",{class:"btn btn-sm",onClick:Ne},"重新校验连接")]),me.value?(E(),A("div",nk,"上次同步:"+z(Ae.value||"--")+" · "+z(me.value),1)):we("",!0),_e.value?(E(),A("div",sk,z(_e.value),1)):we("",!0),We.value?(E(),A("div",rk,"最近自动同步失败:"+z(We.value)+"(可点「立即同步」重试)",1)):we("",!0)]),l("div",ok,[x[48]||(x[48]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",ak,[l("div",ik,[x[44]||(x[44]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[13]||(x[13]=Z=>c.value=Z),placeholder:"https://api.example.com/v1"},null,512),[[Fe,c.value]])]),l("div",lk,[x[45]||(x[45]=l("label",null,"API Key",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[14]||(x[14]=Z=>f.value=Z),placeholder:"sk-..."},null,512),[[Fe,f.value]])]),l("div",uk,[x[46]||(x[46]=l("label",null,"模型名称",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[15]||(x[15]=Z=>v.value=Z),placeholder:"如:deepseek-chat"},null,512),[[Fe,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:rt},"保存 AI 配置"),x[47]||(x[47]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",ck,[x[52]||(x[52]=l("div",{class:"section-title"},"工作分类",-1)),l("div",dk,[l("div",fk,[x[49]||(x[49]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:x[16]||(x[16]=Z=>te("log"))},"添加")]),l("div",pk,[(E(!0),A(Ke,null,at(w.value,(Z,Te)=>(E(),A("span",{key:Z+Te,class:"cat-chip"},[Pt(z(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ue=>se("log",Te,Z)},"改",8,vk),l("button",{class:"chip-btn",title:"删除",onClick:Ue=>ae("log",Te)},"删",8,mk)]))),128))])]),l("div",hk,[l("div",yk,[x[50]||(x[50]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:x[17]||(x[17]=Z=>te("expense"))},"添加")]),l("div",gk,[(E(!0),A(Ke,null,at(C.value,(Z,Te)=>(E(),A("span",{key:Z+Te,class:"cat-chip"},[Pt(z(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ue=>se("expense",Te,Z)},"改",8,bk),l("button",{class:"chip-btn",title:"删除",onClick:Ue=>ae("expense",Te)},"删",8,wk)]))),128))])]),l("div",_k,[l("div",kk,[x[51]||(x[51]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:x[18]||(x[18]=Z=>te("income"))},"添加")]),l("div",xk,[(E(!0),A(Ke,null,at(O.value,(Z,Te)=>(E(),A("span",{key:Z+Te,class:"cat-chip"},[Pt(z(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ue=>se("income",Te,Z)},"改",8,Ck),l("button",{class:"chip-btn",title:"删除",onClick:Ue=>ae("income",Te)},"删",8,$k)]))),128))])])]),l("div",Sk,[x[54]||(x[54]=l("div",{class:"section-title"},"工作详情导出",-1)),l("div",Ek,[l("button",{class:tt(["seg-btn",{active:re.value==="day"}]),onClick:x[19]||(x[19]=Z=>re.value="day")},"当日",2),l("button",{class:tt(["seg-btn",{active:re.value==="week"}]),onClick:x[20]||(x[20]=Z=>re.value="week")},"当周",2),l("button",{class:tt(["seg-btn",{active:re.value==="month"}]),onClick:x[21]||(x[21]=Z=>re.value="month")},"当月",2),l("button",{class:tt(["seg-btn",{active:re.value==="custom"}]),onClick:x[22]||(x[22]=Z=>re.value="custom")},"自定义",2)]),l("div",Tk,[re.value==="custom"?(E(),A(Ke,{key:0},[Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":x[23]||(x[23]=Z=>V.value=Z)},null,512),[[Fe,V.value]]),x[53]||(x[53]=l("span",{class:"muted"},"至",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":x[24]||(x[24]=Z=>T.value=Z)},null,512),[[Fe,T.value]])],64)):(E(),A(Ke,{key:1},[Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":x[25]||(x[25]=Z=>V.value=Z)},null,512),[[Fe,V.value]]),l("span",Ak,z(re.value==="day"?"导出该日":re.value==="week"?"导出该日期所在一周":"导出该日期所在月份"),1)],64))]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:J},"导出 CSV")])]),l("div",Pk,[x[55]||(x[55]=l("div",{class:"section-title"},"数据备份",-1)),l("div",Ok,[l("button",{class:"btn btn-sm",onClick:Ee},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:x[26]||(x[26]=Z=>{var Te;return(Te=Y.value)==null?void 0:Te.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:Ve},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:b},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:Y,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:ge},null,544)]),$.value?(E(),A("div",Mk,z($.value),1)):we("",!0),x[56]||(x[56]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),Me(qn,{open:!!ne.value,title:"导入确认",message:ne.value?"将从文件「"+ne.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:x[27]||(x[27]=Z=>ne.value=null),onConfirm:ce},null,8,["open","message"]),Me(qn,{open:ke.value,title:"删除用户确认",message:"将永久删除云端账号「"+R.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:x[28]||(x[28]=Z=>ke.value=!1),onConfirm:fe},null,8,["open","message"])]))}}),jk=Ut(Ik,[["__scopeId","data-v-e3f1f671"]]),Dk={class:"admin-page"},Lk={class:"card sec"},Kk={class:"toolbar"},Rk={key:0,class:"form-error"},Nk={class:"card table-card admin-table-card"},Fk={class:"admin-table"},Vk={class:"td-name","data-label":"用户名"},Bk={"data-label":"角色"},Uk={key:0,class:"role-badge"},qk={key:1,class:"muted"},Hk={class:"muted num","data-label":"创建时间"},Wk={class:"muted num","data-label":"数据量"},zk={class:"td-ops"},Gk={class:"ops"},Yk=["onClick"],Jk=["disabled","onClick"],Xk={key:0},Qk={key:0,class:"muted load-line"},Zk={class:"dialog create-dialog",role:"dialog","aria-label":"新增用户"},ex={class:"dialog-head"},tx={class:"dialog-body"},nx={class:"form-row"},sx={class:"form-row"},rx={class:"form-row"},ox={key:0,class:"form-error"},ax={class:"dialog-btns"},ix=["disabled"],lx={class:"dialog create-dialog",role:"dialog","aria-label":"重置密码"},ux={class:"dialog-head"},cx={class:"dialog-title"},dx={class:"dialog-body"},fx={class:"form-row"},px={key:0,class:"form-error"},vx={class:"dialog-btns"},mx=["disabled"],hx=Ft({__name:"UserAdminView",setup(e){const t=P([]),n=P(""),r=P(!0),o=P("");async function i($,R){const F=await Ns();let ee=xa();if(!ee){const Pe=bn(),ke=await fetch(F+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Pe==null?void 0:Pe.username,password:Pe==null?void 0:Pe.password})});if(ke.ok){const Re=await ke.json();ee=String(Re.token||""),Br(ee)}}const Ie=await fetch(F+$,{method:R?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ee},body:R?JSON.stringify(R):void 0});if(Ie.status===401&&bn()){const Pe=bn(),ke=await fetch(F+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Pe==null?void 0:Pe.username,password:Pe==null?void 0:Pe.password})});if(ke.ok){const Re=await ke.json();ee=String(Re.token||""),Br(ee);const xe=await fetch(F+$,{method:R?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ee},body:R?JSON.stringify(R):void 0});return{ok:xe.ok,status:xe.status,data:await xe.json().catch(()=>({}))}}}return{ok:Ie.ok,status:Ie.status,data:await Ie.json().catch(()=>({}))}}async function c(){r.value=!0,o.value="";const $=await i("/api/admin/users");if(!$.ok){r.value=!1,o.value=$.data&&$.data.error||"加载失败 "+$.status;return}t.value=$.data.users||[],n.value=$.data.me||"",r.value=!1}function f($){return $<=0?"--":$<1024?$+" B":$<1024*1024?($/1024).toFixed(1)+" KB":($/1024/1024).toFixed(2)+" MB"}function v($){return($||"").slice(0,10)}const y=P(!1),h=P(""),w=P(""),C=P(""),O=P(""),B=P(!1);function te(){y.value=!0,O.value="",h.value="",w.value="",C.value=""}async function se(){const $=h.value.trim();if(w.value!==C.value){O.value="两次输入的密码不一致";return}if(w.value.length<6){O.value="密码至少 6 位";return}B.value=!0;const R=await i("/api/admin/users/create",{username:$,password:w.value});if(B.value=!1,!R.ok){O.value=R.data&&R.data.error||"创建失败 "+R.status;return}He("用户「"+$+"」已创建"),y.value=!1,await c()}const ae=P(null),re=P(""),V=P(""),T=P(!1);function U($){ae.value=$,re.value="",V.value=""}async function J(){if(!ae.value)return;if(re.value.length<6){V.value="密码至少 6 位";return}T.value=!0;const $=await i("/api/admin/users/password",{userId:ae.value.id,newPassword:re.value});if(T.value=!1,!$.ok){V.value=$.data&&$.data.error||"重置失败 "+$.status;return}He("已重置「"+ae.value.username+"」的登录密码"),ae.value=null}const Y=P(null);async function ne(){if(!Y.value)return;const $=await i("/api/admin/users/delete",{userId:Y.value.id});if(!$.ok){Y.value=null,He($.data&&$.data.error||"删除失败");return}He("已删除账号「"+Y.value.username+"」及其全部云端数据"),Y.value=null,await c()}return an(c),($,R)=>(E(),A("div",Dk,[l("div",Lk,[l("div",Kk,[R[12]||(R[12]=l("div",{class:"head-wrap"},[l("div",{class:"sec-title"},"用户管理"),l("div",{class:"muted head-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:te},[Me(et,{name:"plus",size:14}),R[11]||(R[11]=Pt(" 新增用户 ",-1))])]),o.value?(E(),A("div",Rk,z(o.value),1)):we("",!0)]),l("div",Nk,[l("table",Fk,[R[14]||(R[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[(E(!0),A(Ke,null,at(t.value,F=>(E(),A("tr",{key:F.id},[l("td",Vk,z(F.username),1),l("td",Bk,[F.role==="admin"?(E(),A("span",Uk,"管理员")):(E(),A("span",qk,"普通用户"))]),l("td",Hk,z(v(F.created_at)),1),l("td",Wk,z(f(F.data_bytes)),1),l("td",zk,[l("div",Gk,[l("button",{class:"btn btn-xs",onClick:ee=>U(F)},"重置密码",8,Yk),l("button",{class:"btn btn-xs btn-danger",disabled:F.id===n.value,onClick:ee=>Y.value=F},"删除",8,Jk)])])]))),128)),!r.value&&!t.value.length?(E(),A("tr",Xk,[...R[13]||(R[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):we("",!0)])]),r.value?(E(),A("div",Qk,"加载中")):we("",!0)]),R[20]||(R[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),(E(),At(cs,{to:"body"},[y.value?(E(),A("div",{key:0,class:"fixed-mask",onClick:R[5]||(R[5]=en(F=>y.value=!1,["self"]))},[l("div",Zk,[l("div",ex,[R[15]||(R[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:R[0]||(R[0]=F=>y.value=!1)},[Me(et,{name:"close",size:16})])]),l("div",tx,[l("div",nx,[R[16]||(R[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":R[1]||(R[1]=F=>h.value=F),placeholder:"如:xiaowang"},null,512),[[Fe,h.value]])]),l("div",sx,[R[17]||(R[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":R[2]||(R[2]=F=>w.value=F),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Fe,w.value]])]),l("div",rx,[R[18]||(R[18]=l("label",null,"确认密码",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":R[3]||(R[3]=F=>C.value=F),onKeydown:Et(se,["enter"])},null,544),[[Fe,C.value]])]),O.value?(E(),A("div",ox,z(O.value),1)):we("",!0)]),l("div",ax,[l("button",{class:"btn btn-sm",onClick:R[4]||(R[4]=F=>y.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:B.value||!h.value.trim(),onClick:se},z(B.value?"创建中":"创建"),9,ix)])])])):we("",!0)])),(E(),At(cs,{to:"body"},[ae.value?(E(),A("div",{key:0,class:"fixed-mask",onClick:R[9]||(R[9]=en(F=>ae.value=null,["self"]))},[l("div",lx,[l("div",ux,[l("span",cx,"重置「"+z(ae.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:R[6]||(R[6]=F=>ae.value=null)},[Me(et,{name:"close",size:16})])]),l("div",dx,[l("div",fx,[R[19]||(R[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":R[7]||(R[7]=F=>re.value=F),onKeydown:Et(J,["enter"])},null,544),[[Fe,re.value]])]),V.value?(E(),A("div",px,z(V.value),1)):we("",!0)]),l("div",vx,[l("button",{class:"btn btn-sm",onClick:R[8]||(R[8]=F=>ae.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:T.value,onClick:J},z(T.value?"提交中":"重置"),9,mx)])])])):we("",!0)])),Me(qn,{open:!!Y.value,title:"删除用户确认",message:Y.value?"将永久删除云端账号「"+Y.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:R[10]||(R[10]=F=>Y.value=null),onConfirm:ne},null,8,["open","message"])]))}}),yx=Ut(hx,[["__scopeId","data-v-06be07ff"]]),gx={class:"login-page"},bx={class:"card login-card"},wx={class:"login-brand"},_x={class:"brand-icon"},kx={class:"seg"},xx=["placeholder"],Cx={key:1,class:"form-error"},$x=["disabled"],Sx=Ft({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,r=P("login"),o=P(""),i=P(""),c=P(""),f=P(""),v=P(!1);function y(w){r.value=w,f.value="",c.value=""}async function h(){if(!v.value){f.value="",v.value=!0;try{let w;if(r.value==="login")w=await Tm(o.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}w=await Am(o.value,i.value)}n("login",w)}catch(w){f.value=w instanceof Error?w.message:"操作失败"}v.value=!1}}return(w,C)=>(E(),A("div",gx,[l("div",bx,[l("div",wx,[l("div",_x,[Me(et,{name:"calendar",size:22})]),C[5]||(C[5]=l("div",{class:"login-title"},"实习工作日志",-1)),C[6]||(C[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),C[7]||(C[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",kx,[l("button",{class:tt(["seg-btn",{active:r.value==="login"}]),onClick:C[0]||(C[0]=O=>y("login"))},"登录",2),l("button",{class:tt(["seg-btn",{active:r.value==="create"}]),onClick:C[1]||(C[1]=O=>y("create"))},"创建用户",2)]),Oe(l("input",{class:"input","onUpdate:modelValue":C[2]||(C[2]=O=>o.value=O),placeholder:"用户名(2 到 20 个字符)",onKeydown:Et(h,["enter"])},null,544),[[Fe,o.value]]),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":C[3]||(C[3]=O=>i.value=O),placeholder:r.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Et(h,["enter"])},null,40,xx),[[Fe,i.value]]),r.value==="create"?Oe((E(),A("input",{key:0,type:"password",class:"input","onUpdate:modelValue":C[4]||(C[4]=O=>c.value=O),placeholder:"再次输入密码",onKeydown:Et(h,["enter"])},null,544)),[[Fe,c.value]]):we("",!0),f.value?(E(),A("div",Cx,z(f.value),1)):we("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:h},z(r.value==="login"?"登录":"创建并进入"),9,$x),C[8]||(C[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Ex=Ut(Sx,[["__scopeId","data-v-bf714afa"]]),Tx={key:1,class:"app"},Ax={class:"side"},Px={key:0,class:"nav-sep"},Ox=["data-tip","onClick"],Mx={class:"main"},Ix={class:"topbar"},jx={class:"title"},Dx={class:"gsearch"},Lx={key:0,class:"gs-panel"},Kx={key:0,class:"gs-group muted"},Rx=["onMousedown"],Nx={class:"tag"},Fx={class:"gs-text"},Vx={class:"muted num gs-date"},Bx={key:1,class:"gs-group muted"},Ux=["onMousedown"],qx={class:"gs-text"},Hx={class:"muted gs-sub"},Wx={key:1,class:"gs-empty muted"},zx={class:"topbar-actions"},Gx={class:"user-chip num mobile-hide"},Yx=["disabled"],Jx={class:"num"},Xx={class:"content"},Qx={class:"content-inner"},Zx={class:"tabbar"},eC=["onClick"],tC={class:"sheet-user num"},nC=["onClick"],sC={class:"sheet-name"},rC={class:"msw"},oC={class:"msw-bar"},aC={class:"msw-results"},iC={key:0,class:"gs-group muted"},lC=["onMousedown"],uC={class:"tag"},cC={class:"gs-text"},dC={class:"muted num gs-date"},fC={key:1,class:"gs-group muted"},pC=["onMousedown"],vC={class:"gs-text"},mC={class:"muted gs-sub"},hC={key:1,class:"gs-empty muted"},yC={class:"toast-wrap"},gC=Ft({__name:"App",setup(e){const t=oy(),n=P(Ur());async function r(b){n.value=b,oa(b.userId),location.hash="#/calendar",U.value="calendar",await Ne(),await Ve(),c();try{await gd(),await tr()}catch{}He("欢迎,"+b.username);const _=sessionStorage.getItem("dsh_migrate_toast");_&&(sessionStorage.removeItem("dsh_migrate_toast"),He("已迁移原有数据 "+_+" 条"))}async function o(){Re.value=!1,Pe.value=!1,qm(),i!==null&&(window.clearInterval(i),i=null),await Om(),n.value=null,U.value="calendar",location.hash="#/calendar",He("已退出登录")}let i=null;function c(){Um(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{tr()},60*1e3),tr()}const f=P(null),v=P(""),y=P(!1),h=P({logs:[],memos:[]});let w=null;const C=it(()=>!!(h.value.logs.length||h.value.memos.length));function O(){w&&window.clearTimeout(w);const b=v.value;w=window.setTimeout(async()=>{const _=b.trim();if(!_){h.value={logs:[],memos:[]};return}const X=await Promise.all([Eh(_,8),Th(_,4)]);h.value={logs:X[0],memos:X[1]}},200)}function B(){v.value="",h.value={logs:[],memos:[]},y.value=!1}function te(b){Fi.value=b.date,J("calendar"),B()}function se(b){Vi.value=b.id,J("memo"),B()}function ae(){window.setTimeout(()=>{y.value=!1},150)}function re(b){var _;(b.ctrlKey||b.metaKey)&&b.key.toLowerCase()==="k"&&(b.preventDefault(),(_=f.value)==null||_.focus())}const V=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"plan",name:"计划",icon:"plan",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function T(){var _;const b=(location.hash||"").replace("#/","");return!V.some(X=>X.key===b)||b==="admin"&&(((_=Ur())==null?void 0:_.username)||"")!=="xionglin"?"calendar":b}const U=P(T());window.addEventListener("hashchange",()=>{U.value=T()});function J(b){location.hash="#/"+b}const Y=it(()=>V.find(b=>b.key===U.value)||V[0]),ne=it(()=>{var b;return(((b=n.value)==null?void 0:b.username)||"")==="xionglin"}),$=it(()=>ne.value?V:V.filter(b=>b.key!=="admin")),R=it(()=>{const b=V.filter(_=>!ee.includes(_.key));return ne.value?b:b.filter(_=>_.key!=="admin")}),F=it(()=>R.value.some(b=>b.key===U.value));wt([ne,U],()=>{U.value==="admin"&&!ne.value&&J("calendar")},{immediate:!0});const ee=["calendar","today","plan","ledger"],Ie=V.filter(b=>ee.includes(b.key)),Pe=P(!1);function ke(b){Pe.value=!1,J(b)}const Re=P(!1),xe=P(null);function me(){Re.value=!0,window.setTimeout(()=>{var b;return(b=xe.value)==null?void 0:b.focus()},60)}function _e(b){te(b),Re.value=!1}function We(b){se(b),Re.value=!1}const Xe=P(bt()),Ae=P(void 0),pe=P(!1);async function Ne(){if(Ae.value=await wn(Xe.value),pe.value=!1,new Date().getHours()<4){const _=await wn(on(Xe.value,-1));pe.value=!!(_&&_.clock_in_at&&!_.clock_out_at)}}const dt=it(()=>{const b=Ae.value;return b&&b.clock_in_at&&!b.clock_out_at?!0:pe.value&&!(b&&b.clock_in_at)}),je=it(()=>{const b=Ae.value;return!!(b&&b.clock_in_at&&b.clock_out_at)}),fe=it(()=>{const b=Ae.value;return dt.value?"下班打卡":je.value?"已打卡 "+Un(b==null?void 0:b.clock_in_at)+" - "+Un(b==null?void 0:b.clock_out_at):"上班打卡"});async function De(){if(dt.value)try{await ah()}catch{}else await $d(Xe.value);await Ne(),rs()}wt(ur,()=>{n.value&&Ne()});const rt=P(!1);async function Ve(){if((await Ks()).remind_weekly==="off"){rt.value=!1;return}const _=new Date().getDay();if(_===5||_===6||_===0){const X=await hl(Qs(Xe.value));rt.value=!X||!X.highlights&&!X.challenges&&!X.plan_next}else rt.value=!1}return an(async()=>{window.addEventListener("keydown",re),n.value&&(oa(n.value.userId),await Ne(),await Ve(),c())}),(b,_)=>{var X,de;return n.value?(E(),A("div",Tx,[l("nav",Ax,[(E(!0),A(Ke,null,at($.value,(H,ie)=>(E(),A(Ke,{key:H.key},[ie>0&&H.group!==$.value[ie-1].group?(E(),A("div",Px)):we("",!0),l("button",{class:tt(["nav-btn",{active:U.value===H.key}]),"data-tip":H.name,onClick:Se=>J(H.key)},[Me(et,{name:H.icon,size:18},null,8,["name"])],10,Ox)],64))),128))]),l("div",Mx,[l("header",Ix,[l("span",jx,z(Y.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:me},[Me(et,{name:"search",size:16})]),l("div",Dx,[Me(et,{name:"search",size:14,class:"gs-icon"}),Oe(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":_[0]||(_[0]=H=>v.value=H),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:O,onFocus:_[1]||(_[1]=H=>y.value=!0),onBlur:ae,onKeydown:Et(B,["esc"])},null,544),[[Fe,v.value]]),y.value&&v.value.trim()?(E(),A("div",Lx,[C.value?(E(),A(Ke,{key:0},[h.value.logs.length?(E(),A("div",Kx,"工作记录")):we("",!0),(E(!0),A(Ke,null,at(h.value.logs,H=>(E(),A("div",{key:"l"+H.id,class:"gs-item",onMousedown:en(ie=>te(H),["prevent"])},[l("span",Nx,z(cn(Li)(H.category)),1),l("span",Fx,z(H.content),1),l("span",Vx,z(H.date),1)],40,Rx))),128)),h.value.memos.length?(E(),A("div",Bx,"备忘录")):we("",!0),(E(!0),A(Ke,null,at(h.value.memos,H=>(E(),A("div",{key:"m"+H.id,class:"gs-item",onMousedown:en(ie=>se(H),["prevent"])},[l("span",qx,z(H.title||"无标题"),1),l("span",Hx,z(H.content),1)],40,Ux))),128))],64)):(E(),A("div",Wx,"无匹配结果"))])):we("",!0)]),_[12]||(_[12]=l("span",{class:"flex1"},null,-1)),l("div",zx,[rt.value?(E(),A("button",{key:0,class:"week-tip",onClick:_[2]||(_[2]=H=>J("report"))},[..._[11]||(_[11]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),Pt(" 填写本周周记 ",-1)])])):we("",!0),l("span",Gx,z((X=n.value)==null?void 0:X.username),1),l("button",{class:"btn btn-sm mobile-hide",onClick:o},"退出"),l("button",{class:"btn btn-primary btn-sm",disabled:je.value,onClick:De},[Me(et,{name:je.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",Jx,z(fe.value),1)],8,Yx)])]),l("main",Xx,[l("div",Qx,[U.value==="calendar"?(E(),At(Tg,{key:0})):U.value==="today"?(E(),At(jg,{key:1})):U.value==="plan"?(E(),At(bb,{key:2})):U.value==="stats"?(E(),At(Jb,{key:3})):U.value==="report"?(E(),At(Yw,{key:4})):U.value==="ledger"?(E(),At(d1,{key:5})):U.value==="memo"?(E(),At(A1,{key:6})):U.value==="vault"?(E(),At($0,{key:7})):U.value==="admin"?(E(),At(yx,{key:8})):(E(),At(jk,{key:9}))])]),l("nav",Zx,[(E(!0),A(Ke,null,at(cn(Ie),H=>(E(),A("button",{key:H.key,class:tt(["tab-btn",{active:U.value===H.key}]),onClick:ie=>J(H.key)},[Me(et,{name:H.icon,size:20},null,8,["name"]),l("span",null,z(H.name),1)],10,eC))),128)),l("button",{class:tt(["tab-btn",{active:F.value}]),onClick:_[3]||(_[3]=H=>Pe.value=!0)},[Me(et,{name:"more",size:20}),_[13]||(_[13]=l("span",null,"更多",-1))],2)]),Pe.value?(E(),A("div",{key:0,class:"sheet-mask",onClick:_[6]||(_[6]=H=>Pe.value=!1)},[l("div",{class:"more-sheet",onClick:_[5]||(_[5]=en(()=>{},["stop"]))},[l("div",tC,z((de=n.value)==null?void 0:de.username),1),(E(!0),A(Ke,null,at(R.value,H=>(E(),A("button",{key:H.key,class:"sheet-row",onClick:ie=>ke(H.key)},[Me(et,{name:H.icon,size:18},null,8,["name"]),l("span",sC,z(H.name),1),Me(et,{name:"chevron-right",size:14,class:"sheet-go"})],8,nC))),128)),_[15]||(_[15]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:_[4]||(_[4]=H=>{Pe.value=!1,o()})},[Me(et,{name:"close",size:18}),_[14]||(_[14]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):we("",!0),Re.value?(E(),A("div",{key:1,class:"msw-mask",onClick:_[10]||(_[10]=en(H=>Re.value=!1,["self"]))},[l("div",rC,[l("div",oC,[Me(et,{name:"search",size:16,class:"msw-icon"}),Oe(l("input",{ref_key:"msInput",ref:xe,class:"msw-input","onUpdate:modelValue":_[7]||(_[7]=H=>v.value=H),placeholder:"搜索工作记录与备忘录",onInput:O,onKeydown:_[8]||(_[8]=Et(H=>Re.value=!1,["esc"]))},null,544),[[Fe,v.value]]),l("button",{class:"icon-btn",onClick:_[9]||(_[9]=H=>{B(),Re.value=!1})},[Me(et,{name:"close",size:16})])]),l("div",aC,[C.value?(E(),A(Ke,{key:0},[h.value.logs.length?(E(),A("div",iC,"工作记录")):we("",!0),(E(!0),A(Ke,null,at(h.value.logs,H=>(E(),A("div",{key:"l"+H.id,class:"msw-item",onMousedown:en(ie=>_e(H),["prevent"])},[l("span",uC,z(cn(Li)(H.category)),1),l("span",cC,z(H.content),1),l("span",dC,z(H.date),1)],40,lC))),128)),h.value.memos.length?(E(),A("div",fC,"备忘录")):we("",!0),(E(!0),A(Ke,null,at(h.value.memos,H=>(E(),A("div",{key:"m"+H.id,class:"msw-item",onMousedown:en(ie=>We(H),["prevent"])},[l("span",vC,z(H.title||"无标题"),1),l("span",mC,z(H.content),1)],40,pC))),128))],64)):v.value.trim()?(E(),A("div",hC,"无匹配结果")):we("",!0)])])])):we("",!0)]),l("div",yC,[Me(Tv,{name:"toast"},{default:vs(()=>[(E(!0),A(Ke,null,at(cn(t),H=>(E(),A("div",{key:H.id,class:"toast"},z(H.text),1))),128))]),_:1})])])):(E(),At(Ex,{key:0,onLogin:r}))}}}),bC=Ut(gC,[["__scopeId","data-v-c88c3788"]]);function Fo(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",i=>{i.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const r=document.createElement("div");r.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",r.textContent=e+` +`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(r),n.appendChild(o)}catch{}}async function wC(){const e=await Pm();e&&oa(e.userId);const t=Uv(bC);t.config.errorHandler=(n,r,o)=>{const i=n;Fo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.message)||String(n)+` +触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const r=n.reason;Fo("未处理的异步错误(点击空白处关闭)",r&&(r.stack||r.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Fo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}wC().catch(e=>{Fo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{jd as W,Od as _,cw as b,Id as r}; diff --git a/intern-log/dist/assets/index-MT694d7P.css b/intern-log/dist/assets/index-MT694d7P.css new file mode 100644 index 0000000..cd13240 --- /dev/null +++ b/intern-log/dist/assets/index-MT694d7P.css @@ -0,0 +1 @@ +.mask[data-v-f27041d4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:100}.dialog[data-v-f27041d4]{width:380px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);padding:20px}.dialog-title[data-v-f27041d4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-msg[data-v-f27041d4]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-f27041d4]{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.btn-danger-solid[data-v-f27041d4]{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid[data-v-f27041d4]:hover{background:#d13a3f}.modal-enter-active[data-v-f27041d4],.modal-leave-active[data-v-f27041d4]{transition:opacity .15s ease}.modal-enter-from[data-v-f27041d4],.modal-leave-to[data-v-f27041d4]{opacity:0}.mask[data-v-aaf87f80]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-aaf87f80]{width:560px;max-width:calc(100vw - 32px);max-height:85vh;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head[data-v-aaf87f80]{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title[data-v-aaf87f80]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-aaf87f80]{font-size:12px;margin-top:2px}.dialog-body[data-v-aaf87f80]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-aaf87f80]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-aaf87f80]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-aaf87f80]{grid-column:span 2}.field label[data-v-aaf87f80]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-aaf87f80]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-aaf87f80],.input.invalid[data-v-aaf87f80]:focus{border-color:var(--danger)}.toggle-btn[data-v-aaf87f80]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-aaf87f80]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-aaf87f80]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-aaf87f80]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-aaf87f80],.modal-leave-active[data-v-aaf87f80]{transition:opacity .15s ease}.modal-enter-from[data-v-aaf87f80],.modal-leave-to[data-v-aaf87f80]{opacity:0}.dp-head[data-v-de6fe794]{margin-bottom:12px}.dp-date[data-v-de6fe794]{font-size:14px;font-weight:600}.sec[data-v-de6fe794]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-de6fe794]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-de6fe794]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-de6fe794]{margin-bottom:0}.form-hint[data-v-de6fe794]{font-size:12px}.att-grid[data-v-de6fe794]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-de6fe794],.field label[data-v-de6fe794]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-de6fe794]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-de6fe794]{min-height:32px}.val-empty[data-v-de6fe794]{color:var(--text-3)}.edit-row[data-v-de6fe794]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-de6fe794]{width:104px}.att-note[data-v-de6fe794]{margin-top:10px;font-size:12px}.att-actions[data-v-de6fe794]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-de6fe794]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-de6fe794]{grid-column:span 2}.form-footer[data-v-de6fe794]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-de6fe794]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-de6fe794]{border-color:var(--danger)}.input.invalid[data-v-de6fe794]:focus{border-color:var(--danger)}.list-sec[data-v-de6fe794]{margin-bottom:4px}.item[data-v-de6fe794]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-de6fe794]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-de6fe794]{cursor:text;word-break:break-all}.item-meta[data-v-de6fe794]{font-size:12px}.item-sub[data-v-de6fe794]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.empty[data-v-de6fe794]{text-align:center;padding:24px 0}.dp-foot[data-v-de6fe794]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-de6fe794],.form-grid[data-v-de6fe794]{grid-template-columns:1fr}.field.span2[data-v-de6fe794]{grid-column:auto}}.cal-toolbar[data-v-2404dfbe]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-2404dfbe]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-head[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-week[data-v-2404dfbe]{text-align:center;padding:6px 0;font-size:12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}.cal-grid[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-cell[data-v-2404dfbe]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border);cursor:pointer;display:block;font-size:13px}.cal-cell[data-v-2404dfbe]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-2404dfbe]{cursor:default}.cal-cell.blank[data-v-2404dfbe]:hover{background:var(--bg-page)}.cal-cell.selected[data-v-2404dfbe]{background:var(--accent-bg)}.daynum.today[data-v-2404dfbe]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-2404dfbe]{color:var(--text-3)}.cal-marks[data-v-2404dfbe]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-2404dfbe]{color:var(--text-3)}.mark-star[data-v-2404dfbe]{color:var(--accent)}.drawer[data-v-2404dfbe]{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-2404dfbe]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-2404dfbe]{font-weight:600}.drawer-body[data-v-2404dfbe]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-2404dfbe],.drawer-leave-active[data-v-2404dfbe]{transition:opacity .15s ease}.drawer-enter-from[data-v-2404dfbe],.drawer-leave-to[data-v-2404dfbe]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-2404dfbe]{min-height:60px;padding:4px 5px}.cal-title[data-v-2404dfbe]{min-width:76px;font-size:13px}.cal-marks[data-v-2404dfbe]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-2404dfbe]{width:100%}}.detail-toolbar[data-v-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.plan-page[data-v-dd89fae2]{display:flex;flex-direction:column;gap:10px;max-width:760px}.plan-head[data-v-dd89fae2]{padding:12px 16px}.nav-row[data-v-dd89fae2]{display:flex;align-items:center;gap:8px}.date-box[data-v-dd89fae2]{min-width:150px;text-align:center}.date-main[data-v-dd89fae2]{font-weight:600;font-size:14px}.date-sub[data-v-dd89fae2]{font-size:11px;margin-left:6px}.sum-line[data-v-dd89fae2]{font-size:12px;margin-top:8px}.timer-live[data-v-dd89fae2]{color:var(--accent);font-weight:600}.flex1[data-v-dd89fae2]{flex:1}.plan-item[data-v-dd89fae2]{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}.plan-item.done[data-v-dd89fae2]{opacity:.62}.plan-item.skip[data-v-dd89fae2]{opacity:.5}.plan-item.running[data-v-dd89fae2]{border-left:3px solid var(--accent)}.pi-time[data-v-dd89fae2]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-dd89fae2]{flex:1;min-width:0}.pi-title[data-v-dd89fae2]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-dd89fae2]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-dd89fae2]{text-decoration:line-through}.state-done[data-v-dd89fae2]{color:var(--ok, #2e9e5b);font-size:12px}.state-skip[data-v-dd89fae2]{color:var(--text-3);font-size:12px}.pi-note[data-v-dd89fae2],.pi-meta[data-v-dd89fae2]{font-size:12px;margin-top:3px}.pi-ops[data-v-dd89fae2]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-dd89fae2]{color:var(--accent);border-color:var(--accent)}.empty[data-v-dd89fae2]{text-align:center;padding:26px 16px}.fixed-mask[data-v-dd89fae2]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;background:#1d212959;display:flex;align-items:center;justify-content:center;padding:16px}.dialog[data-v-dd89fae2]{background:var(--bg-page);border-radius:12px;width:420px;max-width:100%}.dialog-head[data-v-dd89fae2]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 0}.dialog-title[data-v-dd89fae2]{font-weight:600;font-size:14px}.dialog-body[data-v-dd89fae2]{padding:6px 16px 4px}.dialog-btns[data-v-dd89fae2]{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px}.form-row[data-v-dd89fae2]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row label[data-v-dd89fae2]{font-size:12px;color:var(--text-2)}.form-row.two[data-v-dd89fae2]{flex-direction:row;gap:10px}.form-row.two>div[data-v-dd89fae2]{flex:1;display:flex;flex-direction:column;gap:5px}@media (max-width: 720px){.plan-item[data-v-dd89fae2]{flex-wrap:wrap}.pi-ops[data-v-dd89fae2]{width:100%;justify-content:flex-start}}.cards[data-v-f8410651]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-f8410651]{padding:14px 16px}.stat-num[data-v-f8410651]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-f8410651]{padding:14px 16px;margin-top:12px}.section-title[data-v-f8410651]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-f8410651]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-f8410651]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-f8410651]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-f8410651]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-f8410651]{background:#d8ecdf}.lv2[data-v-f8410651]{background:#a9d8bc}.lv3[data-v-f8410651]{background:#6fbf92}.lv4[data-v-f8410651]{background:var(--ok)}.heat-legend[data-v-f8410651]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-f8410651]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-f8410651]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-f8410651]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-f8410651]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-f8410651]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-f8410651]{font-size:12px;width:92px;flex:none}.loc-label[data-v-f8410651]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-f8410651]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-f8410651]{grid-template-columns:1fr}}.report-toolbar[data-v-43f9c59b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-43f9c59b]{color:var(--danger);font-size:12px;margin:0 0 8px}.seg[data-v-43f9c59b]{display:inline-flex;border:1px solid var(--border-strong);border-radius:6px;overflow:hidden}.seg-btn[data-v-43f9c59b]{height:28px;padding:0 12px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;border-right:1px solid var(--border)}.seg-btn[data-v-43f9c59b]:last-child{border-right:none}.seg-btn[data-v-43f9c59b]:hover{background:var(--bg-hover)}.seg-btn.active[data-v-43f9c59b]{background:var(--accent-bg);color:var(--accent)}.w-date[data-v-43f9c59b]{width:140px}.report-grid[data-v-43f9c59b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section[data-v-43f9c59b]{padding:14px 16px}.section-title[data-v-43f9c59b]{font-weight:600;margin-bottom:8px;font-size:13px}.section+.section[data-v-43f9c59b]{margin-top:12px}.note-label[data-v-43f9c59b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-43f9c59b]{font-size:12px;margin-top:6px}.md-editor[data-v-43f9c59b]{min-height:420px;line-height:1.7}.sum-row[data-v-43f9c59b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-43f9c59b]{font-weight:600;margin:10px 0 4px;font-size:12px}.sum-item[data-v-43f9c59b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-43f9c59b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-43f9c59b]{grid-template-columns:1fr}}.mask[data-v-9f38206c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-9f38206c]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-9f38206c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-9f38206c]{font-size:14px;font-weight:600;color:var(--text-1)}.add-cat[data-v-9f38206c]{display:flex;gap:6px;margin-top:6px}.add-cat-input[data-v-9f38206c]{flex:1;height:28px;font-size:12px}.dialog-body[data-v-9f38206c]{padding:16px 20px}.dialog-btns[data-v-9f38206c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-9f38206c]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-9f38206c]{grid-column:span 2}.field label[data-v-9f38206c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-9f38206c]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-9f38206c]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-9f38206c]{border-left:1px solid var(--border)}.seg-btn.active[data-v-9f38206c]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-9f38206c]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-9f38206c],.input.invalid[data-v-9f38206c]:focus{border-color:var(--danger)}.modal-enter-active[data-v-9f38206c],.modal-leave-active[data-v-9f38206c]{transition:opacity .15s ease}.modal-enter-from[data-v-9f38206c],.modal-leave-to[data-v-9f38206c]{opacity:0}.ledger-toolbar[data-v-2660d908]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-2660d908]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-2660d908]{width:110px;flex:none}.cards[data-v-2660d908]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-2660d908]{padding:14px 16px}.stat-num[data-v-2660d908]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-2660d908]{color:var(--ok)}.amt-expense[data-v-2660d908]{color:var(--text-1)}.amt-warn[data-v-2660d908]{color:var(--warn)}.sec[data-v-2660d908]{padding:14px 16px;margin-top:12px}.sec-title[data-v-2660d908]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-2660d908]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2660d908]{margin-bottom:0}.form-hint[data-v-2660d908]{font-size:12px}.form-grid[data-v-2660d908]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2660d908]{grid-column:span 2}.field label[data-v-2660d908]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-2660d908]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-2660d908]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-2660d908]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-2660d908]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-2660d908]{border-left:1px solid var(--border)}.seg-btn.active[data-v-2660d908]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-2660d908]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-2660d908]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-2660d908]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-2660d908]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-2660d908]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-2660d908]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-2660d908]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-2660d908]{font-size:12px;width:110px;flex:none}.table-card[data-v-2660d908]{overflow-x:auto}.tx-table[data-v-2660d908]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-2660d908]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td[data-v-2660d908]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-2660d908]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-2660d908]{border-bottom:none}.td-note[data-v-2660d908]{color:var(--text-2)}.tx-pending[data-v-2660d908]{color:var(--warn);font-size:12px}.tx-done[data-v-2660d908]{color:var(--ok);font-size:12px}.th-ops[data-v-2660d908]{width:220px}.ops[data-v-2660d908]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-2660d908]{text-align:center;padding:24px 0}.vault-note[data-v-2660d908]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-2660d908]{grid-template-columns:1fr}.field.span2[data-v-2660d908]{grid-column:auto}.ledger-toolbar .w-filter[data-v-2660d908]{flex:1;min-width:0;width:auto}}.memo-page[data-v-74d60dba]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-74d60dba]{display:flex;flex-direction:column;max-height:calc(100vh - 140px)}.pane-head[data-v-74d60dba]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-74d60dba]{font-size:13px;font-weight:600}.memo-scroll[data-v-74d60dba]{overflow:auto;padding:6px}.memo-item[data-v-74d60dba]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-74d60dba]:hover{background:var(--bg-hover)}.memo-item.active[data-v-74d60dba]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-74d60dba]{color:var(--accent)}.memo-item-title[data-v-74d60dba]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-74d60dba]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-74d60dba]{font-size:11px;margin-top:2px}.memo-editor[data-v-74d60dba]{padding:16px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-74d60dba]{font-size:14px;font-weight:500;margin-bottom:10px}.content-textarea[data-v-74d60dba]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-74d60dba]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-74d60dba]{font-size:12px}.editor-empty[data-v-74d60dba]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-74d60dba]{grid-template-columns:1fr}.memo-list[data-v-74d60dba]{max-height:240px}.content-textarea[data-v-74d60dba]{min-height:240px}}.mask[data-v-f383b0a6]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-f383b0a6]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-f383b0a6]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-f383b0a6]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-f383b0a6]{padding:16px 20px}.dialog-btns[data-v-f383b0a6]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-f383b0a6]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-f383b0a6]{grid-column:span 2}.field label[data-v-f383b0a6]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.pwd-row[data-v-f383b0a6]{display:flex;gap:8px}.pwd-row .input[data-v-f383b0a6]{flex:1}.form-error[data-v-f383b0a6]{color:var(--danger);font-size:12px;margin-top:8px}.modal-enter-active[data-v-f383b0a6],.modal-leave-active[data-v-f383b0a6]{transition:opacity .15s ease}.modal-enter-from[data-v-f383b0a6],.modal-leave-to[data-v-f383b0a6]{opacity:0}.lock-card[data-v-c2db283d]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-c2db283d]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--bg-subtle);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.lock-title[data-v-c2db283d]{font-size:14px;font-weight:600}.lock-tip[data-v-c2db283d]{font-size:12px;line-height:1.7}.lock-btn[data-v-c2db283d]{margin-top:4px}.form-error[data-v-c2db283d]{color:var(--danger);font-size:12px}.empty[data-v-c2db283d]{text-align:center;padding:24px 0}.vault-toolbar[data-v-c2db283d]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-c2db283d]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-c2db283d]{padding-left:30px}.search-icon[data-v-c2db283d]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-c2db283d]{overflow-x:auto}.cred-table[data-v-c2db283d]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-c2db283d]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.cred-table td[data-v-c2db283d]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-c2db283d]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-c2db283d]{border-bottom:none}.td-system[data-v-c2db283d]{font-weight:500}.th-ops[data-v-c2db283d]{width:150px}.pwd-cell[data-v-c2db283d]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-c2db283d]{letter-spacing:1px}.copyable[data-v-c2db283d]{cursor:pointer}.copyable[data-v-c2db283d]:hover{color:var(--accent)}.ops[data-v-c2db283d]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-c2db283d]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-c2db283d]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-c2db283d]{width:440px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-c2db283d]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-c2db283d]{font-size:14px;font-weight:600}.dialog-body[data-v-c2db283d]{padding:16px 20px}.dialog-btns[data-v-c2db283d]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-c2db283d]{margin-bottom:10px}.vp-field label[data-v-c2db283d]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-c2db283d]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-c2db283d],.modal-leave-active[data-v-c2db283d]{transition:opacity .15s ease}.modal-enter-from[data-v-c2db283d],.modal-leave-to[data-v-c2db283d]{opacity:0}.settings[data-v-e3f1f671]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-e3f1f671]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-e3f1f671]{padding:14px 16px}.section-title[data-v-e3f1f671]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-e3f1f671]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-e3f1f671]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-e3f1f671]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-e3f1f671]{display:flex;gap:8px}.proj-tip[data-v-e3f1f671]{font-size:12px;margin-top:6px}.proj-row[data-v-e3f1f671]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-e3f1f671]:last-child{border-bottom:none}.proj-name[data-v-e3f1f671]{flex:1;word-break:break-all}.proj-name.archived[data-v-e3f1f671]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-e3f1f671]{font-size:12px}.ai-grid[data-v-e3f1f671]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-e3f1f671]{display:flex;gap:8px}.cat-block[data-v-e3f1f671]{margin-top:10px}.cat-head[data-v-e3f1f671]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-e3f1f671]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-e3f1f671]{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:12px}.chip-btn[data-v-e3f1f671]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-e3f1f671]:hover{color:var(--accent)}.exp-dates[data-v-e3f1f671]{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.exp-dates .input[data-v-e3f1f671]{width:150px}.seg[data-v-e3f1f671]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-e3f1f671]{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;padding:5px 12px}.seg-btn.active[data-v-e3f1f671]{background:var(--accent-bg);color:var(--accent)}.import-error[data-v-e3f1f671]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-e3f1f671]{font-size:12px;margin-top:10px}.admin-page[data-v-06be07ff]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-06be07ff]{display:flex;align-items:center;gap:12px}.head-wrap[data-v-06be07ff]{flex:1;min-width:0}.sec-title[data-v-06be07ff]{font-weight:600;font-size:13px}.head-sub[data-v-06be07ff]{font-size:12px;margin-top:2px}.sec[data-v-06be07ff]{padding:14px 16px}.admin-table-card[data-v-06be07ff]{overflow-x:auto}.admin-table[data-v-06be07ff]{width:100%;border-collapse:collapse;font-size:13px}.admin-table th[data-v-06be07ff]{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;padding:8px 12px;border-bottom:1px solid var(--border)}.admin-table td[data-v-06be07ff]{padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.admin-table td[data-v-06be07ff]:last-child{border-bottom:none}.td-name[data-v-06be07ff]{font-weight:500}.role-badge[data-v-06be07ff]{display:inline-flex;align-items:center;border:1px solid var(--accent);color:var(--accent);border-radius:999px;font-size:12px;line-height:16px;padding:1px 8px}.load-line[data-v-06be07ff]{padding:12px;font-size:12px}.admin-note[data-v-06be07ff]{font-size:12px;padding:0 2px}.ops[data-v-06be07ff]{display:inline-flex;gap:6px}.form-row[data-v-06be07ff]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row label[data-v-06be07ff]{font-size:12px;color:var(--text-2)}.fixed-mask[data-v-06be07ff]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;background:#1d212959;display:flex;align-items:center;justify-content:center;padding:16px}.dialog[data-v-06be07ff]{background:var(--bg-page);border-radius:12px;width:420px;max-width:100%}.dialog-head[data-v-06be07ff]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 0}.dialog-title[data-v-06be07ff]{font-weight:600;font-size:14px}.dialog-body[data-v-06be07ff]{padding:6px 16px 4px}.dialog-btns[data-v-06be07ff]{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px}.btn-danger[data-v-06be07ff]{color:var(--danger)}.empty[data-v-06be07ff]{text-align:center}@media (max-width: 720px){.toolbar[data-v-06be07ff]{flex-wrap:wrap;row-gap:8px}.admin-table td[data-v-06be07ff],.admin-table th[data-v-06be07ff]{white-space:normal}}.login-page[data-v-bf714afa]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-bf714afa]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-bf714afa]{text-align:center;margin-bottom:6px}.brand-icon[data-v-bf714afa]{width:46px;height:46px;margin:0 auto 10px;border-radius:var(--radius-md);background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.login-title[data-v-bf714afa]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-bf714afa]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-bf714afa]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-bf714afa]{flex:1;height:30px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-bf714afa]{border-left:1px solid var(--border)}.seg-btn.active[data-v-bf714afa]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-bf714afa]{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-2);cursor:pointer;line-height:1.6}.mig-row input[data-v-bf714afa]{margin-top:3px}.form-error[data-v-bf714afa]{color:var(--danger);font-size:12px}.login-btn[data-v-bf714afa]{margin-top:2px}.login-note[data-v-bf714afa]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-c88c3788]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-c88c3788]{width:56px;flex:none;border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:10px;gap:4px;background:var(--bg-page)}.nav-btn[data-v-c88c3788]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-3);cursor:pointer;border:none;background:transparent;position:relative}.nav-btn[data-v-c88c3788]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-c88c3788]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-c88c3788]:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}.nav-btn[data-v-c88c3788]:hover:after{opacity:1}.nav-sep[data-v-c88c3788]{width:26px;height:1px;flex:none;background:var(--border);margin:5px 0}[data-v-c88c3788]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.main[data-v-c88c3788]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-c88c3788]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-c88c3788]{font-size:14px;font-weight:600}.topbar-actions[data-v-c88c3788]{display:flex;align-items:center;gap:8px}.gsearch[data-v-c88c3788]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-c88c3788]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-c88c3788]{height:30px;padding-left:30px}.gs-panel[data-v-c88c3788]{position:absolute;top:36px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-c88c3788]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-c88c3788]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-c88c3788]:hover{background:var(--bg-hover)}.gs-text[data-v-c88c3788],.gs-sub[data-v-c88c3788]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-c88c3788]{font-size:13px}.gs-sub[data-v-c88c3788]{font-size:12px}.gs-date[data-v-c88c3788]{font-size:12px;flex:none}.gs-empty[data-v-c88c3788]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-c88c3788]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-c88c3788]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:26px;padding:0 10px;font-size:12px;cursor:pointer}.week-tip[data-v-c88c3788]:hover{background:var(--bg-subtle)}.content[data-v-c88c3788]{flex:1;overflow:auto}.content-inner[data-v-c88c3788]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-c88c3788]{position:fixed;top:68px;right:20px;z-index:60;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}.toast[data-v-c88c3788]{background:var(--bg-page);border:1px solid var(--border);box-shadow:var(--shadow-float);border-radius:var(--radius-sm);padding:8px 14px;font-size:13px;color:var(--text-1)}.toast-enter-from[data-v-c88c3788],.toast-leave-to[data-v-c88c3788]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-c88c3788],.toast-leave-active[data-v-c88c3788]{transition:all .15s ease}.mob-search-btn[data-v-c88c3788]{display:none;width:30px;height:30px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.mobile-hide[data-v-c88c3788]{display:initial}.tabbar[data-v-c88c3788]{display:none;position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--bg-page);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tab-btn[data-v-c88c3788]{flex:1;height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px}.tab-btn.active[data-v-c88c3788]{color:var(--accent)}.sheet-mask[data-v-c88c3788]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212959}.more-sheet[data-v-c88c3788]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:14px 14px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-user[data-v-c88c3788]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-c88c3788]{display:flex;align-items:center;gap:12px;height:46px;border:none;background:transparent;color:var(--text-1);font-size:14px;cursor:pointer;border-radius:var(--radius-sm);text-align:left;padding:0 6px}.sheet-row[data-v-c88c3788]:hover,.sheet-row[data-v-c88c3788]:active{background:var(--bg-hover)}.sheet-name[data-v-c88c3788]{flex:1}.sheet-go[data-v-c88c3788]{color:var(--text-3)}.sheet-divider[data-v-c88c3788]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-c88c3788]{color:var(--danger)}.msw-mask[data-v-c88c3788]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-c88c3788]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-c88c3788]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-c88c3788]{color:var(--text-3)}.msw-input[data-v-c88c3788]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-c88c3788]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-c88c3788]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-c88c3788]:hover,.msw-item[data-v-c88c3788]:active{background:var(--bg-hover)}@media (max-width: 720px){.app[data-v-c88c3788]{display:block;height:100dvh}.side[data-v-c88c3788]{display:none}.main[data-v-c88c3788]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-c88c3788]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-c88c3788]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-c88c3788],.gsearch .gs-panel[data-v-c88c3788]{display:none}.mob-search-btn[data-v-c88c3788]{display:flex}.topbar-actions[data-v-c88c3788]{margin-left:auto;gap:6px}.mobile-hide[data-v-c88c3788]{display:none!important}.week-tip[data-v-c88c3788]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-c88c3788]{padding:0 10px}.topbar-actions .btn .num[data-v-c88c3788]{font-size:12px}.tabbar[data-v-c88c3788]{display:flex}.content[data-v-c88c3788]{flex:1;min-height:0}.content-inner[data-v-c88c3788]{max-width:none;padding:12px 12px calc(66px + env(safe-area-inset-bottom))}.card[data-v-c88c3788]{border-radius:var(--radius-md)}input.input[data-v-c88c3788],select.select[data-v-c88c3788],textarea.textarea[data-v-c88c3788]{width:100%;box-sizing:border-box}.btn[data-v-c88c3788]{touch-action:manipulation}.topbar-actions .btn-primary[data-v-c88c3788]{height:32px}.toast-wrap[data-v-c88c3788]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--border: #EBEDF0;--border-strong: #DCDEE3;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--accent: #3370FF;--accent-bg: #F0F5FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--shadow-float: 0 4px 16px rgba(29, 33, 41, .08)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-page);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap}.btn:hover{background:var(--bg-hover)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#2b5fd9}.btn-danger{color:var(--danger);border-color:var(--danger)}.btn-sm{height:26px;padding:0 10px;font-size:12px}.btn-xs{height:22px;padding:0 8px;font-size:12px}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%}.textarea{height:auto;min-height:56px;padding:8px 10px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}.dot.rest{background:var(--border)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){.card{border-radius:12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:86vh;max-height:86dvh;overflow:auto}.dialog-body{padding:14px!important}.form-grid{grid-template-columns:1fr!important}.dialog-btns{gap:8px}.dialog-btns .btn{flex:1}.drawer{top:auto!important;left:0!important;width:100%!important;height:min(86vh,86dvh)!important;border-left:none!important;border-top:1px solid var(--border);border-radius:14px 14px 0 0!important}.drawer-enter-active,.drawer-leave-active{transition:transform .2s ease,opacity .2s ease}.drawer-enter-from,.drawer-leave-to{transform:translateY(28px);opacity:0}.drawer-head{border-radius:14px 14px 0 0}.drawer-body{padding:12px!important}.tx-table{min-width:0!important}.tx-table thead{display:none!important}.tx-table tr{display:block;padding:10px 12px;border-bottom:1px solid var(--border);background:transparent}.tx-table tbody tr:last-child{border-bottom:none}.tx-table td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:3px 0!important;border:none!important;white-space:normal!important}.tx-table td:before{content:attr(data-label);color:var(--text-3);font-size:12px;flex:none}.tx-table td.ops-cell:before{content:none}.tx-table td.ops-cell{justify-content:flex-end}.tx-table td.empty{justify-content:center}.tx-table td.empty:before{content:none!important}.table-card,.tx-card{overflow-x:auto}.cred-table{min-width:560px!important}.th-ops{width:auto!important}.vault-toolbar{flex-wrap:wrap;row-gap:8px}.vault-toolbar .search-wrap{width:100%;max-width:none!important}.vault-toolbar .flex1{display:none}.vault-toolbar .btn{flex:none}.cal-toolbar{margin-bottom:8px}.cal-cell{min-height:54px!important;padding:4px 5px!important}.cal-marks{margin-top:3px!important;height:12px!important;gap:3px!important}.section,.sec{padding:12px!important}.rule-grid{grid-template-columns:1fr!important}} diff --git a/intern-log/dist/assets/index-BE9xlWZ7.js b/intern-log/dist/assets/index-NiysaoXd.js similarity index 69% rename from intern-log/dist/assets/index-BE9xlWZ7.js rename to intern-log/dist/assets/index-NiysaoXd.js index 46fe243..2cd3110 100644 --- a/intern-log/dist/assets/index-BE9xlWZ7.js +++ b/intern-log/dist/assets/index-NiysaoXd.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-Tgz3gT_A.js","./index-D8vVtKDY.js","./index-DxgZcHRE.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-D8vVtKDY.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-Tgz3gT_A.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-Eue2aiSv.js","./index-IuJhwbTi.js","./index-MT694d7P.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-IuJhwbTi.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-Eue2aiSv.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem}; diff --git a/intern-log/dist/assets/web-Tgz3gT_A.js b/intern-log/dist/assets/web-Eue2aiSv.js similarity index 98% rename from intern-log/dist/assets/web-Tgz3gT_A.js rename to intern-log/dist/assets/web-Eue2aiSv.js index 5cf8b56..a8fbe5d 100644 --- a/intern-log/dist/assets/web-Tgz3gT_A.js +++ b/intern-log/dist/assets/web-Eue2aiSv.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-D8vVtKDY.js";import{Encoding as E}from"./index-BE9xlWZ7.js";function m(w){const e=w.split("/").filter(t=>t!=="."),r=[];return e.forEach(t=>{t===".."&&r.length>0&&r[r.length-1]!==".."?r.pop():r.push(t)}),r.join("/")}function R(w,e){w=m(w),e=m(e);const r=w.split("/"),t=e.split("/");return w!==e&&r.every((i,n)=>i===t[n])}class g extends P{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME="Disc",this._writeCmds=["add","put","delete"],this.downloadFile=async e=>{var r,t;const i=x(e,e.webFetchExtra),n=await fetch(e.url,i);let s;if(!e.progress)s=await n.blob();else if(!(n!=null&&n.body))s=new Blob;else{const c=n.body.getReader();let o=0;const d=[],h=n.headers.get("content-type"),y=parseInt(n.headers.get("content-length")||"0",10);for(;;){const{done:f,value:p}=await c.read();if(f)break;d.push(p),o+=(p==null?void 0:p.length)||0;const b={url:e.url,bytes:o,contentLength:y};this.notifyListeners("progress",b)}const u=new Uint8Array(o);let l=0;for(const f of d)typeof f>"u"||(u.set(f,l),l+=f.length);s=new Blob([u.buffer],{type:h||void 0})}return{path:(await this.writeFile({path:e.path,directory:(r=e.directory)!==null&&r!==void 0?r:void 0,recursive:(t=e.recursive)!==null&&t!==void 0?t:!1,data:s})).uri,blob:s}}}async initDb(){if(this._db!==void 0)return this._db;if(!("indexedDB"in window))throw this.unavailable("This browser doesn't support IndexedDB");return new Promise((e,r)=>{const t=indexedDB.open(this.DB_NAME,this.DB_VERSION);t.onupgradeneeded=g.doUpgrade,t.onsuccess=()=>{this._db=t.result,e(t.result)},t.onerror=()=>r(t.error),t.onblocked=()=>{console.warn("db blocked")}})}static doUpgrade(e){const t=e.target.result;switch(e.oldVersion){case 0:case 1:default:t.objectStoreNames.contains("FileStorage")&&t.deleteObjectStore("FileStorage"),t.createObjectStore("FileStorage",{keyPath:"path"}).createIndex("by_folder","folder")}}async dbRequest(e,r){const t=this._writeCmds.indexOf(e)!==-1?"readwrite":"readonly";return this.initDb().then(i=>new Promise((n,s)=>{const o=i.transaction(["FileStorage"],t).objectStore("FileStorage")[e](...r);o.onsuccess=()=>n(o.result),o.onerror=()=>s(o.error)}))}async dbIndexRequest(e,r,t){const i=this._writeCmds.indexOf(r)!==-1?"readwrite":"readonly";return this.initDb().then(n=>new Promise((s,a)=>{const h=n.transaction(["FileStorage"],i).objectStore("FileStorage").index(e)[r](...t);h.onsuccess=()=>s(h.result),h.onerror=()=>a(h.error)}))}getPath(e,r){const t=r!==void 0?r.replace(/^[/]+|[/]+$/g,""):"";let i="";return e!==void 0&&(i+="/"+e),r!==""&&(i+="/"+t),i}async clear(){(await this.initDb()).transaction(["FileStorage"],"readwrite").objectStore("FileStorage").clear()}async readFile(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(t===void 0)throw Error("File does not exist.");return{data:t.content?t.content:""}}async writeFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=e.recursive,s=await this.dbRequest("get",[r]);if(s&&s.type==="directory")throw Error("The supplied path is a directory.");const a=r.substr(0,r.lastIndexOf("/"));if(await this.dbRequest("get",[a])===void 0){const h=a.indexOf("/",1);if(h!==-1){const y=a.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:n})}}if(!i&&!(t instanceof Blob)&&(t=t.indexOf(",")>=0?t.split(",")[1]:t,!this.isBase64String(t)))throw Error("The supplied data is not valid base64 content.");const o=Date.now(),d={path:r,folder:a,type:"file",size:t instanceof Blob?t.size:t.length,ctime:o,mtime:o,content:t};return await this.dbRequest("put",[d]),{uri:d.path}}async appendFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=r.substr(0,r.lastIndexOf("/")),s=Date.now();let a=s;const c=await this.dbRequest("get",[r]);if(c&&c.type==="directory")throw Error("The supplied path is a directory.");if(await this.dbRequest("get",[n])===void 0){const h=n.indexOf("/",1);if(h!==-1){const y=n.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:!0})}}if(!i&&!this.isBase64String(t))throw Error("The supplied data is not valid base64 content.");if(c!==void 0){if(c.content instanceof Blob)throw Error("The occupied entry contains a Blob object which cannot be appended to.");c.content!==void 0&&!i?t=btoa(atob(c.content)+atob(t)):t=c.content+t,a=c.ctime}const d={path:r,folder:n,type:"file",size:t.length,ctime:a,mtime:s,content:t};await this.dbRequest("put",[d])}async deleteFile(e){const r=this.getPath(e.directory,e.path);if(await this.dbRequest("get",[r])===void 0)throw Error("File does not exist.");if((await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)])).length!==0)throw Error("Folder is not empty.");await this.dbRequest("delete",[r])}async mkdir(e){const r=this.getPath(e.directory,e.path),t=e.recursive,i=r.substr(0,r.lastIndexOf("/")),n=(r.match(/\//g)||[]).length,s=await this.dbRequest("get",[i]),a=await this.dbRequest("get",[r]);if(n===1)throw Error("Cannot create Root directory");if(a!==void 0)throw Error("Current directory does already exist.");if(!t&&n!==2&&s===void 0)throw Error("Parent directory must exist");if(t&&n!==2&&s===void 0){const d=i.substr(i.indexOf("/",1));await this.mkdir({path:d,directory:e.directory,recursive:t})}const c=Date.now(),o={path:r,folder:i,type:"directory",size:0,ctime:c,mtime:c};await this.dbRequest("put",[o])}async rmdir(e){const{path:r,directory:t,recursive:i}=e,n=this.getPath(t,r),s=await this.dbRequest("get",[n]);if(s===void 0)throw Error("Folder does not exist.");if(s.type!=="directory")throw Error("Requested path is not a directory");const a=await this.readdir({path:r,directory:t});if(a.files.length!==0&&!i)throw Error("Folder is not empty");for(const c of a.files){const o=`${r}/${c.name}`;(await this.stat({path:o,directory:t})).type==="file"?await this.deleteFile({path:o,directory:t}):await this.rmdir({path:o,directory:t,recursive:i})}await this.dbRequest("delete",[n])}async readdir(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(e.path!==""&&t===void 0)throw Error("Folder does not exist.");const i=await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)]);return{files:await Promise.all(i.map(async s=>{let a=await this.dbRequest("get",[s]);return a===void 0&&(a=await this.dbRequest("get",[s+"/"])),{name:s.substring(r.length+1),type:a.type,size:a.size,ctime:a.ctime,mtime:a.mtime,uri:a.path}}))}}async getUri(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);return t===void 0&&(t=await this.dbRequest("get",[r+"/"])),{uri:(t==null?void 0:t.path)||r}}async stat(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);if(t===void 0&&(t=await this.dbRequest("get",[r+"/"])),t===void 0)throw Error("Entry does not exist.");return{type:t.type,size:t.size,ctime:t.ctime,mtime:t.mtime,uri:t.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:"granted"}}async checkPermissions(){return{publicStorage:"granted"}}async _copy(e,r=!1){let{toDirectory:t}=e;const{to:i,from:n,directory:s}=e;if(!i||!n)throw Error("Both to and from must be provided");t||(t=s);const a=this.getPath(s,n),c=this.getPath(t,i);if(a===c)return{uri:c};if(R(a,c))throw Error("To path cannot contain the from path");let o;try{o=await this.stat({path:i,directory:t})}catch{const l=i.split("/");l.pop();const f=l.join("/");if(l.length>0&&(await this.stat({path:f,directory:t})).type!=="directory")throw new Error("Parent directory of the to path is a file")}if(o&&o.type==="directory")throw new Error("Cannot overwrite a directory with a file");const d=await this.stat({path:n,directory:s}),h=async(u,l,f)=>{const p=this.getPath(t,u),b=await this.dbRequest("get",[p]);b.ctime=l,b.mtime=f,await this.dbRequest("put",[b])},y=d.ctime?d.ctime:Date.now();switch(d.type){case"file":{const u=await this.readFile({path:n,directory:s});r&&await this.deleteFile({path:n,directory:s});let l;!(u.data instanceof Blob)&&!this.isBase64String(u.data)&&(l=E.UTF8);const f=await this.writeFile({path:i,directory:t,data:u.data,encoding:l});return r&&await h(i,y,d.mtime),f}case"directory":{if(o)throw Error("Cannot move a directory over an existing object");try{await this.mkdir({path:i,directory:t,recursive:!1}),r&&await h(i,y,d.mtime)}catch{}const u=(await this.readdir({path:n,directory:s})).files;for(const l of u)await this._copy({from:`${n}/${l.name}`,to:`${i}/${l.name}`,directory:s,toDirectory:t},r);r&&await this.rmdir({path:n,directory:s})}}return{uri:c}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}}g._debug=!0;export{g as FilesystemWeb}; +import{W as P,b as x}from"./index-IuJhwbTi.js";import{Encoding as E}from"./index-NiysaoXd.js";function m(w){const e=w.split("/").filter(t=>t!=="."),r=[];return e.forEach(t=>{t===".."&&r.length>0&&r[r.length-1]!==".."?r.pop():r.push(t)}),r.join("/")}function R(w,e){w=m(w),e=m(e);const r=w.split("/"),t=e.split("/");return w!==e&&r.every((i,n)=>i===t[n])}class g extends P{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME="Disc",this._writeCmds=["add","put","delete"],this.downloadFile=async e=>{var r,t;const i=x(e,e.webFetchExtra),n=await fetch(e.url,i);let s;if(!e.progress)s=await n.blob();else if(!(n!=null&&n.body))s=new Blob;else{const c=n.body.getReader();let o=0;const d=[],h=n.headers.get("content-type"),y=parseInt(n.headers.get("content-length")||"0",10);for(;;){const{done:f,value:p}=await c.read();if(f)break;d.push(p),o+=(p==null?void 0:p.length)||0;const b={url:e.url,bytes:o,contentLength:y};this.notifyListeners("progress",b)}const u=new Uint8Array(o);let l=0;for(const f of d)typeof f>"u"||(u.set(f,l),l+=f.length);s=new Blob([u.buffer],{type:h||void 0})}return{path:(await this.writeFile({path:e.path,directory:(r=e.directory)!==null&&r!==void 0?r:void 0,recursive:(t=e.recursive)!==null&&t!==void 0?t:!1,data:s})).uri,blob:s}}}async initDb(){if(this._db!==void 0)return this._db;if(!("indexedDB"in window))throw this.unavailable("This browser doesn't support IndexedDB");return new Promise((e,r)=>{const t=indexedDB.open(this.DB_NAME,this.DB_VERSION);t.onupgradeneeded=g.doUpgrade,t.onsuccess=()=>{this._db=t.result,e(t.result)},t.onerror=()=>r(t.error),t.onblocked=()=>{console.warn("db blocked")}})}static doUpgrade(e){const t=e.target.result;switch(e.oldVersion){case 0:case 1:default:t.objectStoreNames.contains("FileStorage")&&t.deleteObjectStore("FileStorage"),t.createObjectStore("FileStorage",{keyPath:"path"}).createIndex("by_folder","folder")}}async dbRequest(e,r){const t=this._writeCmds.indexOf(e)!==-1?"readwrite":"readonly";return this.initDb().then(i=>new Promise((n,s)=>{const o=i.transaction(["FileStorage"],t).objectStore("FileStorage")[e](...r);o.onsuccess=()=>n(o.result),o.onerror=()=>s(o.error)}))}async dbIndexRequest(e,r,t){const i=this._writeCmds.indexOf(r)!==-1?"readwrite":"readonly";return this.initDb().then(n=>new Promise((s,a)=>{const h=n.transaction(["FileStorage"],i).objectStore("FileStorage").index(e)[r](...t);h.onsuccess=()=>s(h.result),h.onerror=()=>a(h.error)}))}getPath(e,r){const t=r!==void 0?r.replace(/^[/]+|[/]+$/g,""):"";let i="";return e!==void 0&&(i+="/"+e),r!==""&&(i+="/"+t),i}async clear(){(await this.initDb()).transaction(["FileStorage"],"readwrite").objectStore("FileStorage").clear()}async readFile(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(t===void 0)throw Error("File does not exist.");return{data:t.content?t.content:""}}async writeFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=e.recursive,s=await this.dbRequest("get",[r]);if(s&&s.type==="directory")throw Error("The supplied path is a directory.");const a=r.substr(0,r.lastIndexOf("/"));if(await this.dbRequest("get",[a])===void 0){const h=a.indexOf("/",1);if(h!==-1){const y=a.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:n})}}if(!i&&!(t instanceof Blob)&&(t=t.indexOf(",")>=0?t.split(",")[1]:t,!this.isBase64String(t)))throw Error("The supplied data is not valid base64 content.");const o=Date.now(),d={path:r,folder:a,type:"file",size:t instanceof Blob?t.size:t.length,ctime:o,mtime:o,content:t};return await this.dbRequest("put",[d]),{uri:d.path}}async appendFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=r.substr(0,r.lastIndexOf("/")),s=Date.now();let a=s;const c=await this.dbRequest("get",[r]);if(c&&c.type==="directory")throw Error("The supplied path is a directory.");if(await this.dbRequest("get",[n])===void 0){const h=n.indexOf("/",1);if(h!==-1){const y=n.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:!0})}}if(!i&&!this.isBase64String(t))throw Error("The supplied data is not valid base64 content.");if(c!==void 0){if(c.content instanceof Blob)throw Error("The occupied entry contains a Blob object which cannot be appended to.");c.content!==void 0&&!i?t=btoa(atob(c.content)+atob(t)):t=c.content+t,a=c.ctime}const d={path:r,folder:n,type:"file",size:t.length,ctime:a,mtime:s,content:t};await this.dbRequest("put",[d])}async deleteFile(e){const r=this.getPath(e.directory,e.path);if(await this.dbRequest("get",[r])===void 0)throw Error("File does not exist.");if((await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)])).length!==0)throw Error("Folder is not empty.");await this.dbRequest("delete",[r])}async mkdir(e){const r=this.getPath(e.directory,e.path),t=e.recursive,i=r.substr(0,r.lastIndexOf("/")),n=(r.match(/\//g)||[]).length,s=await this.dbRequest("get",[i]),a=await this.dbRequest("get",[r]);if(n===1)throw Error("Cannot create Root directory");if(a!==void 0)throw Error("Current directory does already exist.");if(!t&&n!==2&&s===void 0)throw Error("Parent directory must exist");if(t&&n!==2&&s===void 0){const d=i.substr(i.indexOf("/",1));await this.mkdir({path:d,directory:e.directory,recursive:t})}const c=Date.now(),o={path:r,folder:i,type:"directory",size:0,ctime:c,mtime:c};await this.dbRequest("put",[o])}async rmdir(e){const{path:r,directory:t,recursive:i}=e,n=this.getPath(t,r),s=await this.dbRequest("get",[n]);if(s===void 0)throw Error("Folder does not exist.");if(s.type!=="directory")throw Error("Requested path is not a directory");const a=await this.readdir({path:r,directory:t});if(a.files.length!==0&&!i)throw Error("Folder is not empty");for(const c of a.files){const o=`${r}/${c.name}`;(await this.stat({path:o,directory:t})).type==="file"?await this.deleteFile({path:o,directory:t}):await this.rmdir({path:o,directory:t,recursive:i})}await this.dbRequest("delete",[n])}async readdir(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(e.path!==""&&t===void 0)throw Error("Folder does not exist.");const i=await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)]);return{files:await Promise.all(i.map(async s=>{let a=await this.dbRequest("get",[s]);return a===void 0&&(a=await this.dbRequest("get",[s+"/"])),{name:s.substring(r.length+1),type:a.type,size:a.size,ctime:a.ctime,mtime:a.mtime,uri:a.path}}))}}async getUri(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);return t===void 0&&(t=await this.dbRequest("get",[r+"/"])),{uri:(t==null?void 0:t.path)||r}}async stat(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);if(t===void 0&&(t=await this.dbRequest("get",[r+"/"])),t===void 0)throw Error("Entry does not exist.");return{type:t.type,size:t.size,ctime:t.ctime,mtime:t.mtime,uri:t.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:"granted"}}async checkPermissions(){return{publicStorage:"granted"}}async _copy(e,r=!1){let{toDirectory:t}=e;const{to:i,from:n,directory:s}=e;if(!i||!n)throw Error("Both to and from must be provided");t||(t=s);const a=this.getPath(s,n),c=this.getPath(t,i);if(a===c)return{uri:c};if(R(a,c))throw Error("To path cannot contain the from path");let o;try{o=await this.stat({path:i,directory:t})}catch{const l=i.split("/");l.pop();const f=l.join("/");if(l.length>0&&(await this.stat({path:f,directory:t})).type!=="directory")throw new Error("Parent directory of the to path is a file")}if(o&&o.type==="directory")throw new Error("Cannot overwrite a directory with a file");const d=await this.stat({path:n,directory:s}),h=async(u,l,f)=>{const p=this.getPath(t,u),b=await this.dbRequest("get",[p]);b.ctime=l,b.mtime=f,await this.dbRequest("put",[b])},y=d.ctime?d.ctime:Date.now();switch(d.type){case"file":{const u=await this.readFile({path:n,directory:s});r&&await this.deleteFile({path:n,directory:s});let l;!(u.data instanceof Blob)&&!this.isBase64String(u.data)&&(l=E.UTF8);const f=await this.writeFile({path:i,directory:t,data:u.data,encoding:l});return r&&await h(i,y,d.mtime),f}case"directory":{if(o)throw Error("Cannot move a directory over an existing object");try{await this.mkdir({path:i,directory:t,recursive:!1}),r&&await h(i,y,d.mtime)}catch{}const u=(await this.readdir({path:n,directory:s})).files;for(const l of u)await this._copy({from:`${n}/${l.name}`,to:`${i}/${l.name}`,directory:s,toDirectory:t},r);r&&await this.rmdir({path:n,directory:s})}}return{uri:c}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}}g._debug=!0;export{g as FilesystemWeb}; diff --git a/intern-log/dist/index.html b/intern-log/dist/index.html index efe71bd..cbd4c4f 100644 --- a/intern-log/dist/index.html +++ b/intern-log/dist/index.html @@ -8,8 +8,8 @@ 实习工作日志 - - + +
diff --git a/intern-log/package.json b/intern-log/package.json index 16ed4b9..4e11151 100644 --- a/intern-log/package.json +++ b/intern-log/package.json @@ -1,7 +1,7 @@ { "name": "intern-log", "private": true, - "version": "0.3.1", + "version": "0.4.0", "type": "module", "scripts": { "dev": "vite", diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue index efb746e..bf3b11e 100644 --- a/intern-log/src/App.vue +++ b/intern-log/src/App.vue @@ -3,6 +3,7 @@ import { computed, onMounted, ref, watch } from 'vue' import Icon from './components/Icon.vue' import CalendarView from './views/CalendarView.vue' import TodayView from './views/TodayView.vue' +import PlanView from './views/PlanView.vue' import StatsView from './views/StatsView.vue' import ReportView from './views/ReportView.vue' import LedgerView from './views/LedgerView.vue' @@ -112,6 +113,7 @@ function onGlobalKey(e: KeyboardEvent) { const VIEWS = [ { key: 'calendar', name: '日历', icon: 'calendar', group: '记录' }, { key: 'today', name: '详情', icon: 'edit', group: '记录' }, + { key: 'plan', name: '计划', icon: 'plan', group: '记录' }, { key: 'ledger', name: '记账', icon: 'wallet', group: '工具' }, { key: 'memo', name: '备忘录', icon: 'memo', group: '工具' }, { key: 'stats', name: '统计', icon: 'chart', group: '分析' }, @@ -145,7 +147,7 @@ watch([isAdminUser, route], () => { }, { immediate: true }) // 手机端底部标签页:4 个主功能 + 「更多」弹层(统计/总结/密码库/设置/退出) -const TAB_KEYS = ['calendar', 'today', 'ledger', 'memo'] +const TAB_KEYS = ['calendar', 'today', 'plan', 'ledger'] const TABS = VIEWS.filter(v => TAB_KEYS.includes(v.key)) const moreOpen = ref(false) function navFromSheet(key: string) { moreOpen.value = false; nav(key) } @@ -291,6 +293,7 @@ onMounted(async () => {
+ diff --git a/intern-log/src/components/TransactionDialog.vue b/intern-log/src/components/TransactionDialog.vue index 3fef721..5c1679f 100644 --- a/intern-log/src/components/TransactionDialog.vue +++ b/intern-log/src/components/TransactionDialog.vue @@ -1,7 +1,7 @@ + + + + diff --git a/intern-log/src/views/SettingsView.vue b/intern-log/src/views/SettingsView.vue index aa862ab..16b81b8 100644 --- a/intern-log/src/views/SettingsView.vue +++ b/intern-log/src/views/SettingsView.vue @@ -7,10 +7,11 @@ import { listAttendanceBetween, listLogItemsBetween, listProjects, renameProject, saveLocationPresets, setProjectArchived, setSetting, type WorkRule } from '../db/repo' -import { categoryLabel, type Project } from '../db/schema' +import { type Project } from '../db/schema' +import { getLogCategories, setLogCategories, getLedgerCategories, setLedgerCategories } from '../db/categories' import { downloadText, } from '../lib/download' import { downloadCsv } from '../lib/csv' -import { hhmm, parseDateStr, todayStr } from '../lib/date' +import { addDays, hhmm, parseDateStr, todayStr, weekStart } from '../lib/date' import { computeDay } from '../domain/attendance' import { changeLoginPassword, deleteCurrentUser, getSession } from '../db/auth' import { ensureCloudBinding, getSyncLastTime, isSyncConfigured, syncWithStoredConfig, syncLastError, type SyncResult } from '../sync/engine' @@ -27,6 +28,85 @@ const aiKey = ref('') const aiModel = ref('') const editingId = ref(null) const editName = ref('') +// ---- 分类管理 ---- +const logCats = ref([]) +const expenseCats = ref([]) +const incomeCats = ref([]) +const editingCat = ref<{ kind: 'log' | 'expense' | 'income'; index: number; value: string } | null>(null) + +async function loadCategories() { + logCats.value = await getLogCategories() + expenseCats.value = await getLedgerCategories('expense') + incomeCats.value = await getLedgerCategories('income') +} +async function addCat(kind: 'log' | 'expense' | 'income') { + const name = window.prompt('新分类名称') + if (!name || !name.trim()) return + const list = kind === 'log' ? logCats.value : kind === 'expense' ? expenseCats.value : incomeCats.value + const clean = name.trim() + if (list.includes(clean)) { showToast('分类已存在'); return } + const next = [...list, clean] + if (kind === 'log') { logCats.value = next; await setLogCategories(next) } + else if (kind === 'expense') { expenseCats.value = next; await setLedgerCategories('expense', next) } + else { incomeCats.value = next; await setLedgerCategories('income', next) } + showToast('分类已添加') +} +async function renameCat(kind: 'log' | 'expense' | 'income', index: number, oldName: string) { + const name = window.prompt('修改分类名称', oldName) + if (!name || !name.trim() || name.trim() === oldName) return + const list = kind === 'log' ? logCats.value : kind === 'expense' ? expenseCats.value : incomeCats.value + const next = list.map((x, i) => (i === index ? name.trim() : x)) + if (kind === 'log') { logCats.value = next; await setLogCategories(next) } + else if (kind === 'expense') { expenseCats.value = next; await setLedgerCategories('expense', next) } + else { incomeCats.value = next; await setLedgerCategories('income', next) } + showToast('分类已更新(历史记录自动跟随显示)') +} +async function removeCat(kind: 'log' | 'expense' | 'income', index: number) { + const list = kind === 'log' ? logCats.value : kind === 'expense' ? expenseCats.value : incomeCats.value + if (list.length <= 1) { showToast('至少保留一个分类'); return } + if (!window.confirm('删除分类「' + list[index] + '」?历史记录不受影响。')) return + const next = list.filter((_, i) => i !== index) + if (kind === 'log') { logCats.value = next; await setLogCategories(next) } + else if (kind === 'expense') { expenseCats.value = next; await setLedgerCategories('expense', next) } + else { incomeCats.value = next; await setLedgerCategories('income', next) } + showToast('分类已删除') +} + +// ---- 工作详情范围导出 ---- +const expRange = ref<'day' | 'week' | 'month' | 'custom'>('day') +const expStart = ref(todayStr()) +const expEnd = ref(todayStr()) +function rangeStartEnd(): { start: string; end: string; label: string } { + const t = todayStr() + if (expRange.value === 'day') return { start: expStart.value, end: expStart.value, label: expStart.value } + if (expRange.value === 'week') { const ws = weekStart(expStart.value); return { start: ws, end: addDays(ws, 6), label: ws + ' ~ ' + addDays(ws, 6) } } + if (expRange.value === 'month') { const y = expStart.value.slice(0, 4); const m = expStart.value.slice(5, 7); const last = new Date(Number(y), Number(m), 0).getDate(); return { start: y + '-' + m + '-01', end: y + '-' + m + '-' + last, label: y + '-' + m } } + return { start: expStart.value, end: expEnd.value, label: expStart.value + ' ~ ' + expEnd.value } +} +async function doExportRange() { + const { start, end, label } = rangeStartEnd() + const found = await Promise.all([listLogItemsBetween(start, end), listProjects(true)]) + const items = found[0] + const projects = found[1] + const pmap = new Map(projects.map(p => [p.id as number, p.name])) + const rows: (string | number | null)[][] = [['日期', '分类', '项目', '内容', '耗时(分钟)', '成果', '待跟进', '收获', '备注']] + for (const it of items) { + rows.push([ + it.date, + categoryLabel(it.category), + it.project_id ? (pmap.get(it.project_id) || '') : '', + it.content, + it.minutes == null ? '' : it.minutes, + it.is_milestone ? '是' : '', + it.needs_followup ? '是' : '', + it.takeaway || '', + it.remark || '' + ]) + } + const file = '工作详情_' + label.replace(/[~s]/g, '_') + '.csv' + const p = await downloadCsv(file, rows) + showToast(p ? '已导出:' + p : '已导出到系统下载目录(' + items.length + ' 条)') +} const fileInput = ref(null) const pendingImport = ref<{ name: string; text: string } | null>(null) const importError = ref('') @@ -109,6 +189,7 @@ async function load() { aiKey.value = await getSetting('ai_api_key', '') aiModel.value = await getSetting('ai_model', '') await loadSyncInfo() + await loadCategories() } async function saveAi() { @@ -375,6 +456,64 @@ async function doImport() {
+
+
工作分类
+
+
工作记录分类
+
+ + {{ c }} + + + +
+
+
+
记账支出分类
+
+ + {{ c }} + + + +
+
+
+
记账收入分类
+
+ + {{ c }} + + + +
+
+
+ +
+
工作详情导出
+
+ + + + +
+
+ + +
+
+ +
+
+
数据备份
@@ -434,6 +573,21 @@ async function doImport() { .loc-note { font-size: 12px; } .ai-grid { display: flex; flex-direction: column; gap: 10px; } .backup-row { display: flex; gap: 8px; } +.cat-block { margin-top: 10px; } +.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12px; } +.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; } +.cat-chip { + display: inline-flex; align-items: center; gap: 4px; + border: 1px solid var(--border); border-radius: 999px; + padding: 2px 8px; font-size: 12px; +} +.chip-btn { border: none; background: transparent; color: var(--text-3); cursor: pointer; font-size: 11px; padding: 0 1px; } +.chip-btn:hover { color: var(--accent); } +.exp-dates { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; } +.exp-dates .input { width: 150px; } +.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; } +.seg-btn { border: none; background: var(--bg-page); color: var(--text-2); cursor: pointer; font-size: 12px; padding: 5px 12px; } +.seg-btn.active { background: var(--accent-bg); color: var(--accent); } .import-error { color: var(--danger); font-size: 12px; margin-top: 8px; } .backup-note { font-size: 12px; margin-top: 10px; } diff --git a/intern-log/src/views/StatsView.vue b/intern-log/src/views/StatsView.vue index 0ed8b22..fe9359b 100644 --- a/intern-log/src/views/StatsView.vue +++ b/intern-log/src/views/StatsView.vue @@ -2,7 +2,7 @@ import { onMounted, ref, watch } from 'vue' import { getWorkRule, listAttendanceBetween, listLogItemsBetween, listProjects } from '../db/repo' import { computeDay } from '../domain/attendance' -import { CATEGORIES } from '../db/schema' +import { getLogCategories } from '../db/categories' import { addDays, todayStr, weekStart } from '../lib/date' import { attendanceChanged } from '../lib/bus' @@ -57,10 +57,15 @@ async function loadAll(): Promise { .sort((a, b) => b.count - a.count) const total = items.length || 1 - catStats.value = CATEGORIES - .map(c => { - const count = items.filter(i => i.category === c.key).length - return { key: c.key, label: c.label, count, percent: Math.round((count / total) * 100) } + const logCats = await getLogCategories() + const catCount = new Map() + for (const it of items) catCount.set(it.category, (catCount.get(it.category) || 0) + 1) + const catSet = new Set(logCats) + for (const k of catCount.keys()) if (!catSet.has(k)) logCats.push(k) + catStats.value = logCats + .map(label => { + const count = catCount.get(label) || 0 + return { key: label, label, count, percent: Math.round((count / total) * 100) } }) .filter(c => c.count > 0) .sort((a, b) => b.count - a.count) diff --git a/server/index.js b/server/index.js index 5325205..852c331 100644 --- a/server/index.js +++ b/server/index.js @@ -12,7 +12,7 @@ const PORT = Number(process.env.PORT || 3780) const TOKEN_TTL_MS = 30 * 24 * 60 * 60 * 1000 // 30 天 const ITER = 150000 -const TABLES = ['project', 'work_log', 'log_item', 'attendance', 'weekly_note', 'setting', 'memo', 'credential', 'transaction'] +const TABLES = ['project', 'work_log', 'log_item', 'attendance', 'weekly_note', 'setting', 'memo', 'credential', 'transaction', 'plan'] // 自然键:同一逻辑记录在两台设备上独立创建时的去重依据 const NATURAL_KEYS = {