diff --git a/docs/release-notes-v0.7.2.md b/docs/release-notes-v0.7.2.md new file mode 100644 index 0000000..a86df58 --- /dev/null +++ b/docs/release-notes-v0.7.2.md @@ -0,0 +1,7 @@ +# v0.7.2 顶栏精简 + +## 优化 +- 移除右上角常驻的「上班打卡」按钮:打卡在「详情」页当日面板与日历当日抽屉中操作,顶栏不再重复。 +- 移除右上角常驻的「填写本周周记」提示按钮:改为周五至周日打开应用时 toast 提示一次,不占用常驻界面;设置页「周记提醒」开关继续有效。 +- 顶栏仅保留页面标题与搜索,移动端搜索按钮右对齐。 +- 清除相关死代码约 80 行(打卡三态、周记提示样式)。 diff --git a/intern-log/dist/assets/index-D9aBzCwh.js b/intern-log/dist/assets/index-BGMpfaMy.js similarity index 69% rename from intern-log/dist/assets/index-D9aBzCwh.js rename to intern-log/dist/assets/index-BGMpfaMy.js index 39b9a93..477fe9e 100644 --- a/intern-log/dist/assets/index-D9aBzCwh.js +++ b/intern-log/dist/assets/index-BGMpfaMy.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-9h8A4HQx.js","./index-pe6VFzmc.js","./index-BiI44Vix.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-pe6VFzmc.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-9h8A4HQx.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-Deo5OtIz.js","./index-ynPmf8i8.js","./index-COwenkhO.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-ynPmf8i8.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-Deo5OtIz.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/index-BiI44Vix.css b/intern-log/dist/assets/index-COwenkhO.css similarity index 60% rename from intern-log/dist/assets/index-BiI44Vix.css rename to intern-log/dist/assets/index-COwenkhO.css index 1826f73..d8d1479 100644 --- a/intern-log/dist/assets/index-BiI44Vix.css +++ b/intern-log/dist/assets/index-COwenkhO.css @@ -1 +1 @@ -.confirm-dialog[data-v-1f3675f2]{width:400px;padding:22px 22px 18px}.confirm-body[data-v-1f3675f2]{display:flex;gap:14px;align-items:flex-start}.confirm-badge[data-v-1f3675f2]{width:40px;height:40px;flex:none;border-radius:50%;background:#fdeeee;color:var(--danger);display:flex;align-items:center;justify-content:center}.confirm-text[data-v-1f3675f2]{flex:1;min-width:0}.confirm-title[data-v-1f3675f2]{font-size:15px;font-weight:600;color:var(--text-1);line-height:1.4}.confirm-title.is-danger[data-v-1f3675f2]{color:var(--danger)}.confirm-msg[data-v-1f3675f2]{margin-top:6px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.confirm-btns[data-v-1f3675f2]{margin-top:18px;display:flex;justify-content:flex-end;gap:8px}.modal-enter-active[data-v-1f3675f2],.modal-leave-active[data-v-1f3675f2]{transition:opacity .15s ease}.modal-enter-from[data-v-1f3675f2],.modal-leave-to[data-v-1f3675f2]{opacity:0}@media (max-width: 720px){.confirm-dialog[data-v-1f3675f2]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.confirm-btns .btn[data-v-1f3675f2]{flex:1;height:40px}.confirm-btns[data-v-1f3675f2]{margin-top:16px}}.dialog[data-v-91c30038]{width:560px}.min-chips[data-v-91c30038]{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}.min-chip[data-v-91c30038]{border:1px solid var(--border-strong);background:var(--bg-page);border-radius:999px;height:24px;padding:0 10px;font-size:12px;color:var(--text-2);cursor:pointer;transition:all .12s}.min-chip[data-v-91c30038]:hover{background:var(--bg-hover)}.min-chip.on[data-v-91c30038]{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.dp-head[data-v-81276f4c]{margin-bottom:12px}.dp-date[data-v-81276f4c]{font-size:14px;font-weight:600}.att-grid[data-v-81276f4c]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-81276f4c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-81276f4c]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.att-val>.num[data-v-81276f4c]{font-size:14px;font-weight:600;letter-spacing:.2px}.val-empty[data-v-81276f4c]{color:var(--text-3)}.edit-row[data-v-81276f4c]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-81276f4c]{width:104px}.att-note[data-v-81276f4c]{margin-top:10px;font-size:12px}.att-actions[data-v-81276f4c]{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.form-footer[data-v-81276f4c]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.list-sec[data-v-81276f4c]{margin-bottom:4px}.sec-head[data-v-81276f4c]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-81276f4c]{margin-bottom:0}.item[data-v-81276f4c]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px;margin-bottom:6px;background:var(--bg-subtle);transition:border-color .12s,background .12s}.item[data-v-81276f4c]:hover{border-color:var(--border-strong);background:var(--bg-page)}.item-main[data-v-81276f4c]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-81276f4c]{cursor:text;word-break:break-all;font-weight:500}.item-meta[data-v-81276f4c]{font-size:12px}.item-sub[data-v-81276f4c]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.dp-foot[data-v-81276f4c]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.dp-head[data-v-81276f4c]{margin-bottom:10px}.att-grid[data-v-81276f4c]{grid-template-columns:1fr 1fr;gap:10px 12px}.att-cell label[data-v-81276f4c]{margin-bottom:3px}.att-actions[data-v-81276f4c]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.att-actions .btn[data-v-81276f4c]{width:100%}.edit-row[data-v-81276f4c]{flex-wrap:wrap}.edit-row .time-input[data-v-81276f4c]{width:100%;flex:1 1 100%}.edit-row .btn[data-v-81276f4c]{flex:1}.item-main[data-v-81276f4c]{gap:6px}}.cal-toolbar[data-v-abd71a5b]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-abd71a5b]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-card[data-v-abd71a5b]{padding:0;overflow:hidden}.cal-head[data-v-abd71a5b],.cal-grid[data-v-abd71a5b]{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border)}.cal-week[data-v-abd71a5b]{background:var(--bg-subtle);text-align:center;padding:7px 0;font-size:12px;font-weight:500;color:var(--text-3)}.cal-cell[data-v-abd71a5b]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;cursor:pointer;display:block;font-size:13px;transition:background .12s}.cal-cell[data-v-abd71a5b]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-abd71a5b]{cursor:default;background:var(--bg-subtle)}.cal-cell.is-today[data-v-abd71a5b]{background:#f5f9ff}.cal-cell.selected[data-v-abd71a5b]{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}.daynum.today[data-v-abd71a5b]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-abd71a5b]{color:var(--text-3)}.cal-marks[data-v-abd71a5b]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-abd71a5b]{color:var(--text-3)}.mark-star[data-v-abd71a5b]{color:var(--accent)}.drawer[data-v-abd71a5b]{position:fixed;top:0;right:0;bottom:0;width:min(440px,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-abd71a5b]{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-abd71a5b]{font-weight:600}.drawer-body[data-v-abd71a5b]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-abd71a5b],.drawer-leave-active[data-v-abd71a5b]{transition:opacity .15s ease}.drawer-enter-from[data-v-abd71a5b],.drawer-leave-to[data-v-abd71a5b]{opacity:0}@media (max-width: 720px){.cal-title[data-v-abd71a5b]{min-width:76px;font-size:13px}.drawer[data-v-abd71a5b]{width:100%}}.detail-page[data-v-2bb84c76]{display:flex;flex-direction:column}.toolbar[data-v-2bb84c76]{padding:10px 16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.nav-row[data-v-2bb84c76]{display:flex;align-items:center;gap:6px}.date-title[data-v-2bb84c76]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-2bb84c76]{color:var(--accent)}.w-date[data-v-2bb84c76]{width:150px;flex:none}.tool-sep[data-v-2bb84c76]{width:1px;align-self:stretch;background:var(--border)}.exp-row[data-v-2bb84c76]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.exp-label[data-v-2bb84c76]{font-size:12px}.w-exp[data-v-2bb84c76]{width:140px;flex:none}@media (max-width: 720px){.tool-sep[data-v-2bb84c76]{display:none}.toolbar[data-v-2bb84c76]{padding:10px 12px;gap:10px}.nav-row[data-v-2bb84c76]{flex:1 1 100%}.date-title[data-v-2bb84c76]{min-width:0;flex:1;text-align:left}.w-date[data-v-2bb84c76]{flex:1;min-width:120px;width:auto}.exp-row[data-v-2bb84c76]{width:100%}.exp-row .seg[data-v-2bb84c76]{flex:1;display:flex}.exp-row .seg-btn[data-v-2bb84c76]{flex:1;padding:0 6px}.w-exp[data-v-2bb84c76]{flex:1;min-width:0;width:auto}}.plan-page[data-v-ffd19b28]{display:flex;flex-direction:column}.blk-head[data-v-ffd19b28]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 2px 10px}.blk-head-text[data-v-ffd19b28]{min-width:0}.blk-title[data-v-ffd19b28]{font-size:14px;font-weight:600}.blk-sub[data-v-ffd19b28]{font-size:12px;margin-top:1px}.day-head[data-v-ffd19b28]{margin-top:18px}.day-ops[data-v-ffd19b28]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.date-chip[data-v-ffd19b28]{min-width:74px;text-align:center;font-weight:600;font-size:13px}.date-chip.today[data-v-ffd19b28]{color:var(--accent)}.timer-live[data-v-ffd19b28]{color:var(--accent);font-weight:600}.goal-card[data-v-ffd19b28]{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;margin-bottom:10px}.goal-main[data-v-ffd19b28]{flex:1;min-width:0}.goal-line[data-v-ffd19b28]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.goal-name[data-v-ffd19b28]{font-size:14px;font-weight:500;word-break:break-all}.goal-range[data-v-ffd19b28]{font-size:12px}.goal-bar[data-v-ffd19b28]{height:6px;border-radius:3px;background:var(--bg-subtle);overflow:hidden;margin-top:10px}.goal-bar-fill[data-v-ffd19b28]{display:block;height:100%;background:var(--accent);border-radius:3px}.goal-meta[data-v-ffd19b28]{font-size:12px;margin-top:6px}.goal-ops[data-v-ffd19b28]{display:flex;gap:4px}.list-card[data-v-ffd19b28]{overflow:hidden}.plan-item[data-v-ffd19b28]{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border)}.plan-item[data-v-ffd19b28]:last-child{border-bottom:none}.plan-item.done[data-v-ffd19b28]{opacity:.6}.plan-item.skip[data-v-ffd19b28]{opacity:.48}.plan-item.running[data-v-ffd19b28]{box-shadow:inset 3px 0 0 var(--accent)}.pi-time[data-v-ffd19b28]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-ffd19b28]{flex:1;min-width:0}.pi-title[data-v-ffd19b28]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-ffd19b28]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-ffd19b28]{text-decoration:line-through}.state-done[data-v-ffd19b28]{color:var(--ok);font-size:12px}.state-skip[data-v-ffd19b28]{color:var(--text-3);font-size:12px}.pi-note[data-v-ffd19b28],.pi-meta[data-v-ffd19b28]{font-size:12px;margin-top:3px}.pi-ops[data-v-ffd19b28]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-ffd19b28]{color:var(--accent);border-color:var(--accent)}.empty[data-v-ffd19b28]{padding:28px 16px}.dialog[data-v-ffd19b28]{width:420px}.form-row[data-v-ffd19b28]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row.two[data-v-ffd19b28]{flex-direction:row;gap:10px}.form-row.two>div[data-v-ffd19b28]{flex:1;display:flex;flex-direction:column;gap:5px}.goal-hint[data-v-ffd19b28]{font-size:12px;margin-top:8px}@media (max-width: 720px){.blk-head[data-v-ffd19b28]{margin:0 0 10px}.day-head[data-v-ffd19b28]{margin-top:16px}.day-ops[data-v-ffd19b28]{width:100%}.day-ops .btn[data-v-ffd19b28]{flex:1;min-width:0}.day-ops .btn-primary[data-v-ffd19b28]{flex:1.5}.date-chip[data-v-ffd19b28]{min-width:64px}.plan-item[data-v-ffd19b28]{flex-wrap:wrap;padding:12px;gap:10px}.pi-time[data-v-ffd19b28]{min-width:0;padding-top:0}.pi-ops[data-v-ffd19b28]{width:100%;justify-content:flex-start;gap:8px}.pi-ops .btn-xs[data-v-ffd19b28]{flex:1;min-height:32px}.goal-card[data-v-ffd19b28]{position:relative;flex-direction:column;gap:8px}.goal-main[data-v-ffd19b28]{padding-right:0}.goal-line[data-v-ffd19b28]{padding-right:72px}.goal-ops[data-v-ffd19b28]{position:absolute;top:10px;right:8px}}.cards[data-v-5469ae68]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.section[data-v-5469ae68]{margin-top:12px}.heat[data-v-5469ae68]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-5469ae68]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-5469ae68]{width:12px;height:12px;border-radius:3px;display:inline-block}.lv0[data-v-5469ae68]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-5469ae68]{background:#e4eeff}.lv2[data-v-5469ae68]{background:#bfd6ff}.lv3[data-v-5469ae68]{background:#7fa8f5}.lv4[data-v-5469ae68]{background:var(--accent)}.heat-legend[data-v-5469ae68]{display:flex;align-items:center;gap:3px;margin-top:10px;font-size:12px}.two-col[data-v-5469ae68]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two-col .section[data-v-5469ae68]{margin-top:0}.bar-label[data-v-5469ae68]{width:72px}.bar-num[data-v-5469ae68]{width:92px}.loc-label[data-v-5469ae68]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-5469ae68]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-5469ae68]{grid-template-columns:1fr}.two-col .section[data-v-5469ae68]{margin-top:12px}}.report-toolbar[data-v-7e1b08ed]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-7e1b08ed]{color:var(--danger);font-size:12px;margin:0 0 8px}.w-date[data-v-7e1b08ed]{width:140px;flex:none}.report-grid[data-v-7e1b08ed]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section-title[data-v-7e1b08ed]{margin-bottom:10px}.section+.section[data-v-7e1b08ed]{margin-top:12px}.note-label[data-v-7e1b08ed]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-7e1b08ed]{font-size:12px;margin-top:6px}.md-editor[data-v-7e1b08ed]{min-height:420px;line-height:1.7}.sum-row[data-v-7e1b08ed]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.sum-row span[data-v-7e1b08ed]:last-child{font-weight:500}.section-sub[data-v-7e1b08ed]{font-weight:600;margin:12px 0 4px;font-size:12px;color:var(--text-2)}.sum-item[data-v-7e1b08ed]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-7e1b08ed]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-7e1b08ed]{grid-template-columns:1fr}}@media (max-width: 720px){.report-toolbar[data-v-7e1b08ed]{gap:8px}.report-toolbar .seg[data-v-7e1b08ed]{flex:1 1 100%;display:flex}.report-toolbar .seg-btn[data-v-7e1b08ed]{flex:1}.w-date[data-v-7e1b08ed]{flex:1;min-width:0;width:auto}.md-editor[data-v-7e1b08ed]{min-height:300px}}.dialog[data-v-1b57c1af]{width:480px}.add-cat[data-v-1b57c1af]{display:flex;gap:6px;margin-top:6px}.add-cat-input[data-v-1b57c1af]{flex:1;height:28px;font-size:12px}@media (max-width: 720px){.add-cat-input[data-v-1b57c1af],.add-cat .btn[data-v-1b57c1af]{height:34px}}.period-dialog[data-v-6269639e]{width:400px}.seg-row[data-v-6269639e]{display:flex;width:100%}.seg-row .seg-btn[data-v-6269639e]{flex:1}.pane[data-v-6269639e]{margin-top:12px;max-height:46vh;overflow-y:auto;display:flex;flex-direction:column;gap:4px}.opt[data-v-6269639e]{display:flex;align-items:center;justify-content:space-between;gap:8px;border:none;background:transparent;cursor:pointer;padding:8px 10px;border-radius:var(--radius-sm);font-size:13px;color:var(--text-1);text-align:left;transition:background .12s}.opt[data-v-6269639e]:hover{background:var(--bg-hover)}.opt.active[data-v-6269639e]{background:#3370ff14;color:var(--accent);font-weight:600}.opt.active .muted[data-v-6269639e]{color:var(--accent);opacity:.75}.anchor-row[data-v-6269639e]{display:flex;align-items:center;gap:8px}.anchor-label[data-v-6269639e]{font-size:12px;color:var(--text-2);flex:none}.anchor-row .input[data-v-6269639e]{flex:1;min-width:0}.hint[data-v-6269639e]{font-size:12px;color:var(--text-3);padding:4px 2px}.custom-grid[data-v-6269639e]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.apply-btn[data-v-6269639e]{width:100%;margin-top:6px}.modal-enter-active[data-v-6269639e],.modal-leave-active[data-v-6269639e]{transition:opacity .15s ease}.modal-enter-from[data-v-6269639e],.modal-leave-to[data-v-6269639e]{opacity:0}@media (max-width: 720px){.period-dialog[data-v-6269639e]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.dialog-btns .btn[data-v-6269639e]{flex:1;height:40px}.pane[data-v-6269639e]{max-height:48vh}}.ledger-toolbar[data-v-deda24bd]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.period-title[data-v-deda24bd]{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:none;background:transparent;cursor:pointer;font-size:14px;font-weight:600;color:var(--text-1);padding:5px 10px;border-radius:var(--radius-sm);transition:background .12s}.period-title[data-v-deda24bd]:hover{background:var(--bg-hover)}.w-filter[data-v-deda24bd]{width:110px;flex:none}.icon-btn[data-v-deda24bd]:disabled{opacity:.35;cursor:default}.cards[data-v-deda24bd]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-deda24bd]{border-left:3px solid var(--border)}.stat-income[data-v-deda24bd]{border-left-color:var(--ok)}.stat-expense[data-v-deda24bd]{border-left-color:var(--text-3)}.stat-balance[data-v-deda24bd]{border-left-color:var(--accent)}.stat-pending[data-v-deda24bd]{border-left-color:var(--warn)}.card.sec[data-v-deda24bd],.card.section[data-v-deda24bd]{margin-top:12px}.bar-label[data-v-deda24bd]{width:56px}.bar-num[data-v-deda24bd]{width:118px}.td-note[data-v-deda24bd]{color:var(--text-2)}.tx-pending[data-v-deda24bd]{color:var(--warn);font-size:12px}.tx-done[data-v-deda24bd]{color:var(--ok);font-size:12px}.th-ops[data-v-deda24bd]{width:220px}.ops[data-v-deda24bd]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-deda24bd]{overflow-x:auto}.table-note[data-v-deda24bd]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.ledger-toolbar[data-v-deda24bd]{gap:8px}.ledger-toolbar .flex1[data-v-deda24bd]{display:none}.period-title[data-v-deda24bd]{flex:1;justify-content:flex-start;padding-left:0}.w-filter[data-v-deda24bd]{flex:1 1 calc(50% - 4px);min-width:0;width:auto}.ledger-toolbar .btn-primary[data-v-deda24bd]{flex:1 1 100%;order:9}}.memo-page[data-v-a0931fc7]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-a0931fc7]{display:flex;flex-direction:column;max-height:calc(100vh - 150px)}.pane-head[data-v-a0931fc7]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-a0931fc7]{font-size:13px;font-weight:600}.memo-scroll[data-v-a0931fc7]{overflow:auto;padding:6px}.memo-item[data-v-a0931fc7]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-a0931fc7]:hover{background:var(--bg-hover)}.memo-item.active[data-v-a0931fc7]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-a0931fc7]{color:var(--accent)}.memo-item-title[data-v-a0931fc7]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-a0931fc7]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-a0931fc7]{font-size:11px;margin-top:2px}.memo-editor[data-v-a0931fc7]{padding:16px 18px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-a0931fc7]{font-size:15px;font-weight:600;margin-bottom:10px}.content-textarea[data-v-a0931fc7]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-a0931fc7]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-a0931fc7]{font-size:12px}.editor-empty[data-v-a0931fc7]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-a0931fc7]{grid-template-columns:1fr;gap:10px}.memo-list[data-v-a0931fc7]{max-height:210px}.content-textarea[data-v-a0931fc7]{min-height:260px}.title-input[data-v-a0931fc7]{height:38px}.editor-foot[data-v-a0931fc7]{flex-wrap:wrap}.editor-foot .btn[data-v-a0931fc7]{flex:1;min-height:34px}}.dialog[data-v-2eafe20e]{width:480px}.pwd-row[data-v-2eafe20e]{display:flex;gap:8px}.pwd-row .input[data-v-2eafe20e]{flex:1}.lock-card[data-v-6d2745bc]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6d2745bc]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.lock-title[data-v-6d2745bc]{font-size:15px;font-weight:600}.lock-tip[data-v-6d2745bc]{font-size:12px;line-height:1.7}.lock-btn[data-v-6d2745bc]{margin-top:4px}.vault-toolbar[data-v-6d2745bc]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6d2745bc]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6d2745bc]{padding-left:30px}.search-icon[data-v-6d2745bc]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6d2745bc]{overflow-x:auto}.td-system[data-v-6d2745bc]{font-weight:500}.th-ops[data-v-6d2745bc]{width:150px}.pwd-cell[data-v-6d2745bc]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6d2745bc]{letter-spacing:1px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.copyable[data-v-6d2745bc]{cursor:pointer}.copyable[data-v-6d2745bc]:hover{color:var(--accent)}.ops[data-v-6d2745bc]{display:flex;gap:4px;flex-wrap:wrap}.table-note[data-v-6d2745bc]{margin-top:10px;font-size:12px;text-align:right}.dialog[data-v-6d2745bc]{width:440px}.vp-field[data-v-6d2745bc]{margin-bottom:10px}.vp-tip[data-v-6d2745bc]{font-size:12px;margin-top:8px}.input-dialog[data-v-4b14ba4f]{width:400px}.field label[data-v-4b14ba4f]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.modal-enter-active[data-v-4b14ba4f],.modal-leave-active[data-v-4b14ba4f]{transition:opacity .15s ease}.modal-enter-from[data-v-4b14ba4f],.modal-leave-to[data-v-4b14ba4f]{opacity:0}@media (max-width: 720px){.input-dialog[data-v-4b14ba4f]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.dialog-btns .btn[data-v-4b14ba4f]{flex:1;height:40px}}.settings[data-v-10f77319]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-10f77319]{font-size:12px;margin-bottom:10px;line-height:1.7}.rule-grid[data-v-10f77319]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-10f77319]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-10f77319]{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.proj-add[data-v-10f77319]{display:flex;gap:8px}.proj-tip[data-v-10f77319]{font-size:12px;margin-top:6px}.proj-row[data-v-10f77319]{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-10f77319]:last-child{border-bottom:none}.proj-name[data-v-10f77319]{flex:1;word-break:break-all}.proj-name.archived[data-v-10f77319]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-10f77319]{font-size:12px}.ai-grid[data-v-10f77319]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-10f77319]{display:flex;gap:8px;flex-wrap:wrap}.cat-block[data-v-10f77319]{margin-top:12px}.cat-block[data-v-10f77319]:first-of-type{margin-top:0}.cat-head[data-v-10f77319]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-10f77319]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-10f77319]{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:12px;background:var(--bg-subtle)}.chip-btn[data-v-10f77319]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-10f77319]:hover{color:var(--accent)}.import-error[data-v-10f77319]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-10f77319]{font-size:12px;margin-top:10px}.tp[data-v-a8f9ed22]{position:fixed;right:20px;bottom:20px;z-index:40;display:flex;align-items:center;gap:10px;min-width:0;max-width:340px;padding:10px 12px;background:var(--bg-page);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-float);cursor:pointer;text-align:left;transition:border-color .12s}.tp[data-v-a8f9ed22]:hover{border-color:var(--border-strong)}.tp-pulse[data-v-a8f9ed22]{width:9px;height:9px;border-radius:50%;background:var(--accent);position:relative;flex:none}.tp-pulse[data-v-a8f9ed22]:after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border-radius:50%;border:2px solid var(--accent);animation:tp-ring-a8f9ed22 1.6s ease-out infinite}@keyframes tp-ring-a8f9ed22{0%{transform:scale(.5);opacity:.6}to{transform:scale(1.5);opacity:0}}.tp-main[data-v-a8f9ed22]{display:flex;flex-direction:column;min-width:0}.tp-title[data-v-a8f9ed22]{font-size:13px;font-weight:600;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-a8f9ed22]{font-size:11px;color:var(--text-3)}.tp-time[data-v-a8f9ed22]{font-size:16px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums;margin-left:2px;flex:none}.tp-stop[data-v-a8f9ed22]{flex:none;font-size:12px;color:var(--text-2);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:3px 10px;transition:all .12s}.tp-stop[data-v-a8f9ed22]:hover{color:var(--danger);border-color:var(--danger);background:#fdf0f0}.tp-enter-active[data-v-a8f9ed22],.tp-leave-active[data-v-a8f9ed22]{transition:all .2s ease}.tp-enter-from[data-v-a8f9ed22],.tp-leave-to[data-v-a8f9ed22]{opacity:0;transform:translateY(10px)}@media (max-width: 720px){.tp[data-v-a8f9ed22]{left:12px;right:12px;bottom:calc(64px + env(safe-area-inset-bottom));max-width:none}}.admin-page[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-2d48d2c9]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);flex-wrap:wrap}.head-wrap[data-v-2d48d2c9]{flex:1;min-width:0}.tb-title[data-v-2d48d2c9]{font-weight:600;font-size:14px}.tb-sub[data-v-2d48d2c9]{font-size:12px;margin-top:2px}.tb-error[data-v-2d48d2c9]{padding:8px 16px 0}.table-card[data-v-2d48d2c9]{overflow-x:auto}.admin-table td[data-v-2d48d2c9]{white-space:nowrap}.td-name[data-v-2d48d2c9]{font-weight:500}.role-badge[data-v-2d48d2c9]{display:inline-flex;align-items:center;background:var(--accent-bg);color:var(--accent);border-radius:999px;font-size:12px;line-height:18px;padding:1px 9px}.load-line[data-v-2d48d2c9]{padding:12px 16px;font-size:12px}.admin-note[data-v-2d48d2c9]{font-size:12px;padding:0 2px}.ops[data-v-2d48d2c9]{display:inline-flex;gap:6px}.form-row[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.dialog[data-v-2d48d2c9]{width:420px}.empty[data-v-2d48d2c9]{text-align:center}@media (max-width: 720px){.admin-table td[data-v-2d48d2c9],.admin-table th[data-v-2d48d2c9]{white-space:normal}}.login-page[data-v-e9c1c40d]{min-height:100vh;min-height:100dvh;background:linear-gradient(180deg,#EBF0F8 0%,var(--bg-app) 46%);display:flex;align-items:center;justify-content:center;padding:20px}.login-card .input[data-v-e9c1c40d]{height:38px}.login-card[data-v-e9c1c40d]{width:400px;max-width:100%;padding:30px 28px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-float);border-radius:var(--radius-lg)}.login-brand[data-v-e9c1c40d]{text-align:center;margin-bottom:6px}.brand-icon[data-v-e9c1c40d]{width:46px;height:46px;margin:0 auto 10px;border-radius:12px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.login-title[data-v-e9c1c40d]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-e9c1c40d]{font-size:12px;margin-top:4px;line-height:1.7}.form-error[data-v-e9c1c40d]{color:var(--danger);font-size:12px}.login-btn[data-v-e9c1c40d]{margin-top:2px;height:36px}.login-note[data-v-e9c1c40d]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-7d26fba6]{display:flex;height:100vh;height:100dvh;overflow:hidden;background:var(--bg-app)}.side[data-v-7d26fba6]{width:var(--side-w);flex:none;display:flex;flex-direction:column;background:var(--bg-page);border-right:1px solid var(--border)}.brand[data-v-7d26fba6]{display:flex;align-items:center;gap:9px;height:var(--topbar-h);flex:none;padding:0 16px;border-bottom:1px solid var(--border);cursor:pointer}.brand-mark[data-v-7d26fba6]{width:26px;height:26px;flex:none;border-radius:7px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.brand-name[data-v-7d26fba6]{font-size:14px;font-weight:600;letter-spacing:.3px;white-space:nowrap}.side-nav[data-v-7d26fba6]{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:2px}.nav-group[data-v-7d26fba6]{font-size:11px;color:var(--text-3);padding:12px 8px 4px;letter-spacing:2px;white-space:nowrap}.nav-btn[data-v-7d26fba6]{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;font-size:13px;position:relative;text-align:left;transition:background .12s,color .12s}.nav-btn[data-v-7d26fba6]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-7d26fba6]{background:var(--accent-bg);color:var(--accent);font-weight:500}.nav-btn.active[data-v-7d26fba6]:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:2px;background:var(--accent)}.nav-label[data-v-7d26fba6]{white-space:nowrap}.nav-btn[data-v-7d26fba6]:after{content:attr(data-tip);position:absolute;left:50px;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;z-index:40}.side-foot[data-v-7d26fba6]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--border)}.avatar[data-v-7d26fba6]{width:28px;height:28px;flex:none;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}.foot-name[data-v-7d26fba6]{flex:1;min-width:0;font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main[data-v-7d26fba6]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-7d26fba6]{height:var(--topbar-h);flex:none;background:var(--bg-page);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px;z-index:10}.title[data-v-7d26fba6]{font-size:15px;font-weight:600;white-space:nowrap}.topbar-actions[data-v-7d26fba6]{display:flex;align-items:center;gap:8px}.gsearch[data-v-7d26fba6]{position:relative;width:320px;max-width:38vw}.gs-icon[data-v-7d26fba6]{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-7d26fba6]{height:32px;padding-left:31px;border-radius:999px;background:var(--bg-subtle);border-color:transparent}.gs-input[data-v-7d26fba6]:focus{background:var(--bg-page);border-color:var(--accent)}.gs-panel[data-v-7d26fba6]{position:absolute;top:38px;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-7d26fba6]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-7d26fba6]{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-7d26fba6]:hover{background:var(--bg-hover)}.gs-text[data-v-7d26fba6],.gs-sub[data-v-7d26fba6]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-7d26fba6]{font-size:13px}.gs-sub[data-v-7d26fba6]{font-size:12px}.gs-date[data-v-7d26fba6]{font-size:12px;flex:none}.gs-empty[data-v-7d26fba6]{padding:10px;font-size:12px;text-align:center}.week-tip[data-v-7d26fba6]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:28px;padding:0 10px;font-size:12px;cursor:pointer;white-space:nowrap}.week-tip[data-v-7d26fba6]:hover{background:#fdf4ec}.content[data-v-7d26fba6]{flex:1;overflow:auto}.content-inner[data-v-7d26fba6]{max-width:1280px;margin:0 auto;padding:20px 24px 48px}.toast-wrap[data-v-7d26fba6]{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-7d26fba6]{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-7d26fba6],.toast-leave-to[data-v-7d26fba6]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-7d26fba6],.toast-leave-active[data-v-7d26fba6]{transition:all .15s ease}.mob-search-btn[data-v-7d26fba6]{display:none;width:32px;height:32px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.tabbar[data-v-7d26fba6]{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-7d26fba6]{flex:1;height:50px;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-7d26fba6]{color:var(--accent);font-weight:500}.sheet-mask[data-v-7d26fba6]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212966}.more-sheet[data-v-7d26fba6]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:16px 16px 0 0;padding:6px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-handle[data-v-7d26fba6]{width:36px;height:4px;border-radius:2px;background:var(--border-strong);margin:4px auto 8px;flex:none}.sheet-user[data-v-7d26fba6]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-7d26fba6]{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-7d26fba6]:hover,.sheet-row[data-v-7d26fba6]:active{background:var(--bg-hover)}.sheet-name[data-v-7d26fba6]{flex:1}.sheet-go[data-v-7d26fba6]{color:var(--text-3)}.sheet-divider[data-v-7d26fba6]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-7d26fba6]{color:var(--danger)}.msw-mask[data-v-7d26fba6]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-7d26fba6]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-7d26fba6]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-7d26fba6]{color:var(--text-3)}.msw-input[data-v-7d26fba6]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-7d26fba6]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-7d26fba6]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-7d26fba6]:hover,.msw-item[data-v-7d26fba6]:active{background:var(--bg-hover)}@media (max-width: 1000px) and (min-width: 721px){.side[data-v-7d26fba6]{width:var(--side-w-collapsed)}.brand[data-v-7d26fba6]{justify-content:center;padding:0}.brand-name[data-v-7d26fba6],.nav-label[data-v-7d26fba6],.nav-group[data-v-7d26fba6]{display:none}.nav-btn[data-v-7d26fba6]{justify-content:center;padding:0;width:40px;align-self:center}.nav-btn.active[data-v-7d26fba6]:before{display:none}.nav-btn[data-v-7d26fba6]:hover:after{opacity:1}.side-foot[data-v-7d26fba6]{flex-direction:column;gap:6px}.foot-name[data-v-7d26fba6]{display:none}}@media (max-width: 720px){.app[data-v-7d26fba6]{display:block;height:100dvh}.side[data-v-7d26fba6]{display:none}.main[data-v-7d26fba6]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-7d26fba6]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-7d26fba6]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-7d26fba6],.gsearch .gs-panel[data-v-7d26fba6]{display:none}.mob-search-btn[data-v-7d26fba6]{display:flex}.topbar-actions[data-v-7d26fba6]{margin-left:auto;gap:6px}.week-tip[data-v-7d26fba6]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-7d26fba6]{padding:0 12px;height:34px}.topbar-actions .btn .num[data-v-7d26fba6]{font-size:12px}.tabbar[data-v-7d26fba6]{display:flex}.tab-btn[data-v-7d26fba6]{height:56px;font-size:11px}.tab-btn .icon[data-v-7d26fba6]{width:22px;height:22px}.content[data-v-7d26fba6]{flex:1;min-height:0}.content-inner[data-v-7d26fba6]{max-width:none;padding:12px 12px calc(78px + env(safe-area-inset-bottom))}.toast-wrap[data-v-7d26fba6]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-app: #F5F6F8;--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--border: #E8EAEE;--border-strong: #DCDFE4;--accent: #3370FF;--accent-deep: #2B5FD9;--accent-bg: #EEF4FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--shadow-card: 0 1px 2px rgba(16, 24, 40, .04);--shadow-float: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 12px rgba(16, 24, 40, .06);--side-w: 216px;--side-w-collapsed: 60px;--topbar-h: 56px}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-app);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;text-rendering:optimizeLegibility}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1;min-width:0}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;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;font-weight:500;transition:background .12s,border-color .12s,color .12s}.btn:hover{background:var(--bg-hover);border-color:var(--border-strong)}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px #3370ff47}.btn-primary:hover{background:var(--accent-deep);border-color:var(--accent-deep)}.btn-primary:active{box-shadow:none}.btn-danger{color:var(--danger);border-color:var(--danger);background:var(--bg-page)}.btn-danger:hover{background:#fdf0f0}.btn-danger-solid{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid:hover{background:#d13a3f}.btn-sm{height:28px;padding:0 12px;font-size:12px}.btn-xs{height:24px;padding:0 10px;font-size:12px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer;transition:background .12s,color .12s}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.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%;transition:border-color .12s,box-shadow .12s}.textarea{height:auto;min-height:64px;padding:8px 10px;resize:vertical;line-height:1.7}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #3370ff1a}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.input.invalid,.input.invalid:focus{border-color:var(--danger);box-shadow:0 0 0 3px #e5484d1a}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page);box-shadow:var(--shadow-card)}.section{padding:16px 18px}.section-title,.sec-title{font-weight:600;margin-bottom:12px;font-size:13px;color:var(--text-1)}.sec{padding:16px 18px}.empty{text-align:center;padding:28px 0}.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)}.dot.rest{background:var(--border)}.amt-income{color:var(--ok)}.amt-expense{color:var(--text-1)}.amt-warn{color:var(--warn)}.seg{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden;background:var(--bg-page)}.seg-btn{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;height:28px;padding:0 12px;border-right:1px solid var(--border);transition:background .12s,color .12s}.seg-btn:last-child{border-right:none}.seg-btn:hover{background:var(--bg-hover)}.seg-btn.active{background:var(--accent-bg);color:var(--accent);font-weight:500}.toggle-btn{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);transition:all .12s}.toggle-btn:hover{background:var(--bg-hover)}.toggle-btn.on{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn{color:var(--warn);border-color:var(--warn);background:#fdf4ec}.tx-table,.cred-table,.admin-table{width:100%;border-collapse:collapse;font-size:13px}.tx-table th,.cred-table th,.admin-table th{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;background:var(--bg-subtle);padding:9px 14px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td,.cred-table td,.admin-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr:hover,.cred-table tbody tr:hover,.admin-table tbody tr:hover{background:#fafbfc}.tx-table tbody tr:last-child td,.cred-table tbody tr:last-child td,.admin-table tbody tr:last-child td{border-bottom:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212973;display:flex;align-items:center;justify-content:center;z-index:90;padding:16px}.dialog{width:480px;max-width:calc(100vw - 32px);max-height:86vh;max-height:86dvh;overflow:auto;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub{font-size:12px;margin-top:2px;color:var(--text-3)}.dialog-body{padding:16px 20px;overflow:auto}.dialog-btns{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.form-grid .field.span2,.field.span2{grid-column:span 2}.field label,.form-row label{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error{color:var(--danger);font-size:12px;margin-top:8px}.stat-card{padding:14px 16px}.stat-num{font-size:22px;font-weight:600;margin-top:2px;letter-spacing:-.2px}.bar-row{display:flex;align-items:center;gap:10px;margin:7px 0}.bar-label{flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num{font-size:12px;flex:none;color:var(--text-3)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#d3d7de;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#b9bec7}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-corner{background:transparent}.tx-table th:nth-child(3),.tx-table td:nth-child(3){text-align:right}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}@media (max-width: 720px){.btn{height:36px;padding:0 14px}.btn-sm{height:32px;padding:0 12px}.btn-xs{height:30px;padding:0 12px}.icon-btn{width:34px;height:34px}.seg-btn{height:34px;padding:0 13px}.input,.select{height:38px;padding:0 12px}.textarea{min-height:76px;padding:10px 12px}.toggle-btn{height:38px}.tag{height:24px;line-height:22px;padding:0 9px}.dot{width:7px;height:7px}.dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:90vh;max-height:90dvh}.dialog-head{padding:14px 16px 10px!important}.dialog-body{padding:14px 16px!important}.dialog-btns{padding:10px 16px calc(12px + env(safe-area-inset-bottom))!important;gap:10px}.dialog-btns .btn{flex:1;height:40px}.form-grid{grid-template-columns:1fr!important}.card{border-radius:12px}.section,.sec{padding:12px}.stat-num{font-size:20px}.empty{padding:22px 12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.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;box-shadow:0 -8px 24px #1018281a}.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;flex-wrap:wrap;gap:8px}.tx-table td.ops-cell .btn{flex:none}.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}.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.stat-card{padding:12px 14px!important}.rule-grid,.two-col{grid-template-columns:1fr!important}.cal-toolbar{margin-bottom:10px}.cal-cell{min-height:58px!important;padding:5px 6px!important}.cal-marks{margin-top:4px!important;height:14px!important;gap:4px!important}} +.confirm-dialog[data-v-1f3675f2]{width:400px;padding:22px 22px 18px}.confirm-body[data-v-1f3675f2]{display:flex;gap:14px;align-items:flex-start}.confirm-badge[data-v-1f3675f2]{width:40px;height:40px;flex:none;border-radius:50%;background:#fdeeee;color:var(--danger);display:flex;align-items:center;justify-content:center}.confirm-text[data-v-1f3675f2]{flex:1;min-width:0}.confirm-title[data-v-1f3675f2]{font-size:15px;font-weight:600;color:var(--text-1);line-height:1.4}.confirm-title.is-danger[data-v-1f3675f2]{color:var(--danger)}.confirm-msg[data-v-1f3675f2]{margin-top:6px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.confirm-btns[data-v-1f3675f2]{margin-top:18px;display:flex;justify-content:flex-end;gap:8px}.modal-enter-active[data-v-1f3675f2],.modal-leave-active[data-v-1f3675f2]{transition:opacity .15s ease}.modal-enter-from[data-v-1f3675f2],.modal-leave-to[data-v-1f3675f2]{opacity:0}@media (max-width: 720px){.confirm-dialog[data-v-1f3675f2]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.confirm-btns .btn[data-v-1f3675f2]{flex:1;height:40px}.confirm-btns[data-v-1f3675f2]{margin-top:16px}}.dialog[data-v-91c30038]{width:560px}.min-chips[data-v-91c30038]{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}.min-chip[data-v-91c30038]{border:1px solid var(--border-strong);background:var(--bg-page);border-radius:999px;height:24px;padding:0 10px;font-size:12px;color:var(--text-2);cursor:pointer;transition:all .12s}.min-chip[data-v-91c30038]:hover{background:var(--bg-hover)}.min-chip.on[data-v-91c30038]{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.dp-head[data-v-81276f4c]{margin-bottom:12px}.dp-date[data-v-81276f4c]{font-size:14px;font-weight:600}.att-grid[data-v-81276f4c]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-81276f4c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-81276f4c]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.att-val>.num[data-v-81276f4c]{font-size:14px;font-weight:600;letter-spacing:.2px}.val-empty[data-v-81276f4c]{color:var(--text-3)}.edit-row[data-v-81276f4c]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-81276f4c]{width:104px}.att-note[data-v-81276f4c]{margin-top:10px;font-size:12px}.att-actions[data-v-81276f4c]{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.form-footer[data-v-81276f4c]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.list-sec[data-v-81276f4c]{margin-bottom:4px}.sec-head[data-v-81276f4c]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-81276f4c]{margin-bottom:0}.item[data-v-81276f4c]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px;margin-bottom:6px;background:var(--bg-subtle);transition:border-color .12s,background .12s}.item[data-v-81276f4c]:hover{border-color:var(--border-strong);background:var(--bg-page)}.item-main[data-v-81276f4c]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-81276f4c]{cursor:text;word-break:break-all;font-weight:500}.item-meta[data-v-81276f4c]{font-size:12px}.item-sub[data-v-81276f4c]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.dp-foot[data-v-81276f4c]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.dp-head[data-v-81276f4c]{margin-bottom:10px}.att-grid[data-v-81276f4c]{grid-template-columns:1fr 1fr;gap:10px 12px}.att-cell label[data-v-81276f4c]{margin-bottom:3px}.att-actions[data-v-81276f4c]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.att-actions .btn[data-v-81276f4c]{width:100%}.edit-row[data-v-81276f4c]{flex-wrap:wrap}.edit-row .time-input[data-v-81276f4c]{width:100%;flex:1 1 100%}.edit-row .btn[data-v-81276f4c]{flex:1}.item-main[data-v-81276f4c]{gap:6px}}.cal-toolbar[data-v-abd71a5b]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-abd71a5b]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-card[data-v-abd71a5b]{padding:0;overflow:hidden}.cal-head[data-v-abd71a5b],.cal-grid[data-v-abd71a5b]{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border)}.cal-week[data-v-abd71a5b]{background:var(--bg-subtle);text-align:center;padding:7px 0;font-size:12px;font-weight:500;color:var(--text-3)}.cal-cell[data-v-abd71a5b]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;cursor:pointer;display:block;font-size:13px;transition:background .12s}.cal-cell[data-v-abd71a5b]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-abd71a5b]{cursor:default;background:var(--bg-subtle)}.cal-cell.is-today[data-v-abd71a5b]{background:#f5f9ff}.cal-cell.selected[data-v-abd71a5b]{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}.daynum.today[data-v-abd71a5b]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-abd71a5b]{color:var(--text-3)}.cal-marks[data-v-abd71a5b]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-abd71a5b]{color:var(--text-3)}.mark-star[data-v-abd71a5b]{color:var(--accent)}.drawer[data-v-abd71a5b]{position:fixed;top:0;right:0;bottom:0;width:min(440px,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-abd71a5b]{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-abd71a5b]{font-weight:600}.drawer-body[data-v-abd71a5b]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-abd71a5b],.drawer-leave-active[data-v-abd71a5b]{transition:opacity .15s ease}.drawer-enter-from[data-v-abd71a5b],.drawer-leave-to[data-v-abd71a5b]{opacity:0}@media (max-width: 720px){.cal-title[data-v-abd71a5b]{min-width:76px;font-size:13px}.drawer[data-v-abd71a5b]{width:100%}}.detail-page[data-v-2bb84c76]{display:flex;flex-direction:column}.toolbar[data-v-2bb84c76]{padding:10px 16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.nav-row[data-v-2bb84c76]{display:flex;align-items:center;gap:6px}.date-title[data-v-2bb84c76]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-2bb84c76]{color:var(--accent)}.w-date[data-v-2bb84c76]{width:150px;flex:none}.tool-sep[data-v-2bb84c76]{width:1px;align-self:stretch;background:var(--border)}.exp-row[data-v-2bb84c76]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.exp-label[data-v-2bb84c76]{font-size:12px}.w-exp[data-v-2bb84c76]{width:140px;flex:none}@media (max-width: 720px){.tool-sep[data-v-2bb84c76]{display:none}.toolbar[data-v-2bb84c76]{padding:10px 12px;gap:10px}.nav-row[data-v-2bb84c76]{flex:1 1 100%}.date-title[data-v-2bb84c76]{min-width:0;flex:1;text-align:left}.w-date[data-v-2bb84c76]{flex:1;min-width:120px;width:auto}.exp-row[data-v-2bb84c76]{width:100%}.exp-row .seg[data-v-2bb84c76]{flex:1;display:flex}.exp-row .seg-btn[data-v-2bb84c76]{flex:1;padding:0 6px}.w-exp[data-v-2bb84c76]{flex:1;min-width:0;width:auto}}.plan-page[data-v-ffd19b28]{display:flex;flex-direction:column}.blk-head[data-v-ffd19b28]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 2px 10px}.blk-head-text[data-v-ffd19b28]{min-width:0}.blk-title[data-v-ffd19b28]{font-size:14px;font-weight:600}.blk-sub[data-v-ffd19b28]{font-size:12px;margin-top:1px}.day-head[data-v-ffd19b28]{margin-top:18px}.day-ops[data-v-ffd19b28]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.date-chip[data-v-ffd19b28]{min-width:74px;text-align:center;font-weight:600;font-size:13px}.date-chip.today[data-v-ffd19b28]{color:var(--accent)}.timer-live[data-v-ffd19b28]{color:var(--accent);font-weight:600}.goal-card[data-v-ffd19b28]{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;margin-bottom:10px}.goal-main[data-v-ffd19b28]{flex:1;min-width:0}.goal-line[data-v-ffd19b28]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.goal-name[data-v-ffd19b28]{font-size:14px;font-weight:500;word-break:break-all}.goal-range[data-v-ffd19b28]{font-size:12px}.goal-bar[data-v-ffd19b28]{height:6px;border-radius:3px;background:var(--bg-subtle);overflow:hidden;margin-top:10px}.goal-bar-fill[data-v-ffd19b28]{display:block;height:100%;background:var(--accent);border-radius:3px}.goal-meta[data-v-ffd19b28]{font-size:12px;margin-top:6px}.goal-ops[data-v-ffd19b28]{display:flex;gap:4px}.list-card[data-v-ffd19b28]{overflow:hidden}.plan-item[data-v-ffd19b28]{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border)}.plan-item[data-v-ffd19b28]:last-child{border-bottom:none}.plan-item.done[data-v-ffd19b28]{opacity:.6}.plan-item.skip[data-v-ffd19b28]{opacity:.48}.plan-item.running[data-v-ffd19b28]{box-shadow:inset 3px 0 0 var(--accent)}.pi-time[data-v-ffd19b28]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-ffd19b28]{flex:1;min-width:0}.pi-title[data-v-ffd19b28]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-ffd19b28]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-ffd19b28]{text-decoration:line-through}.state-done[data-v-ffd19b28]{color:var(--ok);font-size:12px}.state-skip[data-v-ffd19b28]{color:var(--text-3);font-size:12px}.pi-note[data-v-ffd19b28],.pi-meta[data-v-ffd19b28]{font-size:12px;margin-top:3px}.pi-ops[data-v-ffd19b28]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-ffd19b28]{color:var(--accent);border-color:var(--accent)}.empty[data-v-ffd19b28]{padding:28px 16px}.dialog[data-v-ffd19b28]{width:420px}.form-row[data-v-ffd19b28]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row.two[data-v-ffd19b28]{flex-direction:row;gap:10px}.form-row.two>div[data-v-ffd19b28]{flex:1;display:flex;flex-direction:column;gap:5px}.goal-hint[data-v-ffd19b28]{font-size:12px;margin-top:8px}@media (max-width: 720px){.blk-head[data-v-ffd19b28]{margin:0 0 10px}.day-head[data-v-ffd19b28]{margin-top:16px}.day-ops[data-v-ffd19b28]{width:100%}.day-ops .btn[data-v-ffd19b28]{flex:1;min-width:0}.day-ops .btn-primary[data-v-ffd19b28]{flex:1.5}.date-chip[data-v-ffd19b28]{min-width:64px}.plan-item[data-v-ffd19b28]{flex-wrap:wrap;padding:12px;gap:10px}.pi-time[data-v-ffd19b28]{min-width:0;padding-top:0}.pi-ops[data-v-ffd19b28]{width:100%;justify-content:flex-start;gap:8px}.pi-ops .btn-xs[data-v-ffd19b28]{flex:1;min-height:32px}.goal-card[data-v-ffd19b28]{position:relative;flex-direction:column;gap:8px}.goal-main[data-v-ffd19b28]{padding-right:0}.goal-line[data-v-ffd19b28]{padding-right:72px}.goal-ops[data-v-ffd19b28]{position:absolute;top:10px;right:8px}}.cards[data-v-5469ae68]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.section[data-v-5469ae68]{margin-top:12px}.heat[data-v-5469ae68]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-5469ae68]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-5469ae68]{width:12px;height:12px;border-radius:3px;display:inline-block}.lv0[data-v-5469ae68]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-5469ae68]{background:#e4eeff}.lv2[data-v-5469ae68]{background:#bfd6ff}.lv3[data-v-5469ae68]{background:#7fa8f5}.lv4[data-v-5469ae68]{background:var(--accent)}.heat-legend[data-v-5469ae68]{display:flex;align-items:center;gap:3px;margin-top:10px;font-size:12px}.two-col[data-v-5469ae68]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two-col .section[data-v-5469ae68]{margin-top:0}.bar-label[data-v-5469ae68]{width:72px}.bar-num[data-v-5469ae68]{width:92px}.loc-label[data-v-5469ae68]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-5469ae68]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-5469ae68]{grid-template-columns:1fr}.two-col .section[data-v-5469ae68]{margin-top:12px}}.report-toolbar[data-v-7e1b08ed]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-7e1b08ed]{color:var(--danger);font-size:12px;margin:0 0 8px}.w-date[data-v-7e1b08ed]{width:140px;flex:none}.report-grid[data-v-7e1b08ed]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section-title[data-v-7e1b08ed]{margin-bottom:10px}.section+.section[data-v-7e1b08ed]{margin-top:12px}.note-label[data-v-7e1b08ed]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-7e1b08ed]{font-size:12px;margin-top:6px}.md-editor[data-v-7e1b08ed]{min-height:420px;line-height:1.7}.sum-row[data-v-7e1b08ed]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.sum-row span[data-v-7e1b08ed]:last-child{font-weight:500}.section-sub[data-v-7e1b08ed]{font-weight:600;margin:12px 0 4px;font-size:12px;color:var(--text-2)}.sum-item[data-v-7e1b08ed]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-7e1b08ed]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-7e1b08ed]{grid-template-columns:1fr}}@media (max-width: 720px){.report-toolbar[data-v-7e1b08ed]{gap:8px}.report-toolbar .seg[data-v-7e1b08ed]{flex:1 1 100%;display:flex}.report-toolbar .seg-btn[data-v-7e1b08ed]{flex:1}.w-date[data-v-7e1b08ed]{flex:1;min-width:0;width:auto}.md-editor[data-v-7e1b08ed]{min-height:300px}}.dialog[data-v-1b57c1af]{width:480px}.add-cat[data-v-1b57c1af]{display:flex;gap:6px;margin-top:6px}.add-cat-input[data-v-1b57c1af]{flex:1;height:28px;font-size:12px}@media (max-width: 720px){.add-cat-input[data-v-1b57c1af],.add-cat .btn[data-v-1b57c1af]{height:34px}}.period-dialog[data-v-6269639e]{width:400px}.seg-row[data-v-6269639e]{display:flex;width:100%}.seg-row .seg-btn[data-v-6269639e]{flex:1}.pane[data-v-6269639e]{margin-top:12px;max-height:46vh;overflow-y:auto;display:flex;flex-direction:column;gap:4px}.opt[data-v-6269639e]{display:flex;align-items:center;justify-content:space-between;gap:8px;border:none;background:transparent;cursor:pointer;padding:8px 10px;border-radius:var(--radius-sm);font-size:13px;color:var(--text-1);text-align:left;transition:background .12s}.opt[data-v-6269639e]:hover{background:var(--bg-hover)}.opt.active[data-v-6269639e]{background:#3370ff14;color:var(--accent);font-weight:600}.opt.active .muted[data-v-6269639e]{color:var(--accent);opacity:.75}.anchor-row[data-v-6269639e]{display:flex;align-items:center;gap:8px}.anchor-label[data-v-6269639e]{font-size:12px;color:var(--text-2);flex:none}.anchor-row .input[data-v-6269639e]{flex:1;min-width:0}.hint[data-v-6269639e]{font-size:12px;color:var(--text-3);padding:4px 2px}.custom-grid[data-v-6269639e]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.apply-btn[data-v-6269639e]{width:100%;margin-top:6px}.modal-enter-active[data-v-6269639e],.modal-leave-active[data-v-6269639e]{transition:opacity .15s ease}.modal-enter-from[data-v-6269639e],.modal-leave-to[data-v-6269639e]{opacity:0}@media (max-width: 720px){.period-dialog[data-v-6269639e]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.dialog-btns .btn[data-v-6269639e]{flex:1;height:40px}.pane[data-v-6269639e]{max-height:48vh}}.ledger-toolbar[data-v-deda24bd]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.period-title[data-v-deda24bd]{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:none;background:transparent;cursor:pointer;font-size:14px;font-weight:600;color:var(--text-1);padding:5px 10px;border-radius:var(--radius-sm);transition:background .12s}.period-title[data-v-deda24bd]:hover{background:var(--bg-hover)}.w-filter[data-v-deda24bd]{width:110px;flex:none}.icon-btn[data-v-deda24bd]:disabled{opacity:.35;cursor:default}.cards[data-v-deda24bd]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-deda24bd]{border-left:3px solid var(--border)}.stat-income[data-v-deda24bd]{border-left-color:var(--ok)}.stat-expense[data-v-deda24bd]{border-left-color:var(--text-3)}.stat-balance[data-v-deda24bd]{border-left-color:var(--accent)}.stat-pending[data-v-deda24bd]{border-left-color:var(--warn)}.card.sec[data-v-deda24bd],.card.section[data-v-deda24bd]{margin-top:12px}.bar-label[data-v-deda24bd]{width:56px}.bar-num[data-v-deda24bd]{width:118px}.td-note[data-v-deda24bd]{color:var(--text-2)}.tx-pending[data-v-deda24bd]{color:var(--warn);font-size:12px}.tx-done[data-v-deda24bd]{color:var(--ok);font-size:12px}.th-ops[data-v-deda24bd]{width:220px}.ops[data-v-deda24bd]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-deda24bd]{overflow-x:auto}.table-note[data-v-deda24bd]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.ledger-toolbar[data-v-deda24bd]{gap:8px}.ledger-toolbar .flex1[data-v-deda24bd]{display:none}.period-title[data-v-deda24bd]{flex:1;justify-content:flex-start;padding-left:0}.w-filter[data-v-deda24bd]{flex:1 1 calc(50% - 4px);min-width:0;width:auto}.ledger-toolbar .btn-primary[data-v-deda24bd]{flex:1 1 100%;order:9}}.memo-page[data-v-a0931fc7]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-a0931fc7]{display:flex;flex-direction:column;max-height:calc(100vh - 150px)}.pane-head[data-v-a0931fc7]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-a0931fc7]{font-size:13px;font-weight:600}.memo-scroll[data-v-a0931fc7]{overflow:auto;padding:6px}.memo-item[data-v-a0931fc7]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-a0931fc7]:hover{background:var(--bg-hover)}.memo-item.active[data-v-a0931fc7]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-a0931fc7]{color:var(--accent)}.memo-item-title[data-v-a0931fc7]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-a0931fc7]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-a0931fc7]{font-size:11px;margin-top:2px}.memo-editor[data-v-a0931fc7]{padding:16px 18px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-a0931fc7]{font-size:15px;font-weight:600;margin-bottom:10px}.content-textarea[data-v-a0931fc7]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-a0931fc7]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-a0931fc7]{font-size:12px}.editor-empty[data-v-a0931fc7]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-a0931fc7]{grid-template-columns:1fr;gap:10px}.memo-list[data-v-a0931fc7]{max-height:210px}.content-textarea[data-v-a0931fc7]{min-height:260px}.title-input[data-v-a0931fc7]{height:38px}.editor-foot[data-v-a0931fc7]{flex-wrap:wrap}.editor-foot .btn[data-v-a0931fc7]{flex:1;min-height:34px}}.dialog[data-v-2eafe20e]{width:480px}.pwd-row[data-v-2eafe20e]{display:flex;gap:8px}.pwd-row .input[data-v-2eafe20e]{flex:1}.lock-card[data-v-6d2745bc]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6d2745bc]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.lock-title[data-v-6d2745bc]{font-size:15px;font-weight:600}.lock-tip[data-v-6d2745bc]{font-size:12px;line-height:1.7}.lock-btn[data-v-6d2745bc]{margin-top:4px}.vault-toolbar[data-v-6d2745bc]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6d2745bc]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6d2745bc]{padding-left:30px}.search-icon[data-v-6d2745bc]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6d2745bc]{overflow-x:auto}.td-system[data-v-6d2745bc]{font-weight:500}.th-ops[data-v-6d2745bc]{width:150px}.pwd-cell[data-v-6d2745bc]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6d2745bc]{letter-spacing:1px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.copyable[data-v-6d2745bc]{cursor:pointer}.copyable[data-v-6d2745bc]:hover{color:var(--accent)}.ops[data-v-6d2745bc]{display:flex;gap:4px;flex-wrap:wrap}.table-note[data-v-6d2745bc]{margin-top:10px;font-size:12px;text-align:right}.dialog[data-v-6d2745bc]{width:440px}.vp-field[data-v-6d2745bc]{margin-bottom:10px}.vp-tip[data-v-6d2745bc]{font-size:12px;margin-top:8px}.input-dialog[data-v-4b14ba4f]{width:400px}.field label[data-v-4b14ba4f]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.modal-enter-active[data-v-4b14ba4f],.modal-leave-active[data-v-4b14ba4f]{transition:opacity .15s ease}.modal-enter-from[data-v-4b14ba4f],.modal-leave-to[data-v-4b14ba4f]{opacity:0}@media (max-width: 720px){.input-dialog[data-v-4b14ba4f]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}.dialog-btns .btn[data-v-4b14ba4f]{flex:1;height:40px}}.settings[data-v-10f77319]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-10f77319]{font-size:12px;margin-bottom:10px;line-height:1.7}.rule-grid[data-v-10f77319]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-10f77319]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-10f77319]{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.proj-add[data-v-10f77319]{display:flex;gap:8px}.proj-tip[data-v-10f77319]{font-size:12px;margin-top:6px}.proj-row[data-v-10f77319]{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-10f77319]:last-child{border-bottom:none}.proj-name[data-v-10f77319]{flex:1;word-break:break-all}.proj-name.archived[data-v-10f77319]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-10f77319]{font-size:12px}.ai-grid[data-v-10f77319]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-10f77319]{display:flex;gap:8px;flex-wrap:wrap}.cat-block[data-v-10f77319]{margin-top:12px}.cat-block[data-v-10f77319]:first-of-type{margin-top:0}.cat-head[data-v-10f77319]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-10f77319]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-10f77319]{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:12px;background:var(--bg-subtle)}.chip-btn[data-v-10f77319]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-10f77319]:hover{color:var(--accent)}.import-error[data-v-10f77319]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-10f77319]{font-size:12px;margin-top:10px}.tp[data-v-a8f9ed22]{position:fixed;right:20px;bottom:20px;z-index:40;display:flex;align-items:center;gap:10px;min-width:0;max-width:340px;padding:10px 12px;background:var(--bg-page);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-float);cursor:pointer;text-align:left;transition:border-color .12s}.tp[data-v-a8f9ed22]:hover{border-color:var(--border-strong)}.tp-pulse[data-v-a8f9ed22]{width:9px;height:9px;border-radius:50%;background:var(--accent);position:relative;flex:none}.tp-pulse[data-v-a8f9ed22]:after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border-radius:50%;border:2px solid var(--accent);animation:tp-ring-a8f9ed22 1.6s ease-out infinite}@keyframes tp-ring-a8f9ed22{0%{transform:scale(.5);opacity:.6}to{transform:scale(1.5);opacity:0}}.tp-main[data-v-a8f9ed22]{display:flex;flex-direction:column;min-width:0}.tp-title[data-v-a8f9ed22]{font-size:13px;font-weight:600;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-a8f9ed22]{font-size:11px;color:var(--text-3)}.tp-time[data-v-a8f9ed22]{font-size:16px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums;margin-left:2px;flex:none}.tp-stop[data-v-a8f9ed22]{flex:none;font-size:12px;color:var(--text-2);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:3px 10px;transition:all .12s}.tp-stop[data-v-a8f9ed22]:hover{color:var(--danger);border-color:var(--danger);background:#fdf0f0}.tp-enter-active[data-v-a8f9ed22],.tp-leave-active[data-v-a8f9ed22]{transition:all .2s ease}.tp-enter-from[data-v-a8f9ed22],.tp-leave-to[data-v-a8f9ed22]{opacity:0;transform:translateY(10px)}@media (max-width: 720px){.tp[data-v-a8f9ed22]{left:12px;right:12px;bottom:calc(64px + env(safe-area-inset-bottom));max-width:none}}.admin-page[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-2d48d2c9]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);flex-wrap:wrap}.head-wrap[data-v-2d48d2c9]{flex:1;min-width:0}.tb-title[data-v-2d48d2c9]{font-weight:600;font-size:14px}.tb-sub[data-v-2d48d2c9]{font-size:12px;margin-top:2px}.tb-error[data-v-2d48d2c9]{padding:8px 16px 0}.table-card[data-v-2d48d2c9]{overflow-x:auto}.admin-table td[data-v-2d48d2c9]{white-space:nowrap}.td-name[data-v-2d48d2c9]{font-weight:500}.role-badge[data-v-2d48d2c9]{display:inline-flex;align-items:center;background:var(--accent-bg);color:var(--accent);border-radius:999px;font-size:12px;line-height:18px;padding:1px 9px}.load-line[data-v-2d48d2c9]{padding:12px 16px;font-size:12px}.admin-note[data-v-2d48d2c9]{font-size:12px;padding:0 2px}.ops[data-v-2d48d2c9]{display:inline-flex;gap:6px}.form-row[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.dialog[data-v-2d48d2c9]{width:420px}.empty[data-v-2d48d2c9]{text-align:center}@media (max-width: 720px){.admin-table td[data-v-2d48d2c9],.admin-table th[data-v-2d48d2c9]{white-space:normal}}.login-page[data-v-e9c1c40d]{min-height:100vh;min-height:100dvh;background:linear-gradient(180deg,#EBF0F8 0%,var(--bg-app) 46%);display:flex;align-items:center;justify-content:center;padding:20px}.login-card .input[data-v-e9c1c40d]{height:38px}.login-card[data-v-e9c1c40d]{width:400px;max-width:100%;padding:30px 28px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-float);border-radius:var(--radius-lg)}.login-brand[data-v-e9c1c40d]{text-align:center;margin-bottom:6px}.brand-icon[data-v-e9c1c40d]{width:46px;height:46px;margin:0 auto 10px;border-radius:12px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.login-title[data-v-e9c1c40d]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-e9c1c40d]{font-size:12px;margin-top:4px;line-height:1.7}.form-error[data-v-e9c1c40d]{color:var(--danger);font-size:12px}.login-btn[data-v-e9c1c40d]{margin-top:2px;height:36px}.login-note[data-v-e9c1c40d]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-ab53c58b]{display:flex;height:100vh;height:100dvh;overflow:hidden;background:var(--bg-app)}.side[data-v-ab53c58b]{width:var(--side-w);flex:none;display:flex;flex-direction:column;background:var(--bg-page);border-right:1px solid var(--border)}.brand[data-v-ab53c58b]{display:flex;align-items:center;gap:9px;height:var(--topbar-h);flex:none;padding:0 16px;border-bottom:1px solid var(--border);cursor:pointer}.brand-mark[data-v-ab53c58b]{width:26px;height:26px;flex:none;border-radius:7px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.brand-name[data-v-ab53c58b]{font-size:14px;font-weight:600;letter-spacing:.3px;white-space:nowrap}.side-nav[data-v-ab53c58b]{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:2px}.nav-group[data-v-ab53c58b]{font-size:11px;color:var(--text-3);padding:12px 8px 4px;letter-spacing:2px;white-space:nowrap}.nav-btn[data-v-ab53c58b]{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;font-size:13px;position:relative;text-align:left;transition:background .12s,color .12s}.nav-btn[data-v-ab53c58b]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-ab53c58b]{background:var(--accent-bg);color:var(--accent);font-weight:500}.nav-btn.active[data-v-ab53c58b]:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:2px;background:var(--accent)}.nav-label[data-v-ab53c58b]{white-space:nowrap}.nav-btn[data-v-ab53c58b]:after{content:attr(data-tip);position:absolute;left:50px;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;z-index:40}.side-foot[data-v-ab53c58b]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--border)}.avatar[data-v-ab53c58b]{width:28px;height:28px;flex:none;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}.foot-name[data-v-ab53c58b]{flex:1;min-width:0;font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main[data-v-ab53c58b]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-ab53c58b]{height:var(--topbar-h);flex:none;background:var(--bg-page);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px;z-index:10}.title[data-v-ab53c58b]{font-size:15px;font-weight:600;white-space:nowrap}.gsearch[data-v-ab53c58b]{position:relative;width:320px;max-width:38vw}.gs-icon[data-v-ab53c58b]{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-ab53c58b]{height:32px;padding-left:31px;border-radius:999px;background:var(--bg-subtle);border-color:transparent}.gs-input[data-v-ab53c58b]:focus{background:var(--bg-page);border-color:var(--accent)}.gs-panel[data-v-ab53c58b]{position:absolute;top:38px;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-ab53c58b]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-ab53c58b]{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-ab53c58b]:hover{background:var(--bg-hover)}.gs-text[data-v-ab53c58b],.gs-sub[data-v-ab53c58b]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-ab53c58b]{font-size:13px}.gs-sub[data-v-ab53c58b]{font-size:12px}.gs-date[data-v-ab53c58b]{font-size:12px;flex:none}.gs-empty[data-v-ab53c58b]{padding:10px;font-size:12px;text-align:center}.content[data-v-ab53c58b]{flex:1;overflow:auto}.content-inner[data-v-ab53c58b]{max-width:1280px;margin:0 auto;padding:20px 24px 48px}.toast-wrap[data-v-ab53c58b]{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-ab53c58b]{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-ab53c58b],.toast-leave-to[data-v-ab53c58b]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-ab53c58b],.toast-leave-active[data-v-ab53c58b]{transition:all .15s ease}.mob-search-btn[data-v-ab53c58b]{display:none;width:32px;height:32px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.tabbar[data-v-ab53c58b]{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-ab53c58b]{flex:1;height:50px;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-ab53c58b]{color:var(--accent);font-weight:500}.sheet-mask[data-v-ab53c58b]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212966}.more-sheet[data-v-ab53c58b]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:16px 16px 0 0;padding:6px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-handle[data-v-ab53c58b]{width:36px;height:4px;border-radius:2px;background:var(--border-strong);margin:4px auto 8px;flex:none}.sheet-user[data-v-ab53c58b]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-ab53c58b]{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-ab53c58b]:hover,.sheet-row[data-v-ab53c58b]:active{background:var(--bg-hover)}.sheet-name[data-v-ab53c58b]{flex:1}.sheet-go[data-v-ab53c58b]{color:var(--text-3)}.sheet-divider[data-v-ab53c58b]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-ab53c58b]{color:var(--danger)}.msw-mask[data-v-ab53c58b]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-ab53c58b]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-ab53c58b]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-ab53c58b]{color:var(--text-3)}.msw-input[data-v-ab53c58b]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-ab53c58b]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-ab53c58b]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-ab53c58b]:hover,.msw-item[data-v-ab53c58b]:active{background:var(--bg-hover)}@media (max-width: 1000px) and (min-width: 721px){.side[data-v-ab53c58b]{width:var(--side-w-collapsed)}.brand[data-v-ab53c58b]{justify-content:center;padding:0}.brand-name[data-v-ab53c58b],.nav-label[data-v-ab53c58b],.nav-group[data-v-ab53c58b]{display:none}.nav-btn[data-v-ab53c58b]{justify-content:center;padding:0;width:40px;align-self:center}.nav-btn.active[data-v-ab53c58b]:before{display:none}.nav-btn[data-v-ab53c58b]:hover:after{opacity:1}.side-foot[data-v-ab53c58b]{flex-direction:column;gap:6px}.foot-name[data-v-ab53c58b]{display:none}}@media (max-width: 720px){.app[data-v-ab53c58b]{display:block;height:100dvh}.side[data-v-ab53c58b]{display:none}.main[data-v-ab53c58b]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-ab53c58b]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-ab53c58b]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-ab53c58b],.gsearch .gs-panel[data-v-ab53c58b]{display:none}.mob-search-btn[data-v-ab53c58b]{display:flex}.mob-search-btn[data-v-ab53c58b]{margin-left:auto}.tabbar[data-v-ab53c58b]{display:flex}.tab-btn[data-v-ab53c58b]{height:56px;font-size:11px}.tab-btn .icon[data-v-ab53c58b]{width:22px;height:22px}.content[data-v-ab53c58b]{flex:1;min-height:0}.content-inner[data-v-ab53c58b]{max-width:none;padding:12px 12px calc(78px + env(safe-area-inset-bottom))}.toast-wrap[data-v-ab53c58b]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-app: #F5F6F8;--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--border: #E8EAEE;--border-strong: #DCDFE4;--accent: #3370FF;--accent-deep: #2B5FD9;--accent-bg: #EEF4FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--shadow-card: 0 1px 2px rgba(16, 24, 40, .04);--shadow-float: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 12px rgba(16, 24, 40, .06);--side-w: 216px;--side-w-collapsed: 60px;--topbar-h: 56px}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-app);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;text-rendering:optimizeLegibility}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1;min-width:0}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;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;font-weight:500;transition:background .12s,border-color .12s,color .12s}.btn:hover{background:var(--bg-hover);border-color:var(--border-strong)}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px #3370ff47}.btn-primary:hover{background:var(--accent-deep);border-color:var(--accent-deep)}.btn-primary:active{box-shadow:none}.btn-danger{color:var(--danger);border-color:var(--danger);background:var(--bg-page)}.btn-danger:hover{background:#fdf0f0}.btn-danger-solid{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid:hover{background:#d13a3f}.btn-sm{height:28px;padding:0 12px;font-size:12px}.btn-xs{height:24px;padding:0 10px;font-size:12px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer;transition:background .12s,color .12s}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.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%;transition:border-color .12s,box-shadow .12s}.textarea{height:auto;min-height:64px;padding:8px 10px;resize:vertical;line-height:1.7}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #3370ff1a}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.input.invalid,.input.invalid:focus{border-color:var(--danger);box-shadow:0 0 0 3px #e5484d1a}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page);box-shadow:var(--shadow-card)}.section{padding:16px 18px}.section-title,.sec-title{font-weight:600;margin-bottom:12px;font-size:13px;color:var(--text-1)}.sec{padding:16px 18px}.empty{text-align:center;padding:28px 0}.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)}.dot.rest{background:var(--border)}.amt-income{color:var(--ok)}.amt-expense{color:var(--text-1)}.amt-warn{color:var(--warn)}.seg{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden;background:var(--bg-page)}.seg-btn{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;height:28px;padding:0 12px;border-right:1px solid var(--border);transition:background .12s,color .12s}.seg-btn:last-child{border-right:none}.seg-btn:hover{background:var(--bg-hover)}.seg-btn.active{background:var(--accent-bg);color:var(--accent);font-weight:500}.toggle-btn{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);transition:all .12s}.toggle-btn:hover{background:var(--bg-hover)}.toggle-btn.on{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn{color:var(--warn);border-color:var(--warn);background:#fdf4ec}.tx-table,.cred-table,.admin-table{width:100%;border-collapse:collapse;font-size:13px}.tx-table th,.cred-table th,.admin-table th{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;background:var(--bg-subtle);padding:9px 14px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td,.cred-table td,.admin-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr:hover,.cred-table tbody tr:hover,.admin-table tbody tr:hover{background:#fafbfc}.tx-table tbody tr:last-child td,.cred-table tbody tr:last-child td,.admin-table tbody tr:last-child td{border-bottom:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212973;display:flex;align-items:center;justify-content:center;z-index:90;padding:16px}.dialog{width:480px;max-width:calc(100vw - 32px);max-height:86vh;max-height:86dvh;overflow:auto;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub{font-size:12px;margin-top:2px;color:var(--text-3)}.dialog-body{padding:16px 20px;overflow:auto}.dialog-btns{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.form-grid .field.span2,.field.span2{grid-column:span 2}.field label,.form-row label{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error{color:var(--danger);font-size:12px;margin-top:8px}.stat-card{padding:14px 16px}.stat-num{font-size:22px;font-weight:600;margin-top:2px;letter-spacing:-.2px}.bar-row{display:flex;align-items:center;gap:10px;margin:7px 0}.bar-label{flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num{font-size:12px;flex:none;color:var(--text-3)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#d3d7de;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#b9bec7}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-corner{background:transparent}.tx-table th:nth-child(3),.tx-table td:nth-child(3){text-align:right}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}@media (max-width: 720px){.btn{height:36px;padding:0 14px}.btn-sm{height:32px;padding:0 12px}.btn-xs{height:30px;padding:0 12px}.icon-btn{width:34px;height:34px}.seg-btn{height:34px;padding:0 13px}.input,.select{height:38px;padding:0 12px}.textarea{min-height:76px;padding:10px 12px}.toggle-btn{height:38px}.tag{height:24px;line-height:22px;padding:0 9px}.dot{width:7px;height:7px}.dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:90vh;max-height:90dvh}.dialog-head{padding:14px 16px 10px!important}.dialog-body{padding:14px 16px!important}.dialog-btns{padding:10px 16px calc(12px + env(safe-area-inset-bottom))!important;gap:10px}.dialog-btns .btn{flex:1;height:40px}.form-grid{grid-template-columns:1fr!important}.card{border-radius:12px}.section,.sec{padding:12px}.stat-num{font-size:20px}.empty{padding:22px 12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.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;box-shadow:0 -8px 24px #1018281a}.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;flex-wrap:wrap;gap:8px}.tx-table td.ops-cell .btn{flex:none}.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}.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.stat-card{padding:12px 14px!important}.rule-grid,.two-col{grid-template-columns:1fr!important}.cal-toolbar{margin-bottom:10px}.cal-cell{min-height:58px!important;padding:5px 6px!important}.cal-marks{margin-top:4px!important;height:14px!important;gap:4px!important}} diff --git a/intern-log/dist/assets/index-pe6VFzmc.js b/intern-log/dist/assets/index-pe6VFzmc.js deleted file mode 100644 index 0c5df05..0000000 --- a/intern-log/dist/assets/index-pe6VFzmc.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();/** -* @vue/shared v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ji(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const wt={},Ms=[],jn=()=>{},Zu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),It=Object.assign,Xi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},gf=Object.prototype.hasOwnProperty,vt=(e,t)=>gf.call(e,t),ze=Array.isArray,us=e=>Go(e)==="[object Map]",Ls=e=>Go(e)==="[object Set]",eu=e=>Go(e)==="[object Date]",tt=e=>typeof e=="function",Et=e=>typeof e=="string",Dn=e=>typeof e=="symbol",mt=e=>e!==null&&typeof e=="object",ec=e=>(mt(e)||tt(e))&&tt(e.then)&&tt(e.catch),tc=Object.prototype.toString,Go=e=>tc.call(e),bf=e=>Go(e).slice(8,-1),nc=e=>Go(e)==="[object Object]",Qi=e=>Et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Eo=Ji(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},wf=/-\w/g,bn=fa(e=>e.replace(wf,t=>t.slice(1).toUpperCase())),_f=/\B([A-Z])/g,hs=fa(e=>e.replace(_f,"-$1").toLowerCase()),sc=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),ri=fa(e=>e?`on${sc(e)}`:""),In=(e,t)=>!Object.is(e,t),Mr=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},kf=e=>{const t=Et(e)?Number(e):NaN;return isNaN(t)?e:t};let tu;const va=()=>tu||(tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zn(e){if(ze(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(Cf).forEach(n=>{if(n){const o=n.split(xf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ge(e){let t="";if(Et(e))t=e;else if(ze(e))for(let n=0;nds(n,t))}const ac=e=>!!(e&&e.__v_isRef===!0),F=e=>Et(e)?e:e==null?"":ze(e)||mt(e)&&(e.toString===tc||!tt(e.toString))?ac(e)?F(e.value):JSON.stringify(e,ic,2):String(e),ic=(e,t)=>ac(t)?ic(e,t.value):us(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],l)=>(n[ai(o,l)+" =>"]=r,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ai(n))}:Dn(t)?ai(t):mt(t)&&!ze(t)&&!nc(t)?String(t):t,ai=(e,t="")=>{var n;return Dn(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 qt;class Mf{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&&qt&&(qt.active?(this.parent=qt,this.index=(qt.scopes||(qt.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 o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(qt===this)qt=this.prevScope;else{let t=qt;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,o;for(n=0,o=this.effects.length;n0)return;if(Ao){let t=Ao;for(Ao=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;To;){let t=To;for(To=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function dc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fc(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),tl(o),jf(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function _i(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function pc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Do)||(e.globalVersion=Do,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_i(e))))return;e.flags|=2;const t=e.dep,n=xt,o=wn;xt=e,wn=!0;try{dc(e);const r=e.fn(e._value);(t.version===0||In(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{xt=n,wn=o,fc(e),e.flags&=-3}}function tl(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)tl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function jf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wn=!0;const vc=[];function Ln(){vc.push(wn),wn=!1}function Rn(){const e=vc.pop();wn=e===void 0?!0:e}function ou(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xt;xt=void 0;try{t()}finally{xt=n}}}let Do=0;class Df{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 nl{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||!wn||xt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xt)n=this.activeLink=new Df(xt,this),xt.deps?(n.prevDep=xt.depsTail,xt.depsTail.nextDep=n,xt.depsTail=n):xt.deps=xt.depsTail=n,mc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=xt.depsTail,n.nextDep=void 0,xt.depsTail.nextDep=n,xt.depsTail=n,xt.deps===n&&(xt.deps=o)}return n}trigger(t){this.version++,Do++,this.notify(t)}notify(t){Zi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{el()}}}function mc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)mc(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ki=new WeakMap,js=Symbol(""),Ci=Symbol(""),Lo=Symbol("");function Yt(e,t,n){if(wn&&xt){let o=ki.get(e);o||ki.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new nl),r.map=o,r.key=n),r.track()}}function qn(e,t,n,o,r,l){const c=ki.get(e);if(!c){Do++;return}const f=m=>{m&&m.trigger()};if(Zi(),t==="clear")c.forEach(f);else{const m=ze(e),g=m&&Qi(n);if(m&&n==="length"){const h=Number(o);c.forEach((k,O)=>{(O==="length"||O===Lo||!Dn(O)&&O>=h)&&f(k)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),g&&f(c.get(Lo)),t){case"add":m?g&&f(c.get("length")):(f(c.get(js)),us(e)&&f(c.get(Ci)));break;case"delete":m||(f(c.get(js)),us(e)&&f(c.get(Ci)));break;case"set":us(e)&&f(c.get(js));break}}el()}function Ys(e){const t=pt(e);return t===e||(Yt(t,"iterate",Lo),fn(e))?t:Kn(e)?cs(e)?t.map(n=>fs(vn(n))):t.map(fs):t.map(vn)}function ma(e){return Yt(e=pt(e),"iterate",Lo),e}function Pn(e,t){return Kn(e)?fs(cs(e)?vn(t):t):vn(t)}const Lf={__proto__:null,[Symbol.iterator](){return li(this,Symbol.iterator,e=>Pn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>ze(t)?Ys(t):t))},entries(){return li(this,"entries",e=>(e[1]=Pn(this,e[1]),e))},every(e,t){return Vn(this,"every",e,t,void 0,arguments)},filter(e,t){return Vn(this,"filter",e,t,n=>n.map(o=>Pn(this,o)),arguments)},find(e,t){return Vn(this,"find",e,t,n=>Pn(this,n),arguments)},findIndex(e,t){return Vn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Vn(this,"findLast",e,t,n=>Pn(this,n),arguments)},findLastIndex(e,t){return Vn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Vn(this,"forEach",e,t,void 0,arguments)},includes(...e){return ui(this,"includes",e)},indexOf(...e){return ui(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return ui(this,"lastIndexOf",e)},map(e,t){return Vn(this,"map",e,t,void 0,arguments)},pop(){return _o(this,"pop")},push(...e){return _o(this,"push",e)},reduce(e,...t){return au(this,"reduce",e,t)},reduceRight(e,...t){return au(this,"reduceRight",e,t)},shift(){return _o(this,"shift")},some(e,t){return Vn(this,"some",e,t,void 0,arguments)},splice(...e){return _o(this,"splice",e)},toReversed(){return Ys(this).toReversed()},toSorted(e){return Ys(this).toSorted(e)},toSpliced(...e){return Ys(this).toSpliced(...e)},unshift(...e){return _o(this,"unshift",e)},values(){return li(this,"values",e=>Pn(this,e))}};function li(e,t,n){const o=ma(e),r=o[t],l=r.call(o);if(o!==e&&!fn(e)){if(l[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(l));return c.next=()=>ru(l.next(),n),r!==hc[t]&&Object.defineProperties(c,{return:{get(){const f=l.return;return typeof f=="function"?f.bind(l):f}},throw:{get(){const f=l.throw;return typeof f=="function"?f.bind(l):f}}}),c}l._next=l.next,l.next=()=>ru(l._next(),n)}return l}function ru(e,t){return e.done||(e.value=t(e.value)),e}const hc=Array.prototype;function Vn(e,t,n,o,r,l){const c=ma(e),f=c!==e&&!fn(e),m=c[t];if(m!==hc[t]){const k=m.apply(e,l);return f?vn(k):k}let g=n;c!==e&&(f?g=function(k,O){return n.call(this,Pn(e,k),O,e)}:n.length>2&&(g=function(k,O){return n.call(this,k,O,e)}));const h=m.call(c,g,o);return f&&r?r(h):h}function au(e,t,n,o){const r=ma(e),l=r!==e&&!fn(e);let c=n,f=!1;r!==e&&(l?(f=o.length===0,c=function(g,h,k){return f&&(f=!1,g=Pn(e,g)),n.call(this,g,Pn(e,h),k,e)}):n.length>3&&(c=function(g,h,k){return n.call(this,g,h,k,e)}));const m=r[t](c,...o);return f?Pn(e,m):m}function ui(e,t,n){const o=pt(e);Yt(o,"iterate",Lo);const r=o[t](...n);return(r===-1||r===!1)&&al(n[0])?(n[0]=pt(n[0]),o[t](...n)):r}function _o(e,t,n=[]){Ln(),Zi();const o=pt(e)[t].apply(e,n);return el(),Rn(),o}const Rf=Ji("__proto__,__v_isRef,__isVue"),yc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Dn));function Kf(e){Dn(e)||(e=String(e));const t=pt(this);return Yt(t,"has",e),t.hasOwnProperty(e)}class gc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return o===(r?l?Gf:kc:l?_c:wc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const c=ze(t);if(!r){let m;if(c&&(m=Lf[n]))return m;if(n==="hasOwnProperty")return Kf}const f=Reflect.get(t,n,Xt(t)?t:o);if((Dn(n)?yc.has(n):Rf(n))||(r||Yt(t,"get",n),l))return f;if(Xt(f)){const m=c&&Qi(n)?f:f.value;return r&&mt(m)?$i(m):m}return mt(f)?r?$i(f):ol(f):f}}class bc extends gc{constructor(t=!1){super(!1,t)}set(t,n,o,r){let l=t[n];const c=ze(t)&&Qi(n);if(!this._isShallow){const g=Kn(l);if(!fn(o)&&!Kn(o)&&(l=pt(l),o=pt(o)),!c&&Xt(l)&&!Xt(o))return g||(l.value=o),!0}const f=c?Number(n)e,$r=e=>Reflect.getPrototypeOf(e);function Uf(e,t,n){return function(...o){const r=this.__v_raw,l=pt(r),c=us(l),f=e==="entries"||e===Symbol.iterator&&c,m=e==="keys"&&c,g=r[e](...o),h=n?xi:t?fs:vn;return!t&&Yt(l,"iterate",m?Ci:js),It(Object.create(g),{next(){const{value:k,done:O}=g.next();return O?{value:k,done:O}:{value:f?[h(k[0]),h(k[1])]:h(k),done:O}}})}}function Sr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qf(e,t){const n={get(r){const l=this.__v_raw,c=pt(l),f=pt(r);e||(In(r,f)&&Yt(c,"get",r),Yt(c,"get",f));const{has:m}=$r(c),g=t?xi:e?fs:vn;if(m.call(c,r))return g(l.get(r));if(m.call(c,f))return g(l.get(f));l!==c&&l.get(r)},get size(){const r=this.__v_raw;return!e&&Yt(pt(r),"iterate",js),r.size},has(r){const l=this.__v_raw,c=pt(l),f=pt(r);return e||(In(r,f)&&Yt(c,"has",r),Yt(c,"has",f)),r===f?l.has(r):l.has(r)||l.has(f)},forEach(r,l){const c=this,f=c.__v_raw,m=pt(f),g=t?xi:e?fs:vn;return!e&&Yt(m,"iterate",js),f.forEach((h,k)=>r.call(l,g(h),g(k),c))}};return It(n,e?{add:Sr("add"),set:Sr("set"),delete:Sr("delete"),clear:Sr("clear")}:{add(r){const l=pt(this),c=$r(l),f=pt(r),m=!t&&!fn(r)&&!Kn(r)?f:r;return c.has.call(l,m)||In(r,m)&&c.has.call(l,r)||In(f,m)&&c.has.call(l,f)||(l.add(m),qn(l,"add",m,m)),this},set(r,l){!t&&!fn(l)&&!Kn(l)&&(l=pt(l));const c=pt(this),{has:f,get:m}=$r(c);let g=f.call(c,r);g||(r=pt(r),g=f.call(c,r));const h=m.call(c,r);return c.set(r,l),g?In(l,h)&&qn(c,"set",r,l):qn(c,"add",r,l),this},delete(r){const l=pt(this),{has:c,get:f}=$r(l);let m=c.call(l,r);m||(r=pt(r),m=c.call(l,r)),f&&f.call(l,r);const g=l.delete(r);return m&&qn(l,"delete",r,void 0),g},clear(){const r=pt(this),l=r.size!==0,c=r.clear();return l&&qn(r,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Uf(r,e,t)}),n}function sl(e,t){const n=qf(e,t);return(o,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?o:Reflect.get(vt(n,r)&&r in o?n:o,r,l)}const Hf={get:sl(!1,!1)},zf={get:sl(!1,!0)},Wf={get:sl(!0,!1)};const wc=new WeakMap,_c=new WeakMap,kc=new WeakMap,Gf=new WeakMap;function Yf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ol(e){return Kn(e)?e:rl(e,!1,Ff,Hf,wc)}function Jf(e){return rl(e,!1,Bf,zf,_c)}function $i(e){return rl(e,!0,Vf,Wf,kc)}function rl(e,t,n,o,r){if(!mt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=r.get(e);if(l)return l;const c=Yf(bf(e));if(c===0)return e;const f=new Proxy(e,c===2?o:n);return r.set(e,f),f}function cs(e){return Kn(e)?cs(e.__v_raw):!!(e&&e.__v_isReactive)}function Kn(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function al(e){return e?!!e.__v_raw:!1}function pt(e){const t=e&&e.__v_raw;return t?pt(t):e}function Xf(e){return!vt(e,"__v_skip")&&Object.isExtensible(e)&&oc(e,"__v_skip",!0),e}const vn=e=>mt(e)?ol(e):e,fs=e=>mt(e)?$i(e):e;function Xt(e){return e?e.__v_isRef===!0:!1}function P(e){return Qf(e,!1)}function Qf(e,t){return Xt(e)?e:new Zf(e,t)}class Zf{constructor(t,n){this.dep=new nl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:pt(t),this._value=n?t:vn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||fn(t)||Kn(t);t=o?t:pt(t),In(t,n)&&(this._rawValue=t,this._value=o?t:vn(t),this.dep.trigger())}}function Ht(e){return Xt(e)?e.value:e}const ep={get:(e,t,n)=>t==="__v_raw"?e:Ht(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Xt(r)&&!Xt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Cc(e){return cs(e)?e:new Proxy(e,ep)}class tp{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new nl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Do-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&xt!==this)return cc(this,!0),!0}get value(){const t=this.dep.track();return pc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function np(e,t,n=!1){let o,r;return tt(e)?o=e:(o=e.get,r=e.set),new tp(o,r,n)}const Er={},Br=new WeakMap;let Ts;function sp(e,t=!1,n=Ts){if(n){let o=Br.get(n);o||Br.set(n,o=[]),o.push(e)}}function op(e,t,n=wt){const{immediate:o,deep:r,once:l,scheduler:c,augmentJob:f,call:m}=n,g=S=>r?S:fn(S)||r===!1||r===0?Hn(S,1):Hn(S);let h,k,O,x,I=!1,H=!1;if(Xt(e)?(k=()=>e.value,I=fn(e)):cs(e)?(k=()=>g(e),I=!0):ze(e)?(H=!0,I=e.some(S=>cs(S)||fn(S)),k=()=>e.map(S=>{if(Xt(S))return S.value;if(cs(S))return g(S);if(tt(S))return m?m(S,2):S()})):tt(e)?t?k=m?()=>m(e,2):e:k=()=>{if(O){Ln();try{O()}finally{Rn()}}const S=Ts;Ts=h;try{return m?m(e,3,[x]):e(x)}finally{Ts=S}}:k=jn,t&&r){const S=k,D=r===!0?1/0:r;k=()=>Hn(S(),D)}const oe=If(),ie=()=>{h.stop(),oe&&oe.active&&Xi(oe.effects,h)};if(l&&t){const S=t;t=(...D)=>{try{return S(...D)}finally{ie()}}}let ae=H?new Array(e.length).fill(Er):Er;const U=S=>{if(!(!(h.flags&1)||!h.dirty&&!S))if(t){const D=h.run();if(S||r||I||(H?D.some((Z,z)=>In(Z,ae[z])):In(D,ae))){const Z=Ts;Ln();try{O&&O(),Ts=h;const z=[D,ae===Er?void 0:H&&ae[0]===Er?[]:ae,x];ae=D,m?m(t,3,z):t(...z)}finally{Ts=Z,Rn()}}}else h.run()};return f&&f(U),h=new lc(k),h.scheduler=c?()=>c(U,!1):U,x=S=>sp(S,!1,h),O=h.onStop=()=>{const S=Br.get(h);if(S){if(m)m(S,4);else for(const D of S)D();Br.delete(h)}},t?o?U(!0):ae=h.run():c?c(U.bind(null,!0),!0):h.run(),ie.pause=h.pause.bind(h),ie.resume=h.resume.bind(h),ie.stop=ie,ie}function Hn(e,t=1/0,n){if(t<=0||!mt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Xt(e))Hn(e.value,t,n);else if(ze(e))for(let o=0;o{Hn(o,t,n)});else if(nc(e)){for(const o in e)Hn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Hn(e[o],t,n)}return e}/** -* @vue/runtime-core v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Yo(e,t,n,o){try{return o?e(...o):e()}catch(r){ha(r,t,n)}}function mn(e,t,n,o){if(tt(e)){const r=Yo(e,t,n,o);return r&&ec(r)&&r.catch(l=>{ha(l,t,n)}),r}if(ze(e)){const r=[];for(let l=0;l>>1,r=nn[o],l=Ro(r);l=Ro(n)?nn.push(e):nn.splice(ap(t),0,e),e.flags|=1,$c()}}function $c(){Ur||(Ur=xc.then(Tc))}function ip(e){if(!ze(e))is&&e.id===-1?is.splice(Js+1,0,e):e.flags&1||(On.push(e),e.flags|=1);else for(let t=0;t=t))continue;nn.splice(o,1),o=e?o-1:gn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Ec(e,t,n=0){if(On.length){let o=On,r=0;if(t){o=[];for(let c=0;cRo(c)-Ro(f));if(On.length=r,is){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function Tc(e){try{for(gn=0;gn{o._d&&Gr(-1);const l=qr(t),c=Ds.length;let f;try{f=e(...r)}finally{for(let m=Ds.length;m>c;m--)sd();qr(l),o._d&&Gr(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function Ee(e,t){if(dn===null)return e;const n=ka(dn),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&tt(t)?t.call(o&&o.proxy):t}}const cp=Symbol.for("v-scx"),dp=()=>Ir(cp);function ut(e,t,n){return Pc(e,t,n)}function Pc(e,t,n=wt){const{immediate:o,deep:r,flush:l,once:c}=n,f=It({},n),m=t&&o||!t&&l!=="post";let g;if(Uo){if(l==="sync"){const x=dp();g=x.__watcherHandles||(x.__watcherHandles=[])}else if(!m){const x=()=>{};return x.stop=jn,x.resume=jn,x.pause=jn,x}}const h=sn;f.call=(x,I,H)=>mn(x,h,I,H);let k=!1;l==="post"?f.scheduler=x=>{x.i=h,tn(x,h&&h.suspense)}:l!=="sync"&&(k=!0,f.scheduler=(x,I)=>{I?x():il(x)}),f.augmentJob=x=>{t&&(x.flags|=4),k&&(x.flags|=2,h&&(x.id=h.uid,x.i=h))};const O=op(e,t,f);return Uo&&(g?g.push(O):m&&O()),O}function fp(e,t,n){const o=this.proxy,r=Et(e)?e.includes(".")?Oc(o,e):()=>o[e]:e.bind(o,o);let l;tt(t)?l=t:(l=t.handler,n=t);const c=Jo(this),f=Pc(r,l.bind(o),n);return c(),f}function Oc(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),pp=e=>e&&(e.defer||e.defer===""),iu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,lu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Si=(e,t)=>{const n=e&&e.to;return Et(n)?t?t(n):null:n},vp={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,l,c,f,m,g){const{mc:h,pc:k,pbc:O,o:{insert:x,querySelector:I,createText:H,createComment:oe,parentNode:ie}}=g,ae=As(t.props);let{dynamicChildren:U}=t;const S=(z,ne,j)=>{z.shapeFlag&16&&h(z.children,ne,j,r,l,c,f,m)},D=(z=t)=>{const ne=As(z.props),j=z.target=Si(z.props,I),T=Ei(j,z,H,x);j&&(c!=="svg"&&iu(j)?c="svg":c!=="mathml"&&lu(j)&&(c="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(j),ne||(S(z,j,T),xo(z,!1)))},Z=z=>{const ne=()=>{if(rs.get(z)===ne){if(rs.delete(z),As(z.props)){const j=ie(z.el)||n;S(z,j,z.anchor),xo(z,!0)}D(z)}};rs.set(z,ne),tn(ne,l)};if(e==null){const z=t.el=H(""),ne=t.anchor=H("");if(x(z,n,o),x(ne,n,o),pp(t.props)||l&&l.pendingBranch){Z(t);return}ae&&(S(t,n,ne),xo(t,!0)),D()}else{t.el=e.el;const z=t.anchor=e.anchor,ne=rs.get(e);if(ne){ne.flags|=8,rs.delete(e),Z(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,T=t.targetAnchor=e.targetAnchor,M=As(e.props),ee=M?n:j,Ae=M?z:T;if(c==="svg"||iu(j)?c="svg":(c==="mathml"||lu(j))&&(c="mathml"),U?(O(e.dynamicChildren,U,ee,r,l,c,f),dl(e,t,!0)):m||k(e,t,ee,Ae,r,l,c,f,!1),ae)M?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tr(t,n,z,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $e=Si(t.props,I);$e&&(t.target=$e,Tr(t,$e,null,g,0))}else M&&Tr(t,j,T,g,1);xo(t,ae)}},remove(e,t,n,{um:o,o:{remove:r}},l){const{shapeFlag:c,children:f,anchor:m,targetStart:g,targetAnchor:h,target:k,props:O}=e,x=As(O),I=l||!x,H=rs.get(e);if(H&&(H.flags|=8,rs.delete(e)),k&&(r(g),r(h)),l&&r(m),!H&&(x||k)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Fc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],jc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:un,onEnter:un,onAfterEnter:un,onEnterCancelled:un,onBeforeLeave:un,onLeave:un,onAfterLeave:un,onLeaveCancelled:un,onBeforeAppear:un,onAppear:un,onAfterAppear:un,onAppearCancelled:un},hp={name:"BaseTransition",props:jc,setup(e,{slots:t}){const n=fl(),o=Ic();return()=>{const r=t.default&&ll(t.default(),!0),l=r&&r.length?Dc(r):n.subTree?ce():void 0;if(!l)return;const c=pt(e),{mode:f}=c;if(o.isLeaving)return di(l);const m=Hr(l);if(!m)return di(l);let g=Ko(m,c,o,n,k=>g=k);m.type!==Jt&&ps(m,g);let h=n.subTree&&Hr(n.subTree);if(h&&h.type!==Jt&&!Ps(h,m)&&No(n.subTree)){let k=Ko(h,c,o,n);if(ps(h,k),f==="out-in"&&m.type!==Jt)return o.isLeaving=!0,k.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,h=void 0},di(l);f==="in-out"&&m.type!==Jt?k.delayLeave=(O,x,I)=>{const H=Lc(o,h);H[String(h.key)]=h,O[cn]=()=>{x(),O[cn]=void 0,delete g.delayedLeave,h=void 0},g.delayedLeave=()=>{I(),delete g.delayedLeave,h=void 0}}:h=void 0}else h&&(h=void 0);return l}}};function Dc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Jt){t=n;break}}return t}const yp=hp;function Lc(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Ko(e,t,n,o,r){const{appear:l,mode:c,persisted:f=!1,onBeforeEnter:m,onEnter:g,onAfterEnter:h,onEnterCancelled:k,onBeforeLeave:O,onLeave:x,onAfterLeave:I,onLeaveCancelled:H,onBeforeAppear:oe,onAppear:ie,onAfterAppear:ae,onAppearCancelled:U}=t,S=String(e.key),D=Lc(n,e),Z=(j,T)=>{j&&mn(j,o,9,T)},z=(j,T)=>{const M=T[1];Z(j,T),ze(j)?j.every(ee=>ee.length<=1)&&M():j.length<=1&&M()},ne={mode:c,persisted:f,beforeEnter(j){let T=m;if(!n.isMounted)if(l)T=oe||m;else return;j[cn]&&j[cn](!0);const M=D[S];if(M&&Ps(e,M)){let ee=M.el[cn];if(!ee){const Ae=No(M);ee=Ae&&Ae.el[cn]}ee&&ee()}Z(T,[j])},enter(j){if(D[S]===e)return;let T=g,M=h,ee=k;if(!n.isMounted)if(l)T=ie||g,M=ae||h,ee=U||k;else return;let Ae=!1;j[ko]=ye=>{Ae||(Ae=!0,ye?Z(ee,[j]):Z(M,[j]),ne.delayedLeave&&ne.delayedLeave(),j[ko]=void 0)};const $e=j[ko].bind(null,!1);T?z(T,[j,$e]):$e()},leave(j,T){const M=String(e.key);if(j[ko]&&j[ko](!0),n.isUnmounting)return T();Z(O,[j]);let ee=!1;j[cn]=$e=>{ee||(ee=!0,T(),$e?Z(H,[j]):Z(I,[j]),j[cn]=void 0,D[M]===e&&delete D[M])};const Ae=j[cn].bind(null,!1);D[M]=e,x?z(x,[j,Ae]):Ae()},clone(j){const T=Ko(j,t,n,o,r);return r&&r(T),T}};return ne}function di(e){if(ga(e))return e=vs(e),e.children=null,e}function Hr(e){if(!ga(e))return ya(e.type)&&e.children?Dc(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&&tt(n.default))return n.default()}}function ps(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ps(ya(n.type)&&Hr(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===Oe&&ze(e.children)){const n=Hc(e.children,!1);n&&ps(n,t)}}function ll(e,t=!1,n){let o=[],r=0;for(let l=0;l1)for(let l=0;lPo(H,t&&(ze(t)?t[oe]:t),n,o,r));return}if(Oo(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Po(e,t,n,o.component.subTree);return}const l=o.shapeFlag&4?ka(o.component):o.el,c=r?null:l,{i:f,r:m}=e,g=t&&t.r,h=f.refs===wt?f.refs={}:f.refs,k=f.setupState,O=pt(k),x=k===wt?Zu:H=>uu(h,H)?!1:vt(O,H),I=(H,oe)=>!(oe&&uu(h,oe));if(g!=null&&g!==m){if(cu(t),Et(g))h[g]=null,x(g)&&(k[g]=null);else if(Xt(g)){const H=t;I(g,H.k)&&(g.value=null),H.k&&(h[H.k]=null)}}if(tt(m))Yo(m,f,12,[c,h]);else{const H=Et(m),oe=Xt(m);if(H||oe){const ie=()=>{if(e.f){const ae=H?x(m)?k[m]:h[m]:I()||!e.k?m.value:h[e.k];if(r)ze(ae)&&Xi(ae,l);else if(ze(ae))ae.includes(l)||ae.push(l);else if(H)h[m]=[l],x(m)&&(k[m]=h[m]);else{const U=[l];I(m,e.k)&&(m.value=U),e.k&&(h[e.k]=U)}}else H?(h[m]=c,x(m)&&(k[m]=c)):oe&&(I(m,e.k)&&(m.value=c),e.k&&(h[e.k]=c))};if(c){const ae=()=>{ie(),zr.delete(e)};ae.id=-1,zr.set(e,ae),tn(ae,n)}else cu(e),ie()}}}function cu(e){const t=zr.get(e);t&&(t.flags|=8,zr.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Oo=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function gp(e,t){Kc(e,"a",t)}function bp(e,t){Kc(e,"da",t)}function Kc(e,t,n=sn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ba(t,o,n),n){let r=n.parent;for(;r&&r.parent;)ga(r.parent.vnode)&&wp(o,t,n,r),r=r.parent}}function wp(e,t,n,o){const r=ba(t,e,o,!0);hn(()=>{Xi(o[t],r)},n)}function ba(e,t,n=sn,o=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...c)=>{Ln();const f=Jo(n),m=mn(t,n,e,c);return f(),Rn(),m});return o?r.unshift(l):r.push(l),l}}const Yn=e=>(t,n=sn)=>{(!Uo||e==="sp")&&ba(e,(...o)=>t(...o),n)},_p=Yn("bm"),ln=Yn("m"),kp=Yn("bu"),Nc=Yn("u"),Fc=Yn("bum"),hn=Yn("um"),Cp=Yn("sp"),xp=Yn("rtg"),$p=Yn("rtc");function Sp(e,t=sn){ba("ec",e,t)}const Ep=Symbol.for("v-ndc");function st(e,t,n,o){let r;const l=n,c=ze(e);if(c||Et(e)){const f=c&&cs(e);let m=!1,g=!1;f&&(m=!fn(e),g=Kn(e),e=ma(e)),r=new Array(e.length);for(let h=0,k=e.length;ht(f,m,void 0,l));else{const f=Object.keys(e);r=new Array(f.length);for(let m=0,g=f.length;me?id(e)?ka(e):Ti(e.parent):null,Mo=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=>Ti(e.parent),$root:e=>Ti(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bc(e),$forceUpdate:e=>e.f||(e.f=()=>{il(e.update)}),$nextTick:e=>e.n||(e.n=Ks.bind(e.proxy)),$watch:e=>fp.bind(e)}),fi=(e,t)=>e!==wt&&!e.__isScriptSetup&&vt(e,t),Tp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:l,accessCache:c,type:f,appContext:m}=e;if(t[0]!=="$"){const O=c[t];if(O!==void 0)switch(O){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(fi(o,t))return c[t]=1,o[t];if(r!==wt&&vt(r,t))return c[t]=2,r[t];if(vt(l,t))return c[t]=3,l[t];if(n!==wt&&vt(n,t))return c[t]=4,n[t];Ai&&(c[t]=0)}}const g=Mo[t];let h,k;if(g)return t==="$attrs"&&Yt(e.attrs,"get",""),g(e);if((h=f.__cssModules)&&(h=h[t]))return h;if(n!==wt&&vt(n,t))return c[t]=4,n[t];if(k=m.config.globalProperties,vt(k,t))return k[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:l}=e;return fi(r,t)?(r[t]=n,!0):o!==wt&&vt(o,t)?(o[t]=n,!0):vt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:l,type:c}},f){let m;return!!(n[f]||e!==wt&&f[0]!=="$"&&vt(e,f)||fi(t,f)||vt(l,f)||vt(o,f)||vt(Mo,f)||vt(r.config.globalProperties,f)||(m=c.__cssModules)&&m[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 du(e){return ze(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ai=!0;function Ap(e){const t=Bc(e),n=e.proxy,o=e.ctx;Ai=!1,t.beforeCreate&&fu(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:c,watch:f,provide:m,inject:g,created:h,beforeMount:k,mounted:O,beforeUpdate:x,updated:I,activated:H,deactivated:oe,beforeDestroy:ie,beforeUnmount:ae,destroyed:U,unmounted:S,render:D,renderTracked:Z,renderTriggered:z,errorCaptured:ne,serverPrefetch:j,expose:T,inheritAttrs:M,components:ee,directives:Ae,filters:$e}=t;if(g&&Pp(g,o,null),c)for(const Ue in c){const Ke=c[Ue];tt(Ke)&&(o[Ue]=Ke.bind(n))}if(r){const Ue=r.call(n,n);mt(Ue)&&(e.data=ol(Ue))}if(Ai=!0,l)for(const Ue in l){const Ke=l[Ue],Ye=tt(Ke)?Ke.bind(n,n):tt(Ke.get)?Ke.get.bind(n,n):jn,We=!tt(Ke)&&tt(Ke.set)?Ke.set.bind(n):jn,He=et({get:Ye,set:We});Object.defineProperty(o,Ue,{enumerable:!0,configurable:!0,get:()=>He.value,set:ke=>He.value=ke})}if(f)for(const Ue in f)Vc(f[Ue],o,n,Ue);if(m){const Ue=tt(m)?m.call(n):m;Reflect.ownKeys(Ue).forEach(Ke=>{up(Ke,Ue[Ke])})}h&&fu(h,e,"c");function Te(Ue,Ke){ze(Ke)?Ke.forEach(Ye=>Ue(Ye.bind(n))):Ke&&Ue(Ke.bind(n))}if(Te(_p,k),Te(ln,O),Te(kp,x),Te(Nc,I),Te(gp,H),Te(bp,oe),Te(Sp,ne),Te($p,Z),Te(xp,z),Te(Fc,ae),Te(hn,S),Te(Cp,j),ze(T))if(T.length){const Ue=e.exposed||(e.exposed={});T.forEach(Ke=>{Object.defineProperty(Ue,Ke,{get:()=>n[Ke],set:Ye=>n[Ke]=Ye,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===jn&&(e.render=D),M!=null&&(e.inheritAttrs=M),ee&&(e.components=ee),Ae&&(e.directives=Ae),j&&Rc(e)}function Pp(e,t,n=jn){ze(e)&&(e=Pi(e));for(const o in e){const r=e[o];let l;mt(r)?"default"in r?l=Ir(r.from||o,r.default,!0):l=Ir(r.from||o):l=Ir(r),Xt(l)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):t[o]=l}}function fu(e,t,n){mn(ze(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Vc(e,t,n,o){let r=o.includes(".")?Oc(n,o):()=>n[o];if(Et(e)){const l=t[e];tt(l)&&ut(r,l)}else if(tt(e))ut(r,e.bind(n));else if(mt(e))if(ze(e))e.forEach(l=>Vc(l,t,n,o));else{const l=tt(e.handler)?e.handler.bind(n):t[e.handler];tt(l)&&ut(r,l,e)}}function Bc(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:c}}=e.appContext,f=l.get(t);let m;return f?m=f:!r.length&&!n&&!o?m=t:(m={},r.length&&r.forEach(g=>Wr(m,g,c,!0)),Wr(m,t,c)),mt(t)&&l.set(t,m),m}function Wr(e,t,n,o=!1){const{mixins:r,extends:l}=t;l&&Wr(e,l,n,!0),r&&r.forEach(c=>Wr(e,c,n,!0));for(const c in t)if(!(o&&c==="expose")){const f=Op[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const Op={data:pu,props:vu,emits:vu,methods:$o,computed:$o,beforeCreate:en,created:en,beforeMount:en,mounted:en,beforeUpdate:en,updated:en,beforeDestroy:en,beforeUnmount:en,destroyed:en,unmounted:en,activated:en,deactivated:en,errorCaptured:en,serverPrefetch:en,components:$o,directives:$o,watch:Ip,provide:pu,inject:Mp};function pu(e,t){return t?e?function(){return It(tt(e)?e.call(this,this):e,tt(t)?t.call(this,this):t)}:t:e}function Mp(e,t){return $o(Pi(e),Pi(t))}function Pi(e){if(ze(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bn(t)}Modifiers`]||e[`${hs(t)}Modifiers`];function Rp(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||wt;let r=n;const l=t.startsWith("update:"),c=l&&Lp(o,t.slice(7));c&&(c.trim&&(r=n.map(h=>Et(h)?h.trim():h)),c.number&&(r=r.map(pa)));let f,m=o[f=ri(t)]||o[f=ri(bn(t))];!m&&l&&(m=o[f=ri(hs(t))]),m&&mn(m,e,6,r);const g=o[f+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(g,e,6,r)}}const Kp=new WeakMap;function qc(e,t,n=!1){const o=n?Kp:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const l=e.emits;let c={},f=!1;if(!tt(e)){const m=g=>{const h=qc(g,t,!0);h&&(f=!0,It(c,h))};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}return!l&&!f?(mt(e)&&o.set(e,null),null):(ze(l)?l.forEach(m=>c[m]=null):It(c,l),mt(e)&&o.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),vt(e,t[0].toLowerCase()+t.slice(1))||vt(e,hs(t))||vt(e,t))}function mu(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[l],slots:c,attrs:f,emit:m,render:g,renderCache:h,props:k,data:O,setupState:x,ctx:I,inheritAttrs:H}=e,oe=qr(e);let ie,ae;try{if(n.shapeFlag&4){const S=r||o,D=S;ie=Mn(g.call(D,S,h,k,x,O,I)),ae=f}else{const S=t;ie=Mn(S.length>1?S(k,{attrs:f,slots:c,emit:m}):S(k,null)),ae=t.props?f:Np(f)}}catch(S){Ds.length=0,ha(S,e,1),ie=he(Jt)}let U=ie;if(ae&&H!==!1){const S=Object.keys(ae),{shapeFlag:D}=U;S.length&&D&7&&(l&&S.some(da)&&(ae=Fp(ae,l)),U=vs(U,ae,!1,!0))}if(n.dirs&&(U=vs(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition){const S=ya(U.type)&&Hr(U)||U;ps(S,n.transition)}return ie=U,qr(oe),ie}function Hc(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Fp=(e,t)=>{const n={};for(const o in e)(!da(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Vp(e,t,n){const{props:o,children:r,component:l}=e,{props:c,children:f,patchFlag:m}=t,g=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&m>=0){if(m&1024)return!0;if(m&16)return o?hu(o,c,g):!!c;if(m&8){const h=t.dynamicProps;for(let k=0;kObject.create(Wc),Yc=e=>Object.getPrototypeOf(e)===Wc;function Up(e,t,n,o=!1){const r={},l=Gc();e.propsDefaults=Object.create(null),Jc(e,t,r,l);for(const c in e.propsOptions[0])c in r||(r[c]=void 0);n?e.props=o?r:Jf(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function qp(e,t,n,o){const{props:r,attrs:l,vnode:{patchFlag:c}}=e,f=pt(r),[m]=e.propsOptions;let g=!1;if((o||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let k=0;k{m=!0;const[O,x]=Xc(k,t,!0);It(c,O),x&&f.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!l&&!m)return mt(e)&&o.set(e,Ms),Ms;if(ze(l))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",cl=e=>ze(e)?e.map(Mn):[Mn(e)],zp=(e,t,n)=>{if(t._n)return t;const o=$n((...r)=>cl(t(...r)),n);return o._c=!1,o},Qc=(e,t,n)=>{const o=e._ctx;for(const r in e){if(ul(r))continue;const l=e[r];if(tt(l))t[r]=zp(r,l,o);else if(l!=null){const c=cl(l);t[r]=()=>c}}},Zc=(e,t)=>{const n=cl(t);e.slots.default=()=>n},ed=(e,t,n)=>{for(const o in t)(n||!ul(o))&&(e[o]=t[o])},Wp=(e,t,n)=>{const o=e.slots=Gc();if(e.vnode.shapeFlag&32){const r=t._;r?(ed(o,t,n),n&&oc(o,"_",r,!0)):Qc(t,o)}else t&&Zc(e,t)},Gp=(e,t,n)=>{const{vnode:o,slots:r}=e;let l=!0,c=wt;if(o.shapeFlag&32){const f=t._;f?n&&f===1?l=!1:ed(r,t,n):(l=!t.$stable,Qc(t,r)),c=t}else t&&(Zc(e,t),c={default:1});if(l)for(const f in r)!ul(f)&&c[f]==null&&delete r[f]},tn=Zp;function Yp(e){return Jp(e)}function Jp(e,t){const n=va();n.__VUE__=!0;const{insert:o,remove:r,patchProp:l,createElement:c,createText:f,createComment:m,setText:g,setElementText:h,parentNode:k,nextSibling:O,setScopeId:x=jn,insertStaticContent:I}=e,H=(b,p,w,E=null,X=null,G=null,ge=void 0,be=null,_e=!!p.dynamicChildren)=>{if(b===p)return;b&&!Ps(b,p)&&(E=kt(b),ke(b,X,G,!0),b=null),p.patchFlag===-2&&(_e=!1,p.dynamicChildren=null),p.dynamicChildren&&b&&b.dynamicChildren&&b.dynamicChildren.hasOnce&&(p.dynamicChildren===Ms&&(p.dynamicChildren=[]),p.dynamicChildren.hasOnce=!0);const{type:de,ref:Le,shapeFlag:Se}=p;switch(de){case _a:oe(b,p,w,E);break;case Jt:ie(b,p,w,E);break;case jr:b==null&&ae(p,w,E,ge);break;case Oe:ee(b,p,w,E,X,G,ge,be,_e);break;default:Se&1?D(b,p,w,E,X,G,ge,be,_e):Se&6?Ae(b,p,w,E,X,G,ge,be,_e):(Se&64||Se&128)&&de.process(b,p,w,E,X,G,ge,be,_e,yt)}Le!=null&&X?Po(Le,b&&b.ref,G,p||b,!p):Le==null&&b&&b.ref!=null&&Po(b.ref,null,G,b,!0)},oe=(b,p,w,E)=>{if(b==null)o(p.el=f(p.children),w,E);else{const X=p.el=b.el;p.children!==b.children&&g(X,p.children)}},ie=(b,p,w,E)=>{b==null?o(p.el=m(p.children||""),w,E):p.el=b.el},ae=(b,p,w,E)=>{[b.el,b.anchor]=I(b.children,p,w,E,b.el,b.anchor)},U=({el:b,anchor:p},w,E)=>{let X;for(;b&&b!==p;)X=O(b),o(b,w,E),b=X;o(p,w,E)},S=({el:b,anchor:p})=>{let w;for(;b&&b!==p;)w=O(b),r(b),b=w;r(p)},D=(b,p,w,E,X,G,ge,be,_e)=>{if(p.type==="svg"?ge="svg":p.type==="math"&&(ge="mathml"),b==null)Z(p,w,E,X,G,ge,be,_e);else{const de=b.el&&b.el._isVueCE?b.el:null;try{de&&de._beginPatch(),j(b,p,X,G,ge,be,_e)}finally{de&&de._endPatch()}}},Z=(b,p,w,E,X,G,ge,be)=>{let _e,de;const{props:Le,shapeFlag:Se,transition:Ve,dirs:le}=b;if(_e=b.el=c(b.type,G,Le&&Le.is,Le),Se&8?h(_e,b.children):Se&16&&ne(b.children,_e,null,E,X,pi(b,G),ge,be),le&&$s(b,null,E,"created"),z(_e,b,b.scopeId,ge,E),Le){for(const ue in Le)ue!=="value"&&!Eo(ue)&&l(_e,ue,null,Le[ue],G,E);"value"in Le&&l(_e,"value",null,Le.value,G),(de=Le.onVnodeBeforeMount)&&En(de,E,b)}le&&$s(b,null,E,"beforeMount");const Y=Xp(X,Ve);Y&&Ve.beforeEnter(_e),o(_e,p,w),((de=Le&&Le.onVnodeMounted)||Y||le)&&tn(()=>{try{de&&En(de,E,b),Y&&Ve.enter(_e),le&&$s(b,null,E,"mounted")}finally{}},X)},z=(b,p,w,E,X)=>{if(w&&x(b,w),E)for(let G=0;G{for(let de=_e;de{const be=p.el=b.el;let{patchFlag:_e,dynamicChildren:de,dirs:Le}=p;_e|=b.patchFlag&16;const Se=b.props||wt,Ve=p.props||wt;let le;if(w&&Ss(w,!1),(le=Ve.onVnodeBeforeUpdate)&&En(le,w,p,b),Le&&$s(p,b,w,"beforeUpdate"),w&&Ss(w,!0),de&&(!b.dynamicChildren||b.dynamicChildren.length!==de.length)&&(_e=0,ge=!1,de=null),(Se.innerHTML&&Ve.innerHTML==null||Se.textContent&&Ve.textContent==null)&&h(be,""),de?T(b.dynamicChildren,de,be,w,E,pi(p,X),G):ge||Ke(b,p,be,null,w,E,pi(p,X),G,!1),_e>0){if(_e&16)M(be,Se,Ve,w,X);else if(_e&2&&Se.class!==Ve.class&&l(be,"class",null,Ve.class,X),_e&4&&l(be,"style",Se.style,Ve.style,X),_e&8){const Y=p.dynamicProps;for(let ue=0;ue{le&&En(le,w,p,b),Le&&$s(p,b,w,"updated")},E)},T=(b,p,w,E,X,G,ge)=>{for(let be=0;be{if(p!==w){if(p!==wt)for(const G in p)!Eo(G)&&!(G in w)&&l(b,G,p[G],null,X,E);for(const G in w){if(Eo(G))continue;const ge=w[G],be=p[G];ge!==be&&G!=="value"&&l(b,G,be,ge,X,E)}"value"in w&&l(b,"value",p.value,w.value,X)}},ee=(b,p,w,E,X,G,ge,be,_e)=>{const de=p.el=b?b.el:f(""),Le=p.anchor=b?b.anchor:f("");let{patchFlag:Se,dynamicChildren:Ve,slotScopeIds:le}=p;le&&(be=be?be.concat(le):le),b==null?(o(de,w,E),o(Le,w,E),ne(p.children||[],w,Le,X,G,ge,be,_e)):Se>0&&Se&64&&Ve&&b.dynamicChildren&&b.dynamicChildren.length===Ve.length?(T(b.dynamicChildren,Ve,w,X,G,ge,be),(p.key!=null||X&&p===X.subTree)&&dl(b,p,!0)):Ke(b,p,w,Le,X,G,ge,be,_e)},Ae=(b,p,w,E,X,G,ge,be,_e)=>{p.slotScopeIds=be,b==null?p.shapeFlag&512?X.ctx.activate(p,w,E,ge,_e):$e(p,w,E,X,G,ge,_e):ye(b,p,_e)},$e=(b,p,w,E,X,G,ge)=>{const be=b.component=av(b,E,X);if(ga(b)&&(be.ctx.renderer=yt),iv(be,!1,ge),be.asyncDep){if(X&&X.registerDep(be,Te,ge,G),!b.el){const _e=be.subTree=he(Jt);ie(null,_e,p,w),b.placeholder=_e.el}}else Te(be,b,p,w,X,G,ge)},ye=(b,p,w)=>{const E=p.component=b.component;if(Vp(b,p,w))if(E.asyncDep&&!E.asyncResolved){p.el=b.el,p.placeholder=b.placeholder,Ue(E,p,w);return}else E.next=p,E.update();else p.el=b.el,p.placeholder=b.placeholder,E.vnode=p},Te=(b,p,w,E,X,G,ge)=>{const be=()=>{if(b.isMounted){let{next:Se,bu:Ve,u:le,parent:Y,vnode:ue}=b;{const Qe=td(b);if(Qe){Se&&(Se.el=ue.el,Ue(b,Se,ge)),Qe.asyncDep.then(()=>{tn(()=>{b.isUnmounted||de()},X)});return}}let Ie=Se,rt;Ss(b,!1),Se?(Se.el=ue.el,Ue(b,Se,ge)):Se=ue,Ve&&Mr(Ve),(rt=Se.props&&Se.props.onVnodeBeforeUpdate)&&En(rt,Y,Se,ue),Ss(b,!0);const ht=mu(b),Dt=b.subTree;b.subTree=ht,H(Dt,ht,k(Dt.el),kt(Dt),b,X,G),Se.el=ht.el,Ie===null&&Bp(b,ht.el),le&&tn(le,X),(rt=Se.props&&Se.props.onVnodeUpdated)&&tn(()=>En(rt,Y,Se,ue),X)}else{let Se;const{el:Ve,props:le}=p,{bm:Y,m:ue,parent:Ie,root:rt,type:ht}=b,Dt=Oo(p);Ss(b,!1),Y&&Mr(Y),!Dt&&(Se=le&&le.onVnodeBeforeMount)&&En(Se,Ie,p),Ss(b,!0);{rt.ce&&rt.ce._hasShadowRoot()&&rt.ce._injectChildStyle(ht,b.parent?b.parent.type:void 0);const Qe=b.subTree=mu(b);H(null,Qe,w,E,b,X,G),p.el=Qe.el}if(ue&&tn(ue,X),!Dt&&(Se=le&&le.onVnodeMounted)){const Qe=p;tn(()=>En(Se,Ie,Qe),X)}(p.shapeFlag&256||Ie&&Oo(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&b.a&&tn(b.a,X),b.isMounted=!0,p=w=E=null}};b.scope.on();const _e=b.effect=new lc(be);b.scope.off();const de=b.update=_e.run.bind(_e),Le=b.job=_e.runIfDirty.bind(_e);Le.i=b,Le.id=b.uid,_e.scheduler=()=>il(Le),Ss(b,!0),de()},Ue=(b,p,w)=>{p.component=b;const E=b.vnode.props;b.vnode=p,b.next=null,qp(b,p.props,E,w),Gp(b,p.children,w),Ln(),Sc(b),Rn()},Ke=(b,p,w,E,X,G,ge,be,_e=!1)=>{const de=b&&b.children,Le=b?b.shapeFlag:0,Se=p.children,{patchFlag:Ve,shapeFlag:le}=p;if(Ve>0){if(Ve&128){We(de,Se,w,E,X,G,ge,be,_e);return}else if(Ve&256){Ye(de,Se,w,E,X,G,ge,be,_e);return}}le&8?(Le&16&&bt(de,X,G),Se!==de&&h(w,Se)):Le&16?le&16?We(de,Se,w,E,X,G,ge,be,_e):bt(de,X,G,!0):(Le&8&&h(w,""),le&16&&ne(Se,w,E,X,G,ge,be,_e))},Ye=(b,p,w,E,X,G,ge,be,_e)=>{b=b||Ms,p=p||Ms;const de=b.length,Le=p.length,Se=Math.min(de,Le);let Ve;for(Ve=0;VeLe?bt(b,X,G,!0,!1,Se):ne(p,w,E,X,G,ge,be,_e,Se)},We=(b,p,w,E,X,G,ge,be,_e)=>{let de=0;const Le=p.length;let Se=b.length-1,Ve=Le-1;for(;de<=Se&&de<=Ve;){const le=b[de],Y=p[de]=_e?Un(p[de]):Mn(p[de]);if(Ps(le,Y))H(le,Y,w,null,X,G,ge,be,_e);else break;de++}for(;de<=Se&&de<=Ve;){const le=b[Se],Y=p[Ve]=_e?Un(p[Ve]):Mn(p[Ve]);if(Ps(le,Y))H(le,Y,w,null,X,G,ge,be,_e);else break;Se--,Ve--}if(de>Se){if(de<=Ve){const le=Ve+1,Y=leVe)for(;de<=Se;)ke(b[de],X,G,!0),de++;else{const le=de,Y=de,ue=new Map;for(de=Y;de<=Ve;de++){const Ut=p[de]=_e?Un(p[de]):Mn(p[de]);Ut.key!=null&&ue.set(Ut.key,de)}let Ie,rt=0;const ht=Ve-Y+1;let Dt=!1,Qe=0;const Qt=new Array(ht);for(de=0;de=ht){ke(Ut,X,G,!0);continue}let Lt;if(Ut.key!=null)Lt=ue.get(Ut.key);else for(Ie=Y;Ie<=Ve;Ie++)if(Qt[Ie-Y]===0&&Ps(Ut,p[Ie])){Lt=Ie;break}Lt===void 0?ke(Ut,X,G,!0):(Qt[Lt-Y]=de+1,Lt>=Qe?Qe=Lt:Dt=!0,H(Ut,p[Lt],w,null,X,G,ge,be,_e),rt++)}const ys=Dt?Qp(Qt):Ms;for(Ie=ys.length-1,de=ht-1;de>=0;de--){const Ut=Y+de,Lt=p[Ut],Be=p[Ut+1],Xn=Ut+1{const{el:G,type:ge,transition:be,children:_e,shapeFlag:de}=b;if(de&6){He(b.component.subTree,p,w,E);return}if(de&128){b.suspense.move(p,w,E);return}if(de&64){ge.move(b,p,w,yt);return}if(ge===Oe){o(G,p,w);for(let Se=0;Se<_e.length;Se++)He(_e[Se],p,w,E);o(b.anchor,p,w);return}if(ge===jr){U(b,p,w);return}if(E!==2&&de&1&&be)if(E===0)be.persisted&&!G[cn]?o(G,p,w):(be.beforeEnter(G),o(G,p,w),tn(()=>be.enter(G),X));else{const{leave:Se,delayLeave:Ve,afterLeave:le}=be,Y=()=>{b.ctx.isUnmounted?r(G):o(G,p,w)},ue=()=>{const Ie=G._isLeaving||!!G[cn];G._isLeaving&&G[cn](!0),be.persisted&&!Ie?Y():Se(G,()=>{Y(),le&&le()})};Ve?Ve(G,Y,ue):ue()}else o(G,p,w)},ke=(b,p,w,E=!1,X=!1)=>{const{type:G,props:ge,ref:be,children:_e,dynamicChildren:de,shapeFlag:Le,patchFlag:Se,dirs:Ve,cacheIndex:le,memo:Y}=b;if((Se===-2||de&&de.hasOnce)&&(X=!1),be!=null&&(Ln(),Po(be,null,w,b,!0),Rn()),le!=null&&(!b.ctx||b.ctx===p)&&(p.renderCache[le]=void 0),Le&256){p.ctx.deactivate(b);return}const ue=Le&1&&Ve,Ie=!Oo(b);let rt;if(Ie&&(rt=ge&&ge.onVnodeBeforeUnmount)&&En(rt,p,b),Le&6)ot(b.component,w,E);else{if(Le&128){b.suspense.unmount(w,E);return}ue&&$s(b,null,p,"beforeUnmount"),Le&64?b.type.remove(b,p,w,yt,E):de&&!de.hasOnce&&(G!==Oe||Se>0&&Se&64)?bt(de,p,w,!1,!0):(G===Oe&&Se&384||!X&&Le&16)&&bt(_e,p,w),E&&fe(b)}const ht=Y!=null&&le==null;(Ie&&(rt=ge&&ge.onVnodeUnmounted)||ue||ht)&&tn(()=>{rt&&En(rt,p,b),ue&&$s(b,null,p,"unmounted"),ht&&(b.el=null)},w)},fe=b=>{const{type:p,el:w,anchor:E,transition:X}=b,G=p===Oe;if(G&&!X){Pe(w,E);return}if(p===jr){S(b),X&&!X.persisted&&X.afterLeave&&X.afterLeave();return}const ge=G?No(b):b,be=()=>{G?k(w)&&Pe(w,E):r(w),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if(ge&&ge.shapeFlag&1&&X&&!X.persisted){const{leave:_e,delayLeave:de}=X,Le=ge.el,Se=()=>_e(Le,be);de?de(Le,be,Se):Se()}else be()},Pe=(b,p)=>{let w;for(;b!==p;)w=O(b),r(b),b=w;r(p)},ot=(b,p,w)=>{const{bum:E,scope:X,job:G,subTree:ge,um:be,m:_e,a:de}=b;gu(_e),gu(de),E&&Mr(E),X.stop(),G?(G.flags|=8,ke(ge,b,p,w)):b.vnode.el&&ge&&(ge.transition=b.vnode.transition,ke(ge,b,p,w)),be&&tn(be,p),tn(()=>{b.isUnmounted=!0},p)},bt=(b,p,w,E=!1,X=!1,G=0)=>{for(let ge=G;ge{if(b.shapeFlag&6)return kt(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const p=O(b.anchor||b.el),w=p&&p[Mc];return w?O(w):p},Ft=(b,p,w)=>{const E=b&&p._vnode?void 0:b&&b.component?b.component.uid:rv();lp(()=>{b==null?p._vnode&&ke(p._vnode,null,null,!0):H(p._vnode||null,b,p,null,null,null,w),p._vnode=b},E)},yt={p:H,um:ke,m:He,r:fe,mt:$e,mc:ne,pc:Ke,pbc:T,n:kt,o:e};return{render:Ft,hydrate:void 0,createApp:Dp(Ft)}}function pi({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 Ss({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function dl(e,t,n=!1){const o=e.children,r=t.children;if(ze(o)&&ze(r))for(let l=0;l>1,e[n[f]]0&&(t[o]=n[l-1]),n[l]=o)}}for(l=n.length,c=n[l-1];l-- >0;)n[l]=c,c=t[c];return n}function td(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:td(t)}function gu(e){if(e)for(let t=0;te.__isSuspense;function Zp(e,t){t&&t.pendingBranch?ze(e)?t.effects.push(...e):t.effects.push(e):ip(e)}const Oe=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Jt=Symbol.for("v-cmt"),jr=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function sd(){Ds.pop(),an=Ds[Ds.length-1]||null}let Fo=1;function Gr(e,t=!1){Fo+=e,e<0&&an&&t&&(an.hasOnce=!0)}function od(e){return e.dynamicChildren=Fo>0?an||Ms:null,sd(),Fo>0&&an&&an.push(e),e}function A(e,t,n,o,r,l){return od(i(e,t,n,o,r,l,!0))}function gt(e,t,n,o,r){return od(he(e,t,n,o,r,!0))}function Vo(e){return e?e.__v_isVNode===!0:!1}function Ps(e,t){return e.type===t.type&&e.key===t.key}const rd=({key:e})=>e??null,Dr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Et(e)||Xt(e)||tt(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function i(e,t=null,n=null,o=0,r=null,l=e===Oe?0:1,c=!1,f=!1){const m={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rd(t),ref:t&&Dr(t),scopeId:Ac,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:l,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:dn};return f?(Yr(m,n),l&128&&e.normalize(m)):n&&(m.shapeFlag|=Et(n)?8:16),Fo>0&&!c&&an&&(m.patchFlag>0||l&6)&&m.patchFlag!==32&&an.push(m),m}const he=ev;function ev(e,t=null,n=null,o=0,r=null,l=!1){if((!e||e===Ep)&&(e=Jt),Vo(e)){const f=vs(e,t,!0);return n&&Yr(f,n),Fo>0&&!l&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(dv(e)&&(e=e.__vccOpts),t){t=tv(t);let{class:f,style:m}=t;f&&!Et(f)&&(t.class=Ge(f)),mt(m)&&(al(m)&&!ze(m)&&(m=It({},m)),t.style=zn(m))}const c=Et(e)?1:nd(e)?128:ya(e)?64:mt(e)?4:tt(e)?2:0;return i(e,t,n,o,r,c,l,!0)}function tv(e){return e?al(e)||Yc(e)?It({},e):e:null}function vs(e,t,n=!1,o=!1){const{props:r,ref:l,patchFlag:c,children:f,transition:m}=e,g=t?sv(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&rd(g),ref:t&&t.ref?n&&l?ze(l)?l.concat(Dr(t)):[l,Dr(t)]:Dr(t):l,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!==Oe?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:m,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vs(e.ssContent),ssFallback:e.ssFallback&&vs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return m&&o&&ps(h,m.clone(h)),h}function _t(e=" ",t=0){return he(_a,null,e,t)}function nv(e,t){const n=he(jr,null,e);return n.staticCount=t,n}function ce(e="",t=!1){return t?($(),gt(Jt,null,e)):he(Jt,null,e)}function Mn(e){return e==null||typeof e=="boolean"?he(Jt):ze(e)?he(Oe,null,e.slice()):Vo(e)?Un(e):he(_a,null,String(e))}function Un(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vs(e)}function Yr(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ze(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),Yr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Yc(t)?t._ctx=dn:r===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(tt(t)){if(o&65){Yr(e,{default:t});return}t={default:t,_ctx:dn},n=32}else t=String(t),o&64?(n=16,t=[_t(t)]):n=8;e.children=t,e.shapeFlag|=n}function sv(...e){const t={};for(let n=0;nsn||dn;let Jr,Bo;{const e=va(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),l=>{r.length>1?r.forEach(c=>c(l)):r[0](l)}};Jr=t("__VUE_INSTANCE_SETTERS__",n=>sn=n),Bo=t("__VUE_SSR_SETTERS__",n=>Uo=n)}const Jo=e=>{const t=sn;return Jr(e),e.scope.on(),()=>{e.scope.off(),Jr(t)}},bu=()=>{sn&&sn.scope.off(),Jr(null)};function id(e){return e.vnode.shapeFlag&4}let Uo=!1;function iv(e,t=!1,n=!1){t&&Bo(t);const{props:o,children:r}=e.vnode,l=id(e);Up(e,o,l,t),Wp(e,r,n||t);const c=l?lv(e,t):void 0;return t&&Bo(!1),c}function lv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Tp);const{setup:o}=n;if(o){Ln();const r=e.setupContext=o.length>1?cv(e):null,l=Jo(e),c=Yo(o,e,0,[e.props,r]),f=ec(c);if(Rn(),l(),(f||e.sp)&&!Oo(e)&&Rc(e),f){if(c.then(bu,bu),t)return c.then(m=>{Bo(!0);try{wu(e,m,t)}finally{Bo(!1)}}).catch(m=>{ha(m,e,0)});e.asyncDep=c}else wu(e,c)}else ld(e)}function wu(e,t,n){tt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:mt(t)&&(e.setupState=Cc(t)),ld(e)}function ld(e,t,n){const o=e.type;e.render||(e.render=o.render||jn);{const r=Jo(e);Ln();try{Ap(e)}finally{Rn(),r()}}}const uv={get(e,t){return Yt(e,"get",""),e[t]}};function cv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,uv),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cc(Xf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mo)return Mo[n](e)},has(t,n){return n in t||n in Mo}})):e.proxy}function dv(e){return tt(e)&&"__vccOpts"in e}const et=(e,t)=>np(e,t,Uo);function fv(e,t,n){try{Gr(-1);const o=arguments.length;return o===2?mt(t)&&!ze(t)?Vo(t)?he(e,null,[t]):he(e,t):he(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Vo(n)&&(n=[n]),he(e,t,n))}finally{Gr(1)}}const pv="3.5.44";/** -* @vue/runtime-dom v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ii;const _u=typeof window<"u"&&window.trustedTypes;if(_u)try{Ii=_u.createPolicy("vue",{createHTML:e=>e})}catch{}const ud=Ii?e=>Ii.createHTML(e):e=>e,vv="http://www.w3.org/2000/svg",mv="http://www.w3.org/1998/Math/MathML",Bn=typeof document<"u"?document:null,ku=Bn&&Bn.createElement("template"),hv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Bn.createElementNS(vv,e):t==="mathml"?Bn.createElementNS(mv,e):n?Bn.createElement(e,{is:n}):Bn.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Bn.createTextNode(e),createComment:e=>Bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,l){const c=n?n.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===l||!(r=r.nextSibling)););else{ku.innerHTML=ud(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const f=ku.content;if(o==="svg"||o==="mathml"){const m=f.firstChild;for(;m.firstChild;)f.appendChild(m.firstChild);f.removeChild(m)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},os="transition",Co="animation",so=Symbol("_vtc"),cd={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},dd=It({},jc,cd),yv=e=>(e.displayName="Transition",e.props=dd,e),Jn=yv((e,{slots:t})=>fv(yp,fd(e),t)),Es=(e,t=[])=>{ze(e)?e.forEach(n=>n(...t)):e&&e(...t)},Cu=e=>e?ze(e)?e.some(t=>t.length>1):e.length>1:!1;function fd(e){const t={};for(const ee in e)ee in cd||(t[ee]=e[ee]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:l=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:m=l,appearActiveClass:g=c,appearToClass:h=f,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:O=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,I=gv(r),H=I&&I[0],oe=I&&I[1],{onBeforeEnter:ie,onEnter:ae,onEnterCancelled:U,onLeave:S,onLeaveCancelled:D,onBeforeAppear:Z=ie,onAppear:z=ae,onAppearCancelled:ne=U}=t,j=(ee,Ae,$e,ye)=>{ee._enterCancelled=ye,as(ee,Ae?h:f),as(ee,Ae?g:c),$e&&$e()},T=(ee,Ae)=>{ee._isLeaving=!1,as(ee,k),as(ee,x),as(ee,O),Ae&&Ae()},M=ee=>(Ae,$e)=>{const ye=ee?z:ae,Te=()=>j(Ae,ee,$e);Es(ye,[Ae,Te]),xu(()=>{as(Ae,ee?m:l),Tn(Ae,ee?h:f),Cu(ye)||$u(Ae,o,H,Te)})};return It(t,{onBeforeEnter(ee){Es(ie,[ee]),Tn(ee,l),Tn(ee,c)},onBeforeAppear(ee){Es(Z,[ee]),Tn(ee,m),Tn(ee,g)},onEnter:M(!1),onAppear:M(!0),onLeave(ee,Ae){ee._isLeaving=!0;const $e=()=>T(ee,Ae);Tn(ee,k),ee._enterCancelled?(Tn(ee,O),ji(ee)):(ji(ee),Tn(ee,O)),xu(()=>{ee._isLeaving&&(as(ee,k),Tn(ee,x),Cu(S)||$u(ee,o,oe,$e))}),Es(S,[ee,$e])},onEnterCancelled(ee){j(ee,!1,void 0,!0),Es(U,[ee])},onAppearCancelled(ee){j(ee,!0,void 0,!0),Es(ne,[ee])},onLeaveCancelled(ee){T(ee),Es(D,[ee])}})}function gv(e){if(e==null)return null;if(mt(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return kf(e)}function Tn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[so]||(e[so]=new Set)).add(t)}function as(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[so];n&&(n.delete(t),n.size||(e[so]=void 0))}function xu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let bv=0;function $u(e,t,n,o){const r=e._endId=++bv,l=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(l,n);const{type:c,timeout:f,propCount:m}=pd(e,t);if(!c)return o();const g=c+"end";let h=0;const k=()=>{e.removeEventListener(g,O),l()},O=x=>{x.target===e&&++h>=m&&k()};setTimeout(()=>{h(n[I]||"").split(", "),r=o(`${os}Delay`),l=o(`${os}Duration`),c=Su(r,l),f=o(`${Co}Delay`),m=o(`${Co}Duration`),g=Su(f,m);let h=null,k=0,O=0;t===os?c>0&&(h=os,k=c,O=l.length):t===Co?g>0&&(h=Co,k=g,O=m.length):(k=Math.max(c,g),h=k>0?c>g?os:Co:null,O=h?h===os?l.length:m.length:0);const x=h===os&&/\b(?:transform|all)(?:,|$)/.test(o(`${os}Property`).toString());return{type:h,timeout:k,propCount:O,hasTransform:x}}function Su(e,t){for(;e.lengthEu(n)+Eu(e[o])))}function Eu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ji(e){return(e?e.ownerDocument:document).body.offsetHeight}function wv(e,t,n){const o=e[so];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Tu=Symbol("_vod"),vd=Symbol("_vsh"),_v=Symbol(""),kv=/(?:^|;)\s*display\s*:/;function Cv(e,t,n){const o=e.style,r=Et(n);let l=!1;if(n&&!r){if(t)if(Et(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&So(o,f,"")}else for(const c in t)n[c]==null&&So(o,c,"");for(const c in n){c==="display"&&(l=!0);const f=n[c];f!=null?$v(e,c,!Et(t)&&t?t[c]:void 0,f)||So(o,c,f):So(o,c,"")}}else if(r){if(t!==n){const c=o[_v];c&&(n+=";"+c),o.cssText=n,l=kv.test(n)}}else t&&e.removeAttribute("style");Tu in e&&((!r||t!==n)&&(e[Tu]=l?o.display:""),e[vd]&&(o.display="none"))}const Ar=/\s*!important$/;function So(e,t,n){if(ze(n))n.forEach(o=>So(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))Ar.test(n)?e.setProperty(t,n.replace(Ar,""),"important"):e.setProperty(t,n);else{const o=xv(e,t);Ar.test(n)?e.setProperty(hs(o),n.replace(Ar,""),"important"):e[o]=n}}const Au=["Webkit","Moz","ms"],mi={};function xv(e,t){const n=mi[t];if(n)return n;let o=bn(t);if(o!=="filter"&&o in e)return mi[t]=o;o=sc(o);for(let r=0;rhi||(Ov.then(()=>hi=0),hi=Date.now());function Iv(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const r=n.value;if(ze(r)){const l=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{l.call(o),o._stopped=!0};const c=r.slice(),f=[o];for(let m=0;me.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jv=(e,t,n,o,r,l)=>{const c=r==="svg";t==="class"?wv(e,o,c):t==="style"?Cv(e,n,o):ca(t)?da(t)||Ev(e,t,n,o,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dv(e,t,o,c))?(Mu(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ou(e,t,o,c,l,t!=="value")):e._isVueCE&&(Lv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Et(o)))?Mu(e,bn(t),o,l,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ou(e,t,o,c))};function Dv(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&ju(t)&&tt(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ju(t)&&Et(n)?!1:t in e}function Lv(e,t){const n=e._def.props;if(!n)return!1;const o=bn(t);return Array.isArray(n)?n.some(r=>bn(r)===o):Object.keys(n).some(r=>bn(r)===o)}const md=new WeakMap,hd=new WeakMap,Xr=Symbol("_moveCb"),Du=Symbol("_enterCb"),Di=new WeakMap,Rv=e=>(delete e.props.mode,e),Kv=Rv({name:"TransitionGroup",props:It({},dd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=fl(),o=Ic();let r,l,c,f;const m=()=>(f===void 0&&(f=r.length>0&&zv(r[0].el,n.vnode.el,Lu(e))),f);return Nc(()=>{if(Di.delete(n),!m()){r=[],c=void 0;return}const g=Lu(e);r.forEach(Fv);const h=c&&Hv(c,n.vnode.el);c=void 0,r.forEach(O=>Vv(O,h));const k=r.filter(Bv);ji(n.vnode.el),k.forEach(O=>{const x=O.el,I=x.style;Tn(x,g),I.transform=I.webkitTransform=I.transitionDuration="";const H=x[Xr]=oe=>{oe&&oe.target!==x||(!oe||oe.propertyName.endsWith("transform"))&&(x.removeEventListener("transitionend",H),x[Xr]=null,as(x,g))};x.addEventListener("transitionend",H)}),r=[]}),()=>{const g=pt(e),h=fd(g);let k=g.tag||Oe;if(r=[],f=void 0,l)for(let O=0;Oo.willMove()&&o.item.contains(t));return n&&Ca(n.item,n)}function zv(e,t,n){const o=e.cloneNode(),r=e[so];r&&r.forEach(f=>{f.split(/\s+/).forEach(m=>m&&o.classList.remove(m))}),n.split(/\s+/).forEach(f=>f&&o.classList.add(f)),o.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(o);const{hasTransform:c}=pd(o);return l.removeChild(o),c}const Qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ze(t)?n=>Mr(t,n):t};function Wv(e){e.target.composing=!0}function Ru(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Pr=Symbol("_initialValue");function yi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e.parentNode&&(e.type==="text"?e[Pr]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Pr]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Is]=Qr(r);const l=o||r.props&&r.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](yi(e.value,n,l))}),(n||l)&&Os(e,"change",()=>{e.value=yi(e.value,n,l)}),t||(Os(e,"compositionstart",Wv),Os(e,"compositionend",Ru),Os(e,"change",Ru))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",l=e[Pr];delete e[Pr],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[Is](yi(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:l}},c){if(e[Is]=Qr(c),e.composing)return;const f=(l||e.type==="number")&&!/^0\d/.test(e.value)?pa(e.value):e.value,m=t??"";if(f===m)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===m)||(e.value=m)}},Wn={deep:!0,created(e,{value:t,modifiers:{number:n}},o){e._modelValue=t,Os(e,"change",()=>{const r=Array.prototype.filter.call(e.options,m=>m.selected).map(m=>n?pa(Zr(m)):Zr(m)),l=e.multiple,c=l?Ls(e._modelValue)?new Set(r):r:r[0],f=e._pendingValue=[l,l?ze(c)?r.slice():r:c];try{e[Is](c)}finally{Ks(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Qr(o)},mounted(e,{value:t}){Ku(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Is]=Qr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Gv(t,n[1],n[0]))&&Ku(e,t)}};function Gv(e,t,n){if(!n||ze(e))return ds(e,t);if(Ls(e)){if(e.size!==t.length)return!1;for(const o of t)if(!e.has(o))return!1;return!0}return!1}function Ku(e,t){const n=e.multiple,o=ze(t);if(!(n&&!o&&!Ls(t))){for(let r=0,l=e.options.length;rString(g)===String(f)):c.selected=Of(t,f)>-1}else c.selected=t.has(f);else if(ds(Zr(c),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zr(e){return"_value"in e?e._value:e.value}const Yv=["ctrl","shift","alt","meta"],Jv={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)=>Yv.some(n=>e[`${n}Key`]&&!t.includes(n))},Nt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...l)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const l=hs(r.key);if(t.some(c=>c===l||Xv[c]===l))return e(r)})},Qv=It({patchProp:jv},hv);let Nu;function Zv(){return Nu||(Nu=Yp(Qv))}const em=(...e)=>{const t=Zv().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=nm(o);if(!r)return;const l=t._component;!tt(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const c=n(r,!1,tm(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t};function tm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function nm(e){return Et(e)?document.querySelector(e):e}function Tt(e){return''+e+""}const sm={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(''),warning:Tt(''),plan:Tt('')},om=["innerHTML"],qe=jt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=et(()=>sm[t.name]||"");return(o,r)=>($(),A("span",{class:"icon",style:zn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,om))}}),rm=["aria-label"],am={class:"confirm-body"},im={key:0,class:"confirm-badge"},lm={class:"confirm-text"},um={class:"confirm-msg"},cm={class:"confirm-btns"},dm=jt({__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,o=t;function r(l){n.open&&l.key==="Escape"&&o("cancel")}return ut(()=>n.open,l=>{l?window.addEventListener("keydown",r):window.removeEventListener("keydown",r)}),hn(()=>window.removeEventListener("keydown",r)),(l,c)=>($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Nt(f=>o("cancel"),["self"]))},[i("div",{class:"dialog confirm-dialog",role:"dialog","aria-label":e.title},[i("div",am,[e.danger?($(),A("div",im,[he(qe,{name:"warning",size:22})])):ce("",!0),i("div",lm,[i("div",{class:Ge(["confirm-title",{"is-danger":e.danger}])},F(e.title),3),i("div",um,F(e.message),1)])]),i("div",cm,[i("button",{class:"btn",onClick:c[0]||(c[0]=f=>o("cancel"))},F(e.cancelText),1),i("button",{class:Ge(["btn",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>o("confirm"))},F(e.confirmText),3)])],8,rm)])):ce("",!0)]),_:1})]))}}),Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},_n=Kt(dm,[["__scopeId","data-v-1f3675f2"]]);var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yd={exports:{}};(function(e,t){((n,o)=>{e.exports=o()})(Fu,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(u[v]=d[v])}))(s,a)},o=function(){return(o=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||l.Promise||(l.Promise=Promise);var g=Object.getPrototypeOf,h={}.hasOwnProperty;function k(s,a){return h.call(s,a)}function O(s,a){typeof a=="function"&&(a=a(g(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){I(s,u,a[u])})}var x=Object.defineProperty;function I(s,a,u,d){x(s,a,m(u&&k(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function H(s){return{from:function(a){return s.prototype=Object.create(a.prototype),I(s.prototype,"constructor",s),{extend:O.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,ie=[].slice;function ae(s,a,u){return ie.call(s,a,u)}function U(s,a){return a(s)}function S(s){if(!s)throw new Error("Assertion Failed")}function D(s){l.setImmediate?setImmediate(s):setTimeout(s,0)}function Z(s,a){if(typeof a=="string"&&k(s,a))return s[a];if(!a)return s;if(typeof a!="string"){for(var u=[],d=0,v=a.length;d"u"?[]:(ue=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Y=crypto.subtle.digest("SHA-512",new Uint8Array([0])),g(Y),ue]:[ue,g(ue),ue]),ue=Y[0],Ws=Y[1],Ws=Ws&&Ws.then,Ie=ue&&ue.constructor,rt=!!Y[2],ht=function(s,a){Xn.push([s,a]),Qe&&(queueMicrotask(Wd),Qe=!1)},Dt=!0,Qe=!0,Qt=[],ys=[],Ut=w,Lt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:p,pgp:!1,env:{},finalize:p},Be=Lt,Xn=[],gs=0,er=[];function Me(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Be;if(typeof s!="function"){if(s!==Ve)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Aa(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,v){try{v(function(y){if(d._state===null){if(y===d)throw new TypeError("A promise cannot be resolved with itself.");var _=d._lib&&Vs();y&&typeof y.then=="function"?u(d,function(C,R){y instanceof Me?y._then(C,R):y.then(C,R)}):(d._state=!0,d._value=y,kl(d)),_&&Bs()}},Aa.bind(null,d))}catch(y){Aa(d,y)}}(this,s)}var Ta={get:function(){var s=Be,a=or;function u(d,v){var y=this,_=!s.global&&(s!==Be||a!==or),C=_&&!Zn(),R=new Me(function(J,N){Pa(y,new _l(xl(d,s,_,C),xl(v,s,_,C),J,N,s))});return this._consoleTask&&(R._consoleTask=this._consoleTask),R}return u.prototype=Ve,u},set:function(s){I(this,"then",s&&s.prototype===Ve?Ta:{get:function(){return s},set:Ta.set})}};function _l(s,a,u,d,v){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=v}function Aa(s,a){var u,d;ys.push(a),s._state===null&&(u=s._lib&&Vs(),a=Ut(a),s._state=!1,s._value=a,d=s,Qt.some(function(v){return v._value===d._value})||Qt.push(d),kl(s),u)&&Bs()}function kl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var _=Qt.length;_;)if(Qt[--_]._value===y._value)return Qt.splice(_,1)})(a),u.resolve(d)}catch(y){u.reject(y)}finally{--gs==0&&Oa(),--u.psd.ref||u.psd.finalize()}}function Wd(){bs(Lt,function(){Vs()&&Bs()})}function Vs(){var s=Dt;return Qe=Dt=!1,s}function Bs(){var s,a,u;do for(;0.",$l="String expected.",ar="__dbnames",Ia="readonly",ja="readwrite";function _s(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var Sl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ir(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Ae(a))[s],a}}function El(){throw je.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function lt(s,a){try{var u=Tl(s),d=Tl(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 C=N,R=_;if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function J(){this.constructor=C}function N(){return _!==null&&_.apply(this,arguments)||this}return n(C,R),C.prototype=R===null?Object.create(R):(J.prototype=R.prototype,new J),Object.defineProperty(N.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),N.prototype.table=function(){return u},N})(s)),new Set),v=s.prototype;v;v=g(v))Object.getOwnPropertyNames(v).forEach(function(_){return d.add(_)});function y(_){if(!_)return _;var C,R=Object.create(s.prototype);for(C in _)if(!d.has(C))try{R[C]=_[C]}catch{}return R}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=y,this.hook("reading",y),s},Ct.prototype.defineClass=function(){return this.mapToClass(function(s){m(this,s)})},Ct.prototype.add=function(s,a){var u=this,d=this.schema.primKey,v=d.auto,y=d.keyPath,_=s;return y&&v&&(_=ir(y)(s)),this._trans("readwrite",function(C){return u.core.mutate({trans:C,type:"add",keys:a!=null?[a]:null,values:[_]})}).then(function(C){return C.numFailures?Me.reject(C.failures[0]):C.lastResult}).then(function(C){if(y)try{z(s,y,C)}catch{}return C})},Ct.prototype.upsert=function(s,a){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(v){return u.core.get({trans:v,key:s}).then(function(y){var _=y??{};return Ol(_,a),d&&z(_,d,s),u.core.mutate({trans:v,type:"put",values:[_],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(C){return C.numFailures?Me.reject(C.failures[0]):!!y})})})},Ct.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Z(s,this.schema.primKey.keyPath))===void 0?At(new je.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},Ct.prototype.put=function(s,a){var u=this,d=this.schema.primKey,v=d.auto,y=d.keyPath,_=s;return y&&v&&(_=ir(y)(s)),this._trans("readwrite",function(C){return u.core.mutate({trans:C,type:"put",values:[_],keys:a!=null?[a]:null})}).then(function(C){return C.numFailures?Me.reject(C.failures[0]):C.lastResult}).then(function(C){if(y)try{z(s,y,C)}catch{}return C})},Ct.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 lr(a,[s],d)}).then(function(d){return d.numFailures?Me.reject(d.failures[0]):void 0})})},Ct.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:Sl}).then(function(u){return lr(s,null,u)})}).then(function(a){return a.numFailures?Me.reject(a.failures[0]):void 0})},Ct.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(v){return a.hook.reading.fire(v)})})})},Ct.prototype.bulkAdd=function(s,a,u){var d=this,v=Array.isArray(a)?a:void 0,y=(u=u||(v?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(_){var C=d.schema.primKey,J=C.auto,C=C.keyPath;if(C&&v)throw new je.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(v&&v.length!==s.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var R=s.length,J=C&&J?s.map(ir(C)):s;return d.core.mutate({trans:_,type:"add",keys:v,values:J,wantResults:y}).then(function(N){var L=N.numFailures,K=N.failures;if(L===0)return y?N.results:N.lastResult;throw new kt("".concat(d.name,".bulkAdd(): ").concat(L," of ").concat(R," operations failed"),K)})})},Ct.prototype.bulkPut=function(s,a,u){var d=this,v=Array.isArray(a)?a:void 0,y=(u=u||(v?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(_){var C=d.schema.primKey,J=C.auto,C=C.keyPath;if(C&&v)throw new je.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(v&&v.length!==s.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var R=s.length,J=C&&J?s.map(ir(C)):s;return d.core.mutate({trans:_,type:"put",keys:v,values:J,wantResults:y}).then(function(N){var L=N.numFailures,K=N.failures;if(L===0)return y?N.results:N.lastResult;throw new kt("".concat(d.name,".bulkPut(): ").concat(L," of ").concat(R," operations failed"),K)})})},Ct.prototype.bulkUpdate=function(s){var a=this,u=this.core,d=s.map(function(_){return _.key}),v=s.map(function(_){return _.changes}),y=[];return this._trans("readwrite",function(_){return u.getMany({trans:_,keys:d,cache:"clone"}).then(function(C){var R=[],J=[],N=(s.forEach(function(L,K){var W=L.key,B=L.changes,V=C[K];if(V){for(var q=0,te=Object.keys(B);qQ+re&&q(Q+J)})})}var te=qs(u)&&u.limit===1/0&&(typeof s!="function"||B)&&{index:u.index,range:u.range};return q(0).then(function(){if(0{for(var Xe=Math.min(we.length,Fe.length),nt=-1,it=0;it=K})).length===0?Me.resolve():(q.forEach(function(Q){V.push(function(){var re,pe,me,xe=te,we=Q._cfg.dbschema,Re=(yr(L,xe,B),yr(L,we,B),te=L._dbSchema=we,Ba(xe,we)),Ce=(Re.add.forEach(function(Fe){Ua(B,Fe[0],Fe[1].primKey,Fe[1].indexes)}),Re.change.forEach(function(Fe){if(Fe.recreate)throw new je.Upgrade("Not yet support for changing primary key");var ve=B.objectStore(Fe.name);Fe.add.forEach(function(Je){return mr(ve,Je)}),Fe.change.forEach(function(Je){ve.deleteIndex(Je.name),mr(ve,Je)}),Fe.del.forEach(function(Je){return ve.deleteIndex(Je)})}),Q._cfg.contentUpgrade);if(Ce&&Q._cfg.version>K)return pr(L,B),W._memoizedTables={},re=ne(we),Re.del.forEach(function(Fe){re[Fe]=xe[Fe]}),Va(L,[L.Transaction.prototype]),vr(L,[L.Transaction.prototype],c(re),re),W.schema=re,(pe=He(Ce))&&Us(),we=Me.follow(function(){var Fe;(me=Ce(W))&&pe&&(Fe=Zn.bind(null,null),me.then(Fe,Fe))}),me&&typeof me.then=="function"?Me.resolve(me):we.then(function(){return me})}),V.push(function(re){var pe,me,xe=Q._cfg.dbschema;pe=xe,me=re,[].slice.call(me.db.objectStoreNames).forEach(function(we){return pe[we]==null&&me.db.deleteObjectStore(we)}),Va(L,[L.Transaction.prototype]),vr(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),W.schema=L._dbSchema}),V.push(function(re){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===Q._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(pe){return pe!=="$meta"})):re.objectStore("$meta").put(Q._cfg.version,"version"))})}),function Q(){return V.length?Me.resolve(V.shift()(W.idbtrans)).then(Q):Me.resolve()}().then(function(){Fl(te,B)}))}).catch(_);var R,J;c(v).forEach(function(N){Ua(u,N,v[N].primKey,v[N].indexes)}),pr(s,u),Me.follow(function(){return s.on.populate.fire(y)}).catch(_)})}function af(s,a){Fl(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=hr(0,s.idbdb,a);yr(s,s._dbSchema,a);for(var d=0,v=Ba(u,s._dbSchema).change;d{if(_.change.length||_.recreate)return console.warn("Unable to patch indexes of table ".concat(_.name," because it has changes on the type of index or primary key.")),{value:void 0};var C=a.objectStore(_.name);_.add.forEach(function(R){Le&&console.debug("Dexie upgrade patch: Creating missing index ".concat(_.name,".").concat(R.src)),mr(C,R)})})(v[d]);if(typeof y=="object")return y.value}}function Ba(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var v=s[u],y=a[u];if(v){var _={name:u,def:y,recreate:!1,del:[],add:[],change:[]};if(""+(v.primKey.keyPath||"")!=""+(y.primKey.keyPath||"")||v.primKey.auto!==y.primKey.auto)_.recreate=!0,d.change.push(_);else{var C=v.idxByName,R=y.idxByName,J=void 0;for(J in C)R[J]||_.del.push(J);for(J in R){var N=C[J],L=R[J];N?N.src!==L.src&&_.change.push(L):_.add.push(L)}(0<_.del.length||0<_.add.length||0<_.change.length)&&d.change.push(_)}}else d.add.push([u,y])}return d}function Ua(s,a,u,d){var v=s.db.createObjectStore(a,u.keyPath?{keyPath:u.keyPath,autoIncrement:u.auto}:{autoIncrement:u.auto});d.forEach(function(y){return mr(v,y)})}function Fl(s,a){c(s).forEach(function(u){a.db.objectStoreNames.contains(u)||(Le&&console.debug("Dexie: Creating missing table",u),Ua(a,u,s[u].primKey,s[u].indexes))})}function mr(s,a){s.createIndex(a.name,a.keyPath,{unique:a.unique,multiEntry:a.multi})}function hr(s,a,u){var d={};return ae(a.objectStoreNames,0).forEach(function(v){for(var y=u.objectStore(v),_=Ka(Kl(J=y.keyPath),J||"",!0,!1,!!y.autoIncrement,J&&typeof J!="string",!0),C=[],R=0;R{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 v=new WeakRef(d._novip);s.add(v),a.register(d._novip,v,v),s.size>d._options.maxConnections&&(v=s.values().next().value,s.delete(v),a.unregister(v))},remove:function(d){if(d)for(var v=s.values(),y=v.next();!y.done;){var _=y.value;if(_.deref()===d._novip)return s.delete(_),void a.unregister(_);y=v.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 qa(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Fn(ar,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ha(s){return s&&typeof s.databases=="function"}function za(s){return Qn(function(){return Be.letThrough=!0,s()})}function Wa(s){return!("from"in s)}var zt=function(s,a){var u;if(!this)return u=new zt,s&&"d"in s&&m(u,s),u;m(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:q.oldVersion,L=te<1,s.idbdb=V.result,y&&af(s,N),rf(s,te/10,N,W))},W),V.onsuccess=St(function(){N=null;var q,te,Q,re,pe,me,xe=s.idbdb=V.result,we=ae(xe.objectStoreNames);if(0"u"?Me.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(K){function W(){return indexedDB.databases().finally(K)}R=setInterval(W,100),W()}).finally(function(){return clearInterval(R)}):Promise.resolve()).then(C)]).then(function(){return _(),a.onReadyBeingFired=[],Me.resolve(za(function(){return s.on.ready.fire(s.vip)})).then(function K(){var W;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=lt(u,d))===0){if(v&&y)return 0;if(v)return 1;if(y)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,v,y)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=lt(u,d))===0){if(v&&y)return 0;if(v)return-1;if(y)return 1}return u})(s.upper,a.upper,s.upperOpen,a.upperOpen)}function mf(s,a,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var v,y;s.subscribers.delete(u),s.subscribers.size===0&&(v=s,y=a,setTimeout(function(){v.subscribers.size===0&&Ke(y,v)},3e3))})}var hf={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return o(o({},s),{transaction:function(u,d,v){var y,_,C=s.transaction(u,d,v);return d==="readwrite"&&(v=(y=new AbortController).signal,C.addEventListener("abort",(_=function(R){return function(){if(y.abort(),d==="readwrite"){for(var J=new Set,N=0,L=u;N{var te=ks["idb://".concat(W,"/").concat(B)];if(!te)return[];if(!(W=te.queries[V]))return[null,!1,te,null];var Q=W[(q.query?q.query.index.name:null)||""];if(!Q)return[null,!1,te,null];switch(V){case"query":var re=(pe=q.direction)!=null?pe:"next",pe=Q.find(function(me){var xe;return me.req.limit===q.limit&&me.req.values===q.values&&((xe=me.req.direction)!=null?xe:"next")===re&&Xl(me.req.query.range,q.query.range)});return pe?[pe,!0,te,Q]:[Q.find(function(me){var xe;return("limit"in me.req?me.req.limit:1/0)>=q.limit&&((xe=me.req.direction)!=null?xe:"next")===re&&(!q.values||me.req.values)&&vf(me.req.query.range,q.query.range)}),!1,te,Q];case"count":return pe=Q.find(function(me){return Xl(me.req.query.range,q.query.range)}),[pe,!!pe,te,Q]}})(a,u,"query",y),K=L[0],J=L[2],N=L[3],K&&L[1]?K.obsSet=y.obsSet:(L=d.query(y).then(function(W){var B=W.result;if(K&&(K.res=B),_){for(var V=0,q=B.length;V{var pe=Vs();try{y&&Us();var me=Qn(s,re);return me=y?me.finally(Zn):me}finally{pe&&Bs()}})(te={subscr:q,signal:_.signal,requery:K,querier:s,trans:null}),L||(ns.storagemutated.subscribe(B),L=!0),Promise.resolve(Q).then(function(re){u=!0,a=re,C||te.signal.aborted||(W()||(J=q,W())?K():(R={},Ma(function(){return!C&&v.next&&v.next(re)})))},function(re){u=!1,["DatabaseClosedError","AbortError"].includes(re==null?void 0:re.name)||C||Ma(function(){C||v.error&&v.error(re)})}))};return setTimeout(K,0),N});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var Cs=Fn;function si(s){var a=ss;try{ss=!0,ns.storagemutated.fire(s),Xa(s,!0)}finally{ss=a}}O(Cs,o(o({},ke),{delete:function(s){return new Cs(s,{addons:[]}).delete()},exists:function(s){return new Cs(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=Cs.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(Ha(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(v){return v.name}).filter(function(v){return v!==ar})}):qa(u,a).toCollection().primaryKeys()).then(s)}catch{return At(new je.MissingAPI)}var a,u},defineClass:function(){return function(s){m(this,s)}},ignoreTransaction:function(s){return Be.trans?bs(Be.transless||Lt,s):s()},vip:za,async:function(s){return function(){try{var a=Qa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Me.resolve(a)}catch(u){return At(u)}}},spawn:function(s,a,u){try{var d=Qa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Me.resolve(d)}catch(v){return At(v)}},currentTransaction:{get:function(){return Be.trans||null}},waitFor:function(s,a){return s=Me.resolve(typeof s=="function"?Cs.ignoreTransaction(s):s).timeout(a||6e4),Be.trans?Be.trans.waitFor(s):s},Promise:Me,debug:{get:function(){return Le},set:function(s){Se(s)}},derive:H,extend:m,props:O,override:U,Events:po,on:ns,liveQuery:Ql,extendObservabilitySet:br,getByKeyPath:Z,setByKeyPath:z,delByKeyPath:function(s,a){typeof a=="string"?z(s,a,void 0):"length"in a&&[].map.call(a,function(u){z(s,u,void 0)})},shallowClone:ne,deepClone:Ae,getObjectDiff:Za,cmp:lt,asap:D,minKey:-1/0,addons:[],connections:{get:go.toArray},errnames:Ft,dependencies:Cr,cache:ks,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)})})),Cs.maxKey=ho(Cs.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ns(fr,function(s){ss||(s=new CustomEvent(Ra,{detail:s}),ss=!0,dispatchEvent(s),ss=!1)}),addEventListener(Ra,function(s){s=s.detail,ss||si(s)}));var Gs,ss=!1,Zl=function(){};return typeof BroadcastChannel<"u"&&((Zl=function(){(Gs=new BroadcastChannel(Ra)).onmessage=function(s){return s.data&&si(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),ns(fr,function(s){ss||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Fn.disableBfCache&&s.persisted){Le&&console.debug("Dexie: handling persisted pagehide"),Gs!=null&&Gs.close();for(var a=0,u=go.toArray();a{const o={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(r=>{r.category&&o[r.category]&&(r.category=o[r.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let se;function hm(e){se=e}function pl(){se&&se.close(),se=void 0}const ym=6,Bu=["公司","客户现场","出差","居家办公"],gm={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function qo(e){return gm[e]||e}function Io(e){return e<10?"0"+e:String(e)}function Gn(e){return e.getFullYear()+"-"+Io(e.getMonth()+1)+"-"+Io(e.getDate())}function at(){return Gn(new Date)}function ct(){const e=new Date;return Gn(e)+"T"+Io(e.getHours())+":"+Io(e.getMinutes())+":"+Io(e.getSeconds())}function kn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function Ns(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Ot(e,t){const n=Ns(e);return n.setDate(n.getDate()+t),Gn(n)}function Ho(e,t){const n=Ns(e),o=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const r=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,r)),Gn(n)}function Zs(e){const t=Ns(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Gn(t)}function bm(e){const t=Ns(e).getDay();return t===0||t===6}function wm(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function gd(e){const t=Ns(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const _m=15e4;function Ri(e){const t=new Uint8Array(e);let n="";for(let o=0;o({}));if(!r.ok){const c=l&&l.error||"服务返回 "+r.status;throw e==="register"&&r.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!l.userId||!l.username)throw new Error("登录响应异常");return{userId:String(l.userId),username:String(l.username)}}async function yl(e,t,n){const o=await Fm(n,e,t);ra(o.userId);const r={userId:o.userId,username:o.username};return Km(r),xd(o.username,t),r}async function Vm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return yl(n,t,"login")}async function Bm(e,t,n){const o=(e||"").trim();if(o.length<2||o.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return yl(o,t,"register")}async function Um(){const e=pn();if(!e)return null;try{return await yl(e.username,e.password,"login")}catch{return null}}async function qm(){sa(),pl(),oa=null,Cd()}function Hm(){sa(),pl(),oa=null,Cd(),Nm()}async function zm(e,t){if(!Wo())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const o=pn();if(!o||o.password!==e)throw new Error("旧密码不正确");const r=await Fs();let l;try{l=await fetch(r+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+$d()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!l.ok){const c=await l.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+l.status)}xd(o.username,t)}async function Wm(){if(!Wo())throw new Error("未登录");const t=await Fs();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+$d()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const o=await n.json().catch(()=>({}));throw new Error(o&&o.error||"删除失败 "+n.status)}Hm()}function $d(){return $a()}const Fi=P(null),Vi=P(null),uo=P(0);function ls(){uo.value++}const Sd=P(0);function Gm(){Sd.value++}const eo=P(""),ro=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","goal","transaction","plan"],Xs=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Lr(e){return JSON.stringify(e)}async function Ym(e){return se.table(e).toArray()}function Rr(e,t){return e==="setting"?t.key:t.id}async function Jm(){for(const e of ro){const t=se.table(e),n=await t.toArray();for(const o of n){if(e==="setting"&&Xs.has(o.key))continue;const r={};o.uuid||(r.uuid=Xm()),!o.updated_at&&o.created_at&&(r.updated_at=o.created_at),Object.keys(r).length&&await t.update(Rr(e,o),r)}}}function Xm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Qm(){return pn()!=null}async function Zm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function eh(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function Ed(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 o=await n.json();if(!o||!o.token)throw new Error("云端登录异常");return String(o.token)}async function th(e,t){let n=$a();return n||(n=await Ed(e,t),zo(n),n)}async function Td(){const e=pn();if(!e)throw new Error("未登录");const t=await Fs(),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=pn();if(!e)throw new Error("未登录,无法同步");return Md({baseUrl:await Fs(),username:e.username,password:e.password})}async function Ad(){try{await Bi()}catch(e){eo.value=e instanceof Error?e.message:String(e);try{await Bi()}catch{}}}function Pd(e,t,n){const o={};for(const r of Object.keys(t))r!=="id"&&(o[r]=t[r]);if(e==="log_item"){delete o.work_log_id,delete o.project_id;const r=t.work_log_id?n.workLog.get(t.work_log_id):null;r&&r.uuid&&(o.wuuid=r.uuid);const l=t.project_id?n.project.get(t.project_id):null;l&&l.uuid&&(o.puuid=l.uuid)}if(e==="plan"){delete o.goal_id;const r=t.goal_id?n.goal.get(t.goal_id):null;r&&r.uuid&&(o.guuid=r.uuid)}return o}async function Od(){const e=await se.work_log.toArray(),t=await se.project.toArray(),n=await se.goal.toArray();return{workLog:new Map(e.map(o=>[o.id,o])),project:new Map(t.map(o=>[o.id,o])),goal:new Map(n.map(o=>[o.id,o]))}}let jo=!1,Kr=!1,Ui=!1,to=null,An=null,qi="",Hi=!1,Nr=null;async function no(){if(jo){Kr=!0;return}try{if(!await Qm())return;await Md(await nh()),eo.value=""}catch(e){eo.value=e instanceof Error?e.message:String(e)}}async function nh(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Fs(),username:e.username,password:e.password}}function sh(){if(Hi)return;Hi=!0,Nr=vm(async()=>{const t={};for(const n of ro)t[n]=await se.table(n).count();return t}).subscribe({next:()=>{Ui||jo||(to&&globalThis.clearTimeout(to),to=globalThis.setTimeout(()=>{no()},3e3))},error:()=>{}})}function oh(){Nr&&(Nr.unsubscribe(),Nr=null),An&&(An.close(),An=null,qi=""),to&&(globalThis.clearTimeout(to),to=null),Hi=!1}function rh(e,t){const n=e+"|"+t;if(!(An&&qi===n)){An&&(An.close(),An=null);try{An=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),qi=n,An.onmessage=()=>{no()}}catch{An=null}}}async function Md(e){if(jo)return Kr=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};jo=!0,Ui=!0;try{const t=await zi(e);return Kr&&(Kr=!1,globalThis.setTimeout(()=>{no()},800)),t}finally{jo=!1,Ui=!1}}async function zi(e,t=!1){var Z;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Jm();const o=await Od(),r=await se.sync_mirror.toArray(),l=new Map;for(const z of r)l.set(z.table+"|"+z.uuid,z);const c={},f=[];let m=0;for(const z of ro){let ne=await Ym(z);z==="setting"&&(ne=ne.filter(T=>!Xs.has(T.key)));const j=new Map;for(const T of ne)j.set(T.uuid,T);for(const[T,M]of j){const ee=Pd(z,M,o),Ae=Lr(ee),$e=l.get(z+"|"+T);(!$e||$e.hash!==Ae)&&(c[z]=c[z]||[],c[z].push(ee),m++)}for(const[T,M]of l)T.startsWith(z+"|")&&!j.has(M.uuid)&&f.push({table:z,uuid:M.uuid,deleted_at:ct()});c[z]=c[z]||[]}f.push(...ch());const g=await th(n,e),h=z=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+z},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let k=await h(g);if(k.status===401){zo("");const z=await Ed(n,e);zo(z),k=await h(z)}if(!k.ok)throw new Error("同步服务返回 "+k.status);const O=await k.json(),x=String(O.dataEpoch||""),I="dsh_sync_epoch_"+(((Z=pn())==null?void 0:Z.username)||"anon"),H=x?localStorage.getItem(I):null;if(!t&&H&&x&&H!==x)return await se.sync_mirror.clear(),localStorage.setItem(I,x),zi(e,!0);const oe=O.tables||{},ie=O.tombstones||[],ae=ro.reduce((z,ne)=>z+(oe[ne]||[]).length,0),U=r.length-f.length;if(!t&&ae0||S.removed>0||m>0)&&ls(),{pushed:m,pulled:S.changed,removed:S.removed,errors:0,at:D}}function Id(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function ah(){try{const e=localStorage.getItem(Id());if(e)return JSON.parse(e)}catch{}return{}}function ih(e){try{localStorage.setItem(Id(),JSON.stringify(e))}catch{}}async function lh(e,t){const n=ah(),o=new Set(t.map(x=>x.table+"|"+x.uuid)),r=new Map;for(const x of await se.sync_mirror.toArray())r.set(x.table+"|"+x.uuid,x);const l=new Set(Array.from(r.keys()).map(x=>x.split("|")[1]));let c=0,f=0;const m={},g={},h={};for(const x of ro){const I=se.table(x),H=await I.toArray(),oe=new Map(H.map(T=>[Rr(x,T),T])),ie=new Map(H.filter(T=>T.uuid).map(T=>[T.uuid,T])),ae=(e[x]||[]).filter(T=>T&&typeof T=="object"&&T.uuid).filter(T=>!o.has(x+"|"+T.uuid)),U=ae.filter(T=>!(x==="setting"&&Xs.has(T.key))),S=ae.filter(T=>x==="setting"&&Xs.has(T.key));for(const T of S)uh(x,T.uuid);const D=x==="setting"?[]:H.filter(T=>T.uuid&&!l.has(T.uuid)&&!o.has(x+"|"+T.uuid)),Z={v:Math.max(0,...H.map(T=>Number(T.id)||0))};U.length;const z=[];for(const T of U){const M={...T};if(x==="log_item"){const $e=M.wuuid?m[M.wuuid]:void 0;if(!$e)continue;M.work_log_id=$e,delete M.wuuid,M.project_id=M.puuid?g[M.puuid]??null:null,delete M.puuid}if(x==="plan")if(M.guuid){const $e=h[M.guuid];M.goal_id=$e??null,delete M.guuid}else M.goal_id=null;let ee=Rr(x,T);if(x==="setting")ee=T.key;else{const $e=n[x]&&n[x][T.uuid],ye=ie.get(T.uuid);ye&&ye.id!=null?ee=ye.id:typeof $e=="number"?ee=$e:ee=++Z.v}const Ae={...M,id:ee};x==="setting"&&Xs.has(Ae.key)||(z.push(Ae),x==="work_log"&&(m[T.uuid]=ee),x==="project"&&(g[T.uuid]=ee),x==="goal"&&(h[T.uuid]=ee))}const ne=z.concat(D);for(const T of ne){const M=oe.get(Rr(x,T));(!M||Lr(M)!==Lr(T))&&c++}f+=H.filter(T=>T.uuid&&!z.some(M=>M.uuid===T.uuid)&&!o.has(x+"|"+T.uuid)).length,await I.clear(),ne.length&&await I.bulkPut(ne);const j={};for(const T of ne)T.uuid&&(j[T.uuid]=T.id);n[x]=j}ih(n);const k=await Od(),O=[];for(const x of ro){const I=await se.table(x).toArray();for(const H of I)x==="setting"&&Xs.has(H.key)||H.uuid&&O.push({table:x,uuid:H.uuid,hash:Lr(Pd(x,H,k))})}return await se.sync_mirror.clear(),O.length&&await se.sync_mirror.bulkAdd(O.map(x=>({...x}))),await se.tombstone.clear(),{changed:c,removed:f+aa.length}}const aa=[];function uh(e,t){aa.some(n=>n.table===e&&n.uuid===t)||aa.push({table:e,uuid:t,deleted_at:ct()})}function ch(){return aa.splice(0)}const dh=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function dt(){await Ad()}async function $t(e,t){const n=await se.setting.get(e);return n?n.value:t}async function Rt(e,t){await se.setting.put({key:e,value:t}),dh.has(e)||await dt()}async function ms(){const e=await Promise.all([$t("work_start","09:00"),$t("work_end","18:00"),$t("grace_minutes","10"),$t("lunch_minutes","60"),$t("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 fh(){return $t("last_location","")}async function ph(e,t){const n=t.trim();await Rt("last_location",n),n&&await ia(n);let o=!1;const r=await xn(e);r&&r.id?(r.location||"")!==n&&(await se.attendance.update(r.id,{location:n||null}),o=!0):n&&(await se.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:ct()}),o=!0),o&&await dt()}async function gl(){const e=await $t("location_presets","");if(!e)return Bu.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 Bu.slice()}async function jd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Rt("location_presets",JSON.stringify(t))}async function ia(e){const t=e.trim();if(!t)return;const n=await gl();n.includes(t)||await jd([...n,t])}async function ao(e=!1){const t=await se.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function vh(e){await se.project.add({name:e.trim(),archived:0,created_at:ct()}),await dt()}async function mh(e,t){await se.project.update(e,{name:t.trim()}),await dt()}async function hh(e,t){await se.project.update(e,{archived:t?1:0}),await dt()}async function xn(e){return se.attendance.where("date").equals(e).first()}async function Dd(e,t){const n=((t===void 0?await $t("last_location",""):t)||"").trim();let o=!1;const r=await xn(e);if(r&&r.id){if(!r.clock_in_at){const l={clock_in_at:ct()};n&&(l.location=n),await se.attendance.update(r.id,l),o=!0}n&&(await $t("last_location","")!==n&&await Rt("last_location",n),await ia(n)),o&&await dt();return}await se.attendance.add({date:e,clock_in_at:ct(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:ct()}),n&&(await Rt("last_location",n),await ia(n)),await dt()}async function yh(e){const t=await xn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await se.attendance.update(t.id,{clock_out_at:ct()}),await dt())}async function gh(){const e=new Date,t=Gn(e);let n="";if(e.getHours()<4){const o=await xn(Ot(t,-1));o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await se.attendance.update(o.id,{clock_out_at:ct()}),n=o.date)}if(!n){const o=await xn(t);o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await se.attendance.update(o.id,{clock_out_at:ct()}),n=o.date)}if(!n)throw new Error("没有进行中的打卡");return await dt(),n}async function bh(e,t,n,o,r){(r||"").trim()&&await ia(r);const l=await xn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:o||null,location:(r||"").trim()||null,created_at:ct()};l&&l.id?await se.attendance.update(l.id,c):await se.attendance.add(c),await dt()}async function wh(e,t,n){const o=(n||"").trim();if(!o)return;const r=await xn(e);r&&r.id&&(await se.attendance.update(r.id,{[t]:e+"T"+o+":00"}),await dt())}async function Xo(e,t){return se.attendance.where("date").between(e,t,!0,!0).toArray()}async function _h(e,t){const n=await xn(e);if(t){const o={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:ct()};n&&n.id?await se.attendance.update(n.id,o):await se.attendance.add({...o,note:null,location:null})}else n&&n.id&&await se.attendance.update(n.id,{kind:"normal"});await dt()}async function kh(e){const t=await se.work_log.where("date").equals(e).first();return t||{id:await se.work_log.add({date:e,created_at:ct()}),date:e,created_at:ct()}}async function Ch(e){return se.work_log.where("date").equals(e).first()}async function xh(e){const t=await Ch(e);return!t||!t.id?[]:(await se.log_item.where("work_log_id").equals(t.id).toArray()).sort((o,r)=>r.id-o.id)}async function $h(e,t){const n=await se.work_log.where("date").equals(e).first();let o;n&&n.id?o=n:o=await kh(e),await se.table("log_item").add({work_log_id:o.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:ct()});const r=t.project_id?String(t.project_id):"";await $t("last_project","")!==r&&await Rt("last_project",r),await $t("last_category","")!==t.category&&await Rt("last_category",t.category),await dt()}async function bi(e,t){await se.table("log_item").update(e,t),await dt()}async function Sh(e){await se.table("log_item").delete(e),await dt()}async function Qo(e,t){const n=await se.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const o=new Map(n.map(l=>[l.id,l.date]));return(await se.table("log_item").where("work_log_id").anyOf(n.map(l=>l.id)).toArray()).map(l=>({...l,date:o.get(l.work_log_id)||""})).sort((l,c)=>l.date===c.date?l.id-c.id:l.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function Oh(e){const t=ct();await se.plan.add({date:e.date,start_time:e.start_time,end_time:e.end_time,title:e.title.trim(),kind:e.kind.trim()||"其他",note:e.note||null,status:"todo",actual_minutes:0,timer_started_at:null,uuid:"",created_at:t,updated_at:t}),await dt()}async function Mh(e,t){await se.plan.update(e,{...t,updated_at:ct()}),await dt()}async function Ih(e){await se.plan.delete(e),await dt()}async function jh(e,t){const n=await se.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await Sa(e),await se.plan.update(e,{status:t,updated_at:ct()}),await dt())}async function Dh(e){const t=await se.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await Sa(n.id);await se.plan.update(e,{timer_started_at:ct(),updated_at:ct()}),await dt()}async function Sa(e){const t=await se.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 se.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:ct()}),await dt()}const Lh=366;function Rh(e,t){const n=[];let o=e,r=0;for(;o<=t&&rr.status==="done").length,total:o.length})}return t}async function Nh(){return(await se.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await se.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:r.get(c.work_log_id)||""}))}async function Gh(e,t=4){const n=e.trim().toLowerCase();return n?(await se.memo.toArray()).filter(r=>((r.title||"")+" "+(r.content||"")).toLowerCase().includes(n)).sort((r,l)=>r.updated_atn{await Promise.all([se.project.clear(),se.work_log.clear(),o.clear(),se.attendance.clear(),se.weekly_note.clear(),se.setting.clear(),se.memo.clear(),se.credential.clear(),r.clear(),c.clear(),l.clear()]),n.project&&n.project.length&&await se.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await se.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await o.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await se.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await se.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await se.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await se.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await se.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await r.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await l.bulkAdd(n.plan)}),await dt()}const sy=["制度学习","产品学习","打杂","项目实操","售后服务"],oy=["餐饮","交通","住房","通讯","学习","娱乐","其他"],ry=["工资","报销","其他"],Ld="log_categories",Rd="ledger_expense_categories",Kd="ledger_income_categories";function Nd(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const o=n.filter(r=>typeof r=="string"&&r.trim()).map(r=>r.trim());if(o.length)return Array.from(new Set(o))}}catch{}return t.slice()}async function Zo(){return Nd(await $t(Ld,""),sy)}async function ay(e){await Rt(Ld,JSON.stringify(e))}async function la(e){return Nd(await $t(e==="expense"?Rd:Kd,""),e==="expense"?oy:ry)}async function Wi(e,t){await Rt(e==="expense"?Rd:Kd,JSON.stringify(t))}const iy={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},ly={class:"dialog-head"},uy={class:"dialog-title"},cy={key:0,class:"muted dialog-sub"},dy={class:"dialog-body"},fy={class:"form-grid"},py={class:"field span2"},vy={key:0,class:"form-error"},my={class:"field"},hy=["value"],yy={class:"field"},gy=["value"],by={class:"field"},wy={class:"min-chips"},_y=["onClick"],ky={class:"field"},Cy={class:"field span2"},xy={class:"field"},$y={class:"field"},Sy={class:"dialog-btns"},Ey=jt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=P([]);Zo().then(ae=>{n.value=ae});const o=e,r=t,l=P(""),c=P(null),f=P("dev"),m=P(null),g=P(""),h=P(""),k=P(0),O=P(0),x=P(""),I=P(null),H=et(()=>{var S;const ae=o.projects.filter(D=>D.archived!==1),U=(S=o.item)==null?void 0:S.project_id;if(U&&!ae.some(D=>D.id===U)){const D=o.projects.find(z=>z.id===U),Z=ae.slice();return D&&Z.unshift({...D,name:D.name+"(已归档)"}),Z}return ae});function oe(ae){o.open&&ae.key==="Escape"&&r("cancel")}ut(()=>o.open,async ae=>{var U;if(ae){const S=o.item;l.value=(S==null?void 0:S.content)??"",c.value=(S==null?void 0:S.project_id)??null,f.value=(S==null?void 0:S.category)??"dev",m.value=(S==null?void 0:S.minutes)??null,g.value=(S==null?void 0:S.takeaway)??"",h.value=(S==null?void 0:S.remark)??"",k.value=(S==null?void 0:S.is_milestone)??0,O.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",oe),await Ks(),(U=I.value)==null||U.focus()}else window.removeEventListener("keydown",oe)}),hn(()=>window.removeEventListener("keydown",oe)),ut(l,()=>{x.value&&(x.value="")});function ie(){const ae=l.value.trim();if(!ae){x.value="请填写工作内容";return}if(!o.item||!o.item.id){r("save",{id:0,content:ae,project_id:c.value,category:f.value,minutes:m.value&&m.value>0?m.value:null,takeaway:g.value.trim()||null,remark:h.value.trim()||null,is_milestone:k.value,needs_followup:O.value});return}r("save",{id:o.item.id,content:ae,project_id:c.value,category:f.value,minutes:m.value&&m.value>0?m.value:null,takeaway:g.value.trim()||null,remark:h.value.trim()||null,is_milestone:k.value?1:0,needs_followup:O.value?1:0})}return(ae,U)=>($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:U[10]||(U[10]=Nt(S=>r("cancel"),["self"]))},[i("div",iy,[i("div",ly,[i("div",null,[i("div",uy,F(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),A("div",cy,F(e.date),1)):ce("",!0)]),i("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=S=>r("cancel"))},[he(qe,{name:"close",size:16})])]),i("div",dy,[i("div",fy,[i("div",py,[U[11]||(U[11]=i("label",null,"工作内容(必填)",-1)),Ee(i("input",{ref_key:"contentInput",ref:I,class:Ge(["input",{invalid:x.value}]),"onUpdate:modelValue":U[1]||(U[1]=S=>l.value=S),onKeydown:Mt(ie,["enter"])},null,34),[[De,l.value]]),x.value?($(),A("div",vy,F(x.value),1)):ce("",!0)]),i("div",my,[U[13]||(U[13]=i("label",null,"所属项目",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":U[2]||(U[2]=S=>c.value=S)},[U[12]||(U[12]=i("option",{value:null},"无项目",-1)),($(!0),A(Oe,null,st(H.value,S=>($(),A("option",{key:S.id,value:S.id},F(S.name),9,hy))),128))],512),[[Wn,c.value]])]),i("div",yy,[U[14]||(U[14]=i("label",null,"工作分类",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":U[3]||(U[3]=S=>f.value=S)},[($(!0),A(Oe,null,st(n.value,S=>($(),A("option",{key:S,value:S},F(S),9,gy))),128))],512),[[Wn,f.value]])]),i("div",by,[U[15]||(U[15]=i("label",null,"耗时(分钟)",-1)),Ee(i("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":U[4]||(U[4]=S=>m.value=S),placeholder:"选填"},null,512),[[De,m.value,void 0,{number:!0}]]),i("div",wy,[($(),A(Oe,null,st([15,30,60,90,120],S=>i("button",{key:S,type:"button",class:Ge(["min-chip",{on:m.value===S}]),onClick:D=>m.value=m.value===S?null:S},F(S)+"分",11,_y)),64))])]),i("div",ky,[U[16]||(U[16]=i("label",null,"主要收获",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":U[5]||(U[5]=S=>g.value=S),placeholder:"一句话:学到了什么"},null,512),[[De,g.value]])]),i("div",Cy,[U[17]||(U[17]=i("label",null,"备注",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":U[6]||(U[6]=S=>h.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,h.value]])]),i("div",xy,[U[18]||(U[18]=i("label",null,"成果标记",-1)),i("button",{class:Ge(["toggle-btn",{on:k.value===1}]),onClick:U[7]||(U[7]=S=>k.value=k.value===1?0:1)},F(k.value===1?"已标记为成果":"未标记"),3)]),i("div",$y,[U[19]||(U[19]=i("label",null,"待跟进",-1)),i("button",{class:Ge(["toggle-btn",{onwarn:O.value===1}]),onClick:U[8]||(U[8]=S=>O.value=O.value===1?0:1)},F(O.value===1?"需要跟进":"无需跟进"),3)])])]),i("div",Sy,[i("button",{class:"btn btn-sm",onClick:U[9]||(U[9]=S=>r("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:ie},F(e.item?"保存修改":"添加"),1)])])])):ce("",!0)]),_:1})]))}}),Ty=Kt(Ey,[["__scopeId","data-v-91c30038"]]);function Or(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function co(e,t,n,o){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(bm(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return o?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const r=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:o?"进行中":"未完成",makeup:r,workedMinutes:null};const l=Or(kn(e.clock_in_at)),c=Or(kn(e.clock_out_at)),f=Or(n.work_start),m=Or(n.work_end);let g="normal";!r&&l>f+n.grace_minutes?g="late":!r&&c{Fr.value=Fr.value.filter(n=>n.id!==t)},2e3)}function Py(){return Fr}const Oy={class:"day-panel"},My={class:"dp-head"},Iy={class:"dp-date"},jy={class:"card sec"},Dy={class:"att-grid"},Ly={class:"att-cell"},Ry={key:0,class:"edit-row"},Ky={key:1,class:"att-val"},Ny={class:"att-cell"},Fy={key:0,class:"edit-row"},Vy={key:1,class:"att-val"},By={class:"att-cell"},Uy=["list"],qy=["id"],Hy=["value"],zy={class:"att-cell"},Wy={class:"att-val status-val"},Gy={key:0,class:"tag"},Yy={key:1,class:"muted"},Jy={key:0,class:"att-note muted"},Xy={class:"att-actions"},Qy=["disabled"],Zy=["disabled"],eg=["disabled"],tg=["disabled"],ng={key:0,class:"card sec makeup"},sg={class:"form-grid"},og={class:"field"},rg={class:"field"},ag={class:"field span2"},ig=["list"],lg={class:"field span2"},ug={key:0,class:"form-error"},cg={class:"form-footer"},dg={class:"list-sec"},fg={class:"sec-head"},pg={class:"sec-title"},vg={key:0,class:"empty muted"},mg={class:"item-main"},hg={class:"tag"},yg=["onClick"],gg={key:0,class:"muted item-meta"},bg={key:1,class:"muted num item-meta"},wg=["onClick"],_g=["onClick"],kg=["onClick"],Cg=["onClick"],xg={key:0,class:"item-sub"},$g={key:0,class:"muted2"},Sg={key:1,class:"muted"},Eg={key:1,class:"dp-foot muted num"},Tg=jt({__name:"DayPanel",props:{date:{}},setup(e){const t=P([]);Zo().then(b=>{t.value=b});const n=e,o=P(!0),r=P(null),l=P(void 0),c=P([]),f=P([]),m=P(""),g=P([]),h=et(()=>"loc-list-"+n.date),k=et(()=>n.date===at());async function O(){o.value=!0,r.value=await ms(),l.value=await xn(n.date),c.value=await xh(n.date),f.value=await ao(!0),g.value=await gl(),m.value=l.value&&l.value.location||await fh(),o.value=!1}ln(O),ut(()=>n.date,O),ut(uo,()=>{O()});function x(b){if(!b)return"";const p=f.value.find(w=>w.id===b);return p?p.name:"已删除项目"}const I=et(()=>r.value?co(l.value,n.date,r.value,k.value):null),H=et(()=>c.value.reduce((b,p)=>b+(p.minutes||0),0)),oe=P(!1);async function ie(){oe.value||(oe.value=!0,await Dd(n.date,m.value),await O(),ls(),Ne("上班打卡成功"),oe.value=!1)}async function ae(){oe.value||(oe.value=!0,await yh(n.date),await O(),ls(),Ne("下班打卡成功"),oe.value=!1)}async function U(){await ph(n.date,m.value),ls(),Ne("地点已更新")}const S=P(!1),D=et(()=>{var b;return((b=l.value)==null?void 0:b.kind)==="leave"});function Z(){if(l.value&&l.value.clock_in_at){S.value=!0;return}z(!0)}async function z(b){S.value=!1,await _h(n.date,b),await O(),ls(),Ne(b?"已标记为休假":"已取消休假")}const ne=P(null),j=P(""),T=P(null);ut(ne,async b=>{var p;b&&(await Ks(),(p=T.value)==null||p.focus())});function M(b){var w,E;const p=b==="in"?(w=l.value)==null?void 0:w.clock_in_at:(E=l.value)==null?void 0:E.clock_out_at;ne.value=b,j.value=p?kn(p):b==="in"?"09:00":"18:00"}function ee(){ne.value=null}async function Ae(){const b=ne.value;b&&(ne.value=null,j.value&&(await wh(n.date,b==="in"?"clock_in_at":"clock_out_at",j.value),await O(),ls(),Ne("打卡时间已修改")))}const $e=P(!1),ye=P("09:00"),Te=P("18:00"),Ue=P(""),Ke=P(""),Ye=P("");function We(){Ke.value=m.value,Ye.value="",$e.value=!$e.value}async function He(){if(!ye.value||!Te.value){Ye.value="请填写上班与下班时间";return}await bh(n.date,n.date+"T"+ye.value+":00",n.date+"T"+Te.value+":00",Ue.value.trim(),Ke.value),$e.value=!1,Ue.value="",Ye.value="",await O(),ls(),Ne("补卡已保存")}const ke=P(null),fe=P(!1);function Pe(b){ke.value=b,fe.value=!0}function ot(){ke.value=null,fe.value=!0}async function bt(b){b.id?(await bi(b.id,{content:b.content,project_id:b.project_id,category:b.category,minutes:b.minutes,takeaway:b.takeaway,remark:b.remark,is_milestone:b.is_milestone,needs_followup:b.needs_followup}),Ne("记录已更新")):(await $h(n.date,{content:b.content,project_id:b.project_id,category:b.category,minutes:b.minutes,takeaway:b.takeaway,remark:b.remark}),Ne("记录已添加")),ke.value=null,fe.value=!1,await O()}async function kt(b){await bi(b.id,{is_milestone:b.is_milestone?0:1}),await O()}async function Ft(b){await bi(b.id,{needs_followup:b.needs_followup?0:1}),await O()}const yt=P(null);async function je(){yt.value&&yt.value.id&&await Sh(yt.value.id),yt.value=null,await O(),Ne("记录已删除")}return(b,p)=>($(),A("div",Oy,[i("div",My,[i("div",Iy,F(Ht(gd)(e.date)),1)]),i("div",jy,[p[19]||(p[19]=i("div",{class:"sec-title"},"出勤信息",-1)),i("div",Dy,[i("div",Ly,[p[15]||(p[15]=i("label",null,"上班时间",-1)),ne.value==="in"?($(),A("div",Ry,[Ee(i("input",{ref_key:"timeInput",ref:T,type:"time",class:"input time-input","onUpdate:modelValue":p[0]||(p[0]=w=>j.value=w),onKeydown:[Mt(Ae,["enter"]),Mt(ee,["esc"])]},null,544),[[De,j.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:Ae},"确认"),i("button",{class:"btn btn-sm",onClick:ee},"取消")])):($(),A("div",Ky,[i("span",{class:Ge(["num",{"val-empty":!(l.value&&l.value.clock_in_at)}])},F(l.value&&l.value.clock_in_at?Ht(kn)(l.value.clock_in_at):"未打卡"),3),l.value&&l.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:p[1]||(p[1]=w=>M("in"))},[he(qe,{name:"edit",size:13})])):ce("",!0)]))]),i("div",Ny,[p[16]||(p[16]=i("label",null,"下班时间",-1)),ne.value==="out"?($(),A("div",Fy,[Ee(i("input",{ref_key:"timeInput",ref:T,type:"time",class:"input time-input","onUpdate:modelValue":p[2]||(p[2]=w=>j.value=w),onKeydown:[Mt(Ae,["enter"]),Mt(ee,["esc"])]},null,544),[[De,j.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:Ae},"确认"),i("button",{class:"btn btn-sm",onClick:ee},"取消")])):($(),A("div",Vy,[i("span",{class:Ge(["num",{"val-empty":!(l.value&&l.value.clock_out_at)}])},F(l.value&&l.value.clock_out_at?Ht(kn)(l.value.clock_out_at):"未打卡"),3),l.value&&l.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:p[3]||(p[3]=w=>M("out"))},[he(qe,{name:"edit",size:13})])):ce("",!0)]))]),i("div",By,[p[17]||(p[17]=i("label",null,"上班地点",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":p[4]||(p[4]=w=>m.value=w),list:h.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:U},null,40,Uy),[[De,m.value]]),i("datalist",{id:h.value},[($(!0),A(Oe,null,st(g.value,w=>($(),A("option",{key:w,value:w},null,8,Hy))),128))],8,qy)]),i("div",zy,[p[18]||(p[18]=i("label",null,"考勤状态",-1)),i("div",Wy,[I.value?($(),A(Oe,{key:0},[i("span",{class:Ge(["dot",I.value.status])},null,2),i("span",null,F(I.value.label),1),l.value&&l.value.kind==="makeup"?($(),A("span",Gy,"补卡")):ce("",!0)],64)):($(),A("span",Yy,"--"))])])]),l.value&&l.value.note?($(),A("div",Jy,"补卡说明:"+F(l.value.note),1)):ce("",!0),i("div",Xy,[k.value&&(!l.value||!l.value.clock_in_at)?($(),A("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ie},"上班打卡",8,Qy)):k.value&&l.value&&l.value.clock_in_at&&!l.value.clock_out_at?($(),A("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ae},"下班打卡",8,Zy)):ce("",!0),!k.value&&(!l.value||!l.value.clock_in_at)?($(),A("button",{key:2,class:"btn btn-sm",onClick:We},"补卡")):ce("",!0),D.value?($(),A("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:p[5]||(p[5]=w=>z(!1))},"取消休假",8,tg)):($(),A("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:Z},"标记休假",8,eg))])]),$e.value?($(),A("div",ng,[p[24]||(p[24]=i("div",{class:"sec-title"},"补卡登记",-1)),i("div",sg,[i("div",og,[p[20]||(p[20]=i("label",null,"上班时间",-1)),Ee(i("input",{type:"time",class:"input","onUpdate:modelValue":p[6]||(p[6]=w=>ye.value=w)},null,512),[[De,ye.value]])]),i("div",rg,[p[21]||(p[21]=i("label",null,"下班时间",-1)),Ee(i("input",{type:"time",class:"input","onUpdate:modelValue":p[7]||(p[7]=w=>Te.value=w)},null,512),[[De,Te.value]])]),i("div",ag,[p[22]||(p[22]=i("label",null,"上班地点",-1)),Ee(i("input",{class:"input",list:h.value,"onUpdate:modelValue":p[8]||(p[8]=w=>Ke.value=w),placeholder:"可直接输入"},null,8,ig),[[De,Ke.value]])]),i("div",lg,[p[23]||(p[23]=i("label",null,"补卡原因",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":p[9]||(p[9]=w=>Ue.value=w),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,Ue.value]])])]),Ye.value?($(),A("div",ug,F(Ye.value),1)):ce("",!0),i("div",cg,[i("button",{class:"btn btn-sm",onClick:p[10]||(p[10]=w=>$e.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:He},"保存补卡")])])):ce("",!0),i("div",dg,[i("div",fg,[i("span",pg,"工作记录("+F(c.value.length)+")",1),i("button",{class:"btn btn-primary btn-sm",onClick:ot},[he(qe,{name:"plus",size:14}),p[25]||(p[25]=_t(" 添加记录",-1))])]),!c.value.length&&!o.value?($(),A("div",vg,"暂无记录")):ce("",!0),($(!0),A(Oe,null,st(c.value,w=>($(),A("div",{key:w.id,class:"item"},[i("div",mg,[i("span",hg,F(Ht(qo)(w.category)),1),i("span",{class:"item-content",title:"点击编辑",onClick:E=>Pe(w)},F(w.content),9,yg),w.project_id?($(),A("span",gg,F(x(w.project_id)),1)):ce("",!0),w.minutes?($(),A("span",bg,F(w.minutes)+" 分钟",1)):ce("",!0),p[26]||(p[26]=i("span",{class:"flex1"},null,-1)),i("button",{class:"icon-btn",title:"编辑完整信息",onClick:E=>Pe(w)},[he(qe,{name:"edit",size:14})],8,wg),i("button",{class:Ge(["icon-btn",{active:w.is_milestone===1}]),title:"成果标记",onClick:E=>kt(w)},[he(qe,{name:"star",size:14})],10,_g),i("button",{class:Ge(["icon-btn",{"active-warn":w.needs_followup===1}]),title:"待跟进",onClick:E=>Ft(w)},[he(qe,{name:"flag",size:14})],10,kg),i("button",{class:"icon-btn",title:"删除",onClick:E=>yt.value=w},[he(qe,{name:"close",size:14})],8,Cg)]),w.takeaway||w.remark?($(),A("div",xg,[w.takeaway?($(),A("div",$g,"收获:"+F(w.takeaway),1)):ce("",!0),w.remark?($(),A("div",Sg,"备注:"+F(w.remark),1)):ce("",!0)])):ce("",!0)]))),128)),c.value.length?($(),A("div",Eg,[_t(" 共 "+F(c.value.length)+" 条事项 ",1),H.value?($(),A(Oe,{key:0},[_t(" · "+F((H.value/60).toFixed(1))+" 小时",1)],64)):ce("",!0)])):ce("",!0)]),he(_n,{open:!!yt.value,title:"删除确认",message:yt.value?"将删除工作记录「"+yt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:p[11]||(p[11]=w=>yt.value=null),onConfirm:je},null,8,["open","message"]),he(_n,{open:S.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:p[12]||(p[12]=w=>S.value=!1),onConfirm:p[13]||(p[13]=w=>z(!0))},null,8,["open"]),he(Ty,{open:fe.value,item:ke.value,projects:f.value,date:e.date,onCancel:p[14]||(p[14]=w=>fe.value=!1),onSave:bt},null,8,["open","item","projects","date"])]))}}),Fd=Kt(Tg,[["__scopeId","data-v-81276f4c"]]),Ag={class:"cal-page"},Pg={class:"cal-toolbar"},Og={class:"cal-title num"},Mg=["disabled"],Ig={class:"card cal-card"},jg={class:"cal-head"},Dg={class:"cal-grid"},Lg=["title","onClick"],Rg={class:"cal-marks"},Kg={key:0,class:"drawer"},Ng={class:"drawer-head"},Fg={class:"drawer-body"},Vg=jt({__name:"CalendarView",setup(e){const t=P(at()),n=et(()=>Number(t.value.slice(0,4))),o=et(()=>Number(t.value.slice(5,7))-1),r=et(()=>n.value+" 年 "+(o.value+1)+" 月"),l=["一","二","三","四","五","六","日"],c=et(()=>{const S=(new Date(n.value,o.value,1).getDay()+6)%7,D=new Date(n.value,o.value+1,0).getDate(),Z=[];for(let z=0;z[M.date,M])),ne=D[2],j=new Map;for(const M of c.value){if(!M.inMonth)continue;const ee=co(z.get(M.date),M.date,Z,M.date===m),Ae=ne.filter($e=>$e.date===M.date);j.set(M.date,{status:ee.status,label:ee.label,location:((T=z.get(M.date))==null?void 0:T.location)||"",hasLog:Ae.length>0,hasMilestone:Ae.some($e=>$e.is_milestone===1)})}f.value=j}ut([n,o],g,{immediate:!0}),ut(uo,()=>{g()});function h(U){var S;return((S=f.value.get(U))==null?void 0:S.status)??""}function k(U){const S=f.value.get(U);return S?U+" · "+S.label+(S.location?" · "+S.location:""):U}function O(U){var S;return!!((S=f.value.get(U))!=null&&S.hasLog)}function x(U){var S;return!!((S=f.value.get(U))!=null&&S.hasMilestone)}function I(){t.value=Ho(t.value,-1)}function H(){t.value=Ho(t.value,1)}function oe(){t.value=at()}const ie=P(null);function ae(U,S){S&&(ie.value=U)}return ut(Fi,U=>{U&&(t.value=U,ie.value=U,Fi.value=null)},{immediate:!0}),(U,S)=>($(),A("div",Ag,[i("div",Pg,[i("button",{class:"icon-btn",title:"上一月",onClick:I},[he(qe,{name:"chevron-left",size:16})]),i("span",Og,F(r.value),1),i("button",{class:"icon-btn",title:"下一月",onClick:H},[he(qe,{name:"chevron-right",size:16})]),i("button",{class:"btn btn-sm",disabled:t.value===Ht(m),onClick:oe},"回到本月",8,Mg)]),i("div",Ig,[i("div",jg,[($(),A(Oe,null,st(l,D=>i("span",{key:D,class:"cal-week"},F(D),1)),64))]),i("div",Dg,[($(!0),A(Oe,null,st(c.value,(D,Z)=>($(),A("button",{key:Z,class:Ge(["cal-cell",{blank:!D.inMonth,weekend:D.weekend,selected:ie.value===D.date,"is-today":D.date===Ht(m)}]),title:D.inMonth?k(D.date):void 0,onClick:z=>ae(D.date,D.inMonth)},[D.inMonth?($(),A(Oe,{key:0},[i("span",{class:Ge(["daynum num",{today:D.date===Ht(m)}])},F(Number(D.date.slice(8,10))),3),i("span",Rg,[h(D.date)?($(),A("span",{key:0,class:Ge(["dot",h(D.date)])},null,2)):ce("",!0),O(D.date)?($(),gt(qe,{key:1,name:"check-circle",size:12,class:"mark-log"})):ce("",!0),x(D.date)?($(),gt(qe,{key:2,name:"star",size:12,class:"mark-star"})):ce("",!0)])],64)):ce("",!0)],10,Lg))),128))])]),he(Jn,{name:"drawer"},{default:$n(()=>[ie.value?($(),A("aside",Kg,[i("div",Ng,[S[1]||(S[1]=i("span",{class:"drawer-title"},"当日详情",-1)),i("button",{class:"icon-btn",onClick:S[0]||(S[0]=D=>ie.value=null)},[he(qe,{name:"close",size:16})])]),i("div",Fg,[he(Fd,{date:ie.value},null,8,["date"])])])):ce("",!0)]),_:1})]))}}),Bg=Kt(Vg,[["__scopeId","data-v-abd71a5b"]]),Ug="modulepreload",qg=function(e,t){return new URL(e,t).href},qu={},Vd=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));r=Promise.allSettled(n.map(g=>{if(g=qg(g,o),g in qu)return;qu[g]=!0;const h=g.endsWith(".css"),k=h?'[rel="stylesheet"]':"";if(!!o)for(let I=c.length-1;I>=0;I--){const H=c[I];if(H.href===g&&(!h||H.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${k}`))return;const x=document.createElement("link");if(x.rel=h?"stylesheet":Ug,h||(x.as="script"),x.crossOrigin="",x.href=g,m&&x.setAttribute("nonce",m),document.head.appendChild(x),h)return new Promise((I,H)=>{x.addEventListener("load",I),x.addEventListener("error",()=>H(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return r.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const Hg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},o=(l,c)=>{n.platforms.set(l,c)},r=l=>{n.platforms.has(l)&&(n.currentPlatform=n.platforms.get(l))};return n.addPlatform=o,n.setPlatform=r,n},zg=e=>e.CapacitorPlatforms=Hg(e),Bd=zg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Bd.addPlatform;Bd.setPlatform;var io;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(io||(io={}));class wi extends Error{constructor(t,n,o){super(t),this.message=t,this.code=n,this.data=o}}const Wg=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"},Gg=e=>{var t,n,o,r,l;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},m=f.Plugins=f.Plugins||{},g=e.CapacitorPlatforms,h=()=>c!==null?c.name:Wg(e),k=((t=g==null?void 0:g.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||h,O=()=>k()!=="web",x=((n=g==null?void 0:g.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||O,I=z=>{const ne=S.get(z);return!!(ne!=null&&ne.platforms.has(k())||ie(z))},H=((o=g==null?void 0:g.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||I,oe=z=>{var ne;return(ne=f.PluginHeaders)===null||ne===void 0?void 0:ne.find(j=>j.name===z)},ie=((r=g==null?void 0:g.currentPlatform)===null||r===void 0?void 0:r.getPluginHeader)||oe,ae=z=>e.console.error(z),U=(z,ne,j)=>Promise.reject(`${j} does not have an implementation of "${ne}".`),S=new Map,D=(z,ne={})=>{const j=S.get(z);if(j)return console.warn(`Capacitor plugin "${z}" already registered. Cannot register plugins twice.`),j.proxy;const T=k(),M=ie(z);let ee;const Ae=async()=>(!ee&&T in ne?ee=typeof ne[T]=="function"?ee=await ne[T]():ee=ne[T]:c!==null&&!ee&&"web"in ne&&(ee=typeof ne.web=="function"?ee=await ne.web():ee=ne.web),ee),$e=(We,He)=>{var ke,fe;if(M){const Pe=M==null?void 0:M.methods.find(ot=>He===ot.name);if(Pe)return Pe.rtype==="promise"?ot=>f.nativePromise(z,He.toString(),ot):(ot,bt)=>f.nativeCallback(z,He.toString(),ot,bt);if(We)return(ke=We[He])===null||ke===void 0?void 0:ke.bind(We)}else{if(We)return(fe=We[He])===null||fe===void 0?void 0:fe.bind(We);throw new wi(`"${z}" plugin is not implemented on ${T}`,io.Unimplemented)}},ye=We=>{let He;const ke=(...fe)=>{const Pe=Ae().then(ot=>{const bt=$e(ot,We);if(bt){const kt=bt(...fe);return He=kt==null?void 0:kt.remove,kt}else throw new wi(`"${z}.${We}()" is not implemented on ${T}`,io.Unimplemented)});return We==="addListener"&&(Pe.remove=async()=>He()),Pe};return ke.toString=()=>`${We.toString()}() { [capacitor code] }`,Object.defineProperty(ke,"name",{value:We,writable:!1,configurable:!1}),ke},Te=ye("addListener"),Ue=ye("removeListener"),Ke=(We,He)=>{const ke=Te({eventName:We},He),fe=async()=>{const ot=await ke;Ue({eventName:We,callbackId:ot},He)},Pe=new Promise(ot=>ke.then(()=>ot({remove:fe})));return Pe.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await fe()},Pe},Ye=new Proxy({},{get(We,He){switch(He){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return M?Ke:Te;case"removeListener":return Ue;default:return ye(He)}}});return m[z]=Ye,S.set(z,{name:z,proxy:Ye,platforms:new Set([...Object.keys(ne),...M?[T]:[]])}),Ye},Z=((l=g==null?void 0:g.currentPlatform)===null||l===void 0?void 0:l.registerPlugin)||D;return f.convertFileSrc||(f.convertFileSrc=z=>z),f.getPlatform=k,f.handleError=ae,f.isNativePlatform=x,f.isPluginAvailable=H,f.pluginMethodNoop=U,f.registerPlugin=Z,f.Exception=wi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Yg=e=>e.Capacitor=Gg(e),lo=Yg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ud=lo.registerPlugin;lo.Plugins;class qd{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 o=!1;this.listeners[t]||(this.listeners[t]=[],o=!0),this.listeners[t].push(n);const l=this.windowListeners[t];l&&!l.registered&&this.addWindowListener(l),o&&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,o){const r=this.listeners[t];if(!r){if(o){let l=this.retainedEventArguments[t];l||(l=[]),l.push(n),this.retainedEventArguments[t]=l}return}r.forEach(l=>l(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:o=>{this.notifyListeners(n,o)}}}unimplemented(t="not implemented"){return new lo.Exception(t,io.Unimplemented)}unavailable(t="not available"){return new lo.Exception(t,io.Unavailable)}async removeListener(t,n){const o=this.listeners[t];if(!o)return;const r=o.indexOf(n);this.listeners[t].splice(r,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(o=>{this.notifyListeners(t,o)}))}}const Hu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),zu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Jg extends qd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(o=>{if(o.length<=0)return;let[r,l]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=zu(r).trim(),l=zu(l).trim(),n[r]=l}),n}async setCookie(t){try{const n=Hu(t.key),o=Hu(t.value),r=`; expires=${(t.expires||"").replace("expires=","")}`,l=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${o||""}${r}; path=${l}; ${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)}}}Ud("CapacitorCookies",{web:()=>new Jg});const Xg=async e=>new Promise((t,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;t(r.indexOf(",")>=0?r.split(",")[1]:r)},o.onerror=r=>n(r),o.readAsDataURL(e)}),Qg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(r=>r.toLocaleLowerCase()).reduce((r,l,c)=>(r[l]=e[t[c]],r),{})},Zg=(e,t=!0)=>e?Object.entries(e).reduce((o,r)=>{const[l,c]=r;let f,m;return Array.isArray(c)?(m="",c.forEach(g=>{f=t?encodeURIComponent(g):g,m+=`${l}=${f}&`}),m.slice(0,-1)):(f=t?encodeURIComponent(c):c,m=`${l}=${f}`),`${o}&${m}`},"").substr(1):null,eb=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=Qg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const l=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))l.set(c,f);n.body=l.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const l=new FormData;if(e.data instanceof FormData)e.data.forEach((f,m)=>{l.append(m,f)});else for(const f of Object.keys(e.data))l.append(f,e.data[f]);n.body=l;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(r.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class tb extends qd{async request(t){const n=eb(t,t.webFetchExtra),o=Zg(t.params,t.shouldEncodeUrlParams),r=o?`${t.url}?${o}`:t.url,l=await fetch(r,n),c=l.headers.get("content-type")||"";let{responseType:f="text"}=l.ok?t:{};c.includes("application/json")&&(f="json");let m,g;switch(f){case"arraybuffer":case"blob":g=await l.blob(),m=await Xg(g);break;case"json":m=await l.json();break;case"document":case"text":default:m=await l.text()}const h={};return l.headers.forEach((k,O)=>{h[O]=k}),{data:m,headers:h,status:l.status,url:l.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"}))}}Ud("CapacitorHttp",{web:()=>new tb});async function Ea(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(lo.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:m}=await Vd(async()=>{const{Filesystem:g,Directory:h,Encoding:k}=await import("./index-D9aBzCwh.js");return{Filesystem:g,Directory:h,Encoding:k}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:m.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:m.UTF8,recursive:!0})).uri}}const o=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(o),l=document.createElement("a");return l.href=r,l.download=e,l.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e4),""}const nb=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Ea},Symbol.toStringTag,{value:"Module"})),sb={class:"detail-page"},ob={class:"card toolbar"},rb={class:"nav-row"},ab=["value"],ib=["disabled"],lb={class:"exp-row"},ub={class:"seg"},cb=["disabled"],db=jt({__name:"TodayView",setup(e){const t=P(at()),n=et(()=>t.value===at());function o(){t.value=Ot(t.value,-1)}function r(){t.value=Ot(t.value,1)}function l(){t.value=at()}const c=P("day"),f=P(at()),m=P(at()),g=P(!1);function h(){if(c.value==="day")return{start:t.value,end:t.value,label:t.value};if(c.value==="week"){const x=Zs(f.value);return{start:x,end:Ot(x,6),label:x+"_"+Ot(x,6)}}if(c.value==="month"){const x=f.value.slice(0,4),I=f.value.slice(5,7),H=new Date(Number(x),Number(I),0).getDate();return{start:x+"-"+I+"-01",end:x+"-"+I+"-"+H,label:x+"-"+I}}return{start:f.value,end:m.value,label:f.value+"_"+m.value}}async function k(){if(!g.value){g.value=!0;try{const{start:x,end:I,label:H}=h(),[oe,ie,ae,U]=await Promise.all([ms(),Xo(x,I),Qo(x,I),ao(!0)]),S=new Map(U.map(j=>[j.id,j.name])),D=["# 工作详情 "+H,""],Z=["周日","周一","周二","周三","周四","周五","周六"];let z=x,ne=0;for(;z<=I&&ne<400;){const j=ae.filter(M=>M.date===z),T=ie.find(M=>M.date===z);if(T||j.length){if(D.push("## "+z+" "+Z[new Date(z+"T00:00:00").getDay()],""),T&&(T.clock_in_at||T.kind==="makeup")){const M=co(T,z,oe,z===at()),ee=[kn(T.clock_in_at),"–",kn(T.clock_out_at),"·",M.label];T.location&&ee.push("· 地点:"+T.location),D.push("考勤:"+ee.join(" "),"")}for(const M of j){const ee=M.project_id&&S.get(M.project_id)||"",Ae="- 【"+qo(M.category)+"】"+M.content+(M.minutes?"("+M.minutes+" 分钟)":"")+(ee?" @"+ee:"");D.push(Ae),M.takeaway&&D.push(" - 收获:"+M.takeaway),M.needs_followup===1&&M.remark?D.push(" - 待跟进:"+M.remark):M.remark&&D.push(" - 备注:"+M.remark)}D.push("")}z=Ot(z,1),ne++}await Ea("工作详情_"+H+".md",D.join(` -`)),Ne("已导出 Markdown")}finally{g.value=!1}}}function O(x){const I=x.target.value;I&&(t.value=I)}return ut(t,x=>{f.value=x,c.value==="custom"&&(m.value=x)}),(x,I)=>($(),A("div",sb,[i("div",ob,[i("div",rb,[i("button",{class:"icon-btn",title:"前一天",onClick:o},[he(qe,{name:"chevron-left",size:16})]),i("span",{class:Ge(["date-title num",{"is-today":n.value}])},F(Ht(gd)(t.value)),3),i("button",{class:"icon-btn",title:"后一天",onClick:r},[he(qe,{name:"chevron-right",size:16})]),i("input",{type:"date",class:"input w-date",value:t.value,onChange:O},null,40,ab),i("button",{class:"btn btn-sm",disabled:n.value,onClick:l},"回到今天",8,ib)]),I[7]||(I[7]=i("div",{class:"tool-sep"},null,-1)),i("div",lb,[I[6]||(I[6]=i("span",{class:"muted exp-label"},"导出",-1)),i("div",ub,[i("button",{class:Ge(["seg-btn",{active:c.value==="day"}]),onClick:I[0]||(I[0]=H=>c.value="day")},"指定日",2),i("button",{class:Ge(["seg-btn",{active:c.value==="week"}]),onClick:I[1]||(I[1]=H=>c.value="week")},"当周",2),i("button",{class:Ge(["seg-btn",{active:c.value==="month"}]),onClick:I[2]||(I[2]=H=>c.value="month")},"当月",2),i("button",{class:Ge(["seg-btn",{active:c.value==="custom"}]),onClick:I[3]||(I[3]=H=>c.value="custom")},"自定义",2)]),c.value!=="day"?Ee(($(),A("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":I[4]||(I[4]=H=>f.value=H)},null,512)),[[De,f.value]]):ce("",!0),c.value==="custom"?Ee(($(),A("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":I[5]||(I[5]=H=>m.value=H)},null,512)),[[De,m.value]]):ce("",!0),i("button",{class:"btn btn-sm",disabled:g.value,onClick:k},"导出 Markdown",8,cb)])]),he(Fd,{date:t.value},null,8,["date"])]))}}),fb=Kt(db,[["__scopeId","data-v-2bb84c76"]]),pb={class:"plan-page"},vb={class:"blk-head"},mb={key:0,class:"card empty muted"},hb={class:"goal-main"},yb={class:"goal-line"},gb={class:"tag"},bb={class:"goal-name"},wb={class:"muted num goal-range"},_b={class:"goal-bar"},kb={class:"muted num goal-meta"},Cb={class:"goal-ops"},xb=["onClick"],$b=["onClick"],Sb={class:"blk-head day-head"},Eb={class:"blk-head-text"},Tb={class:"muted blk-sub num"},Ab={class:"day-ops"},Pb={class:"card list-card"},Ob={key:0,class:"empty muted"},Mb={class:"pi-time num"},Ib={class:"muted"},jb={class:"pi-main"},Db={class:"pi-title"},Lb={class:"tag"},Rb={key:0,class:"tag tag-goal"},Kb={key:1,class:"state-done"},Nb={key:2,class:"state-skip"},Fb={key:0,class:"muted pi-note"},Vb={class:"muted pi-meta num"},Bb={key:0,class:"timer-live"},Ub={class:"pi-ops"},qb=["onClick"],Hb=["onClick"],zb=["onClick"],Wb=["onClick"],Gb=["onClick"],Yb=["onClick"],Jb={class:"dialog",role:"dialog","aria-label":"计划"},Xb={class:"dialog-head"},Qb={class:"dialog-title"},Zb={class:"dialog-body"},ew={class:"form-row"},tw={class:"form-row"},nw=["value"],sw={class:"form-row two"},ow={class:"form-row"},rw={key:0,class:"form-error"},aw={class:"dialog-btns"},iw={class:"dialog",role:"dialog","aria-label":"长期计划"},lw={class:"dialog-head"},uw={class:"dialog-title"},cw={class:"dialog-body"},dw={class:"form-row"},fw={class:"form-row"},pw=["value"],vw={class:"form-row two"},mw={class:"form-row"},hw={key:0,class:"form-error"},yw={class:"dialog-btns"},gw=jt({__name:"PlanView",setup(e){const t=P([]),n=P({}),o=P(!1),r=P(null),l=P(""),c=P("学习"),f=P(at()),m=P(Ot(at(),6)),g=P(""),h=P(""),k=P(null);function O(){r.value=null,l.value="",c.value="学习",f.value=at(),m.value=Ot(at(),6),g.value="",h.value="",o.value=!0}function x(p){r.value=p,l.value=p.title,c.value=p.kind,f.value=p.start_date,m.value=p.end_date,g.value=p.note||"",h.value="",o.value=!0}async function I(){if(!l.value.trim()){h.value="请填写计划名称";return}if(m.valueoe.value===at());async function Z(){ae.value=!0;const[p,w,E]=await Promise.all([Ah(oe.value),Nh(),Kh()]);ie.value=p,t.value=w;const X={};for(const G of E)X[String(G.goalId)]={done:G.done,total:G.total};n.value=X,ae.value=!1}ut(oe,Z),ut(uo,Z),ln(()=>{Z(),S=window.setInterval(()=>{U.value=Date.now()},3e4)}),hn(()=>{S&&window.clearInterval(S)});function z(){oe.value=Ot(oe.value,-1)}function ne(){oe.value=Ot(oe.value,1)}function j(){oe.value=at()}const T=et(()=>{const p=ie.value.length,w=ie.value.filter(be=>be.status==="done").length,E=ie.value.reduce((be,_e)=>be+M(_e),0),X=ie.value.reduce((be,_e)=>be+(_e.actual_minutes||0),0);let G=0;const ge=Ae.value;if(ge){const be=ie.value.find(_e=>_e.id===ge);be&&(G=$e(be))}return{total:p,done:w,plannedMin:E,actualMin:X+G}});function M(p){const[w,E]=p.start_time.split(":").map(Number),[X,G]=p.end_time.split(":").map(Number);return Math.max(0,X*60+G-(w*60+E))}function ee(p){return p<60?p+" 分钟":Math.floor(p/60)+" 小时 "+p%60+" 分"}const Ae=et(()=>{const p=ie.value.find(w=>!!w.timer_started_at);return p?p.id:null});function $e(p){if(!p.timer_started_at)return p.actual_minutes||0;const w=Math.max(0,Math.round((U.value-new Date(p.timer_started_at).getTime())/6e4));return(p.actual_minutes||0)+w}async function ye(p){p.timer_started_at?(await Sa(p.id),Ne("已停止计时:"+p.title)):(await Dh(p.id),Ne("开始计时:"+p.title)),Gm(),await Z()}async function Te(p,w){await jh(p.id,w),await Z()}const Ue=P(!1),Ke=P(null),Ye=P(""),We=P("学习"),He=P("09:00"),ke=P("10:00"),fe=P(""),Pe=P(""),ot=["学习","健身","自律","工作","阅读","其他"];function bt(){Ke.value=null,Ye.value="",We.value="学习",He.value="09:00",ke.value="10:00",fe.value="",Pe.value="",Ue.value=!0}function kt(p){Ke.value=p.id,Ye.value=p.title,We.value=p.kind,He.value=p.start_time,ke.value=p.end_time,fe.value=p.note||"",Pe.value="",Ue.value=!0}async function Ft(){if(!Ye.value.trim()){Pe.value="请填写计划内容";return}if(ke.value<=He.value){Pe.value="结束时间需晚于开始时间";return}Ke.value?(await Mh(Ke.value,{title:Ye.value.trim(),kind:We.value,start_time:He.value,end_time:ke.value,note:fe.value}),Ne("计划已更新")):(await Oh({date:oe.value,start_time:He.value,end_time:ke.value,title:Ye.value,kind:We.value,note:fe.value}),Ne("计划已添加")),Ue.value=!1,await Z()}async function yt(p){await Ih(p.id),Ne("已删除"),await Z()}const je=["周日","周一","周二","周三","周四","周五","周六"];function b(p){return je[Ns(p).getDay()]}return(p,w)=>($(),A("div",pb,[i("div",vb,[w[18]||(w[18]=i("div",{class:"blk-head-text"},[i("div",{class:"blk-title"},"长期计划"),i("div",{class:"muted blk-sub"},"跨越多天的目标,自动落实到每一天")],-1)),i("button",{class:"btn btn-sm",onClick:O},[he(qe,{name:"plus",size:14}),w[17]||(w[17]=_t(" 新建长期计划",-1))])]),t.value.length?ce("",!0):($(),A("div",mb," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),A(Oe,null,st(t.value,E=>($(),A("div",{key:E.id,class:"card goal-card"},[i("div",hb,[i("div",yb,[i("span",gb,F(E.kind),1),i("span",bb,F(E.title),1),i("span",wb,F(E.start_date.slice(5))+" ~ "+F(E.end_date.slice(5)),1)]),i("div",_b,[i("span",{class:"goal-bar-fill",style:zn({width:(n.value[String(E.id)]?Math.round(n.value[String(E.id)].done/Math.max(1,n.value[String(E.id)].total)*100):0)+"%",background:n.value[String(E.id)]&&n.value[String(E.id)].done>=n.value[String(E.id)].total&&n.value[String(E.id)].total>0?"var(--ok)":"var(--accent)"})},null,4)]),i("div",kb,[_t(F(n.value[String(E.id)]?n.value[String(E.id)].done+"/"+n.value[String(E.id)].total+" 天已完成":"0/"+(n.value[String(E.id)]?n.value[String(E.id)].total:0)+" 天")+" ",1),E.note?($(),A(Oe,{key:0},[_t(" · "+F(E.note),1)],64)):ce("",!0)])]),i("div",Cb,[i("button",{class:"icon-btn",title:"编辑",onClick:X=>x(E)},[he(qe,{name:"edit",size:14})],8,xb),i("button",{class:"icon-btn",title:"删除",onClick:X=>k.value=E},[he(qe,{name:"close",size:14})],8,$b)])]))),128)),i("div",Sb,[i("div",Eb,[w[21]||(w[21]=i("div",{class:"blk-title"},"每日安排",-1)),i("div",Tb,[_t(" 共 "+F(T.value.total)+" 项 · 完成 "+F(T.value.done)+" 项 · 计划 "+F(ee(T.value.plannedMin))+" · 实际投入 "+F(ee(T.value.actualMin))+" ",1),Ae.value?($(),A(Oe,{key:0},[w[19]||(w[19]=_t(" · ",-1)),w[20]||(w[20]=i("span",{class:"timer-live"},"计时中",-1))],64)):ce("",!0)])]),i("div",Ab,[i("button",{class:"icon-btn",title:"前一天",onClick:z},[he(qe,{name:"chevron-left",size:16})]),i("span",{class:Ge(["date-chip num",{today:D.value}])},F(oe.value.slice(5))+" "+F(b(oe.value)),3),i("button",{class:"icon-btn",title:"后一天",onClick:ne},[he(qe,{name:"chevron-right",size:16})]),i("button",{class:Ge(["btn btn-sm",{"btn-primary":!D.value}]),onClick:j},"今天",2),i("button",{class:"btn btn-primary btn-sm",onClick:bt},[he(qe,{name:"plus",size:14}),w[22]||(w[22]=_t(" 添加计划",-1))])])]),i("div",Pb,[!ae.value&&!ie.value.length?($(),A("div",Ob,"今天还没有计划,点「添加计划」开始规划。")):ce("",!0),($(!0),A(Oe,null,st(ie.value,E=>($(),A("div",{key:E.id,class:Ge(["plan-item",{done:E.status==="done",skip:E.status==="skip",running:!!E.timer_started_at}])},[i("div",Mb,[_t(F(E.start_time),1),i("span",Ib," - "+F(E.end_time),1)]),i("div",jb,[i("div",Db,[i("span",Lb,F(E.kind),1),E.goal_id?($(),A("span",Rb,"长期")):ce("",!0),i("span",{class:Ge(["pi-text",{strike:E.status==="done"}])},F(E.title),3),E.status==="done"?($(),A("span",Kb,"已完成")):E.status==="skip"?($(),A("span",Nb,"已跳过")):ce("",!0)]),E.note?($(),A("div",Fb,F(E.note),1)):ce("",!0),i("div",Vb,[E.timer_started_at?($(),A("span",Bb,"计时中 · 已 "+F($e(E))+" 分钟",1)):E.actual_minutes>0?($(),A(Oe,{key:1},[_t("实际投入 "+F(E.actual_minutes)+" 分钟",1)],64)):ce("",!0)])]),i("div",Ub,[E.status!=="done"?($(),A("button",{key:0,class:Ge(["btn btn-xs",{"timer-on":!!E.timer_started_at}]),onClick:X=>ye(E)},F(E.timer_started_at?"停止计时":"计时"),11,qb)):ce("",!0),E.status!=="done"?($(),A("button",{key:1,class:"btn btn-xs",onClick:X=>Te(E,"done")},"完成",8,Hb)):ce("",!0),E.status==="todo"?($(),A("button",{key:2,class:"btn btn-xs",onClick:X=>Te(E,"skip")},"跳过",8,zb)):ce("",!0),E.status!=="todo"?($(),A("button",{key:3,class:"btn btn-xs",onClick:X=>Te(E,"todo")},"恢复",8,Wb)):ce("",!0),i("button",{class:"icon-btn",title:"编辑",onClick:X=>kt(E)},[he(qe,{name:"edit",size:14})],8,Gb),i("button",{class:"icon-btn",title:"删除",onClick:X=>yt(E)},[he(qe,{name:"close",size:14})],8,Yb)])],2))),128))]),($(),gt(Cn,{to:"body"},[Ue.value?($(),A("div",{key:0,class:"mask",onClick:w[7]||(w[7]=Nt(E=>Ue.value=!1,["self"]))},[i("div",Jb,[i("div",Xb,[i("span",Qb,F(Ke.value?"编辑计划":"添加计划"),1),i("button",{class:"icon-btn",onClick:w[0]||(w[0]=E=>Ue.value=!1)},[he(qe,{name:"close",size:16})])]),i("div",Zb,[i("div",ew,[w[23]||(w[23]=i("label",null,"计划内容(学什么、做什么)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":w[1]||(w[1]=E=>Ye.value=E),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(Ft,["enter"])},null,544),[[De,Ye.value]])]),i("div",tw,[w[24]||(w[24]=i("label",null,"类别",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":w[2]||(w[2]=E=>We.value=E)},[($(),A(Oe,null,st(ot,E=>i("option",{key:E,value:E},F(E),9,nw)),64))],512),[[Wn,We.value]])]),i("div",sw,[i("div",null,[w[25]||(w[25]=i("label",null,"开始时间",-1)),Ee(i("input",{class:"input",type:"time","onUpdate:modelValue":w[3]||(w[3]=E=>He.value=E)},null,512),[[De,He.value]])]),i("div",null,[w[26]||(w[26]=i("label",null,"结束时间",-1)),Ee(i("input",{class:"input",type:"time","onUpdate:modelValue":w[4]||(w[4]=E=>ke.value=E)},null,512),[[De,ke.value]])])]),i("div",ow,[w[27]||(w[27]=i("label",null,"备注(选填)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":w[5]||(w[5]=E=>fe.value=E),placeholder:"目标、资料、提醒等",onKeydown:Mt(Ft,["enter"])},null,544),[[De,fe.value]])]),Pe.value?($(),A("div",rw,F(Pe.value),1)):ce("",!0)]),i("div",aw,[i("button",{class:"btn btn-sm",onClick:w[6]||(w[6]=E=>Ue.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:Ft},F(Ke.value?"保存":"添加"),1)])])])):ce("",!0)])),($(),gt(Cn,{to:"body"},[o.value?($(),A("div",{key:0,class:"mask",onClick:w[15]||(w[15]=Nt(E=>o.value=!1,["self"]))},[i("div",iw,[i("div",lw,[i("span",uw,F(r.value?"编辑长期计划":"新建长期计划"),1),i("button",{class:"icon-btn",onClick:w[8]||(w[8]=E=>o.value=!1)},[he(qe,{name:"close",size:16})])]),i("div",cw,[i("div",dw,[w[28]||(w[28]=i("label",null,"计划名称(落实为每天一条任务)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":w[9]||(w[9]=E=>l.value=E),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[De,l.value]])]),i("div",fw,[w[29]||(w[29]=i("label",null,"类别",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":w[10]||(w[10]=E=>c.value=E)},[($(),A(Oe,null,st(ot,E=>i("option",{key:E,value:E},F(E),9,pw)),64))],512),[[Wn,c.value]])]),i("div",vw,[i("div",null,[w[30]||(w[30]=i("label",null,"开始日期",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":w[11]||(w[11]=E=>f.value=E)},null,512),[[De,f.value]])]),i("div",null,[w[31]||(w[31]=i("label",null,"结束日期",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":w[12]||(w[12]=E=>m.value=E)},null,512),[[De,m.value]])])]),i("div",mw,[w[32]||(w[32]=i("label",null,"备注(选填)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":w[13]||(w[13]=E=>g.value=E)},null,512),[[De,g.value]])]),h.value?($(),A("div",hw,F(h.value),1)):ce("",!0),w[33]||(w[33]=i("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),i("div",yw,[i("button",{class:"btn btn-sm",onClick:w[14]||(w[14]=E=>o.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:I},F(r.value?"保存":"创建"),1)])])])):ce("",!0)])),he(_n,{open:!!k.value,title:"删除长期计划",message:k.value?"将删除「"+k.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:w[16]||(w[16]=E=>k.value=null),onConfirm:H},null,8,["open","message"])]))}}),bw=Kt(gw,[["__scopeId","data-v-ffd19b28"]]),ww={class:"stats"},_w={class:"cards"},kw={class:"card stat-card"},Cw={class:"stat-num num"},xw={class:"card stat-card"},$w={class:"stat-num num"},Sw={class:"card stat-card"},Ew={class:"stat-num num"},Tw={class:"card stat-card"},Aw={class:"stat-num num"},Pw={class:"card section"},Ow={class:"heat"},Mw=["title"],Iw={class:"two-col"},jw={class:"card section"},Dw={class:"bar-label"},Lw={class:"bar-track"},Rw={class:"muted num bar-num"},Kw={key:0,class:"muted"},Nw={class:"card section"},Fw={class:"bar-label"},Vw={class:"bar-track"},Bw={class:"muted num bar-num"},Uw={key:0,class:"muted"},qw={class:"card section"},Hw={class:"bar-label loc-label"},zw={class:"bar-track"},Ww={class:"muted num bar-num"},Gw={key:0,class:"muted"},Yw=jt({__name:"StatsView",setup(e){const t=P({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=P([]),o=P([]),r=P([]),l=P([]);async function c(){const g=at(),h="2000-01-01",k=await Promise.all([ms(),Xo(h,g),Qo(h,g),ao(!0)]),O=k[0],x=k[1],I=k[2],H=k[3],oe=x.filter(ye=>ye.clock_in_at||ye.kind==="makeup");let ie=0;for(const ye of oe){const Te=co(ye,ye.date,O,ye.date===g);ie+=Te.workedMinutes??0}const ae=new Set(I.map(ye=>ye.date));let U=0,S=g;for(ae.has(S)||(S=Ot(g,-1));ae.has(S);)U++,S=Ot(S,-1);t.value={attendDays:oe.length,totalHours:(ie/60).toFixed(1),itemCount:I.length,streak:U};const D=new Map;for(const ye of oe){const Te=ye.location||"未记录";D.set(Te,(D.get(Te)||0)+1)}l.value=Array.from(D.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/(oe.length||1)*100)})).sort((ye,Te)=>Te.count-ye.count);const Z=I.length||1,z=await Zo(),ne=new Map;for(const ye of I)ne.set(ye.category,(ne.get(ye.category)||0)+1);const j=new Set(z);for(const ye of ne.keys())j.has(ye)||z.push(ye);o.value=z.map(ye=>{const Te=ne.get(ye)||0;return{key:ye,label:ye,count:Te,percent:Math.round(Te/Z*100)}}).filter(ye=>ye.count>0).sort((ye,Te)=>Te.count-ye.count);const T=new Map(H.map(ye=>[ye.id,ye.name])),M=new Map;for(const ye of I){const Te=ye.project_id?T.get(ye.project_id)||"已删除项目":"无项目";M.set(Te,(M.get(Te)||0)+1)}r.value=Array.from(M.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/Z*100)})).sort((ye,Te)=>Te.count-ye.count);const ee=new Map;for(const ye of I)ee.set(ye.date,(ee.get(ye.date)||0)+1);const Ae=Zs(g),$e=[];for(let ye=11;ye>=0;ye--){const Te=Ot(Ae,-7*ye),Ue=[];for(let Ke=0;Ke<7;Ke++){const Ye=Ot(Te,Ke);Ue.push({date:Ye,count:ee.get(Ye)||0})}$e.push(Ue)}n.value=$e}ln(async()=>{await c()}),ut(uo,()=>{c()});function f(g){return g===0?0:g===1?1:g<=3?2:g<=5?3:4}function m(g,h){return g+" · "+(h?h+" 条":"无记录")}return(g,h)=>($(),A("div",ww,[i("div",_w,[i("div",kw,[h[0]||(h[0]=i("div",{class:"muted"},"出勤天数",-1)),i("div",Cw,F(t.value.attendDays),1)]),i("div",xw,[h[1]||(h[1]=i("div",{class:"muted"},"累计工时(小时)",-1)),i("div",$w,F(t.value.totalHours),1)]),i("div",Sw,[h[2]||(h[2]=i("div",{class:"muted"},"记录条数",-1)),i("div",Ew,F(t.value.itemCount),1)]),i("div",Tw,[h[3]||(h[3]=i("div",{class:"muted"},"连续记录(天)",-1)),i("div",Aw,F(t.value.streak),1)])]),i("div",Pw,[h[4]||(h[4]=i("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),i("div",Ow,[($(!0),A(Oe,null,st(n.value,(k,O)=>($(),A("div",{key:O,class:"heat-col"},[($(!0),A(Oe,null,st(k,x=>($(),A("span",{key:x.date,class:Ge(["heat-cell","lv"+f(x.count)]),title:m(x.date,x.count)},null,10,Mw))),128))]))),128))]),h[5]||(h[5]=nv('
少多
',1))]),i("div",Iw,[i("div",jw,[h[6]||(h[6]=i("div",{class:"section-title"},"分类分布",-1)),($(!0),A(Oe,null,st(o.value,k=>($(),A("div",{key:k.key,class:"bar-row"},[i("span",Dw,F(k.label),1),i("span",Lw,[i("span",{class:"bar-fill",style:zn({width:k.percent+"%"})},null,4)]),i("span",Rw,F(k.count)+" 条 · "+F(k.percent)+"%",1)]))),128)),o.value.length?ce("",!0):($(),A("div",Kw,"暂无数据"))]),i("div",Nw,[h[7]||(h[7]=i("div",{class:"section-title"},"项目投入",-1)),($(!0),A(Oe,null,st(r.value,k=>($(),A("div",{key:k.name,class:"bar-row"},[i("span",Fw,F(k.name),1),i("span",Vw,[i("span",{class:"bar-fill",style:zn({width:k.percent+"%"})},null,4)]),i("span",Bw,F(k.count)+" 条 · "+F(k.percent)+"%",1)]))),128)),r.value.length?ce("",!0):($(),A("div",Uw,"暂无数据"))])]),i("div",qw,[h[8]||(h[8]=i("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),A(Oe,null,st(l.value,k=>($(),A("div",{key:k.name,class:"bar-row"},[i("span",Hw,F(k.name),1),i("span",zw,[i("span",{class:"bar-fill",style:zn({width:k.percent+"%"})},null,4)]),i("span",Ww,F(k.count)+" 天 · "+F(k.percent)+"%",1)]))),128)),l.value.length?ce("",!0):($(),A("div",Gw,"暂无数据"))])]))}}),Jw=Kt(Yw,[["__scopeId","data-v-5469ae68"]]);async function Xw(e,t,n){const o=at(),r=await Promise.all([ms(),Xo(e,t),Qo(e,t),ao(!0),Th(e,t),Zo()]),l=r[0],c=r[1],f=r[2],m=r[3],g=r[4],h=r[5];let k=0,O=0,x=0;for(const M of c){(M.clock_in_at||M.kind==="makeup")&&k++,M.kind==="makeup"&&x++;const ee=co(M,M.date,l,M.date===o);O+=ee.workedMinutes??0}const I=new Map;for(const M of c){if(!(M.clock_in_at||M.kind==="makeup"))continue;const ee=M.location||"未记录";I.set(ee,(I.get(ee)||0)+1)}const H=Array.from(I.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,ee)=>ee.count-M.count),oe=f.length||1,ie=new Map;for(const M of f)ie.set(M.category,(ie.get(M.category)||0)+1);const ae=new Set(h);for(const M of ie.keys())ae.has(M)||h.push(M);const U=h.map(M=>{const ee=ie.get(M)||0;return{key:M,label:M,count:ee,percent:Math.round(ee/oe*100)}}).filter(M=>M.count>0).sort((M,ee)=>ee.count-M.count),S=new Map(m.map(M=>[M.id,M.name])),D=new Map;for(const M of f){const ee=M.project_id?S.get(M.project_id)||"已删除项目":"无项目";D.set(ee,(D.get(ee)||0)+1)}const Z=Array.from(D.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,ee)=>ee.count-M.count),z=f.filter(M=>M.is_milestone===1).map(M=>({date:M.date,content:M.content})),ne=f.filter(M=>M.needs_followup===1).map(M=>({date:M.date,content:M.content,remark:M.remark||""})),j=f.filter(M=>!!M.takeaway).map(M=>({date:M.date,text:M.takeaway})),T=g.map(M=>({weekStart:M.week_start,highlights:M.highlights||"",challenges:M.challenges||"",plan_next:M.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:k,totalHours:(O/60).toFixed(1),makeupCount:x,leaveCount:c.filter(M=>M.kind==="leave").length,itemCount:f.length,categoryStats:U,projectStats:Z,locationStats:H,milestones:z,followups:ne,takeaways:j,weekNotes:T}}function Qw(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(o=>o.name!=="未记录");n.length&&t.push("其中:"+n.map(o=>o.name+" "+o.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(o=>o.label+" "+o.percent+"%("+o.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(o=>o.name+" "+o.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((o,r)=>t.push(r+1+". 【成果】"+o.content+"("+o.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(o=>t.push("- 【待跟进】"+o.content+(o.remark?"("+o.date+" 备注:"+o.remark+")":"("+o.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(o=>t.push("- "+o.text+"("+o.date+")")):t.push("(无)");for(const o of e.weekNotes)t.push(""),t.push("### 周记("+o.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(o.highlights||"(无)")),t.push("- 踩的坑:"+(o.challenges||"(无)")),t.push("- 下周计划:"+(o.plan_next||"(无)"));return t.push(""),t.join(` -`)}async function Gi(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 Zw(e){const t=await Promise.all([$t("ai_base_url",""),$t("ai_api_key",""),$t("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),o=t[1].trim(),r=t[2].trim();if(!n||!r)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const l=n+"/chat/completions",c={"Content-Type":"application/json"};o&&(c.Authorization="Bearer "+o);const m=JSON.stringify({model:r,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let g;try{g=await fetch(l,{method:"POST",headers:c,body:m})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!g.ok){let O="接口返回 "+g.status;try{const x=await g.json();x&&x.error&&x.error.message&&(O+=":"+x.error.message)}catch{}throw new Error(O)}const h=await g.json(),k=h&&h.choices&&h.choices[0]&&h.choices[0].message&&h.choices[0].message.content;if(!k)throw new Error("接口未返回内容");return String(k)}const e_={class:"report"},t_={class:"report-toolbar"},n_={class:"seg"},s_=["onClick"],o_=["disabled"],r_=["disabled"],a_={key:0,class:"ai-error"},i_={class:"report-grid"},l_={class:"report-left"},u_={class:"card section"},c_={class:"section-title"},d_={class:"muted note-saved"},f_={class:"card section"},p_={class:"report-right"},v_={key:0,class:"card section"},m_={class:"sum-row"},h_={class:"num"},y_={class:"sum-row"},g_={class:"num"},b_={class:"sum-row"},w_={class:"num"},__={class:"sum-row"},k_={class:"num"},C_={class:"sum-row"},x_={class:"num"},$_={class:"muted"},S_={class:"num"},E_={key:0,class:"muted sum-empty"},T_={class:"muted"},A_={key:1,class:"muted sum-empty"},P_={class:"muted"},O_={key:2,class:"muted sum-empty"},M_={class:"muted"},I_={key:3,class:"muted sum-empty"},j_=jt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=P("week"),o=P(Zs(at())),r=P(at()),l=P(null),c=P(""),f=P(!1),m=P(!1),g=P(null),h=P(""),k=P(Zs(at())),O=P(""),x=P(""),I=P(""),H=P(!1);async function oe(){const ne=await bl(k.value);O.value=(ne==null?void 0:ne.highlights)||"",x.value=(ne==null?void 0:ne.challenges)||"",I.value=(ne==null?void 0:ne.plan_next)||"",H.value=!1}async function ie(){await Eh(k.value,{highlights:O.value.trim()||null,challenges:x.value.trim()||null,plan_next:I.value.trim()||null}),H.value=!0,await U()}function ae(ne){const j=at();if(ne==="week"){const T=Zs(j);return{start:T,end:Ot(T,6),label:"本周"}}if(ne==="month"){const T=j.slice(0,7);return{start:T+"-01",end:j,label:T+" 本月"}}return ne==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:o.value,end:r.value,label:o.value+" ~ "+r.value}}async function U(){f.value=!0;const ne=ae(n.value),j=await Xw(ne.start,ne.end,ne.label);l.value=j,c.value=Qw(j),f.value=!1}ut(n,U),ut([o,r],()=>{n.value==="custom"&&U()}),ln(async()=>{await oe(),await U()});async function S(){const ne=at().replace(/-/g,""),j=await Ea("实习工作总结_"+ne+".md",c.value);Ne(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function D(){await Gi(c.value),Ne("总结已复制到剪贴板")}async function Z(){if(m.value)return;h.value="";const ne=c.value.trim();if(!ne){h.value="当前草稿为空,无法润色";return}m.value=!0;try{g.value=c.value,c.value=await Zw(ne),Ne("AI 润色完成")}catch(j){g.value=null,h.value=j instanceof Error?j.message:"润色失败"}m.value=!1}function z(){g.value!==null&&(c.value=g.value),g.value=null}return(ne,j)=>($(),A("div",e_,[i("div",t_,[i("div",n_,[($(),A(Oe,null,st(t,T=>i("button",{key:T.key,class:Ge(["seg-btn",{active:n.value===T.key}]),onClick:M=>n.value=T.key},F(T.label),11,s_)),64))]),n.value==="custom"?($(),A(Oe,{key:0},[Ee(i("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=T=>o.value=T)},null,512),[[De,o.value]]),j[6]||(j[6]=i("span",{class:"muted"},"至",-1)),Ee(i("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=T=>r.value=T)},null,512),[[De,r.value]])],64)):ce("",!0),j[10]||(j[10]=i("span",{class:"flex1"},null,-1)),i("button",{class:"btn btn-sm",disabled:m.value,onClick:Z},[he(qe,{name:"edit",size:14}),j[7]||(j[7]=_t("AI 润色 ",-1))],8,o_),g.value!==null?($(),A("button",{key:1,class:"btn btn-sm",onClick:z},"还原润色前")):ce("",!0),i("button",{class:"btn btn-sm",disabled:f.value,onClick:U},[he(qe,{name:"edit",size:14}),j[8]||(j[8]=_t("重新生成 ",-1))],8,r_),i("button",{class:"btn btn-sm",onClick:D},"复制"),i("button",{class:"btn btn-primary btn-sm",onClick:S},[he(qe,{name:"export",size:14}),j[9]||(j[9]=_t("导出 Markdown ",-1))])]),h.value?($(),A("div",a_,F(h.value),1)):ce("",!0),i("div",i_,[i("div",l_,[i("div",u_,[i("div",c_,"本周周记("+F(k.value)+" 起)",1),j[11]||(j[11]=i("label",{class:"note-label muted"},"本周亮点",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=T=>O.value=T),placeholder:"本周最有价值的一件事",onBlur:ie},null,544),[[De,O.value]]),j[12]||(j[12]=i("label",{class:"note-label muted"},"踩的坑",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=T=>x.value=T),placeholder:"遇到的问题与教训",onBlur:ie},null,544),[[De,x.value]]),j[13]||(j[13]=i("label",{class:"note-label muted"},"下周计划",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=T=>I.value=T),placeholder:"下周准备做什么",onBlur:ie},null,544),[[De,I.value]]),i("div",d_,F(H.value?"已保存":"失焦自动保存"),1)]),i("div",f_,[j[14]||(j[14]=i("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Ee(i("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=T=>c.value=T),spellcheck:"false"},null,512),[[De,c.value]])])]),i("div",p_,[l.value?($(),A("div",v_,[j[20]||(j[20]=i("div",{class:"section-title"},"数据摘要",-1)),i("div",m_,[j[15]||(j[15]=i("span",{class:"muted"},"出勤",-1)),i("span",h_,F(l.value.attendDays)+" 天",1)]),i("div",y_,[j[16]||(j[16]=i("span",{class:"muted"},"工时",-1)),i("span",g_,F(l.value.totalHours)+" 小时",1)]),i("div",b_,[j[17]||(j[17]=i("span",{class:"muted"},"补卡",-1)),i("span",w_,F(l.value.makeupCount)+" 次",1)]),i("div",__,[j[18]||(j[18]=i("span",{class:"muted"},"请假",-1)),i("span",k_,F(l.value.leaveCount)+" 天",1)]),i("div",C_,[j[19]||(j[19]=i("span",{class:"muted"},"记录",-1)),i("span",x_,F(l.value.itemCount)+" 条",1)]),j[21]||(j[21]=i("div",{class:"section-sub"},"分类分布",-1)),($(!0),A(Oe,null,st(l.value.categoryStats,T=>($(),A("div",{key:T.key,class:"sum-row"},[i("span",$_,F(T.label),1),i("span",S_,F(T.count)+" 条 · "+F(T.percent)+"%",1)]))),128)),l.value.categoryStats.length?ce("",!0):($(),A("div",E_,"(无)")),j[22]||(j[22]=i("div",{class:"section-sub"},"主要成果",-1)),($(!0),A(Oe,null,st(l.value.milestones,(T,M)=>($(),A("div",{key:"m"+M,class:"sum-item"},[_t(F(T.content),1),i("span",T_,"("+F(T.date)+")",1)]))),128)),l.value.milestones.length?ce("",!0):($(),A("div",A_,"(无)")),j[23]||(j[23]=i("div",{class:"section-sub"},"待跟进",-1)),($(!0),A(Oe,null,st(l.value.followups,(T,M)=>($(),A("div",{key:"f"+M,class:"sum-item"},[_t(F(T.content),1),i("span",P_,"("+F(T.date)+")",1)]))),128)),l.value.followups.length?ce("",!0):($(),A("div",O_,"(无)")),j[24]||(j[24]=i("div",{class:"section-sub"},"学习与成长",-1)),($(!0),A(Oe,null,st(l.value.takeaways,(T,M)=>($(),A("div",{key:"t"+M,class:"sum-item"},[_t(F(T.text),1),i("span",M_,"("+F(T.date)+")",1)]))),128)),l.value.takeaways.length?ce("",!0):($(),A("div",I_,"(无)"))])):ce("",!0)])])]))}}),D_=Kt(j_,[["__scopeId","data-v-7e1b08ed"]]),L_=["aria-label"],R_={class:"dialog-head"},K_={class:"dialog-title"},N_={class:"dialog-body"},F_={class:"form-grid"},V_={class:"field span2"},B_={class:"seg"},U_={class:"field"},q_={class:"field"},H_={class:"field"},z_=["value"],W_={class:"add-cat"},G_=["onKeydown"],Y_={key:0,class:"field"},J_={class:"seg"},X_={class:"field span2"},Q_={key:0,class:"form-error"},Z_={class:"dialog-btns"},e1=jt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=P("expense"),l=P(""),c=P(""),f=P(""),m=P(""),g=P(!1),h=P(!1),k=P(""),O=P(null);function x(S){n.open&&S.key==="Escape"&&o("cancel")}ut(()=>n.open,async S=>{var D;S?(await H(),r.value=n.initial.type==="income"?"income":"expense",l.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,m.value=n.initial.note,g.value=n.initial.reimbursable===1,h.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",x),await Ks(),(D=O.value)==null||D.focus()):window.removeEventListener("keydown",x)}),hn(()=>window.removeEventListener("keydown",x)),ut(r,async()=>{await H(),l.value=I.value[0]||""});const I=P([]);async function H(){I.value=await la(r.value)}const oe=P("");async function ie(){const S=oe.value.trim();if(S){if(I.value.includes(S)){oe.value="";return}I.value.push(S),await Wi(r.value,I.value),l.value=S,oe.value=""}}function ae(){return l.value&&I.value.includes(l.value)?l.value:I.value[0]}function U(){const S=String(c.value??"").trim(),D=Number(S);if(!S||!isFinite(D)||D<=0){k.value="请填写大于 0 的金额";return}if(!f.value){k.value="请选择日期";return}const Z=r.value==="expense"&&g.value?1:0;o("save",{type:r.value,category:ae(),amount:Math.round(D*100),date:f.value,note:String(m.value??"").trim(),reimbursable:Z,reimbursed:Z&&h.value?1:0})}return(S,D)=>($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:D[12]||(D[12]=Nt(Z=>o("cancel"),["self"]))},[i("div",{class:"dialog",role:"dialog","aria-label":e.title},[i("div",R_,[i("span",K_,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:D[0]||(D[0]=Z=>o("cancel"))},[he(qe,{name:"close",size:16})])]),i("div",N_,[i("div",F_,[i("div",V_,[D[13]||(D[13]=i("label",null,"类型",-1)),i("div",B_,[i("button",{class:Ge(["seg-btn",{active:r.value==="expense"}]),onClick:D[1]||(D[1]=Z=>r.value="expense")},"支出",2),i("button",{class:Ge(["seg-btn",{active:r.value==="income"}]),onClick:D[2]||(D[2]=Z=>r.value="income")},"收入",2)])]),i("div",U_,[D[14]||(D[14]=i("label",null,"金额(元,必填)",-1)),Ee(i("input",{ref_key:"amountInput",ref:O,class:Ge(["input",{invalid:k.value}]),"onUpdate:modelValue":D[3]||(D[3]=Z=>c.value=Z),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,c.value]])]),i("div",q_,[D[15]||(D[15]=i("label",null,"日期(必填)",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":D[4]||(D[4]=Z=>f.value=Z)},null,512),[[De,f.value]])]),i("div",H_,[D[16]||(D[16]=i("label",null,"分类(可直接新增)",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":D[5]||(D[5]=Z=>l.value=Z)},[($(!0),A(Oe,null,st(I.value,Z=>($(),A("option",{key:Z,value:Z},F(Z),9,z_))),128))],512),[[Wn,l.value]]),i("div",W_,[Ee(i("input",{class:"input add-cat-input","onUpdate:modelValue":D[6]||(D[6]=Z=>oe.value=Z),placeholder:"新增分类名",onKeydown:Mt(Nt(ie,["prevent"]),["enter"])},null,40,G_),[[De,oe.value]]),i("button",{class:"btn btn-xs",type:"button",onClick:ie},"添加")])]),r.value==="expense"?($(),A("div",Y_,[D[17]||(D[17]=i("label",null,"报销状态",-1)),i("div",J_,[i("button",{class:Ge(["seg-btn",{active:!g.value}]),onClick:D[7]||(D[7]=Z=>{g.value=!1,h.value=!1})},"无需报销",2),i("button",{class:Ge(["seg-btn",{active:g.value&&!h.value}]),onClick:D[8]||(D[8]=Z=>{g.value=!0,h.value=!1})},"待报销",2),i("button",{class:Ge(["seg-btn",{active:g.value&&h.value}]),onClick:D[9]||(D[9]=Z=>{g.value=!0,h.value=!0})},"已报销",2)])])):ce("",!0),i("div",X_,[D[18]||(D[18]=i("label",null,"备注",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":D[10]||(D[10]=Z=>m.value=Z),placeholder:"选填"},null,512),[[De,m.value]])])]),k.value?($(),A("div",Q_,F(k.value),1)):ce("",!0)]),i("div",Z_,[i("button",{class:"btn btn-sm",onClick:D[11]||(D[11]=Z=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:U},"保存")])],8,L_)])):ce("",!0)]),_:1})]))}}),t1=Kt(e1,[["__scopeId","data-v-1b57c1af"]]);function wl(e,t){return Ho(e,t-1)}function Hd(e,t){return Ot(Ho(e,t),-1)}function Wu(e,t){if(!e||t1&&t[]}},emits:["close","apply","saveAnchor"],setup(e,{emit:t}){const n=e,o=t,r=P(n.mode),l=P(n.month.slice(0,7)),c=P(n.cycleSel),f=P(n.customStart),m=P(n.customEnd),g=P(n.anchor),h=P("");function k(U){U.key==="Escape"&&o("close")}ut(()=>n.open,U=>{U?(r.value=n.mode,l.value=n.month.slice(0,7),c.value=n.cycleSel,f.value=n.customStart,m.value=n.customEnd,g.value=n.anchor,h.value="",window.addEventListener("keydown",k)):window.removeEventListener("keydown",k)}),ut(()=>[n.anchor,n.cycleSel],()=>{g.value=n.anchor,c.value=n.cycleSel}),hn(()=>window.removeEventListener("keydown",k));const O=et(()=>{const U=new Set(n.months);return U.add(l.value),U.add(at().slice(0,7)),Array.from(U).sort((S,D)=>Sn.anchor?ua(Ot(n.anchor,-1),n.anchor):"");function I(U){return U.slice(0,4)+" 年 "+Number(U.slice(5,7))+" 月"}function H(U){l.value=U,o("apply",{mode:"month",month:U}),o("close")}function oe(U){c.value=U,o("apply",{mode:"cycle",cycle:U}),o("close")}function ie(){g.value&&o("saveAnchor",g.value)}function ae(){if(!f.value||!m.value){h.value="请选择开始和结束日期";return}if(f.value>m.value){h.value="开始日期不能晚于结束日期";return}h.value="",o("apply",{mode:"custom",customStart:f.value,customEnd:m.value}),o("close")}return(U,S)=>($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Nt(D=>o("close"),["self"]))},[i("div",s1,[i("div",o1,[S[10]||(S[10]=i("span",{class:"dialog-title"},"统计周期",-1)),i("button",{class:"icon-btn",title:"关闭",onClick:S[0]||(S[0]=D=>o("close"))},[he(qe,{name:"close",size:16})])]),i("div",r1,[i("div",a1,[i("button",{class:Ge(["seg-btn",{active:r.value==="month"}]),onClick:S[1]||(S[1]=D=>r.value="month")},"按月",2),i("button",{class:Ge(["seg-btn",{active:r.value==="cycle"}]),onClick:S[2]||(S[2]=D=>r.value="cycle")},"按期",2),i("button",{class:Ge(["seg-btn",{active:r.value==="custom"}]),onClick:S[3]||(S[3]=D=>r.value="custom")},"自定义",2)]),r.value==="month"?($(),A("div",i1,[($(!0),A(Oe,null,st(O.value,D=>($(),A("button",{key:D,class:Ge(["opt",{active:D===l.value}]),onClick:Z=>H(D)},[i("span",null,F(I(D)),1),D===l.value?($(),gt(qe,{key:0,name:"check-circle",size:15})):ce("",!0)],10,l1))),128)),O.value.length?ce("",!0):($(),A("div",u1,"还没有账目记录"))])):r.value==="cycle"?($(),A("div",c1,[i("div",d1,[S[11]||(S[11]=i("span",{class:"anchor-label"},"账期起点",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":S[4]||(S[4]=D=>g.value=D)},null,512),[[De,g.value]]),i("button",{class:"btn btn-sm",disabled:!g.value||g.value===e.anchor,onClick:ie},"保存",8,f1)]),g.value?g.value!==e.anchor?($(),A("div",v1,"起点已修改,保存后按新起点重新切分")):ce("",!0):($(),A("div",p1,"填写实习开始日期并保存,自动切分为第 1、2、3…期(每期到下月同日前一天)")),e.anchor?($(),A(Oe,{key:2},[e.hasBefore?($(),A("button",{key:0,class:Ge(["opt",{active:c.value==="before"}]),onClick:S[5]||(S[5]=D=>oe("before"))},[S[12]||(S[12]=i("span",null,"起点前",-1)),i("span",m1,"~ "+F(x.value),1)],2)):ce("",!0),($(!0),A(Oe,null,st(e.cycleCount,D=>($(),A("button",{key:D,class:Ge(["opt",{active:c.value===D}]),onClick:Z=>oe(D)},[i("span",null,"第 "+F(D)+" 期",1),i("span",y1,F(Ht(Yi)(Ht(wl)(e.anchor,D),Ht(Hd)(e.anchor,D))),1)],10,h1))),128))],64)):ce("",!0)])):($(),A("div",g1,[i("div",b1,[i("div",w1,[S[13]||(S[13]=i("label",null,"开始日期",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":S[6]||(S[6]=D=>f.value=D)},null,512),[[De,f.value]])]),i("div",_1,[S[14]||(S[14]=i("label",null,"结束日期",-1)),Ee(i("input",{class:"input",type:"date","onUpdate:modelValue":S[7]||(S[7]=D=>m.value=D)},null,512),[[De,m.value]])])]),h.value?($(),A("div",k1,F(h.value),1)):ce("",!0),i("button",{class:"btn btn-primary apply-btn",onClick:ae},"应用区间")]))]),i("div",C1,[i("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=D=>o("close"))},"关闭")])])])):ce("",!0)]),_:1})]))}}),$1=Kt(x1,[["__scopeId","data-v-6269639e"]]),S1={class:"ledger-page"},E1={class:"ledger-toolbar"},T1=["disabled"],A1={class:"num"},P1=["disabled"],O1=["value"],M1={class:"cards"},I1={class:"card stat-card stat-income"},j1={class:"stat-num num amt-income"},D1={class:"card stat-card stat-expense"},L1={class:"stat-num num"},R1={class:"card stat-card stat-balance"},K1={class:"card stat-card stat-pending"},N1={class:"stat-num num amt-warn"},F1={key:0,class:"card sec"},V1={class:"bar-label"},B1={class:"bar-track"},U1={class:"muted num bar-num"},q1={key:1,class:"card section"},H1={class:"form-error"},z1={class:"card table-card"},W1={class:"tx-table"},G1={class:"num","data-label":"日期"},Y1={"data-label":"分类"},J1={class:"tag"},X1={class:"td-note","data-label":"备注"},Q1={"data-label":"报销"},Z1={key:0,class:"muted"},e0={key:1,class:"tx-done"},t0={key:2,class:"tx-pending"},n0={class:"ops-cell"},s0={class:"ops"},o0=["onClick"],r0=["onClick"],a0=["onClick"],i0={key:0},l0={class:"muted table-note num"},Gu="dsh_ledger_mode",Yu="dsh_ledger_cycle",Ju="dsh_ledger_cstart",Xu="dsh_ledger_cend",u0="0000-01-01",c0=jt({__name:"LedgerView",setup(e){const t=P("month"),n=P(at()),o=P(1),r=P(at().slice(0,7)+"-01"),l=P(at()),c=P(""),f=P(!1),m=P([]),g=P([]),h=P(!0),k=P(""),O=P(!1),x=P(null),I=P({type:"expense",category:"",amountYuan:"",date:at(),note:"",reimbursable:0,reimbursed:0}),H=P(null),oe=P(!1);function ie(p){const w=Number(p.slice(0,4)),E=Number(p.slice(5,7))-1,X=new Date(w,E+1,0).getDate();return p+"-"+(X<10?"0"+X:String(X))}const ae=et(()=>c.value?Math.max(1,Wu(c.value,at())):1),U=et(()=>t.value==="month"?n.value.slice(0,7)+"-01":t.value==="custom"?r.value:c.value?o.value==="before"?u0:wl(c.value,o.value):n.value.slice(0,7)+"-01"),S=et(()=>t.value==="month"?ie(n.value.slice(0,7)):t.value==="custom"?l.value:c.value?o.value==="before"?Ot(c.value,-1):Hd(c.value,o.value):ie(n.value.slice(0,7))),D=et(()=>t.value==="month"?Number(n.value.slice(0,4))+" 年 "+Number(n.value.slice(5,7))+" 月":t.value==="custom"?Yi(U.value,S.value):c.value?o.value==="before"?"起点前 · ~ "+ua(Ot(c.value,-1),c.value):"第 "+o.value+" 期 · "+Yi(U.value,S.value):"按期统计 · 设置起点"),Z=et(()=>t.value==="month"?!0:t.value==="cycle"&&c.value?o.value==="before"?!1:o.value>1||f.value:!1),z=et(()=>t.value==="month"?!0:t.value==="cycle"&&c.value?o.value==="before"?!0:o.valueae.value)){if(w<1){f.value&&(o.value="before");return}o.value=w}}const j=et(()=>t.value==="month"?n.value.slice(0,7)!==at().slice(0,7):t.value==="cycle"?!!c.value&&o.value!==ae.value:!1);function T(){t.value==="cycle"?o.value=ae.value:n.value=at()}async function M(){h.value=!0;try{g.value=await Yh(U.value,S.value),k.value=""}catch(p){k.value="账目加载失败:"+(p instanceof Error?p.stack||p.message:String(p)),Ne("账目加载失败")}h.value=!1}ln(async()=>{const p=localStorage.getItem(Gu);(p==="month"||p==="cycle"||p==="custom")&&(t.value=p);const w=localStorage.getItem(Ju),E=localStorage.getItem(Xu);w&&E&&w<=E&&(r.value=w,l.value=E);const X=localStorage.getItem(Yu);X==="before"?o.value="before":X&&Number(X)>=1&&(o.value=Number(X)),c.value=await $t("ledger.anchor",""),o.value!=="before"&&o.value>ae.value&&(o.value=ae.value),await M()}),ut([U,S],()=>{He.value="all",M()}),ut(t,p=>localStorage.setItem(Gu,p)),ut(o,p=>localStorage.setItem(Yu,String(p))),ut([r,l],([p,w])=>{localStorage.setItem(Ju,p),localStorage.setItem(Xu,w)});async function ee(){try{m.value=await ey(),f.value=c.value?await Uu(c.value)>0:!1}catch{}oe.value=!0}function Ae(p){t.value=p.mode,p.month&&(n.value=p.month+"-01"),p.cycle!==void 0&&(o.value=p.cycle),p.customStart&&(r.value=p.customStart),p.customEnd&&(l.value=p.customEnd)}async function $e(p){c.value=p,await Rt("ledger.anchor",p),t.value="cycle",o.value=Math.max(1,Wu(p,at()));try{f.value=await Uu(p)>0}catch{}Ne("账期起点已保存,已按新起点切分期数")}const ye=P([]);async function Te(){ye.value=await la("expense")}Te();const Ue=et(()=>g.value.slice().sort((p,w)=>p.date===w.date?w.id-p.id:p.date{let p=0,w=0,E=0;for(const X of g.value)X.type==="income"?p+=X.amount:(w+=X.amount,X.reimbursable===1&&X.reimbursed!==1&&(E+=X.amount));return{income:p,expense:w,pending:E,balance:p-w}}),Ye=P("all"),We=P("all"),He=P("all"),ke=et(()=>Array.from(new Set(g.value.map(p=>p.category))).sort((p,w)=>p.localeCompare(w,"zh"))),fe=et(()=>Ue.value.filter(p=>!(Ye.value!=="all"&&p.type!==Ye.value||He.value!=="all"&&p.category!==He.value||We.value==="pending"&&!(p.type==="expense"&&p.reimbursable===1&&p.reimbursed!==1)||We.value==="done"&&!(p.reimbursable===1&&p.reimbursed===1)))),Pe=et(()=>{const p=new Map;let w=0;for(const X of g.value)X.type==="expense"&&(p.set(X.category,(p.get(X.category)||0)+X.amount),w+=X.amount);const E=w||1;return Array.from(p.entries()).map(X=>({name:X[0],amount:X[1],percent:Math.round(X[1]/E*100)})).sort((X,G)=>G.amount-X.amount)});function ot(p){return(p/100).toFixed(2)}function bt(p){return(p.type==="income"?"+":"-")+ot(p.amount)}async function kt(p){await Zh(p.id),await M(),Ne("已标记为已报销")}function Ft(p){x.value=p.id,I.value={type:p.type,category:p.category,amountYuan:ot(p.amount),date:p.date,note:p.note||"",reimbursable:p.reimbursable,reimbursed:p.reimbursed},O.value=!0}function yt(){x.value=null,I.value={type:"expense",category:ye.value[0]||"",amountYuan:"",date:at(),note:"",reimbursable:0,reimbursed:0},O.value=!0}async function je(p){if(x.value){await Xh(x.value,p),O.value=!1,await M(),Ne("账目已更新");return}await Jh({type:p.type,category:p.category,amount:p.amount,date:p.date,note:p.note,reimbursable:p.reimbursable,reimbursed:p.reimbursed}),O.value=!1,await M(),Ne("已记一笔")}async function b(){H.value&&H.value.id&&await Qh(H.value.id),H.value=null,await M(),Ne("账目已删除")}return(p,w)=>($(),A("div",S1,[i("div",E1,[t.value!=="custom"?($(),A("button",{key:0,class:"icon-btn",disabled:!Z.value,title:"上一周期",onClick:w[0]||(w[0]=E=>ne(-1))},[he(qe,{name:"chevron-left",size:16})],8,T1)):ce("",!0),i("button",{class:"period-title",title:"选择统计周期",onClick:ee},[i("span",A1,F(D.value),1),he(qe,{name:"chevron-down",size:14})]),t.value!=="custom"?($(),A("button",{key:1,class:"icon-btn",disabled:!z.value,title:"下一周期",onClick:w[1]||(w[1]=E=>ne(1))},[he(qe,{name:"chevron-right",size:16})],8,P1)):ce("",!0),j.value?($(),A("button",{key:2,class:"btn btn-sm",onClick:T},F(t.value==="cycle"?"回到本期":"回到本月"),1)):ce("",!0),w[12]||(w[12]=i("span",{class:"flex1"},null,-1)),Ee(i("select",{class:"select w-filter","onUpdate:modelValue":w[2]||(w[2]=E=>Ye.value=E)},[...w[8]||(w[8]=[i("option",{value:"all"},"全部类型",-1),i("option",{value:"expense"},"仅支出",-1),i("option",{value:"income"},"仅收入",-1)])],512),[[Wn,Ye.value]]),Ee(i("select",{class:"select w-filter","onUpdate:modelValue":w[3]||(w[3]=E=>He.value=E)},[w[9]||(w[9]=i("option",{value:"all"},"全部分类",-1)),($(!0),A(Oe,null,st(ke.value,E=>($(),A("option",{key:E,value:E},F(E),9,O1))),128))],512),[[Wn,He.value]]),Ee(i("select",{class:"select w-filter","onUpdate:modelValue":w[4]||(w[4]=E=>We.value=E)},[...w[10]||(w[10]=[i("option",{value:"all"},"全部报销",-1),i("option",{value:"pending"},"待报销",-1),i("option",{value:"done"},"已报销",-1)])],512),[[Wn,We.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:yt},[he(qe,{name:"plus",size:14}),w[11]||(w[11]=_t(" 记一笔",-1))])]),i("div",M1,[i("div",I1,[w[13]||(w[13]=i("div",{class:"muted"},"本期收入(元)",-1)),i("div",j1,F(ot(Ke.value.income)),1)]),i("div",D1,[w[14]||(w[14]=i("div",{class:"muted"},"本期支出(元)",-1)),i("div",L1,F(ot(Ke.value.expense)),1)]),i("div",R1,[w[15]||(w[15]=i("div",{class:"muted"},"本期结余(元)",-1)),i("div",{class:Ge(["stat-num num",{"amt-income":Ke.value.balance>=0,"amt-expense":Ke.value.balance<0}])},F(ot(Ke.value.balance)),3)]),i("div",K1,[w[16]||(w[16]=i("div",{class:"muted"},"待报销(元)",-1)),i("div",N1,F(ot(Ke.value.pending)),1)])]),Pe.value.length?($(),A("div",F1,[w[17]||(w[17]=i("div",{class:"sec-title"},"本期支出分类",-1)),($(!0),A(Oe,null,st(Pe.value,E=>($(),A("div",{key:E.name,class:"bar-row"},[i("span",V1,F(E.name),1),i("span",B1,[i("span",{class:"bar-fill",style:zn({width:E.percent+"%"})},null,4)]),i("span",U1,F(ot(E.amount))+" 元 · "+F(E.percent)+"%",1)]))),128))])):ce("",!0),k.value?($(),A("div",q1,[i("div",H1,F(k.value),1),w[18]||(w[18]=i("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):ce("",!0),i("div",z1,[i("table",W1,[w[20]||(w[20]=i("thead",null,[i("tr",null,[i("th",null,"日期"),i("th",null,"分类"),i("th",null,"金额(元)"),i("th",null,"备注"),i("th",null,"报销"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Oe,null,st(fe.value,E=>($(),A("tr",{key:E.id},[i("td",G1,F(E.date),1),i("td",Y1,[i("span",J1,F(E.category),1)]),i("td",{class:Ge(["num",E.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},F(bt(E)),3),i("td",X1,F(E.note||"--"),1),i("td",Q1,[E.type!=="expense"||E.reimbursable!==1?($(),A("span",Z1,"--")):E.reimbursed===1?($(),A("span",e0,"已报销")):($(),A("span",t0,"待报销"))]),i("td",n0,[i("div",s0,[E.type==="expense"&&E.reimbursable===1&&E.reimbursed!==1?($(),A("button",{key:0,class:"btn btn-xs",onClick:X=>kt(E)},"标记已报销",8,o0)):ce("",!0),i("button",{class:"btn btn-xs",onClick:X=>Ft(E)},"编辑",8,r0),i("button",{class:"btn btn-xs",onClick:X=>H.value=E},"删除",8,a0)])])]))),128)),!fe.value.length&&!h.value?($(),A("tr",i0,[...w[19]||(w[19]=[i("td",{colspan:"6",class:"empty muted"},"该周期暂无账目",-1)])])):ce("",!0)])])]),i("div",l0,"本期 "+F(g.value.length)+" 条 · 当前筛选 "+F(fe.value.length)+" 条",1),he(t1,{open:O.value,title:x.value?"编辑账目":"记一笔",initial:I.value,onCancel:w[5]||(w[5]=E=>O.value=!1),onSave:je},null,8,["open","title","initial"]),he($1,{open:oe.value,mode:t.value,anchor:c.value,month:n.value,"cycle-sel":o.value,"custom-start":r.value,"custom-end":l.value,"cycle-count":ae.value,"has-before":f.value,months:m.value,onClose:w[6]||(w[6]=E=>oe.value=!1),onApply:Ae,onSaveAnchor:$e},null,8,["open","mode","anchor","month","cycle-sel","custom-start","custom-end","cycle-count","has-before","months"]),he(_n,{open:!!H.value,title:"删除确认",message:H.value?"将删除 "+H.value.date+" 的账目("+H.value.category+" "+ot(H.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:w[7]||(w[7]=E=>H.value=null),onConfirm:b},null,8,["open","message"])]))}}),d0=Kt(c0,[["__scopeId","data-v-deda24bd"]]),f0={class:"memo-page"},p0={class:"card memo-list"},v0={class:"pane-head"},m0={class:"pane-title"},h0={class:"memo-scroll"},y0=["onClick"],g0={class:"memo-item-title"},b0={class:"muted memo-item-sub"},w0={class:"muted num memo-item-time"},_0={key:0,class:"muted empty"},k0={class:"card memo-editor"},C0={class:"editor-foot"},x0={class:"muted foot-info"},$0=["disabled"],S0=["disabled"],E0={key:1,class:"empty muted editor-empty"},T0=jt({__name:"MemoView",setup(e){const t=P([]),n=P(null),o=P(!1),r=P(""),l=P(""),c=P(null),f=P(null);async function m(){if(t.value=await Uh(),n.value&&n.value.id){const Z=t.value.find(z=>z.id===n.value.id);Z&&(n.value=Z)}}ln(async()=>{await m(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",g)}),hn(()=>window.removeEventListener("keydown",g)),ut(Vi,async Z=>{if(!Z)return;t.value.length||await m();const z=t.value.find(ne=>ne.id===Z);Vi.value=null,z&&O(z)},{immediate:!0});function g(Z){(Z.ctrlKey||Z.metaKey)&&Z.key.toLowerCase()==="s"&&o.value&&h.value&&(Z.preventDefault(),oe())}const h=et(()=>{if(!o.value)return!1;const Z=n.value?n.value.title:"",z=n.value?n.value.content:"";return r.value!==Z||l.value!==z});function k(Z){n.value=Z,o.value=!0,r.value=Z.title,l.value=Z.content}function O(Z){if(!(o.value&&n.value&&n.value.id===Z.id)){if(h.value){f.value={type:"select",memo:Z};return}k(Z)}}function x(){if(h.value){f.value={type:"new"};return}I()}function I(){n.value=null,o.value=!0,r.value="",l.value=""}function H(){n.value?k(n.value):I()}async function oe(){if(!r.value.trim()&&!l.value.trim()){Ne("标题与内容不能都为空");return}if(n.value&&n.value.id)await Hh(n.value.id,r.value,l.value),Ne("备忘已保存");else{const Z=await qh(r.value,l.value);n.value=Z,r.value=Z.title,l.value=Z.content,Ne("备忘已创建")}await m()}function ie(){n.value&&n.value.id&&(c.value=n.value)}async function ae(){c.value&&c.value.id&&(await zh(c.value.id),Ne("备忘已删除")),c.value=null,await m(),I()}function U(){const Z=f.value;f.value=null,Z&&(Z.type==="select"?k(Z.memo):I())}function S(Z){return(Z.content||"").replace(/\s+/g," ").slice(0,30)}function D(Z){return Z.replace("T"," ").slice(0,16)}return(Z,z)=>($(),A("div",f0,[i("aside",p0,[i("div",v0,[i("span",m0,"备忘录("+F(t.value.length)+")",1),i("button",{class:"btn btn-primary btn-sm",onClick:x},"新建")]),i("div",h0,[($(!0),A(Oe,null,st(t.value,ne=>($(),A("div",{key:ne.id,class:Ge(["memo-item",{active:o.value&&n.value&&n.value.id===ne.id}]),onClick:j=>O(ne)},[i("div",g0,F(ne.title||"无标题"),1),i("div",b0,F(S(ne)||"空"),1),i("div",w0,F(D(ne.updated_at)),1)],10,y0))),128)),t.value.length?ce("",!0):($(),A("div",_0,"暂无备忘"))])]),i("section",k0,[o.value?($(),A(Oe,{key:0},[Ee(i("input",{class:"input title-input","onUpdate:modelValue":z[0]||(z[0]=ne=>r.value=ne),placeholder:"标题"},null,512),[[De,r.value]]),Ee(i("textarea",{class:"textarea content-textarea","onUpdate:modelValue":z[1]||(z[1]=ne=>l.value=ne),placeholder:"内容"},null,512),[[De,l.value]]),i("div",C0,[i("span",x0,[h.value?($(),A(Oe,{key:0},[_t("有未保存修改")],64)):n.value&&n.value.id?($(),A(Oe,{key:1},[_t("更新于 "+F(D(n.value.updated_at)),1)],64)):($(),A(Oe,{key:2},[_t("新备忘")],64))]),z[4]||(z[4]=i("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),A("button",{key:0,class:"btn btn-sm",onClick:ie},"删除")):ce("",!0),i("button",{class:"btn btn-sm",disabled:!h.value,onClick:H},"放弃修改",8,$0),i("button",{class:"btn btn-primary btn-sm",disabled:!h.value,onClick:oe},"保存",8,S0)])],64)):($(),A("div",E0,"选择左侧备忘,或点击右上角新建"))]),he(_n,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:z[2]||(z[2]=ne=>c.value=null),onConfirm:ae},null,8,["open","message"]),he(_n,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:z[3]||(z[3]=ne=>f.value=null),onConfirm:U},null,8,["open"])]))}}),A0=Kt(T0,[["__scopeId","data-v-a0931fc7"]]),P0=["aria-label"],O0={class:"dialog-head"},M0={class:"dialog-title"},I0={class:"dialog-body"},j0={class:"form-grid"},D0={class:"field span2"},L0={class:"field span2"},R0={class:"field span2"},K0={class:"pwd-row"},N0={class:"field span2"},F0={key:0,class:"form-error"},V0={class:"dialog-btns"},B0=jt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=P(""),l=P(""),c=P(""),f=P(""),m=P(""),g=P(null);function h(x){n.open&&x.key==="Escape"&&o("cancel")}ut(()=>n.open,async x=>{var I;x?(r.value=n.initial.system,l.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,m.value="",window.addEventListener("keydown",h),await Ks(),(I=g.value)==null||I.focus()):window.removeEventListener("keydown",h)}),hn(()=>window.removeEventListener("keydown",h));function k(){const x="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",I="!@#$%^&*",H=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let ie=0;ie($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:I[6]||(I[6]=Nt(H=>o("cancel"),["self"]))},[i("div",{class:"dialog",role:"dialog","aria-label":e.title},[i("div",O0,[i("span",M0,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:I[0]||(I[0]=H=>o("cancel"))},[he(qe,{name:"close",size:16})])]),i("div",I0,[i("div",j0,[i("div",D0,[I[7]||(I[7]=i("label",null,"系统名称(必填)",-1)),Ee(i("input",{ref_key:"systemInput",ref:g,class:"input","onUpdate:modelValue":I[1]||(I[1]=H=>r.value=H),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,r.value]])]),i("div",L0,[I[8]||(I[8]=i("label",null,"账号(必填)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":I[2]||(I[2]=H=>l.value=H),placeholder:"用户名、工号或邮箱"},null,512),[[De,l.value]])]),i("div",R0,[I[9]||(I[9]=i("label",null,"密码(必填)",-1)),i("div",K0,[Ee(i("input",{class:"input","onUpdate:modelValue":I[3]||(I[3]=H=>c.value=H),placeholder:"输入或点击生成"},null,512),[[De,c.value]]),i("button",{class:"btn btn-sm",onClick:k},"生成")])]),i("div",N0,[I[10]||(I[10]=i("label",null,"备注",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=H=>f.value=H),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,f.value]])])]),m.value?($(),A("div",F0,F(m.value),1)):ce("",!0)]),i("div",V0,[i("button",{class:"btn btn-sm",onClick:I[5]||(I[5]=H=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:O},"保存")])],8,P0)])):ce("",!0)]),_:1})]))}}),U0=Kt(B0,[["__scopeId","data-v-2eafe20e"]]),q0={class:"vault-page"},H0={key:0,class:"empty muted"},z0={key:1,class:"card lock-card"},W0={class:"lock-badge"},G0={key:0,class:"form-error"},Y0=["disabled"],J0={key:0,class:"form-error"},X0=["disabled"],Q0={class:"vault-toolbar"},Z0={class:"search-wrap"},ek={class:"card table-card"},tk={class:"cred-table"},nk={class:"td-system"},sk=["onClick"],ok={class:"pwd-cell"},rk={class:"num pwd-text"},ak=["onClick"],ik=["onClick"],lk={class:"td-remark"},uk={class:"td-ops"},ck={class:"ops"},dk=["onClick"],fk=["onClick"],pk={key:0},vk={class:"muted table-note num"},mk={class:"dialog pwd-dialog"},hk={class:"dialog-head"},yk={class:"dialog-body"},gk={class:"vp-field"},bk={class:"vp-field"},wk={class:"vp-field"},_k={key:0,class:"form-error"},kk={class:"dialog-btns"},Ck=5*60*1e3,xk=jt({__name:"VaultView",setup(e){const t=P(null),n=P(Cm()),o=P(!1),r=P(""),l=P(""),c=P(""),f=P(""),m=P(""),g=P([]),h=P(""),k=P({}),O=P(!1),x=P(null),I=P({system:"",account:"",password:"",remark:""}),H=P(null),oe=P(!1),ie=P(""),ae=P(""),U=P(""),S=P("");async function D(){g.value=await Tm(),k.value={}}let Z=null;function z(){Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{n.value&&(sa(),n.value=!1,g.value=[],k.value={},Ne("长时间未操作,密码库已自动锁定"))},Ck)}function ne(){n.value&&z()}ln(async()=>{t.value=await wd(),window.addEventListener("click",ne),window.addEventListener("keydown",ne),n.value&&z()}),hn(()=>{window.removeEventListener("click",ne),window.removeEventListener("keydown",ne),Z!==null&&window.clearTimeout(Z)});const j=et(()=>{const ke=h.value.trim().toLowerCase();return ke?g.value.filter(fe=>(fe.system+" "+fe.account+" "+(fe.remark||"")).toLowerCase().includes(ke)):g.value});async function T(){if(!o.value){if(c.value="",!r.value){c.value="请输入主密码";return}if(r.value.length<6){c.value="主密码至少 6 位";return}if(r.value!==l.value){c.value="两次输入的主密码不一致";return}o.value=!0;try{await xm(r.value),r.value="",l.value="",n.value=!0,z(),await D(),Ne("主密码已设置,密码库已解锁")}catch(ke){c.value=ke instanceof Error?ke.message:"设置失败"}o.value=!1}}async function M(){if(!o.value){if(m.value="",!f.value){m.value="请输入主密码";return}o.value=!0;try{await $m(f.value),f.value="",n.value=!0,z(),await D()}catch(ke){m.value=ke instanceof Error?ke.message:"解锁失败"}o.value=!1}}function ee(){sa(),n.value=!1,g.value=[],k.value={},Z!==null&&window.clearTimeout(Z),Ne("密码库已锁定")}async function Ae(ke){const fe=ke.id;if(k.value[fe]){k.value[fe]=!1;return}try{ke.passwordPlain=await gi(fe),k.value[fe]=!0}catch(Pe){Ne(Pe instanceof Error?Pe.message:"解密失败")}}async function $e(ke){try{const fe=await gi(ke.id);await Gi(fe),Ne("密码已复制")}catch(fe){Ne(fe instanceof Error?fe.message:"复制失败")}}async function ye(ke){await Gi(ke.account),Ne("账号已复制")}function Te(){x.value=null,I.value={system:"",account:"",password:"",remark:""},O.value=!0}async function Ue(ke){try{const fe=await gi(ke.id);x.value=ke.id,I.value={system:ke.system,account:ke.account,password:fe,remark:ke.remark||""},O.value=!0}catch(fe){Ne(fe instanceof Error?fe.message:"解密失败")}}async function Ke(ke){const fe=x.value??void 0;await Am(ke,fe),O.value=!1,await D(),Ne(fe?"账号已更新":"账号已添加")}async function Ye(){H.value&&H.value.id&&(await Pm(H.value.id),Ne("账号已删除")),H.value=null,await D()}function We(){ie.value="",ae.value="",U.value="",S.value="",oe.value=!0}async function He(){S.value="";try{const ke=await Om(ie.value,ae.value);oe.value=!1,ie.value="",ae.value="",U.value="",Ne("主密码已修改,"+ke+" 条账号密码已重新加密")}catch(ke){S.value=ke instanceof Error?ke.message:"修改失败"}}return(ke,fe)=>($(),A("div",q0,[t.value===null?($(),A("div",H0,"加载中")):n.value?($(),A(Oe,{key:2},[i("div",Q0,[i("div",Z0,[he(qe,{name:"search",size:14,class:"search-icon"}),Ee(i("input",{class:"input","onUpdate:modelValue":fe[3]||(fe[3]=Pe=>h.value=Pe),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,h.value]])]),fe[16]||(fe[16]=i("span",{class:"flex1"},null,-1)),i("button",{class:"btn btn-sm",onClick:We},"修改主密码"),i("button",{class:"btn btn-sm",onClick:ee},"锁定"),i("button",{class:"btn btn-primary btn-sm",onClick:Te},"新增账号")]),i("div",ek,[i("table",tk,[fe[18]||(fe[18]=i("thead",null,[i("tr",null,[i("th",null,"系统名称"),i("th",null,"账号"),i("th",null,"密码"),i("th",null,"备注"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Oe,null,st(j.value,Pe=>($(),A("tr",{key:Pe.id},[i("td",nk,F(Pe.system),1),i("td",null,[i("span",{class:"copyable",title:"点击复制账号",onClick:ot=>ye(Pe)},F(Pe.account),9,sk)]),i("td",null,[i("div",ok,[i("span",rk,F(k.value[Pe.id]?Pe.passwordPlain:"........"),1),i("button",{class:"btn btn-xs",onClick:ot=>Ae(Pe)},F(k.value[Pe.id]?"隐藏":"显示"),9,ak),i("button",{class:"btn btn-xs",onClick:ot=>$e(Pe)},"复制",8,ik)])]),i("td",lk,F(Pe.remark||"--"),1),i("td",uk,[i("div",ck,[i("button",{class:"btn btn-xs",onClick:ot=>Ue(Pe)},"编辑",8,dk),i("button",{class:"btn btn-xs",onClick:ot=>H.value=Pe},"删除",8,fk)])])]))),128)),j.value.length?ce("",!0):($(),A("tr",pk,[...fe[17]||(fe[17]=[i("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),i("div",vk,"共 "+F(g.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),A("div",z0,[i("div",W0,[he(qe,{name:"lock",size:26})]),t.value===!1?($(),A(Oe,{key:0},[fe[12]||(fe[12]=i("div",{class:"lock-title"},"设置主密码",-1)),fe[13]||(fe[13]=i("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[0]||(fe[0]=Pe=>r.value=Pe),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(T,["enter"])},null,544),[[De,r.value]]),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[1]||(fe[1]=Pe=>l.value=Pe),placeholder:"再次输入主密码",onKeydown:Mt(T,["enter"])},null,544),[[De,l.value]]),c.value?($(),A("div",G0,F(c.value),1)):ce("",!0),i("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:T},"完成设置并解锁",8,Y0)],64)):($(),A(Oe,{key:1},[fe[14]||(fe[14]=i("div",{class:"lock-title"},"密码库已锁定",-1)),fe[15]||(fe[15]=i("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[2]||(fe[2]=Pe=>f.value=Pe),placeholder:"主密码",onKeydown:Mt(M,["enter"])},null,544),[[De,f.value]]),m.value?($(),A("div",J0,F(m.value),1)):ce("",!0),i("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:M},"解锁",8,X0)],64))])),he(U0,{open:O.value,title:x.value?"编辑账号":"新增账号",initial:I.value,onCancel:fe[4]||(fe[4]=Pe=>O.value=!1),onSave:Ke},null,8,["open","title","initial"]),he(_n,{open:!!H.value,title:"删除确认",message:H.value?"将删除系统「"+H.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[5]||(fe[5]=Pe=>H.value=null),onConfirm:Ye},null,8,["open","message"]),($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[oe.value?($(),A("div",{key:0,class:"mask",onClick:fe[11]||(fe[11]=Nt(Pe=>oe.value=!1,["self"]))},[i("div",mk,[i("div",hk,[fe[19]||(fe[19]=i("span",{class:"dialog-title"},"修改主密码",-1)),i("button",{class:"icon-btn",title:"关闭",onClick:fe[6]||(fe[6]=Pe=>oe.value=!1)},[he(qe,{name:"close",size:16})])]),i("div",yk,[i("div",gk,[fe[20]||(fe[20]=i("label",null,"旧主密码",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[7]||(fe[7]=Pe=>ie.value=Pe)},null,512),[[De,ie.value]])]),i("div",bk,[fe[21]||(fe[21]=i("label",null,"新主密码(至少 6 位)",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[8]||(fe[8]=Pe=>ae.value=Pe)},null,512),[[De,ae.value]])]),i("div",wk,[fe[22]||(fe[22]=i("label",null,"确认新主密码",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":fe[9]||(fe[9]=Pe=>U.value=Pe)},null,512),[[De,U.value]])]),S.value?($(),A("div",_k,F(S.value),1)):ce("",!0),fe[23]||(fe[23]=i("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),i("div",kk,[i("button",{class:"btn btn-sm",onClick:fe[10]||(fe[10]=Pe=>oe.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:He},"确认修改")])])])):ce("",!0)]),_:1})]))]))}}),$k=Kt(xk,[["__scopeId","data-v-6d2745bc"]]),Sk=["aria-label"],Ek={class:"dialog-head"},Tk={class:"dialog-title"},Ak={class:"dialog-body"},Pk={class:"field"},Ok={key:0},Mk=["placeholder"],Ik={key:1,class:"form-error"},jk={class:"dialog-btns"},Dk=jt({__name:"InputDialog",props:{open:{type:Boolean},title:{},label:{default:""},placeholder:{default:""},initial:{default:""},confirmText:{default:"确定"},validate:{}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,o=t,r=P(""),l=P(""),c=P(null);function f(g){n.open&&g.key==="Escape"&&o("cancel")}ut(()=>n.open,async g=>{var h,k;g?(r.value=n.initial,l.value="",window.addEventListener("keydown",f),await Ks(),(h=c.value)==null||h.focus(),(k=c.value)==null||k.select()):window.removeEventListener("keydown",f)}),hn(()=>window.removeEventListener("keydown",f));function m(){const g=r.value.trim();if(!g){l.value="请输入内容";return}const h=n.validate?n.validate(g):null;if(h){l.value=h;return}o("confirm",g)}return(g,h)=>($(),gt(Cn,{to:"body"},[he(Jn,{name:"modal"},{default:$n(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:h[3]||(h[3]=Nt(k=>o("cancel"),["self"]))},[i("div",{class:"dialog input-dialog",role:"dialog","aria-label":e.title},[i("div",Ek,[i("span",Tk,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:h[0]||(h[0]=k=>o("cancel"))},[he(qe,{name:"close",size:16})])]),i("div",Ak,[i("div",Pk,[e.label?($(),A("label",Ok,F(e.label),1)):ce("",!0),Ee(i("input",{ref_key:"input",ref:c,class:Ge(["input",{invalid:l.value}]),"onUpdate:modelValue":h[1]||(h[1]=k=>r.value=k),placeholder:e.placeholder,maxlength:"20",onKeydown:Mt(m,["enter"])},null,42,Mk),[[De,r.value]]),l.value?($(),A("div",Ik,F(l.value),1)):ce("",!0)])]),i("div",jk,[i("button",{class:"btn btn-sm",onClick:h[2]||(h[2]=k=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:m},F(e.confirmText),1)])],8,Sk)])):ce("",!0)]),_:1})]))}}),Lk=Kt(Dk,[["__scopeId","data-v-4b14ba4f"]]);function Rk(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Qu(e,t){const o="\uFEFF"+t.map(f=>f.map(Rk).join(",")).join(`\r -`);if(lo.isNativePlatform()){const{downloadText:f}=await Vd(async()=>{const{downloadText:m}=await Promise.resolve().then(()=>nb);return{downloadText:m}},void 0,import.meta.url);return f(e,o)}const r=new Blob([o],{type:"text/csv;charset=utf-8"}),l=URL.createObjectURL(r),c=document.createElement("a");return c.href=l,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(l),1e4),""}const Kk={class:"settings"},Nk={class:"card section"},Fk={class:"muted acc-line"},Vk={class:"ai-grid"},Bk={class:"rule-item"},Uk={class:"rule-item"},qk={class:"rule-item"},Hk={key:0,class:"form-error"},zk={class:"rule-save"},Wk={class:"card section"},Gk={class:"rule-grid"},Yk={class:"rule-item"},Jk={class:"rule-item"},Xk={class:"rule-item"},Qk={class:"rule-item"},Zk={class:"rule-item"},eC={class:"card section"},tC={class:"proj-add"},nC={key:0,class:"muted proj-tip"},sC=["onKeydown"],oC=["onClick"],rC=["onClick"],aC=["onClick"],iC={key:1,class:"muted"},lC={class:"card section"},uC={class:"card section"},cC={class:"muted acc-line"},dC={class:"rule-save"},fC=["disabled"],pC={key:0,class:"muted acc-line"},vC={key:1,class:"form-error"},mC={key:2,class:"form-error"},hC={class:"card section"},yC={class:"ai-grid"},gC={class:"rule-item"},bC={class:"rule-item"},wC={class:"rule-item"},_C={class:"card section"},kC={class:"cat-block"},CC={class:"cat-head"},xC={class:"cat-chips"},$C=["onClick"],SC=["onClick"],EC={class:"cat-block"},TC={class:"cat-head"},AC={class:"cat-chips"},PC=["onClick"],OC=["onClick"],MC={class:"cat-block"},IC={class:"cat-head"},jC={class:"cat-chips"},DC=["onClick"],LC=["onClick"],RC={class:"card section"},KC={class:"backup-row"},NC={key:0,class:"import-error"},FC=jt({__name:"SettingsView",setup(e){var Ve;const t=P({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=P([]),o=P(""),r=P(""),l=P(""),c=P(""),f=P(""),m=P(""),g=P(null),h=P(""),k=P([]),O=P([]),x=P([]);async function I(){k.value=await Zo(),O.value=await la("expense"),x.value=await la("income")}const H=P({open:!1,kind:"log",index:-1,initial:""}),oe=P(null);function ie(le){return le==="log"?k.value:le==="expense"?O.value:x.value}async function ae(le,Y){le==="log"?(k.value=Y,await ay(Y)):le==="expense"?(O.value=Y,await Wi("expense",Y)):(x.value=Y,await Wi("income",Y))}function U(le){H.value={open:!0,kind:le,index:-1,initial:""}}function S(le,Y,ue){H.value={open:!0,kind:le,index:Y,initial:ue}}function D(le){const{kind:Y,index:ue}=H.value,Ie=ie(Y);return Ie.includes(le)&&!(ue>=0&&Ie[ue]===le)?"该分类已存在":null}async function Z(le){const{kind:Y,index:ue}=H.value;ue>=0?(await ae(Y,ie(Y).map((Ie,rt)=>rt===ue?le:Ie)),Ne("分类已更新(历史记录自动跟随显示)")):(await ae(Y,[...ie(Y),le]),Ne("分类已添加")),H.value.open=!1}function z(le,Y){const ue=ie(le);if(ue.length<=1){Ne("至少保留一个分类");return}oe.value={kind:le,index:Y,name:ue[Y]}}async function ne(){if(!oe.value)return;const{kind:le,index:Y}=oe.value;await ae(le,ie(le).filter((ue,Ie)=>Ie!==Y)),Ne("分类已删除"),oe.value=null}const j=P(null),T=P(null),M=P(""),ee=P(((Ve=Wo())==null?void 0:Ve.username)||""),Ae=P(""),$e=P(""),ye=P(""),Te=P(""),Ue=P(!1),Ke="0.7.1",Ye=P(""),We=P(""),He=P(""),ke=P(""),fe=P(!1),Pe=P("");async function ot(){var le;Ye.value=((le=pn())==null?void 0:le.username)||"",Pe.value=await Zm(),ke.value=eo.value}ut(eo,le=>{ke.value=le});async function bt(){He.value="";try{await Td(),Ne("云端绑定已重建")}catch(le){He.value=le instanceof Error?le.message:"绑定失败"}}async function kt(){if(!fe.value){He.value="",ke.value=eo.value,fe.value=!0;try{const le=await Bi();Pe.value=le.at,We.value="推送 "+le.pushed+" 条 · 拉取 "+le.pulled+" 条 · 删除 "+le.removed+" 条",ke.value="",Ne("同步完成")}catch(le){He.value=le instanceof Error?le.message:"同步失败"}fe.value=!1}}async function Ft(){if(Te.value="",$e.value!==ye.value){Te.value="两次输入的新密码不一致";return}try{await zm(Ae.value,$e.value),Ae.value="",$e.value="",ye.value="",Ne("登录密码已修改")}catch(le){Te.value=le instanceof Error?le.message:"修改失败"}}async function yt(){await Wm(),window.location.reload()}async function je(){t.value=await ms(),n.value=await ao(!0),l.value=(await gl()).join(` -`),c.value=await $t("ai_base_url",""),f.value=await $t("ai_api_key",""),m.value=await $t("ai_model",""),await ot(),await I()}async function b(){await Rt("ai_base_url",c.value.trim()),await Rt("ai_api_key",f.value.trim()),await Rt("ai_model",m.value.trim()),Ne("AI 配置已保存")}async function p(){const le=at(),Y=await Promise.all([Qo("2000-01-01",le),ao(!0)]),ue=Y[0],Ie=Y[1],rt=new Map(Ie.map(Qe=>[Qe.id,Qe.name])),ht=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Qe of ue)ht.push([Qe.date,qo(Qe.category),Qe.project_id&&rt.get(Qe.project_id)||"",Qe.content,Qe.minutes==null?"":Qe.minutes,Qe.is_milestone?"是":"",Qe.needs_followup?"是":"",Qe.takeaway||"",Qe.remark||""]);const Dt=await Qu("工作记录_"+le.replace(/-/g,"")+".csv",ht);Ne(Dt?"CSV 已导出到:"+Dt:"CSV 已导出到系统下载目录")}async function w(){const le=at(),Y=await Promise.all([ms(),Xo("2000-01-01",le)]),ue=Y[0],Ie=Y[1],rt=["周日","周一","周二","周三","周四","周五","周六"],ht=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Qe of Ie){const Qt=co(Qe,Qe.date,ue,Qe.date===le);ht.push([Qe.date,rt[Ns(Qe.date).getDay()],Qt.label,Qe.clock_in_at?kn(Qe.clock_in_at):"",Qe.clock_out_at?kn(Qe.clock_out_at):"",Qe.location||"",Qe.kind==="makeup"?"补卡":Qe.kind==="leave"?"休假":"正常",Qe.note||""])}const Dt=await Qu("考勤记录_"+le.replace(/-/g,"")+".csv",ht);Ne(Dt?"CSV 已导出到:"+Dt:"CSV 已导出到系统下载目录")}ln(je);async function E(){await Rt("work_start",t.value.work_start),await Rt("work_end",t.value.work_end),await Rt("grace_minutes",String(t.value.grace_minutes)),await Rt("lunch_minutes",String(t.value.lunch_minutes)),await Rt("remind_weekly",t.value.remind_weekly),Ne("打卡规则已保存")}async function X(){await jd(l.value.split(` -`)),Ne("常用地点已保存")}async function G(){const le=o.value.trim();if(le){try{await vh(le),r.value="",o.value=""}catch{r.value="项目名已存在"}await je()}}function ge(le){g.value=le.id,h.value=le.name}async function be(le){const Y=h.value.trim();if(Y)try{await mh(le.id,Y),r.value=""}catch{r.value="项目名已存在"}g.value=null,await je()}async function _e(le){await hh(le.id,le.archived!==1),await je()}async function de(){try{const le=await ty(),Y=await Ea("实习日志备份_"+at().replace(/-/g,"")+".json",le);Ne(Y?"备份已导出到:"+Y:"备份已导出到系统下载目录")}catch(le){Ne("导出失败:"+(le instanceof Error?le.message:String(le)))}}function Le(le){const Y=le.target,ue=Y.files&&Y.files[0];if(M.value="",!ue)return;const Ie=ue.name;ue.text().then(rt=>{T.value={name:Ie,text:rt}}),Y.value=""}async function Se(){if(T.value)try{await ny(T.value.text),T.value=null,M.value="",await je(),Ne("数据导入完成")}catch(le){T.value=null,M.value=le instanceof Error?le.message:"导入失败"}}return(le,Y)=>($(),A("div",Kk,[i("div",Nk,[Y[27]||(Y[27]=i("div",{class:"section-title"},"账号与隐私",-1)),i("div",Fk,"v"+F(Ht(Ke))+" · 当前账号 "+F(ee.value)+" · 登录密码仅存 PBKDF2 哈希",1),i("div",Vk,[i("div",Bk,[Y[24]||(Y[24]=i("label",null,"旧登录密码",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":Y[0]||(Y[0]=ue=>Ae.value=ue)},null,512),[[De,Ae.value]])]),i("div",Uk,[Y[25]||(Y[25]=i("label",null,"新登录密码(至少 6 位)",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":Y[1]||(Y[1]=ue=>$e.value=ue)},null,512),[[De,$e.value]])]),i("div",qk,[Y[26]||(Y[26]=i("label",null,"确认新登录密码",-1)),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":Y[2]||(Y[2]=ue=>ye.value=ue)},null,512),[[De,ye.value]])])]),Te.value?($(),A("div",Hk,F(Te.value),1)):ce("",!0),i("div",zk,[i("button",{class:"btn btn-primary btn-sm",onClick:Ft},"修改登录密码"),i("button",{class:"btn btn-sm btn-danger",onClick:Y[3]||(Y[3]=ue=>Ue.value=!0)},"删除此用户及全部数据")])]),i("div",Wk,[Y[34]||(Y[34]=i("div",{class:"section-title"},"打卡规则",-1)),i("div",Gk,[i("div",Yk,[Y[28]||(Y[28]=i("label",null,"上班时间",-1)),Ee(i("input",{type:"time",class:"input","onUpdate:modelValue":Y[4]||(Y[4]=ue=>t.value.work_start=ue)},null,512),[[De,t.value.work_start]])]),i("div",Jk,[Y[29]||(Y[29]=i("label",null,"下班时间",-1)),Ee(i("input",{type:"time",class:"input","onUpdate:modelValue":Y[5]||(Y[5]=ue=>t.value.work_end=ue)},null,512),[[De,t.value.work_end]])]),i("div",Xk,[Y[30]||(Y[30]=i("label",null,"迟到宽限(分钟)",-1)),Ee(i("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":Y[6]||(Y[6]=ue=>t.value.grace_minutes=ue)},null,512),[[De,t.value.grace_minutes,void 0,{number:!0}]])]),i("div",Qk,[Y[31]||(Y[31]=i("label",null,"午休扣除(分钟)",-1)),Ee(i("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":Y[7]||(Y[7]=ue=>t.value.lunch_minutes=ue)},null,512),[[De,t.value.lunch_minutes,void 0,{number:!0}]])]),i("div",Zk,[Y[33]||(Y[33]=i("label",null,"周记提醒",-1)),Ee(i("select",{class:"select","onUpdate:modelValue":Y[8]||(Y[8]=ue=>t.value.remind_weekly=ue)},[...Y[32]||(Y[32]=[i("option",{value:"friday"},"每周五提醒",-1),i("option",{value:"off"},"关闭",-1)])],512),[[Wn,t.value.remind_weekly]])])]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:E},"保存规则")])]),i("div",eC,[Y[35]||(Y[35]=i("div",{class:"section-title"},"项目管理",-1)),i("div",tC,[Ee(i("input",{class:"input","onUpdate:modelValue":Y[9]||(Y[9]=ue=>o.value=ue),placeholder:"新项目名称",onKeydown:Mt(G,["enter"])},null,544),[[De,o.value]]),i("button",{class:"btn btn-sm",onClick:G},"添加")]),r.value?($(),A("div",nC,F(r.value),1)):ce("",!0),($(!0),A(Oe,null,st(n.value,ue=>($(),A("div",{key:ue.id,class:"proj-row"},[g.value===ue.id?($(),A(Oe,{key:0},[Ee(i("input",{class:"input","onUpdate:modelValue":Y[10]||(Y[10]=Ie=>h.value=Ie),onKeydown:Mt(Ie=>be(ue),["enter"])},null,40,sC),[[De,h.value]]),i("button",{class:"btn btn-sm",onClick:Ie=>be(ue)},"保存",8,oC),i("button",{class:"btn btn-sm",onClick:Y[11]||(Y[11]=Ie=>g.value=null)},"取消")],64)):($(),A(Oe,{key:1},[i("span",{class:Ge(["proj-name",{archived:ue.archived===1}])},F(ue.name),3),i("button",{class:"icon-btn",title:"重命名",onClick:Ie=>ge(ue)},[he(qe,{name:"edit",size:14})],8,rC),i("button",{class:"btn btn-sm",onClick:Ie=>_e(ue)},F(ue.archived===1?"恢复":"归档"),9,aC)],64))]))),128)),n.value.length?ce("",!0):($(),A("div",iC,"暂无项目,先添加一个"))]),i("div",lC,[Y[37]||(Y[37]=i("div",{class:"section-title"},"常用地点",-1)),Ee(i("textarea",{class:"textarea","onUpdate:modelValue":Y[12]||(Y[12]=ue=>l.value=ue),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,l.value]]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:X},"保存地点"),Y[36]||(Y[36]=i("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),i("div",uC,[Y[38]||(Y[38]=i("div",{class:"section-title"},"多端数据同步",-1)),i("div",cC,"云端账号:"+F(Ye.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),i("div",dC,[i("button",{class:"btn btn-primary btn-sm",disabled:fe.value,onClick:kt},F(fe.value?"同步中":"立即同步"),9,fC),i("button",{class:"btn btn-sm",onClick:bt},"重新校验连接")]),We.value?($(),A("div",pC,"上次同步:"+F(Pe.value||"--")+" · "+F(We.value),1)):ce("",!0),He.value?($(),A("div",vC,F(He.value),1)):ce("",!0),ke.value?($(),A("div",mC,"最近自动同步失败:"+F(ke.value)+"(可点「立即同步」重试)",1)):ce("",!0)]),i("div",hC,[Y[43]||(Y[43]=i("div",{class:"section-title"},"AI 润色配置(可选)",-1)),i("div",yC,[i("div",gC,[Y[39]||(Y[39]=i("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":Y[13]||(Y[13]=ue=>c.value=ue),placeholder:"https://api.example.com/v1"},null,512),[[De,c.value]])]),i("div",bC,[Y[40]||(Y[40]=i("label",null,"API Key",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":Y[14]||(Y[14]=ue=>f.value=ue),placeholder:"sk-..."},null,512),[[De,f.value]])]),i("div",wC,[Y[41]||(Y[41]=i("label",null,"模型名称",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":Y[15]||(Y[15]=ue=>m.value=ue),placeholder:"如:deepseek-chat"},null,512),[[De,m.value]])])]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:b},"保存 AI 配置"),Y[42]||(Y[42]=i("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),i("div",_C,[Y[47]||(Y[47]=i("div",{class:"section-title"},"工作分类",-1)),i("div",kC,[i("div",CC,[Y[44]||(Y[44]=i("span",{class:"muted"},"工作记录分类",-1)),i("button",{class:"btn btn-xs",onClick:Y[16]||(Y[16]=ue=>U("log"))},"添加")]),i("div",xC,[($(!0),A(Oe,null,st(k.value,(ue,Ie)=>($(),A("span",{key:ue+Ie,class:"cat-chip"},[_t(F(ue)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:rt=>S("log",Ie,ue)},"改",8,$C),i("button",{class:"chip-btn",title:"删除",onClick:rt=>z("log",Ie)},"删",8,SC)]))),128))])]),i("div",EC,[i("div",TC,[Y[45]||(Y[45]=i("span",{class:"muted"},"记账支出分类",-1)),i("button",{class:"btn btn-xs",onClick:Y[17]||(Y[17]=ue=>U("expense"))},"添加")]),i("div",AC,[($(!0),A(Oe,null,st(O.value,(ue,Ie)=>($(),A("span",{key:ue+Ie,class:"cat-chip"},[_t(F(ue)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:rt=>S("expense",Ie,ue)},"改",8,PC),i("button",{class:"chip-btn",title:"删除",onClick:rt=>z("expense",Ie)},"删",8,OC)]))),128))])]),i("div",MC,[i("div",IC,[Y[46]||(Y[46]=i("span",{class:"muted"},"记账收入分类",-1)),i("button",{class:"btn btn-xs",onClick:Y[18]||(Y[18]=ue=>U("income"))},"添加")]),i("div",jC,[($(!0),A(Oe,null,st(x.value,(ue,Ie)=>($(),A("span",{key:ue+Ie,class:"cat-chip"},[_t(F(ue)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:rt=>S("income",Ie,ue)},"改",8,DC),i("button",{class:"chip-btn",title:"删除",onClick:rt=>z("income",Ie)},"删",8,LC)]))),128))])])]),i("div",RC,[Y[48]||(Y[48]=i("div",{class:"section-title"},"数据备份",-1)),i("div",KC,[i("button",{class:"btn btn-sm",onClick:de},"导出 JSON 备份"),i("button",{class:"btn btn-sm",onClick:Y[19]||(Y[19]=ue=>{var Ie;return(Ie=j.value)==null?void 0:Ie.click()})},"导入 JSON 备份"),i("button",{class:"btn btn-sm",onClick:p},"导出工作记录 CSV"),i("button",{class:"btn btn-sm",onClick:w},"导出考勤 CSV"),i("input",{ref_key:"fileInput",ref:j,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Le},null,544)]),M.value?($(),A("div",NC,F(M.value),1)):ce("",!0),Y[49]||(Y[49]=i("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),he(Lk,{open:H.value.open,title:H.value.index>=0?"修改分类名称":"添加分类",label:"分类名称",placeholder:"如:制度学习 / 差旅交通",initial:H.value.initial,validate:D,"confirm-text":"保存",onCancel:Y[20]||(Y[20]=ue=>H.value.open=!1),onConfirm:Z},null,8,["open","title","initial"]),he(_n,{open:!!oe.value,title:"删除分类",message:oe.value?"将删除分类「"+oe.value.name+"」。历史记录不受影响,仍按原分类展示。":"","confirm-text":"删除",danger:"",onCancel:Y[21]||(Y[21]=ue=>oe.value=null),onConfirm:ne},null,8,["open","message"]),he(_n,{open:!!T.value,title:"导入确认",message:T.value?"将从文件「"+T.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:Y[22]||(Y[22]=ue=>T.value=null),onConfirm:Se},null,8,["open","message"]),he(_n,{open:Ue.value,title:"删除用户确认",message:"将永久删除云端账号「"+ee.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:Y[23]||(Y[23]=ue=>Ue.value=!1),onConfirm:yt},null,8,["open","message"])]))}}),VC=Kt(FC,[["__scopeId","data-v-10f77319"]]),BC={class:"tp-main"},UC={class:"tp-title"},qC={class:"tp-meta"},HC={class:"tp-time num"},zC=jt({__name:"TimerPanel",setup(e){const t=P(null),n=P(Date.now());let o=null,r=null;async function l(){try{t.value=await Ph()}catch{}}const c=et(()=>{const h=t.value;if(!h||!h.timer_started_at)return 0;const k=(h.actual_minutes||0)*60,O=Math.max(0,Math.floor((n.value-new Date(h.timer_started_at).getTime())/1e3));return k+O}),f=et(()=>{const h=c.value,k=Math.floor(h/3600),O=Math.floor(h%3600/60),x=h%60,I=H=>String(H).padStart(2,"0");return k>0?k+":"+I(O)+":"+I(x):O+":"+I(x)});async function m(){const h=t.value;h&&(await Sa(h.id),Ne("已停止计时:"+h.title),await l())}function g(){location.hash="#/plan"}return ut(Sd,()=>{l()}),ln(()=>{l(),o=window.setInterval(()=>{l()},15e3),r=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",l)}),hn(()=>{o!==null&&window.clearInterval(o),r!==null&&window.clearInterval(r),window.removeEventListener("focus",l)}),(h,k)=>($(),gt(Jn,{name:"tp"},{default:$n(()=>[t.value&&t.value.timer_started_at?($(),A("div",{key:0,class:"tp",onClick:g,title:"点击查看计划页"},[k[0]||(k[0]=i("span",{class:"tp-pulse"},null,-1)),i("span",BC,[i("span",UC,F(t.value.title),1),i("span",qC,F(t.value.kind)+" · 计时中",1)]),i("span",HC,F(f.value),1),i("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Nt(m,["stop"])},"停止")])):ce("",!0)]),_:1}))}}),WC=Kt(zC,[["__scopeId","data-v-a8f9ed22"]]),GC={class:"admin-page"},YC={class:"card table-card"},JC={class:"toolbar"},XC={key:0,class:"form-error tb-error"},QC={class:"admin-table"},ZC={class:"td-name","data-label":"用户名"},ex={"data-label":"角色"},tx={key:0,class:"role-badge"},nx={key:1,class:"muted"},sx={class:"muted num","data-label":"创建时间"},ox={class:"muted num","data-label":"数据量"},rx={class:"td-ops"},ax={class:"ops"},ix=["onClick"],lx=["disabled","onClick"],ux={key:0},cx={key:1,class:"muted load-line"},dx={class:"dialog",role:"dialog","aria-label":"新增用户"},fx={class:"dialog-head"},px={class:"dialog-body"},vx={class:"form-row"},mx={class:"form-row"},hx={class:"form-row"},yx={key:0,class:"form-error"},gx={class:"dialog-btns"},bx=["disabled"],wx={class:"dialog",role:"dialog","aria-label":"重置密码"},_x={class:"dialog-head"},kx={class:"dialog-title"},Cx={class:"dialog-body"},xx={class:"form-row"},$x={key:0,class:"form-error"},Sx={class:"dialog-btns"},Ex=["disabled"],Tx=jt({__name:"UserAdminView",setup(e){const t=P([]),n=P(""),o=P(!0),r=P("");async function l(j,T){const M=await Fs();let ee=$a();if(!ee){const $e=pn(),ye=await fetch(M+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:$e==null?void 0:$e.username,password:$e==null?void 0:$e.password})});if(ye.ok){const Te=await ye.json();ee=String(Te.token||""),zo(ee)}}const Ae=await fetch(M+j,{method:T?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ee},body:T?JSON.stringify(T):void 0});if(Ae.status===401&&pn()){const $e=pn(),ye=await fetch(M+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:$e==null?void 0:$e.username,password:$e==null?void 0:$e.password})});if(ye.ok){const Te=await ye.json();ee=String(Te.token||""),zo(ee);const Ue=await fetch(M+j,{method:T?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ee},body:T?JSON.stringify(T):void 0});return{ok:Ue.ok,status:Ue.status,data:await Ue.json().catch(()=>({}))}}}return{ok:Ae.ok,status:Ae.status,data:await Ae.json().catch(()=>({}))}}async function c(){o.value=!0,r.value="";const j=await l("/api/admin/users");if(!j.ok){o.value=!1,r.value=j.data&&j.data.error||"加载失败 "+j.status;return}t.value=j.data.users||[],n.value=j.data.me||"",o.value=!1}function f(j){return j<=0?"--":j<1024?j+" B":j<1024*1024?(j/1024).toFixed(1)+" KB":(j/1024/1024).toFixed(2)+" MB"}function m(j){return(j||"").slice(0,10)}const g=P(!1),h=P(""),k=P(""),O=P(""),x=P(""),I=P(!1);function H(){g.value=!0,x.value="",h.value="",k.value="",O.value=""}async function oe(){const j=h.value.trim();if(k.value!==O.value){x.value="两次输入的密码不一致";return}if(k.value.length<6){x.value="密码至少 6 位";return}I.value=!0;const T=await l("/api/admin/users/create",{username:j,password:k.value});if(I.value=!1,!T.ok){x.value=T.data&&T.data.error||"创建失败 "+T.status;return}Ne("用户「"+j+"」已创建"),g.value=!1,await c()}const ie=P(null),ae=P(""),U=P(""),S=P(!1);function D(j){ie.value=j,ae.value="",U.value=""}async function Z(){if(!ie.value)return;if(ae.value.length<6){U.value="密码至少 6 位";return}S.value=!0;const j=await l("/api/admin/users/password",{userId:ie.value.id,newPassword:ae.value});if(S.value=!1,!j.ok){U.value=j.data&&j.data.error||"重置失败 "+j.status;return}Ne("已重置「"+ie.value.username+"」的登录密码"),ie.value=null}const z=P(null);async function ne(){if(!z.value)return;const j=await l("/api/admin/users/delete",{userId:z.value.id});if(!j.ok){z.value=null,Ne(j.data&&j.data.error||"删除失败");return}Ne("已删除账号「"+z.value.username+"」及其全部云端数据"),z.value=null,await c()}return ln(c),(j,T)=>($(),A("div",GC,[i("div",YC,[i("div",JC,[T[12]||(T[12]=i("div",{class:"head-wrap"},[i("div",{class:"tb-title"},"用户管理"),i("div",{class:"muted tb-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),i("button",{class:"btn btn-primary btn-sm",onClick:H},[he(qe,{name:"plus",size:14}),T[11]||(T[11]=_t(" 新增用户 ",-1))])]),r.value?($(),A("div",XC,F(r.value),1)):ce("",!0),i("table",QC,[T[14]||(T[14]=i("thead",null,[i("tr",null,[i("th",null,"用户名"),i("th",null,"角色"),i("th",null,"创建时间"),i("th",null,"数据量"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Oe,null,st(t.value,M=>($(),A("tr",{key:M.id},[i("td",ZC,F(M.username),1),i("td",ex,[M.role==="admin"?($(),A("span",tx,"管理员")):($(),A("span",nx,"普通用户"))]),i("td",sx,F(m(M.created_at)),1),i("td",ox,F(f(M.data_bytes)),1),i("td",rx,[i("div",ax,[i("button",{class:"btn btn-xs",onClick:ee=>D(M)},"重置密码",8,ix),i("button",{class:"btn btn-xs btn-danger",disabled:M.id===n.value,onClick:ee=>z.value=M},"删除",8,lx)])])]))),128)),!o.value&&!t.value.length?($(),A("tr",ux,[...T[13]||(T[13]=[i("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):ce("",!0)])]),o.value?($(),A("div",cx,"加载中")):ce("",!0)]),T[20]||(T[20]=i("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),gt(Cn,{to:"body"},[g.value?($(),A("div",{key:0,class:"mask",onClick:T[5]||(T[5]=Nt(M=>g.value=!1,["self"]))},[i("div",dx,[i("div",fx,[T[15]||(T[15]=i("span",{class:"dialog-title"},"新增用户",-1)),i("button",{class:"icon-btn",onClick:T[0]||(T[0]=M=>g.value=!1)},[he(qe,{name:"close",size:16})])]),i("div",px,[i("div",vx,[T[16]||(T[16]=i("label",null,"用户名(2 到 20 个字符)",-1)),Ee(i("input",{class:"input","onUpdate:modelValue":T[1]||(T[1]=M=>h.value=M),placeholder:"如:xiaowang"},null,512),[[De,h.value]])]),i("div",mx,[T[17]||(T[17]=i("label",null,"初始登录密码(至少 6 位)",-1)),Ee(i("input",{class:"input",type:"password","onUpdate:modelValue":T[2]||(T[2]=M=>k.value=M),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[De,k.value]])]),i("div",hx,[T[18]||(T[18]=i("label",null,"确认密码",-1)),Ee(i("input",{class:"input",type:"password","onUpdate:modelValue":T[3]||(T[3]=M=>O.value=M),onKeydown:Mt(oe,["enter"])},null,544),[[De,O.value]])]),x.value?($(),A("div",yx,F(x.value),1)):ce("",!0)]),i("div",gx,[i("button",{class:"btn btn-sm",onClick:T[4]||(T[4]=M=>g.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",disabled:I.value||!h.value.trim(),onClick:oe},F(I.value?"创建中":"创建"),9,bx)])])])):ce("",!0)])),($(),gt(Cn,{to:"body"},[ie.value?($(),A("div",{key:0,class:"mask",onClick:T[9]||(T[9]=Nt(M=>ie.value=null,["self"]))},[i("div",wx,[i("div",_x,[i("span",kx,"重置「"+F(ie.value.username)+"」的登录密码",1),i("button",{class:"icon-btn",onClick:T[6]||(T[6]=M=>ie.value=null)},[he(qe,{name:"close",size:16})])]),i("div",Cx,[i("div",xx,[T[19]||(T[19]=i("label",null,"新登录密码(至少 6 位)",-1)),Ee(i("input",{class:"input",type:"password","onUpdate:modelValue":T[7]||(T[7]=M=>ae.value=M),onKeydown:Mt(Z,["enter"])},null,544),[[De,ae.value]])]),U.value?($(),A("div",$x,F(U.value),1)):ce("",!0)]),i("div",Sx,[i("button",{class:"btn btn-sm",onClick:T[8]||(T[8]=M=>ie.value=null)},"取消"),i("button",{class:"btn btn-primary btn-sm",disabled:S.value,onClick:Z},F(S.value?"提交中":"重置"),9,Ex)])])])):ce("",!0)])),he(_n,{open:!!z.value,title:"删除用户确认",message:z.value?"将永久删除云端账号「"+z.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:T[10]||(T[10]=M=>z.value=null),onConfirm:ne},null,8,["open","message"])]))}}),Ax=Kt(Tx,[["__scopeId","data-v-2d48d2c9"]]),Px={class:"login-page"},Ox={class:"card login-card"},Mx={class:"login-brand"},Ix={class:"brand-icon"},jx={class:"seg"},Dx=["placeholder"],Lx={key:1,class:"form-error"},Rx=["disabled"],Kx=jt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,o=P("login"),r=P(""),l=P(""),c=P(""),f=P(""),m=P(!1);function g(k){o.value=k,f.value="",c.value=""}async function h(){if(!m.value){f.value="",m.value=!0;try{let k;if(o.value==="login")k=await Vm(r.value,l.value);else{if(l.value.length<6){f.value="登录密码至少 6 位",m.value=!1;return}if(l.value!==c.value){f.value="两次输入的密码不一致",m.value=!1;return}k=await Bm(r.value,l.value)}n("login",k)}catch(k){f.value=k instanceof Error?k.message:"操作失败"}m.value=!1}}return(k,O)=>($(),A("div",Px,[i("div",Ox,[i("div",Mx,[i("div",Ix,[he(qe,{name:"calendar",size:22})]),O[5]||(O[5]=i("div",{class:"login-title"},"实习工作日志",-1)),O[6]||(O[6]=i("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),O[7]||(O[7]=i("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),i("div",jx,[i("button",{class:Ge(["seg-btn",{active:o.value==="login"}]),onClick:O[0]||(O[0]=x=>g("login"))},"登录",2),i("button",{class:Ge(["seg-btn",{active:o.value==="create"}]),onClick:O[1]||(O[1]=x=>g("create"))},"创建用户",2)]),Ee(i("input",{class:"input","onUpdate:modelValue":O[2]||(O[2]=x=>r.value=x),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(h,["enter"])},null,544),[[De,r.value]]),Ee(i("input",{type:"password",class:"input","onUpdate:modelValue":O[3]||(O[3]=x=>l.value=x),placeholder:o.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(h,["enter"])},null,40,Dx),[[De,l.value]]),o.value==="create"?Ee(($(),A("input",{key:0,type:"password",class:"input","onUpdate:modelValue":O[4]||(O[4]=x=>c.value=x),placeholder:"再次输入密码",onKeydown:Mt(h,["enter"])},null,544)),[[De,c.value]]):ce("",!0),f.value?($(),A("div",Lx,F(f.value),1)):ce("",!0),i("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:h},F(o.value==="login"?"登录":"创建并进入"),9,Rx),O[8]||(O[8]=i("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Nx=Kt(Kx,[["__scopeId","data-v-e9c1c40d"]]),Fx={key:1,class:"app"},Vx={class:"side"},Bx={class:"brand-mark"},Ux={class:"side-nav"},qx={key:0,class:"nav-group"},Hx=["data-tip","onClick"],zx={class:"nav-label"},Wx={class:"side-foot"},Gx={class:"avatar"},Yx={class:"foot-name"},Jx={class:"main"},Xx={class:"topbar"},Qx={class:"title"},Zx={class:"gsearch"},e$={key:0,class:"gs-panel"},t$={key:0,class:"gs-group muted"},n$=["onMousedown"],s$={class:"tag"},o$={class:"gs-text"},r$={class:"muted num gs-date"},a$={key:1,class:"gs-group muted"},i$=["onMousedown"],l$={class:"gs-text"},u$={class:"muted gs-sub"},c$={key:1,class:"gs-empty muted"},d$={class:"topbar-actions"},f$=["disabled"],p$={class:"num"},v$={class:"content"},m$={class:"content-inner"},h$={class:"tabbar"},y$=["onClick"],g$={class:"sheet-user num"},b$=["onClick"],w$={class:"sheet-name"},_$={class:"msw"},k$={class:"msw-bar"},C$={class:"msw-results"},x$={key:0,class:"gs-group muted"},$$=["onMousedown"],S$={class:"tag"},E$={class:"gs-text"},T$={class:"muted num gs-date"},A$={key:1,class:"gs-group muted"},P$=["onMousedown"],O$={class:"gs-text"},M$={class:"muted gs-sub"},I$={key:1,class:"gs-empty muted"},j$={class:"toast-wrap"},D$=jt({__name:"App",setup(e){const t=Py(),n=P(Wo());async function o(b){n.value=b,ra(b.userId),location.hash="#/calendar",D.value="calendar",await Pe(),await je(),c();try{await Td(),await no()}catch{}Ne("欢迎,"+b.username);const p=sessionStorage.getItem("dsh_migrate_toast");p&&(sessionStorage.removeItem("dsh_migrate_toast"),Ne("已迁移原有数据 "+p+" 条"))}async function r(){Te.value=!1,$e.value=!1,oh(),l!==null&&(window.clearInterval(l),l=null),await qm(),n.value=null,D.value="calendar",location.hash="#/calendar",Ne("已退出登录")}let l=null;function c(){sh(),l!==null&&window.clearInterval(l),l=window.setInterval(()=>{no()},60*1e3),no()}const f=P(null),m=P(""),g=P(!1),h=P({logs:[],memos:[]});let k=null;const O=et(()=>!!(h.value.logs.length||h.value.memos.length));function x(){k&&window.clearTimeout(k);const b=m.value;k=window.setTimeout(async()=>{const p=b.trim();if(!p){h.value={logs:[],memos:[]};return}const w=await Promise.all([Wh(p,8),Gh(p,4)]);h.value={logs:w[0],memos:w[1]}},200)}function I(){m.value="",h.value={logs:[],memos:[]},g.value=!1}function H(b){Fi.value=b.date,Z("calendar"),I()}function oe(b){Vi.value=b.id,Z("memo"),I()}function ie(){window.setTimeout(()=>{g.value=!1},150)}function ae(b){var p;(b.ctrlKey||b.metaKey)&&b.key.toLowerCase()==="k"&&(b.preventDefault(),(p=f.value)==null||p.focus())}const U=[{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 S(){var p;const b=(location.hash||"").replace("#/","");return!U.some(w=>w.key===b)||b==="admin"&&(((p=Wo())==null?void 0:p.username)||"")!=="xionglin"?"calendar":b}const D=P(S());window.addEventListener("hashchange",()=>{D.value=S()});function Z(b){location.hash="#/"+b}const z=et(()=>U.find(b=>b.key===D.value)||U[0]),ne=et(()=>{var b;return(((b=n.value)==null?void 0:b.username)||"")==="xionglin"}),j=et(()=>ne.value?U:U.filter(b=>b.key!=="admin")),T=et(()=>{const b=U.filter(p=>!ee.includes(p.key));return ne.value?b:b.filter(p=>p.key!=="admin")}),M=et(()=>T.value.some(b=>b.key===D.value));ut([ne,D],()=>{D.value==="admin"&&!ne.value&&Z("calendar")},{immediate:!0});const ee=["calendar","today","plan","ledger"],Ae=U.filter(b=>ee.includes(b.key)),$e=P(!1);function ye(b){$e.value=!1,Z(b)}const Te=P(!1),Ue=P(null);function Ke(){Te.value=!0,window.setTimeout(()=>{var b;return(b=Ue.value)==null?void 0:b.focus()},60)}function Ye(b){H(b),Te.value=!1}function We(b){oe(b),Te.value=!1}const He=P(at()),ke=P(void 0),fe=P(!1);async function Pe(){if(ke.value=await xn(He.value),fe.value=!1,new Date().getHours()<4){const p=await xn(Ot(He.value,-1));fe.value=!!(p&&p.clock_in_at&&!p.clock_out_at)}}const ot=et(()=>{const b=ke.value;return b&&b.clock_in_at&&!b.clock_out_at?!0:fe.value&&!(b&&b.clock_in_at)}),bt=et(()=>{const b=ke.value;return!!(b&&b.clock_in_at&&b.clock_out_at)}),kt=et(()=>{const b=ke.value;return ot.value?"下班打卡":bt.value?"已打卡 "+kn(b==null?void 0:b.clock_in_at)+" - "+kn(b==null?void 0:b.clock_out_at):"上班打卡"});async function Ft(){if(ot.value)try{await gh()}catch{}else await Dd(He.value);await Pe(),ls()}ut(uo,()=>{n.value&&Pe()});const yt=P(!1);async function je(){if((await ms()).remind_weekly==="off"){yt.value=!1;return}const p=new Date().getDay();if(p===5||p===6||p===0){const w=await bl(Zs(He.value));yt.value=!w||!w.highlights&&!w.challenges&&!w.plan_next}else yt.value=!1}return ln(async()=>{window.addEventListener("keydown",ae),n.value&&(ra(n.value.userId),await Pe(),await je(),c())}),(b,p)=>{var w,E,X;return n.value?($(),A("div",Fx,[i("nav",Vx,[i("div",{class:"brand",onClick:p[0]||(p[0]=G=>Z("calendar"))},[i("span",Bx,[he(qe,{name:"calendar",size:15})]),p[12]||(p[12]=i("span",{class:"brand-name"},"实习工作日志",-1))]),i("div",Ux,[($(!0),A(Oe,null,st(j.value,(G,ge)=>($(),A(Oe,{key:G.key},[ge===0||G.group!==j.value[ge-1].group?($(),A("div",qx,F(G.group),1)):ce("",!0),i("button",{class:Ge(["nav-btn",{active:D.value===G.key}]),"data-tip":G.name,onClick:be=>Z(G.key)},[he(qe,{name:G.icon,size:17},null,8,["name"]),i("span",zx,F(G.name),1)],10,Hx)],64))),128))]),i("div",Wx,[i("span",Gx,F((((w=n.value)==null?void 0:w.username)||"用户").slice(0,1).toUpperCase()),1),i("span",Yx,F((E=n.value)==null?void 0:E.username),1),i("button",{class:"icon-btn",title:"退出登录",onClick:r},[he(qe,{name:"export",size:15})])])]),i("div",Jx,[i("header",Xx,[i("span",Qx,F(z.value.name),1),i("button",{class:"mob-search-btn",title:"搜索",onClick:Ke},[he(qe,{name:"search",size:16})]),i("div",Zx,[he(qe,{name:"search",size:14,class:"gs-icon"}),Ee(i("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":p[1]||(p[1]=G=>m.value=G),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:x,onFocus:p[2]||(p[2]=G=>g.value=!0),onBlur:ie,onKeydown:Mt(I,["esc"])},null,544),[[De,m.value]]),g.value&&m.value.trim()?($(),A("div",e$,[O.value?($(),A(Oe,{key:0},[h.value.logs.length?($(),A("div",t$,"工作记录")):ce("",!0),($(!0),A(Oe,null,st(h.value.logs,G=>($(),A("div",{key:"l"+G.id,class:"gs-item",onMousedown:Nt(ge=>H(G),["prevent"])},[i("span",s$,F(Ht(qo)(G.category)),1),i("span",o$,F(G.content),1),i("span",r$,F(G.date),1)],40,n$))),128)),h.value.memos.length?($(),A("div",a$,"备忘录")):ce("",!0),($(!0),A(Oe,null,st(h.value.memos,G=>($(),A("div",{key:"m"+G.id,class:"gs-item",onMousedown:Nt(ge=>oe(G),["prevent"])},[i("span",l$,F(G.title||"无标题"),1),i("span",u$,F(G.content),1)],40,i$))),128))],64)):($(),A("div",c$,"无匹配结果"))])):ce("",!0)]),p[14]||(p[14]=i("span",{class:"flex1"},null,-1)),i("div",d$,[yt.value?($(),A("button",{key:0,class:"week-tip",onClick:p[3]||(p[3]=G=>Z("report"))},[...p[13]||(p[13]=[i("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),_t(" 填写本周周记 ",-1)])])):ce("",!0),i("button",{class:"btn btn-primary",disabled:bt.value,onClick:Ft},[he(qe,{name:bt.value?"check-circle":"clock",size:14},null,8,["name"]),i("span",p$,F(kt.value),1)],8,f$)])]),i("main",v$,[i("div",m$,[D.value==="calendar"?($(),gt(Bg,{key:0})):D.value==="today"?($(),gt(fb,{key:1})):D.value==="plan"?($(),gt(bw,{key:2})):D.value==="stats"?($(),gt(Jw,{key:3})):D.value==="report"?($(),gt(D_,{key:4})):D.value==="ledger"?($(),gt(d0,{key:5})):D.value==="memo"?($(),gt(A0,{key:6})):D.value==="vault"?($(),gt($k,{key:7})):D.value==="admin"?($(),gt(Ax,{key:8})):($(),gt(VC,{key:9}))])]),i("nav",h$,[($(!0),A(Oe,null,st(Ht(Ae),G=>($(),A("button",{key:G.key,class:Ge(["tab-btn",{active:D.value===G.key}]),onClick:ge=>Z(G.key)},[he(qe,{name:G.icon,size:20},null,8,["name"]),i("span",null,F(G.name),1)],10,y$))),128)),i("button",{class:Ge(["tab-btn",{active:M.value}]),onClick:p[4]||(p[4]=G=>$e.value=!0)},[he(qe,{name:"more",size:20}),p[15]||(p[15]=i("span",null,"更多",-1))],2)]),$e.value?($(),A("div",{key:0,class:"sheet-mask",onClick:p[7]||(p[7]=G=>$e.value=!1)},[i("div",{class:"more-sheet",onClick:p[6]||(p[6]=Nt(()=>{},["stop"]))},[p[17]||(p[17]=i("div",{class:"sheet-handle"},null,-1)),i("div",g$,F((X=n.value)==null?void 0:X.username),1),($(!0),A(Oe,null,st(T.value,G=>($(),A("button",{key:G.key,class:"sheet-row",onClick:ge=>ye(G.key)},[he(qe,{name:G.icon,size:18},null,8,["name"]),i("span",w$,F(G.name),1),he(qe,{name:"chevron-right",size:14,class:"sheet-go"})],8,b$))),128)),p[18]||(p[18]=i("div",{class:"sheet-divider"},null,-1)),i("button",{class:"sheet-row sheet-danger",onClick:p[5]||(p[5]=G=>{$e.value=!1,r()})},[he(qe,{name:"close",size:18}),p[16]||(p[16]=i("span",{class:"sheet-name"},"退出登录",-1))])])])):ce("",!0),Te.value?($(),A("div",{key:1,class:"msw-mask",onClick:p[11]||(p[11]=Nt(G=>Te.value=!1,["self"]))},[i("div",_$,[i("div",k$,[he(qe,{name:"search",size:16,class:"msw-icon"}),Ee(i("input",{ref_key:"msInput",ref:Ue,class:"msw-input","onUpdate:modelValue":p[8]||(p[8]=G=>m.value=G),placeholder:"搜索工作记录与备忘录",onInput:x,onKeydown:p[9]||(p[9]=Mt(G=>Te.value=!1,["esc"]))},null,544),[[De,m.value]]),i("button",{class:"icon-btn",onClick:p[10]||(p[10]=G=>{I(),Te.value=!1})},[he(qe,{name:"close",size:16})])]),i("div",C$,[O.value?($(),A(Oe,{key:0},[h.value.logs.length?($(),A("div",x$,"工作记录")):ce("",!0),($(!0),A(Oe,null,st(h.value.logs,G=>($(),A("div",{key:"l"+G.id,class:"msw-item",onMousedown:Nt(ge=>Ye(G),["prevent"])},[i("span",S$,F(Ht(qo)(G.category)),1),i("span",E$,F(G.content),1),i("span",T$,F(G.date),1)],40,$$))),128)),h.value.memos.length?($(),A("div",A$,"备忘录")):ce("",!0),($(!0),A(Oe,null,st(h.value.memos,G=>($(),A("div",{key:"m"+G.id,class:"msw-item",onMousedown:Nt(ge=>We(G),["prevent"])},[i("span",O$,F(G.title||"无标题"),1),i("span",M$,F(G.content),1)],40,P$))),128))],64)):m.value.trim()?($(),A("div",I$,"无匹配结果")):ce("",!0)])])])):ce("",!0)]),n.value?($(),gt(WC,{key:0})):ce("",!0),i("div",j$,[he(Nv,{name:"toast"},{default:$n(()=>[($(!0),A(Oe,null,st(Ht(t),G=>($(),A("div",{key:G.id,class:"toast"},F(G.text),1))),128))]),_:1})])])):($(),gt(Nx,{key:0,onLogin:o}))}}}),L$=Kt(D$,[["__scopeId","data-v-7d26fba6"]]);function Vr(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",l=>{l.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const o=document.createElement("div");o.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",o.textContent=e+` -`+t;const r=document.createElement("button");r.textContent="重新加载",r.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;",r.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(o),n.appendChild(r)}catch{}}async function R$(){const e=await Um();e&&ra(e.userId);const t=em(L$);t.config.errorHandler=(n,o,r)=>{const l=n;Vr("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",l&&(l.stack||l.message)||String(n)+` -触发位置: `+r)},window.addEventListener("unhandledrejection",n=>{const o=n.reason;Vr("未处理的异步错误(点击空白处关闭)",o&&(o.stack||o.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Vr("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}R$().catch(e=>{Vr("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{qd as W,Vd as _,eb as b,Ud as r}; diff --git a/intern-log/dist/assets/index-ynPmf8i8.js b/intern-log/dist/assets/index-ynPmf8i8.js new file mode 100644 index 0000000..ca90c76 --- /dev/null +++ b/intern-log/dist/assets/index-ynPmf8i8.js @@ -0,0 +1,27 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();/** +* @vue/shared v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Ji(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const bt={},Os=[],Mn=()=>{},Zu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),It=Object.assign,Xi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},yf=Object.prototype.hasOwnProperty,vt=(e,t)=>yf.call(e,t),We=Array.isArray,as=e=>Wo(e)==="[object Map]",Ds=e=>Wo(e)==="[object Set]",eu=e=>Wo(e)==="[object Date]",tt=e=>typeof e=="function",Tt=e=>typeof e=="string",In=e=>typeof e=="symbol",ht=e=>e!==null&&typeof e=="object",ec=e=>(ht(e)||tt(e))&&tt(e.then)&&tt(e.catch),tc=Object.prototype.toString,Wo=e=>tc.call(e),gf=e=>Wo(e).slice(8,-1),nc=e=>Wo(e)==="[object Object]",Qi=e=>Tt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,So=Ji(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},bf=/-\w/g,bn=fa(e=>e.replace(bf,t=>t.slice(1).toUpperCase())),wf=/\B([A-Z])/g,vs=fa(e=>e.replace(wf,"-$1").toLowerCase()),sc=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),ri=fa(e=>e?`on${sc(e)}`:""),On=(e,t)=>!Object.is(e,t),Mr=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_f=e=>{const t=Tt(e)?Number(e):NaN;return isNaN(t)?e:t};let tu;const va=()=>tu||(tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qn(e){if(We(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(kf).forEach(n=>{if(n){const o=n.split(Cf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ye(e){let t="";if(Tt(e))t=e;else if(We(e))for(let n=0;nus(n,t))}const ac=e=>!!(e&&e.__v_isRef===!0),F=e=>Tt(e)?e:e==null?"":We(e)||ht(e)&&(e.toString===tc||!tt(e.toString))?ac(e)?F(e.value):JSON.stringify(e,ic,2):String(e),ic=(e,t)=>ac(t)?ic(e,t.value):as(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],l)=>(n[ai(o,l)+" =>"]=r,n),{})}:Ds(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ai(n))}:In(t)?ai(t):ht(t)&&!We(t)&&!nc(t)?String(t):t,ai=(e,t="")=>{var n;return In(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 qt;class Of{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&&qt&&(qt.active?(this.parent=qt,this.index=(qt.scopes||(qt.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 o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(qt===this)qt=this.prevScope;else{let t=qt;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,o;for(n=0,o=this.effects.length;n0)return;if(To){let t=To;for(To=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Eo;){let t=Eo;for(Eo=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function dc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fc(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),tl(o),If(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function _i(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function pc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jo)||(e.globalVersion=jo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_i(e))))return;e.flags|=2;const t=e.dep,n=kt,o=wn;kt=e,wn=!0;try{dc(e);const r=e.fn(e._value);(t.version===0||On(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{kt=n,wn=o,fc(e),e.flags&=-3}}function tl(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)tl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function If(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wn=!0;const vc=[];function jn(){vc.push(wn),wn=!1}function Dn(){const e=vc.pop();wn=e===void 0?!0:e}function ou(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=kt;kt=void 0;try{t()}finally{kt=n}}}let jo=0;class jf{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 nl{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(!kt||!wn||kt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==kt)n=this.activeLink=new jf(kt,this),kt.deps?(n.prevDep=kt.depsTail,kt.depsTail.nextDep=n,kt.depsTail=n):kt.deps=kt.depsTail=n,mc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=kt.depsTail,n.nextDep=void 0,kt.depsTail.nextDep=n,kt.depsTail=n,kt.deps===n&&(kt.deps=o)}return n}trigger(t){this.version++,jo++,this.notify(t)}notify(t){Zi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{el()}}}function mc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)mc(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ki=new WeakMap,Is=Symbol(""),Ci=Symbol(""),Do=Symbol("");function Yt(e,t,n){if(wn&&kt){let o=ki.get(e);o||ki.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new nl),r.map=o,r.key=n),r.track()}}function Bn(e,t,n,o,r,l){const c=ki.get(e);if(!c){jo++;return}const f=m=>{m&&m.trigger()};if(Zi(),t==="clear")c.forEach(f);else{const m=We(e),g=m&&Qi(n);if(m&&n==="length"){const h=Number(o);c.forEach((_,P)=>{(P==="length"||P===Do||!In(P)&&P>=h)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),g&&f(c.get(Do)),t){case"add":m?g&&f(c.get("length")):(f(c.get(Is)),as(e)&&f(c.get(Ci)));break;case"delete":m||(f(c.get(Is)),as(e)&&f(c.get(Ci)));break;case"set":as(e)&&f(c.get(Is));break}}el()}function Ys(e){const t=dt(e);return t===e||(Yt(t,"iterate",Do),fn(e))?t:Ln(e)?is(e)?t.map(n=>cs(vn(n))):t.map(cs):t.map(vn)}function ma(e){return Yt(e=dt(e),"iterate",Do),e}function Tn(e,t){return Ln(e)?cs(is(e)?vn(t):t):vn(t)}const Df={__proto__:null,[Symbol.iterator](){return li(this,Symbol.iterator,e=>Tn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>We(t)?Ys(t):t))},entries(){return li(this,"entries",e=>(e[1]=Tn(this,e[1]),e))},every(e,t){return Nn(this,"every",e,t,void 0,arguments)},filter(e,t){return Nn(this,"filter",e,t,n=>n.map(o=>Tn(this,o)),arguments)},find(e,t){return Nn(this,"find",e,t,n=>Tn(this,n),arguments)},findIndex(e,t){return Nn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nn(this,"findLast",e,t,n=>Tn(this,n),arguments)},findLastIndex(e,t){return Nn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nn(this,"forEach",e,t,void 0,arguments)},includes(...e){return ui(this,"includes",e)},indexOf(...e){return ui(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return ui(this,"lastIndexOf",e)},map(e,t){return Nn(this,"map",e,t,void 0,arguments)},pop(){return wo(this,"pop")},push(...e){return wo(this,"push",e)},reduce(e,...t){return au(this,"reduce",e,t)},reduceRight(e,...t){return au(this,"reduceRight",e,t)},shift(){return wo(this,"shift")},some(e,t){return Nn(this,"some",e,t,void 0,arguments)},splice(...e){return wo(this,"splice",e)},toReversed(){return Ys(this).toReversed()},toSorted(e){return Ys(this).toSorted(e)},toSpliced(...e){return Ys(this).toSpliced(...e)},unshift(...e){return wo(this,"unshift",e)},values(){return li(this,"values",e=>Tn(this,e))}};function li(e,t,n){const o=ma(e),r=o[t],l=r.call(o);if(o!==e&&!fn(e)){if(l[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(l));return c.next=()=>ru(l.next(),n),r!==hc[t]&&Object.defineProperties(c,{return:{get(){const f=l.return;return typeof f=="function"?f.bind(l):f}},throw:{get(){const f=l.throw;return typeof f=="function"?f.bind(l):f}}}),c}l._next=l.next,l.next=()=>ru(l._next(),n)}return l}function ru(e,t){return e.done||(e.value=t(e.value)),e}const hc=Array.prototype;function Nn(e,t,n,o,r,l){const c=ma(e),f=c!==e&&!fn(e),m=c[t];if(m!==hc[t]){const _=m.apply(e,l);return f?vn(_):_}let g=n;c!==e&&(f?g=function(_,P){return n.call(this,Tn(e,_),P,e)}:n.length>2&&(g=function(_,P){return n.call(this,_,P,e)}));const h=m.call(c,g,o);return f&&r?r(h):h}function au(e,t,n,o){const r=ma(e),l=r!==e&&!fn(e);let c=n,f=!1;r!==e&&(l?(f=o.length===0,c=function(g,h,_){return f&&(f=!1,g=Tn(e,g)),n.call(this,g,Tn(e,h),_,e)}):n.length>3&&(c=function(g,h,_){return n.call(this,g,h,_,e)}));const m=r[t](c,...o);return f?Tn(e,m):m}function ui(e,t,n){const o=dt(e);Yt(o,"iterate",Do);const r=o[t](...n);return(r===-1||r===!1)&&al(n[0])?(n[0]=dt(n[0]),o[t](...n)):r}function wo(e,t,n=[]){jn(),Zi();const o=dt(e)[t].apply(e,n);return el(),Dn(),o}const Lf=Ji("__proto__,__v_isRef,__isVue"),yc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(In));function Kf(e){In(e)||(e=String(e));const t=dt(this);return Yt(t,"has",e),t.hasOwnProperty(e)}class gc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return o===(r?l?Wf:kc:l?_c:wc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const c=We(t);if(!r){let m;if(c&&(m=Df[n]))return m;if(n==="hasOwnProperty")return Kf}const f=Reflect.get(t,n,Xt(t)?t:o);if((In(n)?yc.has(n):Lf(n))||(r||Yt(t,"get",n),l))return f;if(Xt(f)){const m=c&&Qi(n)?f:f.value;return r&&ht(m)?$i(m):m}return ht(f)?r?$i(f):ol(f):f}}class bc extends gc{constructor(t=!1){super(!1,t)}set(t,n,o,r){let l=t[n];const c=We(t)&&Qi(n);if(!this._isShallow){const g=Ln(l);if(!fn(o)&&!Ln(o)&&(l=dt(l),o=dt(o)),!c&&Xt(l)&&!Xt(o))return g||(l.value=o),!0}const f=c?Number(n)e,$r=e=>Reflect.getPrototypeOf(e);function Bf(e,t,n){return function(...o){const r=this.__v_raw,l=dt(r),c=as(l),f=e==="entries"||e===Symbol.iterator&&c,m=e==="keys"&&c,g=r[e](...o),h=n?xi:t?cs:vn;return!t&&Yt(l,"iterate",m?Ci:Is),It(Object.create(g),{next(){const{value:_,done:P}=g.next();return P?{value:_,done:P}:{value:f?[h(_[0]),h(_[1])]:h(_),done:P}}})}}function Sr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Uf(e,t){const n={get(r){const l=this.__v_raw,c=dt(l),f=dt(r);e||(On(r,f)&&Yt(c,"get",r),Yt(c,"get",f));const{has:m}=$r(c),g=t?xi:e?cs:vn;if(m.call(c,r))return g(l.get(r));if(m.call(c,f))return g(l.get(f));l!==c&&l.get(r)},get size(){const r=this.__v_raw;return!e&&Yt(dt(r),"iterate",Is),r.size},has(r){const l=this.__v_raw,c=dt(l),f=dt(r);return e||(On(r,f)&&Yt(c,"has",r),Yt(c,"has",f)),r===f?l.has(r):l.has(r)||l.has(f)},forEach(r,l){const c=this,f=c.__v_raw,m=dt(f),g=t?xi:e?cs:vn;return!e&&Yt(m,"iterate",Is),f.forEach((h,_)=>r.call(l,g(h),g(_),c))}};return It(n,e?{add:Sr("add"),set:Sr("set"),delete:Sr("delete"),clear:Sr("clear")}:{add(r){const l=dt(this),c=$r(l),f=dt(r),m=!t&&!fn(r)&&!Ln(r)?f:r;return c.has.call(l,m)||On(r,m)&&c.has.call(l,r)||On(f,m)&&c.has.call(l,f)||(l.add(m),Bn(l,"add",m,m)),this},set(r,l){!t&&!fn(l)&&!Ln(l)&&(l=dt(l));const c=dt(this),{has:f,get:m}=$r(c);let g=f.call(c,r);g||(r=dt(r),g=f.call(c,r));const h=m.call(c,r);return c.set(r,l),g?On(l,h)&&Bn(c,"set",r,l):Bn(c,"add",r,l),this},delete(r){const l=dt(this),{has:c,get:f}=$r(l);let m=c.call(l,r);m||(r=dt(r),m=c.call(l,r)),f&&f.call(l,r);const g=l.delete(r);return m&&Bn(l,"delete",r,void 0),g},clear(){const r=dt(this),l=r.size!==0,c=r.clear();return l&&Bn(r,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Bf(r,e,t)}),n}function sl(e,t){const n=Uf(e,t);return(o,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?o:Reflect.get(vt(n,r)&&r in o?n:o,r,l)}const qf={get:sl(!1,!1)},Hf={get:sl(!1,!0)},zf={get:sl(!0,!1)};const wc=new WeakMap,_c=new WeakMap,kc=new WeakMap,Wf=new WeakMap;function Gf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ol(e){return Ln(e)?e:rl(e,!1,Nf,qf,wc)}function Yf(e){return rl(e,!1,Vf,Hf,_c)}function $i(e){return rl(e,!0,Ff,zf,kc)}function rl(e,t,n,o,r){if(!ht(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=r.get(e);if(l)return l;const c=Gf(gf(e));if(c===0)return e;const f=new Proxy(e,c===2?o:n);return r.set(e,f),f}function is(e){return Ln(e)?is(e.__v_raw):!!(e&&e.__v_isReactive)}function Ln(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function al(e){return e?!!e.__v_raw:!1}function dt(e){const t=e&&e.__v_raw;return t?dt(t):e}function Jf(e){return!vt(e,"__v_skip")&&Object.isExtensible(e)&&oc(e,"__v_skip",!0),e}const vn=e=>ht(e)?ol(e):e,cs=e=>ht(e)?$i(e):e;function Xt(e){return e?e.__v_isRef===!0:!1}function O(e){return Xf(e,!1)}function Xf(e,t){return Xt(e)?e:new Qf(e,t)}class Qf{constructor(t,n){this.dep=new nl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:dt(t),this._value=n?t:vn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||fn(t)||Ln(t);t=o?t:dt(t),On(t,n)&&(this._rawValue=t,this._value=o?t:vn(t),this.dep.trigger())}}function Ht(e){return Xt(e)?e.value:e}const Zf={get:(e,t,n)=>t==="__v_raw"?e:Ht(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Xt(r)&&!Xt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Cc(e){return is(e)?e:new Proxy(e,Zf)}class ep{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new nl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&kt!==this)return cc(this,!0),!0}get value(){const t=this.dep.track();return pc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function tp(e,t,n=!1){let o,r;return tt(e)?o=e:(o=e.get,r=e.set),new ep(o,r,n)}const Er={},Br=new WeakMap;let Ss;function np(e,t=!1,n=Ss){if(n){let o=Br.get(n);o||Br.set(n,o=[]),o.push(e)}}function sp(e,t,n=bt){const{immediate:o,deep:r,once:l,scheduler:c,augmentJob:f,call:m}=n,g=S=>r?S:fn(S)||r===!1||r===0?Un(S,1):Un(S);let h,_,P,x,I=!1,H=!1;if(Xt(e)?(_=()=>e.value,I=fn(e)):is(e)?(_=()=>g(e),I=!0):We(e)?(H=!0,I=e.some(S=>is(S)||fn(S)),_=()=>e.map(S=>{if(Xt(S))return S.value;if(is(S))return g(S);if(tt(S))return m?m(S,2):S()})):tt(e)?t?_=m?()=>m(e,2):e:_=()=>{if(P){jn();try{P()}finally{Dn()}}const S=Ss;Ss=h;try{return m?m(e,3,[x]):e(x)}finally{Ss=S}}:_=Mn,t&&r){const S=_,D=r===!0?1/0:r;_=()=>Un(S(),D)}const oe=Mf(),le=()=>{h.stop(),oe&&oe.active&&Xi(oe.effects,h)};if(l&&t){const S=t;t=(...D)=>{try{return S(...D)}finally{le()}}}let ie=H?new Array(e.length).fill(Er):Er;const U=S=>{if(!(!(h.flags&1)||!h.dirty&&!S))if(t){const D=h.run();if(S||r||I||(H?D.some((ee,z)=>On(ee,ie[z])):On(D,ie))){const ee=Ss;jn();try{P&&P(),Ss=h;const z=[D,ie===Er?void 0:H&&ie[0]===Er?[]:ie,x];ie=D,m?m(t,3,z):t(...z)}finally{Ss=ee,Dn()}}}else h.run()};return f&&f(U),h=new lc(_),h.scheduler=c?()=>c(U,!1):U,x=S=>np(S,!1,h),P=h.onStop=()=>{const S=Br.get(h);if(S){if(m)m(S,4);else for(const D of S)D();Br.delete(h)}},t?o?U(!0):ie=h.run():c?c(U.bind(null,!0),!0):h.run(),le.pause=h.pause.bind(h),le.resume=h.resume.bind(h),le.stop=le,le}function Un(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--,Xt(e))Un(e.value,t,n);else if(We(e))for(let o=0;o{Un(o,t,n)});else if(nc(e)){for(const o in e)Un(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Un(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Go(e,t,n,o){try{return o?e(...o):e()}catch(r){ha(r,t,n)}}function mn(e,t,n,o){if(tt(e)){const r=Go(e,t,n,o);return r&&ec(r)&&r.catch(l=>{ha(l,t,n)}),r}if(We(e)){const r=[];for(let l=0;l>>1,r=nn[o],l=Lo(r);l=Lo(n)?nn.push(e):nn.splice(rp(t),0,e),e.flags|=1,$c()}}function $c(){Ur||(Ur=xc.then(Tc))}function ap(e){if(!We(e))rs&&e.id===-1?rs.splice(Js+1,0,e):e.flags&1||(An.push(e),e.flags|=1);else for(let t=0;t=t))continue;nn.splice(o,1),o=e?o-1:gn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Ec(e,t,n=0){if(An.length){let o=An,r=0;if(t){o=[];for(let c=0;cLo(c)-Lo(f));if(An.length=r,rs){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function Tc(e){try{for(gn=0;gn{o._d&&Gr(-1);const l=qr(t),c=js.length;let f;try{f=e(...r)}finally{for(let m=js.length;m>c;m--)sd();qr(l),o._d&&Gr(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function Ae(e,t){if(dn===null)return e;const n=ka(dn),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&tt(t)?t.call(o&&o.proxy):t}}const up=Symbol.for("v-scx"),cp=()=>Ir(up);function ft(e,t,n){return Pc(e,t,n)}function Pc(e,t,n=bt){const{immediate:o,deep:r,flush:l,once:c}=n,f=It({},n),m=t&&o||!t&&l!=="post";let g;if(Bo){if(l==="sync"){const x=cp();g=x.__watcherHandles||(x.__watcherHandles=[])}else if(!m){const x=()=>{};return x.stop=Mn,x.resume=Mn,x.pause=Mn,x}}const h=sn;f.call=(x,I,H)=>mn(x,h,I,H);let _=!1;l==="post"?f.scheduler=x=>{x.i=h,tn(x,h&&h.suspense)}:l!=="sync"&&(_=!0,f.scheduler=(x,I)=>{I?x():il(x)}),f.augmentJob=x=>{t&&(x.flags|=4),_&&(x.flags|=2,h&&(x.id=h.uid,x.i=h))};const P=sp(e,t,f);return Bo&&(g?g.push(P):m&&P()),P}function dp(e,t,n){const o=this.proxy,r=Tt(e)?e.includes(".")?Oc(o,e):()=>o[e]:e.bind(o,o);let l;tt(t)?l=t:(l=t.handler,n=t);const c=Yo(this),f=Pc(r,l.bind(o),n);return c(),f}function Oc(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,Ts=e=>e&&(e.disabled||e.disabled===""),fp=e=>e&&(e.defer||e.defer===""),iu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,lu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Si=(e,t)=>{const n=e&&e.to;return Tt(n)?t?t(n):null:n},pp={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,l,c,f,m,g){const{mc:h,pc:_,pbc:P,o:{insert:x,querySelector:I,createText:H,createComment:oe,parentNode:le}}=g,ie=Ts(t.props);let{dynamicChildren:U}=t;const S=(z,ne,j)=>{z.shapeFlag&16&&h(z.children,ne,j,r,l,c,f,m)},D=(z=t)=>{const ne=Ts(z.props),j=z.target=Si(z.props,I),T=Ei(j,z,H,x);j&&(c!=="svg"&&iu(j)?c="svg":c!=="mathml"&&lu(j)&&(c="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(j),ne||(S(z,j,T),Co(z,!1)))},ee=z=>{const ne=()=>{if(ss.get(z)===ne){if(ss.delete(z),Ts(z.props)){const j=le(z.el)||n;S(z,j,z.anchor),Co(z,!0)}D(z)}};ss.set(z,ne),tn(ne,l)};if(e==null){const z=t.el=H(""),ne=t.anchor=H("");if(x(z,n,o),x(ne,n,o),fp(t.props)||l&&l.pendingBranch){ee(t);return}ie&&(S(t,n,ne),Co(t,!0)),D()}else{t.el=e.el;const z=t.anchor=e.anchor,ne=ss.get(e);if(ne){ne.flags|=8,ss.delete(e),ee(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,T=t.targetAnchor=e.targetAnchor,M=Ts(e.props),Z=M?n:j,Oe=M?z:T;if(c==="svg"||iu(j)?c="svg":(c==="mathml"||lu(j))&&(c="mathml"),U?(P(e.dynamicChildren,U,Z,r,l,c,f),dl(e,t,!0)):m||_(e,t,Z,Oe,r,l,c,f,!1),ie)M?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tr(t,n,z,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Se=Si(t.props,I);Se&&(t.target=Se,Tr(t,Se,null,g,0))}else M&&Tr(t,j,T,g,1);Co(t,ie)}},remove(e,t,n,{um:o,o:{remove:r}},l){const{shapeFlag:c,children:f,anchor:m,targetStart:g,targetAnchor:h,target:_,props:P}=e,x=Ts(P),I=l||!x,H=ss.get(e);if(H&&(H.flags|=8,ss.delete(e)),_&&(r(g),r(h)),l&&r(m),!H&&(x||_)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Fc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],jc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:un,onEnter:un,onAfterEnter:un,onEnterCancelled:un,onBeforeLeave:un,onLeave:un,onAfterLeave:un,onLeaveCancelled:un,onBeforeAppear:un,onAppear:un,onAfterAppear:un,onAppearCancelled:un},mp={name:"BaseTransition",props:jc,setup(e,{slots:t}){const n=fl(),o=Ic();return()=>{const r=t.default&&ll(t.default(),!0),l=r&&r.length?Dc(r):n.subTree?pe():void 0;if(!l)return;const c=dt(e),{mode:f}=c;if(o.isLeaving)return di(l);const m=Hr(l);if(!m)return di(l);let g=Ko(m,c,o,n,_=>g=_);m.type!==Jt&&ds(m,g);let h=n.subTree&&Hr(n.subTree);if(h&&h.type!==Jt&&!As(h,m)&&Ro(n.subTree)){let _=Ko(h,c,o,n);if(ds(h,_),f==="out-in"&&m.type!==Jt)return o.isLeaving=!0,_.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,h=void 0},di(l);f==="in-out"&&m.type!==Jt?_.delayLeave=(P,x,I)=>{const H=Lc(o,h);H[String(h.key)]=h,P[cn]=()=>{x(),P[cn]=void 0,delete g.delayedLeave,h=void 0},g.delayedLeave=()=>{I(),delete g.delayedLeave,h=void 0}}:h=void 0}else h&&(h=void 0);return l}}};function Dc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Jt){t=n;break}}return t}const hp=mp;function Lc(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Ko(e,t,n,o,r){const{appear:l,mode:c,persisted:f=!1,onBeforeEnter:m,onEnter:g,onAfterEnter:h,onEnterCancelled:_,onBeforeLeave:P,onLeave:x,onAfterLeave:I,onLeaveCancelled:H,onBeforeAppear:oe,onAppear:le,onAfterAppear:ie,onAppearCancelled:U}=t,S=String(e.key),D=Lc(n,e),ee=(j,T)=>{j&&mn(j,o,9,T)},z=(j,T)=>{const M=T[1];ee(j,T),We(j)?j.every(Z=>Z.length<=1)&&M():j.length<=1&&M()},ne={mode:c,persisted:f,beforeEnter(j){let T=m;if(!n.isMounted)if(l)T=oe||m;else return;j[cn]&&j[cn](!0);const M=D[S];if(M&&As(e,M)){let Z=M.el[cn];if(!Z){const Oe=Ro(M);Z=Oe&&Oe.el[cn]}Z&&Z()}ee(T,[j])},enter(j){if(D[S]===e)return;let T=g,M=h,Z=_;if(!n.isMounted)if(l)T=le||g,M=ie||h,Z=U||_;else return;let Oe=!1;j[_o]=ge=>{Oe||(Oe=!0,ge?ee(Z,[j]):ee(M,[j]),ne.delayedLeave&&ne.delayedLeave(),j[_o]=void 0)};const Se=j[_o].bind(null,!1);T?z(T,[j,Se]):Se()},leave(j,T){const M=String(e.key);if(j[_o]&&j[_o](!0),n.isUnmounting)return T();ee(P,[j]);let Z=!1;j[cn]=Se=>{Z||(Z=!0,T(),Se?ee(H,[j]):ee(I,[j]),j[cn]=void 0,D[M]===e&&delete D[M])};const Oe=j[cn].bind(null,!1);D[M]=e,x?z(x,[j,Oe]):Oe()},clone(j){const T=Ko(j,t,n,o,r);return r&&r(T),T}};return ne}function di(e){if(ga(e))return e=fs(e),e.children=null,e}function Hr(e){if(!ga(e))return ya(e.type)&&e.children?Dc(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&&tt(n.default))return n.default()}}function ds(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ds(ya(n.type)&&Hr(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===Me&&We(e.children)){const n=Hc(e.children,!1);n&&ds(n,t)}}function ll(e,t=!1,n){let o=[],r=0;for(let l=0;l1)for(let l=0;lAo(H,t&&(We(t)?t[oe]:t),n,o,r));return}if(Po(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ao(e,t,n,o.component.subTree);return}const l=o.shapeFlag&4?ka(o.component):o.el,c=r?null:l,{i:f,r:m}=e,g=t&&t.r,h=f.refs===bt?f.refs={}:f.refs,_=f.setupState,P=dt(_),x=_===bt?Zu:H=>uu(h,H)?!1:vt(P,H),I=(H,oe)=>!(oe&&uu(h,oe));if(g!=null&&g!==m){if(cu(t),Tt(g))h[g]=null,x(g)&&(_[g]=null);else if(Xt(g)){const H=t;I(g,H.k)&&(g.value=null),H.k&&(h[H.k]=null)}}if(tt(m))Go(m,f,12,[c,h]);else{const H=Tt(m),oe=Xt(m);if(H||oe){const le=()=>{if(e.f){const ie=H?x(m)?_[m]:h[m]:I()||!e.k?m.value:h[e.k];if(r)We(ie)&&Xi(ie,l);else if(We(ie))ie.includes(l)||ie.push(l);else if(H)h[m]=[l],x(m)&&(_[m]=h[m]);else{const U=[l];I(m,e.k)&&(m.value=U),e.k&&(h[e.k]=U)}}else H?(h[m]=c,x(m)&&(_[m]=c)):oe&&(I(m,e.k)&&(m.value=c),e.k&&(h[e.k]=c))};if(c){const ie=()=>{le(),zr.delete(e)};ie.id=-1,zr.set(e,ie),tn(ie,n)}else cu(e),le()}}}function cu(e){const t=zr.get(e);t&&(t.flags|=8,zr.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Po=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function yp(e,t){Rc(e,"a",t)}function gp(e,t){Rc(e,"da",t)}function Rc(e,t,n=sn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ba(t,o,n),n){let r=n.parent;for(;r&&r.parent;)ga(r.parent.vnode)&&bp(o,t,n,r),r=r.parent}}function bp(e,t,n,o){const r=ba(t,e,o,!0);hn(()=>{Xi(o[t],r)},n)}function ba(e,t,n=sn,o=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...c)=>{jn();const f=Yo(n),m=mn(t,n,e,c);return f(),Dn(),m});return o?r.unshift(l):r.push(l),l}}const Wn=e=>(t,n=sn)=>{(!Bo||e==="sp")&&ba(e,(...o)=>t(...o),n)},wp=Wn("bm"),ln=Wn("m"),_p=Wn("bu"),Nc=Wn("u"),Fc=Wn("bum"),hn=Wn("um"),kp=Wn("sp"),Cp=Wn("rtg"),xp=Wn("rtc");function $p(e,t=sn){ba("ec",e,t)}const Sp=Symbol.for("v-ndc");function st(e,t,n,o){let r;const l=n,c=We(e);if(c||Tt(e)){const f=c&&is(e);let m=!1,g=!1;f&&(m=!fn(e),g=Ln(e),e=ma(e)),r=new Array(e.length);for(let h=0,_=e.length;h<_;h++)r[h]=t(m?g?cs(vn(e[h])):vn(e[h]):e[h],h,void 0,l)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let f=0;ft(f,m,void 0,l));else{const f=Object.keys(e);r=new Array(f.length);for(let m=0,g=f.length;me?id(e)?ka(e):Ti(e.parent):null,Oo=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=>Ti(e.parent),$root:e=>Ti(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bc(e),$forceUpdate:e=>e.f||(e.f=()=>{il(e.update)}),$nextTick:e=>e.n||(e.n=Ks.bind(e.proxy)),$watch:e=>dp.bind(e)}),fi=(e,t)=>e!==bt&&!e.__isScriptSetup&&vt(e,t),Ep={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:l,accessCache:c,type:f,appContext:m}=e;if(t[0]!=="$"){const P=c[t];if(P!==void 0)switch(P){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(fi(o,t))return c[t]=1,o[t];if(r!==bt&&vt(r,t))return c[t]=2,r[t];if(vt(l,t))return c[t]=3,l[t];if(n!==bt&&vt(n,t))return c[t]=4,n[t];Ai&&(c[t]=0)}}const g=Oo[t];let h,_;if(g)return t==="$attrs"&&Yt(e.attrs,"get",""),g(e);if((h=f.__cssModules)&&(h=h[t]))return h;if(n!==bt&&vt(n,t))return c[t]=4,n[t];if(_=m.config.globalProperties,vt(_,t))return _[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:l}=e;return fi(r,t)?(r[t]=n,!0):o!==bt&&vt(o,t)?(o[t]=n,!0):vt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:l,type:c}},f){let m;return!!(n[f]||e!==bt&&f[0]!=="$"&&vt(e,f)||fi(t,f)||vt(l,f)||vt(o,f)||vt(Oo,f)||vt(r.config.globalProperties,f)||(m=c.__cssModules)&&m[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 du(e){return We(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ai=!0;function Tp(e){const t=Bc(e),n=e.proxy,o=e.ctx;Ai=!1,t.beforeCreate&&fu(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:c,watch:f,provide:m,inject:g,created:h,beforeMount:_,mounted:P,beforeUpdate:x,updated:I,activated:H,deactivated:oe,beforeDestroy:le,beforeUnmount:ie,destroyed:U,unmounted:S,render:D,renderTracked:ee,renderTriggered:z,errorCaptured:ne,serverPrefetch:j,expose:T,inheritAttrs:M,components:Z,directives:Oe,filters:Se}=t;if(g&&Ap(g,o,null),c)for(const qe in c){const Fe=c[qe];tt(Fe)&&(o[qe]=Fe.bind(n))}if(r){const qe=r.call(n,n);ht(qe)&&(e.data=ol(qe))}if(Ai=!0,l)for(const qe in l){const Fe=l[qe],Je=tt(Fe)?Fe.bind(n,n):tt(Fe.get)?Fe.get.bind(n,n):Mn,Ge=!tt(Fe)&&tt(Fe.set)?Fe.set.bind(n):Mn,ze=rt({get:Je,set:Ge});Object.defineProperty(o,qe,{enumerable:!0,configurable:!0,get:()=>ze.value,set:re=>ze.value=re})}if(f)for(const qe in f)Vc(f[qe],o,n,qe);if(m){const qe=tt(m)?m.call(n):m;Reflect.ownKeys(qe).forEach(Fe=>{lp(Fe,qe[Fe])})}h&&fu(h,e,"c");function Pe(qe,Fe){We(Fe)?Fe.forEach(Je=>qe(Je.bind(n))):Fe&&qe(Fe.bind(n))}if(Pe(wp,_),Pe(ln,P),Pe(_p,x),Pe(Nc,I),Pe(yp,H),Pe(gp,oe),Pe($p,ne),Pe(xp,ee),Pe(Cp,z),Pe(Fc,ie),Pe(hn,S),Pe(kp,j),We(T))if(T.length){const qe=e.exposed||(e.exposed={});T.forEach(Fe=>{Object.defineProperty(qe,Fe,{get:()=>n[Fe],set:Je=>n[Fe]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===Mn&&(e.render=D),M!=null&&(e.inheritAttrs=M),Z&&(e.components=Z),Oe&&(e.directives=Oe),j&&Kc(e)}function Ap(e,t,n=Mn){We(e)&&(e=Pi(e));for(const o in e){const r=e[o];let l;ht(r)?"default"in r?l=Ir(r.from||o,r.default,!0):l=Ir(r.from||o):l=Ir(r),Xt(l)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):t[o]=l}}function fu(e,t,n){mn(We(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Vc(e,t,n,o){let r=o.includes(".")?Oc(n,o):()=>n[o];if(Tt(e)){const l=t[e];tt(l)&&ft(r,l)}else if(tt(e))ft(r,e.bind(n));else if(ht(e))if(We(e))e.forEach(l=>Vc(l,t,n,o));else{const l=tt(e.handler)?e.handler.bind(n):t[e.handler];tt(l)&&ft(r,l,e)}}function Bc(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:c}}=e.appContext,f=l.get(t);let m;return f?m=f:!r.length&&!n&&!o?m=t:(m={},r.length&&r.forEach(g=>Wr(m,g,c,!0)),Wr(m,t,c)),ht(t)&&l.set(t,m),m}function Wr(e,t,n,o=!1){const{mixins:r,extends:l}=t;l&&Wr(e,l,n,!0),r&&r.forEach(c=>Wr(e,c,n,!0));for(const c in t)if(!(o&&c==="expose")){const f=Pp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const Pp={data:pu,props:vu,emits:vu,methods:xo,computed:xo,beforeCreate:en,created:en,beforeMount:en,mounted:en,beforeUpdate:en,updated:en,beforeDestroy:en,beforeUnmount:en,destroyed:en,unmounted:en,activated:en,deactivated:en,errorCaptured:en,serverPrefetch:en,components:xo,directives:xo,watch:Mp,provide:pu,inject:Op};function pu(e,t){return t?e?function(){return It(tt(e)?e.call(this,this):e,tt(t)?t.call(this,this):t)}:t:e}function Op(e,t){return xo(Pi(e),Pi(t))}function Pi(e){if(We(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bn(t)}Modifiers`]||e[`${vs(t)}Modifiers`];function Lp(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||bt;let r=n;const l=t.startsWith("update:"),c=l&&Dp(o,t.slice(7));c&&(c.trim&&(r=n.map(h=>Tt(h)?h.trim():h)),c.number&&(r=r.map(pa)));let f,m=o[f=ri(t)]||o[f=ri(bn(t))];!m&&l&&(m=o[f=ri(vs(t))]),m&&mn(m,e,6,r);const g=o[f+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(g,e,6,r)}}const Kp=new WeakMap;function qc(e,t,n=!1){const o=n?Kp:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const l=e.emits;let c={},f=!1;if(!tt(e)){const m=g=>{const h=qc(g,t,!0);h&&(f=!0,It(c,h))};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}return!l&&!f?(ht(e)&&o.set(e,null),null):(We(l)?l.forEach(m=>c[m]=null):It(c,l),ht(e)&&o.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),vt(e,t[0].toLowerCase()+t.slice(1))||vt(e,vs(t))||vt(e,t))}function mu(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[l],slots:c,attrs:f,emit:m,render:g,renderCache:h,props:_,data:P,setupState:x,ctx:I,inheritAttrs:H}=e,oe=qr(e);let le,ie;try{if(n.shapeFlag&4){const S=r||o,D=S;le=Pn(g.call(D,S,h,_,x,P,I)),ie=f}else{const S=t;le=Pn(S.length>1?S(_,{attrs:f,slots:c,emit:m}):S(_,null)),ie=t.props?f:Rp(f)}}catch(S){js.length=0,ha(S,e,1),le=ye(Jt)}let U=le;if(ie&&H!==!1){const S=Object.keys(ie),{shapeFlag:D}=U;S.length&&D&7&&(l&&S.some(da)&&(ie=Np(ie,l)),U=fs(U,ie,!1,!0))}if(n.dirs&&(U=fs(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition){const S=ya(U.type)&&Hr(U)||U;ds(S,n.transition)}return le=U,qr(oe),le}function Hc(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Np=(e,t)=>{const n={};for(const o in e)(!da(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Fp(e,t,n){const{props:o,children:r,component:l}=e,{props:c,children:f,patchFlag:m}=t,g=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&m>=0){if(m&1024)return!0;if(m&16)return o?hu(o,c,g):!!c;if(m&8){const h=t.dynamicProps;for(let _=0;_Object.create(Wc),Yc=e=>Object.getPrototypeOf(e)===Wc;function Bp(e,t,n,o=!1){const r={},l=Gc();e.propsDefaults=Object.create(null),Jc(e,t,r,l);for(const c in e.propsOptions[0])c in r||(r[c]=void 0);n?e.props=o?r:Yf(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Up(e,t,n,o){const{props:r,attrs:l,vnode:{patchFlag:c}}=e,f=dt(r),[m]=e.propsOptions;let g=!1;if((o||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let _=0;_{m=!0;const[P,x]=Xc(_,t,!0);It(c,P),x&&f.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!l&&!m)return ht(e)&&o.set(e,Os),Os;if(We(l))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",cl=e=>We(e)?e.map(Pn):[Pn(e)],Hp=(e,t,n)=>{if(t._n)return t;const o=Cn((...r)=>cl(t(...r)),n);return o._c=!1,o},Qc=(e,t,n)=>{const o=e._ctx;for(const r in e){if(ul(r))continue;const l=e[r];if(tt(l))t[r]=Hp(r,l,o);else if(l!=null){const c=cl(l);t[r]=()=>c}}},Zc=(e,t)=>{const n=cl(t);e.slots.default=()=>n},ed=(e,t,n)=>{for(const o in t)(n||!ul(o))&&(e[o]=t[o])},zp=(e,t,n)=>{const o=e.slots=Gc();if(e.vnode.shapeFlag&32){const r=t._;r?(ed(o,t,n),n&&oc(o,"_",r,!0)):Qc(t,o)}else t&&Zc(e,t)},Wp=(e,t,n)=>{const{vnode:o,slots:r}=e;let l=!0,c=bt;if(o.shapeFlag&32){const f=t._;f?n&&f===1?l=!1:ed(r,t,n):(l=!t.$stable,Qc(t,r)),c=t}else t&&(Zc(e,t),c={default:1});if(l)for(const f in r)!ul(f)&&c[f]==null&&delete r[f]},tn=Qp;function Gp(e){return Yp(e)}function Yp(e,t){const n=va();n.__VUE__=!0;const{insert:o,remove:r,patchProp:l,createElement:c,createText:f,createComment:m,setText:g,setElementText:h,parentNode:_,nextSibling:P,setScopeId:x=Mn,insertStaticContent:I}=e,H=(k,v,b,E=null,X=null,ce=null,xe=void 0,be=null,_e=!!v.dynamicChildren)=>{if(k===v)return;k&&!As(k,v)&&(E=Ee(k),re(k,X,ce,!0),k=null),v.patchFlag===-2&&(_e=!1,v.dynamicChildren=null),v.dynamicChildren&&k&&k.dynamicChildren&&k.dynamicChildren.hasOnce&&(v.dynamicChildren===Os&&(v.dynamicChildren=[]),v.dynamicChildren.hasOnce=!0);const{type:fe,ref:Ke,shapeFlag:Te}=v;switch(fe){case _a:oe(k,v,b,E);break;case Jt:le(k,v,b,E);break;case jr:k==null&&ie(v,b,E,xe);break;case Me:Z(k,v,b,E,X,ce,xe,be,_e);break;default:Te&1?D(k,v,b,E,X,ce,xe,be,_e):Te&6?Oe(k,v,b,E,X,ce,xe,be,_e):(Te&64||Te&128)&&fe.process(k,v,b,E,X,ce,xe,be,_e,St)}Ke!=null&&X?Ao(Ke,k&&k.ref,ce,v||k,!v):Ke==null&&k&&k.ref!=null&&Ao(k.ref,null,ce,k,!0)},oe=(k,v,b,E)=>{if(k==null)o(v.el=f(v.children),b,E);else{const X=v.el=k.el;v.children!==k.children&&g(X,v.children)}},le=(k,v,b,E)=>{k==null?o(v.el=m(v.children||""),b,E):v.el=k.el},ie=(k,v,b,E)=>{[k.el,k.anchor]=I(k.children,v,b,E,k.el,k.anchor)},U=({el:k,anchor:v},b,E)=>{let X;for(;k&&k!==v;)X=P(k),o(k,b,E),k=X;o(v,b,E)},S=({el:k,anchor:v})=>{let b;for(;k&&k!==v;)b=P(k),r(k),k=b;r(v)},D=(k,v,b,E,X,ce,xe,be,_e)=>{if(v.type==="svg"?xe="svg":v.type==="math"&&(xe="mathml"),k==null)ee(v,b,E,X,ce,xe,be,_e);else{const fe=k.el&&k.el._isVueCE?k.el:null;try{fe&&fe._beginPatch(),j(k,v,X,ce,xe,be,_e)}finally{fe&&fe._endPatch()}}},ee=(k,v,b,E,X,ce,xe,be)=>{let _e,fe;const{props:Ke,shapeFlag:Te,transition:Be,dirs:ue}=k;if(_e=k.el=c(k.type,ce,Ke&&Ke.is,Ke),Te&8?h(_e,k.children):Te&16&&ne(k.children,_e,null,E,X,pi(k,ce),xe,be),ue&&Cs(k,null,E,"created"),z(_e,k,k.scopeId,xe,E),Ke){for(const de in Ke)de!=="value"&&!So(de)&&l(_e,de,null,Ke[de],ce,E);"value"in Ke&&l(_e,"value",null,Ke.value,ce),(fe=Ke.onVnodeBeforeMount)&&$n(fe,E,k)}ue&&Cs(k,null,E,"beforeMount");const G=Jp(X,Be);G&&Be.beforeEnter(_e),o(_e,v,b),((fe=Ke&&Ke.onVnodeMounted)||G||ue)&&tn(()=>{try{fe&&$n(fe,E,k),G&&Be.enter(_e),ue&&Cs(k,null,E,"mounted")}finally{}},X)},z=(k,v,b,E,X)=>{if(b&&x(k,b),E)for(let ce=0;ce{for(let fe=_e;fe{const be=v.el=k.el;let{patchFlag:_e,dynamicChildren:fe,dirs:Ke}=v;_e|=k.patchFlag&16;const Te=k.props||bt,Be=v.props||bt;let ue;if(b&&xs(b,!1),(ue=Be.onVnodeBeforeUpdate)&&$n(ue,b,v,k),Ke&&Cs(v,k,b,"beforeUpdate"),b&&xs(b,!0),fe&&(!k.dynamicChildren||k.dynamicChildren.length!==fe.length)&&(_e=0,xe=!1,fe=null),(Te.innerHTML&&Be.innerHTML==null||Te.textContent&&Be.textContent==null)&&h(be,""),fe?T(k.dynamicChildren,fe,be,b,E,pi(v,X),ce):xe||Fe(k,v,be,null,b,E,pi(v,X),ce,!1),_e>0){if(_e&16)M(be,Te,Be,b,X);else if(_e&2&&Te.class!==Be.class&&l(be,"class",null,Be.class,X),_e&4&&l(be,"style",Te.style,Be.style,X),_e&8){const G=v.dynamicProps;for(let de=0;de{ue&&$n(ue,b,v,k),Ke&&Cs(v,k,b,"updated")},E)},T=(k,v,b,E,X,ce,xe)=>{for(let be=0;be{if(v!==b){if(v!==bt)for(const ce in v)!So(ce)&&!(ce in b)&&l(k,ce,v[ce],null,X,E);for(const ce in b){if(So(ce))continue;const xe=b[ce],be=v[ce];xe!==be&&ce!=="value"&&l(k,ce,be,xe,X,E)}"value"in b&&l(k,"value",v.value,b.value,X)}},Z=(k,v,b,E,X,ce,xe,be,_e)=>{const fe=v.el=k?k.el:f(""),Ke=v.anchor=k?k.anchor:f("");let{patchFlag:Te,dynamicChildren:Be,slotScopeIds:ue}=v;ue&&(be=be?be.concat(ue):ue),k==null?(o(fe,b,E),o(Ke,b,E),ne(v.children||[],b,Ke,X,ce,xe,be,_e)):Te>0&&Te&64&&Be&&k.dynamicChildren&&k.dynamicChildren.length===Be.length?(T(k.dynamicChildren,Be,b,X,ce,xe,be),(v.key!=null||X&&v===X.subTree)&&dl(k,v,!0)):Fe(k,v,b,Ke,X,ce,xe,be,_e)},Oe=(k,v,b,E,X,ce,xe,be,_e)=>{v.slotScopeIds=be,k==null?v.shapeFlag&512?X.ctx.activate(v,b,E,xe,_e):Se(v,b,E,X,ce,xe,_e):ge(k,v,_e)},Se=(k,v,b,E,X,ce,xe)=>{const be=k.component=rv(k,E,X);if(ga(k)&&(be.ctx.renderer=St),av(be,!1,xe),be.asyncDep){if(X&&X.registerDep(be,Pe,xe,ce),!k.el){const _e=be.subTree=ye(Jt);le(null,_e,v,b),k.placeholder=_e.el}}else Pe(be,k,v,b,X,ce,xe)},ge=(k,v,b)=>{const E=v.component=k.component;if(Fp(k,v,b))if(E.asyncDep&&!E.asyncResolved){v.el=k.el,v.placeholder=k.placeholder,qe(E,v,b);return}else E.next=v,E.update();else v.el=k.el,v.placeholder=k.placeholder,E.vnode=v},Pe=(k,v,b,E,X,ce,xe)=>{const be=()=>{if(k.isMounted){let{next:Te,bu:Be,u:ue,parent:G,vnode:de}=k;{const Ze=td(k);if(Ze){Te&&(Te.el=de.el,qe(k,Te,xe)),Ze.asyncDep.then(()=>{tn(()=>{k.isUnmounted||fe()},X)});return}}let je=Te,at;xs(k,!1),Te?(Te.el=de.el,qe(k,Te,xe)):Te=de,Be&&Mr(Be),(at=Te.props&&Te.props.onVnodeBeforeUpdate)&&$n(at,G,Te,de),xs(k,!0);const yt=mu(k),Dt=k.subTree;k.subTree=yt,H(Dt,yt,_(Dt.el),Ee(Dt),k,X,ce),Te.el=yt.el,je===null&&Vp(k,yt.el),ue&&tn(ue,X),(at=Te.props&&Te.props.onVnodeUpdated)&&tn(()=>$n(at,G,Te,de),X)}else{let Te;const{el:Be,props:ue}=v,{bm:G,m:de,parent:je,root:at,type:yt}=k,Dt=Po(v);xs(k,!1),G&&Mr(G),!Dt&&(Te=ue&&ue.onVnodeBeforeMount)&&$n(Te,je,v),xs(k,!0);{at.ce&&at.ce._hasShadowRoot()&&at.ce._injectChildStyle(yt,k.parent?k.parent.type:void 0);const Ze=k.subTree=mu(k);H(null,Ze,b,E,k,X,ce),v.el=Ze.el}if(de&&tn(de,X),!Dt&&(Te=ue&&ue.onVnodeMounted)){const Ze=v;tn(()=>$n(Te,je,Ze),X)}(v.shapeFlag&256||je&&Po(je.vnode)&&je.vnode.shapeFlag&256)&&k.a&&tn(k.a,X),k.isMounted=!0,v=b=E=null}};k.scope.on();const _e=k.effect=new lc(be);k.scope.off();const fe=k.update=_e.run.bind(_e),Ke=k.job=_e.runIfDirty.bind(_e);Ke.i=k,Ke.id=k.uid,_e.scheduler=()=>il(Ke),xs(k,!0),fe()},qe=(k,v,b)=>{v.component=k;const E=k.vnode.props;k.vnode=v,k.next=null,Up(k,v.props,E,b),Wp(k,v.children,b),jn(),Sc(k),Dn()},Fe=(k,v,b,E,X,ce,xe,be,_e=!1)=>{const fe=k&&k.children,Ke=k?k.shapeFlag:0,Te=v.children,{patchFlag:Be,shapeFlag:ue}=v;if(Be>0){if(Be&128){Ge(fe,Te,b,E,X,ce,xe,be,_e);return}else if(Be&256){Je(fe,Te,b,E,X,ce,xe,be,_e);return}}ue&8?(Ke&16&&wt(fe,X,ce),Te!==fe&&h(b,Te)):Ke&16?ue&16?Ge(fe,Te,b,E,X,ce,xe,be,_e):wt(fe,X,ce,!0):(Ke&8&&h(b,""),ue&16&&ne(Te,b,E,X,ce,xe,be,_e))},Je=(k,v,b,E,X,ce,xe,be,_e)=>{k=k||Os,v=v||Os;const fe=k.length,Ke=v.length,Te=Math.min(fe,Ke);let Be;for(Be=0;BeKe?wt(k,X,ce,!0,!1,Te):ne(v,b,E,X,ce,xe,be,_e,Te)},Ge=(k,v,b,E,X,ce,xe,be,_e)=>{let fe=0;const Ke=v.length;let Te=k.length-1,Be=Ke-1;for(;fe<=Te&&fe<=Be;){const ue=k[fe],G=v[fe]=_e?Vn(v[fe]):Pn(v[fe]);if(As(ue,G))H(ue,G,b,null,X,ce,xe,be,_e);else break;fe++}for(;fe<=Te&&fe<=Be;){const ue=k[Te],G=v[Be]=_e?Vn(v[Be]):Pn(v[Be]);if(As(ue,G))H(ue,G,b,null,X,ce,xe,be,_e);else break;Te--,Be--}if(fe>Te){if(fe<=Be){const ue=Be+1,G=ueBe)for(;fe<=Te;)re(k[fe],X,ce,!0),fe++;else{const ue=fe,G=fe,de=new Map;for(fe=G;fe<=Be;fe++){const Ut=v[fe]=_e?Vn(v[fe]):Pn(v[fe]);Ut.key!=null&&de.set(Ut.key,fe)}let je,at=0;const yt=Be-G+1;let Dt=!1,Ze=0;const Qt=new Array(yt);for(fe=0;fe=yt){re(Ut,X,ce,!0);continue}let Lt;if(Ut.key!=null)Lt=de.get(Ut.key);else for(je=G;je<=Be;je++)if(Qt[je-G]===0&&As(Ut,v[je])){Lt=je;break}Lt===void 0?re(Ut,X,ce,!0):(Qt[Lt-G]=fe+1,Lt>=Ze?Ze=Lt:Dt=!0,H(Ut,v[Lt],b,null,X,ce,xe,be,_e),at++)}const ms=Dt?Xp(Qt):Os;for(je=ms.length-1,fe=yt-1;fe>=0;fe--){const Ut=G+fe,Lt=v[Ut],Ue=v[Ut+1],Yn=Ut+1{const{el:ce,type:xe,transition:be,children:_e,shapeFlag:fe}=k;if(fe&6){ze(k.component.subTree,v,b,E);return}if(fe&128){k.suspense.move(v,b,E);return}if(fe&64){xe.move(k,v,b,St);return}if(xe===Me){o(ce,v,b);for(let Te=0;Te<_e.length;Te++)ze(_e[Te],v,b,E);o(k.anchor,v,b);return}if(xe===jr){U(k,v,b);return}if(E!==2&&fe&1&&be)if(E===0)be.persisted&&!ce[cn]?o(ce,v,b):(be.beforeEnter(ce),o(ce,v,b),tn(()=>be.enter(ce),X));else{const{leave:Te,delayLeave:Be,afterLeave:ue}=be,G=()=>{k.ctx.isUnmounted?r(ce):o(ce,v,b)},de=()=>{const je=ce._isLeaving||!!ce[cn];ce._isLeaving&&ce[cn](!0),be.persisted&&!je?G():Te(ce,()=>{G(),ue&&ue()})};Be?Be(ce,G,de):de()}else o(ce,v,b)},re=(k,v,b,E=!1,X=!1)=>{const{type:ce,props:xe,ref:be,children:_e,dynamicChildren:fe,shapeFlag:Ke,patchFlag:Te,dirs:Be,cacheIndex:ue,memo:G}=k;if((Te===-2||fe&&fe.hasOnce)&&(X=!1),be!=null&&(jn(),Ao(be,null,b,k,!0),Dn()),ue!=null&&(!k.ctx||k.ctx===v)&&(v.renderCache[ue]=void 0),Ke&256){v.ctx.deactivate(k);return}const de=Ke&1&&Be,je=!Po(k);let at;if(je&&(at=xe&&xe.onVnodeBeforeUnmount)&&$n(at,v,k),Ke&6)ot(k.component,b,E);else{if(Ke&128){k.suspense.unmount(b,E);return}de&&Cs(k,null,v,"beforeUnmount"),Ke&64?k.type.remove(k,v,b,St,E):fe&&!fe.hasOnce&&(ce!==Me||Te>0&&Te&64)?wt(fe,v,b,!1,!0):(ce===Me&&Te&384||!X&&Ke&16)&&wt(_e,v,b),E&&J(k)}const yt=G!=null&&ue==null;(je&&(at=xe&&xe.onVnodeUnmounted)||de||yt)&&tn(()=>{at&&$n(at,v,k),de&&Cs(k,null,v,"unmounted"),yt&&(k.el=null)},b)},J=k=>{const{type:v,el:b,anchor:E,transition:X}=k,ce=v===Me;if(ce&&!X){$e(b,E);return}if(v===jr){S(k),X&&!X.persisted&&X.afterLeave&&X.afterLeave();return}const xe=ce?Ro(k):k,be=()=>{ce?_(b)&&$e(b,E):r(b),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if(xe&&xe.shapeFlag&1&&X&&!X.persisted){const{leave:_e,delayLeave:fe}=X,Ke=xe.el,Te=()=>_e(Ke,be);fe?fe(Ke,be,Te):Te()}else be()},$e=(k,v)=>{let b;for(;k!==v;)b=P(k),r(k),k=b;r(v)},ot=(k,v,b)=>{const{bum:E,scope:X,job:ce,subTree:xe,um:be,m:_e,a:fe}=k;gu(_e),gu(fe),E&&Mr(E),X.stop(),ce?(ce.flags|=8,re(xe,k,v,b)):k.vnode.el&&xe&&(xe.transition=k.vnode.transition,re(xe,k,v,b)),be&&tn(be,v),tn(()=>{k.isUnmounted=!0},v)},wt=(k,v,b,E=!1,X=!1,ce=0)=>{for(let xe=ce;xe{if(k.shapeFlag&6)return Ee(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const v=P(k.anchor||k.el),b=v&&v[Mc];return b?P(b):v},xt=(k,v,b)=>{const E=k&&v._vnode?void 0:k&&k.component?k.component.uid:ov();ip(()=>{k==null?v._vnode&&re(v._vnode,null,null,!0):H(v._vnode||null,k,v,null,null,null,b),v._vnode=k},E)},St={p:H,um:re,m:ze,r:J,mt:Se,mc:ne,pc:Fe,pbc:T,n:Ee,o:e};return{render:xt,hydrate:void 0,createApp:jp(xt)}}function pi({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 xs({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 dl(e,t,n=!1){const o=e.children,r=t.children;if(We(o)&&We(r))for(let l=0;l>1,e[n[f]]0&&(t[o]=n[l-1]),n[l]=o)}}for(l=n.length,c=n[l-1];l-- >0;)n[l]=c,c=t[c];return n}function td(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:td(t)}function gu(e){if(e)for(let t=0;te.__isSuspense;function Qp(e,t){t&&t.pendingBranch?We(e)?t.effects.push(...e):t.effects.push(e):ap(e)}const Me=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Jt=Symbol.for("v-cmt"),jr=Symbol.for("v-stc"),js=[];let an=null;function $(e=!1){js.push(an=e?null:[])}function sd(){js.pop(),an=js[js.length-1]||null}let No=1;function Gr(e,t=!1){No+=e,e<0&&an&&t&&(an.hasOnce=!0)}function od(e){return e.dynamicChildren=No>0?an||Os:null,sd(),No>0&&an&&an.push(e),e}function A(e,t,n,o,r,l){return od(i(e,t,n,o,r,l,!0))}function gt(e,t,n,o,r){return od(ye(e,t,n,o,r,!0))}function Fo(e){return e?e.__v_isVNode===!0:!1}function As(e,t){return e.type===t.type&&e.key===t.key}const rd=({key:e})=>e??null,Dr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Tt(e)||Xt(e)||tt(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function i(e,t=null,n=null,o=0,r=null,l=e===Me?0:1,c=!1,f=!1){const m={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rd(t),ref:t&&Dr(t),scopeId:Ac,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:l,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:dn};return f?(Yr(m,n),l&128&&e.normalize(m)):n&&(m.shapeFlag|=Tt(n)?8:16),No>0&&!c&&an&&(m.patchFlag>0||l&6)&&m.patchFlag!==32&&an.push(m),m}const ye=Zp;function Zp(e,t=null,n=null,o=0,r=null,l=!1){if((!e||e===Sp)&&(e=Jt),Fo(e)){const f=fs(e,t,!0);return n&&Yr(f,n),No>0&&!l&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(cv(e)&&(e=e.__vccOpts),t){t=ev(t);let{class:f,style:m}=t;f&&!Tt(f)&&(t.class=Ye(f)),ht(m)&&(al(m)&&!We(m)&&(m=It({},m)),t.style=qn(m))}const c=Tt(e)?1:nd(e)?128:ya(e)?64:ht(e)?4:tt(e)?2:0;return i(e,t,n,o,r,c,l,!0)}function ev(e){return e?al(e)||Yc(e)?It({},e):e:null}function fs(e,t,n=!1,o=!1){const{props:r,ref:l,patchFlag:c,children:f,transition:m}=e,g=t?nv(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&rd(g),ref:t&&t.ref?n&&l?We(l)?l.concat(Dr(t)):[l,Dr(t)]:Dr(t):l,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!==Me?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:m,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 m&&o&&ds(h,m.clone(h)),h}function Ct(e=" ",t=0){return ye(_a,null,e,t)}function tv(e,t){const n=ye(jr,null,e);return n.staticCount=t,n}function pe(e="",t=!1){return t?($(),gt(Jt,null,e)):ye(Jt,null,e)}function Pn(e){return e==null||typeof e=="boolean"?ye(Jt):We(e)?ye(Me,null,e.slice()):Fo(e)?Vn(e):ye(_a,null,String(e))}function Vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fs(e)}function Yr(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(We(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),Yr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Yc(t)?t._ctx=dn:r===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(tt(t)){if(o&65){Yr(e,{default:t});return}t={default:t,_ctx:dn},n=32}else t=String(t),o&64?(n=16,t=[Ct(t)]):n=8;e.children=t,e.shapeFlag|=n}function nv(...e){const t={};for(let n=0;nsn||dn;let Jr,Vo;{const e=va(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),l=>{r.length>1?r.forEach(c=>c(l)):r[0](l)}};Jr=t("__VUE_INSTANCE_SETTERS__",n=>sn=n),Vo=t("__VUE_SSR_SETTERS__",n=>Bo=n)}const Yo=e=>{const t=sn;return Jr(e),e.scope.on(),()=>{e.scope.off(),Jr(t)}},bu=()=>{sn&&sn.scope.off(),Jr(null)};function id(e){return e.vnode.shapeFlag&4}let Bo=!1;function av(e,t=!1,n=!1){t&&Vo(t);const{props:o,children:r}=e.vnode,l=id(e);Bp(e,o,l,t),zp(e,r,n||t);const c=l?iv(e,t):void 0;return t&&Vo(!1),c}function iv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ep);const{setup:o}=n;if(o){jn();const r=e.setupContext=o.length>1?uv(e):null,l=Yo(e),c=Go(o,e,0,[e.props,r]),f=ec(c);if(Dn(),l(),(f||e.sp)&&!Po(e)&&Kc(e),f){if(c.then(bu,bu),t)return c.then(m=>{Vo(!0);try{wu(e,m,t)}finally{Vo(!1)}}).catch(m=>{ha(m,e,0)});e.asyncDep=c}else wu(e,c)}else ld(e)}function wu(e,t,n){tt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ht(t)&&(e.setupState=Cc(t)),ld(e)}function ld(e,t,n){const o=e.type;e.render||(e.render=o.render||Mn);{const r=Yo(e);jn();try{Tp(e)}finally{Dn(),r()}}}const lv={get(e,t){return Yt(e,"get",""),e[t]}};function uv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,lv),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cc(Jf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Oo)return Oo[n](e)},has(t,n){return n in t||n in Oo}})):e.proxy}function cv(e){return tt(e)&&"__vccOpts"in e}const rt=(e,t)=>tp(e,t,Bo);function dv(e,t,n){try{Gr(-1);const o=arguments.length;return o===2?ht(t)&&!We(t)?Fo(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Fo(n)&&(n=[n]),ye(e,t,n))}finally{Gr(1)}}const fv="3.5.44";/** +* @vue/runtime-dom v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ii;const _u=typeof window<"u"&&window.trustedTypes;if(_u)try{Ii=_u.createPolicy("vue",{createHTML:e=>e})}catch{}const ud=Ii?e=>Ii.createHTML(e):e=>e,pv="http://www.w3.org/2000/svg",vv="http://www.w3.org/1998/Math/MathML",Fn=typeof document<"u"?document:null,ku=Fn&&Fn.createElement("template"),mv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Fn.createElementNS(pv,e):t==="mathml"?Fn.createElementNS(vv,e):n?Fn.createElement(e,{is:n}):Fn.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Fn.createTextNode(e),createComment:e=>Fn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Fn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,l){const c=n?n.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===l||!(r=r.nextSibling)););else{ku.innerHTML=ud(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const f=ku.content;if(o==="svg"||o==="mathml"){const m=f.firstChild;for(;m.firstChild;)f.appendChild(m.firstChild);f.removeChild(m)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ns="transition",ko="animation",so=Symbol("_vtc"),cd={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},dd=It({},jc,cd),hv=e=>(e.displayName="Transition",e.props=dd,e),Gn=hv((e,{slots:t})=>dv(hp,fd(e),t)),$s=(e,t=[])=>{We(e)?e.forEach(n=>n(...t)):e&&e(...t)},Cu=e=>e?We(e)?e.some(t=>t.length>1):e.length>1:!1;function fd(e){const t={};for(const Z in e)Z in cd||(t[Z]=e[Z]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:l=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:m=l,appearActiveClass:g=c,appearToClass:h=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:P=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,I=yv(r),H=I&&I[0],oe=I&&I[1],{onBeforeEnter:le,onEnter:ie,onEnterCancelled:U,onLeave:S,onLeaveCancelled:D,onBeforeAppear:ee=le,onAppear:z=ie,onAppearCancelled:ne=U}=t,j=(Z,Oe,Se,ge)=>{Z._enterCancelled=ge,os(Z,Oe?h:f),os(Z,Oe?g:c),Se&&Se()},T=(Z,Oe)=>{Z._isLeaving=!1,os(Z,_),os(Z,x),os(Z,P),Oe&&Oe()},M=Z=>(Oe,Se)=>{const ge=Z?z:ie,Pe=()=>j(Oe,Z,Se);$s(ge,[Oe,Pe]),xu(()=>{os(Oe,Z?m:l),Sn(Oe,Z?h:f),Cu(ge)||$u(Oe,o,H,Pe)})};return It(t,{onBeforeEnter(Z){$s(le,[Z]),Sn(Z,l),Sn(Z,c)},onBeforeAppear(Z){$s(ee,[Z]),Sn(Z,m),Sn(Z,g)},onEnter:M(!1),onAppear:M(!0),onLeave(Z,Oe){Z._isLeaving=!0;const Se=()=>T(Z,Oe);Sn(Z,_),Z._enterCancelled?(Sn(Z,P),ji(Z)):(ji(Z),Sn(Z,P)),xu(()=>{Z._isLeaving&&(os(Z,_),Sn(Z,x),Cu(S)||$u(Z,o,oe,Se))}),$s(S,[Z,Se])},onEnterCancelled(Z){j(Z,!1,void 0,!0),$s(U,[Z])},onAppearCancelled(Z){j(Z,!0,void 0,!0),$s(ne,[Z])},onLeaveCancelled(Z){T(Z),$s(D,[Z])}})}function yv(e){if(e==null)return null;if(ht(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return _f(e)}function Sn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[so]||(e[so]=new Set)).add(t)}function os(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[so];n&&(n.delete(t),n.size||(e[so]=void 0))}function xu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let gv=0;function $u(e,t,n,o){const r=e._endId=++gv,l=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(l,n);const{type:c,timeout:f,propCount:m}=pd(e,t);if(!c)return o();const g=c+"end";let h=0;const _=()=>{e.removeEventListener(g,P),l()},P=x=>{x.target===e&&++h>=m&&_()};setTimeout(()=>{h(n[I]||"").split(", "),r=o(`${ns}Delay`),l=o(`${ns}Duration`),c=Su(r,l),f=o(`${ko}Delay`),m=o(`${ko}Duration`),g=Su(f,m);let h=null,_=0,P=0;t===ns?c>0&&(h=ns,_=c,P=l.length):t===ko?g>0&&(h=ko,_=g,P=m.length):(_=Math.max(c,g),h=_>0?c>g?ns:ko:null,P=h?h===ns?l.length:m.length:0);const x=h===ns&&/\b(?:transform|all)(?:,|$)/.test(o(`${ns}Property`).toString());return{type:h,timeout:_,propCount:P,hasTransform:x}}function Su(e,t){for(;e.lengthEu(n)+Eu(e[o])))}function Eu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ji(e){return(e?e.ownerDocument:document).body.offsetHeight}function bv(e,t,n){const o=e[so];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Tu=Symbol("_vod"),vd=Symbol("_vsh"),wv=Symbol(""),_v=/(?:^|;)\s*display\s*:/;function kv(e,t,n){const o=e.style,r=Tt(n);let l=!1;if(n&&!r){if(t)if(Tt(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&$o(o,f,"")}else for(const c in t)n[c]==null&&$o(o,c,"");for(const c in n){c==="display"&&(l=!0);const f=n[c];f!=null?xv(e,c,!Tt(t)&&t?t[c]:void 0,f)||$o(o,c,f):$o(o,c,"")}}else if(r){if(t!==n){const c=o[wv];c&&(n+=";"+c),o.cssText=n,l=_v.test(n)}}else t&&e.removeAttribute("style");Tu in e&&((!r||t!==n)&&(e[Tu]=l?o.display:""),e[vd]&&(o.display="none"))}const Ar=/\s*!important$/;function $o(e,t,n){if(We(n))n.forEach(o=>$o(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))Ar.test(n)?e.setProperty(t,n.replace(Ar,""),"important"):e.setProperty(t,n);else{const o=Cv(e,t);Ar.test(n)?e.setProperty(vs(o),n.replace(Ar,""),"important"):e[o]=n}}const Au=["Webkit","Moz","ms"],mi={};function Cv(e,t){const n=mi[t];if(n)return n;let o=bn(t);if(o!=="filter"&&o in e)return mi[t]=o;o=sc(o);for(let r=0;rhi||(Pv.then(()=>hi=0),hi=Date.now());function Mv(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const r=n.value;if(We(r)){const l=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{l.call(o),o._stopped=!0};const c=r.slice(),f=[o];for(let m=0;me.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Iv=(e,t,n,o,r,l)=>{const c=r==="svg";t==="class"?bv(e,o,c):t==="style"?kv(e,n,o):ca(t)?da(t)||Sv(e,t,n,o,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jv(e,t,o,c))?(Mu(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ou(e,t,o,c,l,t!=="value")):e._isVueCE&&(Dv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Tt(o)))?Mu(e,bn(t),o,l,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ou(e,t,o,c))};function jv(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&ju(t)&&tt(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ju(t)&&Tt(n)?!1:t in e}function Dv(e,t){const n=e._def.props;if(!n)return!1;const o=bn(t);return Array.isArray(n)?n.some(r=>bn(r)===o):Object.keys(n).some(r=>bn(r)===o)}const md=new WeakMap,hd=new WeakMap,Xr=Symbol("_moveCb"),Du=Symbol("_enterCb"),Di=new WeakMap,Lv=e=>(delete e.props.mode,e),Kv=Lv({name:"TransitionGroup",props:It({},dd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=fl(),o=Ic();let r,l,c,f;const m=()=>(f===void 0&&(f=r.length>0&&Hv(r[0].el,n.vnode.el,Lu(e))),f);return Nc(()=>{if(Di.delete(n),!m()){r=[],c=void 0;return}const g=Lu(e);r.forEach(Nv);const h=c&&qv(c,n.vnode.el);c=void 0,r.forEach(P=>Fv(P,h));const _=r.filter(Vv);ji(n.vnode.el),_.forEach(P=>{const x=P.el,I=x.style;Sn(x,g),I.transform=I.webkitTransform=I.transitionDuration="";const H=x[Xr]=oe=>{oe&&oe.target!==x||(!oe||oe.propertyName.endsWith("transform"))&&(x.removeEventListener("transitionend",H),x[Xr]=null,os(x,g))};x.addEventListener("transitionend",H)}),r=[]}),()=>{const g=dt(e),h=fd(g);let _=g.tag||Me;if(r=[],f=void 0,l)for(let P=0;Po.willMove()&&o.item.contains(t));return n&&Ca(n.item,n)}function Hv(e,t,n){const o=e.cloneNode(),r=e[so];r&&r.forEach(f=>{f.split(/\s+/).forEach(m=>m&&o.classList.remove(m))}),n.split(/\s+/).forEach(f=>f&&o.classList.add(f)),o.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(o);const{hasTransform:c}=pd(o);return l.removeChild(o),c}const Qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return We(t)?n=>Mr(t,n):t};function zv(e){e.target.composing=!0}function Ku(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ms=Symbol("_assign"),Pr=Symbol("_initialValue");function yi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e.parentNode&&(e.type==="text"?e[Pr]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Pr]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Ms]=Qr(r);const l=o||r.props&&r.props.type==="number";Ps(e,t?"change":"input",c=>{c.target.composing||e[Ms](yi(e.value,n,l))}),(n||l)&&Ps(e,"change",()=>{e.value=yi(e.value,n,l)}),t||(Ps(e,"compositionstart",zv),Ps(e,"compositionend",Ku),Ps(e,"change",Ku))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",l=e[Pr];delete e[Pr],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[Ms](yi(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:l}},c){if(e[Ms]=Qr(c),e.composing)return;const f=(l||e.type==="number")&&!/^0\d/.test(e.value)?pa(e.value):e.value,m=t??"";if(f===m)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===m)||(e.value=m)}},Hn={deep:!0,created(e,{value:t,modifiers:{number:n}},o){e._modelValue=t,Ps(e,"change",()=>{const r=Array.prototype.filter.call(e.options,m=>m.selected).map(m=>n?pa(Zr(m)):Zr(m)),l=e.multiple,c=l?Ds(e._modelValue)?new Set(r):r:r[0],f=e._pendingValue=[l,l?We(c)?r.slice():r:c];try{e[Ms](c)}finally{Ks(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Ms]=Qr(o)},mounted(e,{value:t}){Ru(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ms]=Qr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Wv(t,n[1],n[0]))&&Ru(e,t)}};function Wv(e,t,n){if(!n||We(e))return us(e,t);if(Ds(e)){if(e.size!==t.length)return!1;for(const o of t)if(!e.has(o))return!1;return!0}return!1}function Ru(e,t){const n=e.multiple,o=We(t);if(!(n&&!o&&!Ds(t))){for(let r=0,l=e.options.length;rString(g)===String(f)):c.selected=Pf(t,f)>-1}else c.selected=t.has(f);else if(us(Zr(c),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zr(e){return"_value"in e?e._value:e.value}const Gv=["ctrl","shift","alt","meta"],Yv={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)=>Gv.some(n=>e[`${n}Key`]&&!t.includes(n))},Nt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...l)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const l=vs(r.key);if(t.some(c=>c===l||Jv[c]===l))return e(r)})},Xv=It({patchProp:Iv},mv);let Nu;function Qv(){return Nu||(Nu=Gp(Xv))}const Zv=(...e)=>{const t=Qv().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=tm(o);if(!r)return;const l=t._component;!tt(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const c=n(r,!1,em(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t};function em(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tm(e){return Tt(e)?document.querySelector(e):e}function At(e){return''+e+""}const nm={calendar:At(''),clock:At(''),"check-circle":At(''),edit:At(''),tag:At(''),star:At(''),close:At(''),flag:At(''),chart:At(''),export:At(''),"chevron-left":At(''),"chevron-right":At(''),"chevron-down":At(''),plus:At(''),search:At(''),settings:At(''),memo:At(''),lock:At(''),wallet:At(''),more:At(''),shield:At(''),warning:At(''),plan:At('')},sm=["innerHTML"],He=jt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=rt(()=>nm[t.name]||"");return(o,r)=>($(),A("span",{class:"icon",style:qn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,sm))}}),om=["aria-label"],rm={class:"confirm-body"},am={key:0,class:"confirm-badge"},im={class:"confirm-text"},lm={class:"confirm-msg"},um={class:"confirm-btns"},cm=jt({__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,o=t;function r(l){n.open&&l.key==="Escape"&&o("cancel")}return ft(()=>n.open,l=>{l?window.addEventListener("keydown",r):window.removeEventListener("keydown",r)}),hn(()=>window.removeEventListener("keydown",r)),(l,c)=>($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Nt(f=>o("cancel"),["self"]))},[i("div",{class:"dialog confirm-dialog",role:"dialog","aria-label":e.title},[i("div",rm,[e.danger?($(),A("div",am,[ye(He,{name:"warning",size:22})])):pe("",!0),i("div",im,[i("div",{class:Ye(["confirm-title",{"is-danger":e.danger}])},F(e.title),3),i("div",lm,F(e.message),1)])]),i("div",um,[i("button",{class:"btn",onClick:c[0]||(c[0]=f=>o("cancel"))},F(e.cancelText),1),i("button",{class:Ye(["btn",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>o("confirm"))},F(e.confirmText),3)])],8,om)])):pe("",!0)]),_:1})]))}}),Rt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},_n=Rt(cm,[["__scopeId","data-v-1f3675f2"]]);var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yd={exports:{}};(function(e,t){((n,o)=>{e.exports=o()})(Fu,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)},o=function(){return(o=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||l.Promise||(l.Promise=Promise);var g=Object.getPrototypeOf,h={}.hasOwnProperty;function _(s,a){return h.call(s,a)}function P(s,a){typeof a=="function"&&(a=a(g(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){I(s,u,a[u])})}var x=Object.defineProperty;function I(s,a,u,d){x(s,a,m(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function H(s){return{from:function(a){return s.prototype=Object.create(a.prototype),I(s.prototype,"constructor",s),{extend:P.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,le=[].slice;function ie(s,a,u){return le.call(s,a,u)}function U(s,a){return a(s)}function S(s){if(!s)throw new Error("Assertion Failed")}function D(s){l.setImmediate?setImmediate(s):setTimeout(s,0)}function ee(s,a){if(typeof a=="string"&&_(s,a))return s[a];if(!a)return s;if(typeof a!="string"){for(var u=[],d=0,p=a.length;d"u"?[]:(de=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[G=crypto.subtle.digest("SHA-512",new Uint8Array([0])),g(G),de]:[de,g(de),de]),de=G[0],Ws=G[1],Ws=Ws&&Ws.then,je=de&&de.constructor,at=!!G[2],yt=function(s,a){Yn.push([s,a]),Ze&&(queueMicrotask(zd),Ze=!1)},Dt=!0,Ze=!0,Qt=[],ms=[],Ut=b,Lt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:v,pgp:!1,env:{},finalize:v},Ue=Lt,Yn=[],hs=0,er=[];function Ie(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Ue;if(typeof s!="function"){if(s!==Be)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Aa(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(y){if(d._state===null){if(y===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Vs();y&&typeof y.then=="function"?u(d,function(C,K){y instanceof Ie?y._then(C,K):y.then(C,K)}):(d._state=!0,d._value=y,kl(d)),w&&Bs()}},Aa.bind(null,d))}catch(y){Aa(d,y)}}(this,s)}var Ta={get:function(){var s=Ue,a=or;function u(d,p){var y=this,w=!s.global&&(s!==Ue||a!==or),C=w&&!Xn(),K=new Ie(function(Y,N){Pa(y,new _l(xl(d,s,w,C),xl(p,s,w,C),Y,N,s))});return this._consoleTask&&(K._consoleTask=this._consoleTask),K}return u.prototype=Be,u},set:function(s){I(this,"then",s&&s.prototype===Be?Ta:{get:function(){return s},set:Ta.set})}};function _l(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 Aa(s,a){var u,d;ms.push(a),s._state===null&&(u=s._lib&&Vs(),a=Ut(a),s._state=!1,s._value=a,d=s,Qt.some(function(p){return p._value===d._value})||Qt.push(d),kl(s),u)&&Bs()}function kl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=Qt.length;w;)if(Qt[--w]._value===y._value)return Qt.splice(w,1)})(a),u.resolve(d)}catch(y){u.reject(y)}finally{--hs==0&&Oa(),--u.psd.ref||u.psd.finalize()}}function zd(){ys(Lt,function(){Vs()&&Bs()})}function Vs(){var s=Dt;return Ze=Dt=!1,s}function Bs(){var s,a,u;do for(;0.",$l="String expected.",ar="__dbnames",Ia="readonly",ja="readwrite";function bs(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var Sl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ir(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Oe(a))[s],a}}function El(){throw Le.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function ut(s,a){try{var u=Tl(s),d=Tl(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 C=N,K=w;if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function Y(){this.constructor=C}function N(){return w!==null&&w.apply(this,arguments)||this}return n(C,K),C.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y),Object.defineProperty(N.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),N.prototype.table=function(){return u},N})(s)),new Set),p=s.prototype;p;p=g(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function y(w){if(!w)return w;var C,K=Object.create(s.prototype);for(C in w)if(!d.has(C))try{K[C]=w[C]}catch{}return K}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=y,this.hook("reading",y),s},_t.prototype.defineClass=function(){return this.mapToClass(function(s){m(this,s)})},_t.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,y=d.keyPath,w=s;return y&&p&&(w=ir(y)(s)),this._trans("readwrite",function(C){return u.core.mutate({trans:C,type:"add",keys:a!=null?[a]:null,values:[w]})}).then(function(C){return C.numFailures?Ie.reject(C.failures[0]):C.lastResult}).then(function(C){if(y)try{z(s,y,C)}catch{}return C})},_t.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(y){var w=y??{};return Ol(w,a),d&&z(w,d,s),u.core.mutate({trans:p,type:"put",values:[w],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(C){return C.numFailures?Ie.reject(C.failures[0]):!!y})})})},_t.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=ee(s,this.schema.primKey.keyPath))===void 0?Pt(new Le.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},_t.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,y=d.keyPath,w=s;return y&&p&&(w=ir(y)(s)),this._trans("readwrite",function(C){return u.core.mutate({trans:C,type:"put",values:[w],keys:a!=null?[a]:null})}).then(function(C){return C.numFailures?Ie.reject(C.failures[0]):C.lastResult}).then(function(C){if(y)try{z(s,y,C)}catch{}return C})},_t.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 lr(a,[s],d)}).then(function(d){return d.numFailures?Ie.reject(d.failures[0]):void 0})})},_t.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:Sl}).then(function(u){return lr(s,null,u)})}).then(function(a){return a.numFailures?Ie.reject(a.failures[0]):void 0})},_t.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)})})})},_t.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,y=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var C=d.schema.primKey,Y=C.auto,C=C.keyPath;if(C&&p)throw new Le.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Le.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,Y=C&&Y?s.map(ir(C)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:Y,wantResults:y}).then(function(N){var L=N.numFailures,R=N.failures;if(L===0)return y?N.results:N.lastResult;throw new Ee("".concat(d.name,".bulkAdd(): ").concat(L," of ").concat(K," operations failed"),R)})})},_t.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,y=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var C=d.schema.primKey,Y=C.auto,C=C.keyPath;if(C&&p)throw new Le.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Le.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,Y=C&&Y?s.map(ir(C)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:Y,wantResults:y}).then(function(N){var L=N.numFailures,R=N.failures;if(L===0)return y?N.results:N.lastResult;throw new Ee("".concat(d.name,".bulkPut(): ").concat(L," of ").concat(K," operations failed"),R)})})},_t.prototype.bulkUpdate=function(s){var a=this,u=this.core,d=s.map(function(w){return w.key}),p=s.map(function(w){return w.changes}),y=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(C){var K=[],Y=[],N=(s.forEach(function(L,R){var W=L.key,B=L.changes,V=C[R];if(V){for(var q=0,te=Object.keys(B);qQ+ae&&q(Q+Y)})})}var te=qs(u)&&u.limit===1/0&&(typeof s!="function"||B)&&{index:u.index,range:u.range};return q(0).then(function(){if(0{for(var Qe=Math.min(we.length,Ve.length),nt=-1,lt=0;lt=R})).length===0?Ie.resolve():(q.forEach(function(Q){V.push(function(){var ae,ve,he,Ce=te,we=Q._cfg.dbschema,Re=(yr(L,Ce,B),yr(L,we,B),te=L._dbSchema=we,Ba(Ce,we)),ke=(Re.add.forEach(function(Ve){Ua(B,Ve[0],Ve[1].primKey,Ve[1].indexes)}),Re.change.forEach(function(Ve){if(Ve.recreate)throw new Le.Upgrade("Not yet support for changing primary key");var me=B.objectStore(Ve.name);Ve.add.forEach(function(Xe){return mr(me,Xe)}),Ve.change.forEach(function(Xe){me.deleteIndex(Xe.name),mr(me,Xe)}),Ve.del.forEach(function(Xe){return me.deleteIndex(Xe)})}),Q._cfg.contentUpgrade);if(ke&&Q._cfg.version>R)return pr(L,B),W._memoizedTables={},ae=ne(we),Re.del.forEach(function(Ve){ae[Ve]=Ce[Ve]}),Va(L,[L.Transaction.prototype]),vr(L,[L.Transaction.prototype],c(ae),ae),W.schema=ae,(ve=ze(ke))&&Us(),we=Ie.follow(function(){var Ve;(he=ke(W))&&ve&&(Ve=Xn.bind(null,null),he.then(Ve,Ve))}),he&&typeof he.then=="function"?Ie.resolve(he):we.then(function(){return he})}),V.push(function(ae){var ve,he,Ce=Q._cfg.dbschema;ve=Ce,he=ae,[].slice.call(he.db.objectStoreNames).forEach(function(we){return ve[we]==null&&he.db.deleteObjectStore(we)}),Va(L,[L.Transaction.prototype]),vr(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),W.schema=L._dbSchema}),V.push(function(ae){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===Q._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(ve){return ve!=="$meta"})):ae.objectStore("$meta").put(Q._cfg.version,"version"))})}),function Q(){return V.length?Ie.resolve(V.shift()(W.idbtrans)).then(Q):Ie.resolve()}().then(function(){Fl(te,B)}))}).catch(w);var K,Y;c(p).forEach(function(N){Ua(u,N,p[N].primKey,p[N].indexes)}),pr(s,u),Ie.follow(function(){return s.on.populate.fire(y)}).catch(w)})}function rf(s,a){Fl(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=hr(0,s.idbdb,a);yr(s,s._dbSchema,a);for(var d=0,p=Ba(u,s._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 C=a.objectStore(w.name);w.add.forEach(function(K){Ke&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(K.src)),mr(C,K)})})(p[d]);if(typeof y=="object")return y.value}}function Ba(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],y=a[u];if(p){var w={name:u,def:y,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(y.primKey.keyPath||"")||p.primKey.auto!==y.primKey.auto)w.recreate=!0,d.change.push(w);else{var C=p.idxByName,K=y.idxByName,Y=void 0;for(Y in C)K[Y]||w.del.push(Y);for(Y in K){var N=C[Y],L=K[Y];N?N.src!==L.src&&w.change.push(L):w.add.push(L)}(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(),y=p.next();!y.done;){var w=y.value;if(w.deref()===d._novip)return s.delete(w),void a.unregister(w);y=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 qa(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Rn(ar,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ha(s){return s&&typeof s.databases=="function"}function za(s){return Jn(function(){return Ue.letThrough=!0,s()})}function Wa(s){return!("from"in s)}var zt=function(s,a){var u;if(!this)return u=new zt,s&&"d"in s&&m(u,s),u;m(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:q.oldVersion,L=te<1,s.idbdb=V.result,y&&rf(s,N),of(s,te/10,N,W))},W),V.onsuccess=Et(function(){N=null;var q,te,Q,ae,ve,he,Ce=s.idbdb=V.result,we=ie(Ce.objectStoreNames);if(0"u"?Ie.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(R){function W(){return indexedDB.databases().finally(R)}K=setInterval(W,100),W()}).finally(function(){return clearInterval(K)}):Promise.resolve()).then(C)]).then(function(){return w(),a.onReadyBeingFired=[],Ie.resolve(za(function(){return s.on.ready.fire(s.vip)})).then(function R(){var W;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&&y)return 0;if(p)return 1;if(y)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,y)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=ut(u,d))===0){if(p&&y)return 0;if(p)return-1;if(y)return 1}return u})(s.upper,a.upper,s.upperOpen,a.upperOpen)}function vf(s,a,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var p,y;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,y=a,setTimeout(function(){p.subscribers.size===0&&Fe(y,p)},3e3))})}var mf={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return o(o({},s),{transaction:function(u,d,p){var y,w,C=s.transaction(u,d,p);return d==="readwrite"&&(p=(y=new AbortController).signal,C.addEventListener("abort",(w=function(K){return function(){if(y.abort(),d==="readwrite"){for(var Y=new Set,N=0,L=u;N{var te=ws["idb://".concat(W,"/").concat(B)];if(!te)return[];if(!(W=te.queries[V]))return[null,!1,te,null];var Q=W[(q.query?q.query.index.name:null)||""];if(!Q)return[null,!1,te,null];switch(V){case"query":var ae=(ve=q.direction)!=null?ve:"next",ve=Q.find(function(he){var Ce;return he.req.limit===q.limit&&he.req.values===q.values&&((Ce=he.req.direction)!=null?Ce:"next")===ae&&Xl(he.req.query.range,q.query.range)});return ve?[ve,!0,te,Q]:[Q.find(function(he){var Ce;return("limit"in he.req?he.req.limit:1/0)>=q.limit&&((Ce=he.req.direction)!=null?Ce:"next")===ae&&(!q.values||he.req.values)&&pf(he.req.query.range,q.query.range)}),!1,te,Q];case"count":return ve=Q.find(function(he){return Xl(he.req.query.range,q.query.range)}),[ve,!!ve,te,Q]}})(a,u,"query",y),R=L[0],Y=L[2],N=L[3],R&&L[1]?R.obsSet=y.obsSet:(L=d.query(y).then(function(W){var B=W.result;if(R&&(R.res=B),w){for(var V=0,q=B.length;V{var ve=Vs();try{y&&Us();var he=Jn(s,ae);return he=y?he.finally(Xn):he}finally{ve&&Bs()}})(te={subscr:q,signal:w.signal,requery:R,querier:s,trans:null}),L||(es.storagemutated.subscribe(B),L=!0),Promise.resolve(Q).then(function(ae){u=!0,a=ae,C||te.signal.aborted||(W()||(Y=q,W())?R():(K={},Ma(function(){return!C&&p.next&&p.next(ae)})))},function(ae){u=!1,["DatabaseClosedError","AbortError"].includes(ae==null?void 0:ae.name)||C||Ma(function(){C||p.error&&p.error(ae)})}))};return setTimeout(R,0),N});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var _s=Rn;function si(s){var a=ts;try{ts=!0,es.storagemutated.fire(s),Xa(s,!0)}finally{ts=a}}P(_s,o(o({},re),{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,(Ha(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ar})}):qa(u,a).toCollection().primaryKeys()).then(s)}catch{return Pt(new Le.MissingAPI)}var a,u},defineClass:function(){return function(s){m(this,s)}},ignoreTransaction:function(s){return Ue.trans?ys(Ue.transless||Lt,s):s()},vip:za,async:function(s){return function(){try{var a=Qa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Ie.resolve(a)}catch(u){return Pt(u)}}},spawn:function(s,a,u){try{var d=Qa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Ie.resolve(d)}catch(p){return Pt(p)}},currentTransaction:{get:function(){return Ue.trans||null}},waitFor:function(s,a){return s=Ie.resolve(typeof s=="function"?_s.ignoreTransaction(s):s).timeout(a||6e4),Ue.trans?Ue.trans.waitFor(s):s},Promise:Ie,debug:{get:function(){return Ke},set:function(s){Te(s)}},derive:H,extend:m,props:P,override:U,Events:fo,on:es,liveQuery:Ql,extendObservabilitySet:br,getByKeyPath:ee,setByKeyPath:z,delByKeyPath:function(s,a){typeof a=="string"?z(s,a,void 0):"length"in a&&[].map.call(a,function(u){z(s,u,void 0)})},shallowClone:ne,deepClone:Oe,getObjectDiff:Za,cmp:ut,asap:D,minKey:-1/0,addons:[],connections:{get:yo.toArray},errnames:xt,dependencies:Cr,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=mo(_s.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(es(fr,function(s){ts||(s=new CustomEvent(Ka,{detail:s}),ts=!0,dispatchEvent(s),ts=!1)}),addEventListener(Ka,function(s){s=s.detail,ts||si(s)}));var Gs,ts=!1,Zl=function(){};return typeof BroadcastChannel<"u"&&((Zl=function(){(Gs=new BroadcastChannel(Ka)).onmessage=function(s){return s.data&&si(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),es(fr,function(s){ts||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Rn.disableBfCache&&s.persisted){Ke&&console.debug("Dexie: handling persisted pagehide"),Gs!=null&&Gs.close();for(var a=0,u=yo.toArray();a{const o={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(r=>{r.category&&o[r.category]&&(r.category=o[r.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let se;function mm(e){se=e}function pl(){se&&se.close(),se=void 0}const hm=6,Bu=["公司","客户现场","出差","居家办公"],ym={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function Uo(e){return ym[e]||e}function Mo(e){return e<10?"0"+e:String(e)}function ls(e){return e.getFullYear()+"-"+Mo(e.getMonth()+1)+"-"+Mo(e.getDate())}function it(){return ls(new Date)}function mt(){const e=new Date;return ls(e)+"T"+Mo(e.getHours())+":"+Mo(e.getMinutes())+":"+Mo(e.getSeconds())}function zn(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 Ft(e,t){const n=Rs(e);return n.setDate(n.getDate()+t),ls(n)}function qo(e,t){const n=Rs(e),o=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const r=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,r)),ls(n)}function Zs(e){const t=Rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),ls(t)}function gm(e){const t=Rs(e).getDay();return t===0||t===6}function bm(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function gd(e){const t=Rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const wm=15e4;function Ki(e){const t=new Uint8Array(e);let n="";for(let o=0;o({}));if(!r.ok){const c=l&&l.error||"服务返回 "+r.status;throw e==="register"&&r.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!l.userId||!l.username)throw new Error("登录响应异常");return{userId:String(l.userId),username:String(l.username)}}async function yl(e,t,n){const o=await Nm(n,e,t);ra(o.userId);const r={userId:o.userId,username:o.username};return Km(r),xd(o.username,t),r}async function Fm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return yl(n,t,"login")}async function Vm(e,t,n){const o=(e||"").trim();if(o.length<2||o.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return yl(o,t,"register")}async function Bm(){const e=pn();if(!e)return null;try{return await yl(e.username,e.password,"login")}catch{return null}}async function Um(){sa(),pl(),oa=null,Cd()}function qm(){sa(),pl(),oa=null,Cd(),Rm()}async function Hm(e,t){if(!zo())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const o=pn();if(!o||o.password!==e)throw new Error("旧密码不正确");const r=await Ns();let l;try{l=await fetch(r+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+$d()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!l.ok){const c=await l.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+l.status)}xd(o.username,t)}async function zm(){if(!zo())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+$d()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const o=await n.json().catch(()=>({}));throw new Error(o&&o.error||"删除失败 "+n.status)}qm()}function $d(){return $a()}const Fi=O(null),Vi=O(null),Jo=O(0);function Es(){Jo.value++}const Sd=O(0);function Wm(){Sd.value++}const eo=O(""),ro=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","goal","transaction","plan"],Xs=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Lr(e){return JSON.stringify(e)}async function Gm(e){return se.table(e).toArray()}function Kr(e,t){return e==="setting"?t.key:t.id}async function Ym(){for(const e of ro){const t=se.table(e),n=await t.toArray();for(const o of n){if(e==="setting"&&Xs.has(o.key))continue;const r={};o.uuid||(r.uuid=Jm()),!o.updated_at&&o.created_at&&(r.updated_at=o.created_at),Object.keys(r).length&&await t.update(Kr(e,o),r)}}}function Jm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Xm(){return pn()!=null}async function Qm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Zm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function Ed(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 o=await n.json();if(!o||!o.token)throw new Error("云端登录异常");return String(o.token)}async function eh(e,t){let n=$a();return n||(n=await Ed(e,t),Ho(n),n)}async function Td(){const e=pn();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=pn();if(!e)throw new Error("未登录,无法同步");return Md({baseUrl:await Ns(),username:e.username,password:e.password})}async function Ad(){try{await Bi()}catch(e){eo.value=e instanceof Error?e.message:String(e);try{await Bi()}catch{}}}function Pd(e,t,n){const o={};for(const r of Object.keys(t))r!=="id"&&(o[r]=t[r]);if(e==="log_item"){delete o.work_log_id,delete o.project_id;const r=t.work_log_id?n.workLog.get(t.work_log_id):null;r&&r.uuid&&(o.wuuid=r.uuid);const l=t.project_id?n.project.get(t.project_id):null;l&&l.uuid&&(o.puuid=l.uuid)}if(e==="plan"){delete o.goal_id;const r=t.goal_id?n.goal.get(t.goal_id):null;r&&r.uuid&&(o.guuid=r.uuid)}return o}async function Od(){const e=await se.work_log.toArray(),t=await se.project.toArray(),n=await se.goal.toArray();return{workLog:new Map(e.map(o=>[o.id,o])),project:new Map(t.map(o=>[o.id,o])),goal:new Map(n.map(o=>[o.id,o]))}}let Io=!1,Rr=!1,Ui=!1,to=null,En=null,qi="",Hi=!1,Nr=null;async function no(){if(Io){Rr=!0;return}try{if(!await Xm())return;await Md(await th()),eo.value=""}catch(e){eo.value=e instanceof Error?e.message:String(e)}}async function th(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function nh(){if(Hi)return;Hi=!0,Nr=pm(async()=>{const t={};for(const n of ro)t[n]=await se.table(n).count();return t}).subscribe({next:()=>{Ui||Io||(to&&globalThis.clearTimeout(to),to=globalThis.setTimeout(()=>{no()},3e3))},error:()=>{}})}function sh(){Nr&&(Nr.unsubscribe(),Nr=null),En&&(En.close(),En=null,qi=""),to&&(globalThis.clearTimeout(to),to=null),Hi=!1}function oh(e,t){const n=e+"|"+t;if(!(En&&qi===n)){En&&(En.close(),En=null);try{En=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),qi=n,En.onmessage=()=>{no()}}catch{En=null}}}async function Md(e){if(Io)return Rr=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};Io=!0,Ui=!0;try{const t=await zi(e);return Rr&&(Rr=!1,globalThis.setTimeout(()=>{no()},800)),t}finally{Io=!1,Ui=!1}}async function zi(e,t=!1){var ee;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Ym();const o=await Od(),r=await se.sync_mirror.toArray(),l=new Map;for(const z of r)l.set(z.table+"|"+z.uuid,z);const c={},f=[];let m=0;for(const z of ro){let ne=await Gm(z);z==="setting"&&(ne=ne.filter(T=>!Xs.has(T.key)));const j=new Map;for(const T of ne)j.set(T.uuid,T);for(const[T,M]of j){const Z=Pd(z,M,o),Oe=Lr(Z),Se=l.get(z+"|"+T);(!Se||Se.hash!==Oe)&&(c[z]=c[z]||[],c[z].push(Z),m++)}for(const[T,M]of l)T.startsWith(z+"|")&&!j.has(M.uuid)&&f.push({table:z,uuid:M.uuid,deleted_at:mt()});c[z]=c[z]||[]}f.push(...uh());const g=await eh(n,e),h=z=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+z},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let _=await h(g);if(_.status===401){Ho("");const z=await Ed(n,e);Ho(z),_=await h(z)}if(!_.ok)throw new Error("同步服务返回 "+_.status);const P=await _.json(),x=String(P.dataEpoch||""),I="dsh_sync_epoch_"+(((ee=pn())==null?void 0:ee.username)||"anon"),H=x?localStorage.getItem(I):null;if(!t&&H&&x&&H!==x)return await se.sync_mirror.clear(),localStorage.setItem(I,x),zi(e,!0);const oe=P.tables||{},le=P.tombstones||[],ie=ro.reduce((z,ne)=>z+(oe[ne]||[]).length,0),U=r.length-f.length;if(!t&&ie0||S.removed>0||m>0)&&Es(),{pushed:m,pulled:S.changed,removed:S.removed,errors:0,at:D}}function Id(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function rh(){try{const e=localStorage.getItem(Id());if(e)return JSON.parse(e)}catch{}return{}}function ah(e){try{localStorage.setItem(Id(),JSON.stringify(e))}catch{}}async function ih(e,t){const n=rh(),o=new Set(t.map(x=>x.table+"|"+x.uuid)),r=new Map;for(const x of await se.sync_mirror.toArray())r.set(x.table+"|"+x.uuid,x);const l=new Set(Array.from(r.keys()).map(x=>x.split("|")[1]));let c=0,f=0;const m={},g={},h={};for(const x of ro){const I=se.table(x),H=await I.toArray(),oe=new Map(H.map(T=>[Kr(x,T),T])),le=new Map(H.filter(T=>T.uuid).map(T=>[T.uuid,T])),ie=(e[x]||[]).filter(T=>T&&typeof T=="object"&&T.uuid).filter(T=>!o.has(x+"|"+T.uuid)),U=ie.filter(T=>!(x==="setting"&&Xs.has(T.key))),S=ie.filter(T=>x==="setting"&&Xs.has(T.key));for(const T of S)lh(x,T.uuid);const D=x==="setting"?[]:H.filter(T=>T.uuid&&!l.has(T.uuid)&&!o.has(x+"|"+T.uuid)),ee={v:Math.max(0,...H.map(T=>Number(T.id)||0))};U.length;const z=[];for(const T of U){const M={...T};if(x==="log_item"){const Se=M.wuuid?m[M.wuuid]:void 0;if(!Se)continue;M.work_log_id=Se,delete M.wuuid,M.project_id=M.puuid?g[M.puuid]??null:null,delete M.puuid}if(x==="plan")if(M.guuid){const Se=h[M.guuid];M.goal_id=Se??null,delete M.guuid}else M.goal_id=null;let Z=Kr(x,T);if(x==="setting")Z=T.key;else{const Se=n[x]&&n[x][T.uuid],ge=le.get(T.uuid);ge&&ge.id!=null?Z=ge.id:typeof Se=="number"?Z=Se:Z=++ee.v}const Oe={...M,id:Z};x==="setting"&&Xs.has(Oe.key)||(z.push(Oe),x==="work_log"&&(m[T.uuid]=Z),x==="project"&&(g[T.uuid]=Z),x==="goal"&&(h[T.uuid]=Z))}const ne=z.concat(D);for(const T of ne){const M=oe.get(Kr(x,T));(!M||Lr(M)!==Lr(T))&&c++}f+=H.filter(T=>T.uuid&&!z.some(M=>M.uuid===T.uuid)&&!o.has(x+"|"+T.uuid)).length,await I.clear(),ne.length&&await I.bulkPut(ne);const j={};for(const T of ne)T.uuid&&(j[T.uuid]=T.id);n[x]=j}ah(n);const _=await Od(),P=[];for(const x of ro){const I=await se.table(x).toArray();for(const H of I)x==="setting"&&Xs.has(H.key)||H.uuid&&P.push({table:x,uuid:H.uuid,hash:Lr(Pd(x,H,_))})}return await se.sync_mirror.clear(),P.length&&await se.sync_mirror.bulkAdd(P.map(x=>({...x}))),await se.tombstone.clear(),{changed:c,removed:f+aa.length}}const aa=[];function lh(e,t){aa.some(n=>n.table===e&&n.uuid===t)||aa.push({table:e,uuid:t,deleted_at:mt()})}function uh(){return aa.splice(0)}const ch=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function pt(){await Ad()}async function $t(e,t){const n=await se.setting.get(e);return n?n.value:t}async function Kt(e,t){await se.setting.put({key:e,value:t}),ch.has(e)||await pt()}async function ps(){const e=await Promise.all([$t("work_start","09:00"),$t("work_end","18:00"),$t("grace_minutes","10"),$t("lunch_minutes","60"),$t("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 dh(){return $t("last_location","")}async function fh(e,t){const n=t.trim();await Kt("last_location",n),n&&await ia(n);let o=!1;const r=await Fs(e);r&&r.id?(r.location||"")!==n&&(await se.attendance.update(r.id,{location:n||null}),o=!0):n&&(await se.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:mt()}),o=!0),o&&await pt()}async function gl(){const e=await $t("location_presets","");if(!e)return Bu.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 Bu.slice()}async function jd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Kt("location_presets",JSON.stringify(t))}async function ia(e){const t=e.trim();if(!t)return;const n=await gl();n.includes(t)||await jd([...n,t])}async function ao(e=!1){const t=await se.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function ph(e){await se.project.add({name:e.trim(),archived:0,created_at:mt()}),await pt()}async function vh(e,t){await se.project.update(e,{name:t.trim()}),await pt()}async function mh(e,t){await se.project.update(e,{archived:t?1:0}),await pt()}async function Fs(e){return se.attendance.where("date").equals(e).first()}async function hh(e,t){const n=((t===void 0?await $t("last_location",""):t)||"").trim();let o=!1;const r=await Fs(e);if(r&&r.id){if(!r.clock_in_at){const l={clock_in_at:mt()};n&&(l.location=n),await se.attendance.update(r.id,l),o=!0}n&&(await $t("last_location","")!==n&&await Kt("last_location",n),await ia(n)),o&&await pt();return}await se.attendance.add({date:e,clock_in_at:mt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:mt()}),n&&(await Kt("last_location",n),await ia(n)),await pt()}async function yh(e){const t=await Fs(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await se.attendance.update(t.id,{clock_out_at:mt()}),await pt())}async function gh(e,t,n,o,r){(r||"").trim()&&await ia(r);const l=await Fs(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:o||null,location:(r||"").trim()||null,created_at:mt()};l&&l.id?await se.attendance.update(l.id,c):await se.attendance.add(c),await pt()}async function bh(e,t,n){const o=(n||"").trim();if(!o)return;const r=await Fs(e);r&&r.id&&(await se.attendance.update(r.id,{[t]:e+"T"+o+":00"}),await pt())}async function Xo(e,t){return se.attendance.where("date").between(e,t,!0,!0).toArray()}async function wh(e,t){const n=await Fs(e);if(t){const o={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:mt()};n&&n.id?await se.attendance.update(n.id,o):await se.attendance.add({...o,note:null,location:null})}else n&&n.id&&await se.attendance.update(n.id,{kind:"normal"});await pt()}async function _h(e){const t=await se.work_log.where("date").equals(e).first();return t||{id:await se.work_log.add({date:e,created_at:mt()}),date:e,created_at:mt()}}async function kh(e){return se.work_log.where("date").equals(e).first()}async function Ch(e){const t=await kh(e);return!t||!t.id?[]:(await se.log_item.where("work_log_id").equals(t.id).toArray()).sort((o,r)=>r.id-o.id)}async function xh(e,t){const n=await se.work_log.where("date").equals(e).first();let o;n&&n.id?o=n:o=await _h(e),await se.table("log_item").add({work_log_id:o.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 r=t.project_id?String(t.project_id):"";await $t("last_project","")!==r&&await Kt("last_project",r),await $t("last_category","")!==t.category&&await Kt("last_category",t.category),await pt()}async function bi(e,t){await se.table("log_item").update(e,t),await pt()}async function $h(e){await se.table("log_item").delete(e),await pt()}async function Qo(e,t){const n=await se.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const o=new Map(n.map(l=>[l.id,l.date]));return(await se.table("log_item").where("work_log_id").anyOf(n.map(l=>l.id)).toArray()).map(l=>({...l,date:o.get(l.work_log_id)||""})).sort((l,c)=>l.date===c.date?l.id-c.id:l.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function Ph(e){const t=mt();await se.plan.add({date:e.date,start_time:e.start_time,end_time:e.end_time,title:e.title.trim(),kind:e.kind.trim()||"其他",note:e.note||null,status:"todo",actual_minutes:0,timer_started_at:null,uuid:"",created_at:t,updated_at:t}),await pt()}async function Oh(e,t){await se.plan.update(e,{...t,updated_at:mt()}),await pt()}async function Mh(e){await se.plan.delete(e),await pt()}async function Ih(e,t){const n=await se.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await Sa(e),await se.plan.update(e,{status:t,updated_at:mt()}),await pt())}async function jh(e){const t=await se.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await Sa(n.id);await se.plan.update(e,{timer_started_at:mt(),updated_at:mt()}),await pt()}async function Sa(e){const t=await se.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 se.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:mt()}),await pt()}const Dh=366;function Lh(e,t){const n=[];let o=e,r=0;for(;o<=t&&rr.status==="done").length,total:o.length})}return t}async function Rh(){return(await se.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await se.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:r.get(c.work_log_id)||""}))}async function Wh(e,t=4){const n=e.trim().toLowerCase();return n?(await se.memo.toArray()).filter(r=>((r.title||"")+" "+(r.content||"")).toLowerCase().includes(n)).sort((r,l)=>r.updated_atn{await Promise.all([se.project.clear(),se.work_log.clear(),o.clear(),se.attendance.clear(),se.weekly_note.clear(),se.setting.clear(),se.memo.clear(),se.credential.clear(),r.clear(),c.clear(),l.clear()]),n.project&&n.project.length&&await se.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await se.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await o.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await se.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await se.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await se.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await se.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await se.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await r.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await l.bulkAdd(n.plan)}),await pt()}const ny=["制度学习","产品学习","打杂","项目实操","售后服务"],sy=["餐饮","交通","住房","通讯","学习","娱乐","其他"],oy=["工资","报销","其他"],Dd="log_categories",Ld="ledger_expense_categories",Kd="ledger_income_categories";function Rd(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const o=n.filter(r=>typeof r=="string"&&r.trim()).map(r=>r.trim());if(o.length)return Array.from(new Set(o))}}catch{}return t.slice()}async function Zo(){return Rd(await $t(Dd,""),ny)}async function ry(e){await Kt(Dd,JSON.stringify(e))}async function la(e){return Rd(await $t(e==="expense"?Ld:Kd,""),e==="expense"?sy:oy)}async function Wi(e,t){await Kt(e==="expense"?Ld:Kd,JSON.stringify(t))}const ay={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},iy={class:"dialog-head"},ly={class:"dialog-title"},uy={key:0,class:"muted dialog-sub"},cy={class:"dialog-body"},dy={class:"form-grid"},fy={class:"field span2"},py={key:0,class:"form-error"},vy={class:"field"},my=["value"],hy={class:"field"},yy=["value"],gy={class:"field"},by={class:"min-chips"},wy=["onClick"],_y={class:"field"},ky={class:"field span2"},Cy={class:"field"},xy={class:"field"},$y={class:"dialog-btns"},Sy=jt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=O([]);Zo().then(ie=>{n.value=ie});const o=e,r=t,l=O(""),c=O(null),f=O("dev"),m=O(null),g=O(""),h=O(""),_=O(0),P=O(0),x=O(""),I=O(null),H=rt(()=>{var S;const ie=o.projects.filter(D=>D.archived!==1),U=(S=o.item)==null?void 0:S.project_id;if(U&&!ie.some(D=>D.id===U)){const D=o.projects.find(z=>z.id===U),ee=ie.slice();return D&&ee.unshift({...D,name:D.name+"(已归档)"}),ee}return ie});function oe(ie){o.open&&ie.key==="Escape"&&r("cancel")}ft(()=>o.open,async ie=>{var U;if(ie){const S=o.item;l.value=(S==null?void 0:S.content)??"",c.value=(S==null?void 0:S.project_id)??null,f.value=(S==null?void 0:S.category)??"dev",m.value=(S==null?void 0:S.minutes)??null,g.value=(S==null?void 0:S.takeaway)??"",h.value=(S==null?void 0:S.remark)??"",_.value=(S==null?void 0:S.is_milestone)??0,P.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",oe),await Ks(),(U=I.value)==null||U.focus()}else window.removeEventListener("keydown",oe)}),hn(()=>window.removeEventListener("keydown",oe)),ft(l,()=>{x.value&&(x.value="")});function le(){const ie=l.value.trim();if(!ie){x.value="请填写工作内容";return}if(!o.item||!o.item.id){r("save",{id:0,content:ie,project_id:c.value,category:f.value,minutes:m.value&&m.value>0?m.value:null,takeaway:g.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value,needs_followup:P.value});return}r("save",{id:o.item.id,content:ie,project_id:c.value,category:f.value,minutes:m.value&&m.value>0?m.value:null,takeaway:g.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value?1:0,needs_followup:P.value?1:0})}return(ie,U)=>($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:U[10]||(U[10]=Nt(S=>r("cancel"),["self"]))},[i("div",ay,[i("div",iy,[i("div",null,[i("div",ly,F(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),A("div",uy,F(e.date),1)):pe("",!0)]),i("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=S=>r("cancel"))},[ye(He,{name:"close",size:16})])]),i("div",cy,[i("div",dy,[i("div",fy,[U[11]||(U[11]=i("label",null,"工作内容(必填)",-1)),Ae(i("input",{ref_key:"contentInput",ref:I,class:Ye(["input",{invalid:x.value}]),"onUpdate:modelValue":U[1]||(U[1]=S=>l.value=S),onKeydown:Mt(le,["enter"])},null,34),[[De,l.value]]),x.value?($(),A("div",py,F(x.value),1)):pe("",!0)]),i("div",vy,[U[13]||(U[13]=i("label",null,"所属项目",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":U[2]||(U[2]=S=>c.value=S)},[U[12]||(U[12]=i("option",{value:null},"无项目",-1)),($(!0),A(Me,null,st(H.value,S=>($(),A("option",{key:S.id,value:S.id},F(S.name),9,my))),128))],512),[[Hn,c.value]])]),i("div",hy,[U[14]||(U[14]=i("label",null,"工作分类",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":U[3]||(U[3]=S=>f.value=S)},[($(!0),A(Me,null,st(n.value,S=>($(),A("option",{key:S,value:S},F(S),9,yy))),128))],512),[[Hn,f.value]])]),i("div",gy,[U[15]||(U[15]=i("label",null,"耗时(分钟)",-1)),Ae(i("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":U[4]||(U[4]=S=>m.value=S),placeholder:"选填"},null,512),[[De,m.value,void 0,{number:!0}]]),i("div",by,[($(),A(Me,null,st([15,30,60,90,120],S=>i("button",{key:S,type:"button",class:Ye(["min-chip",{on:m.value===S}]),onClick:D=>m.value=m.value===S?null:S},F(S)+"分",11,wy)),64))])]),i("div",_y,[U[16]||(U[16]=i("label",null,"主要收获",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":U[5]||(U[5]=S=>g.value=S),placeholder:"一句话:学到了什么"},null,512),[[De,g.value]])]),i("div",ky,[U[17]||(U[17]=i("label",null,"备注",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":U[6]||(U[6]=S=>h.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,h.value]])]),i("div",Cy,[U[18]||(U[18]=i("label",null,"成果标记",-1)),i("button",{class:Ye(["toggle-btn",{on:_.value===1}]),onClick:U[7]||(U[7]=S=>_.value=_.value===1?0:1)},F(_.value===1?"已标记为成果":"未标记"),3)]),i("div",xy,[U[19]||(U[19]=i("label",null,"待跟进",-1)),i("button",{class:Ye(["toggle-btn",{onwarn:P.value===1}]),onClick:U[8]||(U[8]=S=>P.value=P.value===1?0:1)},F(P.value===1?"需要跟进":"无需跟进"),3)])])]),i("div",$y,[i("button",{class:"btn btn-sm",onClick:U[9]||(U[9]=S=>r("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:le},F(e.item?"保存修改":"添加"),1)])])])):pe("",!0)]),_:1})]))}}),Ey=Rt(Sy,[["__scopeId","data-v-91c30038"]]);function Or(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function uo(e,t,n,o){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(gm(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return o?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const r=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:o?"进行中":"未完成",makeup:r,workedMinutes:null};const l=Or(zn(e.clock_in_at)),c=Or(zn(e.clock_out_at)),f=Or(n.work_start),m=Or(n.work_end);let g="normal";!r&&l>f+n.grace_minutes?g="late":!r&&c{Fr.value=Fr.value.filter(n=>n.id!==t)},2e3)}function Ay(){return Fr}const Py={class:"day-panel"},Oy={class:"dp-head"},My={class:"dp-date"},Iy={class:"card sec"},jy={class:"att-grid"},Dy={class:"att-cell"},Ly={key:0,class:"edit-row"},Ky={key:1,class:"att-val"},Ry={class:"att-cell"},Ny={key:0,class:"edit-row"},Fy={key:1,class:"att-val"},Vy={class:"att-cell"},By=["list"],Uy=["id"],qy=["value"],Hy={class:"att-cell"},zy={class:"att-val status-val"},Wy={key:0,class:"tag"},Gy={key:1,class:"muted"},Yy={key:0,class:"att-note muted"},Jy={class:"att-actions"},Xy=["disabled"],Qy=["disabled"],Zy=["disabled"],eg=["disabled"],tg={key:0,class:"card sec makeup"},ng={class:"form-grid"},sg={class:"field"},og={class:"field"},rg={class:"field span2"},ag=["list"],ig={class:"field span2"},lg={key:0,class:"form-error"},ug={class:"form-footer"},cg={class:"list-sec"},dg={class:"sec-head"},fg={class:"sec-title"},pg={key:0,class:"empty muted"},vg={class:"item-main"},mg={class:"tag"},hg=["onClick"],yg={key:0,class:"muted item-meta"},gg={key:1,class:"muted num item-meta"},bg=["onClick"],wg=["onClick"],_g=["onClick"],kg=["onClick"],Cg={key:0,class:"item-sub"},xg={key:0,class:"muted2"},$g={key:1,class:"muted"},Sg={key:1,class:"dp-foot muted num"},Eg=jt({__name:"DayPanel",props:{date:{}},setup(e){const t=O([]);Zo().then(k=>{t.value=k});const n=e,o=O(!0),r=O(null),l=O(void 0),c=O([]),f=O([]),m=O(""),g=O([]),h=rt(()=>"loc-list-"+n.date),_=rt(()=>n.date===it());async function P(){o.value=!0,r.value=await ps(),l.value=await Fs(n.date),c.value=await Ch(n.date),f.value=await ao(!0),g.value=await gl(),m.value=l.value&&l.value.location||await dh(),o.value=!1}ln(P),ft(()=>n.date,P),ft(Jo,()=>{P()});function x(k){if(!k)return"";const v=f.value.find(b=>b.id===k);return v?v.name:"已删除项目"}const I=rt(()=>r.value?uo(l.value,n.date,r.value,_.value):null),H=rt(()=>c.value.reduce((k,v)=>k+(v.minutes||0),0)),oe=O(!1);async function le(){oe.value||(oe.value=!0,await hh(n.date,m.value),await P(),Es(),Ne("上班打卡成功"),oe.value=!1)}async function ie(){oe.value||(oe.value=!0,await yh(n.date),await P(),Es(),Ne("下班打卡成功"),oe.value=!1)}async function U(){await fh(n.date,m.value),Es(),Ne("地点已更新")}const S=O(!1),D=rt(()=>{var k;return((k=l.value)==null?void 0:k.kind)==="leave"});function ee(){if(l.value&&l.value.clock_in_at){S.value=!0;return}z(!0)}async function z(k){S.value=!1,await wh(n.date,k),await P(),Es(),Ne(k?"已标记为休假":"已取消休假")}const ne=O(null),j=O(""),T=O(null);ft(ne,async k=>{var v;k&&(await Ks(),(v=T.value)==null||v.focus())});function M(k){var b,E;const v=k==="in"?(b=l.value)==null?void 0:b.clock_in_at:(E=l.value)==null?void 0:E.clock_out_at;ne.value=k,j.value=v?zn(v):k==="in"?"09:00":"18:00"}function Z(){ne.value=null}async function Oe(){const k=ne.value;k&&(ne.value=null,j.value&&(await bh(n.date,k==="in"?"clock_in_at":"clock_out_at",j.value),await P(),Es(),Ne("打卡时间已修改")))}const Se=O(!1),ge=O("09:00"),Pe=O("18:00"),qe=O(""),Fe=O(""),Je=O("");function Ge(){Fe.value=m.value,Je.value="",Se.value=!Se.value}async function ze(){if(!ge.value||!Pe.value){Je.value="请填写上班与下班时间";return}await gh(n.date,n.date+"T"+ge.value+":00",n.date+"T"+Pe.value+":00",qe.value.trim(),Fe.value),Se.value=!1,qe.value="",Je.value="",await P(),Es(),Ne("补卡已保存")}const re=O(null),J=O(!1);function $e(k){re.value=k,J.value=!0}function ot(){re.value=null,J.value=!0}async function wt(k){k.id?(await bi(k.id,{content:k.content,project_id:k.project_id,category:k.category,minutes:k.minutes,takeaway:k.takeaway,remark:k.remark,is_milestone:k.is_milestone,needs_followup:k.needs_followup}),Ne("记录已更新")):(await xh(n.date,{content:k.content,project_id:k.project_id,category:k.category,minutes:k.minutes,takeaway:k.takeaway,remark:k.remark}),Ne("记录已添加")),re.value=null,J.value=!1,await P()}async function Ee(k){await bi(k.id,{is_milestone:k.is_milestone?0:1}),await P()}async function xt(k){await bi(k.id,{needs_followup:k.needs_followup?0:1}),await P()}const St=O(null);async function Le(){St.value&&St.value.id&&await $h(St.value.id),St.value=null,await P(),Ne("记录已删除")}return(k,v)=>($(),A("div",Py,[i("div",Oy,[i("div",My,F(Ht(gd)(e.date)),1)]),i("div",Iy,[v[19]||(v[19]=i("div",{class:"sec-title"},"出勤信息",-1)),i("div",jy,[i("div",Dy,[v[15]||(v[15]=i("label",null,"上班时间",-1)),ne.value==="in"?($(),A("div",Ly,[Ae(i("input",{ref_key:"timeInput",ref:T,type:"time",class:"input time-input","onUpdate:modelValue":v[0]||(v[0]=b=>j.value=b),onKeydown:[Mt(Oe,["enter"]),Mt(Z,["esc"])]},null,544),[[De,j.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),i("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),A("div",Ky,[i("span",{class:Ye(["num",{"val-empty":!(l.value&&l.value.clock_in_at)}])},F(l.value&&l.value.clock_in_at?Ht(zn)(l.value.clock_in_at):"未打卡"),3),l.value&&l.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:v[1]||(v[1]=b=>M("in"))},[ye(He,{name:"edit",size:13})])):pe("",!0)]))]),i("div",Ry,[v[16]||(v[16]=i("label",null,"下班时间",-1)),ne.value==="out"?($(),A("div",Ny,[Ae(i("input",{ref_key:"timeInput",ref:T,type:"time",class:"input time-input","onUpdate:modelValue":v[2]||(v[2]=b=>j.value=b),onKeydown:[Mt(Oe,["enter"]),Mt(Z,["esc"])]},null,544),[[De,j.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),i("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),A("div",Fy,[i("span",{class:Ye(["num",{"val-empty":!(l.value&&l.value.clock_out_at)}])},F(l.value&&l.value.clock_out_at?Ht(zn)(l.value.clock_out_at):"未打卡"),3),l.value&&l.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:v[3]||(v[3]=b=>M("out"))},[ye(He,{name:"edit",size:13})])):pe("",!0)]))]),i("div",Vy,[v[17]||(v[17]=i("label",null,"上班地点",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":v[4]||(v[4]=b=>m.value=b),list:h.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:U},null,40,By),[[De,m.value]]),i("datalist",{id:h.value},[($(!0),A(Me,null,st(g.value,b=>($(),A("option",{key:b,value:b},null,8,qy))),128))],8,Uy)]),i("div",Hy,[v[18]||(v[18]=i("label",null,"考勤状态",-1)),i("div",zy,[I.value?($(),A(Me,{key:0},[i("span",{class:Ye(["dot",I.value.status])},null,2),i("span",null,F(I.value.label),1),l.value&&l.value.kind==="makeup"?($(),A("span",Wy,"补卡")):pe("",!0)],64)):($(),A("span",Gy,"--"))])])]),l.value&&l.value.note?($(),A("div",Yy,"补卡说明:"+F(l.value.note),1)):pe("",!0),i("div",Jy,[_.value&&(!l.value||!l.value.clock_in_at)?($(),A("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:le},"上班打卡",8,Xy)):_.value&&l.value&&l.value.clock_in_at&&!l.value.clock_out_at?($(),A("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ie},"下班打卡",8,Qy)):pe("",!0),!_.value&&(!l.value||!l.value.clock_in_at)?($(),A("button",{key:2,class:"btn btn-sm",onClick:Ge},"补卡")):pe("",!0),D.value?($(),A("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:v[5]||(v[5]=b=>z(!1))},"取消休假",8,eg)):($(),A("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:ee},"标记休假",8,Zy))])]),Se.value?($(),A("div",tg,[v[24]||(v[24]=i("div",{class:"sec-title"},"补卡登记",-1)),i("div",ng,[i("div",sg,[v[20]||(v[20]=i("label",null,"上班时间",-1)),Ae(i("input",{type:"time",class:"input","onUpdate:modelValue":v[6]||(v[6]=b=>ge.value=b)},null,512),[[De,ge.value]])]),i("div",og,[v[21]||(v[21]=i("label",null,"下班时间",-1)),Ae(i("input",{type:"time",class:"input","onUpdate:modelValue":v[7]||(v[7]=b=>Pe.value=b)},null,512),[[De,Pe.value]])]),i("div",rg,[v[22]||(v[22]=i("label",null,"上班地点",-1)),Ae(i("input",{class:"input",list:h.value,"onUpdate:modelValue":v[8]||(v[8]=b=>Fe.value=b),placeholder:"可直接输入"},null,8,ag),[[De,Fe.value]])]),i("div",ig,[v[23]||(v[23]=i("label",null,"补卡原因",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":v[9]||(v[9]=b=>qe.value=b),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,qe.value]])])]),Je.value?($(),A("div",lg,F(Je.value),1)):pe("",!0),i("div",ug,[i("button",{class:"btn btn-sm",onClick:v[10]||(v[10]=b=>Se.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:ze},"保存补卡")])])):pe("",!0),i("div",cg,[i("div",dg,[i("span",fg,"工作记录("+F(c.value.length)+")",1),i("button",{class:"btn btn-primary btn-sm",onClick:ot},[ye(He,{name:"plus",size:14}),v[25]||(v[25]=Ct(" 添加记录",-1))])]),!c.value.length&&!o.value?($(),A("div",pg,"暂无记录")):pe("",!0),($(!0),A(Me,null,st(c.value,b=>($(),A("div",{key:b.id,class:"item"},[i("div",vg,[i("span",mg,F(Ht(Uo)(b.category)),1),i("span",{class:"item-content",title:"点击编辑",onClick:E=>$e(b)},F(b.content),9,hg),b.project_id?($(),A("span",yg,F(x(b.project_id)),1)):pe("",!0),b.minutes?($(),A("span",gg,F(b.minutes)+" 分钟",1)):pe("",!0),v[26]||(v[26]=i("span",{class:"flex1"},null,-1)),i("button",{class:"icon-btn",title:"编辑完整信息",onClick:E=>$e(b)},[ye(He,{name:"edit",size:14})],8,bg),i("button",{class:Ye(["icon-btn",{active:b.is_milestone===1}]),title:"成果标记",onClick:E=>Ee(b)},[ye(He,{name:"star",size:14})],10,wg),i("button",{class:Ye(["icon-btn",{"active-warn":b.needs_followup===1}]),title:"待跟进",onClick:E=>xt(b)},[ye(He,{name:"flag",size:14})],10,_g),i("button",{class:"icon-btn",title:"删除",onClick:E=>St.value=b},[ye(He,{name:"close",size:14})],8,kg)]),b.takeaway||b.remark?($(),A("div",Cg,[b.takeaway?($(),A("div",xg,"收获:"+F(b.takeaway),1)):pe("",!0),b.remark?($(),A("div",$g,"备注:"+F(b.remark),1)):pe("",!0)])):pe("",!0)]))),128)),c.value.length?($(),A("div",Sg,[Ct(" 共 "+F(c.value.length)+" 条事项 ",1),H.value?($(),A(Me,{key:0},[Ct(" · "+F((H.value/60).toFixed(1))+" 小时",1)],64)):pe("",!0)])):pe("",!0)]),ye(_n,{open:!!St.value,title:"删除确认",message:St.value?"将删除工作记录「"+St.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:v[11]||(v[11]=b=>St.value=null),onConfirm:Le},null,8,["open","message"]),ye(_n,{open:S.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:v[12]||(v[12]=b=>S.value=!1),onConfirm:v[13]||(v[13]=b=>z(!0))},null,8,["open"]),ye(Ey,{open:J.value,item:re.value,projects:f.value,date:e.date,onCancel:v[14]||(v[14]=b=>J.value=!1),onSave:wt},null,8,["open","item","projects","date"])]))}}),Nd=Rt(Eg,[["__scopeId","data-v-81276f4c"]]),Tg={class:"cal-page"},Ag={class:"cal-toolbar"},Pg={class:"cal-title num"},Og=["disabled"],Mg={class:"card cal-card"},Ig={class:"cal-head"},jg={class:"cal-grid"},Dg=["title","onClick"],Lg={class:"cal-marks"},Kg={key:0,class:"drawer"},Rg={class:"drawer-head"},Ng={class:"drawer-body"},Fg=jt({__name:"CalendarView",setup(e){const t=O(it()),n=rt(()=>Number(t.value.slice(0,4))),o=rt(()=>Number(t.value.slice(5,7))-1),r=rt(()=>n.value+" 年 "+(o.value+1)+" 月"),l=["一","二","三","四","五","六","日"],c=rt(()=>{const S=(new Date(n.value,o.value,1).getDay()+6)%7,D=new Date(n.value,o.value+1,0).getDate(),ee=[];for(let z=0;z[M.date,M])),ne=D[2],j=new Map;for(const M of c.value){if(!M.inMonth)continue;const Z=uo(z.get(M.date),M.date,ee,M.date===m),Oe=ne.filter(Se=>Se.date===M.date);j.set(M.date,{status:Z.status,label:Z.label,location:((T=z.get(M.date))==null?void 0:T.location)||"",hasLog:Oe.length>0,hasMilestone:Oe.some(Se=>Se.is_milestone===1)})}f.value=j}ft([n,o],g,{immediate:!0}),ft(Jo,()=>{g()});function h(U){var S;return((S=f.value.get(U))==null?void 0:S.status)??""}function _(U){const S=f.value.get(U);return S?U+" · "+S.label+(S.location?" · "+S.location:""):U}function P(U){var S;return!!((S=f.value.get(U))!=null&&S.hasLog)}function x(U){var S;return!!((S=f.value.get(U))!=null&&S.hasMilestone)}function I(){t.value=qo(t.value,-1)}function H(){t.value=qo(t.value,1)}function oe(){t.value=it()}const le=O(null);function ie(U,S){S&&(le.value=U)}return ft(Fi,U=>{U&&(t.value=U,le.value=U,Fi.value=null)},{immediate:!0}),(U,S)=>($(),A("div",Tg,[i("div",Ag,[i("button",{class:"icon-btn",title:"上一月",onClick:I},[ye(He,{name:"chevron-left",size:16})]),i("span",Pg,F(r.value),1),i("button",{class:"icon-btn",title:"下一月",onClick:H},[ye(He,{name:"chevron-right",size:16})]),i("button",{class:"btn btn-sm",disabled:t.value===Ht(m),onClick:oe},"回到本月",8,Og)]),i("div",Mg,[i("div",Ig,[($(),A(Me,null,st(l,D=>i("span",{key:D,class:"cal-week"},F(D),1)),64))]),i("div",jg,[($(!0),A(Me,null,st(c.value,(D,ee)=>($(),A("button",{key:ee,class:Ye(["cal-cell",{blank:!D.inMonth,weekend:D.weekend,selected:le.value===D.date,"is-today":D.date===Ht(m)}]),title:D.inMonth?_(D.date):void 0,onClick:z=>ie(D.date,D.inMonth)},[D.inMonth?($(),A(Me,{key:0},[i("span",{class:Ye(["daynum num",{today:D.date===Ht(m)}])},F(Number(D.date.slice(8,10))),3),i("span",Lg,[h(D.date)?($(),A("span",{key:0,class:Ye(["dot",h(D.date)])},null,2)):pe("",!0),P(D.date)?($(),gt(He,{key:1,name:"check-circle",size:12,class:"mark-log"})):pe("",!0),x(D.date)?($(),gt(He,{key:2,name:"star",size:12,class:"mark-star"})):pe("",!0)])],64)):pe("",!0)],10,Dg))),128))])]),ye(Gn,{name:"drawer"},{default:Cn(()=>[le.value?($(),A("aside",Kg,[i("div",Rg,[S[1]||(S[1]=i("span",{class:"drawer-title"},"当日详情",-1)),i("button",{class:"icon-btn",onClick:S[0]||(S[0]=D=>le.value=null)},[ye(He,{name:"close",size:16})])]),i("div",Ng,[ye(Nd,{date:le.value},null,8,["date"])])])):pe("",!0)]),_:1})]))}}),Vg=Rt(Fg,[["__scopeId","data-v-abd71a5b"]]),Bg="modulepreload",Ug=function(e,t){return new URL(e,t).href},qu={},Fd=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));r=Promise.allSettled(n.map(g=>{if(g=Ug(g,o),g in qu)return;qu[g]=!0;const h=g.endsWith(".css"),_=h?'[rel="stylesheet"]':"";if(!!o)for(let I=c.length-1;I>=0;I--){const H=c[I];if(H.href===g&&(!h||H.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${_}`))return;const x=document.createElement("link");if(x.rel=h?"stylesheet":Bg,h||(x.as="script"),x.crossOrigin="",x.href=g,m&&x.setAttribute("nonce",m),document.head.appendChild(x),h)return new Promise((I,H)=>{x.addEventListener("load",I),x.addEventListener("error",()=>H(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return r.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const qg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},o=(l,c)=>{n.platforms.set(l,c)},r=l=>{n.platforms.has(l)&&(n.currentPlatform=n.platforms.get(l))};return n.addPlatform=o,n.setPlatform=r,n},Hg=e=>e.CapacitorPlatforms=qg(e),Vd=Hg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Vd.addPlatform;Vd.setPlatform;var io;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(io||(io={}));class wi extends Error{constructor(t,n,o){super(t),this.message=t,this.code=n,this.data=o}}const zg=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"},Wg=e=>{var t,n,o,r,l;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},m=f.Plugins=f.Plugins||{},g=e.CapacitorPlatforms,h=()=>c!==null?c.name:zg(e),_=((t=g==null?void 0:g.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||h,P=()=>_()!=="web",x=((n=g==null?void 0:g.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||P,I=z=>{const ne=S.get(z);return!!(ne!=null&&ne.platforms.has(_())||le(z))},H=((o=g==null?void 0:g.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||I,oe=z=>{var ne;return(ne=f.PluginHeaders)===null||ne===void 0?void 0:ne.find(j=>j.name===z)},le=((r=g==null?void 0:g.currentPlatform)===null||r===void 0?void 0:r.getPluginHeader)||oe,ie=z=>e.console.error(z),U=(z,ne,j)=>Promise.reject(`${j} does not have an implementation of "${ne}".`),S=new Map,D=(z,ne={})=>{const j=S.get(z);if(j)return console.warn(`Capacitor plugin "${z}" already registered. Cannot register plugins twice.`),j.proxy;const T=_(),M=le(z);let Z;const Oe=async()=>(!Z&&T in ne?Z=typeof ne[T]=="function"?Z=await ne[T]():Z=ne[T]:c!==null&&!Z&&"web"in ne&&(Z=typeof ne.web=="function"?Z=await ne.web():Z=ne.web),Z),Se=(Ge,ze)=>{var re,J;if(M){const $e=M==null?void 0:M.methods.find(ot=>ze===ot.name);if($e)return $e.rtype==="promise"?ot=>f.nativePromise(z,ze.toString(),ot):(ot,wt)=>f.nativeCallback(z,ze.toString(),ot,wt);if(Ge)return(re=Ge[ze])===null||re===void 0?void 0:re.bind(Ge)}else{if(Ge)return(J=Ge[ze])===null||J===void 0?void 0:J.bind(Ge);throw new wi(`"${z}" plugin is not implemented on ${T}`,io.Unimplemented)}},ge=Ge=>{let ze;const re=(...J)=>{const $e=Oe().then(ot=>{const wt=Se(ot,Ge);if(wt){const Ee=wt(...J);return ze=Ee==null?void 0:Ee.remove,Ee}else throw new wi(`"${z}.${Ge}()" is not implemented on ${T}`,io.Unimplemented)});return Ge==="addListener"&&($e.remove=async()=>ze()),$e};return re.toString=()=>`${Ge.toString()}() { [capacitor code] }`,Object.defineProperty(re,"name",{value:Ge,writable:!1,configurable:!1}),re},Pe=ge("addListener"),qe=ge("removeListener"),Fe=(Ge,ze)=>{const re=Pe({eventName:Ge},ze),J=async()=>{const ot=await re;qe({eventName:Ge,callbackId:ot},ze)},$e=new Promise(ot=>re.then(()=>ot({remove:J})));return $e.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await J()},$e},Je=new Proxy({},{get(Ge,ze){switch(ze){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return M?Fe:Pe;case"removeListener":return qe;default:return ge(ze)}}});return m[z]=Je,S.set(z,{name:z,proxy:Je,platforms:new Set([...Object.keys(ne),...M?[T]:[]])}),Je},ee=((l=g==null?void 0:g.currentPlatform)===null||l===void 0?void 0:l.registerPlugin)||D;return f.convertFileSrc||(f.convertFileSrc=z=>z),f.getPlatform=_,f.handleError=ie,f.isNativePlatform=x,f.isPluginAvailable=H,f.pluginMethodNoop=U,f.registerPlugin=ee,f.Exception=wi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Gg=e=>e.Capacitor=Wg(e),lo=Gg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Bd=lo.registerPlugin;lo.Plugins;class Ud{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 o=!1;this.listeners[t]||(this.listeners[t]=[],o=!0),this.listeners[t].push(n);const l=this.windowListeners[t];l&&!l.registered&&this.addWindowListener(l),o&&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,o){const r=this.listeners[t];if(!r){if(o){let l=this.retainedEventArguments[t];l||(l=[]),l.push(n),this.retainedEventArguments[t]=l}return}r.forEach(l=>l(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:o=>{this.notifyListeners(n,o)}}}unimplemented(t="not implemented"){return new lo.Exception(t,io.Unimplemented)}unavailable(t="not available"){return new lo.Exception(t,io.Unavailable)}async removeListener(t,n){const o=this.listeners[t];if(!o)return;const r=o.indexOf(n);this.listeners[t].splice(r,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(o=>{this.notifyListeners(t,o)}))}}const Hu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),zu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Yg extends Ud{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(o=>{if(o.length<=0)return;let[r,l]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=zu(r).trim(),l=zu(l).trim(),n[r]=l}),n}async setCookie(t){try{const n=Hu(t.key),o=Hu(t.value),r=`; expires=${(t.expires||"").replace("expires=","")}`,l=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${o||""}${r}; path=${l}; ${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)}}}Bd("CapacitorCookies",{web:()=>new Yg});const Jg=async e=>new Promise((t,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;t(r.indexOf(",")>=0?r.split(",")[1]:r)},o.onerror=r=>n(r),o.readAsDataURL(e)}),Xg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(r=>r.toLocaleLowerCase()).reduce((r,l,c)=>(r[l]=e[t[c]],r),{})},Qg=(e,t=!0)=>e?Object.entries(e).reduce((o,r)=>{const[l,c]=r;let f,m;return Array.isArray(c)?(m="",c.forEach(g=>{f=t?encodeURIComponent(g):g,m+=`${l}=${f}&`}),m.slice(0,-1)):(f=t?encodeURIComponent(c):c,m=`${l}=${f}`),`${o}&${m}`},"").substr(1):null,Zg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=Xg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const l=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))l.set(c,f);n.body=l.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const l=new FormData;if(e.data instanceof FormData)e.data.forEach((f,m)=>{l.append(m,f)});else for(const f of Object.keys(e.data))l.append(f,e.data[f]);n.body=l;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(r.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class eb extends Ud{async request(t){const n=Zg(t,t.webFetchExtra),o=Qg(t.params,t.shouldEncodeUrlParams),r=o?`${t.url}?${o}`:t.url,l=await fetch(r,n),c=l.headers.get("content-type")||"";let{responseType:f="text"}=l.ok?t:{};c.includes("application/json")&&(f="json");let m,g;switch(f){case"arraybuffer":case"blob":g=await l.blob(),m=await Jg(g);break;case"json":m=await l.json();break;case"document":case"text":default:m=await l.text()}const h={};return l.headers.forEach((_,P)=>{h[P]=_}),{data:m,headers:h,status:l.status,url:l.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"}))}}Bd("CapacitorHttp",{web:()=>new eb});async function Ea(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(lo.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:m}=await Fd(async()=>{const{Filesystem:g,Directory:h,Encoding:_}=await import("./index-BGMpfaMy.js");return{Filesystem:g,Directory:h,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:m.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:m.UTF8,recursive:!0})).uri}}const o=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(o),l=document.createElement("a");return l.href=r,l.download=e,l.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e4),""}const tb=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Ea},Symbol.toStringTag,{value:"Module"})),nb={class:"detail-page"},sb={class:"card toolbar"},ob={class:"nav-row"},rb=["value"],ab=["disabled"],ib={class:"exp-row"},lb={class:"seg"},ub=["disabled"],cb=jt({__name:"TodayView",setup(e){const t=O(it()),n=rt(()=>t.value===it());function o(){t.value=Ft(t.value,-1)}function r(){t.value=Ft(t.value,1)}function l(){t.value=it()}const c=O("day"),f=O(it()),m=O(it()),g=O(!1);function h(){if(c.value==="day")return{start:t.value,end:t.value,label:t.value};if(c.value==="week"){const x=Zs(f.value);return{start:x,end:Ft(x,6),label:x+"_"+Ft(x,6)}}if(c.value==="month"){const x=f.value.slice(0,4),I=f.value.slice(5,7),H=new Date(Number(x),Number(I),0).getDate();return{start:x+"-"+I+"-01",end:x+"-"+I+"-"+H,label:x+"-"+I}}return{start:f.value,end:m.value,label:f.value+"_"+m.value}}async function _(){if(!g.value){g.value=!0;try{const{start:x,end:I,label:H}=h(),[oe,le,ie,U]=await Promise.all([ps(),Xo(x,I),Qo(x,I),ao(!0)]),S=new Map(U.map(j=>[j.id,j.name])),D=["# 工作详情 "+H,""],ee=["周日","周一","周二","周三","周四","周五","周六"];let z=x,ne=0;for(;z<=I&&ne<400;){const j=ie.filter(M=>M.date===z),T=le.find(M=>M.date===z);if(T||j.length){if(D.push("## "+z+" "+ee[new Date(z+"T00:00:00").getDay()],""),T&&(T.clock_in_at||T.kind==="makeup")){const M=uo(T,z,oe,z===it()),Z=[zn(T.clock_in_at),"–",zn(T.clock_out_at),"·",M.label];T.location&&Z.push("· 地点:"+T.location),D.push("考勤:"+Z.join(" "),"")}for(const M of j){const Z=M.project_id&&S.get(M.project_id)||"",Oe="- 【"+Uo(M.category)+"】"+M.content+(M.minutes?"("+M.minutes+" 分钟)":"")+(Z?" @"+Z:"");D.push(Oe),M.takeaway&&D.push(" - 收获:"+M.takeaway),M.needs_followup===1&&M.remark?D.push(" - 待跟进:"+M.remark):M.remark&&D.push(" - 备注:"+M.remark)}D.push("")}z=Ft(z,1),ne++}await Ea("工作详情_"+H+".md",D.join(` +`)),Ne("已导出 Markdown")}finally{g.value=!1}}}function P(x){const I=x.target.value;I&&(t.value=I)}return ft(t,x=>{f.value=x,c.value==="custom"&&(m.value=x)}),(x,I)=>($(),A("div",nb,[i("div",sb,[i("div",ob,[i("button",{class:"icon-btn",title:"前一天",onClick:o},[ye(He,{name:"chevron-left",size:16})]),i("span",{class:Ye(["date-title num",{"is-today":n.value}])},F(Ht(gd)(t.value)),3),i("button",{class:"icon-btn",title:"后一天",onClick:r},[ye(He,{name:"chevron-right",size:16})]),i("input",{type:"date",class:"input w-date",value:t.value,onChange:P},null,40,rb),i("button",{class:"btn btn-sm",disabled:n.value,onClick:l},"回到今天",8,ab)]),I[7]||(I[7]=i("div",{class:"tool-sep"},null,-1)),i("div",ib,[I[6]||(I[6]=i("span",{class:"muted exp-label"},"导出",-1)),i("div",lb,[i("button",{class:Ye(["seg-btn",{active:c.value==="day"}]),onClick:I[0]||(I[0]=H=>c.value="day")},"指定日",2),i("button",{class:Ye(["seg-btn",{active:c.value==="week"}]),onClick:I[1]||(I[1]=H=>c.value="week")},"当周",2),i("button",{class:Ye(["seg-btn",{active:c.value==="month"}]),onClick:I[2]||(I[2]=H=>c.value="month")},"当月",2),i("button",{class:Ye(["seg-btn",{active:c.value==="custom"}]),onClick:I[3]||(I[3]=H=>c.value="custom")},"自定义",2)]),c.value!=="day"?Ae(($(),A("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":I[4]||(I[4]=H=>f.value=H)},null,512)),[[De,f.value]]):pe("",!0),c.value==="custom"?Ae(($(),A("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":I[5]||(I[5]=H=>m.value=H)},null,512)),[[De,m.value]]):pe("",!0),i("button",{class:"btn btn-sm",disabled:g.value,onClick:_},"导出 Markdown",8,ub)])]),ye(Nd,{date:t.value},null,8,["date"])]))}}),db=Rt(cb,[["__scopeId","data-v-2bb84c76"]]),fb={class:"plan-page"},pb={class:"blk-head"},vb={key:0,class:"card empty muted"},mb={class:"goal-main"},hb={class:"goal-line"},yb={class:"tag"},gb={class:"goal-name"},bb={class:"muted num goal-range"},wb={class:"goal-bar"},_b={class:"muted num goal-meta"},kb={class:"goal-ops"},Cb=["onClick"],xb=["onClick"],$b={class:"blk-head day-head"},Sb={class:"blk-head-text"},Eb={class:"muted blk-sub num"},Tb={class:"day-ops"},Ab={class:"card list-card"},Pb={key:0,class:"empty muted"},Ob={class:"pi-time num"},Mb={class:"muted"},Ib={class:"pi-main"},jb={class:"pi-title"},Db={class:"tag"},Lb={key:0,class:"tag tag-goal"},Kb={key:1,class:"state-done"},Rb={key:2,class:"state-skip"},Nb={key:0,class:"muted pi-note"},Fb={class:"muted pi-meta num"},Vb={key:0,class:"timer-live"},Bb={class:"pi-ops"},Ub=["onClick"],qb=["onClick"],Hb=["onClick"],zb=["onClick"],Wb=["onClick"],Gb=["onClick"],Yb={class:"dialog",role:"dialog","aria-label":"计划"},Jb={class:"dialog-head"},Xb={class:"dialog-title"},Qb={class:"dialog-body"},Zb={class:"form-row"},ew={class:"form-row"},tw=["value"],nw={class:"form-row two"},sw={class:"form-row"},ow={key:0,class:"form-error"},rw={class:"dialog-btns"},aw={class:"dialog",role:"dialog","aria-label":"长期计划"},iw={class:"dialog-head"},lw={class:"dialog-title"},uw={class:"dialog-body"},cw={class:"form-row"},dw={class:"form-row"},fw=["value"],pw={class:"form-row two"},vw={class:"form-row"},mw={key:0,class:"form-error"},hw={class:"dialog-btns"},yw=jt({__name:"PlanView",setup(e){const t=O([]),n=O({}),o=O(!1),r=O(null),l=O(""),c=O("学习"),f=O(it()),m=O(Ft(it(),6)),g=O(""),h=O(""),_=O(null);function P(){r.value=null,l.value="",c.value="学习",f.value=it(),m.value=Ft(it(),6),g.value="",h.value="",o.value=!0}function x(v){r.value=v,l.value=v.title,c.value=v.kind,f.value=v.start_date,m.value=v.end_date,g.value=v.note||"",h.value="",o.value=!0}async function I(){if(!l.value.trim()){h.value="请填写计划名称";return}if(m.valueoe.value===it());async function ee(){ie.value=!0;const[v,b,E]=await Promise.all([Th(oe.value),Rh(),Kh()]);le.value=v,t.value=b;const X={};for(const ce of E)X[String(ce.goalId)]={done:ce.done,total:ce.total};n.value=X,ie.value=!1}ft(oe,ee),ft(Jo,ee),ln(()=>{ee(),S=window.setInterval(()=>{U.value=Date.now()},3e4)}),hn(()=>{S&&window.clearInterval(S)});function z(){oe.value=Ft(oe.value,-1)}function ne(){oe.value=Ft(oe.value,1)}function j(){oe.value=it()}const T=rt(()=>{const v=le.value.length,b=le.value.filter(be=>be.status==="done").length,E=le.value.reduce((be,_e)=>be+M(_e),0),X=le.value.reduce((be,_e)=>be+(_e.actual_minutes||0),0);let ce=0;const xe=Oe.value;if(xe){const be=le.value.find(_e=>_e.id===xe);be&&(ce=Se(be))}return{total:v,done:b,plannedMin:E,actualMin:X+ce}});function M(v){const[b,E]=v.start_time.split(":").map(Number),[X,ce]=v.end_time.split(":").map(Number);return Math.max(0,X*60+ce-(b*60+E))}function Z(v){return v<60?v+" 分钟":Math.floor(v/60)+" 小时 "+v%60+" 分"}const Oe=rt(()=>{const v=le.value.find(b=>!!b.timer_started_at);return v?v.id:null});function Se(v){if(!v.timer_started_at)return v.actual_minutes||0;const b=Math.max(0,Math.round((U.value-new Date(v.timer_started_at).getTime())/6e4));return(v.actual_minutes||0)+b}async function ge(v){v.timer_started_at?(await Sa(v.id),Ne("已停止计时:"+v.title)):(await jh(v.id),Ne("开始计时:"+v.title)),Wm(),await ee()}async function Pe(v,b){await Ih(v.id,b),await ee()}const qe=O(!1),Fe=O(null),Je=O(""),Ge=O("学习"),ze=O("09:00"),re=O("10:00"),J=O(""),$e=O(""),ot=["学习","健身","自律","工作","阅读","其他"];function wt(){Fe.value=null,Je.value="",Ge.value="学习",ze.value="09:00",re.value="10:00",J.value="",$e.value="",qe.value=!0}function Ee(v){Fe.value=v.id,Je.value=v.title,Ge.value=v.kind,ze.value=v.start_time,re.value=v.end_time,J.value=v.note||"",$e.value="",qe.value=!0}async function xt(){if(!Je.value.trim()){$e.value="请填写计划内容";return}if(re.value<=ze.value){$e.value="结束时间需晚于开始时间";return}Fe.value?(await Oh(Fe.value,{title:Je.value.trim(),kind:Ge.value,start_time:ze.value,end_time:re.value,note:J.value}),Ne("计划已更新")):(await Ph({date:oe.value,start_time:ze.value,end_time:re.value,title:Je.value,kind:Ge.value,note:J.value}),Ne("计划已添加")),qe.value=!1,await ee()}async function St(v){await Mh(v.id),Ne("已删除"),await ee()}const Le=["周日","周一","周二","周三","周四","周五","周六"];function k(v){return Le[Rs(v).getDay()]}return(v,b)=>($(),A("div",fb,[i("div",pb,[b[18]||(b[18]=i("div",{class:"blk-head-text"},[i("div",{class:"blk-title"},"长期计划"),i("div",{class:"muted blk-sub"},"跨越多天的目标,自动落实到每一天")],-1)),i("button",{class:"btn btn-sm",onClick:P},[ye(He,{name:"plus",size:14}),b[17]||(b[17]=Ct(" 新建长期计划",-1))])]),t.value.length?pe("",!0):($(),A("div",vb," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),A(Me,null,st(t.value,E=>($(),A("div",{key:E.id,class:"card goal-card"},[i("div",mb,[i("div",hb,[i("span",yb,F(E.kind),1),i("span",gb,F(E.title),1),i("span",bb,F(E.start_date.slice(5))+" ~ "+F(E.end_date.slice(5)),1)]),i("div",wb,[i("span",{class:"goal-bar-fill",style:qn({width:(n.value[String(E.id)]?Math.round(n.value[String(E.id)].done/Math.max(1,n.value[String(E.id)].total)*100):0)+"%",background:n.value[String(E.id)]&&n.value[String(E.id)].done>=n.value[String(E.id)].total&&n.value[String(E.id)].total>0?"var(--ok)":"var(--accent)"})},null,4)]),i("div",_b,[Ct(F(n.value[String(E.id)]?n.value[String(E.id)].done+"/"+n.value[String(E.id)].total+" 天已完成":"0/"+(n.value[String(E.id)]?n.value[String(E.id)].total:0)+" 天")+" ",1),E.note?($(),A(Me,{key:0},[Ct(" · "+F(E.note),1)],64)):pe("",!0)])]),i("div",kb,[i("button",{class:"icon-btn",title:"编辑",onClick:X=>x(E)},[ye(He,{name:"edit",size:14})],8,Cb),i("button",{class:"icon-btn",title:"删除",onClick:X=>_.value=E},[ye(He,{name:"close",size:14})],8,xb)])]))),128)),i("div",$b,[i("div",Sb,[b[21]||(b[21]=i("div",{class:"blk-title"},"每日安排",-1)),i("div",Eb,[Ct(" 共 "+F(T.value.total)+" 项 · 完成 "+F(T.value.done)+" 项 · 计划 "+F(Z(T.value.plannedMin))+" · 实际投入 "+F(Z(T.value.actualMin))+" ",1),Oe.value?($(),A(Me,{key:0},[b[19]||(b[19]=Ct(" · ",-1)),b[20]||(b[20]=i("span",{class:"timer-live"},"计时中",-1))],64)):pe("",!0)])]),i("div",Tb,[i("button",{class:"icon-btn",title:"前一天",onClick:z},[ye(He,{name:"chevron-left",size:16})]),i("span",{class:Ye(["date-chip num",{today:D.value}])},F(oe.value.slice(5))+" "+F(k(oe.value)),3),i("button",{class:"icon-btn",title:"后一天",onClick:ne},[ye(He,{name:"chevron-right",size:16})]),i("button",{class:Ye(["btn btn-sm",{"btn-primary":!D.value}]),onClick:j},"今天",2),i("button",{class:"btn btn-primary btn-sm",onClick:wt},[ye(He,{name:"plus",size:14}),b[22]||(b[22]=Ct(" 添加计划",-1))])])]),i("div",Ab,[!ie.value&&!le.value.length?($(),A("div",Pb,"今天还没有计划,点「添加计划」开始规划。")):pe("",!0),($(!0),A(Me,null,st(le.value,E=>($(),A("div",{key:E.id,class:Ye(["plan-item",{done:E.status==="done",skip:E.status==="skip",running:!!E.timer_started_at}])},[i("div",Ob,[Ct(F(E.start_time),1),i("span",Mb," - "+F(E.end_time),1)]),i("div",Ib,[i("div",jb,[i("span",Db,F(E.kind),1),E.goal_id?($(),A("span",Lb,"长期")):pe("",!0),i("span",{class:Ye(["pi-text",{strike:E.status==="done"}])},F(E.title),3),E.status==="done"?($(),A("span",Kb,"已完成")):E.status==="skip"?($(),A("span",Rb,"已跳过")):pe("",!0)]),E.note?($(),A("div",Nb,F(E.note),1)):pe("",!0),i("div",Fb,[E.timer_started_at?($(),A("span",Vb,"计时中 · 已 "+F(Se(E))+" 分钟",1)):E.actual_minutes>0?($(),A(Me,{key:1},[Ct("实际投入 "+F(E.actual_minutes)+" 分钟",1)],64)):pe("",!0)])]),i("div",Bb,[E.status!=="done"?($(),A("button",{key:0,class:Ye(["btn btn-xs",{"timer-on":!!E.timer_started_at}]),onClick:X=>ge(E)},F(E.timer_started_at?"停止计时":"计时"),11,Ub)):pe("",!0),E.status!=="done"?($(),A("button",{key:1,class:"btn btn-xs",onClick:X=>Pe(E,"done")},"完成",8,qb)):pe("",!0),E.status==="todo"?($(),A("button",{key:2,class:"btn btn-xs",onClick:X=>Pe(E,"skip")},"跳过",8,Hb)):pe("",!0),E.status!=="todo"?($(),A("button",{key:3,class:"btn btn-xs",onClick:X=>Pe(E,"todo")},"恢复",8,zb)):pe("",!0),i("button",{class:"icon-btn",title:"编辑",onClick:X=>Ee(E)},[ye(He,{name:"edit",size:14})],8,Wb),i("button",{class:"icon-btn",title:"删除",onClick:X=>St(E)},[ye(He,{name:"close",size:14})],8,Gb)])],2))),128))]),($(),gt(kn,{to:"body"},[qe.value?($(),A("div",{key:0,class:"mask",onClick:b[7]||(b[7]=Nt(E=>qe.value=!1,["self"]))},[i("div",Yb,[i("div",Jb,[i("span",Xb,F(Fe.value?"编辑计划":"添加计划"),1),i("button",{class:"icon-btn",onClick:b[0]||(b[0]=E=>qe.value=!1)},[ye(He,{name:"close",size:16})])]),i("div",Qb,[i("div",Zb,[b[23]||(b[23]=i("label",null,"计划内容(学什么、做什么)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":b[1]||(b[1]=E=>Je.value=E),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(xt,["enter"])},null,544),[[De,Je.value]])]),i("div",ew,[b[24]||(b[24]=i("label",null,"类别",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":b[2]||(b[2]=E=>Ge.value=E)},[($(),A(Me,null,st(ot,E=>i("option",{key:E,value:E},F(E),9,tw)),64))],512),[[Hn,Ge.value]])]),i("div",nw,[i("div",null,[b[25]||(b[25]=i("label",null,"开始时间",-1)),Ae(i("input",{class:"input",type:"time","onUpdate:modelValue":b[3]||(b[3]=E=>ze.value=E)},null,512),[[De,ze.value]])]),i("div",null,[b[26]||(b[26]=i("label",null,"结束时间",-1)),Ae(i("input",{class:"input",type:"time","onUpdate:modelValue":b[4]||(b[4]=E=>re.value=E)},null,512),[[De,re.value]])])]),i("div",sw,[b[27]||(b[27]=i("label",null,"备注(选填)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":b[5]||(b[5]=E=>J.value=E),placeholder:"目标、资料、提醒等",onKeydown:Mt(xt,["enter"])},null,544),[[De,J.value]])]),$e.value?($(),A("div",ow,F($e.value),1)):pe("",!0)]),i("div",rw,[i("button",{class:"btn btn-sm",onClick:b[6]||(b[6]=E=>qe.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:xt},F(Fe.value?"保存":"添加"),1)])])])):pe("",!0)])),($(),gt(kn,{to:"body"},[o.value?($(),A("div",{key:0,class:"mask",onClick:b[15]||(b[15]=Nt(E=>o.value=!1,["self"]))},[i("div",aw,[i("div",iw,[i("span",lw,F(r.value?"编辑长期计划":"新建长期计划"),1),i("button",{class:"icon-btn",onClick:b[8]||(b[8]=E=>o.value=!1)},[ye(He,{name:"close",size:16})])]),i("div",uw,[i("div",cw,[b[28]||(b[28]=i("label",null,"计划名称(落实为每天一条任务)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":b[9]||(b[9]=E=>l.value=E),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[De,l.value]])]),i("div",dw,[b[29]||(b[29]=i("label",null,"类别",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":b[10]||(b[10]=E=>c.value=E)},[($(),A(Me,null,st(ot,E=>i("option",{key:E,value:E},F(E),9,fw)),64))],512),[[Hn,c.value]])]),i("div",pw,[i("div",null,[b[30]||(b[30]=i("label",null,"开始日期",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":b[11]||(b[11]=E=>f.value=E)},null,512),[[De,f.value]])]),i("div",null,[b[31]||(b[31]=i("label",null,"结束日期",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":b[12]||(b[12]=E=>m.value=E)},null,512),[[De,m.value]])])]),i("div",vw,[b[32]||(b[32]=i("label",null,"备注(选填)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":b[13]||(b[13]=E=>g.value=E)},null,512),[[De,g.value]])]),h.value?($(),A("div",mw,F(h.value),1)):pe("",!0),b[33]||(b[33]=i("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),i("div",hw,[i("button",{class:"btn btn-sm",onClick:b[14]||(b[14]=E=>o.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:I},F(r.value?"保存":"创建"),1)])])])):pe("",!0)])),ye(_n,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:b[16]||(b[16]=E=>_.value=null),onConfirm:H},null,8,["open","message"])]))}}),gw=Rt(yw,[["__scopeId","data-v-ffd19b28"]]),bw={class:"stats"},ww={class:"cards"},_w={class:"card stat-card"},kw={class:"stat-num num"},Cw={class:"card stat-card"},xw={class:"stat-num num"},$w={class:"card stat-card"},Sw={class:"stat-num num"},Ew={class:"card stat-card"},Tw={class:"stat-num num"},Aw={class:"card section"},Pw={class:"heat"},Ow=["title"],Mw={class:"two-col"},Iw={class:"card section"},jw={class:"bar-label"},Dw={class:"bar-track"},Lw={class:"muted num bar-num"},Kw={key:0,class:"muted"},Rw={class:"card section"},Nw={class:"bar-label"},Fw={class:"bar-track"},Vw={class:"muted num bar-num"},Bw={key:0,class:"muted"},Uw={class:"card section"},qw={class:"bar-label loc-label"},Hw={class:"bar-track"},zw={class:"muted num bar-num"},Ww={key:0,class:"muted"},Gw=jt({__name:"StatsView",setup(e){const t=O({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=O([]),o=O([]),r=O([]),l=O([]);async function c(){const g=it(),h="2000-01-01",_=await Promise.all([ps(),Xo(h,g),Qo(h,g),ao(!0)]),P=_[0],x=_[1],I=_[2],H=_[3],oe=x.filter(ge=>ge.clock_in_at||ge.kind==="makeup");let le=0;for(const ge of oe){const Pe=uo(ge,ge.date,P,ge.date===g);le+=Pe.workedMinutes??0}const ie=new Set(I.map(ge=>ge.date));let U=0,S=g;for(ie.has(S)||(S=Ft(g,-1));ie.has(S);)U++,S=Ft(S,-1);t.value={attendDays:oe.length,totalHours:(le/60).toFixed(1),itemCount:I.length,streak:U};const D=new Map;for(const ge of oe){const Pe=ge.location||"未记录";D.set(Pe,(D.get(Pe)||0)+1)}l.value=Array.from(D.entries()).map(ge=>({name:ge[0],count:ge[1],percent:Math.round(ge[1]/(oe.length||1)*100)})).sort((ge,Pe)=>Pe.count-ge.count);const ee=I.length||1,z=await Zo(),ne=new Map;for(const ge of I)ne.set(ge.category,(ne.get(ge.category)||0)+1);const j=new Set(z);for(const ge of ne.keys())j.has(ge)||z.push(ge);o.value=z.map(ge=>{const Pe=ne.get(ge)||0;return{key:ge,label:ge,count:Pe,percent:Math.round(Pe/ee*100)}}).filter(ge=>ge.count>0).sort((ge,Pe)=>Pe.count-ge.count);const T=new Map(H.map(ge=>[ge.id,ge.name])),M=new Map;for(const ge of I){const Pe=ge.project_id?T.get(ge.project_id)||"已删除项目":"无项目";M.set(Pe,(M.get(Pe)||0)+1)}r.value=Array.from(M.entries()).map(ge=>({name:ge[0],count:ge[1],percent:Math.round(ge[1]/ee*100)})).sort((ge,Pe)=>Pe.count-ge.count);const Z=new Map;for(const ge of I)Z.set(ge.date,(Z.get(ge.date)||0)+1);const Oe=Zs(g),Se=[];for(let ge=11;ge>=0;ge--){const Pe=Ft(Oe,-7*ge),qe=[];for(let Fe=0;Fe<7;Fe++){const Je=Ft(Pe,Fe);qe.push({date:Je,count:Z.get(Je)||0})}Se.push(qe)}n.value=Se}ln(async()=>{await c()}),ft(Jo,()=>{c()});function f(g){return g===0?0:g===1?1:g<=3?2:g<=5?3:4}function m(g,h){return g+" · "+(h?h+" 条":"无记录")}return(g,h)=>($(),A("div",bw,[i("div",ww,[i("div",_w,[h[0]||(h[0]=i("div",{class:"muted"},"出勤天数",-1)),i("div",kw,F(t.value.attendDays),1)]),i("div",Cw,[h[1]||(h[1]=i("div",{class:"muted"},"累计工时(小时)",-1)),i("div",xw,F(t.value.totalHours),1)]),i("div",$w,[h[2]||(h[2]=i("div",{class:"muted"},"记录条数",-1)),i("div",Sw,F(t.value.itemCount),1)]),i("div",Ew,[h[3]||(h[3]=i("div",{class:"muted"},"连续记录(天)",-1)),i("div",Tw,F(t.value.streak),1)])]),i("div",Aw,[h[4]||(h[4]=i("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),i("div",Pw,[($(!0),A(Me,null,st(n.value,(_,P)=>($(),A("div",{key:P,class:"heat-col"},[($(!0),A(Me,null,st(_,x=>($(),A("span",{key:x.date,class:Ye(["heat-cell","lv"+f(x.count)]),title:m(x.date,x.count)},null,10,Ow))),128))]))),128))]),h[5]||(h[5]=tv('
少多
',1))]),i("div",Mw,[i("div",Iw,[h[6]||(h[6]=i("div",{class:"section-title"},"分类分布",-1)),($(!0),A(Me,null,st(o.value,_=>($(),A("div",{key:_.key,class:"bar-row"},[i("span",jw,F(_.label),1),i("span",Dw,[i("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),i("span",Lw,F(_.count)+" 条 · "+F(_.percent)+"%",1)]))),128)),o.value.length?pe("",!0):($(),A("div",Kw,"暂无数据"))]),i("div",Rw,[h[7]||(h[7]=i("div",{class:"section-title"},"项目投入",-1)),($(!0),A(Me,null,st(r.value,_=>($(),A("div",{key:_.name,class:"bar-row"},[i("span",Nw,F(_.name),1),i("span",Fw,[i("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),i("span",Vw,F(_.count)+" 条 · "+F(_.percent)+"%",1)]))),128)),r.value.length?pe("",!0):($(),A("div",Bw,"暂无数据"))])]),i("div",Uw,[h[8]||(h[8]=i("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),A(Me,null,st(l.value,_=>($(),A("div",{key:_.name,class:"bar-row"},[i("span",qw,F(_.name),1),i("span",Hw,[i("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),i("span",zw,F(_.count)+" 天 · "+F(_.percent)+"%",1)]))),128)),l.value.length?pe("",!0):($(),A("div",Ww,"暂无数据"))])]))}}),Yw=Rt(Gw,[["__scopeId","data-v-5469ae68"]]);async function Jw(e,t,n){const o=it(),r=await Promise.all([ps(),Xo(e,t),Qo(e,t),ao(!0),Eh(e,t),Zo()]),l=r[0],c=r[1],f=r[2],m=r[3],g=r[4],h=r[5];let _=0,P=0,x=0;for(const M of c){(M.clock_in_at||M.kind==="makeup")&&_++,M.kind==="makeup"&&x++;const Z=uo(M,M.date,l,M.date===o);P+=Z.workedMinutes??0}const I=new Map;for(const M of c){if(!(M.clock_in_at||M.kind==="makeup"))continue;const Z=M.location||"未记录";I.set(Z,(I.get(Z)||0)+1)}const H=Array.from(I.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,Z)=>Z.count-M.count),oe=f.length||1,le=new Map;for(const M of f)le.set(M.category,(le.get(M.category)||0)+1);const ie=new Set(h);for(const M of le.keys())ie.has(M)||h.push(M);const U=h.map(M=>{const Z=le.get(M)||0;return{key:M,label:M,count:Z,percent:Math.round(Z/oe*100)}}).filter(M=>M.count>0).sort((M,Z)=>Z.count-M.count),S=new Map(m.map(M=>[M.id,M.name])),D=new Map;for(const M of f){const Z=M.project_id?S.get(M.project_id)||"已删除项目":"无项目";D.set(Z,(D.get(Z)||0)+1)}const ee=Array.from(D.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,Z)=>Z.count-M.count),z=f.filter(M=>M.is_milestone===1).map(M=>({date:M.date,content:M.content})),ne=f.filter(M=>M.needs_followup===1).map(M=>({date:M.date,content:M.content,remark:M.remark||""})),j=f.filter(M=>!!M.takeaway).map(M=>({date:M.date,text:M.takeaway})),T=g.map(M=>({weekStart:M.week_start,highlights:M.highlights||"",challenges:M.challenges||"",plan_next:M.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(P/60).toFixed(1),makeupCount:x,leaveCount:c.filter(M=>M.kind==="leave").length,itemCount:f.length,categoryStats:U,projectStats:ee,locationStats:H,milestones:z,followups:ne,takeaways:j,weekNotes:T}}function Xw(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(o=>o.name!=="未记录");n.length&&t.push("其中:"+n.map(o=>o.name+" "+o.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(o=>o.label+" "+o.percent+"%("+o.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(o=>o.name+" "+o.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((o,r)=>t.push(r+1+". 【成果】"+o.content+"("+o.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(o=>t.push("- 【待跟进】"+o.content+(o.remark?"("+o.date+" 备注:"+o.remark+")":"("+o.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(o=>t.push("- "+o.text+"("+o.date+")")):t.push("(无)");for(const o of e.weekNotes)t.push(""),t.push("### 周记("+o.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(o.highlights||"(无)")),t.push("- 踩的坑:"+(o.challenges||"(无)")),t.push("- 下周计划:"+(o.plan_next||"(无)"));return t.push(""),t.join(` +`)}async function Gi(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 Qw(e){const t=await Promise.all([$t("ai_base_url",""),$t("ai_api_key",""),$t("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),o=t[1].trim(),r=t[2].trim();if(!n||!r)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const l=n+"/chat/completions",c={"Content-Type":"application/json"};o&&(c.Authorization="Bearer "+o);const m=JSON.stringify({model:r,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let g;try{g=await fetch(l,{method:"POST",headers:c,body:m})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!g.ok){let P="接口返回 "+g.status;try{const x=await g.json();x&&x.error&&x.error.message&&(P+=":"+x.error.message)}catch{}throw new Error(P)}const h=await g.json(),_=h&&h.choices&&h.choices[0]&&h.choices[0].message&&h.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Zw={class:"report"},e_={class:"report-toolbar"},t_={class:"seg"},n_=["onClick"],s_=["disabled"],o_=["disabled"],r_={key:0,class:"ai-error"},a_={class:"report-grid"},i_={class:"report-left"},l_={class:"card section"},u_={class:"section-title"},c_={class:"muted note-saved"},d_={class:"card section"},f_={class:"report-right"},p_={key:0,class:"card section"},v_={class:"sum-row"},m_={class:"num"},h_={class:"sum-row"},y_={class:"num"},g_={class:"sum-row"},b_={class:"num"},w_={class:"sum-row"},__={class:"num"},k_={class:"sum-row"},C_={class:"num"},x_={class:"muted"},$_={class:"num"},S_={key:0,class:"muted sum-empty"},E_={class:"muted"},T_={key:1,class:"muted sum-empty"},A_={class:"muted"},P_={key:2,class:"muted sum-empty"},O_={class:"muted"},M_={key:3,class:"muted sum-empty"},I_=jt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=O("week"),o=O(Zs(it())),r=O(it()),l=O(null),c=O(""),f=O(!1),m=O(!1),g=O(null),h=O(""),_=O(Zs(it())),P=O(""),x=O(""),I=O(""),H=O(!1);async function oe(){const ne=await bl(_.value);P.value=(ne==null?void 0:ne.highlights)||"",x.value=(ne==null?void 0:ne.challenges)||"",I.value=(ne==null?void 0:ne.plan_next)||"",H.value=!1}async function le(){await Sh(_.value,{highlights:P.value.trim()||null,challenges:x.value.trim()||null,plan_next:I.value.trim()||null}),H.value=!0,await U()}function ie(ne){const j=it();if(ne==="week"){const T=Zs(j);return{start:T,end:Ft(T,6),label:"本周"}}if(ne==="month"){const T=j.slice(0,7);return{start:T+"-01",end:j,label:T+" 本月"}}return ne==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:o.value,end:r.value,label:o.value+" ~ "+r.value}}async function U(){f.value=!0;const ne=ie(n.value),j=await Jw(ne.start,ne.end,ne.label);l.value=j,c.value=Xw(j),f.value=!1}ft(n,U),ft([o,r],()=>{n.value==="custom"&&U()}),ln(async()=>{await oe(),await U()});async function S(){const ne=it().replace(/-/g,""),j=await Ea("实习工作总结_"+ne+".md",c.value);Ne(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function D(){await Gi(c.value),Ne("总结已复制到剪贴板")}async function ee(){if(m.value)return;h.value="";const ne=c.value.trim();if(!ne){h.value="当前草稿为空,无法润色";return}m.value=!0;try{g.value=c.value,c.value=await Qw(ne),Ne("AI 润色完成")}catch(j){g.value=null,h.value=j instanceof Error?j.message:"润色失败"}m.value=!1}function z(){g.value!==null&&(c.value=g.value),g.value=null}return(ne,j)=>($(),A("div",Zw,[i("div",e_,[i("div",t_,[($(),A(Me,null,st(t,T=>i("button",{key:T.key,class:Ye(["seg-btn",{active:n.value===T.key}]),onClick:M=>n.value=T.key},F(T.label),11,n_)),64))]),n.value==="custom"?($(),A(Me,{key:0},[Ae(i("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=T=>o.value=T)},null,512),[[De,o.value]]),j[6]||(j[6]=i("span",{class:"muted"},"至",-1)),Ae(i("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=T=>r.value=T)},null,512),[[De,r.value]])],64)):pe("",!0),j[10]||(j[10]=i("span",{class:"flex1"},null,-1)),i("button",{class:"btn btn-sm",disabled:m.value,onClick:ee},[ye(He,{name:"edit",size:14}),j[7]||(j[7]=Ct("AI 润色 ",-1))],8,s_),g.value!==null?($(),A("button",{key:1,class:"btn btn-sm",onClick:z},"还原润色前")):pe("",!0),i("button",{class:"btn btn-sm",disabled:f.value,onClick:U},[ye(He,{name:"edit",size:14}),j[8]||(j[8]=Ct("重新生成 ",-1))],8,o_),i("button",{class:"btn btn-sm",onClick:D},"复制"),i("button",{class:"btn btn-primary btn-sm",onClick:S},[ye(He,{name:"export",size:14}),j[9]||(j[9]=Ct("导出 Markdown ",-1))])]),h.value?($(),A("div",r_,F(h.value),1)):pe("",!0),i("div",a_,[i("div",i_,[i("div",l_,[i("div",u_,"本周周记("+F(_.value)+" 起)",1),j[11]||(j[11]=i("label",{class:"note-label muted"},"本周亮点",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=T=>P.value=T),placeholder:"本周最有价值的一件事",onBlur:le},null,544),[[De,P.value]]),j[12]||(j[12]=i("label",{class:"note-label muted"},"踩的坑",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=T=>x.value=T),placeholder:"遇到的问题与教训",onBlur:le},null,544),[[De,x.value]]),j[13]||(j[13]=i("label",{class:"note-label muted"},"下周计划",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=T=>I.value=T),placeholder:"下周准备做什么",onBlur:le},null,544),[[De,I.value]]),i("div",c_,F(H.value?"已保存":"失焦自动保存"),1)]),i("div",d_,[j[14]||(j[14]=i("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Ae(i("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=T=>c.value=T),spellcheck:"false"},null,512),[[De,c.value]])])]),i("div",f_,[l.value?($(),A("div",p_,[j[20]||(j[20]=i("div",{class:"section-title"},"数据摘要",-1)),i("div",v_,[j[15]||(j[15]=i("span",{class:"muted"},"出勤",-1)),i("span",m_,F(l.value.attendDays)+" 天",1)]),i("div",h_,[j[16]||(j[16]=i("span",{class:"muted"},"工时",-1)),i("span",y_,F(l.value.totalHours)+" 小时",1)]),i("div",g_,[j[17]||(j[17]=i("span",{class:"muted"},"补卡",-1)),i("span",b_,F(l.value.makeupCount)+" 次",1)]),i("div",w_,[j[18]||(j[18]=i("span",{class:"muted"},"请假",-1)),i("span",__,F(l.value.leaveCount)+" 天",1)]),i("div",k_,[j[19]||(j[19]=i("span",{class:"muted"},"记录",-1)),i("span",C_,F(l.value.itemCount)+" 条",1)]),j[21]||(j[21]=i("div",{class:"section-sub"},"分类分布",-1)),($(!0),A(Me,null,st(l.value.categoryStats,T=>($(),A("div",{key:T.key,class:"sum-row"},[i("span",x_,F(T.label),1),i("span",$_,F(T.count)+" 条 · "+F(T.percent)+"%",1)]))),128)),l.value.categoryStats.length?pe("",!0):($(),A("div",S_,"(无)")),j[22]||(j[22]=i("div",{class:"section-sub"},"主要成果",-1)),($(!0),A(Me,null,st(l.value.milestones,(T,M)=>($(),A("div",{key:"m"+M,class:"sum-item"},[Ct(F(T.content),1),i("span",E_,"("+F(T.date)+")",1)]))),128)),l.value.milestones.length?pe("",!0):($(),A("div",T_,"(无)")),j[23]||(j[23]=i("div",{class:"section-sub"},"待跟进",-1)),($(!0),A(Me,null,st(l.value.followups,(T,M)=>($(),A("div",{key:"f"+M,class:"sum-item"},[Ct(F(T.content),1),i("span",A_,"("+F(T.date)+")",1)]))),128)),l.value.followups.length?pe("",!0):($(),A("div",P_,"(无)")),j[24]||(j[24]=i("div",{class:"section-sub"},"学习与成长",-1)),($(!0),A(Me,null,st(l.value.takeaways,(T,M)=>($(),A("div",{key:"t"+M,class:"sum-item"},[Ct(F(T.text),1),i("span",O_,"("+F(T.date)+")",1)]))),128)),l.value.takeaways.length?pe("",!0):($(),A("div",M_,"(无)"))])):pe("",!0)])])]))}}),j_=Rt(I_,[["__scopeId","data-v-7e1b08ed"]]),D_=["aria-label"],L_={class:"dialog-head"},K_={class:"dialog-title"},R_={class:"dialog-body"},N_={class:"form-grid"},F_={class:"field span2"},V_={class:"seg"},B_={class:"field"},U_={class:"field"},q_={class:"field"},H_=["value"],z_={class:"add-cat"},W_=["onKeydown"],G_={key:0,class:"field"},Y_={class:"seg"},J_={class:"field span2"},X_={key:0,class:"form-error"},Q_={class:"dialog-btns"},Z_=jt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=O("expense"),l=O(""),c=O(""),f=O(""),m=O(""),g=O(!1),h=O(!1),_=O(""),P=O(null);function x(S){n.open&&S.key==="Escape"&&o("cancel")}ft(()=>n.open,async S=>{var D;S?(await H(),r.value=n.initial.type==="income"?"income":"expense",l.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,m.value=n.initial.note,g.value=n.initial.reimbursable===1,h.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",x),await Ks(),(D=P.value)==null||D.focus()):window.removeEventListener("keydown",x)}),hn(()=>window.removeEventListener("keydown",x)),ft(r,async()=>{await H(),l.value=I.value[0]||""});const I=O([]);async function H(){I.value=await la(r.value)}const oe=O("");async function le(){const S=oe.value.trim();if(S){if(I.value.includes(S)){oe.value="";return}I.value.push(S),await Wi(r.value,I.value),l.value=S,oe.value=""}}function ie(){return l.value&&I.value.includes(l.value)?l.value:I.value[0]}function U(){const S=String(c.value??"").trim(),D=Number(S);if(!S||!isFinite(D)||D<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const ee=r.value==="expense"&&g.value?1:0;o("save",{type:r.value,category:ie(),amount:Math.round(D*100),date:f.value,note:String(m.value??"").trim(),reimbursable:ee,reimbursed:ee&&h.value?1:0})}return(S,D)=>($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:D[12]||(D[12]=Nt(ee=>o("cancel"),["self"]))},[i("div",{class:"dialog",role:"dialog","aria-label":e.title},[i("div",L_,[i("span",K_,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:D[0]||(D[0]=ee=>o("cancel"))},[ye(He,{name:"close",size:16})])]),i("div",R_,[i("div",N_,[i("div",F_,[D[13]||(D[13]=i("label",null,"类型",-1)),i("div",V_,[i("button",{class:Ye(["seg-btn",{active:r.value==="expense"}]),onClick:D[1]||(D[1]=ee=>r.value="expense")},"支出",2),i("button",{class:Ye(["seg-btn",{active:r.value==="income"}]),onClick:D[2]||(D[2]=ee=>r.value="income")},"收入",2)])]),i("div",B_,[D[14]||(D[14]=i("label",null,"金额(元,必填)",-1)),Ae(i("input",{ref_key:"amountInput",ref:P,class:Ye(["input",{invalid:_.value}]),"onUpdate:modelValue":D[3]||(D[3]=ee=>c.value=ee),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,c.value]])]),i("div",U_,[D[15]||(D[15]=i("label",null,"日期(必填)",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":D[4]||(D[4]=ee=>f.value=ee)},null,512),[[De,f.value]])]),i("div",q_,[D[16]||(D[16]=i("label",null,"分类(可直接新增)",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":D[5]||(D[5]=ee=>l.value=ee)},[($(!0),A(Me,null,st(I.value,ee=>($(),A("option",{key:ee,value:ee},F(ee),9,H_))),128))],512),[[Hn,l.value]]),i("div",z_,[Ae(i("input",{class:"input add-cat-input","onUpdate:modelValue":D[6]||(D[6]=ee=>oe.value=ee),placeholder:"新增分类名",onKeydown:Mt(Nt(le,["prevent"]),["enter"])},null,40,W_),[[De,oe.value]]),i("button",{class:"btn btn-xs",type:"button",onClick:le},"添加")])]),r.value==="expense"?($(),A("div",G_,[D[17]||(D[17]=i("label",null,"报销状态",-1)),i("div",Y_,[i("button",{class:Ye(["seg-btn",{active:!g.value}]),onClick:D[7]||(D[7]=ee=>{g.value=!1,h.value=!1})},"无需报销",2),i("button",{class:Ye(["seg-btn",{active:g.value&&!h.value}]),onClick:D[8]||(D[8]=ee=>{g.value=!0,h.value=!1})},"待报销",2),i("button",{class:Ye(["seg-btn",{active:g.value&&h.value}]),onClick:D[9]||(D[9]=ee=>{g.value=!0,h.value=!0})},"已报销",2)])])):pe("",!0),i("div",J_,[D[18]||(D[18]=i("label",null,"备注",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":D[10]||(D[10]=ee=>m.value=ee),placeholder:"选填"},null,512),[[De,m.value]])])]),_.value?($(),A("div",X_,F(_.value),1)):pe("",!0)]),i("div",Q_,[i("button",{class:"btn btn-sm",onClick:D[11]||(D[11]=ee=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:U},"保存")])],8,D_)])):pe("",!0)]),_:1})]))}}),e1=Rt(Z_,[["__scopeId","data-v-1b57c1af"]]);function wl(e,t){return qo(e,t-1)}function qd(e,t){return Ft(qo(e,t),-1)}function Wu(e,t){if(!e||t1&&t[]}},emits:["close","apply","saveAnchor"],setup(e,{emit:t}){const n=e,o=t,r=O(n.mode),l=O(n.month.slice(0,7)),c=O(n.cycleSel),f=O(n.customStart),m=O(n.customEnd),g=O(n.anchor),h=O("");function _(U){U.key==="Escape"&&o("close")}ft(()=>n.open,U=>{U?(r.value=n.mode,l.value=n.month.slice(0,7),c.value=n.cycleSel,f.value=n.customStart,m.value=n.customEnd,g.value=n.anchor,h.value="",window.addEventListener("keydown",_)):window.removeEventListener("keydown",_)}),ft(()=>[n.anchor,n.cycleSel],()=>{g.value=n.anchor,c.value=n.cycleSel}),hn(()=>window.removeEventListener("keydown",_));const P=rt(()=>{const U=new Set(n.months);return U.add(l.value),U.add(it().slice(0,7)),Array.from(U).sort((S,D)=>Sn.anchor?ua(Ft(n.anchor,-1),n.anchor):"");function I(U){return U.slice(0,4)+" 年 "+Number(U.slice(5,7))+" 月"}function H(U){l.value=U,o("apply",{mode:"month",month:U}),o("close")}function oe(U){c.value=U,o("apply",{mode:"cycle",cycle:U}),o("close")}function le(){g.value&&o("saveAnchor",g.value)}function ie(){if(!f.value||!m.value){h.value="请选择开始和结束日期";return}if(f.value>m.value){h.value="开始日期不能晚于结束日期";return}h.value="",o("apply",{mode:"custom",customStart:f.value,customEnd:m.value}),o("close")}return(U,S)=>($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Nt(D=>o("close"),["self"]))},[i("div",n1,[i("div",s1,[S[10]||(S[10]=i("span",{class:"dialog-title"},"统计周期",-1)),i("button",{class:"icon-btn",title:"关闭",onClick:S[0]||(S[0]=D=>o("close"))},[ye(He,{name:"close",size:16})])]),i("div",o1,[i("div",r1,[i("button",{class:Ye(["seg-btn",{active:r.value==="month"}]),onClick:S[1]||(S[1]=D=>r.value="month")},"按月",2),i("button",{class:Ye(["seg-btn",{active:r.value==="cycle"}]),onClick:S[2]||(S[2]=D=>r.value="cycle")},"按期",2),i("button",{class:Ye(["seg-btn",{active:r.value==="custom"}]),onClick:S[3]||(S[3]=D=>r.value="custom")},"自定义",2)]),r.value==="month"?($(),A("div",a1,[($(!0),A(Me,null,st(P.value,D=>($(),A("button",{key:D,class:Ye(["opt",{active:D===l.value}]),onClick:ee=>H(D)},[i("span",null,F(I(D)),1),D===l.value?($(),gt(He,{key:0,name:"check-circle",size:15})):pe("",!0)],10,i1))),128)),P.value.length?pe("",!0):($(),A("div",l1,"还没有账目记录"))])):r.value==="cycle"?($(),A("div",u1,[i("div",c1,[S[11]||(S[11]=i("span",{class:"anchor-label"},"账期起点",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":S[4]||(S[4]=D=>g.value=D)},null,512),[[De,g.value]]),i("button",{class:"btn btn-sm",disabled:!g.value||g.value===e.anchor,onClick:le},"保存",8,d1)]),g.value?g.value!==e.anchor?($(),A("div",p1,"起点已修改,保存后按新起点重新切分")):pe("",!0):($(),A("div",f1,"填写实习开始日期并保存,自动切分为第 1、2、3…期(每期到下月同日前一天)")),e.anchor?($(),A(Me,{key:2},[e.hasBefore?($(),A("button",{key:0,class:Ye(["opt",{active:c.value==="before"}]),onClick:S[5]||(S[5]=D=>oe("before"))},[S[12]||(S[12]=i("span",null,"起点前",-1)),i("span",v1,"~ "+F(x.value),1)],2)):pe("",!0),($(!0),A(Me,null,st(e.cycleCount,D=>($(),A("button",{key:D,class:Ye(["opt",{active:c.value===D}]),onClick:ee=>oe(D)},[i("span",null,"第 "+F(D)+" 期",1),i("span",h1,F(Ht(Yi)(Ht(wl)(e.anchor,D),Ht(qd)(e.anchor,D))),1)],10,m1))),128))],64)):pe("",!0)])):($(),A("div",y1,[i("div",g1,[i("div",b1,[S[13]||(S[13]=i("label",null,"开始日期",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":S[6]||(S[6]=D=>f.value=D)},null,512),[[De,f.value]])]),i("div",w1,[S[14]||(S[14]=i("label",null,"结束日期",-1)),Ae(i("input",{class:"input",type:"date","onUpdate:modelValue":S[7]||(S[7]=D=>m.value=D)},null,512),[[De,m.value]])])]),h.value?($(),A("div",_1,F(h.value),1)):pe("",!0),i("button",{class:"btn btn-primary apply-btn",onClick:ie},"应用区间")]))]),i("div",k1,[i("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=D=>o("close"))},"关闭")])])])):pe("",!0)]),_:1})]))}}),x1=Rt(C1,[["__scopeId","data-v-6269639e"]]),$1={class:"ledger-page"},S1={class:"ledger-toolbar"},E1=["disabled"],T1={class:"num"},A1=["disabled"],P1=["value"],O1={class:"cards"},M1={class:"card stat-card stat-income"},I1={class:"stat-num num amt-income"},j1={class:"card stat-card stat-expense"},D1={class:"stat-num num"},L1={class:"card stat-card stat-balance"},K1={class:"card stat-card stat-pending"},R1={class:"stat-num num amt-warn"},N1={key:0,class:"card sec"},F1={class:"bar-label"},V1={class:"bar-track"},B1={class:"muted num bar-num"},U1={key:1,class:"card section"},q1={class:"form-error"},H1={class:"card table-card"},z1={class:"tx-table"},W1={class:"num","data-label":"日期"},G1={"data-label":"分类"},Y1={class:"tag"},J1={class:"td-note","data-label":"备注"},X1={"data-label":"报销"},Q1={key:0,class:"muted"},Z1={key:1,class:"tx-done"},e0={key:2,class:"tx-pending"},t0={class:"ops-cell"},n0={class:"ops"},s0=["onClick"],o0=["onClick"],r0=["onClick"],a0={key:0},i0={class:"muted table-note num"},Gu="dsh_ledger_mode",Yu="dsh_ledger_cycle",Ju="dsh_ledger_cstart",Xu="dsh_ledger_cend",l0="0000-01-01",u0=jt({__name:"LedgerView",setup(e){const t=O("month"),n=O(it()),o=O(1),r=O(it().slice(0,7)+"-01"),l=O(it()),c=O(""),f=O(!1),m=O([]),g=O([]),h=O(!0),_=O(""),P=O(!1),x=O(null),I=O({type:"expense",category:"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0}),H=O(null),oe=O(!1);function le(v){const b=Number(v.slice(0,4)),E=Number(v.slice(5,7))-1,X=new Date(b,E+1,0).getDate();return v+"-"+(X<10?"0"+X:String(X))}const ie=rt(()=>c.value?Math.max(1,Wu(c.value,it())):1),U=rt(()=>t.value==="month"?n.value.slice(0,7)+"-01":t.value==="custom"?r.value:c.value?o.value==="before"?l0:wl(c.value,o.value):n.value.slice(0,7)+"-01"),S=rt(()=>t.value==="month"?le(n.value.slice(0,7)):t.value==="custom"?l.value:c.value?o.value==="before"?Ft(c.value,-1):qd(c.value,o.value):le(n.value.slice(0,7))),D=rt(()=>t.value==="month"?Number(n.value.slice(0,4))+" 年 "+Number(n.value.slice(5,7))+" 月":t.value==="custom"?Yi(U.value,S.value):c.value?o.value==="before"?"起点前 · ~ "+ua(Ft(c.value,-1),c.value):"第 "+o.value+" 期 · "+Yi(U.value,S.value):"按期统计 · 设置起点"),ee=rt(()=>t.value==="month"?!0:t.value==="cycle"&&c.value?o.value==="before"?!1:o.value>1||f.value:!1),z=rt(()=>t.value==="month"?!0:t.value==="cycle"&&c.value?o.value==="before"?!0:o.valueie.value)){if(b<1){f.value&&(o.value="before");return}o.value=b}}const j=rt(()=>t.value==="month"?n.value.slice(0,7)!==it().slice(0,7):t.value==="cycle"?!!c.value&&o.value!==ie.value:!1);function T(){t.value==="cycle"?o.value=ie.value:n.value=it()}async function M(){h.value=!0;try{g.value=await Gh(U.value,S.value),_.value=""}catch(v){_.value="账目加载失败:"+(v instanceof Error?v.stack||v.message:String(v)),Ne("账目加载失败")}h.value=!1}ln(async()=>{const v=localStorage.getItem(Gu);(v==="month"||v==="cycle"||v==="custom")&&(t.value=v);const b=localStorage.getItem(Ju),E=localStorage.getItem(Xu);b&&E&&b<=E&&(r.value=b,l.value=E);const X=localStorage.getItem(Yu);X==="before"?o.value="before":X&&Number(X)>=1&&(o.value=Number(X)),c.value=await $t("ledger.anchor",""),o.value!=="before"&&o.value>ie.value&&(o.value=ie.value),await M()}),ft([U,S],()=>{ze.value="all",M()}),ft(t,v=>localStorage.setItem(Gu,v)),ft(o,v=>localStorage.setItem(Yu,String(v))),ft([r,l],([v,b])=>{localStorage.setItem(Ju,v),localStorage.setItem(Xu,b)});async function Z(){try{m.value=await Zh(),f.value=c.value?await Uu(c.value)>0:!1}catch{}oe.value=!0}function Oe(v){t.value=v.mode,v.month&&(n.value=v.month+"-01"),v.cycle!==void 0&&(o.value=v.cycle),v.customStart&&(r.value=v.customStart),v.customEnd&&(l.value=v.customEnd)}async function Se(v){c.value=v,await Kt("ledger.anchor",v),t.value="cycle",o.value=Math.max(1,Wu(v,it()));try{f.value=await Uu(v)>0}catch{}Ne("账期起点已保存,已按新起点切分期数")}const ge=O([]);async function Pe(){ge.value=await la("expense")}Pe();const qe=rt(()=>g.value.slice().sort((v,b)=>v.date===b.date?b.id-v.id:v.date{let v=0,b=0,E=0;for(const X of g.value)X.type==="income"?v+=X.amount:(b+=X.amount,X.reimbursable===1&&X.reimbursed!==1&&(E+=X.amount));return{income:v,expense:b,pending:E,balance:v-b}}),Je=O("all"),Ge=O("all"),ze=O("all"),re=rt(()=>Array.from(new Set(g.value.map(v=>v.category))).sort((v,b)=>v.localeCompare(b,"zh"))),J=rt(()=>qe.value.filter(v=>!(Je.value!=="all"&&v.type!==Je.value||ze.value!=="all"&&v.category!==ze.value||Ge.value==="pending"&&!(v.type==="expense"&&v.reimbursable===1&&v.reimbursed!==1)||Ge.value==="done"&&!(v.reimbursable===1&&v.reimbursed===1)))),$e=rt(()=>{const v=new Map;let b=0;for(const X of g.value)X.type==="expense"&&(v.set(X.category,(v.get(X.category)||0)+X.amount),b+=X.amount);const E=b||1;return Array.from(v.entries()).map(X=>({name:X[0],amount:X[1],percent:Math.round(X[1]/E*100)})).sort((X,ce)=>ce.amount-X.amount)});function ot(v){return(v/100).toFixed(2)}function wt(v){return(v.type==="income"?"+":"-")+ot(v.amount)}async function Ee(v){await Qh(v.id),await M(),Ne("已标记为已报销")}function xt(v){x.value=v.id,I.value={type:v.type,category:v.category,amountYuan:ot(v.amount),date:v.date,note:v.note||"",reimbursable:v.reimbursable,reimbursed:v.reimbursed},P.value=!0}function St(){x.value=null,I.value={type:"expense",category:ge.value[0]||"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0},P.value=!0}async function Le(v){if(x.value){await Jh(x.value,v),P.value=!1,await M(),Ne("账目已更新");return}await Yh({type:v.type,category:v.category,amount:v.amount,date:v.date,note:v.note,reimbursable:v.reimbursable,reimbursed:v.reimbursed}),P.value=!1,await M(),Ne("已记一笔")}async function k(){H.value&&H.value.id&&await Xh(H.value.id),H.value=null,await M(),Ne("账目已删除")}return(v,b)=>($(),A("div",$1,[i("div",S1,[t.value!=="custom"?($(),A("button",{key:0,class:"icon-btn",disabled:!ee.value,title:"上一周期",onClick:b[0]||(b[0]=E=>ne(-1))},[ye(He,{name:"chevron-left",size:16})],8,E1)):pe("",!0),i("button",{class:"period-title",title:"选择统计周期",onClick:Z},[i("span",T1,F(D.value),1),ye(He,{name:"chevron-down",size:14})]),t.value!=="custom"?($(),A("button",{key:1,class:"icon-btn",disabled:!z.value,title:"下一周期",onClick:b[1]||(b[1]=E=>ne(1))},[ye(He,{name:"chevron-right",size:16})],8,A1)):pe("",!0),j.value?($(),A("button",{key:2,class:"btn btn-sm",onClick:T},F(t.value==="cycle"?"回到本期":"回到本月"),1)):pe("",!0),b[12]||(b[12]=i("span",{class:"flex1"},null,-1)),Ae(i("select",{class:"select w-filter","onUpdate:modelValue":b[2]||(b[2]=E=>Je.value=E)},[...b[8]||(b[8]=[i("option",{value:"all"},"全部类型",-1),i("option",{value:"expense"},"仅支出",-1),i("option",{value:"income"},"仅收入",-1)])],512),[[Hn,Je.value]]),Ae(i("select",{class:"select w-filter","onUpdate:modelValue":b[3]||(b[3]=E=>ze.value=E)},[b[9]||(b[9]=i("option",{value:"all"},"全部分类",-1)),($(!0),A(Me,null,st(re.value,E=>($(),A("option",{key:E,value:E},F(E),9,P1))),128))],512),[[Hn,ze.value]]),Ae(i("select",{class:"select w-filter","onUpdate:modelValue":b[4]||(b[4]=E=>Ge.value=E)},[...b[10]||(b[10]=[i("option",{value:"all"},"全部报销",-1),i("option",{value:"pending"},"待报销",-1),i("option",{value:"done"},"已报销",-1)])],512),[[Hn,Ge.value]]),i("button",{class:"btn btn-primary btn-sm",onClick:St},[ye(He,{name:"plus",size:14}),b[11]||(b[11]=Ct(" 记一笔",-1))])]),i("div",O1,[i("div",M1,[b[13]||(b[13]=i("div",{class:"muted"},"本期收入(元)",-1)),i("div",I1,F(ot(Fe.value.income)),1)]),i("div",j1,[b[14]||(b[14]=i("div",{class:"muted"},"本期支出(元)",-1)),i("div",D1,F(ot(Fe.value.expense)),1)]),i("div",L1,[b[15]||(b[15]=i("div",{class:"muted"},"本期结余(元)",-1)),i("div",{class:Ye(["stat-num num",{"amt-income":Fe.value.balance>=0,"amt-expense":Fe.value.balance<0}])},F(ot(Fe.value.balance)),3)]),i("div",K1,[b[16]||(b[16]=i("div",{class:"muted"},"待报销(元)",-1)),i("div",R1,F(ot(Fe.value.pending)),1)])]),$e.value.length?($(),A("div",N1,[b[17]||(b[17]=i("div",{class:"sec-title"},"本期支出分类",-1)),($(!0),A(Me,null,st($e.value,E=>($(),A("div",{key:E.name,class:"bar-row"},[i("span",F1,F(E.name),1),i("span",V1,[i("span",{class:"bar-fill",style:qn({width:E.percent+"%"})},null,4)]),i("span",B1,F(ot(E.amount))+" 元 · "+F(E.percent)+"%",1)]))),128))])):pe("",!0),_.value?($(),A("div",U1,[i("div",q1,F(_.value),1),b[18]||(b[18]=i("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):pe("",!0),i("div",H1,[i("table",z1,[b[20]||(b[20]=i("thead",null,[i("tr",null,[i("th",null,"日期"),i("th",null,"分类"),i("th",null,"金额(元)"),i("th",null,"备注"),i("th",null,"报销"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Me,null,st(J.value,E=>($(),A("tr",{key:E.id},[i("td",W1,F(E.date),1),i("td",G1,[i("span",Y1,F(E.category),1)]),i("td",{class:Ye(["num",E.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},F(wt(E)),3),i("td",J1,F(E.note||"--"),1),i("td",X1,[E.type!=="expense"||E.reimbursable!==1?($(),A("span",Q1,"--")):E.reimbursed===1?($(),A("span",Z1,"已报销")):($(),A("span",e0,"待报销"))]),i("td",t0,[i("div",n0,[E.type==="expense"&&E.reimbursable===1&&E.reimbursed!==1?($(),A("button",{key:0,class:"btn btn-xs",onClick:X=>Ee(E)},"标记已报销",8,s0)):pe("",!0),i("button",{class:"btn btn-xs",onClick:X=>xt(E)},"编辑",8,o0),i("button",{class:"btn btn-xs",onClick:X=>H.value=E},"删除",8,r0)])])]))),128)),!J.value.length&&!h.value?($(),A("tr",a0,[...b[19]||(b[19]=[i("td",{colspan:"6",class:"empty muted"},"该周期暂无账目",-1)])])):pe("",!0)])])]),i("div",i0,"本期 "+F(g.value.length)+" 条 · 当前筛选 "+F(J.value.length)+" 条",1),ye(e1,{open:P.value,title:x.value?"编辑账目":"记一笔",initial:I.value,onCancel:b[5]||(b[5]=E=>P.value=!1),onSave:Le},null,8,["open","title","initial"]),ye(x1,{open:oe.value,mode:t.value,anchor:c.value,month:n.value,"cycle-sel":o.value,"custom-start":r.value,"custom-end":l.value,"cycle-count":ie.value,"has-before":f.value,months:m.value,onClose:b[6]||(b[6]=E=>oe.value=!1),onApply:Oe,onSaveAnchor:Se},null,8,["open","mode","anchor","month","cycle-sel","custom-start","custom-end","cycle-count","has-before","months"]),ye(_n,{open:!!H.value,title:"删除确认",message:H.value?"将删除 "+H.value.date+" 的账目("+H.value.category+" "+ot(H.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:b[7]||(b[7]=E=>H.value=null),onConfirm:k},null,8,["open","message"])]))}}),c0=Rt(u0,[["__scopeId","data-v-deda24bd"]]),d0={class:"memo-page"},f0={class:"card memo-list"},p0={class:"pane-head"},v0={class:"pane-title"},m0={class:"memo-scroll"},h0=["onClick"],y0={class:"memo-item-title"},g0={class:"muted memo-item-sub"},b0={class:"muted num memo-item-time"},w0={key:0,class:"muted empty"},_0={class:"card memo-editor"},k0={class:"editor-foot"},C0={class:"muted foot-info"},x0=["disabled"],$0=["disabled"],S0={key:1,class:"empty muted editor-empty"},E0=jt({__name:"MemoView",setup(e){const t=O([]),n=O(null),o=O(!1),r=O(""),l=O(""),c=O(null),f=O(null);async function m(){if(t.value=await Bh(),n.value&&n.value.id){const ee=t.value.find(z=>z.id===n.value.id);ee&&(n.value=ee)}}ln(async()=>{await m(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",g)}),hn(()=>window.removeEventListener("keydown",g)),ft(Vi,async ee=>{if(!ee)return;t.value.length||await m();const z=t.value.find(ne=>ne.id===ee);Vi.value=null,z&&P(z)},{immediate:!0});function g(ee){(ee.ctrlKey||ee.metaKey)&&ee.key.toLowerCase()==="s"&&o.value&&h.value&&(ee.preventDefault(),oe())}const h=rt(()=>{if(!o.value)return!1;const ee=n.value?n.value.title:"",z=n.value?n.value.content:"";return r.value!==ee||l.value!==z});function _(ee){n.value=ee,o.value=!0,r.value=ee.title,l.value=ee.content}function P(ee){if(!(o.value&&n.value&&n.value.id===ee.id)){if(h.value){f.value={type:"select",memo:ee};return}_(ee)}}function x(){if(h.value){f.value={type:"new"};return}I()}function I(){n.value=null,o.value=!0,r.value="",l.value=""}function H(){n.value?_(n.value):I()}async function oe(){if(!r.value.trim()&&!l.value.trim()){Ne("标题与内容不能都为空");return}if(n.value&&n.value.id)await qh(n.value.id,r.value,l.value),Ne("备忘已保存");else{const ee=await Uh(r.value,l.value);n.value=ee,r.value=ee.title,l.value=ee.content,Ne("备忘已创建")}await m()}function le(){n.value&&n.value.id&&(c.value=n.value)}async function ie(){c.value&&c.value.id&&(await Hh(c.value.id),Ne("备忘已删除")),c.value=null,await m(),I()}function U(){const ee=f.value;f.value=null,ee&&(ee.type==="select"?_(ee.memo):I())}function S(ee){return(ee.content||"").replace(/\s+/g," ").slice(0,30)}function D(ee){return ee.replace("T"," ").slice(0,16)}return(ee,z)=>($(),A("div",d0,[i("aside",f0,[i("div",p0,[i("span",v0,"备忘录("+F(t.value.length)+")",1),i("button",{class:"btn btn-primary btn-sm",onClick:x},"新建")]),i("div",m0,[($(!0),A(Me,null,st(t.value,ne=>($(),A("div",{key:ne.id,class:Ye(["memo-item",{active:o.value&&n.value&&n.value.id===ne.id}]),onClick:j=>P(ne)},[i("div",y0,F(ne.title||"无标题"),1),i("div",g0,F(S(ne)||"空"),1),i("div",b0,F(D(ne.updated_at)),1)],10,h0))),128)),t.value.length?pe("",!0):($(),A("div",w0,"暂无备忘"))])]),i("section",_0,[o.value?($(),A(Me,{key:0},[Ae(i("input",{class:"input title-input","onUpdate:modelValue":z[0]||(z[0]=ne=>r.value=ne),placeholder:"标题"},null,512),[[De,r.value]]),Ae(i("textarea",{class:"textarea content-textarea","onUpdate:modelValue":z[1]||(z[1]=ne=>l.value=ne),placeholder:"内容"},null,512),[[De,l.value]]),i("div",k0,[i("span",C0,[h.value?($(),A(Me,{key:0},[Ct("有未保存修改")],64)):n.value&&n.value.id?($(),A(Me,{key:1},[Ct("更新于 "+F(D(n.value.updated_at)),1)],64)):($(),A(Me,{key:2},[Ct("新备忘")],64))]),z[4]||(z[4]=i("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),A("button",{key:0,class:"btn btn-sm",onClick:le},"删除")):pe("",!0),i("button",{class:"btn btn-sm",disabled:!h.value,onClick:H},"放弃修改",8,x0),i("button",{class:"btn btn-primary btn-sm",disabled:!h.value,onClick:oe},"保存",8,$0)])],64)):($(),A("div",S0,"选择左侧备忘,或点击右上角新建"))]),ye(_n,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:z[2]||(z[2]=ne=>c.value=null),onConfirm:ie},null,8,["open","message"]),ye(_n,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:z[3]||(z[3]=ne=>f.value=null),onConfirm:U},null,8,["open"])]))}}),T0=Rt(E0,[["__scopeId","data-v-a0931fc7"]]),A0=["aria-label"],P0={class:"dialog-head"},O0={class:"dialog-title"},M0={class:"dialog-body"},I0={class:"form-grid"},j0={class:"field span2"},D0={class:"field span2"},L0={class:"field span2"},K0={class:"pwd-row"},R0={class:"field span2"},N0={key:0,class:"form-error"},F0={class:"dialog-btns"},V0=jt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=O(""),l=O(""),c=O(""),f=O(""),m=O(""),g=O(null);function h(x){n.open&&x.key==="Escape"&&o("cancel")}ft(()=>n.open,async x=>{var I;x?(r.value=n.initial.system,l.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,m.value="",window.addEventListener("keydown",h),await Ks(),(I=g.value)==null||I.focus()):window.removeEventListener("keydown",h)}),hn(()=>window.removeEventListener("keydown",h));function _(){const x="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",I="!@#$%^&*",H=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let le=0;le($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:I[6]||(I[6]=Nt(H=>o("cancel"),["self"]))},[i("div",{class:"dialog",role:"dialog","aria-label":e.title},[i("div",P0,[i("span",O0,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:I[0]||(I[0]=H=>o("cancel"))},[ye(He,{name:"close",size:16})])]),i("div",M0,[i("div",I0,[i("div",j0,[I[7]||(I[7]=i("label",null,"系统名称(必填)",-1)),Ae(i("input",{ref_key:"systemInput",ref:g,class:"input","onUpdate:modelValue":I[1]||(I[1]=H=>r.value=H),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,r.value]])]),i("div",D0,[I[8]||(I[8]=i("label",null,"账号(必填)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":I[2]||(I[2]=H=>l.value=H),placeholder:"用户名、工号或邮箱"},null,512),[[De,l.value]])]),i("div",L0,[I[9]||(I[9]=i("label",null,"密码(必填)",-1)),i("div",K0,[Ae(i("input",{class:"input","onUpdate:modelValue":I[3]||(I[3]=H=>c.value=H),placeholder:"输入或点击生成"},null,512),[[De,c.value]]),i("button",{class:"btn btn-sm",onClick:_},"生成")])]),i("div",R0,[I[10]||(I[10]=i("label",null,"备注",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=H=>f.value=H),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,f.value]])])]),m.value?($(),A("div",N0,F(m.value),1)):pe("",!0)]),i("div",F0,[i("button",{class:"btn btn-sm",onClick:I[5]||(I[5]=H=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:P},"保存")])],8,A0)])):pe("",!0)]),_:1})]))}}),B0=Rt(V0,[["__scopeId","data-v-2eafe20e"]]),U0={class:"vault-page"},q0={key:0,class:"empty muted"},H0={key:1,class:"card lock-card"},z0={class:"lock-badge"},W0={key:0,class:"form-error"},G0=["disabled"],Y0={key:0,class:"form-error"},J0=["disabled"],X0={class:"vault-toolbar"},Q0={class:"search-wrap"},Z0={class:"card table-card"},ek={class:"cred-table"},tk={class:"td-system"},nk=["onClick"],sk={class:"pwd-cell"},ok={class:"num pwd-text"},rk=["onClick"],ak=["onClick"],ik={class:"td-remark"},lk={class:"td-ops"},uk={class:"ops"},ck=["onClick"],dk=["onClick"],fk={key:0},pk={class:"muted table-note num"},vk={class:"dialog pwd-dialog"},mk={class:"dialog-head"},hk={class:"dialog-body"},yk={class:"vp-field"},gk={class:"vp-field"},bk={class:"vp-field"},wk={key:0,class:"form-error"},_k={class:"dialog-btns"},kk=5*60*1e3,Ck=jt({__name:"VaultView",setup(e){const t=O(null),n=O(km()),o=O(!1),r=O(""),l=O(""),c=O(""),f=O(""),m=O(""),g=O([]),h=O(""),_=O({}),P=O(!1),x=O(null),I=O({system:"",account:"",password:"",remark:""}),H=O(null),oe=O(!1),le=O(""),ie=O(""),U=O(""),S=O("");async function D(){g.value=await Em(),_.value={}}let ee=null;function z(){ee!==null&&window.clearTimeout(ee),ee=window.setTimeout(()=>{n.value&&(sa(),n.value=!1,g.value=[],_.value={},Ne("长时间未操作,密码库已自动锁定"))},kk)}function ne(){n.value&&z()}ln(async()=>{t.value=await wd(),window.addEventListener("click",ne),window.addEventListener("keydown",ne),n.value&&z()}),hn(()=>{window.removeEventListener("click",ne),window.removeEventListener("keydown",ne),ee!==null&&window.clearTimeout(ee)});const j=rt(()=>{const re=h.value.trim().toLowerCase();return re?g.value.filter(J=>(J.system+" "+J.account+" "+(J.remark||"")).toLowerCase().includes(re)):g.value});async function T(){if(!o.value){if(c.value="",!r.value){c.value="请输入主密码";return}if(r.value.length<6){c.value="主密码至少 6 位";return}if(r.value!==l.value){c.value="两次输入的主密码不一致";return}o.value=!0;try{await Cm(r.value),r.value="",l.value="",n.value=!0,z(),await D(),Ne("主密码已设置,密码库已解锁")}catch(re){c.value=re instanceof Error?re.message:"设置失败"}o.value=!1}}async function M(){if(!o.value){if(m.value="",!f.value){m.value="请输入主密码";return}o.value=!0;try{await xm(f.value),f.value="",n.value=!0,z(),await D()}catch(re){m.value=re instanceof Error?re.message:"解锁失败"}o.value=!1}}function Z(){sa(),n.value=!1,g.value=[],_.value={},ee!==null&&window.clearTimeout(ee),Ne("密码库已锁定")}async function Oe(re){const J=re.id;if(_.value[J]){_.value[J]=!1;return}try{re.passwordPlain=await gi(J),_.value[J]=!0}catch($e){Ne($e instanceof Error?$e.message:"解密失败")}}async function Se(re){try{const J=await gi(re.id);await Gi(J),Ne("密码已复制")}catch(J){Ne(J instanceof Error?J.message:"复制失败")}}async function ge(re){await Gi(re.account),Ne("账号已复制")}function Pe(){x.value=null,I.value={system:"",account:"",password:"",remark:""},P.value=!0}async function qe(re){try{const J=await gi(re.id);x.value=re.id,I.value={system:re.system,account:re.account,password:J,remark:re.remark||""},P.value=!0}catch(J){Ne(J instanceof Error?J.message:"解密失败")}}async function Fe(re){const J=x.value??void 0;await Tm(re,J),P.value=!1,await D(),Ne(J?"账号已更新":"账号已添加")}async function Je(){H.value&&H.value.id&&(await Am(H.value.id),Ne("账号已删除")),H.value=null,await D()}function Ge(){le.value="",ie.value="",U.value="",S.value="",oe.value=!0}async function ze(){S.value="";try{const re=await Pm(le.value,ie.value);oe.value=!1,le.value="",ie.value="",U.value="",Ne("主密码已修改,"+re+" 条账号密码已重新加密")}catch(re){S.value=re instanceof Error?re.message:"修改失败"}}return(re,J)=>($(),A("div",U0,[t.value===null?($(),A("div",q0,"加载中")):n.value?($(),A(Me,{key:2},[i("div",X0,[i("div",Q0,[ye(He,{name:"search",size:14,class:"search-icon"}),Ae(i("input",{class:"input","onUpdate:modelValue":J[3]||(J[3]=$e=>h.value=$e),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,h.value]])]),J[16]||(J[16]=i("span",{class:"flex1"},null,-1)),i("button",{class:"btn btn-sm",onClick:Ge},"修改主密码"),i("button",{class:"btn btn-sm",onClick:Z},"锁定"),i("button",{class:"btn btn-primary btn-sm",onClick:Pe},"新增账号")]),i("div",Z0,[i("table",ek,[J[18]||(J[18]=i("thead",null,[i("tr",null,[i("th",null,"系统名称"),i("th",null,"账号"),i("th",null,"密码"),i("th",null,"备注"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Me,null,st(j.value,$e=>($(),A("tr",{key:$e.id},[i("td",tk,F($e.system),1),i("td",null,[i("span",{class:"copyable",title:"点击复制账号",onClick:ot=>ge($e)},F($e.account),9,nk)]),i("td",null,[i("div",sk,[i("span",ok,F(_.value[$e.id]?$e.passwordPlain:"........"),1),i("button",{class:"btn btn-xs",onClick:ot=>Oe($e)},F(_.value[$e.id]?"隐藏":"显示"),9,rk),i("button",{class:"btn btn-xs",onClick:ot=>Se($e)},"复制",8,ak)])]),i("td",ik,F($e.remark||"--"),1),i("td",lk,[i("div",uk,[i("button",{class:"btn btn-xs",onClick:ot=>qe($e)},"编辑",8,ck),i("button",{class:"btn btn-xs",onClick:ot=>H.value=$e},"删除",8,dk)])])]))),128)),j.value.length?pe("",!0):($(),A("tr",fk,[...J[17]||(J[17]=[i("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),i("div",pk,"共 "+F(g.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),A("div",H0,[i("div",z0,[ye(He,{name:"lock",size:26})]),t.value===!1?($(),A(Me,{key:0},[J[12]||(J[12]=i("div",{class:"lock-title"},"设置主密码",-1)),J[13]||(J[13]=i("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[0]||(J[0]=$e=>r.value=$e),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(T,["enter"])},null,544),[[De,r.value]]),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[1]||(J[1]=$e=>l.value=$e),placeholder:"再次输入主密码",onKeydown:Mt(T,["enter"])},null,544),[[De,l.value]]),c.value?($(),A("div",W0,F(c.value),1)):pe("",!0),i("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:T},"完成设置并解锁",8,G0)],64)):($(),A(Me,{key:1},[J[14]||(J[14]=i("div",{class:"lock-title"},"密码库已锁定",-1)),J[15]||(J[15]=i("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[2]||(J[2]=$e=>f.value=$e),placeholder:"主密码",onKeydown:Mt(M,["enter"])},null,544),[[De,f.value]]),m.value?($(),A("div",Y0,F(m.value),1)):pe("",!0),i("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:M},"解锁",8,J0)],64))])),ye(B0,{open:P.value,title:x.value?"编辑账号":"新增账号",initial:I.value,onCancel:J[4]||(J[4]=$e=>P.value=!1),onSave:Fe},null,8,["open","title","initial"]),ye(_n,{open:!!H.value,title:"删除确认",message:H.value?"将删除系统「"+H.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:J[5]||(J[5]=$e=>H.value=null),onConfirm:Je},null,8,["open","message"]),($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[oe.value?($(),A("div",{key:0,class:"mask",onClick:J[11]||(J[11]=Nt($e=>oe.value=!1,["self"]))},[i("div",vk,[i("div",mk,[J[19]||(J[19]=i("span",{class:"dialog-title"},"修改主密码",-1)),i("button",{class:"icon-btn",title:"关闭",onClick:J[6]||(J[6]=$e=>oe.value=!1)},[ye(He,{name:"close",size:16})])]),i("div",hk,[i("div",yk,[J[20]||(J[20]=i("label",null,"旧主密码",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[7]||(J[7]=$e=>le.value=$e)},null,512),[[De,le.value]])]),i("div",gk,[J[21]||(J[21]=i("label",null,"新主密码(至少 6 位)",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[8]||(J[8]=$e=>ie.value=$e)},null,512),[[De,ie.value]])]),i("div",bk,[J[22]||(J[22]=i("label",null,"确认新主密码",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":J[9]||(J[9]=$e=>U.value=$e)},null,512),[[De,U.value]])]),S.value?($(),A("div",wk,F(S.value),1)):pe("",!0),J[23]||(J[23]=i("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),i("div",_k,[i("button",{class:"btn btn-sm",onClick:J[10]||(J[10]=$e=>oe.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:ze},"确认修改")])])])):pe("",!0)]),_:1})]))]))}}),xk=Rt(Ck,[["__scopeId","data-v-6d2745bc"]]),$k=["aria-label"],Sk={class:"dialog-head"},Ek={class:"dialog-title"},Tk={class:"dialog-body"},Ak={class:"field"},Pk={key:0},Ok=["placeholder"],Mk={key:1,class:"form-error"},Ik={class:"dialog-btns"},jk=jt({__name:"InputDialog",props:{open:{type:Boolean},title:{},label:{default:""},placeholder:{default:""},initial:{default:""},confirmText:{default:"确定"},validate:{}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,o=t,r=O(""),l=O(""),c=O(null);function f(g){n.open&&g.key==="Escape"&&o("cancel")}ft(()=>n.open,async g=>{var h,_;g?(r.value=n.initial,l.value="",window.addEventListener("keydown",f),await Ks(),(h=c.value)==null||h.focus(),(_=c.value)==null||_.select()):window.removeEventListener("keydown",f)}),hn(()=>window.removeEventListener("keydown",f));function m(){const g=r.value.trim();if(!g){l.value="请输入内容";return}const h=n.validate?n.validate(g):null;if(h){l.value=h;return}o("confirm",g)}return(g,h)=>($(),gt(kn,{to:"body"},[ye(Gn,{name:"modal"},{default:Cn(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:h[3]||(h[3]=Nt(_=>o("cancel"),["self"]))},[i("div",{class:"dialog input-dialog",role:"dialog","aria-label":e.title},[i("div",Sk,[i("span",Ek,F(e.title),1),i("button",{class:"icon-btn",title:"关闭",onClick:h[0]||(h[0]=_=>o("cancel"))},[ye(He,{name:"close",size:16})])]),i("div",Tk,[i("div",Ak,[e.label?($(),A("label",Pk,F(e.label),1)):pe("",!0),Ae(i("input",{ref_key:"input",ref:c,class:Ye(["input",{invalid:l.value}]),"onUpdate:modelValue":h[1]||(h[1]=_=>r.value=_),placeholder:e.placeholder,maxlength:"20",onKeydown:Mt(m,["enter"])},null,42,Ok),[[De,r.value]]),l.value?($(),A("div",Mk,F(l.value),1)):pe("",!0)])]),i("div",Ik,[i("button",{class:"btn btn-sm",onClick:h[2]||(h[2]=_=>o("cancel"))},"取消"),i("button",{class:"btn btn-primary btn-sm",onClick:m},F(e.confirmText),1)])],8,$k)])):pe("",!0)]),_:1})]))}}),Dk=Rt(jk,[["__scopeId","data-v-4b14ba4f"]]);function Lk(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Qu(e,t){const o="\uFEFF"+t.map(f=>f.map(Lk).join(",")).join(`\r +`);if(lo.isNativePlatform()){const{downloadText:f}=await Fd(async()=>{const{downloadText:m}=await Promise.resolve().then(()=>tb);return{downloadText:m}},void 0,import.meta.url);return f(e,o)}const r=new Blob([o],{type:"text/csv;charset=utf-8"}),l=URL.createObjectURL(r),c=document.createElement("a");return c.href=l,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(l),1e4),""}const Kk={class:"settings"},Rk={class:"card section"},Nk={class:"muted acc-line"},Fk={class:"ai-grid"},Vk={class:"rule-item"},Bk={class:"rule-item"},Uk={class:"rule-item"},qk={key:0,class:"form-error"},Hk={class:"rule-save"},zk={class:"card section"},Wk={class:"rule-grid"},Gk={class:"rule-item"},Yk={class:"rule-item"},Jk={class:"rule-item"},Xk={class:"rule-item"},Qk={class:"rule-item"},Zk={class:"card section"},eC={class:"proj-add"},tC={key:0,class:"muted proj-tip"},nC=["onKeydown"],sC=["onClick"],oC=["onClick"],rC=["onClick"],aC={key:1,class:"muted"},iC={class:"card section"},lC={class:"card section"},uC={class:"muted acc-line"},cC={class:"rule-save"},dC=["disabled"],fC={key:0,class:"muted acc-line"},pC={key:1,class:"form-error"},vC={key:2,class:"form-error"},mC={class:"card section"},hC={class:"ai-grid"},yC={class:"rule-item"},gC={class:"rule-item"},bC={class:"rule-item"},wC={class:"card section"},_C={class:"cat-block"},kC={class:"cat-head"},CC={class:"cat-chips"},xC=["onClick"],$C=["onClick"],SC={class:"cat-block"},EC={class:"cat-head"},TC={class:"cat-chips"},AC=["onClick"],PC=["onClick"],OC={class:"cat-block"},MC={class:"cat-head"},IC={class:"cat-chips"},jC=["onClick"],DC=["onClick"],LC={class:"card section"},KC={class:"backup-row"},RC={key:0,class:"import-error"},NC=jt({__name:"SettingsView",setup(e){var Be;const t=O({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=O([]),o=O(""),r=O(""),l=O(""),c=O(""),f=O(""),m=O(""),g=O(null),h=O(""),_=O([]),P=O([]),x=O([]);async function I(){_.value=await Zo(),P.value=await la("expense"),x.value=await la("income")}const H=O({open:!1,kind:"log",index:-1,initial:""}),oe=O(null);function le(ue){return ue==="log"?_.value:ue==="expense"?P.value:x.value}async function ie(ue,G){ue==="log"?(_.value=G,await ry(G)):ue==="expense"?(P.value=G,await Wi("expense",G)):(x.value=G,await Wi("income",G))}function U(ue){H.value={open:!0,kind:ue,index:-1,initial:""}}function S(ue,G,de){H.value={open:!0,kind:ue,index:G,initial:de}}function D(ue){const{kind:G,index:de}=H.value,je=le(G);return je.includes(ue)&&!(de>=0&&je[de]===ue)?"该分类已存在":null}async function ee(ue){const{kind:G,index:de}=H.value;de>=0?(await ie(G,le(G).map((je,at)=>at===de?ue:je)),Ne("分类已更新(历史记录自动跟随显示)")):(await ie(G,[...le(G),ue]),Ne("分类已添加")),H.value.open=!1}function z(ue,G){const de=le(ue);if(de.length<=1){Ne("至少保留一个分类");return}oe.value={kind:ue,index:G,name:de[G]}}async function ne(){if(!oe.value)return;const{kind:ue,index:G}=oe.value;await ie(ue,le(ue).filter((de,je)=>je!==G)),Ne("分类已删除"),oe.value=null}const j=O(null),T=O(null),M=O(""),Z=O(((Be=zo())==null?void 0:Be.username)||""),Oe=O(""),Se=O(""),ge=O(""),Pe=O(""),qe=O(!1),Fe="0.7.2",Je=O(""),Ge=O(""),ze=O(""),re=O(""),J=O(!1),$e=O("");async function ot(){var ue;Je.value=((ue=pn())==null?void 0:ue.username)||"",$e.value=await Qm(),re.value=eo.value}ft(eo,ue=>{re.value=ue});async function wt(){ze.value="";try{await Td(),Ne("云端绑定已重建")}catch(ue){ze.value=ue instanceof Error?ue.message:"绑定失败"}}async function Ee(){if(!J.value){ze.value="",re.value=eo.value,J.value=!0;try{const ue=await Bi();$e.value=ue.at,Ge.value="推送 "+ue.pushed+" 条 · 拉取 "+ue.pulled+" 条 · 删除 "+ue.removed+" 条",re.value="",Ne("同步完成")}catch(ue){ze.value=ue instanceof Error?ue.message:"同步失败"}J.value=!1}}async function xt(){if(Pe.value="",Se.value!==ge.value){Pe.value="两次输入的新密码不一致";return}try{await Hm(Oe.value,Se.value),Oe.value="",Se.value="",ge.value="",Ne("登录密码已修改")}catch(ue){Pe.value=ue instanceof Error?ue.message:"修改失败"}}async function St(){await zm(),window.location.reload()}async function Le(){t.value=await ps(),n.value=await ao(!0),l.value=(await gl()).join(` +`),c.value=await $t("ai_base_url",""),f.value=await $t("ai_api_key",""),m.value=await $t("ai_model",""),await ot(),await I()}async function k(){await Kt("ai_base_url",c.value.trim()),await Kt("ai_api_key",f.value.trim()),await Kt("ai_model",m.value.trim()),Ne("AI 配置已保存")}async function v(){const ue=it(),G=await Promise.all([Qo("2000-01-01",ue),ao(!0)]),de=G[0],je=G[1],at=new Map(je.map(Ze=>[Ze.id,Ze.name])),yt=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Ze of de)yt.push([Ze.date,Uo(Ze.category),Ze.project_id&&at.get(Ze.project_id)||"",Ze.content,Ze.minutes==null?"":Ze.minutes,Ze.is_milestone?"是":"",Ze.needs_followup?"是":"",Ze.takeaway||"",Ze.remark||""]);const Dt=await Qu("工作记录_"+ue.replace(/-/g,"")+".csv",yt);Ne(Dt?"CSV 已导出到:"+Dt:"CSV 已导出到系统下载目录")}async function b(){const ue=it(),G=await Promise.all([ps(),Xo("2000-01-01",ue)]),de=G[0],je=G[1],at=["周日","周一","周二","周三","周四","周五","周六"],yt=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Ze of je){const Qt=uo(Ze,Ze.date,de,Ze.date===ue);yt.push([Ze.date,at[Rs(Ze.date).getDay()],Qt.label,Ze.clock_in_at?zn(Ze.clock_in_at):"",Ze.clock_out_at?zn(Ze.clock_out_at):"",Ze.location||"",Ze.kind==="makeup"?"补卡":Ze.kind==="leave"?"休假":"正常",Ze.note||""])}const Dt=await Qu("考勤记录_"+ue.replace(/-/g,"")+".csv",yt);Ne(Dt?"CSV 已导出到:"+Dt:"CSV 已导出到系统下载目录")}ln(Le);async function E(){await Kt("work_start",t.value.work_start),await Kt("work_end",t.value.work_end),await Kt("grace_minutes",String(t.value.grace_minutes)),await Kt("lunch_minutes",String(t.value.lunch_minutes)),await Kt("remind_weekly",t.value.remind_weekly),Ne("打卡规则已保存")}async function X(){await jd(l.value.split(` +`)),Ne("常用地点已保存")}async function ce(){const ue=o.value.trim();if(ue){try{await ph(ue),r.value="",o.value=""}catch{r.value="项目名已存在"}await Le()}}function xe(ue){g.value=ue.id,h.value=ue.name}async function be(ue){const G=h.value.trim();if(G)try{await vh(ue.id,G),r.value=""}catch{r.value="项目名已存在"}g.value=null,await Le()}async function _e(ue){await mh(ue.id,ue.archived!==1),await Le()}async function fe(){try{const ue=await ey(),G=await Ea("实习日志备份_"+it().replace(/-/g,"")+".json",ue);Ne(G?"备份已导出到:"+G:"备份已导出到系统下载目录")}catch(ue){Ne("导出失败:"+(ue instanceof Error?ue.message:String(ue)))}}function Ke(ue){const G=ue.target,de=G.files&&G.files[0];if(M.value="",!de)return;const je=de.name;de.text().then(at=>{T.value={name:je,text:at}}),G.value=""}async function Te(){if(T.value)try{await ty(T.value.text),T.value=null,M.value="",await Le(),Ne("数据导入完成")}catch(ue){T.value=null,M.value=ue instanceof Error?ue.message:"导入失败"}}return(ue,G)=>($(),A("div",Kk,[i("div",Rk,[G[27]||(G[27]=i("div",{class:"section-title"},"账号与隐私",-1)),i("div",Nk,"v"+F(Ht(Fe))+" · 当前账号 "+F(Z.value)+" · 登录密码仅存 PBKDF2 哈希",1),i("div",Fk,[i("div",Vk,[G[24]||(G[24]=i("label",null,"旧登录密码",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":G[0]||(G[0]=de=>Oe.value=de)},null,512),[[De,Oe.value]])]),i("div",Bk,[G[25]||(G[25]=i("label",null,"新登录密码(至少 6 位)",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":G[1]||(G[1]=de=>Se.value=de)},null,512),[[De,Se.value]])]),i("div",Uk,[G[26]||(G[26]=i("label",null,"确认新登录密码",-1)),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":G[2]||(G[2]=de=>ge.value=de)},null,512),[[De,ge.value]])])]),Pe.value?($(),A("div",qk,F(Pe.value),1)):pe("",!0),i("div",Hk,[i("button",{class:"btn btn-primary btn-sm",onClick:xt},"修改登录密码"),i("button",{class:"btn btn-sm btn-danger",onClick:G[3]||(G[3]=de=>qe.value=!0)},"删除此用户及全部数据")])]),i("div",zk,[G[34]||(G[34]=i("div",{class:"section-title"},"打卡规则",-1)),i("div",Wk,[i("div",Gk,[G[28]||(G[28]=i("label",null,"上班时间",-1)),Ae(i("input",{type:"time",class:"input","onUpdate:modelValue":G[4]||(G[4]=de=>t.value.work_start=de)},null,512),[[De,t.value.work_start]])]),i("div",Yk,[G[29]||(G[29]=i("label",null,"下班时间",-1)),Ae(i("input",{type:"time",class:"input","onUpdate:modelValue":G[5]||(G[5]=de=>t.value.work_end=de)},null,512),[[De,t.value.work_end]])]),i("div",Jk,[G[30]||(G[30]=i("label",null,"迟到宽限(分钟)",-1)),Ae(i("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":G[6]||(G[6]=de=>t.value.grace_minutes=de)},null,512),[[De,t.value.grace_minutes,void 0,{number:!0}]])]),i("div",Xk,[G[31]||(G[31]=i("label",null,"午休扣除(分钟)",-1)),Ae(i("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":G[7]||(G[7]=de=>t.value.lunch_minutes=de)},null,512),[[De,t.value.lunch_minutes,void 0,{number:!0}]])]),i("div",Qk,[G[33]||(G[33]=i("label",null,"周记提醒",-1)),Ae(i("select",{class:"select","onUpdate:modelValue":G[8]||(G[8]=de=>t.value.remind_weekly=de)},[...G[32]||(G[32]=[i("option",{value:"friday"},"每周五提醒",-1),i("option",{value:"off"},"关闭",-1)])],512),[[Hn,t.value.remind_weekly]])])]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:E},"保存规则")])]),i("div",Zk,[G[35]||(G[35]=i("div",{class:"section-title"},"项目管理",-1)),i("div",eC,[Ae(i("input",{class:"input","onUpdate:modelValue":G[9]||(G[9]=de=>o.value=de),placeholder:"新项目名称",onKeydown:Mt(ce,["enter"])},null,544),[[De,o.value]]),i("button",{class:"btn btn-sm",onClick:ce},"添加")]),r.value?($(),A("div",tC,F(r.value),1)):pe("",!0),($(!0),A(Me,null,st(n.value,de=>($(),A("div",{key:de.id,class:"proj-row"},[g.value===de.id?($(),A(Me,{key:0},[Ae(i("input",{class:"input","onUpdate:modelValue":G[10]||(G[10]=je=>h.value=je),onKeydown:Mt(je=>be(de),["enter"])},null,40,nC),[[De,h.value]]),i("button",{class:"btn btn-sm",onClick:je=>be(de)},"保存",8,sC),i("button",{class:"btn btn-sm",onClick:G[11]||(G[11]=je=>g.value=null)},"取消")],64)):($(),A(Me,{key:1},[i("span",{class:Ye(["proj-name",{archived:de.archived===1}])},F(de.name),3),i("button",{class:"icon-btn",title:"重命名",onClick:je=>xe(de)},[ye(He,{name:"edit",size:14})],8,oC),i("button",{class:"btn btn-sm",onClick:je=>_e(de)},F(de.archived===1?"恢复":"归档"),9,rC)],64))]))),128)),n.value.length?pe("",!0):($(),A("div",aC,"暂无项目,先添加一个"))]),i("div",iC,[G[37]||(G[37]=i("div",{class:"section-title"},"常用地点",-1)),Ae(i("textarea",{class:"textarea","onUpdate:modelValue":G[12]||(G[12]=de=>l.value=de),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,l.value]]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:X},"保存地点"),G[36]||(G[36]=i("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),i("div",lC,[G[38]||(G[38]=i("div",{class:"section-title"},"多端数据同步",-1)),i("div",uC,"云端账号:"+F(Je.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),i("div",cC,[i("button",{class:"btn btn-primary btn-sm",disabled:J.value,onClick:Ee},F(J.value?"同步中":"立即同步"),9,dC),i("button",{class:"btn btn-sm",onClick:wt},"重新校验连接")]),Ge.value?($(),A("div",fC,"上次同步:"+F($e.value||"--")+" · "+F(Ge.value),1)):pe("",!0),ze.value?($(),A("div",pC,F(ze.value),1)):pe("",!0),re.value?($(),A("div",vC,"最近自动同步失败:"+F(re.value)+"(可点「立即同步」重试)",1)):pe("",!0)]),i("div",mC,[G[43]||(G[43]=i("div",{class:"section-title"},"AI 润色配置(可选)",-1)),i("div",hC,[i("div",yC,[G[39]||(G[39]=i("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":G[13]||(G[13]=de=>c.value=de),placeholder:"https://api.example.com/v1"},null,512),[[De,c.value]])]),i("div",gC,[G[40]||(G[40]=i("label",null,"API Key",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":G[14]||(G[14]=de=>f.value=de),placeholder:"sk-..."},null,512),[[De,f.value]])]),i("div",bC,[G[41]||(G[41]=i("label",null,"模型名称",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":G[15]||(G[15]=de=>m.value=de),placeholder:"如:deepseek-chat"},null,512),[[De,m.value]])])]),i("div",{class:"rule-save"},[i("button",{class:"btn btn-primary btn-sm",onClick:k},"保存 AI 配置"),G[42]||(G[42]=i("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),i("div",wC,[G[47]||(G[47]=i("div",{class:"section-title"},"工作分类",-1)),i("div",_C,[i("div",kC,[G[44]||(G[44]=i("span",{class:"muted"},"工作记录分类",-1)),i("button",{class:"btn btn-xs",onClick:G[16]||(G[16]=de=>U("log"))},"添加")]),i("div",CC,[($(!0),A(Me,null,st(_.value,(de,je)=>($(),A("span",{key:de+je,class:"cat-chip"},[Ct(F(de)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:at=>S("log",je,de)},"改",8,xC),i("button",{class:"chip-btn",title:"删除",onClick:at=>z("log",je)},"删",8,$C)]))),128))])]),i("div",SC,[i("div",EC,[G[45]||(G[45]=i("span",{class:"muted"},"记账支出分类",-1)),i("button",{class:"btn btn-xs",onClick:G[17]||(G[17]=de=>U("expense"))},"添加")]),i("div",TC,[($(!0),A(Me,null,st(P.value,(de,je)=>($(),A("span",{key:de+je,class:"cat-chip"},[Ct(F(de)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:at=>S("expense",je,de)},"改",8,AC),i("button",{class:"chip-btn",title:"删除",onClick:at=>z("expense",je)},"删",8,PC)]))),128))])]),i("div",OC,[i("div",MC,[G[46]||(G[46]=i("span",{class:"muted"},"记账收入分类",-1)),i("button",{class:"btn btn-xs",onClick:G[18]||(G[18]=de=>U("income"))},"添加")]),i("div",IC,[($(!0),A(Me,null,st(x.value,(de,je)=>($(),A("span",{key:de+je,class:"cat-chip"},[Ct(F(de)+" ",1),i("button",{class:"chip-btn",title:"修改",onClick:at=>S("income",je,de)},"改",8,jC),i("button",{class:"chip-btn",title:"删除",onClick:at=>z("income",je)},"删",8,DC)]))),128))])])]),i("div",LC,[G[48]||(G[48]=i("div",{class:"section-title"},"数据备份",-1)),i("div",KC,[i("button",{class:"btn btn-sm",onClick:fe},"导出 JSON 备份"),i("button",{class:"btn btn-sm",onClick:G[19]||(G[19]=de=>{var je;return(je=j.value)==null?void 0:je.click()})},"导入 JSON 备份"),i("button",{class:"btn btn-sm",onClick:v},"导出工作记录 CSV"),i("button",{class:"btn btn-sm",onClick:b},"导出考勤 CSV"),i("input",{ref_key:"fileInput",ref:j,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Ke},null,544)]),M.value?($(),A("div",RC,F(M.value),1)):pe("",!0),G[49]||(G[49]=i("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),ye(Dk,{open:H.value.open,title:H.value.index>=0?"修改分类名称":"添加分类",label:"分类名称",placeholder:"如:制度学习 / 差旅交通",initial:H.value.initial,validate:D,"confirm-text":"保存",onCancel:G[20]||(G[20]=de=>H.value.open=!1),onConfirm:ee},null,8,["open","title","initial"]),ye(_n,{open:!!oe.value,title:"删除分类",message:oe.value?"将删除分类「"+oe.value.name+"」。历史记录不受影响,仍按原分类展示。":"","confirm-text":"删除",danger:"",onCancel:G[21]||(G[21]=de=>oe.value=null),onConfirm:ne},null,8,["open","message"]),ye(_n,{open:!!T.value,title:"导入确认",message:T.value?"将从文件「"+T.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:G[22]||(G[22]=de=>T.value=null),onConfirm:Te},null,8,["open","message"]),ye(_n,{open:qe.value,title:"删除用户确认",message:"将永久删除云端账号「"+Z.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:G[23]||(G[23]=de=>qe.value=!1),onConfirm:St},null,8,["open","message"])]))}}),FC=Rt(NC,[["__scopeId","data-v-10f77319"]]),VC={class:"tp-main"},BC={class:"tp-title"},UC={class:"tp-meta"},qC={class:"tp-time num"},HC=jt({__name:"TimerPanel",setup(e){const t=O(null),n=O(Date.now());let o=null,r=null;async function l(){try{t.value=await Ah()}catch{}}const c=rt(()=>{const h=t.value;if(!h||!h.timer_started_at)return 0;const _=(h.actual_minutes||0)*60,P=Math.max(0,Math.floor((n.value-new Date(h.timer_started_at).getTime())/1e3));return _+P}),f=rt(()=>{const h=c.value,_=Math.floor(h/3600),P=Math.floor(h%3600/60),x=h%60,I=H=>String(H).padStart(2,"0");return _>0?_+":"+I(P)+":"+I(x):P+":"+I(x)});async function m(){const h=t.value;h&&(await Sa(h.id),Ne("已停止计时:"+h.title),await l())}function g(){location.hash="#/plan"}return ft(Sd,()=>{l()}),ln(()=>{l(),o=window.setInterval(()=>{l()},15e3),r=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",l)}),hn(()=>{o!==null&&window.clearInterval(o),r!==null&&window.clearInterval(r),window.removeEventListener("focus",l)}),(h,_)=>($(),gt(Gn,{name:"tp"},{default:Cn(()=>[t.value&&t.value.timer_started_at?($(),A("div",{key:0,class:"tp",onClick:g,title:"点击查看计划页"},[_[0]||(_[0]=i("span",{class:"tp-pulse"},null,-1)),i("span",VC,[i("span",BC,F(t.value.title),1),i("span",UC,F(t.value.kind)+" · 计时中",1)]),i("span",qC,F(f.value),1),i("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Nt(m,["stop"])},"停止")])):pe("",!0)]),_:1}))}}),zC=Rt(HC,[["__scopeId","data-v-a8f9ed22"]]),WC={class:"admin-page"},GC={class:"card table-card"},YC={class:"toolbar"},JC={key:0,class:"form-error tb-error"},XC={class:"admin-table"},QC={class:"td-name","data-label":"用户名"},ZC={"data-label":"角色"},ex={key:0,class:"role-badge"},tx={key:1,class:"muted"},nx={class:"muted num","data-label":"创建时间"},sx={class:"muted num","data-label":"数据量"},ox={class:"td-ops"},rx={class:"ops"},ax=["onClick"],ix=["disabled","onClick"],lx={key:0},ux={key:1,class:"muted load-line"},cx={class:"dialog",role:"dialog","aria-label":"新增用户"},dx={class:"dialog-head"},fx={class:"dialog-body"},px={class:"form-row"},vx={class:"form-row"},mx={class:"form-row"},hx={key:0,class:"form-error"},yx={class:"dialog-btns"},gx=["disabled"],bx={class:"dialog",role:"dialog","aria-label":"重置密码"},wx={class:"dialog-head"},_x={class:"dialog-title"},kx={class:"dialog-body"},Cx={class:"form-row"},xx={key:0,class:"form-error"},$x={class:"dialog-btns"},Sx=["disabled"],Ex=jt({__name:"UserAdminView",setup(e){const t=O([]),n=O(""),o=O(!0),r=O("");async function l(j,T){const M=await Ns();let Z=$a();if(!Z){const Se=pn(),ge=await fetch(M+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ge.ok){const Pe=await ge.json();Z=String(Pe.token||""),Ho(Z)}}const Oe=await fetch(M+j,{method:T?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:T?JSON.stringify(T):void 0});if(Oe.status===401&&pn()){const Se=pn(),ge=await fetch(M+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ge.ok){const Pe=await ge.json();Z=String(Pe.token||""),Ho(Z);const qe=await fetch(M+j,{method:T?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:T?JSON.stringify(T):void 0});return{ok:qe.ok,status:qe.status,data:await qe.json().catch(()=>({}))}}}return{ok:Oe.ok,status:Oe.status,data:await Oe.json().catch(()=>({}))}}async function c(){o.value=!0,r.value="";const j=await l("/api/admin/users");if(!j.ok){o.value=!1,r.value=j.data&&j.data.error||"加载失败 "+j.status;return}t.value=j.data.users||[],n.value=j.data.me||"",o.value=!1}function f(j){return j<=0?"--":j<1024?j+" B":j<1024*1024?(j/1024).toFixed(1)+" KB":(j/1024/1024).toFixed(2)+" MB"}function m(j){return(j||"").slice(0,10)}const g=O(!1),h=O(""),_=O(""),P=O(""),x=O(""),I=O(!1);function H(){g.value=!0,x.value="",h.value="",_.value="",P.value=""}async function oe(){const j=h.value.trim();if(_.value!==P.value){x.value="两次输入的密码不一致";return}if(_.value.length<6){x.value="密码至少 6 位";return}I.value=!0;const T=await l("/api/admin/users/create",{username:j,password:_.value});if(I.value=!1,!T.ok){x.value=T.data&&T.data.error||"创建失败 "+T.status;return}Ne("用户「"+j+"」已创建"),g.value=!1,await c()}const le=O(null),ie=O(""),U=O(""),S=O(!1);function D(j){le.value=j,ie.value="",U.value=""}async function ee(){if(!le.value)return;if(ie.value.length<6){U.value="密码至少 6 位";return}S.value=!0;const j=await l("/api/admin/users/password",{userId:le.value.id,newPassword:ie.value});if(S.value=!1,!j.ok){U.value=j.data&&j.data.error||"重置失败 "+j.status;return}Ne("已重置「"+le.value.username+"」的登录密码"),le.value=null}const z=O(null);async function ne(){if(!z.value)return;const j=await l("/api/admin/users/delete",{userId:z.value.id});if(!j.ok){z.value=null,Ne(j.data&&j.data.error||"删除失败");return}Ne("已删除账号「"+z.value.username+"」及其全部云端数据"),z.value=null,await c()}return ln(c),(j,T)=>($(),A("div",WC,[i("div",GC,[i("div",YC,[T[12]||(T[12]=i("div",{class:"head-wrap"},[i("div",{class:"tb-title"},"用户管理"),i("div",{class:"muted tb-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),i("button",{class:"btn btn-primary btn-sm",onClick:H},[ye(He,{name:"plus",size:14}),T[11]||(T[11]=Ct(" 新增用户 ",-1))])]),r.value?($(),A("div",JC,F(r.value),1)):pe("",!0),i("table",XC,[T[14]||(T[14]=i("thead",null,[i("tr",null,[i("th",null,"用户名"),i("th",null,"角色"),i("th",null,"创建时间"),i("th",null,"数据量"),i("th",{class:"th-ops"},"操作")])],-1)),i("tbody",null,[($(!0),A(Me,null,st(t.value,M=>($(),A("tr",{key:M.id},[i("td",QC,F(M.username),1),i("td",ZC,[M.role==="admin"?($(),A("span",ex,"管理员")):($(),A("span",tx,"普通用户"))]),i("td",nx,F(m(M.created_at)),1),i("td",sx,F(f(M.data_bytes)),1),i("td",ox,[i("div",rx,[i("button",{class:"btn btn-xs",onClick:Z=>D(M)},"重置密码",8,ax),i("button",{class:"btn btn-xs btn-danger",disabled:M.id===n.value,onClick:Z=>z.value=M},"删除",8,ix)])])]))),128)),!o.value&&!t.value.length?($(),A("tr",lx,[...T[13]||(T[13]=[i("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):pe("",!0)])]),o.value?($(),A("div",ux,"加载中")):pe("",!0)]),T[20]||(T[20]=i("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),gt(kn,{to:"body"},[g.value?($(),A("div",{key:0,class:"mask",onClick:T[5]||(T[5]=Nt(M=>g.value=!1,["self"]))},[i("div",cx,[i("div",dx,[T[15]||(T[15]=i("span",{class:"dialog-title"},"新增用户",-1)),i("button",{class:"icon-btn",onClick:T[0]||(T[0]=M=>g.value=!1)},[ye(He,{name:"close",size:16})])]),i("div",fx,[i("div",px,[T[16]||(T[16]=i("label",null,"用户名(2 到 20 个字符)",-1)),Ae(i("input",{class:"input","onUpdate:modelValue":T[1]||(T[1]=M=>h.value=M),placeholder:"如:xiaowang"},null,512),[[De,h.value]])]),i("div",vx,[T[17]||(T[17]=i("label",null,"初始登录密码(至少 6 位)",-1)),Ae(i("input",{class:"input",type:"password","onUpdate:modelValue":T[2]||(T[2]=M=>_.value=M),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[De,_.value]])]),i("div",mx,[T[18]||(T[18]=i("label",null,"确认密码",-1)),Ae(i("input",{class:"input",type:"password","onUpdate:modelValue":T[3]||(T[3]=M=>P.value=M),onKeydown:Mt(oe,["enter"])},null,544),[[De,P.value]])]),x.value?($(),A("div",hx,F(x.value),1)):pe("",!0)]),i("div",yx,[i("button",{class:"btn btn-sm",onClick:T[4]||(T[4]=M=>g.value=!1)},"取消"),i("button",{class:"btn btn-primary btn-sm",disabled:I.value||!h.value.trim(),onClick:oe},F(I.value?"创建中":"创建"),9,gx)])])])):pe("",!0)])),($(),gt(kn,{to:"body"},[le.value?($(),A("div",{key:0,class:"mask",onClick:T[9]||(T[9]=Nt(M=>le.value=null,["self"]))},[i("div",bx,[i("div",wx,[i("span",_x,"重置「"+F(le.value.username)+"」的登录密码",1),i("button",{class:"icon-btn",onClick:T[6]||(T[6]=M=>le.value=null)},[ye(He,{name:"close",size:16})])]),i("div",kx,[i("div",Cx,[T[19]||(T[19]=i("label",null,"新登录密码(至少 6 位)",-1)),Ae(i("input",{class:"input",type:"password","onUpdate:modelValue":T[7]||(T[7]=M=>ie.value=M),onKeydown:Mt(ee,["enter"])},null,544),[[De,ie.value]])]),U.value?($(),A("div",xx,F(U.value),1)):pe("",!0)]),i("div",$x,[i("button",{class:"btn btn-sm",onClick:T[8]||(T[8]=M=>le.value=null)},"取消"),i("button",{class:"btn btn-primary btn-sm",disabled:S.value,onClick:ee},F(S.value?"提交中":"重置"),9,Sx)])])])):pe("",!0)])),ye(_n,{open:!!z.value,title:"删除用户确认",message:z.value?"将永久删除云端账号「"+z.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:T[10]||(T[10]=M=>z.value=null),onConfirm:ne},null,8,["open","message"])]))}}),Tx=Rt(Ex,[["__scopeId","data-v-2d48d2c9"]]),Ax={class:"login-page"},Px={class:"card login-card"},Ox={class:"login-brand"},Mx={class:"brand-icon"},Ix={class:"seg"},jx=["placeholder"],Dx={key:1,class:"form-error"},Lx=["disabled"],Kx=jt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,o=O("login"),r=O(""),l=O(""),c=O(""),f=O(""),m=O(!1);function g(_){o.value=_,f.value="",c.value=""}async function h(){if(!m.value){f.value="",m.value=!0;try{let _;if(o.value==="login")_=await Fm(r.value,l.value);else{if(l.value.length<6){f.value="登录密码至少 6 位",m.value=!1;return}if(l.value!==c.value){f.value="两次输入的密码不一致",m.value=!1;return}_=await Vm(r.value,l.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}m.value=!1}}return(_,P)=>($(),A("div",Ax,[i("div",Px,[i("div",Ox,[i("div",Mx,[ye(He,{name:"calendar",size:22})]),P[5]||(P[5]=i("div",{class:"login-title"},"实习工作日志",-1)),P[6]||(P[6]=i("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),P[7]||(P[7]=i("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),i("div",Ix,[i("button",{class:Ye(["seg-btn",{active:o.value==="login"}]),onClick:P[0]||(P[0]=x=>g("login"))},"登录",2),i("button",{class:Ye(["seg-btn",{active:o.value==="create"}]),onClick:P[1]||(P[1]=x=>g("create"))},"创建用户",2)]),Ae(i("input",{class:"input","onUpdate:modelValue":P[2]||(P[2]=x=>r.value=x),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(h,["enter"])},null,544),[[De,r.value]]),Ae(i("input",{type:"password",class:"input","onUpdate:modelValue":P[3]||(P[3]=x=>l.value=x),placeholder:o.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(h,["enter"])},null,40,jx),[[De,l.value]]),o.value==="create"?Ae(($(),A("input",{key:0,type:"password",class:"input","onUpdate:modelValue":P[4]||(P[4]=x=>c.value=x),placeholder:"再次输入密码",onKeydown:Mt(h,["enter"])},null,544)),[[De,c.value]]):pe("",!0),f.value?($(),A("div",Dx,F(f.value),1)):pe("",!0),i("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:h},F(o.value==="login"?"登录":"创建并进入"),9,Lx),P[8]||(P[8]=i("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Rx=Rt(Kx,[["__scopeId","data-v-e9c1c40d"]]),Nx={key:1,class:"app"},Fx={class:"side"},Vx={class:"brand-mark"},Bx={class:"side-nav"},Ux={key:0,class:"nav-group"},qx=["data-tip","onClick"],Hx={class:"nav-label"},zx={class:"side-foot"},Wx={class:"avatar"},Gx={class:"foot-name"},Yx={class:"main"},Jx={class:"topbar"},Xx={class:"title"},Qx={class:"gsearch"},Zx={key:0,class:"gs-panel"},e$={key:0,class:"gs-group muted"},t$=["onMousedown"],n$={class:"tag"},s$={class:"gs-text"},o$={class:"muted num gs-date"},r$={key:1,class:"gs-group muted"},a$=["onMousedown"],i$={class:"gs-text"},l$={class:"muted gs-sub"},u$={key:1,class:"gs-empty muted"},c$={class:"content"},d$={class:"content-inner"},f$={class:"tabbar"},p$=["onClick"],v$={class:"sheet-user num"},m$=["onClick"],h$={class:"sheet-name"},y$={class:"msw"},g$={class:"msw-bar"},b$={class:"msw-results"},w$={key:0,class:"gs-group muted"},_$=["onMousedown"],k$={class:"tag"},C$={class:"gs-text"},x$={class:"muted num gs-date"},$$={key:1,class:"gs-group muted"},S$=["onMousedown"],E$={class:"gs-text"},T$={class:"muted gs-sub"},A$={key:1,class:"gs-empty muted"},P$={class:"toast-wrap"},O$=jt({__name:"App",setup(e){const t=Ay(),n=O(zo());async function o(re){n.value=re,ra(re.userId),location.hash="#/calendar",D.value="calendar",await ze(),c();try{await Td(),await no()}catch{}Ne("欢迎,"+re.username);const J=sessionStorage.getItem("dsh_migrate_toast");J&&(sessionStorage.removeItem("dsh_migrate_toast"),Ne("已迁移原有数据 "+J+" 条"))}async function r(){Pe.value=!1,Se.value=!1,sh(),l!==null&&(window.clearInterval(l),l=null),await Um(),n.value=null,D.value="calendar",location.hash="#/calendar",Ne("已退出登录")}let l=null;function c(){nh(),l!==null&&window.clearInterval(l),l=window.setInterval(()=>{no()},60*1e3),no()}const f=O(null),m=O(""),g=O(!1),h=O({logs:[],memos:[]});let _=null;const P=rt(()=>!!(h.value.logs.length||h.value.memos.length));function x(){_&&window.clearTimeout(_);const re=m.value;_=window.setTimeout(async()=>{const J=re.trim();if(!J){h.value={logs:[],memos:[]};return}const $e=await Promise.all([zh(J,8),Wh(J,4)]);h.value={logs:$e[0],memos:$e[1]}},200)}function I(){m.value="",h.value={logs:[],memos:[]},g.value=!1}function H(re){Fi.value=re.date,ee("calendar"),I()}function oe(re){Vi.value=re.id,ee("memo"),I()}function le(){window.setTimeout(()=>{g.value=!1},150)}function ie(re){var J;(re.ctrlKey||re.metaKey)&&re.key.toLowerCase()==="k"&&(re.preventDefault(),(J=f.value)==null||J.focus())}const U=[{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 S(){var J;const re=(location.hash||"").replace("#/","");return!U.some($e=>$e.key===re)||re==="admin"&&(((J=zo())==null?void 0:J.username)||"")!=="xionglin"?"calendar":re}const D=O(S());window.addEventListener("hashchange",()=>{D.value=S()});function ee(re){location.hash="#/"+re}const z=rt(()=>U.find(re=>re.key===D.value)||U[0]),ne=rt(()=>{var re;return(((re=n.value)==null?void 0:re.username)||"")==="xionglin"}),j=rt(()=>ne.value?U:U.filter(re=>re.key!=="admin")),T=rt(()=>{const re=U.filter(J=>!Z.includes(J.key));return ne.value?re:re.filter(J=>J.key!=="admin")}),M=rt(()=>T.value.some(re=>re.key===D.value));ft([ne,D],()=>{D.value==="admin"&&!ne.value&&ee("calendar")},{immediate:!0});const Z=["calendar","today","plan","ledger"],Oe=U.filter(re=>Z.includes(re.key)),Se=O(!1);function ge(re){Se.value=!1,ee(re)}const Pe=O(!1),qe=O(null);function Fe(){Pe.value=!0,window.setTimeout(()=>{var re;return(re=qe.value)==null?void 0:re.focus()},60)}function Je(re){H(re),Pe.value=!1}function Ge(re){oe(re),Pe.value=!1}async function ze(){try{if((await ps()).remind_weekly==="off")return;const J=new Date().getDay();if(J!==5&&J!==6&&J!==0)return;const $e=await bl(Zs(it()));if($e&&($e.highlights||$e.challenges||$e.plan_next))return;Ne("本周周记还没写,可在「总结」页填写")}catch{}}return ln(async()=>{window.addEventListener("keydown",ie),n.value&&(ra(n.value.userId),await ze(),c())}),(re,J)=>{var $e,ot,wt;return n.value?($(),A("div",Nx,[i("nav",Fx,[i("div",{class:"brand",onClick:J[0]||(J[0]=Ee=>ee("calendar"))},[i("span",Vx,[ye(He,{name:"calendar",size:15})]),J[11]||(J[11]=i("span",{class:"brand-name"},"实习工作日志",-1))]),i("div",Bx,[($(!0),A(Me,null,st(j.value,(Ee,xt)=>($(),A(Me,{key:Ee.key},[xt===0||Ee.group!==j.value[xt-1].group?($(),A("div",Ux,F(Ee.group),1)):pe("",!0),i("button",{class:Ye(["nav-btn",{active:D.value===Ee.key}]),"data-tip":Ee.name,onClick:St=>ee(Ee.key)},[ye(He,{name:Ee.icon,size:17},null,8,["name"]),i("span",Hx,F(Ee.name),1)],10,qx)],64))),128))]),i("div",zx,[i("span",Wx,F(((($e=n.value)==null?void 0:$e.username)||"用户").slice(0,1).toUpperCase()),1),i("span",Gx,F((ot=n.value)==null?void 0:ot.username),1),i("button",{class:"icon-btn",title:"退出登录",onClick:r},[ye(He,{name:"export",size:15})])])]),i("div",Yx,[i("header",Jx,[i("span",Xx,F(z.value.name),1),i("button",{class:"mob-search-btn",title:"搜索",onClick:Fe},[ye(He,{name:"search",size:16})]),i("div",Qx,[ye(He,{name:"search",size:14,class:"gs-icon"}),Ae(i("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":J[1]||(J[1]=Ee=>m.value=Ee),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:x,onFocus:J[2]||(J[2]=Ee=>g.value=!0),onBlur:le,onKeydown:Mt(I,["esc"])},null,544),[[De,m.value]]),g.value&&m.value.trim()?($(),A("div",Zx,[P.value?($(),A(Me,{key:0},[h.value.logs.length?($(),A("div",e$,"工作记录")):pe("",!0),($(!0),A(Me,null,st(h.value.logs,Ee=>($(),A("div",{key:"l"+Ee.id,class:"gs-item",onMousedown:Nt(xt=>H(Ee),["prevent"])},[i("span",n$,F(Ht(Uo)(Ee.category)),1),i("span",s$,F(Ee.content),1),i("span",o$,F(Ee.date),1)],40,t$))),128)),h.value.memos.length?($(),A("div",r$,"备忘录")):pe("",!0),($(!0),A(Me,null,st(h.value.memos,Ee=>($(),A("div",{key:"m"+Ee.id,class:"gs-item",onMousedown:Nt(xt=>oe(Ee),["prevent"])},[i("span",i$,F(Ee.title||"无标题"),1),i("span",l$,F(Ee.content),1)],40,a$))),128))],64)):($(),A("div",u$,"无匹配结果"))])):pe("",!0)])]),i("main",c$,[i("div",d$,[D.value==="calendar"?($(),gt(Vg,{key:0})):D.value==="today"?($(),gt(db,{key:1})):D.value==="plan"?($(),gt(gw,{key:2})):D.value==="stats"?($(),gt(Yw,{key:3})):D.value==="report"?($(),gt(j_,{key:4})):D.value==="ledger"?($(),gt(c0,{key:5})):D.value==="memo"?($(),gt(T0,{key:6})):D.value==="vault"?($(),gt(xk,{key:7})):D.value==="admin"?($(),gt(Tx,{key:8})):($(),gt(FC,{key:9}))])]),i("nav",f$,[($(!0),A(Me,null,st(Ht(Oe),Ee=>($(),A("button",{key:Ee.key,class:Ye(["tab-btn",{active:D.value===Ee.key}]),onClick:xt=>ee(Ee.key)},[ye(He,{name:Ee.icon,size:20},null,8,["name"]),i("span",null,F(Ee.name),1)],10,p$))),128)),i("button",{class:Ye(["tab-btn",{active:M.value}]),onClick:J[3]||(J[3]=Ee=>Se.value=!0)},[ye(He,{name:"more",size:20}),J[12]||(J[12]=i("span",null,"更多",-1))],2)]),Se.value?($(),A("div",{key:0,class:"sheet-mask",onClick:J[6]||(J[6]=Ee=>Se.value=!1)},[i("div",{class:"more-sheet",onClick:J[5]||(J[5]=Nt(()=>{},["stop"]))},[J[14]||(J[14]=i("div",{class:"sheet-handle"},null,-1)),i("div",v$,F((wt=n.value)==null?void 0:wt.username),1),($(!0),A(Me,null,st(T.value,Ee=>($(),A("button",{key:Ee.key,class:"sheet-row",onClick:xt=>ge(Ee.key)},[ye(He,{name:Ee.icon,size:18},null,8,["name"]),i("span",h$,F(Ee.name),1),ye(He,{name:"chevron-right",size:14,class:"sheet-go"})],8,m$))),128)),J[15]||(J[15]=i("div",{class:"sheet-divider"},null,-1)),i("button",{class:"sheet-row sheet-danger",onClick:J[4]||(J[4]=Ee=>{Se.value=!1,r()})},[ye(He,{name:"close",size:18}),J[13]||(J[13]=i("span",{class:"sheet-name"},"退出登录",-1))])])])):pe("",!0),Pe.value?($(),A("div",{key:1,class:"msw-mask",onClick:J[10]||(J[10]=Nt(Ee=>Pe.value=!1,["self"]))},[i("div",y$,[i("div",g$,[ye(He,{name:"search",size:16,class:"msw-icon"}),Ae(i("input",{ref_key:"msInput",ref:qe,class:"msw-input","onUpdate:modelValue":J[7]||(J[7]=Ee=>m.value=Ee),placeholder:"搜索工作记录与备忘录",onInput:x,onKeydown:J[8]||(J[8]=Mt(Ee=>Pe.value=!1,["esc"]))},null,544),[[De,m.value]]),i("button",{class:"icon-btn",onClick:J[9]||(J[9]=Ee=>{I(),Pe.value=!1})},[ye(He,{name:"close",size:16})])]),i("div",b$,[P.value?($(),A(Me,{key:0},[h.value.logs.length?($(),A("div",w$,"工作记录")):pe("",!0),($(!0),A(Me,null,st(h.value.logs,Ee=>($(),A("div",{key:"l"+Ee.id,class:"msw-item",onMousedown:Nt(xt=>Je(Ee),["prevent"])},[i("span",k$,F(Ht(Uo)(Ee.category)),1),i("span",C$,F(Ee.content),1),i("span",x$,F(Ee.date),1)],40,_$))),128)),h.value.memos.length?($(),A("div",$$,"备忘录")):pe("",!0),($(!0),A(Me,null,st(h.value.memos,Ee=>($(),A("div",{key:"m"+Ee.id,class:"msw-item",onMousedown:Nt(xt=>Ge(Ee),["prevent"])},[i("span",E$,F(Ee.title||"无标题"),1),i("span",T$,F(Ee.content),1)],40,S$))),128))],64)):m.value.trim()?($(),A("div",A$,"无匹配结果")):pe("",!0)])])])):pe("",!0)]),n.value?($(),gt(zC,{key:0})):pe("",!0),i("div",P$,[ye(Rv,{name:"toast"},{default:Cn(()=>[($(!0),A(Me,null,st(Ht(t),Ee=>($(),A("div",{key:Ee.id,class:"toast"},F(Ee.text),1))),128))]),_:1})])])):($(),gt(Rx,{key:0,onLogin:o}))}}}),M$=Rt(O$,[["__scopeId","data-v-ab53c58b"]]);function Vr(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",l=>{l.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const o=document.createElement("div");o.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",o.textContent=e+` +`+t;const r=document.createElement("button");r.textContent="重新加载",r.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;",r.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(o),n.appendChild(r)}catch{}}async function I$(){const e=await Bm();e&&ra(e.userId);const t=Zv(M$);t.config.errorHandler=(n,o,r)=>{const l=n;Vr("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",l&&(l.stack||l.message)||String(n)+` +触发位置: `+r)},window.addEventListener("unhandledrejection",n=>{const o=n.reason;Vr("未处理的异步错误(点击空白处关闭)",o&&(o.stack||o.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Vr("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}I$().catch(e=>{Vr("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Ud as W,Fd as _,Zg as b,Bd as r}; diff --git a/intern-log/dist/assets/web-9h8A4HQx.js b/intern-log/dist/assets/web-Deo5OtIz.js similarity index 98% rename from intern-log/dist/assets/web-9h8A4HQx.js rename to intern-log/dist/assets/web-Deo5OtIz.js index 5e47d7f..1687203 100644 --- a/intern-log/dist/assets/web-9h8A4HQx.js +++ b/intern-log/dist/assets/web-Deo5OtIz.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-pe6VFzmc.js";import{Encoding as E}from"./index-D9aBzCwh.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-ynPmf8i8.js";import{Encoding as E}from"./index-BGMpfaMy.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 7f99d81..d6eb3fb 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 114bfd6..3af8964 100644 --- a/intern-log/package.json +++ b/intern-log/package.json @@ -1,7 +1,7 @@ { "name": "intern-log", "private": true, - "version": "0.7.1", + "version": "0.7.2", "type": "module", "scripts": { "dev": "vite", diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue index e90313e..c2f91ea 100644 --- a/intern-log/src/App.vue +++ b/intern-log/src/App.vue @@ -15,11 +15,11 @@ import UserAdminView from './views/UserAdminView.vue' import LoginView from './views/LoginView.vue' import { getSession, logoutUser, openUserDatabase, type Session } from './db/auth' import { autoSyncNow, enableRealtimeSync, ensureCloudBinding, stopRealtime } from './sync/engine' -import { clockIn, getAttendance, getWorkRule, getWeeklyNote, searchLogItems, searchMemos, smartClockOut, type WorkRule } from './db/repo' -import { addDays, hhmm, todayStr, weekStart } from './lib/date' +import { getWorkRule, getWeeklyNote, searchLogItems, searchMemos } from './db/repo' +import { todayStr, weekStart } from './lib/date' import { showToast, useToasts } from './lib/toast' -import { attendanceChanged, focusDate, focusMemo, notifyAttendanceChanged } from './lib/bus' -import { categoryLabel, type Attendance, type LogItem, type Memo } from './db/schema' +import { focusDate, focusMemo } from './lib/bus' +import { categoryLabel, type LogItem, type Memo } from './db/schema' const toasts = useToasts() @@ -30,8 +30,7 @@ async function onLogin(s: Session) { openUserDatabase(s.userId) location.hash = '#/calendar' route.value = 'calendar' - await refreshClock() - await refreshTip() + await checkWeeklyReminder() startSyncTimer() try { await ensureCloudBinding() @@ -161,72 +160,24 @@ function pickLog(item: LogItem & { date: string }) { openLog(item); mobileSearch function pickMemo(m: Memo) { openMemo(m); mobileSearch.value = false } -// ---- 工具栏打卡 ---- -const today = ref(todayStr()) -const att = ref(undefined) -const yesterdayPending = ref(false) - -async function refreshClock() { - att.value = await getAttendance(today.value) - yesterdayPending.value = false - const now = new Date() - if (now.getHours() < 4) { - const yRec = await getAttendance(addDays(today.value, -1)) - yesterdayPending.value = !!(yRec && yRec.clock_in_at && !yRec.clock_out_at) - } -} - -const hasActiveSession = computed(() => { - const a = att.value - if (a && a.clock_in_at && !a.clock_out_at) return true - return yesterdayPending.value && !(a && a.clock_in_at) -}) -const clockDone = computed(() => { - const a = att.value - return !!(a && a.clock_in_at && a.clock_out_at) -}) -const clockLabel = computed(() => { - const a = att.value - if (hasActiveSession.value) return '下班打卡' - if (clockDone.value) return '已打卡 ' + hhmm(a?.clock_in_at) + ' - ' + hhmm(a?.clock_out_at) - return '上班打卡' -}) - -async function doClock() { - if (hasActiveSession.value) { - try { await smartClockOut() } catch { /* 没有进行中的打卡 */ } - } else { - await clockIn(today.value) - } - await refreshClock() - notifyAttendanceChanged() -} - -// 任何视图发生的考勤变更(含今日面板、日历抽屉)都实时同步到顶栏 -watch(attendanceChanged, () => { - if (session.value) refreshClock() -}) - -// ---- 周记提醒 ---- -const weekTip = ref(false) -async function refreshTip() { - const rule: WorkRule = await getWorkRule() - if (rule.remind_weekly === 'off') { weekTip.value = false; return } - const wd = new Date().getDay() - if (wd === 5 || wd === 6 || wd === 0) { - const note = await getWeeklyNote(weekStart(today.value)) - weekTip.value = !note || (!note.highlights && !note.challenges && !note.plan_next) - } else { - weekTip.value = false - } +// ---- 周记提醒:周五至周日打开应用时 toast 提示一次,不占用常驻界面 ---- +async function checkWeeklyReminder() { + try { + const rule = await getWorkRule() + if (rule.remind_weekly === 'off') return + const wd = new Date().getDay() + if (wd !== 5 && wd !== 6 && wd !== 0) return + const note = await getWeeklyNote(weekStart(todayStr())) + if (note && (note.highlights || note.challenges || note.plan_next)) return + showToast('本周周记还没写,可在「总结」页填写') + } catch { /* 提醒检查失败不影响使用 */ } } onMounted(async () => { window.addEventListener('keydown', onGlobalKey) if (session.value) { openUserDatabase(session.value.userId) - await refreshClock() - await refreshTip() + await checkWeeklyReminder() startSyncTimer() } }) @@ -287,17 +238,7 @@ onMounted(async () => {
无匹配结果
- -
- - -
+
@@ -507,8 +448,6 @@ onMounted(async () => { } .title { font-size: 15px; font-weight: 600; white-space: nowrap; } -.topbar-actions { display: flex; align-items: center; gap: 8px; } - .gsearch { position: relative; width: 320px; max-width: 38vw; } .gs-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); } .gs-input { @@ -554,21 +493,6 @@ onMounted(async () => { .gs-date { font-size: 12px; flex: none; } .gs-empty { padding: 10px; font-size: 12px; text-align: center; } -.week-tip { - display: inline-flex; - align-items: center; - gap: 6px; - border: 1px solid var(--warn); - color: var(--warn); - background: var(--bg-page); - border-radius: 999px; - height: 28px; - padding: 0 10px; - font-size: 12px; - cursor: pointer; - white-space: nowrap; -} -.week-tip:hover { background: #FDF4EC; } .content { flex: 1; overflow: auto; } .content-inner { max-width: 1280px; margin: 0 auto; padding: 20px 24px 48px; } @@ -752,10 +676,7 @@ onMounted(async () => { .gsearch { display: none; } .gsearch .gs-panel { display: none; } .mob-search-btn { display: flex; } - .topbar-actions { margin-left: auto; gap: 6px; } - .week-tip { height: 28px; max-width: 118px; padding: 0 8px; white-space: nowrap; overflow: hidden; } - .topbar-actions .btn { padding: 0 12px; height: 34px; } - .topbar-actions .btn .num { font-size: 12px; } + .mob-search-btn { margin-left: auto; } .tabbar { display: flex; } .tab-btn { height: 56px; font-size: 11px; }