diff --git a/docs/release-notes-v0.7.0.md b/docs/release-notes-v0.7.0.md new file mode 100644 index 0000000..2caf08e --- /dev/null +++ b/docs/release-notes-v0.7.0.md @@ -0,0 +1,12 @@ +# v0.7.0 发布说明(2026-10-26) + +## 记账:分类筛选 + +- 工具栏新增「分类」下拉:选项为本月**实际出现的分类**(自动去重排序),支持「全部分类」 +- 与类型筛选(支出/收入)、报销筛选可叠加使用;底部「当前筛选 N 条」实时联动 +- 切换月份自动重置分类筛选,避免跨月无效选项 + +## 部署 + +- 服务器:`cd /opt/daywork && git pull && cd server && docker compose up -d --build`(网页端即生效) +- 桌面 / 安卓:安装 0.7.0 安装包 diff --git a/intern-log/dist/assets/index-oGn7bwPd.js b/intern-log/dist/assets/index-CrEWT5E8.js similarity index 69% rename from intern-log/dist/assets/index-oGn7bwPd.js rename to intern-log/dist/assets/index-CrEWT5E8.js index e0a15da..f2a996e 100644 --- a/intern-log/dist/assets/index-oGn7bwPd.js +++ b/intern-log/dist/assets/index-CrEWT5E8.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-OZOB5r8S.js","./index-BkEETrCl.js","./index-CJ5TTgSd.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-BkEETrCl.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-OZOB5r8S.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-Cn9aGqjN.js","./index-vpp14W9X.js","./index-D9ZLjO2x.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-vpp14W9X.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-Cn9aGqjN.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-CJ5TTgSd.css b/intern-log/dist/assets/index-D9ZLjO2x.css similarity index 96% rename from intern-log/dist/assets/index-CJ5TTgSd.css rename to intern-log/dist/assets/index-D9ZLjO2x.css index 584008f..7f86975 100644 --- a/intern-log/dist/assets/index-CJ5TTgSd.css +++ b/intern-log/dist/assets/index-D9ZLjO2x.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}}.ledger-toolbar[data-v-c38f4109]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-c38f4109]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-c38f4109]{width:110px;flex:none}.cards[data-v-c38f4109]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-c38f4109]{border-left:3px solid var(--border)}.stat-income[data-v-c38f4109]{border-left-color:var(--ok)}.stat-expense[data-v-c38f4109]{border-left-color:var(--text-3)}.stat-balance[data-v-c38f4109]{border-left-color:var(--accent)}.stat-pending[data-v-c38f4109]{border-left-color:var(--warn)}.card.sec[data-v-c38f4109],.card.section[data-v-c38f4109]{margin-top:12px}.bar-label[data-v-c38f4109]{width:56px}.bar-num[data-v-c38f4109]{width:118px}.td-note[data-v-c38f4109]{color:var(--text-2)}.tx-pending[data-v-c38f4109]{color:var(--warn);font-size:12px}.tx-done[data-v-c38f4109]{color:var(--ok);font-size:12px}.th-ops[data-v-c38f4109]{width:220px}.ops[data-v-c38f4109]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-c38f4109]{overflow-x:auto}.table-note[data-v-c38f4109]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.ledger-toolbar[data-v-c38f4109]{gap:8px}.ledger-toolbar .flex1[data-v-c38f4109]{display:none}.month-title[data-v-c38f4109]{min-width:0;flex:1;text-align:left}.w-filter[data-v-c38f4109]{flex:1 1 calc(50% - 4px);min-width:0;width:auto}.ledger-toolbar .btn-primary[data-v-c38f4109]{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}}.ledger-toolbar[data-v-d74b18a8]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-d74b18a8]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-d74b18a8]{width:110px;flex:none}.cards[data-v-d74b18a8]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-d74b18a8]{border-left:3px solid var(--border)}.stat-income[data-v-d74b18a8]{border-left-color:var(--ok)}.stat-expense[data-v-d74b18a8]{border-left-color:var(--text-3)}.stat-balance[data-v-d74b18a8]{border-left-color:var(--accent)}.stat-pending[data-v-d74b18a8]{border-left-color:var(--warn)}.card.sec[data-v-d74b18a8],.card.section[data-v-d74b18a8]{margin-top:12px}.bar-label[data-v-d74b18a8]{width:56px}.bar-num[data-v-d74b18a8]{width:118px}.td-note[data-v-d74b18a8]{color:var(--text-2)}.tx-pending[data-v-d74b18a8]{color:var(--warn);font-size:12px}.tx-done[data-v-d74b18a8]{color:var(--ok);font-size:12px}.th-ops[data-v-d74b18a8]{width:220px}.ops[data-v-d74b18a8]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-d74b18a8]{overflow-x:auto}.table-note[data-v-d74b18a8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.ledger-toolbar[data-v-d74b18a8]{gap:8px}.ledger-toolbar .flex1[data-v-d74b18a8]{display:none}.month-title[data-v-d74b18a8]{min-width:0;flex:1;text-align:left}.w-filter[data-v-d74b18a8]{flex:1 1 calc(50% - 4px);min-width:0;width:auto}.ledger-toolbar .btn-primary[data-v-d74b18a8]{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}} diff --git a/intern-log/dist/assets/index-BkEETrCl.js b/intern-log/dist/assets/index-vpp14W9X.js similarity index 55% rename from intern-log/dist/assets/index-BkEETrCl.js rename to intern-log/dist/assets/index-vpp14W9X.js index 5962a9c..9a89ef2 100644 --- a/intern-log/dist/assets/index-BkEETrCl.js +++ b/intern-log/dist/assets/index-vpp14W9X.js @@ -2,26 +2,26 @@ * @vue/shared v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Gi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const yt={},Ms=[],Mn=()=>{},qu=()=>!1,ua=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ca=e=>e.startsWith("onUpdate:"),Mt=Object.assign,Yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},lf=Object.prototype.hasOwnProperty,pt=(e,t)=>lf.call(e,t),Ge=Array.isArray,is=e=>Go(e)==="[object Map]",Ls=e=>Go(e)==="[object Set]",Xl=e=>Go(e)==="[object Date]",et=e=>typeof e=="function",Et=e=>typeof e=="string",In=e=>typeof e=="symbol",vt=e=>e!==null&&typeof e=="object",Hu=e=>(vt(e)||et(e))&&et(e.then)&&et(e.catch),zu=Object.prototype.toString,Go=e=>zu.call(e),uf=e=>Go(e).slice(8,-1),Wu=e=>Go(e)==="[object Object]",Ji=e=>Et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Eo=Gi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),da=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cf=/-\w/g,gn=da(e=>e.replace(cf,t=>t.slice(1).toUpperCase())),df=/\B([A-Z])/g,ms=da(e=>e.replace(df,"-$1").toLowerCase()),Gu=da(e=>e.charAt(0).toUpperCase()+e.slice(1)),oi=da(e=>e?`on${Gu(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})},fa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ff=e=>{const t=Et(e)?Number(e):NaN;return isNaN(t)?e:t};let Ql;const pa=()=>Ql||(Ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zn(e){if(Ge(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(pf).forEach(n=>{if(n){const o=n.split(vf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Xe(e){let t="";if(Et(e))t=e;else if(Ge(e))for(let n=0;nus(n,t))}const Xu=e=>!!(e&&e.__v_isRef===!0),q=e=>Et(e)?e:e==null?"":Ge(e)||vt(e)&&(e.toString===zu||!et(e.toString))?Xu(e)?q(e.value):JSON.stringify(e,Qu,2):String(e),Qu=(e,t)=>Xu(t)?Qu(e,t.value):is(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[ri(o,i)+" =>"]=r,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ri(n))}:In(t)?ri(t):vt(t)&&!Ge(t)&&!Wu(t)?String(t):t,ri=(e,t="")=>{var n;return In(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function Gi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const yt={},Ms=[],Mn=()=>{},qu=()=>!1,ua=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ca=e=>e.startsWith("onUpdate:"),Mt=Object.assign,Yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},lf=Object.prototype.hasOwnProperty,pt=(e,t)=>lf.call(e,t),We=Array.isArray,ls=e=>Go(e)==="[object Map]",Ls=e=>Go(e)==="[object Set]",Xl=e=>Go(e)==="[object Date]",et=e=>typeof e=="function",Et=e=>typeof e=="string",In=e=>typeof e=="symbol",mt=e=>e!==null&&typeof e=="object",Hu=e=>(mt(e)||et(e))&&et(e.then)&&et(e.catch),zu=Object.prototype.toString,Go=e=>zu.call(e),uf=e=>Go(e).slice(8,-1),Wu=e=>Go(e)==="[object Object]",Ji=e=>Et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Eo=Gi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),da=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cf=/-\w/g,gn=da(e=>e.replace(cf,t=>t.slice(1).toUpperCase())),df=/\B([A-Z])/g,ms=da(e=>e.replace(df,"-$1").toLowerCase()),Gu=da(e=>e.charAt(0).toUpperCase()+e.slice(1)),oi=da(e=>e?`on${Gu(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})},fa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ff=e=>{const t=Et(e)?Number(e):NaN;return isNaN(t)?e:t};let Ql;const pa=()=>Ql||(Ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zn(e){if(We(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(pf).forEach(n=>{if(n){const o=n.split(vf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Je(e){let t="";if(Et(e))t=e;else if(We(e))for(let n=0;ncs(n,t))}const Xu=e=>!!(e&&e.__v_isRef===!0),q=e=>Et(e)?e:e==null?"":We(e)||mt(e)&&(e.toString===zu||!et(e.toString))?Xu(e)?q(e.value):JSON.stringify(e,Qu,2):String(e),Qu=(e,t)=>Xu(t)?Qu(e,t.value):ls(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[ri(o,i)+" =>"]=r,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ri(n))}:In(t)?ri(t):mt(t)&&!We(t)&&!Wu(t)?String(t):t,ri=(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 Bt;class kf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bt&&(Bt.active?(this.parent=Bt,this.index=(Bt.scopes||(Bt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(Bt===this)Bt=this.prevScope;else{let t=Bt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,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 nc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),Zi(o),xf(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function oc(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||!wi(e))))return;e.flags|=2;const t=e.dep,n=_t,o=bn;_t=e,bn=!0;try{nc(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{_t=n,bn=o,sc(e),e.flags&=-3}}function Zi(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 i=n.computed.deps;i;i=i.nextDep)Zi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let bn=!0;const rc=[];function jn(){rc.push(bn),bn=!1}function Dn(){const e=rc.pop();bn=e===void 0?!0:e}function tu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_t;_t=void 0;try{t()}finally{_t=n}}}let Do=0;class $f{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 el{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(!_t||!bn||_t===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_t)n=this.activeLink=new $f(_t,this),_t.deps?(n.prevDep=_t.depsTail,_t.depsTail.nextDep=n,_t.depsTail=n):_t.deps=_t.depsTail=n,ac(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=_t.depsTail,n.nextDep=void 0,_t.depsTail.nextDep=n,_t.depsTail=n,_t.deps===n&&(_t.deps=o)}return n}trigger(t){this.version++,Do++,this.notify(t)}notify(t){Xi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qi()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)ac(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _i=new WeakMap,js=Symbol(""),ki=Symbol(""),Lo=Symbol("");function Gt(e,t,n){if(bn&&_t){let o=_i.get(e);o||_i.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new el),r.map=o,r.key=n),r.track()}}function qn(e,t,n,o,r,i){const c=_i.get(e);if(!c){Do++;return}const f=v=>{v&&v.trigger()};if(Xi(),t==="clear")c.forEach(f);else{const v=Ge(e),b=v&&Ji(n);if(v&&n==="length"){const h=Number(o);c.forEach((_,T)=>{(T==="length"||T===Lo||!In(T)&&T>=h)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Lo)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),is(e)&&f(c.get(ki)));break;case"delete":v||(f(c.get(js)),is(e)&&f(c.get(ki)));break;case"set":is(e)&&f(c.get(js));break}}Qi()}function Ys(e){const t=dt(e);return t===e||(Gt(t,"iterate",Lo),fn(e))?t:Ln(e)?ls(e)?t.map(n=>cs(vn(n))):t.map(cs):t.map(vn)}function va(e){return Gt(e=dt(e),"iterate",Lo),e}function Tn(e,t){return Ln(e)?cs(ls(e)?vn(t):t):vn(t)}const Sf={__proto__:null,[Symbol.iterator](){return ii(this,Symbol.iterator,e=>Tn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>Ge(t)?Ys(t):t))},entries(){return ii(this,"entries",e=>(e[1]=Tn(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=>Tn(this,o)),arguments)},find(e,t){return Vn(this,"find",e,t,n=>Tn(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=>Tn(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 li(this,"includes",e)},indexOf(...e){return li(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return li(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 su(this,"reduce",e,t)},reduceRight(e,...t){return su(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 ii(this,"values",e=>Tn(this,e))}};function ii(e,t,n){const o=va(e),r=o[t],i=r.call(o);if(o!==e&&!fn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>nu(i.next(),n),r!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>nu(i._next(),n)}return i}function nu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Vn(e,t,n,o,r,i){const c=va(e),f=c!==e&&!fn(e),v=c[t];if(v!==ic[t]){const _=v.apply(e,i);return f?vn(_):_}let b=n;c!==e&&(f?b=function(_,T){return n.call(this,Tn(e,_),T,e)}:n.length>2&&(b=function(_,T){return n.call(this,_,T,e)}));const h=v.call(c,b,o);return f&&r?r(h):h}function su(e,t,n,o){const r=va(e),i=r!==e&&!fn(e);let c=n,f=!1;r!==e&&(i?(f=o.length===0,c=function(b,h,_){return f&&(f=!1,b=Tn(e,b)),n.call(this,b,Tn(e,h),_,e)}):n.length>3&&(c=function(b,h,_){return n.call(this,b,h,_,e)}));const v=r[t](c,...o);return f?Tn(e,v):v}function li(e,t,n){const o=dt(e);Gt(o,"iterate",Lo);const r=o[t](...n);return(r===-1||r===!1)&&ol(n[0])?(n[0]=dt(n[0]),o[t](...n)):r}function _o(e,t,n=[]){jn(),Xi();const o=dt(e)[t].apply(e,n);return Qi(),Dn(),o}const Ef=Gi("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(In));function Tf(e){In(e)||(e=String(e));const t=dt(this);return Gt(t,"has",e),t.hasOwnProperty(e)}class uc{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,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?Rf:pc:i?fc:dc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const c=Ge(t);if(!r){let v;if(c&&(v=Sf[n]))return v;if(n==="hasOwnProperty")return Tf}const f=Reflect.get(t,n,Jt(t)?t:o);if((In(n)?lc.has(n):Ef(n))||(r||Gt(t,"get",n),i))return f;if(Jt(f)){const v=c&&Ji(n)?f:f.value;return r&&vt(v)?xi(v):v}return vt(f)?r?xi(f):nl(f):f}}class cc extends uc{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];const c=Ge(t)&&Ji(n);if(!this._isShallow){const b=Ln(i);if(!fn(o)&&!Ln(o)&&(i=dt(i),o=dt(o)),!c&&Jt(i)&&!Jt(o))return b||(i.value=o),!0}const f=c?Number(n)e,$r=e=>Reflect.getPrototypeOf(e);function If(e,t,n){return function(...o){const r=this.__v_raw,i=dt(r),c=is(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=r[e](...o),h=n?Ci:t?cs:vn;return!t&&Gt(i,"iterate",v?ki:js),Mt(Object.create(b),{next(){const{value:_,done:T}=b.next();return T?{value:_,done:T}:{value:f?[h(_[0]),h(_[1])]:h(_),done:T}}})}}function Sr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function jf(e,t){const n={get(r){const i=this.__v_raw,c=dt(i),f=dt(r);e||(On(r,f)&&Gt(c,"get",r),Gt(c,"get",f));const{has:v}=$r(c),b=t?Ci:e?cs:vn;if(v.call(c,r))return b(i.get(r));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Gt(dt(r),"iterate",js),r.size},has(r){const i=this.__v_raw,c=dt(i),f=dt(r);return e||(On(r,f)&&Gt(c,"has",r),Gt(c,"has",f)),r===f?i.has(r):i.has(r)||i.has(f)},forEach(r,i){const c=this,f=c.__v_raw,v=dt(f),b=t?Ci:e?cs:vn;return!e&&Gt(v,"iterate",js),f.forEach((h,_)=>r.call(i,b(h),b(_),c))}};return Mt(n,e?{add:Sr("add"),set:Sr("set"),delete:Sr("delete"),clear:Sr("clear")}:{add(r){const i=dt(this),c=$r(i),f=dt(r),v=!t&&!fn(r)&&!Ln(r)?f:r;return c.has.call(i,v)||On(r,v)&&c.has.call(i,r)||On(f,v)&&c.has.call(i,f)||(i.add(v),qn(i,"add",v,v)),this},set(r,i){!t&&!fn(i)&&!Ln(i)&&(i=dt(i));const c=dt(this),{has:f,get:v}=$r(c);let b=f.call(c,r);b||(r=dt(r),b=f.call(c,r));const h=v.call(c,r);return c.set(r,i),b?On(i,h)&&qn(c,"set",r,i):qn(c,"add",r,i),this},delete(r){const i=dt(this),{has:c,get:f}=$r(i);let v=c.call(i,r);v||(r=dt(r),v=c.call(i,r)),f&&f.call(i,r);const b=i.delete(r);return v&&qn(i,"delete",r,void 0),b},clear(){const r=dt(this),i=r.size!==0,c=r.clear();return i&&qn(r,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=If(r,e,t)}),n}function tl(e,t){const n=jf(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?o:Reflect.get(pt(n,r)&&r in o?n:o,r,i)}const Df={get:tl(!1,!1)},Lf={get:tl(!1,!0)},Kf={get:tl(!0,!1)};const dc=new WeakMap,fc=new WeakMap,pc=new WeakMap,Rf=new WeakMap;function Nf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nl(e){return Ln(e)?e:sl(e,!1,Pf,Df,dc)}function Ff(e){return sl(e,!1,Mf,Lf,fc)}function xi(e){return sl(e,!0,Of,Kf,pc)}function sl(e,t,n,o,r){if(!vt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const c=Nf(uf(e));if(c===0)return e;const f=new Proxy(e,c===2?o:n);return r.set(e,f),f}function ls(e){return Ln(e)?ls(e.__v_raw):!!(e&&e.__v_isReactive)}function Ln(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ol(e){return e?!!e.__v_raw:!1}function dt(e){const t=e&&e.__v_raw;return t?dt(t):e}function Vf(e){return!pt(e,"__v_skip")&&Object.isExtensible(e)&&Yu(e,"__v_skip",!0),e}const vn=e=>vt(e)?nl(e):e,cs=e=>vt(e)?xi(e):e;function Jt(e){return e?e.__v_isRef===!0:!1}function A(e){return Bf(e,!1)}function Bf(e,t){return Jt(e)?e:new Uf(e,t)}class Uf{constructor(t,n){this.dep=new el,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 sn(e){return Jt(e)?e.value:e}const qf={get:(e,t,n)=>t==="__v_raw"?e:sn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Jt(r)&&!Jt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function vc(e){return ls(e)?e:new Proxy(e,qf)}class Hf{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new el(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)&&_t!==this)return tc(this,!0),!0}get value(){const t=this.dep.track();return oc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zf(e,t,n=!1){let o,r;return et(e)?o=e:(o=e.get,r=e.set),new Hf(o,r,n)}const Er={},Br=new WeakMap;let Ts;function Wf(e,t=!1,n=Ts){if(n){let o=Br.get(n);o||Br.set(n,o=[]),o.push(e)}}function Gf(e,t,n=yt){const{immediate:o,deep:r,once:i,scheduler:c,augmentJob:f,call:v}=n,b=E=>r?E:fn(E)||r===!1||r===0?Hn(E,1):Hn(E);let h,_,T,x,M=!1,G=!1;if(Jt(e)?(_=()=>e.value,M=fn(e)):ls(e)?(_=()=>b(e),M=!0):Ge(e)?(G=!0,M=e.some(E=>ls(E)||fn(E)),_=()=>e.map(E=>{if(Jt(E))return E.value;if(ls(E))return b(E);if(et(E))return v?v(E,2):E()})):et(e)?t?_=v?()=>v(e,2):e:_=()=>{if(T){jn();try{T()}finally{Dn()}}const E=Ts;Ts=h;try{return v?v(e,3,[x]):e(x)}finally{Ts=E}}:_=Mn,t&&r){const E=_,U=r===!0?1/0:r;_=()=>Hn(E(),U)}const oe=Cf(),ae=()=>{h.stop(),oe&&oe.active&&Yi(oe.effects,h)};if(i&&t){const E=t;t=(...U)=>{try{return E(...U)}finally{ae()}}}let le=G?new Array(e.length).fill(Er):Er;const Y=E=>{if(!(!(h.flags&1)||!h.dirty&&!E))if(t){const U=h.run();if(E||r||M||(G?U.some((Q,V)=>On(Q,le[V])):On(U,le))){const Q=Ts;jn();try{T&&T(),Ts=h;const V=[U,le===Er?void 0:G&&le[0]===Er?[]:le,x];le=U,v?v(t,3,V):t(...V)}finally{Ts=Q,Dn()}}}else h.run()};return f&&f(Y),h=new Zu(_),h.scheduler=c?()=>c(Y,!1):Y,x=E=>Wf(E,!1,h),T=h.onStop=()=>{const E=Br.get(h);if(E){if(v)v(E,4);else for(const U of E)U();Br.delete(h)}},t?o?Y(!0):le=h.run():c?c(Y.bind(null,!0),!0):h.run(),ae.pause=h.pause.bind(h),ae.resume=h.resume.bind(h),ae.stop=ae,ae}function Hn(e,t=1/0,n){if(t<=0||!vt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Jt(e))Hn(e.value,t,n);else if(Ge(e))for(let o=0;o{Hn(o,t,n)});else if(Wu(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}/** +**/let Bt;class kf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Bt&&(Bt.active?(this.parent=Bt,this.index=(Bt.scopes||(Bt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(Bt===this)Bt=this.prevScope;else{let t=Bt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,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 nc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),Zi(o),xf(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function oc(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||!wi(e))))return;e.flags|=2;const t=e.dep,n=_t,o=bn;_t=e,bn=!0;try{nc(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{_t=n,bn=o,sc(e),e.flags&=-3}}function Zi(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 i=n.computed.deps;i;i=i.nextDep)Zi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let bn=!0;const rc=[];function jn(){rc.push(bn),bn=!1}function Dn(){const e=rc.pop();bn=e===void 0?!0:e}function tu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_t;_t=void 0;try{t()}finally{_t=n}}}let Do=0;class $f{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 el{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(!_t||!bn||_t===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_t)n=this.activeLink=new $f(_t,this),_t.deps?(n.prevDep=_t.depsTail,_t.depsTail.nextDep=n,_t.depsTail=n):_t.deps=_t.depsTail=n,ac(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=_t.depsTail,n.nextDep=void 0,_t.depsTail.nextDep=n,_t.depsTail=n,_t.deps===n&&(_t.deps=o)}return n}trigger(t){this.version++,Do++,this.notify(t)}notify(t){Xi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qi()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)ac(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _i=new WeakMap,js=Symbol(""),ki=Symbol(""),Lo=Symbol("");function Gt(e,t,n){if(bn&&_t){let o=_i.get(e);o||_i.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new el),r.map=o,r.key=n),r.track()}}function qn(e,t,n,o,r,i){const c=_i.get(e);if(!c){Do++;return}const f=v=>{v&&v.trigger()};if(Xi(),t==="clear")c.forEach(f);else{const v=We(e),b=v&&Ji(n);if(v&&n==="length"){const h=Number(o);c.forEach((_,A)=>{(A==="length"||A===Lo||!In(A)&&A>=h)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Lo)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),ls(e)&&f(c.get(ki)));break;case"delete":v||(f(c.get(js)),ls(e)&&f(c.get(ki)));break;case"set":ls(e)&&f(c.get(js));break}}Qi()}function Ys(e){const t=dt(e);return t===e||(Gt(t,"iterate",Lo),fn(e))?t:Ln(e)?us(e)?t.map(n=>ds(vn(n))):t.map(ds):t.map(vn)}function va(e){return Gt(e=dt(e),"iterate",Lo),e}function Tn(e,t){return Ln(e)?ds(us(e)?vn(t):t):vn(t)}const Sf={__proto__:null,[Symbol.iterator](){return ii(this,Symbol.iterator,e=>Tn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>We(t)?Ys(t):t))},entries(){return ii(this,"entries",e=>(e[1]=Tn(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=>Tn(this,o)),arguments)},find(e,t){return Vn(this,"find",e,t,n=>Tn(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=>Tn(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 li(this,"includes",e)},indexOf(...e){return li(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return li(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 su(this,"reduce",e,t)},reduceRight(e,...t){return su(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 ii(this,"values",e=>Tn(this,e))}};function ii(e,t,n){const o=va(e),r=o[t],i=r.call(o);if(o!==e&&!fn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>nu(i.next(),n),r!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>nu(i._next(),n)}return i}function nu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Vn(e,t,n,o,r,i){const c=va(e),f=c!==e&&!fn(e),v=c[t];if(v!==ic[t]){const _=v.apply(e,i);return f?vn(_):_}let b=n;c!==e&&(f?b=function(_,A){return n.call(this,Tn(e,_),A,e)}:n.length>2&&(b=function(_,A){return n.call(this,_,A,e)}));const h=v.call(c,b,o);return f&&r?r(h):h}function su(e,t,n,o){const r=va(e),i=r!==e&&!fn(e);let c=n,f=!1;r!==e&&(i?(f=o.length===0,c=function(b,h,_){return f&&(f=!1,b=Tn(e,b)),n.call(this,b,Tn(e,h),_,e)}):n.length>3&&(c=function(b,h,_){return n.call(this,b,h,_,e)}));const v=r[t](c,...o);return f?Tn(e,v):v}function li(e,t,n){const o=dt(e);Gt(o,"iterate",Lo);const r=o[t](...n);return(r===-1||r===!1)&&ol(n[0])?(n[0]=dt(n[0]),o[t](...n)):r}function _o(e,t,n=[]){jn(),Xi();const o=dt(e)[t].apply(e,n);return Qi(),Dn(),o}const Ef=Gi("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(In));function Tf(e){In(e)||(e=String(e));const t=dt(this);return Gt(t,"has",e),t.hasOwnProperty(e)}class uc{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,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?Rf:pc:i?fc:dc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const c=We(t);if(!r){let v;if(c&&(v=Sf[n]))return v;if(n==="hasOwnProperty")return Tf}const f=Reflect.get(t,n,Jt(t)?t:o);if((In(n)?lc.has(n):Ef(n))||(r||Gt(t,"get",n),i))return f;if(Jt(f)){const v=c&&Ji(n)?f:f.value;return r&&mt(v)?xi(v):v}return mt(f)?r?xi(f):nl(f):f}}class cc extends uc{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];const c=We(t)&&Ji(n);if(!this._isShallow){const b=Ln(i);if(!fn(o)&&!Ln(o)&&(i=dt(i),o=dt(o)),!c&&Jt(i)&&!Jt(o))return b||(i.value=o),!0}const f=c?Number(n)e,$r=e=>Reflect.getPrototypeOf(e);function If(e,t,n){return function(...o){const r=this.__v_raw,i=dt(r),c=ls(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=r[e](...o),h=n?Ci:t?ds:vn;return!t&&Gt(i,"iterate",v?ki:js),Mt(Object.create(b),{next(){const{value:_,done:A}=b.next();return A?{value:_,done:A}:{value:f?[h(_[0]),h(_[1])]:h(_),done:A}}})}}function Sr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function jf(e,t){const n={get(r){const i=this.__v_raw,c=dt(i),f=dt(r);e||(On(r,f)&&Gt(c,"get",r),Gt(c,"get",f));const{has:v}=$r(c),b=t?Ci:e?ds:vn;if(v.call(c,r))return b(i.get(r));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Gt(dt(r),"iterate",js),r.size},has(r){const i=this.__v_raw,c=dt(i),f=dt(r);return e||(On(r,f)&&Gt(c,"has",r),Gt(c,"has",f)),r===f?i.has(r):i.has(r)||i.has(f)},forEach(r,i){const c=this,f=c.__v_raw,v=dt(f),b=t?Ci:e?ds:vn;return!e&&Gt(v,"iterate",js),f.forEach((h,_)=>r.call(i,b(h),b(_),c))}};return Mt(n,e?{add:Sr("add"),set:Sr("set"),delete:Sr("delete"),clear:Sr("clear")}:{add(r){const i=dt(this),c=$r(i),f=dt(r),v=!t&&!fn(r)&&!Ln(r)?f:r;return c.has.call(i,v)||On(r,v)&&c.has.call(i,r)||On(f,v)&&c.has.call(i,f)||(i.add(v),qn(i,"add",v,v)),this},set(r,i){!t&&!fn(i)&&!Ln(i)&&(i=dt(i));const c=dt(this),{has:f,get:v}=$r(c);let b=f.call(c,r);b||(r=dt(r),b=f.call(c,r));const h=v.call(c,r);return c.set(r,i),b?On(i,h)&&qn(c,"set",r,i):qn(c,"add",r,i),this},delete(r){const i=dt(this),{has:c,get:f}=$r(i);let v=c.call(i,r);v||(r=dt(r),v=c.call(i,r)),f&&f.call(i,r);const b=i.delete(r);return v&&qn(i,"delete",r,void 0),b},clear(){const r=dt(this),i=r.size!==0,c=r.clear();return i&&qn(r,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=If(r,e,t)}),n}function tl(e,t){const n=jf(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?o:Reflect.get(pt(n,r)&&r in o?n:o,r,i)}const Df={get:tl(!1,!1)},Lf={get:tl(!1,!0)},Kf={get:tl(!0,!1)};const dc=new WeakMap,fc=new WeakMap,pc=new WeakMap,Rf=new WeakMap;function Ff(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nl(e){return Ln(e)?e:sl(e,!1,Pf,Df,dc)}function Nf(e){return sl(e,!1,Mf,Lf,fc)}function xi(e){return sl(e,!0,Of,Kf,pc)}function sl(e,t,n,o,r){if(!mt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const c=Ff(uf(e));if(c===0)return e;const f=new Proxy(e,c===2?o:n);return r.set(e,f),f}function us(e){return Ln(e)?us(e.__v_raw):!!(e&&e.__v_isReactive)}function Ln(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ol(e){return e?!!e.__v_raw:!1}function dt(e){const t=e&&e.__v_raw;return t?dt(t):e}function Vf(e){return!pt(e,"__v_skip")&&Object.isExtensible(e)&&Yu(e,"__v_skip",!0),e}const vn=e=>mt(e)?nl(e):e,ds=e=>mt(e)?xi(e):e;function Jt(e){return e?e.__v_isRef===!0:!1}function P(e){return Bf(e,!1)}function Bf(e,t){return Jt(e)?e:new Uf(e,t)}class Uf{constructor(t,n){this.dep=new el,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 sn(e){return Jt(e)?e.value:e}const qf={get:(e,t,n)=>t==="__v_raw"?e:sn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Jt(r)&&!Jt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function vc(e){return us(e)?e:new Proxy(e,qf)}class Hf{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new el(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)&&_t!==this)return tc(this,!0),!0}get value(){const t=this.dep.track();return oc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zf(e,t,n=!1){let o,r;return et(e)?o=e:(o=e.get,r=e.set),new Hf(o,r,n)}const Er={},Br=new WeakMap;let Ts;function Wf(e,t=!1,n=Ts){if(n){let o=Br.get(n);o||Br.set(n,o=[]),o.push(e)}}function Gf(e,t,n=yt){const{immediate:o,deep:r,once:i,scheduler:c,augmentJob:f,call:v}=n,b=E=>r?E:fn(E)||r===!1||r===0?Hn(E,1):Hn(E);let h,_,A,x,M=!1,G=!1;if(Jt(e)?(_=()=>e.value,M=fn(e)):us(e)?(_=()=>b(e),M=!0):We(e)?(G=!0,M=e.some(E=>us(E)||fn(E)),_=()=>e.map(E=>{if(Jt(E))return E.value;if(us(E))return b(E);if(et(E))return v?v(E,2):E()})):et(e)?t?_=v?()=>v(e,2):e:_=()=>{if(A){jn();try{A()}finally{Dn()}}const E=Ts;Ts=h;try{return v?v(e,3,[x]):e(x)}finally{Ts=E}}:_=Mn,t&&r){const E=_,U=r===!0?1/0:r;_=()=>Hn(E(),U)}const oe=Cf(),le=()=>{h.stop(),oe&&oe.active&&Yi(oe.effects,h)};if(i&&t){const E=t;t=(...U)=>{try{return E(...U)}finally{le()}}}let ce=G?new Array(e.length).fill(Er):Er;const Y=E=>{if(!(!(h.flags&1)||!h.dirty&&!E))if(t){const U=h.run();if(E||r||M||(G?U.some((Q,B)=>On(Q,ce[B])):On(U,ce))){const Q=Ts;jn();try{A&&A(),Ts=h;const B=[U,ce===Er?void 0:G&&ce[0]===Er?[]:ce,x];ce=U,v?v(t,3,B):t(...B)}finally{Ts=Q,Dn()}}}else h.run()};return f&&f(Y),h=new Zu(_),h.scheduler=c?()=>c(Y,!1):Y,x=E=>Wf(E,!1,h),A=h.onStop=()=>{const E=Br.get(h);if(E){if(v)v(E,4);else for(const U of E)U();Br.delete(h)}},t?o?Y(!0):ce=h.run():c?c(Y.bind(null,!0),!0):h.run(),le.pause=h.pause.bind(h),le.resume=h.resume.bind(h),le.stop=le,le}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--,Jt(e))Hn(e.value,t,n);else if(We(e))for(let o=0;o{Hn(o,t,n)});else if(Wu(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){ma(r,t,n)}}function mn(e,t,n,o){if(et(e)){const r=Yo(e,t,n,o);return r&&Hu(r)&&r.catch(i=>{ma(i,t,n)}),r}if(Ge(e)){const r=[];for(let i=0;i>>1,r=tn[o],i=Ko(r);i=Ko(n)?tn.push(e):tn.splice(Jf(t),0,e),e.flags|=1,hc()}}function hc(){Ur||(Ur=mc.then(bc))}function Xf(e){if(!Ge(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;tn.splice(o,1),o=e?o-1:yn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function gc(e,t,n=0){if(An.length){let o=An,r=0;if(t){o=[];for(let c=0;cKo(c)-Ko(f));if(An.length=r,rs){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function bc(e){try{for(yn=0;yn{o._d&&Gr(-1);const i=qr(t),c=Ds.length;let f;try{f=e(...r)}finally{for(let v=Ds.length;v>c;v--)Gc();qr(i),o._d&&Gr(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function Me(e,t){if(dn===null)return e;const n=_a(dn),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&et(t)?t.call(o&&o.proxy):t}}const ep=Symbol.for("v-scx"),tp=()=>Ir(ep);function ht(e,t,n){return _c(e,t,n)}function _c(e,t,n=yt){const{immediate:o,deep:r,flush:i,once:c}=n,f=Mt({},n),v=t&&o||!t&&i!=="post";let b;if(Uo){if(i==="sync"){const x=tp();b=x.__watcherHandles||(x.__watcherHandles=[])}else if(!v){const x=()=>{};return x.stop=Mn,x.resume=Mn,x.pause=Mn,x}}const h=nn;f.call=(x,M,G)=>mn(x,h,M,G);let _=!1;i==="post"?f.scheduler=x=>{x.i=h,en(x,h&&h.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(x,M)=>{M?x():rl(x)}),f.augmentJob=x=>{t&&(x.flags|=4),_&&(x.flags|=2,h&&(x.id=h.uid,x.i=h))};const T=Gf(e,t,f);return Uo&&(b?b.push(T):v&&T()),T}function np(e,t,n){const o=this.proxy,r=Et(e)?e.includes(".")?kc(o,e):()=>o[e]:e.bind(o,o);let i;et(t)?i=t:(i=t.handler,n=t);const c=Jo(this),f=_c(r,i.bind(o),n);return c(),f}function kc(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),sp=e=>e&&(e.defer||e.defer===""),ou=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ru=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,$i=(e,t)=>{const n=e&&e.to;return Et(n)?t?t(n):null:n},op={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,c,f,v,b){const{mc:h,pc:_,pbc:T,o:{insert:x,querySelector:M,createText:G,createComment:oe,parentNode:ae}}=b,le=As(t.props);let{dynamicChildren:Y}=t;const E=(V,te,I)=>{V.shapeFlag&16&&h(V.children,te,I,r,i,c,f,v)},U=(V=t)=>{const te=As(V.props),I=V.target=$i(V.props,M),S=Si(I,V,G,x);I&&(c!=="svg"&&ou(I)?c="svg":c!=="mathml"&&ru(I)&&(c="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(I),te||(E(V,I,S),xo(V,!1)))},Q=V=>{const te=()=>{if(ss.get(V)===te){if(ss.delete(V),As(V.props)){const I=ae(V.el)||n;E(V,I,V.anchor),xo(V,!0)}U(V)}};ss.set(V,te),en(te,i)};if(e==null){const V=t.el=G(""),te=t.anchor=G("");if(x(V,n,o),x(te,n,o),sp(t.props)||i&&i.pendingBranch){Q(t);return}le&&(E(t,n,te),xo(t,!0)),U()}else{t.el=e.el;const V=t.anchor=e.anchor,te=ss.get(e);if(te){te.flags|=8,ss.delete(e),Q(t);return}t.targetStart=e.targetStart;const I=t.target=e.target,S=t.targetAnchor=e.targetAnchor,O=As(e.props),Z=O?n:I,Oe=O?V:S;if(c==="svg"||ou(I)?c="svg":(c==="mathml"||ru(I))&&(c="mathml"),Y?(T(e.dynamicChildren,Y,Z,r,i,c,f),ul(e,t,!0)):v||_(e,t,Z,Oe,r,i,c,f,!1),le)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tr(t,n,V,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Te=$i(t.props,M);Te&&(t.target=Te,Tr(t,Te,null,b,0))}else O&&Tr(t,I,S,b,1);xo(t,le)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:h,target:_,props:T}=e,x=As(T),M=i||!x,G=ss.get(e);if(G&&(G.flags|=8,ss.delete(e)),_&&(r(b),r(h)),i&&r(v),!G&&(x||_)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Oc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],$c={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},ap={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=cl(),o=xc();return()=>{const r=t.default&&al(t.default(),!0),i=r&&r.length?Sc(r):n.subTree?pe():void 0;if(!i)return;const c=dt(e),{mode:f}=c;if(o.isLeaving)return ci(i);const v=Hr(i);if(!v)return ci(i);let b=Ro(v,c,o,n,_=>b=_);v.type!==Yt&&ds(v,b);let h=n.subTree&&Hr(n.subTree);if(h&&h.type!==Yt&&!Ps(h,v)&&No(n.subTree)){let _=Ro(h,c,o,n);if(ds(h,_),f==="out-in"&&v.type!==Yt)return o.isLeaving=!0,_.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,h=void 0},ci(i);f==="in-out"&&v.type!==Yt?_.delayLeave=(T,x,M)=>{const G=Ec(o,h);G[String(h.key)]=h,T[cn]=()=>{x(),T[cn]=void 0,delete b.delayedLeave,h=void 0},b.delayedLeave=()=>{M(),delete b.delayedLeave,h=void 0}}:h=void 0}else h&&(h=void 0);return i}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Yt){t=n;break}}return t}const ip=ap;function Ec(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 Ro(e,t,n,o,r){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:h,onEnterCancelled:_,onBeforeLeave:T,onLeave:x,onAfterLeave:M,onLeaveCancelled:G,onBeforeAppear:oe,onAppear:ae,onAfterAppear:le,onAppearCancelled:Y}=t,E=String(e.key),U=Ec(n,e),Q=(I,S)=>{I&&mn(I,o,9,S)},V=(I,S)=>{const O=S[1];Q(I,S),Ge(I)?I.every(Z=>Z.length<=1)&&O():I.length<=1&&O()},te={mode:c,persisted:f,beforeEnter(I){let S=v;if(!n.isMounted)if(i)S=oe||v;else return;I[cn]&&I[cn](!0);const O=U[E];if(O&&Ps(e,O)){let Z=O.el[cn];if(!Z){const Oe=No(O);Z=Oe&&Oe.el[cn]}Z&&Z()}Q(S,[I])},enter(I){if(U[E]===e)return;let S=b,O=h,Z=_;if(!n.isMounted)if(i)S=ae||b,O=le||h,Z=Y||_;else return;let Oe=!1;I[ko]=ye=>{Oe||(Oe=!0,ye?Q(Z,[I]):Q(O,[I]),te.delayedLeave&&te.delayedLeave(),I[ko]=void 0)};const Te=I[ko].bind(null,!1);S?V(S,[I,Te]):Te()},leave(I,S){const O=String(e.key);if(I[ko]&&I[ko](!0),n.isUnmounting)return S();Q(T,[I]);let Z=!1;I[cn]=Te=>{Z||(Z=!0,S(),Te?Q(G,[I]):Q(M,[I]),I[cn]=void 0,U[O]===e&&delete U[O])};const Oe=I[cn].bind(null,!1);U[O]=e,x?V(x,[I,Oe]):Oe()},clone(I){const S=Ro(I,t,n,o,r);return r&&r(S),S}};return te}function ci(e){if(ya(e))return e=fs(e),e.children=null,e}function Hr(e){if(!ya(e))return ha(e.type)&&e.children?Sc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&et(n.default))return n.default()}}function ds(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ds(ha(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===Ke&&Ge(e.children)){const n=Lc(e.children,!1);n&&ds(n,t)}}function al(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;iPo(G,t&&(Ge(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 i=o.shapeFlag&4?_a(o.component):o.el,c=r?null:i,{i:f,r:v}=e,b=t&&t.r,h=f.refs===yt?f.refs={}:f.refs,_=f.setupState,T=dt(_),x=_===yt?qu:G=>au(h,G)?!1:pt(T,G),M=(G,oe)=>!(oe&&au(h,oe));if(b!=null&&b!==v){if(iu(t),Et(b))h[b]=null,x(b)&&(_[b]=null);else if(Jt(b)){const G=t;M(b,G.k)&&(b.value=null),G.k&&(h[G.k]=null)}}if(et(v))Yo(v,f,12,[c,h]);else{const G=Et(v),oe=Jt(v);if(G||oe){const ae=()=>{if(e.f){const le=G?x(v)?_[v]:h[v]:M()||!e.k?v.value:h[e.k];if(r)Ge(le)&&Yi(le,i);else if(Ge(le))le.includes(i)||le.push(i);else if(G)h[v]=[i],x(v)&&(_[v]=h[v]);else{const Y=[i];M(v,e.k)&&(v.value=Y),e.k&&(h[e.k]=Y)}}else G?(h[v]=c,x(v)&&(_[v]=c)):oe&&(M(v,e.k)&&(v.value=c),e.k&&(h[e.k]=c))};if(c){const le=()=>{ae(),zr.delete(e)};le.id=-1,zr.set(e,le),en(le,n)}else iu(e),ae()}}}function iu(e){const t=zr.get(e);t&&(t.flags|=8,zr.delete(e))}pa().requestIdleCallback;pa().cancelIdleCallback;const Oo=e=>!!e.type.__asyncLoader,ya=e=>e.type.__isKeepAlive;function lp(e,t){Ac(e,"a",t)}function up(e,t){Ac(e,"da",t)}function Ac(e,t,n=nn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ga(t,o,n),n){let r=n.parent;for(;r&&r.parent;)ya(r.parent.vnode)&&cp(o,t,n,r),r=r.parent}}function cp(e,t,n,o){const r=ga(t,e,o,!0);Cn(()=>{Yi(o[t],r)},n)}function ga(e,t,n=nn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{jn();const f=Jo(n),v=mn(t,n,e,c);return f(),Dn(),v});return o?r.unshift(i):r.push(i),i}}const Gn=e=>(t,n=nn)=>{(!Uo||e==="sp")&&ga(e,(...o)=>t(...o),n)},dp=Gn("bm"),ln=Gn("m"),fp=Gn("bu"),Pc=Gn("u"),Oc=Gn("bum"),Cn=Gn("um"),pp=Gn("sp"),vp=Gn("rtg"),mp=Gn("rtc");function hp(e,t=nn){ga("ec",e,t)}const yp=Symbol.for("v-ndc");function nt(e,t,n,o){let r;const i=n,c=Ge(e);if(c||Et(e)){const f=c&&ls(e);let v=!1,b=!1;f&&(v=!fn(e),b=Ln(e),e=va(e)),r=new Array(e.length);for(let h=0,_=e.length;h<_;h++)r[h]=t(v?b?cs(vn(e[h])):vn(e[h]):e[h],h,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);r=new Array(f.length);for(let v=0,b=f.length;ve?Qc(e)?_a(e):Ei(e.parent):null,Mo=Mt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ic(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=Rs.bind(e.proxy)),$watch:e=>np.bind(e)}),di=(e,t)=>e!==yt&&!e.__isScriptSetup&&pt(e,t),gp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const T=c[t];if(T!==void 0)switch(T){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(di(o,t))return c[t]=1,o[t];if(r!==yt&&pt(r,t))return c[t]=2,r[t];if(pt(i,t))return c[t]=3,i[t];if(n!==yt&&pt(n,t))return c[t]=4,n[t];Ti&&(c[t]=0)}}const b=Mo[t];let h,_;if(b)return t==="$attrs"&&Gt(e.attrs,"get",""),b(e);if((h=f.__cssModules)&&(h=h[t]))return h;if(n!==yt&&pt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,pt(_,t))return _[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return di(r,t)?(r[t]=n,!0):o!==yt&&pt(o,t)?(o[t]=n,!0):pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:i,type:c}},f){let v;return!!(n[f]||e!==yt&&f[0]!=="$"&&pt(e,f)||di(t,f)||pt(i,f)||pt(o,f)||pt(Mo,f)||pt(r.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function lu(e){return Ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ti=!0;function bp(e){const t=Ic(e),n=e.proxy,o=e.ctx;Ti=!1,t.beforeCreate&&uu(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:c,watch:f,provide:v,inject:b,created:h,beforeMount:_,mounted:T,beforeUpdate:x,updated:M,activated:G,deactivated:oe,beforeDestroy:ae,beforeUnmount:le,destroyed:Y,unmounted:E,render:U,renderTracked:Q,renderTriggered:V,errorCaptured:te,serverPrefetch:I,expose:S,inheritAttrs:O,components:Z,directives:Oe,filters:Te}=t;if(b&&wp(b,o,null),c)for(const ze in c){const de=c[ze];et(de)&&(o[ze]=de.bind(n))}if(r){const ze=r.call(n,n);vt(ze)&&(e.data=nl(ze))}if(Ti=!0,i)for(const ze in i){const de=i[ze],xe=et(de)?de.bind(n,n):et(de.get)?de.get.bind(n,n):Mn,Ee=!et(de)&&et(de.set)?de.set.bind(n):Mn,je=rt({get:xe,set:Ee});Object.defineProperty(o,ze,{enumerable:!0,configurable:!0,get:()=>je.value,set:Ce=>je.value=Ce})}if(f)for(const ze in f)Mc(f[ze],o,n,ze);if(v){const ze=et(v)?v.call(n):v;Reflect.ownKeys(ze).forEach(de=>{Zf(de,ze[de])})}h&&uu(h,e,"c");function Pe(ze,de){Ge(de)?de.forEach(xe=>ze(xe.bind(n))):de&&ze(de.bind(n))}if(Pe(dp,_),Pe(ln,T),Pe(fp,x),Pe(Pc,M),Pe(lp,G),Pe(up,oe),Pe(hp,te),Pe(mp,Q),Pe(vp,V),Pe(Oc,le),Pe(Cn,E),Pe(pp,I),Ge(S))if(S.length){const ze=e.exposed||(e.exposed={});S.forEach(de=>{Object.defineProperty(ze,de,{get:()=>n[de],set:xe=>n[de]=xe,enumerable:!0})})}else e.exposed||(e.exposed={});U&&e.render===Mn&&(e.render=U),O!=null&&(e.inheritAttrs=O),Z&&(e.components=Z),Oe&&(e.directives=Oe),I&&Tc(e)}function wp(e,t,n=Mn){Ge(e)&&(e=Ai(e));for(const o in e){const r=e[o];let i;vt(r)?"default"in r?i=Ir(r.from||o,r.default,!0):i=Ir(r.from||o):i=Ir(r),Jt(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[o]=i}}function uu(e,t,n){mn(Ge(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mc(e,t,n,o){let r=o.includes(".")?kc(n,o):()=>n[o];if(Et(e)){const i=t[e];et(i)&&ht(r,i)}else if(et(e))ht(r,e.bind(n));else if(vt(e))if(Ge(e))e.forEach(i=>Mc(i,t,n,o));else{const i=et(e.handler)?e.handler.bind(n):t[e.handler];et(i)&&ht(r,i,e)}}function Ic(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!r.length&&!n&&!o?v=t:(v={},r.length&&r.forEach(b=>Wr(v,b,c,!0)),Wr(v,t,c)),vt(t)&&i.set(t,v),v}function Wr(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&Wr(e,i,n,!0),r&&r.forEach(c=>Wr(e,c,n,!0));for(const c in t)if(!(o&&c==="expose")){const f=_p[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const _p={data:cu,props:du,emits:du,methods:$o,computed:$o,beforeCreate:Zt,created:Zt,beforeMount:Zt,mounted:Zt,beforeUpdate:Zt,updated:Zt,beforeDestroy:Zt,beforeUnmount:Zt,destroyed:Zt,unmounted:Zt,activated:Zt,deactivated:Zt,errorCaptured:Zt,serverPrefetch:Zt,components:$o,directives:$o,watch:Cp,provide:cu,inject:kp};function cu(e,t){return t?e?function(){return Mt(et(e)?e.call(this,this):e,et(t)?t.call(this,this):t)}:t:e}function kp(e,t){return $o(Ai(e),Ai(t))}function Ai(e){if(Ge(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${gn(t)}Modifiers`]||e[`${ms(t)}Modifiers`];function Ep(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||yt;let r=n;const i=t.startsWith("update:"),c=i&&Sp(o,t.slice(7));c&&(c.trim&&(r=n.map(h=>Et(h)?h.trim():h)),c.number&&(r=r.map(fa)));let f,v=o[f=oi(t)]||o[f=oi(gn(t))];!v&&i&&(v=o[f=oi(ms(t))]),v&&mn(v,e,6,r);const b=o[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(b,e,6,r)}}const Tp=new WeakMap;function Dc(e,t,n=!1){const o=n?Tp:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let c={},f=!1;if(!et(e)){const v=b=>{const h=Dc(b,t,!0);h&&(f=!0,Mt(c,h))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(vt(e)&&o.set(e,null),null):(Ge(i)?i.forEach(v=>c[v]=null):Mt(c,i),vt(e)&&o.set(e,c),c)}function ba(e,t){return!e||!ua(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pt(e,t[0].toLowerCase()+t.slice(1))||pt(e,ms(t))||pt(e,t))}function fu(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:h,props:_,data:T,setupState:x,ctx:M,inheritAttrs:G}=e,oe=qr(e);let ae,le;try{if(n.shapeFlag&4){const E=r||o,U=E;ae=Pn(b.call(U,E,h,_,x,T,M)),le=f}else{const E=t;ae=Pn(E.length>1?E(_,{attrs:f,slots:c,emit:v}):E(_,null)),le=t.props?f:Ap(f)}}catch(E){Ds.length=0,ma(E,e,1),ae=we(Yt)}let Y=ae;if(le&&G!==!1){const E=Object.keys(le),{shapeFlag:U}=Y;E.length&&U&7&&(i&&E.some(ca)&&(le=Pp(le,i)),Y=fs(Y,le,!1,!0))}if(n.dirs&&(Y=fs(Y,null,!1,!0),Y.dirs=Y.dirs?Y.dirs.concat(n.dirs):n.dirs),n.transition){const E=ha(Y.type)&&Hr(Y)||Y;ds(E,n.transition)}return ae=Y,qr(oe),ae}function Lc(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ua(n))&&((t||(t={}))[n]=e[n]);return t},Pp=(e,t)=>{const n={};for(const o in e)(!ca(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Op(e,t,n){const{props:o,children:r,component:i}=e,{props:c,children:f,patchFlag:v}=t,b=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return o?pu(o,c,b):!!c;if(v&8){const h=t.dynamicProps;for(let _=0;_Object.create(Rc),Fc=e=>Object.getPrototypeOf(e)===Rc;function Ip(e,t,n,o=!1){const r={},i=Nc();e.propsDefaults=Object.create(null),Vc(e,t,r,i);for(const c in e.propsOptions[0])c in r||(r[c]=void 0);n?e.props=o?r:Ff(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function jp(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:c}}=e,f=dt(r),[v]=e.propsOptions;let b=!1;if((o||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[T,x]=Bc(_,t,!0);Mt(c,T),x&&f.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!v)return vt(e)&&o.set(e,Ms),Ms;if(Ge(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",ll=e=>Ge(e)?e.map(Pn):[Pn(e)],Lp=(e,t,n)=>{if(t._n)return t;const o=Rn((...r)=>ll(t(...r)),n);return o._c=!1,o},Uc=(e,t,n)=>{const o=e._ctx;for(const r in e){if(il(r))continue;const i=e[r];if(et(i))t[r]=Lp(r,i,o);else if(i!=null){const c=ll(i);t[r]=()=>c}}},qc=(e,t)=>{const n=ll(t);e.slots.default=()=>n},Hc=(e,t,n)=>{for(const o in t)(n||!il(o))&&(e[o]=t[o])},Kp=(e,t,n)=>{const o=e.slots=Nc();if(e.vnode.shapeFlag&32){const r=t._;r?(Hc(o,t,n),n&&Yu(o,"_",r,!0)):Uc(t,o)}else t&&qc(e,t)},Rp=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,c=yt;if(o.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:Hc(r,t,n):(i=!t.$stable,Uc(t,r)),c=t}else t&&(qc(e,t),c={default:1});if(i)for(const f in r)!il(f)&&c[f]==null&&delete r[f]},en=Up;function Np(e){return Fp(e)}function Fp(e,t){const n=pa();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:h,parentNode:_,nextSibling:T,setScopeId:x=Mn,insertStaticContent:M}=e,G=(g,m,C,j=null,se=null,W=null,ge=void 0,be=null,ke=!!m.dynamicChildren)=>{if(g===m)return;g&&!Ps(g,m)&&(j=xt(g),Ce(g,se,W,!0),g=null),m.patchFlag===-2&&(ke=!1,m.dynamicChildren=null),m.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(m.dynamicChildren===Ms&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:ce,ref:Ne,shapeFlag:Ae}=m;switch(ce){case wa:oe(g,m,C,j);break;case Yt:ae(g,m,C,j);break;case jr:g==null&&le(m,C,j,ge);break;case Ke:Z(g,m,C,j,se,W,ge,be,ke);break;default:Ae&1?U(g,m,C,j,se,W,ge,be,ke):Ae&6?Oe(g,m,C,j,se,W,ge,be,ke):(Ae&64||Ae&128)&&ce.process(g,m,C,j,se,W,ge,be,ke,bt)}Ne!=null&&se?Po(Ne,g&&g.ref,W,m||g,!m):Ne==null&&g&&g.ref!=null&&Po(g.ref,null,W,g,!0)},oe=(g,m,C,j)=>{if(g==null)o(m.el=f(m.children),C,j);else{const se=m.el=g.el;m.children!==g.children&&b(se,m.children)}},ae=(g,m,C,j)=>{g==null?o(m.el=v(m.children||""),C,j):m.el=g.el},le=(g,m,C,j)=>{[g.el,g.anchor]=M(g.children,m,C,j,g.el,g.anchor)},Y=({el:g,anchor:m},C,j)=>{let se;for(;g&&g!==m;)se=T(g),o(g,C,j),g=se;o(m,C,j)},E=({el:g,anchor:m})=>{let C;for(;g&&g!==m;)C=T(g),r(g),g=C;r(m)},U=(g,m,C,j,se,W,ge,be,ke)=>{if(m.type==="svg"?ge="svg":m.type==="math"&&(ge="mathml"),g==null)Q(m,C,j,se,W,ge,be,ke);else{const ce=g.el&&g.el._isVueCE?g.el:null;try{ce&&ce._beginPatch(),I(g,m,se,W,ge,be,ke)}finally{ce&&ce._endPatch()}}},Q=(g,m,C,j,se,W,ge,be)=>{let ke,ce;const{props:Ne,shapeFlag:Ae,transition:qe,dirs:ie}=g;if(ke=g.el=c(g.type,W,Ne&&Ne.is,Ne),Ae&8?h(ke,g.children):Ae&16&&te(g.children,ke,null,j,se,fi(g,W),ge,be),ie&&$s(g,null,j,"created"),V(ke,g,g.scopeId,ge,j),Ne){for(const ue in Ne)ue!=="value"&&!Eo(ue)&&i(ke,ue,null,Ne[ue],W,j);"value"in Ne&&i(ke,"value",null,Ne.value,W),(ce=Ne.onVnodeBeforeMount)&&$n(ce,j,g)}ie&&$s(g,null,j,"beforeMount");const z=Vp(se,qe);z&&qe.beforeEnter(ke),o(ke,m,C),((ce=Ne&&Ne.onVnodeMounted)||z||ie)&&en(()=>{try{ce&&$n(ce,j,g),z&&qe.enter(ke),ie&&$s(g,null,j,"mounted")}finally{}},se)},V=(g,m,C,j,se)=>{if(C&&x(g,C),j)for(let W=0;W{for(let ce=ke;ce{const be=m.el=g.el;let{patchFlag:ke,dynamicChildren:ce,dirs:Ne}=m;ke|=g.patchFlag&16;const Ae=g.props||yt,qe=m.props||yt;let ie;if(C&&Ss(C,!1),(ie=qe.onVnodeBeforeUpdate)&&$n(ie,C,m,g),Ne&&$s(m,g,C,"beforeUpdate"),C&&Ss(C,!0),ce&&(!g.dynamicChildren||g.dynamicChildren.length!==ce.length)&&(ke=0,ge=!1,ce=null),(Ae.innerHTML&&qe.innerHTML==null||Ae.textContent&&qe.textContent==null)&&h(be,""),ce?S(g.dynamicChildren,ce,be,C,j,fi(m,se),W):ge||de(g,m,be,null,C,j,fi(m,se),W,!1),ke>0){if(ke&16)O(be,Ae,qe,C,se);else if(ke&2&&Ae.class!==qe.class&&i(be,"class",null,qe.class,se),ke&4&&i(be,"style",Ae.style,qe.style,se),ke&8){const z=m.dynamicProps;for(let ue=0;ue{ie&&$n(ie,C,m,g),Ne&&$s(m,g,C,"updated")},j)},S=(g,m,C,j,se,W,ge)=>{for(let be=0;be{if(m!==C){if(m!==yt)for(const W in m)!Eo(W)&&!(W in C)&&i(g,W,m[W],null,se,j);for(const W in C){if(Eo(W))continue;const ge=C[W],be=m[W];ge!==be&&W!=="value"&&i(g,W,be,ge,se,j)}"value"in C&&i(g,"value",m.value,C.value,se)}},Z=(g,m,C,j,se,W,ge,be,ke)=>{const ce=m.el=g?g.el:f(""),Ne=m.anchor=g?g.anchor:f("");let{patchFlag:Ae,dynamicChildren:qe,slotScopeIds:ie}=m;ie&&(be=be?be.concat(ie):ie),g==null?(o(ce,C,j),o(Ne,C,j),te(m.children||[],C,Ne,se,W,ge,be,ke)):Ae>0&&Ae&64&&qe&&g.dynamicChildren&&g.dynamicChildren.length===qe.length?(S(g.dynamicChildren,qe,C,se,W,ge,be),(m.key!=null||se&&m===se.subTree)&&ul(g,m,!0)):de(g,m,C,Ne,se,W,ge,be,ke)},Oe=(g,m,C,j,se,W,ge,be,ke)=>{m.slotScopeIds=be,g==null?m.shapeFlag&512?se.ctx.activate(m,C,j,ge,ke):Te(m,C,j,se,W,ge,ke):ye(g,m,ke)},Te=(g,m,C,j,se,W,ge)=>{const be=g.component=Jp(g,j,se);if(ya(g)&&(be.ctx.renderer=bt),Xp(be,!1,ge),be.asyncDep){if(se&&se.registerDep(be,Pe,ge,W),!g.el){const ke=be.subTree=we(Yt);ae(null,ke,m,C),g.placeholder=ke.el}}else Pe(be,g,m,C,se,W,ge)},ye=(g,m,C)=>{const j=m.component=g.component;if(Op(g,m,C))if(j.asyncDep&&!j.asyncResolved){m.el=g.el,m.placeholder=g.placeholder,ze(j,m,C);return}else j.next=m,j.update();else m.el=g.el,m.placeholder=g.placeholder,j.vnode=m},Pe=(g,m,C,j,se,W,ge)=>{const be=()=>{if(g.isMounted){let{next:Ae,bu:qe,u:ie,parent:z,vnode:ue}=g;{const Qe=zc(g);if(Qe){Ae&&(Ae.el=ue.el,ze(g,Ae,ge)),Qe.asyncDep.then(()=>{en(()=>{g.isUnmounted||ce()},se)});return}}let Le=Ae,st;Ss(g,!1),Ae?(Ae.el=ue.el,ze(g,Ae,ge)):Ae=ue,qe&&Mr(qe),(st=Ae.props&&Ae.props.onVnodeBeforeUpdate)&&$n(st,z,Ae,ue),Ss(g,!0);const mt=fu(g),It=g.subTree;g.subTree=mt,G(It,mt,_(It.el),xt(It),g,se,W),Ae.el=mt.el,Le===null&&Mp(g,mt.el),ie&&en(ie,se),(st=Ae.props&&Ae.props.onVnodeUpdated)&&en(()=>$n(st,z,Ae,ue),se)}else{let Ae;const{el:qe,props:ie}=m,{bm:z,m:ue,parent:Le,root:st,type:mt}=g,It=Oo(m);Ss(g,!1),z&&Mr(z),!It&&(Ae=ie&&ie.onVnodeBeforeMount)&&$n(Ae,Le,m),Ss(g,!0);{st.ce&&st.ce._hasShadowRoot()&&st.ce._injectChildStyle(mt,g.parent?g.parent.type:void 0);const Qe=g.subTree=fu(g);G(null,Qe,C,j,g,se,W),m.el=Qe.el}if(ue&&en(ue,se),!It&&(Ae=ie&&ie.onVnodeMounted)){const Qe=m;en(()=>$n(Ae,Le,Qe),se)}(m.shapeFlag&256||Le&&Oo(Le.vnode)&&Le.vnode.shapeFlag&256)&&g.a&&en(g.a,se),g.isMounted=!0,m=C=j=null}};g.scope.on();const ke=g.effect=new Zu(be);g.scope.off();const ce=g.update=ke.run.bind(ke),Ne=g.job=ke.runIfDirty.bind(ke);Ne.i=g,Ne.id=g.uid,ke.scheduler=()=>rl(Ne),Ss(g,!0),ce()},ze=(g,m,C)=>{m.component=g;const j=g.vnode.props;g.vnode=m,g.next=null,jp(g,m.props,j,C),Rp(g,m.children,C),jn(),yc(g),Dn()},de=(g,m,C,j,se,W,ge,be,ke=!1)=>{const ce=g&&g.children,Ne=g?g.shapeFlag:0,Ae=m.children,{patchFlag:qe,shapeFlag:ie}=m;if(qe>0){if(qe&128){Ee(ce,Ae,C,j,se,W,ge,be,ke);return}else if(qe&256){xe(ce,Ae,C,j,se,W,ge,be,ke);return}}ie&8?(Ne&16&&Ct(ce,se,W),Ae!==ce&&h(C,Ae)):Ne&16?ie&16?Ee(ce,Ae,C,j,se,W,ge,be,ke):Ct(ce,se,W,!0):(Ne&8&&h(C,""),ie&16&&te(Ae,C,j,se,W,ge,be,ke))},xe=(g,m,C,j,se,W,ge,be,ke)=>{g=g||Ms,m=m||Ms;const ce=g.length,Ne=m.length,Ae=Math.min(ce,Ne);let qe;for(qe=0;qeNe?Ct(g,se,W,!0,!1,Ae):te(m,C,j,se,W,ge,be,ke,Ae)},Ee=(g,m,C,j,se,W,ge,be,ke)=>{let ce=0;const Ne=m.length;let Ae=g.length-1,qe=Ne-1;for(;ce<=Ae&&ce<=qe;){const ie=g[ce],z=m[ce]=ke?Un(m[ce]):Pn(m[ce]);if(Ps(ie,z))G(ie,z,C,null,se,W,ge,be,ke);else break;ce++}for(;ce<=Ae&&ce<=qe;){const ie=g[Ae],z=m[qe]=ke?Un(m[qe]):Pn(m[qe]);if(Ps(ie,z))G(ie,z,C,null,se,W,ge,be,ke);else break;Ae--,qe--}if(ce>Ae){if(ce<=qe){const ie=qe+1,z=ieqe)for(;ce<=Ae;)Ce(g[ce],se,W,!0),ce++;else{const ie=ce,z=ce,ue=new Map;for(ce=z;ce<=qe;ce++){const Vt=m[ce]=ke?Un(m[ce]):Pn(m[ce]);Vt.key!=null&&ue.set(Vt.key,ce)}let Le,st=0;const mt=qe-z+1;let It=!1,Qe=0;const Xt=new Array(mt);for(ce=0;ce=mt){Ce(Vt,se,W,!0);continue}let jt;if(Vt.key!=null)jt=ue.get(Vt.key);else for(Le=z;Le<=qe;Le++)if(Xt[Le-z]===0&&Ps(Vt,m[Le])){jt=Le;break}jt===void 0?Ce(Vt,se,W,!0):(Xt[jt-z]=ce+1,jt>=Qe?Qe=jt:It=!0,G(Vt,m[jt],C,null,se,W,ge,be,ke),st++)}const ys=It?Bp(Xt):Ms;for(Le=ys.length-1,ce=mt-1;ce>=0;ce--){const Vt=z+ce,jt=m[Vt],He=m[Vt+1],Yn=Vt+1{const{el:W,type:ge,transition:be,children:ke,shapeFlag:ce}=g;if(ce&6){je(g.component.subTree,m,C,j);return}if(ce&128){g.suspense.move(m,C,j);return}if(ce&64){ge.move(g,m,C,bt);return}if(ge===Ke){o(W,m,C);for(let Ae=0;Aebe.enter(W),se));else{const{leave:Ae,delayLeave:qe,afterLeave:ie}=be,z=()=>{g.ctx.isUnmounted?r(W):o(W,m,C)},ue=()=>{const Le=W._isLeaving||!!W[cn];W._isLeaving&&W[cn](!0),be.persisted&&!Le?z():Ae(W,()=>{z(),ie&&ie()})};qe?qe(W,z,ue):ue()}else o(W,m,C)},Ce=(g,m,C,j=!1,se=!1)=>{const{type:W,props:ge,ref:be,children:ke,dynamicChildren:ce,shapeFlag:Ne,patchFlag:Ae,dirs:qe,cacheIndex:ie,memo:z}=g;if((Ae===-2||ce&&ce.hasOnce)&&(se=!1),be!=null&&(jn(),Po(be,null,C,g,!0),Dn()),ie!=null&&(!g.ctx||g.ctx===m)&&(m.renderCache[ie]=void 0),Ne&256){m.ctx.deactivate(g);return}const ue=Ne&1&&qe,Le=!Oo(g);let st;if(Le&&(st=ge&&ge.onVnodeBeforeUnmount)&&$n(st,m,g),Ne&6)ft(g.component,C,j);else{if(Ne&128){g.suspense.unmount(C,j);return}ue&&$s(g,null,m,"beforeUnmount"),Ne&64?g.type.remove(g,m,C,bt,j):ce&&!ce.hasOnce&&(W!==Ke||Ae>0&&Ae&64)?Ct(ce,m,C,!1,!0):(W===Ke&&Ae&384||!se&&Ne&16)&&Ct(ke,m,C),j&&fe(g)}const mt=z!=null&&ie==null;(Le&&(st=ge&&ge.onVnodeUnmounted)||ue||mt)&&en(()=>{st&&$n(st,m,g),ue&&$s(g,null,m,"unmounted"),mt&&(g.el=null)},C)},fe=g=>{const{type:m,el:C,anchor:j,transition:se}=g,W=m===Ke;if(W&&!se){De(C,j);return}if(m===jr){E(g),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ge=W?No(g):g,be=()=>{W?_(C)&&De(C,j):r(C),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ge&&ge.shapeFlag&1&&se&&!se.persisted){const{leave:ke,delayLeave:ce}=se,Ne=ge.el,Ae=()=>ke(Ne,be);ce?ce(Ne,be,Ae):Ae()}else be()},De=(g,m)=>{let C;for(;g!==m;)C=T(g),r(g),g=C;r(m)},ft=(g,m,C)=>{const{bum:j,scope:se,job:W,subTree:ge,um:be,m:ke,a:ce}=g;mu(ke),mu(ce),j&&Mr(j),se.stop(),W?(W.flags|=8,Ce(ge,g,m,C)):g.vnode.el&&ge&&(ge.transition=g.vnode.transition,Ce(ge,g,m,C)),be&&en(be,m),en(()=>{g.isUnmounted=!0},m)},Ct=(g,m,C,j=!1,se=!1,W=0)=>{for(let ge=W;ge{if(g.shapeFlag&6)return xt(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=T(g.anchor||g.el),C=m&&m[Cc];return C?T(C):m},qt=(g,m,C)=>{const j=g&&m._vnode?void 0:g&&g.component?g.component.uid:Yp();Qf(()=>{g==null?m._vnode&&Ce(m._vnode,null,null,!0):G(m._vnode||null,g,m,null,null,null,C),m._vnode=g},j)},bt={p:G,um:Ce,m:je,r:fe,mt:Te,mc:te,pc:de,pbc:S,n:xt,o:e};return{render:qt,hydrate:void 0,createApp:$p(qt)}}function fi({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 Vp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ul(e,t,n=!1){const o=e.children,r=t.children;if(Ge(o)&&Ge(r))for(let i=0;i>1,e[n[f]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function mu(e){if(e)for(let t=0;te.__isSuspense;function Up(e,t){t&&t.pendingBranch?Ge(e)?t.effects.push(...e):t.effects.push(e):Xf(e)}const Ke=Symbol.for("v-fgt"),wa=Symbol.for("v-txt"),Yt=Symbol.for("v-cmt"),jr=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function Gc(){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 Yc(e){return e.dynamicChildren=Fo>0?an||Ms:null,Gc(),Fo>0&&an&&an.push(e),e}function P(e,t,n,o,r,i){return Yc(l(e,t,n,o,r,i,!0))}function kt(e,t,n,o,r){return Yc(we(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 Jc=({key:e})=>e??null,Dr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Et(e)||Jt(e)||et(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,o=0,r=null,i=e===Ke?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jc(t),ref:t&&Dr(t),scopeId:wc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:dn};return f?(Yr(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=Et(n)?8:16),Fo>0&&!c&&an&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&an.push(v),v}const we=qp;function qp(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===yp)&&(e=Yt),Vo(e)){const f=fs(e,t,!0);return n&&Yr(f,n),Fo>0&&!i&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(tv(e)&&(e=e.__vccOpts),t){t=Hp(t);let{class:f,style:v}=t;f&&!Et(f)&&(t.class=Xe(f)),vt(v)&&(ol(v)&&!Ge(v)&&(v=Mt({},v)),t.style=zn(v))}const c=Et(e)?1:Wc(e)?128:ha(e)?64:vt(e)?4:et(e)?2:0;return l(e,t,n,o,r,c,i,!0)}function Hp(e){return e?ol(e)||Fc(e)?Mt({},e):e:null}function fs(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?Wp(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Jc(b),ref:t&&t.ref?n&&i?Ge(i)?i.concat(Dr(t)):[i,Dr(t)]:Dr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ke?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fs(e.ssContent),ssFallback:e.ssFallback&&fs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&o&&ds(h,v.clone(h)),h}function gt(e=" ",t=0){return we(wa,null,e,t)}function zp(e,t){const n=we(jr,null,e);return n.staticCount=t,n}function pe(e="",t=!1){return t?($(),kt(Yt,null,e)):we(Yt,null,e)}function Pn(e){return e==null||typeof e=="boolean"?we(Yt):Ge(e)?we(Ke,null,e.slice()):Vo(e)?Un(e):we(wa,null,String(e))}function Un(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(Ge(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&&!Fc(t)?t._ctx=dn:r===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(et(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=[gt(t)]):n=8;e.children=t,e.shapeFlag|=n}function Wp(...e){const t={};for(let n=0;nnn||dn;let Jr,Bo;{const e=pa(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(c=>c(i)):r[0](i)}};Jr=t("__VUE_INSTANCE_SETTERS__",n=>nn=n),Bo=t("__VUE_SSR_SETTERS__",n=>Uo=n)}const Jo=e=>{const t=nn;return Jr(e),e.scope.on(),()=>{e.scope.off(),Jr(t)}},hu=()=>{nn&&nn.scope.off(),Jr(null)};function Qc(e){return e.vnode.shapeFlag&4}let Uo=!1;function Xp(e,t=!1,n=!1){t&&Bo(t);const{props:o,children:r}=e.vnode,i=Qc(e);Ip(e,o,i,t),Kp(e,r,n||t);const c=i?Qp(e,t):void 0;return t&&Bo(!1),c}function Qp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gp);const{setup:o}=n;if(o){jn();const r=e.setupContext=o.length>1?ev(e):null,i=Jo(e),c=Yo(o,e,0,[e.props,r]),f=Hu(c);if(Dn(),i(),(f||e.sp)&&!Oo(e)&&Tc(e),f){if(c.then(hu,hu),t)return c.then(v=>{Bo(!0);try{yu(e,v,t)}finally{Bo(!1)}}).catch(v=>{ma(v,e,0)});e.asyncDep=c}else yu(e,c)}else Zc(e)}function yu(e,t,n){et(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:vt(t)&&(e.setupState=vc(t)),Zc(e)}function Zc(e,t,n){const o=e.type;e.render||(e.render=o.render||Mn);{const r=Jo(e);jn();try{bp(e)}finally{Dn(),r()}}}const Zp={get(e,t){return Gt(e,"get",""),e[t]}};function ev(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Zp),slots:e.slots,emit:e.emit,expose:t}}function _a(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Vf(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 tv(e){return et(e)&&"__vccOpts"in e}const rt=(e,t)=>zf(e,t,Uo);function nv(e,t,n){try{Gr(-1);const o=arguments.length;return o===2?vt(t)&&!Ge(t)?Vo(t)?we(e,null,[t]):we(e,t):we(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Vo(n)&&(n=[n]),we(e,t,n))}finally{Gr(1)}}const sv="3.5.44";/** +**/function Yo(e,t,n,o){try{return o?e(...o):e()}catch(r){ma(r,t,n)}}function mn(e,t,n,o){if(et(e)){const r=Yo(e,t,n,o);return r&&Hu(r)&&r.catch(i=>{ma(i,t,n)}),r}if(We(e)){const r=[];for(let i=0;i>>1,r=tn[o],i=Ko(r);i=Ko(n)?tn.push(e):tn.splice(Jf(t),0,e),e.flags|=1,hc()}}function hc(){Ur||(Ur=mc.then(bc))}function Xf(e){if(!We(e))as&&e.id===-1?as.splice(Js+1,0,e):e.flags&1||(An.push(e),e.flags|=1);else for(let t=0;t=t))continue;tn.splice(o,1),o=e?o-1:yn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function gc(e,t,n=0){if(An.length){let o=An,r=0;if(t){o=[];for(let c=0;cKo(c)-Ko(f));if(An.length=r,as){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function bc(e){try{for(yn=0;yn{o._d&&Gr(-1);const i=qr(t),c=Ds.length;let f;try{f=e(...r)}finally{for(let v=Ds.length;v>c;v--)Gc();qr(i),o._d&&Gr(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function Pe(e,t){if(dn===null)return e;const n=_a(dn),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&et(t)?t.call(o&&o.proxy):t}}const ep=Symbol.for("v-scx"),tp=()=>Ir(ep);function vt(e,t,n){return _c(e,t,n)}function _c(e,t,n=yt){const{immediate:o,deep:r,flush:i,once:c}=n,f=Mt({},n),v=t&&o||!t&&i!=="post";let b;if(Uo){if(i==="sync"){const x=tp();b=x.__watcherHandles||(x.__watcherHandles=[])}else if(!v){const x=()=>{};return x.stop=Mn,x.resume=Mn,x.pause=Mn,x}}const h=nn;f.call=(x,M,G)=>mn(x,h,M,G);let _=!1;i==="post"?f.scheduler=x=>{x.i=h,en(x,h&&h.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(x,M)=>{M?x():rl(x)}),f.augmentJob=x=>{t&&(x.flags|=4),_&&(x.flags|=2,h&&(x.id=h.uid,x.i=h))};const A=Gf(e,t,f);return Uo&&(b?b.push(A):v&&A()),A}function np(e,t,n){const o=this.proxy,r=Et(e)?e.includes(".")?kc(o,e):()=>o[e]:e.bind(o,o);let i;et(t)?i=t:(i=t.handler,n=t);const c=Jo(this),f=_c(r,i.bind(o),n);return c(),f}function kc(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),sp=e=>e&&(e.defer||e.defer===""),ou=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ru=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,$i=(e,t)=>{const n=e&&e.to;return Et(n)?t?t(n):null:n},op={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,c,f,v,b){const{mc:h,pc:_,pbc:A,o:{insert:x,querySelector:M,createText:G,createComment:oe,parentNode:le}}=b,ce=As(t.props);let{dynamicChildren:Y}=t;const E=(B,te,I)=>{B.shapeFlag&16&&h(B.children,te,I,r,i,c,f,v)},U=(B=t)=>{const te=As(B.props),I=B.target=$i(B.props,M),S=Si(I,B,G,x);I&&(c!=="svg"&&ou(I)?c="svg":c!=="mathml"&&ru(I)&&(c="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(I),te||(E(B,I,S),xo(B,!1)))},Q=B=>{const te=()=>{if(os.get(B)===te){if(os.delete(B),As(B.props)){const I=le(B.el)||n;E(B,I,B.anchor),xo(B,!0)}U(B)}};os.set(B,te),en(te,i)};if(e==null){const B=t.el=G(""),te=t.anchor=G("");if(x(B,n,o),x(te,n,o),sp(t.props)||i&&i.pendingBranch){Q(t);return}ce&&(E(t,n,te),xo(t,!0)),U()}else{t.el=e.el;const B=t.anchor=e.anchor,te=os.get(e);if(te){te.flags|=8,os.delete(e),Q(t);return}t.targetStart=e.targetStart;const I=t.target=e.target,S=t.targetAnchor=e.targetAnchor,O=As(e.props),Z=O?n:I,Oe=O?B:S;if(c==="svg"||ou(I)?c="svg":(c==="mathml"||ru(I))&&(c="mathml"),Y?(A(e.dynamicChildren,Y,Z,r,i,c,f),ul(e,t,!0)):v||_(e,t,Z,Oe,r,i,c,f,!1),ce)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tr(t,n,B,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ee=$i(t.props,M);Ee&&(t.target=Ee,Tr(t,Ee,null,b,0))}else O&&Tr(t,I,S,b,1);xo(t,ce)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:h,target:_,props:A}=e,x=As(A),M=i||!x,G=os.get(e);if(G&&(G.flags|=8,os.delete(e)),_&&(r(b),r(h)),i&&r(v),!G&&(x||_)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Oc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],$c={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},ap={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=cl(),o=xc();return()=>{const r=t.default&&al(t.default(),!0),i=r&&r.length?Sc(r):n.subTree?ve():void 0;if(!i)return;const c=dt(e),{mode:f}=c;if(o.isLeaving)return ci(i);const v=Hr(i);if(!v)return ci(i);let b=Ro(v,c,o,n,_=>b=_);v.type!==Yt&&fs(v,b);let h=n.subTree&&Hr(n.subTree);if(h&&h.type!==Yt&&!Ps(h,v)&&Fo(n.subTree)){let _=Ro(h,c,o,n);if(fs(h,_),f==="out-in"&&v.type!==Yt)return o.isLeaving=!0,_.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,h=void 0},ci(i);f==="in-out"&&v.type!==Yt?_.delayLeave=(A,x,M)=>{const G=Ec(o,h);G[String(h.key)]=h,A[cn]=()=>{x(),A[cn]=void 0,delete b.delayedLeave,h=void 0},b.delayedLeave=()=>{M(),delete b.delayedLeave,h=void 0}}:h=void 0}else h&&(h=void 0);return i}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Yt){t=n;break}}return t}const ip=ap;function Ec(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 Ro(e,t,n,o,r){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:h,onEnterCancelled:_,onBeforeLeave:A,onLeave:x,onAfterLeave:M,onLeaveCancelled:G,onBeforeAppear:oe,onAppear:le,onAfterAppear:ce,onAppearCancelled:Y}=t,E=String(e.key),U=Ec(n,e),Q=(I,S)=>{I&&mn(I,o,9,S)},B=(I,S)=>{const O=S[1];Q(I,S),We(I)?I.every(Z=>Z.length<=1)&&O():I.length<=1&&O()},te={mode:c,persisted:f,beforeEnter(I){let S=v;if(!n.isMounted)if(i)S=oe||v;else return;I[cn]&&I[cn](!0);const O=U[E];if(O&&Ps(e,O)){let Z=O.el[cn];if(!Z){const Oe=Fo(O);Z=Oe&&Oe.el[cn]}Z&&Z()}Q(S,[I])},enter(I){if(U[E]===e)return;let S=b,O=h,Z=_;if(!n.isMounted)if(i)S=le||b,O=ce||h,Z=Y||_;else return;let Oe=!1;I[ko]=be=>{Oe||(Oe=!0,be?Q(Z,[I]):Q(O,[I]),te.delayedLeave&&te.delayedLeave(),I[ko]=void 0)};const Ee=I[ko].bind(null,!1);S?B(S,[I,Ee]):Ee()},leave(I,S){const O=String(e.key);if(I[ko]&&I[ko](!0),n.isUnmounting)return S();Q(A,[I]);let Z=!1;I[cn]=Ee=>{Z||(Z=!0,S(),Ee?Q(G,[I]):Q(M,[I]),I[cn]=void 0,U[O]===e&&delete U[O])};const Oe=I[cn].bind(null,!1);U[O]=e,x?B(x,[I,Oe]):Oe()},clone(I){const S=Ro(I,t,n,o,r);return r&&r(S),S}};return te}function ci(e){if(ya(e))return e=ps(e),e.children=null,e}function Hr(e){if(!ya(e))return ha(e.type)&&e.children?Sc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&et(n.default))return n.default()}}function fs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;fs(ha(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===je&&We(e.children)){const n=Lc(e.children,!1);n&&fs(n,t)}}function al(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;iPo(G,t&&(We(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 i=o.shapeFlag&4?_a(o.component):o.el,c=r?null:i,{i:f,r:v}=e,b=t&&t.r,h=f.refs===yt?f.refs={}:f.refs,_=f.setupState,A=dt(_),x=_===yt?qu:G=>au(h,G)?!1:pt(A,G),M=(G,oe)=>!(oe&&au(h,oe));if(b!=null&&b!==v){if(iu(t),Et(b))h[b]=null,x(b)&&(_[b]=null);else if(Jt(b)){const G=t;M(b,G.k)&&(b.value=null),G.k&&(h[G.k]=null)}}if(et(v))Yo(v,f,12,[c,h]);else{const G=Et(v),oe=Jt(v);if(G||oe){const le=()=>{if(e.f){const ce=G?x(v)?_[v]:h[v]:M()||!e.k?v.value:h[e.k];if(r)We(ce)&&Yi(ce,i);else if(We(ce))ce.includes(i)||ce.push(i);else if(G)h[v]=[i],x(v)&&(_[v]=h[v]);else{const Y=[i];M(v,e.k)&&(v.value=Y),e.k&&(h[e.k]=Y)}}else G?(h[v]=c,x(v)&&(_[v]=c)):oe&&(M(v,e.k)&&(v.value=c),e.k&&(h[e.k]=c))};if(c){const ce=()=>{le(),zr.delete(e)};ce.id=-1,zr.set(e,ce),en(ce,n)}else iu(e),le()}}}function iu(e){const t=zr.get(e);t&&(t.flags|=8,zr.delete(e))}pa().requestIdleCallback;pa().cancelIdleCallback;const Oo=e=>!!e.type.__asyncLoader,ya=e=>e.type.__isKeepAlive;function lp(e,t){Ac(e,"a",t)}function up(e,t){Ac(e,"da",t)}function Ac(e,t,n=nn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ga(t,o,n),n){let r=n.parent;for(;r&&r.parent;)ya(r.parent.vnode)&&cp(o,t,n,r),r=r.parent}}function cp(e,t,n,o){const r=ga(t,e,o,!0);Cn(()=>{Yi(o[t],r)},n)}function ga(e,t,n=nn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{jn();const f=Jo(n),v=mn(t,n,e,c);return f(),Dn(),v});return o?r.unshift(i):r.push(i),i}}const Yn=e=>(t,n=nn)=>{(!Uo||e==="sp")&&ga(e,(...o)=>t(...o),n)},dp=Yn("bm"),ln=Yn("m"),fp=Yn("bu"),Pc=Yn("u"),Oc=Yn("bum"),Cn=Yn("um"),pp=Yn("sp"),vp=Yn("rtg"),mp=Yn("rtc");function hp(e,t=nn){ga("ec",e,t)}const yp=Symbol.for("v-ndc");function nt(e,t,n,o){let r;const i=n,c=We(e);if(c||Et(e)){const f=c&&us(e);let v=!1,b=!1;f&&(v=!fn(e),b=Ln(e),e=va(e)),r=new Array(e.length);for(let h=0,_=e.length;h<_;h++)r[h]=t(v?b?ds(vn(e[h])):vn(e[h]):e[h],h,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);r=new Array(f.length);for(let v=0,b=f.length;ve?Qc(e)?_a(e):Ei(e.parent):null,Mo=Mt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ic(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=Rs.bind(e.proxy)),$watch:e=>np.bind(e)}),di=(e,t)=>e!==yt&&!e.__isScriptSetup&&pt(e,t),gp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const A=c[t];if(A!==void 0)switch(A){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(di(o,t))return c[t]=1,o[t];if(r!==yt&&pt(r,t))return c[t]=2,r[t];if(pt(i,t))return c[t]=3,i[t];if(n!==yt&&pt(n,t))return c[t]=4,n[t];Ti&&(c[t]=0)}}const b=Mo[t];let h,_;if(b)return t==="$attrs"&&Gt(e.attrs,"get",""),b(e);if((h=f.__cssModules)&&(h=h[t]))return h;if(n!==yt&&pt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,pt(_,t))return _[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return di(r,t)?(r[t]=n,!0):o!==yt&&pt(o,t)?(o[t]=n,!0):pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:i,type:c}},f){let v;return!!(n[f]||e!==yt&&f[0]!=="$"&&pt(e,f)||di(t,f)||pt(i,f)||pt(o,f)||pt(Mo,f)||pt(r.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function lu(e){return We(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ti=!0;function bp(e){const t=Ic(e),n=e.proxy,o=e.ctx;Ti=!1,t.beforeCreate&&uu(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:c,watch:f,provide:v,inject:b,created:h,beforeMount:_,mounted:A,beforeUpdate:x,updated:M,activated:G,deactivated:oe,beforeDestroy:le,beforeUnmount:ce,destroyed:Y,unmounted:E,render:U,renderTracked:Q,renderTriggered:B,errorCaptured:te,serverPrefetch:I,expose:S,inheritAttrs:O,components:Z,directives:Oe,filters:Ee}=t;if(b&&wp(b,o,null),c)for(const He in c){const qe=c[He];et(qe)&&(o[He]=qe.bind(n))}if(r){const He=r.call(n,n);mt(He)&&(e.data=nl(He))}if(Ti=!0,i)for(const He in i){const qe=i[He],Xe=et(qe)?qe.bind(n,n):et(qe.get)?qe.get.bind(n,n):Mn,pe=!et(qe)&&et(qe.set)?qe.set.bind(n):Mn,me=ot({get:Xe,set:pe});Object.defineProperty(o,He,{enumerable:!0,configurable:!0,get:()=>me.value,set:re=>me.value=re})}if(f)for(const He in f)Mc(f[He],o,n,He);if(v){const He=et(v)?v.call(n):v;Reflect.ownKeys(He).forEach(qe=>{Zf(qe,He[qe])})}h&&uu(h,e,"c");function Ae(He,qe){We(qe)?qe.forEach(Xe=>He(Xe.bind(n))):qe&&He(qe.bind(n))}if(Ae(dp,_),Ae(ln,A),Ae(fp,x),Ae(Pc,M),Ae(lp,G),Ae(up,oe),Ae(hp,te),Ae(mp,Q),Ae(vp,B),Ae(Oc,ce),Ae(Cn,E),Ae(pp,I),We(S))if(S.length){const He=e.exposed||(e.exposed={});S.forEach(qe=>{Object.defineProperty(He,qe,{get:()=>n[qe],set:Xe=>n[qe]=Xe,enumerable:!0})})}else e.exposed||(e.exposed={});U&&e.render===Mn&&(e.render=U),O!=null&&(e.inheritAttrs=O),Z&&(e.components=Z),Oe&&(e.directives=Oe),I&&Tc(e)}function wp(e,t,n=Mn){We(e)&&(e=Ai(e));for(const o in e){const r=e[o];let i;mt(r)?"default"in r?i=Ir(r.from||o,r.default,!0):i=Ir(r.from||o):i=Ir(r),Jt(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[o]=i}}function uu(e,t,n){mn(We(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mc(e,t,n,o){let r=o.includes(".")?kc(n,o):()=>n[o];if(Et(e)){const i=t[e];et(i)&&vt(r,i)}else if(et(e))vt(r,e.bind(n));else if(mt(e))if(We(e))e.forEach(i=>Mc(i,t,n,o));else{const i=et(e.handler)?e.handler.bind(n):t[e.handler];et(i)&&vt(r,i,e)}}function Ic(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!r.length&&!n&&!o?v=t:(v={},r.length&&r.forEach(b=>Wr(v,b,c,!0)),Wr(v,t,c)),mt(t)&&i.set(t,v),v}function Wr(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&Wr(e,i,n,!0),r&&r.forEach(c=>Wr(e,c,n,!0));for(const c in t)if(!(o&&c==="expose")){const f=_p[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const _p={data:cu,props:du,emits:du,methods:$o,computed:$o,beforeCreate:Zt,created:Zt,beforeMount:Zt,mounted:Zt,beforeUpdate:Zt,updated:Zt,beforeDestroy:Zt,beforeUnmount:Zt,destroyed:Zt,unmounted:Zt,activated:Zt,deactivated:Zt,errorCaptured:Zt,serverPrefetch:Zt,components:$o,directives:$o,watch:Cp,provide:cu,inject:kp};function cu(e,t){return t?e?function(){return Mt(et(e)?e.call(this,this):e,et(t)?t.call(this,this):t)}:t:e}function kp(e,t){return $o(Ai(e),Ai(t))}function Ai(e){if(We(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${gn(t)}Modifiers`]||e[`${ms(t)}Modifiers`];function Ep(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||yt;let r=n;const i=t.startsWith("update:"),c=i&&Sp(o,t.slice(7));c&&(c.trim&&(r=n.map(h=>Et(h)?h.trim():h)),c.number&&(r=r.map(fa)));let f,v=o[f=oi(t)]||o[f=oi(gn(t))];!v&&i&&(v=o[f=oi(ms(t))]),v&&mn(v,e,6,r);const b=o[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(b,e,6,r)}}const Tp=new WeakMap;function Dc(e,t,n=!1){const o=n?Tp:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let c={},f=!1;if(!et(e)){const v=b=>{const h=Dc(b,t,!0);h&&(f=!0,Mt(c,h))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(mt(e)&&o.set(e,null),null):(We(i)?i.forEach(v=>c[v]=null):Mt(c,i),mt(e)&&o.set(e,c),c)}function ba(e,t){return!e||!ua(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pt(e,t[0].toLowerCase()+t.slice(1))||pt(e,ms(t))||pt(e,t))}function fu(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:h,props:_,data:A,setupState:x,ctx:M,inheritAttrs:G}=e,oe=qr(e);let le,ce;try{if(n.shapeFlag&4){const E=r||o,U=E;le=Pn(b.call(U,E,h,_,x,A,M)),ce=f}else{const E=t;le=Pn(E.length>1?E(_,{attrs:f,slots:c,emit:v}):E(_,null)),ce=t.props?f:Ap(f)}}catch(E){Ds.length=0,ma(E,e,1),le=ke(Yt)}let Y=le;if(ce&&G!==!1){const E=Object.keys(ce),{shapeFlag:U}=Y;E.length&&U&7&&(i&&E.some(ca)&&(ce=Pp(ce,i)),Y=ps(Y,ce,!1,!0))}if(n.dirs&&(Y=ps(Y,null,!1,!0),Y.dirs=Y.dirs?Y.dirs.concat(n.dirs):n.dirs),n.transition){const E=ha(Y.type)&&Hr(Y)||Y;fs(E,n.transition)}return le=Y,qr(oe),le}function Lc(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||ua(n))&&((t||(t={}))[n]=e[n]);return t},Pp=(e,t)=>{const n={};for(const o in e)(!ca(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Op(e,t,n){const{props:o,children:r,component:i}=e,{props:c,children:f,patchFlag:v}=t,b=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return o?pu(o,c,b):!!c;if(v&8){const h=t.dynamicProps;for(let _=0;_Object.create(Rc),Nc=e=>Object.getPrototypeOf(e)===Rc;function Ip(e,t,n,o=!1){const r={},i=Fc();e.propsDefaults=Object.create(null),Vc(e,t,r,i);for(const c in e.propsOptions[0])c in r||(r[c]=void 0);n?e.props=o?r:Nf(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function jp(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:c}}=e,f=dt(r),[v]=e.propsOptions;let b=!1;if((o||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[A,x]=Bc(_,t,!0);Mt(c,A),x&&f.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!v)return mt(e)&&o.set(e,Ms),Ms;if(We(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",ll=e=>We(e)?e.map(Pn):[Pn(e)],Lp=(e,t,n)=>{if(t._n)return t;const o=Rn((...r)=>ll(t(...r)),n);return o._c=!1,o},Uc=(e,t,n)=>{const o=e._ctx;for(const r in e){if(il(r))continue;const i=e[r];if(et(i))t[r]=Lp(r,i,o);else if(i!=null){const c=ll(i);t[r]=()=>c}}},qc=(e,t)=>{const n=ll(t);e.slots.default=()=>n},Hc=(e,t,n)=>{for(const o in t)(n||!il(o))&&(e[o]=t[o])},Kp=(e,t,n)=>{const o=e.slots=Fc();if(e.vnode.shapeFlag&32){const r=t._;r?(Hc(o,t,n),n&&Yu(o,"_",r,!0)):Uc(t,o)}else t&&qc(e,t)},Rp=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,c=yt;if(o.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:Hc(r,t,n):(i=!t.$stable,Uc(t,r)),c=t}else t&&(qc(e,t),c={default:1});if(i)for(const f in r)!il(f)&&c[f]==null&&delete r[f]},en=Up;function Fp(e){return Np(e)}function Np(e,t){const n=pa();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:h,parentNode:_,nextSibling:A,setScopeId:x=Mn,insertStaticContent:M}=e,G=(g,m,C,j=null,se=null,W=null,we=void 0,_e=null,xe=!!m.dynamicChildren)=>{if(g===m)return;g&&!Ps(g,m)&&(j=xt(g),re(g,se,W,!0),g=null),m.patchFlag===-2&&(xe=!1,m.dynamicChildren=null),m.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(m.dynamicChildren===Ms&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:fe,ref:Ke,shapeFlag:Te}=m;switch(fe){case wa:oe(g,m,C,j);break;case Yt:le(g,m,C,j);break;case jr:g==null&&ce(m,C,j,we);break;case je:Z(g,m,C,j,se,W,we,_e,xe);break;default:Te&1?U(g,m,C,j,se,W,we,_e,xe):Te&6?Oe(g,m,C,j,se,W,we,_e,xe):(Te&64||Te&128)&&fe.process(g,m,C,j,se,W,we,_e,xe,bt)}Ke!=null&&se?Po(Ke,g&&g.ref,W,m||g,!m):Ke==null&&g&&g.ref!=null&&Po(g.ref,null,W,g,!0)},oe=(g,m,C,j)=>{if(g==null)o(m.el=f(m.children),C,j);else{const se=m.el=g.el;m.children!==g.children&&b(se,m.children)}},le=(g,m,C,j)=>{g==null?o(m.el=v(m.children||""),C,j):m.el=g.el},ce=(g,m,C,j)=>{[g.el,g.anchor]=M(g.children,m,C,j,g.el,g.anchor)},Y=({el:g,anchor:m},C,j)=>{let se;for(;g&&g!==m;)se=A(g),o(g,C,j),g=se;o(m,C,j)},E=({el:g,anchor:m})=>{let C;for(;g&&g!==m;)C=A(g),r(g),g=C;r(m)},U=(g,m,C,j,se,W,we,_e,xe)=>{if(m.type==="svg"?we="svg":m.type==="math"&&(we="mathml"),g==null)Q(m,C,j,se,W,we,_e,xe);else{const fe=g.el&&g.el._isVueCE?g.el:null;try{fe&&fe._beginPatch(),I(g,m,se,W,we,_e,xe)}finally{fe&&fe._endPatch()}}},Q=(g,m,C,j,se,W,we,_e)=>{let xe,fe;const{props:Ke,shapeFlag:Te,transition:Be,dirs:ue}=g;if(xe=g.el=c(g.type,W,Ke&&Ke.is,Ke),Te&8?h(xe,g.children):Te&16&&te(g.children,xe,null,j,se,fi(g,W),we,_e),ue&&$s(g,null,j,"created"),B(xe,g,g.scopeId,we,j),Ke){for(const de in Ke)de!=="value"&&!Eo(de)&&i(xe,de,null,Ke[de],W,j);"value"in Ke&&i(xe,"value",null,Ke.value,W),(fe=Ke.onVnodeBeforeMount)&&$n(fe,j,g)}ue&&$s(g,null,j,"beforeMount");const z=Vp(se,Be);z&&Be.beforeEnter(xe),o(xe,m,C),((fe=Ke&&Ke.onVnodeMounted)||z||ue)&&en(()=>{try{fe&&$n(fe,j,g),z&&Be.enter(xe),ue&&$s(g,null,j,"mounted")}finally{}},se)},B=(g,m,C,j,se)=>{if(C&&x(g,C),j)for(let W=0;W{for(let fe=xe;fe{const _e=m.el=g.el;let{patchFlag:xe,dynamicChildren:fe,dirs:Ke}=m;xe|=g.patchFlag&16;const Te=g.props||yt,Be=m.props||yt;let ue;if(C&&Ss(C,!1),(ue=Be.onVnodeBeforeUpdate)&&$n(ue,C,m,g),Ke&&$s(m,g,C,"beforeUpdate"),C&&Ss(C,!0),fe&&(!g.dynamicChildren||g.dynamicChildren.length!==fe.length)&&(xe=0,we=!1,fe=null),(Te.innerHTML&&Be.innerHTML==null||Te.textContent&&Be.textContent==null)&&h(_e,""),fe?S(g.dynamicChildren,fe,_e,C,j,fi(m,se),W):we||qe(g,m,_e,null,C,j,fi(m,se),W,!1),xe>0){if(xe&16)O(_e,Te,Be,C,se);else if(xe&2&&Te.class!==Be.class&&i(_e,"class",null,Be.class,se),xe&4&&i(_e,"style",Te.style,Be.style,se),xe&8){const z=m.dynamicProps;for(let de=0;de{ue&&$n(ue,C,m,g),Ke&&$s(m,g,C,"updated")},j)},S=(g,m,C,j,se,W,we)=>{for(let _e=0;_e{if(m!==C){if(m!==yt)for(const W in m)!Eo(W)&&!(W in C)&&i(g,W,m[W],null,se,j);for(const W in C){if(Eo(W))continue;const we=C[W],_e=m[W];we!==_e&&W!=="value"&&i(g,W,_e,we,se,j)}"value"in C&&i(g,"value",m.value,C.value,se)}},Z=(g,m,C,j,se,W,we,_e,xe)=>{const fe=m.el=g?g.el:f(""),Ke=m.anchor=g?g.anchor:f("");let{patchFlag:Te,dynamicChildren:Be,slotScopeIds:ue}=m;ue&&(_e=_e?_e.concat(ue):ue),g==null?(o(fe,C,j),o(Ke,C,j),te(m.children||[],C,Ke,se,W,we,_e,xe)):Te>0&&Te&64&&Be&&g.dynamicChildren&&g.dynamicChildren.length===Be.length?(S(g.dynamicChildren,Be,C,se,W,we,_e),(m.key!=null||se&&m===se.subTree)&&ul(g,m,!0)):qe(g,m,C,Ke,se,W,we,_e,xe)},Oe=(g,m,C,j,se,W,we,_e,xe)=>{m.slotScopeIds=_e,g==null?m.shapeFlag&512?se.ctx.activate(m,C,j,we,xe):Ee(m,C,j,se,W,we,xe):be(g,m,xe)},Ee=(g,m,C,j,se,W,we)=>{const _e=g.component=Jp(g,j,se);if(ya(g)&&(_e.ctx.renderer=bt),Xp(_e,!1,we),_e.asyncDep){if(se&&se.registerDep(_e,Ae,we,W),!g.el){const xe=_e.subTree=ke(Yt);le(null,xe,m,C),g.placeholder=xe.el}}else Ae(_e,g,m,C,se,W,we)},be=(g,m,C)=>{const j=m.component=g.component;if(Op(g,m,C))if(j.asyncDep&&!j.asyncResolved){m.el=g.el,m.placeholder=g.placeholder,He(j,m,C);return}else j.next=m,j.update();else m.el=g.el,m.placeholder=g.placeholder,j.vnode=m},Ae=(g,m,C,j,se,W,we)=>{const _e=()=>{if(g.isMounted){let{next:Te,bu:Be,u:ue,parent:z,vnode:de}=g;{const Qe=zc(g);if(Qe){Te&&(Te.el=de.el,He(g,Te,we)),Qe.asyncDep.then(()=>{en(()=>{g.isUnmounted||fe()},se)});return}}let De=Te,st;Ss(g,!1),Te?(Te.el=de.el,He(g,Te,we)):Te=de,Be&&Mr(Be),(st=Te.props&&Te.props.onVnodeBeforeUpdate)&&$n(st,z,Te,de),Ss(g,!0);const ht=fu(g),It=g.subTree;g.subTree=ht,G(It,ht,_(It.el),xt(It),g,se,W),Te.el=ht.el,De===null&&Mp(g,ht.el),ue&&en(ue,se),(st=Te.props&&Te.props.onVnodeUpdated)&&en(()=>$n(st,z,Te,de),se)}else{let Te;const{el:Be,props:ue}=m,{bm:z,m:de,parent:De,root:st,type:ht}=g,It=Oo(m);Ss(g,!1),z&&Mr(z),!It&&(Te=ue&&ue.onVnodeBeforeMount)&&$n(Te,De,m),Ss(g,!0);{st.ce&&st.ce._hasShadowRoot()&&st.ce._injectChildStyle(ht,g.parent?g.parent.type:void 0);const Qe=g.subTree=fu(g);G(null,Qe,C,j,g,se,W),m.el=Qe.el}if(de&&en(de,se),!It&&(Te=ue&&ue.onVnodeMounted)){const Qe=m;en(()=>$n(Te,De,Qe),se)}(m.shapeFlag&256||De&&Oo(De.vnode)&&De.vnode.shapeFlag&256)&&g.a&&en(g.a,se),g.isMounted=!0,m=C=j=null}};g.scope.on();const xe=g.effect=new Zu(_e);g.scope.off();const fe=g.update=xe.run.bind(xe),Ke=g.job=xe.runIfDirty.bind(xe);Ke.i=g,Ke.id=g.uid,xe.scheduler=()=>rl(Ke),Ss(g,!0),fe()},He=(g,m,C)=>{m.component=g;const j=g.vnode.props;g.vnode=m,g.next=null,jp(g,m.props,j,C),Rp(g,m.children,C),jn(),yc(g),Dn()},qe=(g,m,C,j,se,W,we,_e,xe=!1)=>{const fe=g&&g.children,Ke=g?g.shapeFlag:0,Te=m.children,{patchFlag:Be,shapeFlag:ue}=m;if(Be>0){if(Be&128){pe(fe,Te,C,j,se,W,we,_e,xe);return}else if(Be&256){Xe(fe,Te,C,j,se,W,we,_e,xe);return}}ue&8?(Ke&16&&Ct(fe,se,W),Te!==fe&&h(C,Te)):Ke&16?ue&16?pe(fe,Te,C,j,se,W,we,_e,xe):Ct(fe,se,W,!0):(Ke&8&&h(C,""),ue&16&&te(Te,C,j,se,W,we,_e,xe))},Xe=(g,m,C,j,se,W,we,_e,xe)=>{g=g||Ms,m=m||Ms;const fe=g.length,Ke=m.length,Te=Math.min(fe,Ke);let Be;for(Be=0;BeKe?Ct(g,se,W,!0,!1,Te):te(m,C,j,se,W,we,_e,xe,Te)},pe=(g,m,C,j,se,W,we,_e,xe)=>{let fe=0;const Ke=m.length;let Te=g.length-1,Be=Ke-1;for(;fe<=Te&&fe<=Be;){const ue=g[fe],z=m[fe]=xe?Un(m[fe]):Pn(m[fe]);if(Ps(ue,z))G(ue,z,C,null,se,W,we,_e,xe);else break;fe++}for(;fe<=Te&&fe<=Be;){const ue=g[Te],z=m[Be]=xe?Un(m[Be]):Pn(m[Be]);if(Ps(ue,z))G(ue,z,C,null,se,W,we,_e,xe);else break;Te--,Be--}if(fe>Te){if(fe<=Be){const ue=Be+1,z=ueBe)for(;fe<=Te;)re(g[fe],se,W,!0),fe++;else{const ue=fe,z=fe,de=new Map;for(fe=z;fe<=Be;fe++){const Vt=m[fe]=xe?Un(m[fe]):Pn(m[fe]);Vt.key!=null&&de.set(Vt.key,fe)}let De,st=0;const ht=Be-z+1;let It=!1,Qe=0;const Xt=new Array(ht);for(fe=0;fe=ht){re(Vt,se,W,!0);continue}let jt;if(Vt.key!=null)jt=de.get(Vt.key);else for(De=z;De<=Be;De++)if(Xt[De-z]===0&&Ps(Vt,m[De])){jt=De;break}jt===void 0?re(Vt,se,W,!0):(Xt[jt-z]=fe+1,jt>=Qe?Qe=jt:It=!0,G(Vt,m[jt],C,null,se,W,we,_e,xe),st++)}const ys=It?Bp(Xt):Ms;for(De=ys.length-1,fe=ht-1;fe>=0;fe--){const Vt=z+fe,jt=m[Vt],Ue=m[Vt+1],Jn=Vt+1{const{el:W,type:we,transition:_e,children:xe,shapeFlag:fe}=g;if(fe&6){me(g.component.subTree,m,C,j);return}if(fe&128){g.suspense.move(m,C,j);return}if(fe&64){we.move(g,m,C,bt);return}if(we===je){o(W,m,C);for(let Te=0;Te_e.enter(W),se));else{const{leave:Te,delayLeave:Be,afterLeave:ue}=_e,z=()=>{g.ctx.isUnmounted?r(W):o(W,m,C)},de=()=>{const De=W._isLeaving||!!W[cn];W._isLeaving&&W[cn](!0),_e.persisted&&!De?z():Te(W,()=>{z(),ue&&ue()})};Be?Be(W,z,de):de()}else o(W,m,C)},re=(g,m,C,j=!1,se=!1)=>{const{type:W,props:we,ref:_e,children:xe,dynamicChildren:fe,shapeFlag:Ke,patchFlag:Te,dirs:Be,cacheIndex:ue,memo:z}=g;if((Te===-2||fe&&fe.hasOnce)&&(se=!1),_e!=null&&(jn(),Po(_e,null,C,g,!0),Dn()),ue!=null&&(!g.ctx||g.ctx===m)&&(m.renderCache[ue]=void 0),Ke&256){m.ctx.deactivate(g);return}const de=Ke&1&&Be,De=!Oo(g);let st;if(De&&(st=we&&we.onVnodeBeforeUnmount)&&$n(st,m,g),Ke&6)ft(g.component,C,j);else{if(Ke&128){g.suspense.unmount(C,j);return}de&&$s(g,null,m,"beforeUnmount"),Ke&64?g.type.remove(g,m,C,bt,j):fe&&!fe.hasOnce&&(W!==je||Te>0&&Te&64)?Ct(fe,m,C,!1,!0):(W===je&&Te&384||!se&&Ke&16)&&Ct(xe,m,C),j&&ae(g)}const ht=z!=null&&ue==null;(De&&(st=we&&we.onVnodeUnmounted)||de||ht)&&en(()=>{st&&$n(st,m,g),de&&$s(g,null,m,"unmounted"),ht&&(g.el=null)},C)},ae=g=>{const{type:m,el:C,anchor:j,transition:se}=g,W=m===je;if(W&&!se){Me(C,j);return}if(m===jr){E(g),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const we=W?Fo(g):g,_e=()=>{W?_(C)&&Me(C,j):r(C),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(we&&we.shapeFlag&1&&se&&!se.persisted){const{leave:xe,delayLeave:fe}=se,Ke=we.el,Te=()=>xe(Ke,_e);fe?fe(Ke,_e,Te):Te()}else _e()},Me=(g,m)=>{let C;for(;g!==m;)C=A(g),r(g),g=C;r(m)},ft=(g,m,C)=>{const{bum:j,scope:se,job:W,subTree:we,um:_e,m:xe,a:fe}=g;mu(xe),mu(fe),j&&Mr(j),se.stop(),W?(W.flags|=8,re(we,g,m,C)):g.vnode.el&&we&&(we.transition=g.vnode.transition,re(we,g,m,C)),_e&&en(_e,m),en(()=>{g.isUnmounted=!0},m)},Ct=(g,m,C,j=!1,se=!1,W=0)=>{for(let we=W;we{if(g.shapeFlag&6)return xt(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=A(g.anchor||g.el),C=m&&m[Cc];return C?A(C):m},qt=(g,m,C)=>{const j=g&&m._vnode?void 0:g&&g.component?g.component.uid:Yp();Qf(()=>{g==null?m._vnode&&re(m._vnode,null,null,!0):G(m._vnode||null,g,m,null,null,null,C),m._vnode=g},j)},bt={p:G,um:re,m:me,r:ae,mt:Ee,mc:te,pc:qe,pbc:S,n:xt,o:e};return{render:qt,hydrate:void 0,createApp:$p(qt)}}function fi({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 Vp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ul(e,t,n=!1){const o=e.children,r=t.children;if(We(o)&&We(r))for(let i=0;i>1,e[n[f]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function mu(e){if(e)for(let t=0;te.__isSuspense;function Up(e,t){t&&t.pendingBranch?We(e)?t.effects.push(...e):t.effects.push(e):Xf(e)}const je=Symbol.for("v-fgt"),wa=Symbol.for("v-txt"),Yt=Symbol.for("v-cmt"),jr=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function Gc(){Ds.pop(),an=Ds[Ds.length-1]||null}let No=1;function Gr(e,t=!1){No+=e,e<0&&an&&t&&(an.hasOnce=!0)}function Yc(e){return e.dynamicChildren=No>0?an||Ms:null,Gc(),No>0&&an&&an.push(e),e}function T(e,t,n,o,r,i){return Yc(l(e,t,n,o,r,i,!0))}function kt(e,t,n,o,r){return Yc(ke(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 Jc=({key:e})=>e??null,Dr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Et(e)||Jt(e)||et(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,o=0,r=null,i=e===je?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jc(t),ref:t&&Dr(t),scopeId:wc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:dn};return f?(Yr(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=Et(n)?8:16),No>0&&!c&&an&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&an.push(v),v}const ke=qp;function qp(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===yp)&&(e=Yt),Vo(e)){const f=ps(e,t,!0);return n&&Yr(f,n),No>0&&!i&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(tv(e)&&(e=e.__vccOpts),t){t=Hp(t);let{class:f,style:v}=t;f&&!Et(f)&&(t.class=Je(f)),mt(v)&&(ol(v)&&!We(v)&&(v=Mt({},v)),t.style=zn(v))}const c=Et(e)?1:Wc(e)?128:ha(e)?64:mt(e)?4:et(e)?2:0;return l(e,t,n,o,r,c,i,!0)}function Hp(e){return e?ol(e)||Nc(e)?Mt({},e):e:null}function ps(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?Wp(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Jc(b),ref:t&&t.ref?n&&i?We(i)?i.concat(Dr(t)):[i,Dr(t)]:Dr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ps(e.ssContent),ssFallback:e.ssFallback&&ps(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&o&&fs(h,v.clone(h)),h}function gt(e=" ",t=0){return ke(wa,null,e,t)}function zp(e,t){const n=ke(jr,null,e);return n.staticCount=t,n}function ve(e="",t=!1){return t?($(),kt(Yt,null,e)):ke(Yt,null,e)}function Pn(e){return e==null||typeof e=="boolean"?ke(Yt):We(e)?ke(je,null,e.slice()):Vo(e)?Un(e):ke(wa,null,String(e))}function Un(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ps(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&&!Nc(t)?t._ctx=dn:r===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(et(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=[gt(t)]):n=8;e.children=t,e.shapeFlag|=n}function Wp(...e){const t={};for(let n=0;nnn||dn;let Jr,Bo;{const e=pa(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(c=>c(i)):r[0](i)}};Jr=t("__VUE_INSTANCE_SETTERS__",n=>nn=n),Bo=t("__VUE_SSR_SETTERS__",n=>Uo=n)}const Jo=e=>{const t=nn;return Jr(e),e.scope.on(),()=>{e.scope.off(),Jr(t)}},hu=()=>{nn&&nn.scope.off(),Jr(null)};function Qc(e){return e.vnode.shapeFlag&4}let Uo=!1;function Xp(e,t=!1,n=!1){t&&Bo(t);const{props:o,children:r}=e.vnode,i=Qc(e);Ip(e,o,i,t),Kp(e,r,n||t);const c=i?Qp(e,t):void 0;return t&&Bo(!1),c}function Qp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gp);const{setup:o}=n;if(o){jn();const r=e.setupContext=o.length>1?ev(e):null,i=Jo(e),c=Yo(o,e,0,[e.props,r]),f=Hu(c);if(Dn(),i(),(f||e.sp)&&!Oo(e)&&Tc(e),f){if(c.then(hu,hu),t)return c.then(v=>{Bo(!0);try{yu(e,v,t)}finally{Bo(!1)}}).catch(v=>{ma(v,e,0)});e.asyncDep=c}else yu(e,c)}else Zc(e)}function yu(e,t,n){et(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:mt(t)&&(e.setupState=vc(t)),Zc(e)}function Zc(e,t,n){const o=e.type;e.render||(e.render=o.render||Mn);{const r=Jo(e);jn();try{bp(e)}finally{Dn(),r()}}}const Zp={get(e,t){return Gt(e,"get",""),e[t]}};function ev(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Zp),slots:e.slots,emit:e.emit,expose:t}}function _a(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Vf(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 tv(e){return et(e)&&"__vccOpts"in e}const ot=(e,t)=>zf(e,t,Uo);function nv(e,t,n){try{Gr(-1);const o=arguments.length;return o===2?mt(t)&&!We(t)?Vo(t)?ke(e,null,[t]):ke(e,t):ke(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Vo(n)&&(n=[n]),ke(e,t,n))}finally{Gr(1)}}const sv="3.5.44";/** * @vue/runtime-dom v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Mi;const gu=typeof window<"u"&&window.trustedTypes;if(gu)try{Mi=gu.createPolicy("vue",{createHTML:e=>e})}catch{}const ed=Mi?e=>Mi.createHTML(e):e=>e,ov="http://www.w3.org/2000/svg",rv="http://www.w3.org/1998/Math/MathML",Bn=typeof document<"u"?document:null,bu=Bn&&Bn.createElement("template"),av={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(ov,e):t==="mathml"?Bn.createElementNS(rv,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,i){const c=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{bu.innerHTML=ed(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const f=bu.content;if(o==="svg"||o==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ns="transition",Co="animation",so=Symbol("_vtc"),td={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nd=Mt({},$c,td),iv=e=>(e.displayName="Transition",e.props=nd,e),hs=iv((e,{slots:t})=>nv(ip,sd(e),t)),Es=(e,t=[])=>{Ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},wu=e=>e?Ge(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const Z in e)Z in td||(t[Z]=e[Z]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:h=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:T=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,M=lv(r),G=M&&M[0],oe=M&&M[1],{onBeforeEnter:ae,onEnter:le,onEnterCancelled:Y,onLeave:E,onLeaveCancelled:U,onBeforeAppear:Q=ae,onAppear:V=le,onAppearCancelled:te=Y}=t,I=(Z,Oe,Te,ye)=>{Z._enterCancelled=ye,os(Z,Oe?h:f),os(Z,Oe?b:c),Te&&Te()},S=(Z,Oe)=>{Z._isLeaving=!1,os(Z,_),os(Z,x),os(Z,T),Oe&&Oe()},O=Z=>(Oe,Te)=>{const ye=Z?V:le,Pe=()=>I(Oe,Z,Te);Es(ye,[Oe,Pe]),_u(()=>{os(Oe,Z?v:i),Sn(Oe,Z?h:f),wu(ye)||ku(Oe,o,G,Pe)})};return Mt(t,{onBeforeEnter(Z){Es(ae,[Z]),Sn(Z,i),Sn(Z,c)},onBeforeAppear(Z){Es(Q,[Z]),Sn(Z,v),Sn(Z,b)},onEnter:O(!1),onAppear:O(!0),onLeave(Z,Oe){Z._isLeaving=!0;const Te=()=>S(Z,Oe);Sn(Z,_),Z._enterCancelled?(Sn(Z,T),Ii(Z)):(Ii(Z),Sn(Z,T)),_u(()=>{Z._isLeaving&&(os(Z,_),Sn(Z,x),wu(E)||ku(Z,o,oe,Te))}),Es(E,[Z,Te])},onEnterCancelled(Z){I(Z,!1,void 0,!0),Es(Y,[Z])},onAppearCancelled(Z){I(Z,!0,void 0,!0),Es(te,[Z])},onLeaveCancelled(Z){S(Z),Es(U,[Z])}})}function lv(e){if(e==null)return null;if(vt(e))return[pi(e.enter),pi(e.leave)];{const t=pi(e);return[t,t]}}function pi(e){return ff(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 _u(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uv=0;function ku(e,t,n,o){const r=e._endId=++uv,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=od(e,t);if(!c)return o();const b=c+"end";let h=0;const _=()=>{e.removeEventListener(b,T),i()},T=x=>{x.target===e&&++h>=v&&_()};setTimeout(()=>{h(n[M]||"").split(", "),r=o(`${ns}Delay`),i=o(`${ns}Duration`),c=Cu(r,i),f=o(`${Co}Delay`),v=o(`${Co}Duration`),b=Cu(f,v);let h=null,_=0,T=0;t===ns?c>0&&(h=ns,_=c,T=i.length):t===Co?b>0&&(h=Co,_=b,T=v.length):(_=Math.max(c,b),h=_>0?c>b?ns:Co:null,T=h?h===ns?i.length:v.length:0);const x=h===ns&&/\b(?:transform|all)(?:,|$)/.test(o(`${ns}Property`).toString());return{type:h,timeout:_,propCount:T,hasTransform:x}}function Cu(e,t){for(;e.lengthxu(n)+xu(e[o])))}function xu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ii(e){return(e?e.ownerDocument:document).body.offsetHeight}function cv(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 $u=Symbol("_vod"),rd=Symbol("_vsh"),dv=Symbol(""),fv=/(?:^|;)\s*display\s*:/;function pv(e,t,n){const o=e.style,r=Et(n);let i=!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"&&(i=!0);const f=n[c];f!=null?mv(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[dv];c&&(n+=";"+c),o.cssText=n,i=fv.test(n)}}else t&&e.removeAttribute("style");$u in e&&((!r||t!==n)&&(e[$u]=i?o.display:""),e[rd]&&(o.display="none"))}const Ar=/\s*!important$/;function So(e,t,n){if(Ge(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=vv(e,t);Ar.test(n)?e.setProperty(ms(o),n.replace(Ar,""),"important"):e[o]=n}}const Su=["Webkit","Moz","ms"],vi={};function vv(e,t){const n=vi[t];if(n)return n;let o=gn(t);if(o!=="filter"&&o in e)return vi[t]=o;o=Gu(o);for(let r=0;rmi||(_v.then(()=>mi=0),mi=Date.now());function Cv(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const r=n.value;if(Ge(r)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const c=r.slice(),f=[o];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,o,r,i)=>{const c=r==="svg";t==="class"?cv(e,o,c):t==="style"?pv(e,n,o):ua(t)?ca(t)||yv(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$v(e,t,o,c))?(Au(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tu(e,t,o,c,i,t!=="value")):e._isVueCE&&(Sv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Et(o)))?Au(e,gn(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Tu(e,t,o,c))};function $v(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ou(t)&&et(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 Ou(t)&&Et(n)?!1:t in e}function Sv(e,t){const n=e._def.props;if(!n)return!1;const o=gn(t);return Array.isArray(n)?n.some(r=>gn(r)===o):Object.keys(n).some(r=>gn(r)===o)}const ad=new WeakMap,id=new WeakMap,Xr=Symbol("_moveCb"),Mu=Symbol("_enterCb"),ji=new WeakMap,Ev=e=>(delete e.props.mode,e),Tv=Ev({name:"TransitionGroup",props:Mt({},nd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=cl(),o=xc();let r,i,c,f;const v=()=>(f===void 0&&(f=r.length>0&&Lv(r[0].el,n.vnode.el,Iu(e))),f);return Pc(()=>{if(ji.delete(n),!v()){r=[],c=void 0;return}const b=Iu(e);r.forEach(Pv);const h=c&&Dv(c,n.vnode.el);c=void 0,r.forEach(T=>Ov(T,h));const _=r.filter(Mv);Ii(n.vnode.el),_.forEach(T=>{const x=T.el,M=x.style;Sn(x,b),M.transform=M.webkitTransform=M.transitionDuration="";const G=x[Xr]=oe=>{oe&&oe.target!==x||(!oe||oe.propertyName.endsWith("transform"))&&(x.removeEventListener("transitionend",G),x[Xr]=null,os(x,b))};x.addEventListener("transitionend",G)}),r=[]}),()=>{const b=dt(e),h=sd(b);let _=b.tag||Ke;if(r=[],f=void 0,i)for(let T=0;To.willMove()&&o.item.contains(t));return n&&ka(n.item,n)}function Lv(e,t,n){const o=e.cloneNode(),r=e[so];r&&r.forEach(f=>{f.split(/\s+/).forEach(v=>v&&o.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&o.classList.add(f)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:c}=od(o);return i.removeChild(o),c}const Qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ge(t)?n=>Mr(t,n):t};function Kv(e){e.target.composing=!0}function ju(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Pr=Symbol("_initialValue");function hi(e,t,n){return t&&(e=e.trim()),n&&(e=fa(e)),e}const Fe={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 i=o||r.props&&r.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](hi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=hi(e.value,n,i)}),t||(Os(e,"compositionstart",Kv),Os(e,"compositionend",ju),Os(e,"change",ju))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",i=e[Pr];delete e[Pr],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](hi(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},c){if(e[Is]=Qr(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?fa(e.value):e.value,v=t??"";if(f===v)return;const b=e.getRootNode();(b instanceof Document||b instanceof ShadowRoot)&&b.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===v)||(e.value=v)}},ps={deep:!0,created(e,{value:t,modifiers:{number:n}},o){e._modelValue=t,Os(e,"change",()=>{const r=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?fa(Zr(v)):Zr(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(r):r:r[0],f=e._pendingValue=[i,i?Ge(c)?r.slice():r:c];try{e[Is](c)}finally{Rs(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Qr(o)},mounted(e,{value:t}){Du(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||!Rv(t,n[1],n[0]))&&Du(e,t)}};function Rv(e,t,n){if(!n||Ge(e))return us(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 Du(e,t){const n=e.multiple,o=Ge(t);if(!(n&&!o&&!Ls(t))){for(let r=0,i=e.options.length;rString(b)===String(f)):c.selected=_f(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 Nv=["ctrl","shift","alt","meta"],Fv={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)=>Nv.some(n=>e[`${n}Key`]&&!t.includes(n))},Ft=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{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 i=ms(r.key);if(t.some(c=>c===i||Vv[c]===i))return e(r)})},Bv=Mt({patchProp:xv},av);let Lu;function Uv(){return Lu||(Lu=Np(Bv))}const qv=(...e)=>{const t=Uv().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=zv(o);if(!r)return;const i=t._component;!et(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const c=n(r,!1,Hv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t};function Hv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function zv(e){return Et(e)?document.querySelector(e):e}function Tt(e){return''+e+""}const Wv={calendar:Tt(''),clock:Tt(''),"check-circle":Tt(''),edit:Tt(''),tag:Tt(''),star:Tt(''),close:Tt(''),flag:Tt(''),chart:Tt(''),export:Tt(''),"chevron-left":Tt(''),"chevron-right":Tt(''),"chevron-down":Tt(''),plus:Tt(''),search:Tt(''),settings:Tt(''),memo:Tt(''),lock:Tt(''),wallet:Tt(''),more:Tt(''),shield:Tt(''),warning:Tt(''),plan:Tt('')},Gv=["innerHTML"],We=Dt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=rt(()=>Wv[t.name]||"");return(o,r)=>($(),P("span",{class:"icon",style:zn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Gv))}}),Yv=["aria-label"],Jv={class:"confirm-body"},Xv={key:0,class:"confirm-badge"},Qv={class:"confirm-text"},Zv={class:"confirm-msg"},em={class:"confirm-btns"},tm=Dt({__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(i){n.open&&i.key==="Escape"&&o("cancel")}return ht(()=>n.open,i=>{i?window.addEventListener("keydown",r):window.removeEventListener("keydown",r)}),Cn(()=>window.removeEventListener("keydown",r)),(i,c)=>($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Ft(f=>o("cancel"),["self"]))},[l("div",{class:"dialog confirm-dialog",role:"dialog","aria-label":e.title},[l("div",Jv,[e.danger?($(),P("div",Xv,[we(We,{name:"warning",size:22})])):pe("",!0),l("div",Qv,[l("div",{class:Xe(["confirm-title",{"is-danger":e.danger}])},q(e.title),3),l("div",Zv,q(e.message),1)])]),l("div",em,[l("button",{class:"btn",onClick:c[0]||(c[0]=f=>o("cancel"))},q(e.cancelText),1),l("button",{class:Xe(["btn",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>o("confirm"))},q(e.confirmText),3)])],8,Yv)])):pe("",!0)]),_:1})]))}}),Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},wn=Kt(tm,[["__scopeId","data-v-1f3675f2"]]);var Ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}};(function(e,t){((n,o)=>{e.exports=o()})(Ku,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"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,h={}.hasOwnProperty;function _(s,a){return h.call(s,a)}function T(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){M(s,u,a[u])})}var x=Object.defineProperty;function M(s,a,u,d){x(s,a,v(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function G(s){return{from:function(a){return s.prototype=Object.create(a.prototype),M(s.prototype,"constructor",s),{extend:T.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,ae=[].slice;function le(s,a,u){return ae.call(s,a,u)}function Y(s,a){return a(s)}function E(s){if(!s)throw new Error("Assertion Failed")}function U(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Q(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"?[]:(ue=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[z=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(z),ue]:[ue,b(ue),ue]),ue=z[0],Ws=z[1],Ws=Ws&&Ws.then,Le=ue&&ue.constructor,st=!!z[2],mt=function(s,a){Yn.push([s,a]),Qe&&(queueMicrotask(Kd),Qe=!1)},It=!0,Qe=!0,Xt=[],ys=[],Vt=C,jt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:m,pgp:!1,env:{},finalize:m},He=jt,Yn=[],gs=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=He;if(typeof s!="function"){if(s!==qe)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Ta(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(k,L){y instanceof Ie?y._then(k,L):y.then(k,L)}):(d._state=!0,d._value=y,bl(d)),w&&Bs()}},Ta.bind(null,d))}catch(y){Ta(d,y)}}(this,s)}var Ea={get:function(){var s=He,a=or;function u(d,p){var y=this,w=!s.global&&(s!==He||a!==or),k=w&&!Xn(),L=new Ie(function(J,R){Aa(y,new gl(_l(d,s,w,k),_l(p,s,w,k),J,R,s))});return this._consoleTask&&(L._consoleTask=this._consoleTask),L}return u.prototype=qe,u},set:function(s){M(this,"then",s&&s.prototype===qe?Ea:{get:function(){return s},set:Ea.set})}};function gl(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 Ta(s,a){var u,d;ys.push(a),s._state===null&&(u=s._lib&&Vs(),a=Vt(a),s._state=!1,s._value=a,d=s,Xt.some(function(p){return p._value===d._value})||Xt.push(d),bl(s),u)&&Bs()}function bl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=Xt.length;w;)if(Xt[--w]._value===y._value)return Xt.splice(w,1)})(a),u.resolve(d)}catch(y){u.reject(y)}finally{--gs==0&&Pa(),--u.psd.ref||u.psd.finalize()}}function Kd(){bs(jt,function(){Vs()&&Bs()})}function Vs(){var s=It;return Qe=It=!1,s}function Bs(){var s,a,u;do for(;0.",kl="String expected.",ar="__dbnames",Ma="readonly",Ia="readwrite";function _s(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var Cl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function 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 xl(){throw Re.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function at(s,a){try{var u=$l(s),d=$l(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=R,L=w;if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function J(){this.constructor=k}function R(){return w!==null&&w.apply(this,arguments)||this}return n(k,L),k.prototype=L===null?Object.create(L):(J.prototype=L.prototype,new J),Object.defineProperty(R.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),R.prototype.table=function(){return u},R})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function y(w){if(!w)return w;var k,L=Object.create(s.prototype);for(k in w)if(!d.has(k))try{L[k]=w[k]}catch{}return L}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=y,this.hook("reading",y),s},wt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},wt.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(k){return u.core.mutate({trans:k,type:"add",keys:a!=null?[a]:null,values:[w]})}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):k.lastResult}).then(function(k){if(y)try{V(s,y,k)}catch{}return k})},wt.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 Tl(w,a),d&&V(w,d,s),u.core.mutate({trans:p,type:"put",values:[w],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):!!y})})})},wt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Q(s,this.schema.primKey.keyPath))===void 0?At(new Re.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},wt.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(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:a!=null?[a]:null})}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):k.lastResult}).then(function(k){if(y)try{V(s,y,k)}catch{}return k})},wt.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})})},wt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:Cl}).then(function(u){return lr(s,null,u)})}).then(function(a){return a.numFailures?Ie.reject(a.failures[0]):void 0})},wt.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)})})})},wt.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 k=d.schema.primKey,J=k.auto,k=k.keyPath;if(k&&p)throw new Re.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Re.InvalidArgument("Arguments objects and keys must have the same length");var L=s.length,J=k&&J?s.map(ir(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:J,wantResults:y}).then(function(R){var D=R.numFailures,K=R.failures;if(D===0)return y?R.results:R.lastResult;throw new xt("".concat(d.name,".bulkAdd(): ").concat(D," of ").concat(L," operations failed"),K)})})},wt.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 k=d.schema.primKey,J=k.auto,k=k.keyPath;if(k&&p)throw new Re.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Re.InvalidArgument("Arguments objects and keys must have the same length");var L=s.length,J=k&&J?s.map(ir(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:J,wantResults:y}).then(function(R){var D=R.numFailures,K=R.failures;if(D===0)return y?R.results:R.lastResult;throw new xt("".concat(d.name,".bulkPut(): ").concat(D," of ").concat(L," operations failed"),K)})})},wt.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(k){var L=[],J=[],R=(s.forEach(function(D,K){var H=D.key,F=D.changes,N=k[K];if(N){for(var B=0,ee=Object.keys(F);BX+re&&B(X+J)})})}var ee=qs(u)&&u.limit===1/0&&(typeof s!="function"||F)&&{index:u.index,range:u.range};return B(0).then(function(){if(0{for(var Je=Math.min(_e.length,Be.length),tt=-1,ot=0;ot=K})).length===0?Ie.resolve():(B.forEach(function(X){N.push(function(){var re,ve,he,Se=ee,_e=X._cfg.dbschema,Ve=(yr(D,Se,F),yr(D,_e,F),ee=D._dbSchema=_e,Va(Se,_e)),$e=(Ve.add.forEach(function(Be){Ba(F,Be[0],Be[1].primKey,Be[1].indexes)}),Ve.change.forEach(function(Be){if(Be.recreate)throw new Re.Upgrade("Not yet support for changing primary key");var me=F.objectStore(Be.name);Be.add.forEach(function(Ye){return mr(me,Ye)}),Be.change.forEach(function(Ye){me.deleteIndex(Ye.name),mr(me,Ye)}),Be.del.forEach(function(Ye){return me.deleteIndex(Ye)})}),X._cfg.contentUpgrade);if($e&&X._cfg.version>K)return pr(D,F),H._memoizedTables={},re=te(_e),Ve.del.forEach(function(Be){re[Be]=Se[Be]}),Fa(D,[D.Transaction.prototype]),vr(D,[D.Transaction.prototype],c(re),re),H.schema=re,(ve=je($e))&&Us(),_e=Ie.follow(function(){var Be;(he=$e(H))&&ve&&(Be=Xn.bind(null,null),he.then(Be,Be))}),he&&typeof he.then=="function"?Ie.resolve(he):_e.then(function(){return he})}),N.push(function(re){var ve,he,Se=X._cfg.dbschema;ve=Se,he=re,[].slice.call(he.db.objectStoreNames).forEach(function(_e){return ve[_e]==null&&he.db.deleteObjectStore(_e)}),Fa(D,[D.Transaction.prototype]),vr(D,[D.Transaction.prototype],D._storeNames,D._dbSchema),H.schema=D._dbSchema}),N.push(function(re){D.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(D.idbdb.version/10)===X._cfg.version?(D.idbdb.deleteObjectStore("$meta"),delete D._dbSchema.$meta,D._storeNames=D._storeNames.filter(function(ve){return ve!=="$meta"})):re.objectStore("$meta").put(X._cfg.version,"version"))})}),function X(){return N.length?Ie.resolve(N.shift()(H.idbtrans)).then(X):Ie.resolve()}().then(function(){Kl(ee,F)}))}).catch(w);var L,J;c(p).forEach(function(R){Ba(u,R,p[R].primKey,p[R].indexes)}),pr(s,u),Ie.follow(function(){return s.on.populate.fire(y)}).catch(w)})}function Jd(s,a){Kl(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=Va(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 k=a.objectStore(w.name);w.add.forEach(function(L){Ne&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(L.src)),mr(k,L)})})(p[d]);if(typeof y=="object")return y.value}}function Va(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 k=p.idxByName,L=y.idxByName,J=void 0;for(J in k)L[J]||w.del.push(J);for(J in L){var R=k[J],D=L[J];R?R.src!==D.src&&w.change.push(D):w.add.push(D)}(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 Ua(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 qa(s){return s&&typeof s.databases=="function"}function Ha(s){return Jn(function(){return He.letThrough=!0,s()})}function za(s){return!("from"in s)}var Ht=function(s,a){var u;if(!this)return u=new Ht,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:B.oldVersion,D=ee<1,s.idbdb=N.result,y&&Jd(s,R),Yd(s,ee/10,R,H))},H),N.onsuccess=$t(function(){R=null;var B,ee,X,re,ve,he,Se=s.idbdb=N.result,_e=le(Se.objectStoreNames);if(0<_e.length)try{var Ve=Se.transaction((ve=_e).length===1?ve[0]:ve,"readonly");if(a.autoSchema)he=Se,re=Ve,(X=s).verno=he.version/10,re=X._dbSchema=hr(0,he,re),X._storeNames=le(he.objectStoreNames,0),vr(X,[X._allTables],c(re),re);else if(yr(s,s._dbSchema,Ve),ee=Ve,((ee=Va(hr(0,(B=s).idbdb,ee),B._dbSchema)).add.length||ee.change.some(function($e){return $e.add.length||$e.change.length}))&&!y)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Se.close(),p=Se.version+1,y=!0,K(k());pr(s,Ve)}catch{}go.add(s),Se.onversionchange=$t(function($e){a.vcFired=!0,s.on("versionchange").fire($e)}),Se.onclose=$t(function(){s.close({disableAutoOpen:!1})}),D&&(_e=s._deps,ve=F,qa(he=_e.indexedDB)||ve===ar||Ua(he,_e.IDBKeyRange).put({name:ve}).catch(m)),K()},H)}).catch(function(K){switch(K==null?void 0:K.name){case"UnknownError":if(0"u"?Ie.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(K){function H(){return indexedDB.databases().finally(K)}L=setInterval(H,100),H()}).finally(function(){return clearInterval(L)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Ie.resolve(Ha(function(){return s.on.ready.fire(s.vip)})).then(function K(){var H;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=at(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=at(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 of(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&&de(y,p)},3e3))})}var rf={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,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(y=new AbortController).signal,k.addEventListener("abort",(w=function(L){return function(){if(y.abort(),d==="readwrite"){for(var J=new Set,R=0,D=u;R{var ee=ks["idb://".concat(H,"/").concat(F)];if(!ee)return[];if(!(H=ee.queries[N]))return[null,!1,ee,null];var X=H[(B.query?B.query.index.name:null)||""];if(!X)return[null,!1,ee,null];switch(N){case"query":var re=(ve=B.direction)!=null?ve:"next",ve=X.find(function(he){var Se;return he.req.limit===B.limit&&he.req.values===B.values&&((Se=he.req.direction)!=null?Se:"next")===re&&Gl(he.req.query.range,B.query.range)});return ve?[ve,!0,ee,X]:[X.find(function(he){var Se;return("limit"in he.req?he.req.limit:1/0)>=B.limit&&((Se=he.req.direction)!=null?Se:"next")===re&&(!B.values||he.req.values)&&sf(he.req.query.range,B.query.range)}),!1,ee,X];case"count":return ve=X.find(function(he){return Gl(he.req.query.range,B.query.range)}),[ve,!!ve,ee,X]}})(a,u,"query",y),K=D[0],J=D[2],R=D[3],K&&D[1]?K.obsSet=y.obsSet:(D=d.query(y).then(function(H){var F=H.result;if(K&&(K.res=F),w){for(var N=0,B=F.length;N{var ve=Vs();try{y&&Us();var he=Jn(s,re);return he=y?he.finally(Xn):he}finally{ve&&Bs()}})(ee={subscr:B,signal:w.signal,requery:K,querier:s,trans:null}),D||(es.storagemutated.subscribe(F),D=!0),Promise.resolve(X).then(function(re){u=!0,a=re,k||ee.signal.aborted||(H()||(J=B,H())?K():(L={},Oa(function(){return!k&&p.next&&p.next(re)})))},function(re){u=!1,["DatabaseClosedError","AbortError"].includes(re==null?void 0:re.name)||k||Oa(function(){k||p.error&&p.error(re)})}))};return setTimeout(K,0),R});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var Cs=Fn;function ni(s){var a=ts;try{ts=!0,es.storagemutated.fire(s),Ja(s,!0)}finally{ts=a}}T(Cs,o(o({},Ce),{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,(qa(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ar})}):Ua(u,a).toCollection().primaryKeys()).then(s)}catch{return At(new Re.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return He.trans?bs(He.transless||jt,s):s()},vip:Ha,async:function(s){return function(){try{var a=Xa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Ie.resolve(a)}catch(u){return At(u)}}},spawn:function(s,a,u){try{var d=Xa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Ie.resolve(d)}catch(p){return At(p)}},currentTransaction:{get:function(){return He.trans||null}},waitFor:function(s,a){return s=Ie.resolve(typeof s=="function"?Cs.ignoreTransaction(s):s).timeout(a||6e4),He.trans?He.trans.waitFor(s):s},Promise:Ie,debug:{get:function(){return Ne},set:function(s){Ae(s)}},derive:G,extend:v,props:T,override:Y,Events:po,on:es,liveQuery:Yl,extendObservabilitySet:br,getByKeyPath:Q,setByKeyPath:V,delByKeyPath:function(s,a){typeof a=="string"?V(s,a,void 0):"length"in a&&[].map.call(a,function(u){V(s,u,void 0)})},shallowClone:te,deepClone:Oe,getObjectDiff:Qa,cmp:at,asap:U,minKey:-1/0,addons:[],connections:{get:go.toArray},errnames:qt,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"&&(es(fr,function(s){ts||(s=new CustomEvent(La,{detail:s}),ts=!0,dispatchEvent(s),ts=!1)}),addEventListener(La,function(s){s=s.detail,ts||ni(s)}));var Gs,ts=!1,Jl=function(){};return typeof BroadcastChannel<"u"&&((Jl=function(){(Gs=new BroadcastChannel(La)).onmessage=function(s){return s.data&&ni(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),es(fr,function(s){ts||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Fn.disableBfCache&&s.persisted){Ne&&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 ne;function am(e){ne=e}function dl(){ne&&ne.close(),ne=void 0}const im=6,Nu=["公司","客户现场","出差","居家办公"],lm={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function qo(e){return lm[e]||e}function Io(e){return e<10?"0"+e:String(e)}function Wn(e){return e.getFullYear()+"-"+Io(e.getMonth()+1)+"-"+Io(e.getDate())}function it(){return Wn(new Date)}function lt(){const e=new Date;return Wn(e)+"T"+Io(e.getHours())+":"+Io(e.getMinutes())+":"+Io(e.getSeconds())}function _n(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 Ut(e,t){const n=Ns(e);return n.setDate(n.getDate()+t),Wn(n)}function ta(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)),Wn(n)}function Zs(e){const t=Ns(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Wn(t)}function um(e){const t=Ns(e).getDay();return t===0||t===6}function cm(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ud(e){const t=Ns(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const dm=15e4;function Li(e){const t=new Uint8Array(e);let n="";for(let o=0;o({}));if(!r.ok){const c=i&&i.error||"服务返回 "+r.status;throw e==="register"&&r.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function ml(e,t,n){const o=await Pm(n,e,t);aa(o.userId);const r={userId:o.userId,username:o.username};return Tm(r),md(o.username,t),r}async function Om(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return ml(n,t,"login")}async function Mm(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 ml(o,t,"register")}async function Im(){const e=pn();if(!e)return null;try{return await ml(e.username,e.password,"login")}catch{return null}}async function jm(){oa(),dl(),ra=null,vd()}function Dm(){oa(),dl(),ra=null,vd(),Am()}async function Lm(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 Fs();let i;try{i=await fetch(r+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+hd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!i.ok){const c=await i.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+i.status)}md(o.username,t)}async function Km(){if(!zo())throw new Error("未登录");const t=await Fs();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+hd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const o=await n.json().catch(()=>({}));throw new Error(o&&o.error||"删除失败 "+n.status)}Dm()}function hd(){return xa()}const Ni=A(null),Fi=A(null),uo=A(0);function as(){uo.value++}const yd=A(0);function Rm(){yd.value++}const eo=A(""),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 Nm(e){return ne.table(e).toArray()}function Kr(e,t){return e==="setting"?t.key:t.id}async function Fm(){for(const e of ro){const t=ne.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=Vm()),!o.updated_at&&o.created_at&&(r.updated_at=o.created_at),Object.keys(r).length&&await t.update(Kr(e,o),r)}}}function Vm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Bm(){return pn()!=null}async function Um(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function qm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function gd(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 Hm(e,t){let n=xa();return n||(n=await gd(e,t),Ho(n),n)}async function bd(){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 Vi(){const e=pn();if(!e)throw new Error("未登录,无法同步");return Cd({baseUrl:await Fs(),username:e.username,password:e.password})}async function wd(){try{await Vi()}catch(e){eo.value=e instanceof Error?e.message:String(e);try{await Vi()}catch{}}}function _d(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 i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(o.puuid=i.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 kd(){const e=await ne.work_log.toArray(),t=await ne.project.toArray(),n=await ne.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,Rr=!1,Bi=!1,to=null,En=null,Ui="",qi=!1,Nr=null;async function no(){if(jo){Rr=!0;return}try{if(!await Bm())return;await Cd(await zm()),eo.value=""}catch(e){eo.value=e instanceof Error?e.message:String(e)}}async function zm(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Fs(),username:e.username,password:e.password}}function Wm(){if(qi)return;qi=!0,Nr=om(async()=>{const t={};for(const n of ro)t[n]=await ne.table(n).count();return t}).subscribe({next:()=>{Bi||jo||(to&&globalThis.clearTimeout(to),to=globalThis.setTimeout(()=>{no()},3e3))},error:()=>{}})}function Gm(){Nr&&(Nr.unsubscribe(),Nr=null),En&&(En.close(),En=null,Ui=""),to&&(globalThis.clearTimeout(to),to=null),qi=!1}function Ym(e,t){const n=e+"|"+t;if(!(En&&Ui===n)){En&&(En.close(),En=null);try{En=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ui=n,En.onmessage=()=>{no()}}catch{En=null}}}async function Cd(e){if(jo)return Rr=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};jo=!0,Bi=!0;try{const t=await Hi(e);return Rr&&(Rr=!1,globalThis.setTimeout(()=>{no()},800)),t}finally{jo=!1,Bi=!1}}async function Hi(e,t=!1){var Q;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Fm();const o=await kd(),r=await ne.sync_mirror.toArray(),i=new Map;for(const V of r)i.set(V.table+"|"+V.uuid,V);const c={},f=[];let v=0;for(const V of ro){let te=await Nm(V);V==="setting"&&(te=te.filter(S=>!Xs.has(S.key)));const I=new Map;for(const S of te)I.set(S.uuid,S);for(const[S,O]of I){const Z=_d(V,O,o),Oe=Lr(Z),Te=i.get(V+"|"+S);(!Te||Te.hash!==Oe)&&(c[V]=c[V]||[],c[V].push(Z),v++)}for(const[S,O]of i)S.startsWith(V+"|")&&!I.has(O.uuid)&&f.push({table:V,uuid:O.uuid,deleted_at:lt()});c[V]=c[V]||[]}f.push(...eh());const b=await Hm(n,e),h=V=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+V},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let _=await h(b);if(_.status===401){Ho("");const V=await gd(n,e);Ho(V),_=await h(V)}if(!_.ok)throw new Error("同步服务返回 "+_.status);const T=await _.json(),x=String(T.dataEpoch||""),M="dsh_sync_epoch_"+(((Q=pn())==null?void 0:Q.username)||"anon"),G=x?localStorage.getItem(M):null;if(!t&&G&&x&&G!==x)return await ne.sync_mirror.clear(),localStorage.setItem(M,x),Hi(e,!0);const oe=T.tables||{},ae=T.tombstones||[],le=ro.reduce((V,te)=>V+(oe[te]||[]).length,0),Y=r.length-f.length;if(!t&&le0||E.removed>0||v>0)&&as(),{pushed:v,pulled:E.changed,removed:E.removed,errors:0,at:U}}function xd(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function Jm(){try{const e=localStorage.getItem(xd());if(e)return JSON.parse(e)}catch{}return{}}function Xm(e){try{localStorage.setItem(xd(),JSON.stringify(e))}catch{}}async function Qm(e,t){const n=Jm(),o=new Set(t.map(x=>x.table+"|"+x.uuid)),r=new Map;for(const x of await ne.sync_mirror.toArray())r.set(x.table+"|"+x.uuid,x);const i=new Set(Array.from(r.keys()).map(x=>x.split("|")[1]));let c=0,f=0;const v={},b={},h={};for(const x of ro){const M=ne.table(x),G=await M.toArray(),oe=new Map(G.map(S=>[Kr(x,S),S])),ae=new Map(G.filter(S=>S.uuid).map(S=>[S.uuid,S])),le=(e[x]||[]).filter(S=>S&&typeof S=="object"&&S.uuid).filter(S=>!o.has(x+"|"+S.uuid)),Y=le.filter(S=>!(x==="setting"&&Xs.has(S.key))),E=le.filter(S=>x==="setting"&&Xs.has(S.key));for(const S of E)Zm(x,S.uuid);const U=x==="setting"?[]:G.filter(S=>S.uuid&&!i.has(S.uuid)&&!o.has(x+"|"+S.uuid)),Q={v:Math.max(0,...G.map(S=>Number(S.id)||0))};Y.length;const V=[];for(const S of Y){const O={...S};if(x==="log_item"){const Te=O.wuuid?v[O.wuuid]:void 0;if(!Te)continue;O.work_log_id=Te,delete O.wuuid,O.project_id=O.puuid?b[O.puuid]??null:null,delete O.puuid}if(x==="plan")if(O.guuid){const Te=h[O.guuid];O.goal_id=Te??null,delete O.guuid}else O.goal_id=null;let Z=Kr(x,S);if(x==="setting")Z=S.key;else{const Te=n[x]&&n[x][S.uuid],ye=ae.get(S.uuid);ye&&ye.id!=null?Z=ye.id:typeof Te=="number"?Z=Te:Z=++Q.v}const Oe={...O,id:Z};x==="setting"&&Xs.has(Oe.key)||(V.push(Oe),x==="work_log"&&(v[S.uuid]=Z),x==="project"&&(b[S.uuid]=Z),x==="goal"&&(h[S.uuid]=Z))}const te=V.concat(U);for(const S of te){const O=oe.get(Kr(x,S));(!O||Lr(O)!==Lr(S))&&c++}f+=G.filter(S=>S.uuid&&!V.some(O=>O.uuid===S.uuid)&&!o.has(x+"|"+S.uuid)).length,await M.clear(),te.length&&await M.bulkPut(te);const I={};for(const S of te)S.uuid&&(I[S.uuid]=S.id);n[x]=I}Xm(n);const _=await kd(),T=[];for(const x of ro){const M=await ne.table(x).toArray();for(const G of M)x==="setting"&&Xs.has(G.key)||G.uuid&&T.push({table:x,uuid:G.uuid,hash:Lr(_d(x,G,_))})}return await ne.sync_mirror.clear(),T.length&&await ne.sync_mirror.bulkAdd(T.map(x=>({...x}))),await ne.tombstone.clear(),{changed:c,removed:f+ia.length}}const ia=[];function Zm(e,t){ia.some(n=>n.table===e&&n.uuid===t)||ia.push({table:e,uuid:t,deleted_at:lt()})}function eh(){return ia.splice(0)}const th=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function ut(){await wd()}async function St(e,t){const n=await ne.setting.get(e);return n?n.value:t}async function Lt(e,t){await ne.setting.put({key:e,value:t}),th.has(e)||await ut()}async function vs(){const e=await Promise.all([St("work_start","09:00"),St("work_end","18:00"),St("grace_minutes","10"),St("lunch_minutes","60"),St("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 nh(){return St("last_location","")}async function sh(e,t){const n=t.trim();await Lt("last_location",n),n&&await la(n);let o=!1;const r=await kn(e);r&&r.id?(r.location||"")!==n&&(await ne.attendance.update(r.id,{location:n||null}),o=!0):n&&(await ne.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:lt()}),o=!0),o&&await ut()}async function hl(){const e=await St("location_presets","");if(!e)return Nu.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 Nu.slice()}async function $d(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Lt("location_presets",JSON.stringify(t))}async function la(e){const t=e.trim();if(!t)return;const n=await hl();n.includes(t)||await $d([...n,t])}async function ao(e=!1){const t=await ne.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function oh(e){await ne.project.add({name:e.trim(),archived:0,created_at:lt()}),await ut()}async function rh(e,t){await ne.project.update(e,{name:t.trim()}),await ut()}async function ah(e,t){await ne.project.update(e,{archived:t?1:0}),await ut()}async function kn(e){return ne.attendance.where("date").equals(e).first()}async function Sd(e,t){const n=((t===void 0?await St("last_location",""):t)||"").trim();let o=!1;const r=await kn(e);if(r&&r.id){if(!r.clock_in_at){const i={clock_in_at:lt()};n&&(i.location=n),await ne.attendance.update(r.id,i),o=!0}n&&(await St("last_location","")!==n&&await Lt("last_location",n),await la(n)),o&&await ut();return}await ne.attendance.add({date:e,clock_in_at:lt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:lt()}),n&&(await Lt("last_location",n),await la(n)),await ut()}async function ih(e){const t=await kn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await ne.attendance.update(t.id,{clock_out_at:lt()}),await ut())}async function lh(){const e=new Date,t=Wn(e);let n="";if(e.getHours()<4){const o=await kn(Ut(t,-1));o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await ne.attendance.update(o.id,{clock_out_at:lt()}),n=o.date)}if(!n){const o=await kn(t);o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await ne.attendance.update(o.id,{clock_out_at:lt()}),n=o.date)}if(!n)throw new Error("没有进行中的打卡");return await ut(),n}async function uh(e,t,n,o,r){(r||"").trim()&&await la(r);const i=await kn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:o||null,location:(r||"").trim()||null,created_at:lt()};i&&i.id?await ne.attendance.update(i.id,c):await ne.attendance.add(c),await ut()}async function ch(e,t,n){const o=(n||"").trim();if(!o)return;const r=await kn(e);r&&r.id&&(await ne.attendance.update(r.id,{[t]:e+"T"+o+":00"}),await ut())}async function Xo(e,t){return ne.attendance.where("date").between(e,t,!0,!0).toArray()}async function dh(e,t){const n=await kn(e);if(t){const o={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:lt()};n&&n.id?await ne.attendance.update(n.id,o):await ne.attendance.add({...o,note:null,location:null})}else n&&n.id&&await ne.attendance.update(n.id,{kind:"normal"});await ut()}async function fh(e){const t=await ne.work_log.where("date").equals(e).first();return t||{id:await ne.work_log.add({date:e,created_at:lt()}),date:e,created_at:lt()}}async function ph(e){return ne.work_log.where("date").equals(e).first()}async function vh(e){const t=await ph(e);return!t||!t.id?[]:(await ne.log_item.where("work_log_id").equals(t.id).toArray()).sort((o,r)=>r.id-o.id)}async function mh(e,t){const n=await ne.work_log.where("date").equals(e).first();let o;n&&n.id?o=n:o=await fh(e),await ne.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:lt()});const r=t.project_id?String(t.project_id):"";await St("last_project","")!==r&&await Lt("last_project",r),await St("last_category","")!==t.category&&await Lt("last_category",t.category),await ut()}async function gi(e,t){await ne.table("log_item").update(e,t),await ut()}async function hh(e){await ne.table("log_item").delete(e),await ut()}async function Qo(e,t){const n=await ne.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const o=new Map(n.map(i=>[i.id,i.date]));return(await ne.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:o.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function _h(e){const t=lt();await ne.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 ut()}async function kh(e,t){await ne.plan.update(e,{...t,updated_at:lt()}),await ut()}async function Ch(e){await ne.plan.delete(e),await ut()}async function xh(e,t){const n=await ne.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await $a(e),await ne.plan.update(e,{status:t,updated_at:lt()}),await ut())}async function $h(e){const t=await ne.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await $a(n.id);await ne.plan.update(e,{timer_started_at:lt(),updated_at:lt()}),await ut()}async function $a(e){const t=await ne.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 ne.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:lt()}),await ut()}const Sh=366;function Eh(e,t){const n=[];let o=e,r=0;for(;o<=t&&rr.status==="done").length,total:o.length})}return t}async function Ah(){return(await ne.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await ne.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 Rh(e,t=4){const n=e.trim().toLowerCase();return n?(await ne.memo.toArray()).filter(r=>((r.title||"")+" "+(r.content||"")).toLowerCase().includes(n)).sort((r,i)=>r.updated_at{await Promise.all([ne.project.clear(),ne.work_log.clear(),o.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear(),r.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await ne.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ne.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 ne.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ne.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ne.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ne.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ne.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 i.bulkAdd(n.plan)}),await ut()}const zh=["制度学习","产品学习","打杂","项目实操","售后服务"],Wh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Gh=["工资","报销","其他"],Ed="log_categories",Td="ledger_expense_categories",Ad="ledger_income_categories";function Pd(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 Pd(await St(Ed,""),zh)}async function Yh(e){await Lt(Ed,JSON.stringify(e))}async function Wo(e){return Pd(await St(e==="expense"?Td:Ad,""),e==="expense"?Wh:Gh)}async function zi(e,t){await Lt(e==="expense"?Td:Ad,JSON.stringify(t))}const Jh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Xh={class:"dialog-head"},Qh={class:"dialog-title"},Zh={key:0,class:"muted dialog-sub"},ey={class:"dialog-body"},ty={class:"form-grid"},ny={class:"field span2"},sy={key:0,class:"form-error"},oy={class:"field"},ry=["value"],ay={class:"field"},iy=["value"],ly={class:"field"},uy={class:"min-chips"},cy=["onClick"],dy={class:"field"},fy={class:"field span2"},py={class:"field"},vy={class:"field"},my={class:"dialog-btns"},hy=Dt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=A([]);Zo().then(le=>{n.value=le});const o=e,r=t,i=A(""),c=A(null),f=A("dev"),v=A(null),b=A(""),h=A(""),_=A(0),T=A(0),x=A(""),M=A(null),G=rt(()=>{var E;const le=o.projects.filter(U=>U.archived!==1),Y=(E=o.item)==null?void 0:E.project_id;if(Y&&!le.some(U=>U.id===Y)){const U=o.projects.find(V=>V.id===Y),Q=le.slice();return U&&Q.unshift({...U,name:U.name+"(已归档)"}),Q}return le});function oe(le){o.open&&le.key==="Escape"&&r("cancel")}ht(()=>o.open,async le=>{var Y;if(le){const E=o.item;i.value=(E==null?void 0:E.content)??"",c.value=(E==null?void 0:E.project_id)??null,f.value=(E==null?void 0:E.category)??"dev",v.value=(E==null?void 0:E.minutes)??null,b.value=(E==null?void 0:E.takeaway)??"",h.value=(E==null?void 0:E.remark)??"",_.value=(E==null?void 0:E.is_milestone)??0,T.value=(E==null?void 0:E.needs_followup)??0,x.value="",window.addEventListener("keydown",oe),await Rs(),(Y=M.value)==null||Y.focus()}else window.removeEventListener("keydown",oe)}),Cn(()=>window.removeEventListener("keydown",oe)),ht(i,()=>{x.value&&(x.value="")});function ae(){const le=i.value.trim();if(!le){x.value="请填写工作内容";return}if(!o.item||!o.item.id){r("save",{id:0,content:le,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value,needs_followup:T.value});return}r("save",{id:o.item.id,content:le,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value?1:0,needs_followup:T.value?1:0})}return(le,Y)=>($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:Y[10]||(Y[10]=Ft(E=>r("cancel"),["self"]))},[l("div",Jh,[l("div",Xh,[l("div",null,[l("div",Qh,q(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),P("div",Zh,q(e.date),1)):pe("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:Y[0]||(Y[0]=E=>r("cancel"))},[we(We,{name:"close",size:16})])]),l("div",ey,[l("div",ty,[l("div",ny,[Y[11]||(Y[11]=l("label",null,"工作内容(必填)",-1)),Me(l("input",{ref_key:"contentInput",ref:M,class:Xe(["input",{invalid:x.value}]),"onUpdate:modelValue":Y[1]||(Y[1]=E=>i.value=E),onKeydown:Ot(ae,["enter"])},null,34),[[Fe,i.value]]),x.value?($(),P("div",sy,q(x.value),1)):pe("",!0)]),l("div",oy,[Y[13]||(Y[13]=l("label",null,"所属项目",-1)),Me(l("select",{class:"select","onUpdate:modelValue":Y[2]||(Y[2]=E=>c.value=E)},[Y[12]||(Y[12]=l("option",{value:null},"无项目",-1)),($(!0),P(Ke,null,nt(G.value,E=>($(),P("option",{key:E.id,value:E.id},q(E.name),9,ry))),128))],512),[[ps,c.value]])]),l("div",ay,[Y[14]||(Y[14]=l("label",null,"工作分类",-1)),Me(l("select",{class:"select","onUpdate:modelValue":Y[3]||(Y[3]=E=>f.value=E)},[($(!0),P(Ke,null,nt(n.value,E=>($(),P("option",{key:E,value:E},q(E),9,iy))),128))],512),[[ps,f.value]])]),l("div",ly,[Y[15]||(Y[15]=l("label",null,"耗时(分钟)",-1)),Me(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":Y[4]||(Y[4]=E=>v.value=E),placeholder:"选填"},null,512),[[Fe,v.value,void 0,{number:!0}]]),l("div",uy,[($(),P(Ke,null,nt([15,30,60,90,120],E=>l("button",{key:E,type:"button",class:Xe(["min-chip",{on:v.value===E}]),onClick:U=>v.value=v.value===E?null:E},q(E)+"分",11,cy)),64))])]),l("div",dy,[Y[16]||(Y[16]=l("label",null,"主要收获",-1)),Me(l("input",{class:"input","onUpdate:modelValue":Y[5]||(Y[5]=E=>b.value=E),placeholder:"一句话:学到了什么"},null,512),[[Fe,b.value]])]),l("div",fy,[Y[17]||(Y[17]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":Y[6]||(Y[6]=E=>h.value=E),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Fe,h.value]])]),l("div",py,[Y[18]||(Y[18]=l("label",null,"成果标记",-1)),l("button",{class:Xe(["toggle-btn",{on:_.value===1}]),onClick:Y[7]||(Y[7]=E=>_.value=_.value===1?0:1)},q(_.value===1?"已标记为成果":"未标记"),3)]),l("div",vy,[Y[19]||(Y[19]=l("label",null,"待跟进",-1)),l("button",{class:Xe(["toggle-btn",{onwarn:T.value===1}]),onClick:Y[8]||(Y[8]=E=>T.value=T.value===1?0:1)},q(T.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",my,[l("button",{class:"btn btn-sm",onClick:Y[9]||(Y[9]=E=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ae},q(e.item?"保存修改":"添加"),1)])])])):pe("",!0)]),_:1})]))}}),yy=Kt(hy,[["__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(um(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 i=Or(_n(e.clock_in_at)),c=Or(_n(e.clock_out_at)),f=Or(n.work_start),v=Or(n.work_end);let b="normal";!r&&i>f+n.grace_minutes?b="late":!r&&c{Fr.value=Fr.value.filter(n=>n.id!==t)},2e3)}function by(){return Fr}const wy={class:"day-panel"},_y={class:"dp-head"},ky={class:"dp-date"},Cy={class:"card sec"},xy={class:"att-grid"},$y={class:"att-cell"},Sy={key:0,class:"edit-row"},Ey={key:1,class:"att-val"},Ty={class:"att-cell"},Ay={key:0,class:"edit-row"},Py={key:1,class:"att-val"},Oy={class:"att-cell"},My=["list"],Iy=["id"],jy=["value"],Dy={class:"att-cell"},Ly={class:"att-val status-val"},Ky={key:0,class:"tag"},Ry={key:1,class:"muted"},Ny={key:0,class:"att-note muted"},Fy={class:"att-actions"},Vy=["disabled"],By=["disabled"],Uy=["disabled"],qy=["disabled"],Hy={key:0,class:"card sec makeup"},zy={class:"form-grid"},Wy={class:"field"},Gy={class:"field"},Yy={class:"field span2"},Jy=["list"],Xy={class:"field span2"},Qy={key:0,class:"form-error"},Zy={class:"form-footer"},eg={class:"list-sec"},tg={class:"sec-head"},ng={class:"sec-title"},sg={key:0,class:"empty muted"},og={class:"item-main"},rg={class:"tag"},ag=["onClick"],ig={key:0,class:"muted item-meta"},lg={key:1,class:"muted num item-meta"},ug=["onClick"],cg=["onClick"],dg=["onClick"],fg=["onClick"],pg={key:0,class:"item-sub"},vg={key:0,class:"muted2"},mg={key:1,class:"muted"},hg={key:1,class:"dp-foot muted num"},yg=Dt({__name:"DayPanel",props:{date:{}},setup(e){const t=A([]);Zo().then(g=>{t.value=g});const n=e,o=A(!0),r=A(null),i=A(void 0),c=A([]),f=A([]),v=A(""),b=A([]),h=rt(()=>"loc-list-"+n.date),_=rt(()=>n.date===it());async function T(){o.value=!0,r.value=await vs(),i.value=await kn(n.date),c.value=await vh(n.date),f.value=await ao(!0),b.value=await hl(),v.value=i.value&&i.value.location||await nh(),o.value=!1}ln(T),ht(()=>n.date,T),ht(uo,()=>{T()});function x(g){if(!g)return"";const m=f.value.find(C=>C.id===g);return m?m.name:"已删除项目"}const M=rt(()=>r.value?co(i.value,n.date,r.value,_.value):null),G=rt(()=>c.value.reduce((g,m)=>g+(m.minutes||0),0)),oe=A(!1);async function ae(){oe.value||(oe.value=!0,await Sd(n.date,v.value),await T(),as(),Ue("上班打卡成功"),oe.value=!1)}async function le(){oe.value||(oe.value=!0,await ih(n.date),await T(),as(),Ue("下班打卡成功"),oe.value=!1)}async function Y(){await sh(n.date,v.value),as(),Ue("地点已更新")}const E=A(!1),U=rt(()=>{var g;return((g=i.value)==null?void 0:g.kind)==="leave"});function Q(){if(i.value&&i.value.clock_in_at){E.value=!0;return}V(!0)}async function V(g){E.value=!1,await dh(n.date,g),await T(),as(),Ue(g?"已标记为休假":"已取消休假")}const te=A(null),I=A(""),S=A(null);ht(te,async g=>{var m;g&&(await Rs(),(m=S.value)==null||m.focus())});function O(g){var C,j;const m=g==="in"?(C=i.value)==null?void 0:C.clock_in_at:(j=i.value)==null?void 0:j.clock_out_at;te.value=g,I.value=m?_n(m):g==="in"?"09:00":"18:00"}function Z(){te.value=null}async function Oe(){const g=te.value;g&&(te.value=null,I.value&&(await ch(n.date,g==="in"?"clock_in_at":"clock_out_at",I.value),await T(),as(),Ue("打卡时间已修改")))}const Te=A(!1),ye=A("09:00"),Pe=A("18:00"),ze=A(""),de=A(""),xe=A("");function Ee(){de.value=v.value,xe.value="",Te.value=!Te.value}async function je(){if(!ye.value||!Pe.value){xe.value="请填写上班与下班时间";return}await uh(n.date,n.date+"T"+ye.value+":00",n.date+"T"+Pe.value+":00",ze.value.trim(),de.value),Te.value=!1,ze.value="",xe.value="",await T(),as(),Ue("补卡已保存")}const Ce=A(null),fe=A(!1);function De(g){Ce.value=g,fe.value=!0}function ft(){Ce.value=null,fe.value=!0}async function Ct(g){g.id?(await gi(g.id,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark,is_milestone:g.is_milestone,needs_followup:g.needs_followup}),Ue("记录已更新")):(await mh(n.date,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark}),Ue("记录已添加")),Ce.value=null,fe.value=!1,await T()}async function xt(g){await gi(g.id,{is_milestone:g.is_milestone?0:1}),await T()}async function qt(g){await gi(g.id,{needs_followup:g.needs_followup?0:1}),await T()}const bt=A(null);async function Re(){bt.value&&bt.value.id&&await hh(bt.value.id),bt.value=null,await T(),Ue("记录已删除")}return(g,m)=>($(),P("div",wy,[l("div",_y,[l("div",ky,q(sn(ud)(e.date)),1)]),l("div",Cy,[m[19]||(m[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",xy,[l("div",$y,[m[15]||(m[15]=l("label",null,"上班时间",-1)),te.value==="in"?($(),P("div",Sy,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[0]||(m[0]=C=>I.value=C),onKeydown:[Ot(Oe,["enter"]),Ot(Z,["esc"])]},null,544),[[Fe,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),l("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),P("div",Ey,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},q(i.value&&i.value.clock_in_at?sn(_n)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:m[1]||(m[1]=C=>O("in"))},[we(We,{name:"edit",size:13})])):pe("",!0)]))]),l("div",Ty,[m[16]||(m[16]=l("label",null,"下班时间",-1)),te.value==="out"?($(),P("div",Ay,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[2]||(m[2]=C=>I.value=C),onKeydown:[Ot(Oe,["enter"]),Ot(Z,["esc"])]},null,544),[[Fe,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),l("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),P("div",Py,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},q(i.value&&i.value.clock_out_at?sn(_n)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:m[3]||(m[3]=C=>O("out"))},[we(We,{name:"edit",size:13})])):pe("",!0)]))]),l("div",Oy,[m[17]||(m[17]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[4]||(m[4]=C=>v.value=C),list:h.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:Y},null,40,My),[[Fe,v.value]]),l("datalist",{id:h.value},[($(!0),P(Ke,null,nt(b.value,C=>($(),P("option",{key:C,value:C},null,8,jy))),128))],8,Iy)]),l("div",Dy,[m[18]||(m[18]=l("label",null,"考勤状态",-1)),l("div",Ly,[M.value?($(),P(Ke,{key:0},[l("span",{class:Xe(["dot",M.value.status])},null,2),l("span",null,q(M.value.label),1),i.value&&i.value.kind==="makeup"?($(),P("span",Ky,"补卡")):pe("",!0)],64)):($(),P("span",Ry,"--"))])])]),i.value&&i.value.note?($(),P("div",Ny,"补卡说明:"+q(i.value.note),1)):pe("",!0),l("div",Fy,[_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ae},"上班打卡",8,Vy)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),P("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:le},"下班打卡",8,By)):pe("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:2,class:"btn btn-sm",onClick:Ee},"补卡")):pe("",!0),U.value?($(),P("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:m[5]||(m[5]=C=>V(!1))},"取消休假",8,qy)):($(),P("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:Q},"标记休假",8,Uy))])]),Te.value?($(),P("div",Hy,[m[24]||(m[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",zy,[l("div",Wy,[m[20]||(m[20]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[6]||(m[6]=C=>ye.value=C)},null,512),[[Fe,ye.value]])]),l("div",Gy,[m[21]||(m[21]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[7]||(m[7]=C=>Pe.value=C)},null,512),[[Fe,Pe.value]])]),l("div",Yy,[m[22]||(m[22]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input",list:h.value,"onUpdate:modelValue":m[8]||(m[8]=C=>de.value=C),placeholder:"可直接输入"},null,8,Jy),[[Fe,de.value]])]),l("div",Xy,[m[23]||(m[23]=l("label",null,"补卡原因",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=C=>ze.value=C),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Fe,ze.value]])])]),xe.value?($(),P("div",Qy,q(xe.value),1)):pe("",!0),l("div",Zy,[l("button",{class:"btn btn-sm",onClick:m[10]||(m[10]=C=>Te.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:je},"保存补卡")])])):pe("",!0),l("div",eg,[l("div",tg,[l("span",ng,"工作记录("+q(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:ft},[we(We,{name:"plus",size:14}),m[25]||(m[25]=gt(" 添加记录",-1))])]),!c.value.length&&!o.value?($(),P("div",sg,"暂无记录")):pe("",!0),($(!0),P(Ke,null,nt(c.value,C=>($(),P("div",{key:C.id,class:"item"},[l("div",og,[l("span",rg,q(sn(qo)(C.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:j=>De(C)},q(C.content),9,ag),C.project_id?($(),P("span",ig,q(x(C.project_id)),1)):pe("",!0),C.minutes?($(),P("span",lg,q(C.minutes)+" 分钟",1)):pe("",!0),m[26]||(m[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:j=>De(C)},[we(We,{name:"edit",size:14})],8,ug),l("button",{class:Xe(["icon-btn",{active:C.is_milestone===1}]),title:"成果标记",onClick:j=>xt(C)},[we(We,{name:"star",size:14})],10,cg),l("button",{class:Xe(["icon-btn",{"active-warn":C.needs_followup===1}]),title:"待跟进",onClick:j=>qt(C)},[we(We,{name:"flag",size:14})],10,dg),l("button",{class:"icon-btn",title:"删除",onClick:j=>bt.value=C},[we(We,{name:"close",size:14})],8,fg)]),C.takeaway||C.remark?($(),P("div",pg,[C.takeaway?($(),P("div",vg,"收获:"+q(C.takeaway),1)):pe("",!0),C.remark?($(),P("div",mg,"备注:"+q(C.remark),1)):pe("",!0)])):pe("",!0)]))),128)),c.value.length?($(),P("div",hg,[gt(" 共 "+q(c.value.length)+" 条事项 ",1),G.value?($(),P(Ke,{key:0},[gt(" · "+q((G.value/60).toFixed(1))+" 小时",1)],64)):pe("",!0)])):pe("",!0)]),we(wn,{open:!!bt.value,title:"删除确认",message:bt.value?"将删除工作记录「"+bt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:m[11]||(m[11]=C=>bt.value=null),onConfirm:Re},null,8,["open","message"]),we(wn,{open:E.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:m[12]||(m[12]=C=>E.value=!1),onConfirm:m[13]||(m[13]=C=>V(!0))},null,8,["open"]),we(yy,{open:fe.value,item:Ce.value,projects:f.value,date:e.date,onCancel:m[14]||(m[14]=C=>fe.value=!1),onSave:Ct},null,8,["open","item","projects","date"])]))}}),Od=Kt(yg,[["__scopeId","data-v-81276f4c"]]),gg={class:"cal-page"},bg={class:"cal-toolbar"},wg={class:"cal-title num"},_g=["disabled"],kg={class:"card cal-card"},Cg={class:"cal-head"},xg={class:"cal-grid"},$g=["title","onClick"],Sg={class:"cal-marks"},Eg={key:0,class:"drawer"},Tg={class:"drawer-head"},Ag={class:"drawer-body"},Pg=Dt({__name:"CalendarView",setup(e){const t=A(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)+" 月"),i=["一","二","三","四","五","六","日"],c=rt(()=>{const E=(new Date(n.value,o.value,1).getDay()+6)%7,U=new Date(n.value,o.value+1,0).getDate(),Q=[];for(let V=0;V[O.date,O])),te=U[2],I=new Map;for(const O of c.value){if(!O.inMonth)continue;const Z=co(V.get(O.date),O.date,Q,O.date===v),Oe=te.filter(Te=>Te.date===O.date);I.set(O.date,{status:Z.status,label:Z.label,location:((S=V.get(O.date))==null?void 0:S.location)||"",hasLog:Oe.length>0,hasMilestone:Oe.some(Te=>Te.is_milestone===1)})}f.value=I}ht([n,o],b,{immediate:!0}),ht(uo,()=>{b()});function h(Y){var E;return((E=f.value.get(Y))==null?void 0:E.status)??""}function _(Y){const E=f.value.get(Y);return E?Y+" · "+E.label+(E.location?" · "+E.location:""):Y}function T(Y){var E;return!!((E=f.value.get(Y))!=null&&E.hasLog)}function x(Y){var E;return!!((E=f.value.get(Y))!=null&&E.hasMilestone)}function M(){t.value=ta(t.value,-1)}function G(){t.value=ta(t.value,1)}function oe(){t.value=it()}const ae=A(null);function le(Y,E){E&&(ae.value=Y)}return ht(Ni,Y=>{Y&&(t.value=Y,ae.value=Y,Ni.value=null)},{immediate:!0}),(Y,E)=>($(),P("div",gg,[l("div",bg,[l("button",{class:"icon-btn",title:"上一月",onClick:M},[we(We,{name:"chevron-left",size:16})]),l("span",wg,q(r.value),1),l("button",{class:"icon-btn",title:"下一月",onClick:G},[we(We,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",disabled:t.value===sn(v),onClick:oe},"回到本月",8,_g)]),l("div",kg,[l("div",Cg,[($(),P(Ke,null,nt(i,U=>l("span",{key:U,class:"cal-week"},q(U),1)),64))]),l("div",xg,[($(!0),P(Ke,null,nt(c.value,(U,Q)=>($(),P("button",{key:Q,class:Xe(["cal-cell",{blank:!U.inMonth,weekend:U.weekend,selected:ae.value===U.date,"is-today":U.date===sn(v)}]),title:U.inMonth?_(U.date):void 0,onClick:V=>le(U.date,U.inMonth)},[U.inMonth?($(),P(Ke,{key:0},[l("span",{class:Xe(["daynum num",{today:U.date===sn(v)}])},q(Number(U.date.slice(8,10))),3),l("span",Sg,[h(U.date)?($(),P("span",{key:0,class:Xe(["dot",h(U.date)])},null,2)):pe("",!0),T(U.date)?($(),kt(We,{key:1,name:"check-circle",size:12,class:"mark-log"})):pe("",!0),x(U.date)?($(),kt(We,{key:2,name:"star",size:12,class:"mark-star"})):pe("",!0)])],64)):pe("",!0)],10,$g))),128))])]),we(hs,{name:"drawer"},{default:Rn(()=>[ae.value?($(),P("aside",Eg,[l("div",Tg,[E[1]||(E[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:E[0]||(E[0]=U=>ae.value=null)},[we(We,{name:"close",size:16})])]),l("div",Ag,[we(Od,{date:ae.value},null,8,["date"])])])):pe("",!0)]),_:1})]))}}),Og=Kt(Pg,[["__scopeId","data-v-abd71a5b"]]),Mg="modulepreload",Ig=function(e,t){return new URL(e,t).href},Fu={},Md=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]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));r=Promise.allSettled(n.map(b=>{if(b=Ig(b,o),b in Fu)return;Fu[b]=!0;const h=b.endsWith(".css"),_=h?'[rel="stylesheet"]':"";if(!!o)for(let M=c.length-1;M>=0;M--){const G=c[M];if(G.href===b&&(!h||G.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const x=document.createElement("link");if(x.rel=h?"stylesheet":Mg,h||(x.as="script"),x.crossOrigin="",x.href=b,v&&x.setAttribute("nonce",v),document.head.appendChild(x),h)return new Promise((M,G)=>{x.addEventListener("load",M),x.addEventListener("error",()=>G(new Error(`Unable to preload CSS for ${b}`)))})}))}function i(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"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const jg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},o=(i,c)=>{n.platforms.set(i,c)},r=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=o,n.setPlatform=r,n},Dg=e=>e.CapacitorPlatforms=jg(e),Id=Dg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Id.addPlatform;Id.setPlatform;var io;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(io||(io={}));class bi extends Error{constructor(t,n,o){super(t),this.message=t,this.code=n,this.data=o}}const Lg=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"},Kg=e=>{var t,n,o,r,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,h=()=>c!==null?c.name:Lg(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||h,T=()=>_()!=="web",x=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||T,M=V=>{const te=E.get(V);return!!(te!=null&&te.platforms.has(_())||ae(V))},G=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||M,oe=V=>{var te;return(te=f.PluginHeaders)===null||te===void 0?void 0:te.find(I=>I.name===V)},ae=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.getPluginHeader)||oe,le=V=>e.console.error(V),Y=(V,te,I)=>Promise.reject(`${I} does not have an implementation of "${te}".`),E=new Map,U=(V,te={})=>{const I=E.get(V);if(I)return console.warn(`Capacitor plugin "${V}" already registered. Cannot register plugins twice.`),I.proxy;const S=_(),O=ae(V);let Z;const Oe=async()=>(!Z&&S in te?Z=typeof te[S]=="function"?Z=await te[S]():Z=te[S]:c!==null&&!Z&&"web"in te&&(Z=typeof te.web=="function"?Z=await te.web():Z=te.web),Z),Te=(Ee,je)=>{var Ce,fe;if(O){const De=O==null?void 0:O.methods.find(ft=>je===ft.name);if(De)return De.rtype==="promise"?ft=>f.nativePromise(V,je.toString(),ft):(ft,Ct)=>f.nativeCallback(V,je.toString(),ft,Ct);if(Ee)return(Ce=Ee[je])===null||Ce===void 0?void 0:Ce.bind(Ee)}else{if(Ee)return(fe=Ee[je])===null||fe===void 0?void 0:fe.bind(Ee);throw new bi(`"${V}" plugin is not implemented on ${S}`,io.Unimplemented)}},ye=Ee=>{let je;const Ce=(...fe)=>{const De=Oe().then(ft=>{const Ct=Te(ft,Ee);if(Ct){const xt=Ct(...fe);return je=xt==null?void 0:xt.remove,xt}else throw new bi(`"${V}.${Ee}()" is not implemented on ${S}`,io.Unimplemented)});return Ee==="addListener"&&(De.remove=async()=>je()),De};return Ce.toString=()=>`${Ee.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:Ee,writable:!1,configurable:!1}),Ce},Pe=ye("addListener"),ze=ye("removeListener"),de=(Ee,je)=>{const Ce=Pe({eventName:Ee},je),fe=async()=>{const ft=await Ce;ze({eventName:Ee,callbackId:ft},je)},De=new Promise(ft=>Ce.then(()=>ft({remove:fe})));return De.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await fe()},De},xe=new Proxy({},{get(Ee,je){switch(je){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return O?de:Pe;case"removeListener":return ze;default:return ye(je)}}});return v[V]=xe,E.set(V,{name:V,proxy:xe,platforms:new Set([...Object.keys(te),...O?[S]:[]])}),xe},Q=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||U;return f.convertFileSrc||(f.convertFileSrc=V=>V),f.getPlatform=_,f.handleError=le,f.isNativePlatform=x,f.isPluginAvailable=G,f.pluginMethodNoop=Y,f.registerPlugin=Q,f.Exception=bi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Rg=e=>e.Capacitor=Kg(e),lo=Rg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),jd=lo.registerPlugin;lo.Plugins;class Dd{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 i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),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 i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}r.forEach(i=>i(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 Vu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Bu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Ng extends Dd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(o=>{if(o.length<=0)return;let[r,i]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=Bu(r).trim(),i=Bu(i).trim(),n[r]=i}),n}async setCookie(t){try{const n=Vu(t.key),o=Vu(t.value),r=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${o||""}${r}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}jd("CapacitorCookies",{web:()=>new Ng});const Fg=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)}),Vg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(r=>r.toLocaleLowerCase()).reduce((r,i,c)=>(r[i]=e[t[c]],r),{})},Bg=(e,t=!0)=>e?Object.entries(e).reduce((o,r)=>{const[i,c]=r;let f,v;return Array.isArray(c)?(v="",c.forEach(b=>{f=t?encodeURIComponent(b):b,v+=`${i}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${i}=${f}`),`${o}&${v}`},"").substr(1):null,Ug=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=Vg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(r.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class qg extends Dd{async request(t){const n=Ug(t,t.webFetchExtra),o=Bg(t.params,t.shouldEncodeUrlParams),r=o?`${t.url}?${o}`:t.url,i=await fetch(r,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Fg(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const h={};return i.headers.forEach((_,T)=>{h[T]=_}),{data:v,headers:h,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}jd("CapacitorHttp",{web:()=>new qg});async function Sa(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:v}=await Md(async()=>{const{Filesystem:b,Directory:h,Encoding:_}=await import("./index-oGn7bwPd.js");return{Filesystem:b,Directory:h,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:v.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:v.UTF8,recursive:!0})).uri}}const o=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(o),i=document.createElement("a");return i.href=r,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e4),""}const Hg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Sa},Symbol.toStringTag,{value:"Module"})),zg={class:"detail-page"},Wg={class:"card toolbar"},Gg={class:"nav-row"},Yg=["value"],Jg=["disabled"],Xg={class:"exp-row"},Qg={class:"seg"},Zg=["disabled"],eb=Dt({__name:"TodayView",setup(e){const t=A(it()),n=rt(()=>t.value===it());function o(){t.value=Ut(t.value,-1)}function r(){t.value=Ut(t.value,1)}function i(){t.value=it()}const c=A("day"),f=A(it()),v=A(it()),b=A(!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:Ut(x,6),label:x+"_"+Ut(x,6)}}if(c.value==="month"){const x=f.value.slice(0,4),M=f.value.slice(5,7),G=new Date(Number(x),Number(M),0).getDate();return{start:x+"-"+M+"-01",end:x+"-"+M+"-"+G,label:x+"-"+M}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:x,end:M,label:G}=h(),[oe,ae,le,Y]=await Promise.all([vs(),Xo(x,M),Qo(x,M),ao(!0)]),E=new Map(Y.map(I=>[I.id,I.name])),U=["# 工作详情 "+G,""],Q=["周日","周一","周二","周三","周四","周五","周六"];let V=x,te=0;for(;V<=M&&te<400;){const I=le.filter(O=>O.date===V),S=ae.find(O=>O.date===V);if(S||I.length){if(U.push("## "+V+" "+Q[new Date(V+"T00:00:00").getDay()],""),S&&(S.clock_in_at||S.kind==="makeup")){const O=co(S,V,oe,V===it()),Z=[_n(S.clock_in_at),"–",_n(S.clock_out_at),"·",O.label];S.location&&Z.push("· 地点:"+S.location),U.push("考勤:"+Z.join(" "),"")}for(const O of I){const Z=O.project_id&&E.get(O.project_id)||"",Oe="- 【"+qo(O.category)+"】"+O.content+(O.minutes?"("+O.minutes+" 分钟)":"")+(Z?" @"+Z:"");U.push(Oe),O.takeaway&&U.push(" - 收获:"+O.takeaway),O.needs_followup===1&&O.remark?U.push(" - 待跟进:"+O.remark):O.remark&&U.push(" - 备注:"+O.remark)}U.push("")}V=Ut(V,1),te++}await Sa("工作详情_"+G+".md",U.join(` -`)),Ue("已导出 Markdown")}finally{b.value=!1}}}function T(x){const M=x.target.value;M&&(t.value=M)}return ht(t,x=>{f.value=x,c.value==="custom"&&(v.value=x)}),(x,M)=>($(),P("div",zg,[l("div",Wg,[l("div",Gg,[l("button",{class:"icon-btn",title:"前一天",onClick:o},[we(We,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-title num",{"is-today":n.value}])},q(sn(ud)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:r},[we(We,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:T},null,40,Yg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Jg)]),M[7]||(M[7]=l("div",{class:"tool-sep"},null,-1)),l("div",Xg,[M[6]||(M[6]=l("span",{class:"muted exp-label"},"导出",-1)),l("div",Qg,[l("button",{class:Xe(["seg-btn",{active:c.value==="day"}]),onClick:M[0]||(M[0]=G=>c.value="day")},"指定日",2),l("button",{class:Xe(["seg-btn",{active:c.value==="week"}]),onClick:M[1]||(M[1]=G=>c.value="week")},"当周",2),l("button",{class:Xe(["seg-btn",{active:c.value==="month"}]),onClick:M[2]||(M[2]=G=>c.value="month")},"当月",2),l("button",{class:Xe(["seg-btn",{active:c.value==="custom"}]),onClick:M[3]||(M[3]=G=>c.value="custom")},"自定义",2)]),c.value!=="day"?Me(($(),P("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":M[4]||(M[4]=G=>f.value=G)},null,512)),[[Fe,f.value]]):pe("",!0),c.value==="custom"?Me(($(),P("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":M[5]||(M[5]=G=>v.value=G)},null,512)),[[Fe,v.value]]):pe("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,Zg)])]),we(Od,{date:t.value},null,8,["date"])]))}}),tb=Kt(eb,[["__scopeId","data-v-2bb84c76"]]),nb={class:"plan-page"},sb={class:"blk-head"},ob={key:0,class:"card empty muted"},rb={class:"goal-main"},ab={class:"goal-line"},ib={class:"tag"},lb={class:"goal-name"},ub={class:"muted num goal-range"},cb={class:"goal-bar"},db={class:"muted num goal-meta"},fb={class:"goal-ops"},pb=["onClick"],vb=["onClick"],mb={class:"blk-head day-head"},hb={class:"blk-head-text"},yb={class:"muted blk-sub num"},gb={class:"day-ops"},bb={class:"card list-card"},wb={key:0,class:"empty muted"},_b={class:"pi-time num"},kb={class:"muted"},Cb={class:"pi-main"},xb={class:"pi-title"},$b={class:"tag"},Sb={key:0,class:"tag tag-goal"},Eb={key:1,class:"state-done"},Tb={key:2,class:"state-skip"},Ab={key:0,class:"muted pi-note"},Pb={class:"muted pi-meta num"},Ob={key:0,class:"timer-live"},Mb={class:"pi-ops"},Ib=["onClick"],jb=["onClick"],Db=["onClick"],Lb=["onClick"],Kb=["onClick"],Rb=["onClick"],Nb={class:"dialog",role:"dialog","aria-label":"计划"},Fb={class:"dialog-head"},Vb={class:"dialog-title"},Bb={class:"dialog-body"},Ub={class:"form-row"},qb={class:"form-row"},Hb=["value"],zb={class:"form-row two"},Wb={class:"form-row"},Gb={key:0,class:"form-error"},Yb={class:"dialog-btns"},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=Dt({__name:"PlanView",setup(e){const t=A([]),n=A({}),o=A(!1),r=A(null),i=A(""),c=A("学习"),f=A(it()),v=A(Ut(it(),6)),b=A(""),h=A(""),_=A(null);function T(){r.value=null,i.value="",c.value="学习",f.value=it(),v.value=Ut(it(),6),b.value="",h.value="",o.value=!0}function x(m){r.value=m,i.value=m.title,c.value=m.kind,f.value=m.start_date,v.value=m.end_date,b.value=m.note||"",h.value="",o.value=!0}async function M(){if(!i.value.trim()){h.value="请填写计划名称";return}if(v.valueoe.value===it());async function Q(){le.value=!0;const[m,C,j]=await Promise.all([bh(oe.value),Ah(),Th()]);ae.value=m,t.value=C;const se={};for(const W of j)se[String(W.goalId)]={done:W.done,total:W.total};n.value=se,le.value=!1}ht(oe,Q),ht(uo,Q),ln(()=>{Q(),E=window.setInterval(()=>{Y.value=Date.now()},3e4)}),Cn(()=>{E&&window.clearInterval(E)});function V(){oe.value=Ut(oe.value,-1)}function te(){oe.value=Ut(oe.value,1)}function I(){oe.value=it()}const S=rt(()=>{const m=ae.value.length,C=ae.value.filter(be=>be.status==="done").length,j=ae.value.reduce((be,ke)=>be+O(ke),0),se=ae.value.reduce((be,ke)=>be+(ke.actual_minutes||0),0);let W=0;const ge=Oe.value;if(ge){const be=ae.value.find(ke=>ke.id===ge);be&&(W=Te(be))}return{total:m,done:C,plannedMin:j,actualMin:se+W}});function O(m){const[C,j]=m.start_time.split(":").map(Number),[se,W]=m.end_time.split(":").map(Number);return Math.max(0,se*60+W-(C*60+j))}function Z(m){return m<60?m+" 分钟":Math.floor(m/60)+" 小时 "+m%60+" 分"}const Oe=rt(()=>{const m=ae.value.find(C=>!!C.timer_started_at);return m?m.id:null});function Te(m){if(!m.timer_started_at)return m.actual_minutes||0;const C=Math.max(0,Math.round((Y.value-new Date(m.timer_started_at).getTime())/6e4));return(m.actual_minutes||0)+C}async function ye(m){m.timer_started_at?(await $a(m.id),Ue("已停止计时:"+m.title)):(await $h(m.id),Ue("开始计时:"+m.title)),Rm(),await Q()}async function Pe(m,C){await xh(m.id,C),await Q()}const ze=A(!1),de=A(null),xe=A(""),Ee=A("学习"),je=A("09:00"),Ce=A("10:00"),fe=A(""),De=A(""),ft=["学习","健身","自律","工作","阅读","其他"];function Ct(){de.value=null,xe.value="",Ee.value="学习",je.value="09:00",Ce.value="10:00",fe.value="",De.value="",ze.value=!0}function xt(m){de.value=m.id,xe.value=m.title,Ee.value=m.kind,je.value=m.start_time,Ce.value=m.end_time,fe.value=m.note||"",De.value="",ze.value=!0}async function qt(){if(!xe.value.trim()){De.value="请填写计划内容";return}if(Ce.value<=je.value){De.value="结束时间需晚于开始时间";return}de.value?(await kh(de.value,{title:xe.value.trim(),kind:Ee.value,start_time:je.value,end_time:Ce.value,note:fe.value}),Ue("计划已更新")):(await _h({date:oe.value,start_time:je.value,end_time:Ce.value,title:xe.value,kind:Ee.value,note:fe.value}),Ue("计划已添加")),ze.value=!1,await Q()}async function bt(m){await Ch(m.id),Ue("已删除"),await Q()}const Re=["周日","周一","周二","周三","周四","周五","周六"];function g(m){return Re[Ns(m).getDay()]}return(m,C)=>($(),P("div",nb,[l("div",sb,[C[18]||(C[18]=l("div",{class:"blk-head-text"},[l("div",{class:"blk-title"},"长期计划"),l("div",{class:"muted blk-sub"},"跨越多天的目标,自动落实到每一天")],-1)),l("button",{class:"btn btn-sm",onClick:T},[we(We,{name:"plus",size:14}),C[17]||(C[17]=gt(" 新建长期计划",-1))])]),t.value.length?pe("",!0):($(),P("div",ob," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),P(Ke,null,nt(t.value,j=>($(),P("div",{key:j.id,class:"card goal-card"},[l("div",rb,[l("div",ab,[l("span",ib,q(j.kind),1),l("span",lb,q(j.title),1),l("span",ub,q(j.start_date.slice(5))+" ~ "+q(j.end_date.slice(5)),1)]),l("div",cb,[l("span",{class:"goal-bar-fill",style:zn({width:(n.value[String(j.id)]?Math.round(n.value[String(j.id)].done/Math.max(1,n.value[String(j.id)].total)*100):0)+"%",background:n.value[String(j.id)]&&n.value[String(j.id)].done>=n.value[String(j.id)].total&&n.value[String(j.id)].total>0?"var(--ok)":"var(--accent)"})},null,4)]),l("div",db,[gt(q(n.value[String(j.id)]?n.value[String(j.id)].done+"/"+n.value[String(j.id)].total+" 天已完成":"0/"+(n.value[String(j.id)]?n.value[String(j.id)].total:0)+" 天")+" ",1),j.note?($(),P(Ke,{key:0},[gt(" · "+q(j.note),1)],64)):pe("",!0)])]),l("div",fb,[l("button",{class:"icon-btn",title:"编辑",onClick:se=>x(j)},[we(We,{name:"edit",size:14})],8,pb),l("button",{class:"icon-btn",title:"删除",onClick:se=>_.value=j},[we(We,{name:"close",size:14})],8,vb)])]))),128)),l("div",mb,[l("div",hb,[C[21]||(C[21]=l("div",{class:"blk-title"},"每日安排",-1)),l("div",yb,[gt(" 共 "+q(S.value.total)+" 项 · 完成 "+q(S.value.done)+" 项 · 计划 "+q(Z(S.value.plannedMin))+" · 实际投入 "+q(Z(S.value.actualMin))+" ",1),Oe.value?($(),P(Ke,{key:0},[C[19]||(C[19]=gt(" · ",-1)),C[20]||(C[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):pe("",!0)])]),l("div",gb,[l("button",{class:"icon-btn",title:"前一天",onClick:V},[we(We,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-chip num",{today:U.value}])},q(oe.value.slice(5))+" "+q(g(oe.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:te},[we(We,{name:"chevron-right",size:16})]),l("button",{class:Xe(["btn btn-sm",{"btn-primary":!U.value}]),onClick:I},"今天",2),l("button",{class:"btn btn-primary btn-sm",onClick:Ct},[we(We,{name:"plus",size:14}),C[22]||(C[22]=gt(" 添加计划",-1))])])]),l("div",bb,[!le.value&&!ae.value.length?($(),P("div",wb,"今天还没有计划,点「添加计划」开始规划。")):pe("",!0),($(!0),P(Ke,null,nt(ae.value,j=>($(),P("div",{key:j.id,class:Xe(["plan-item",{done:j.status==="done",skip:j.status==="skip",running:!!j.timer_started_at}])},[l("div",_b,[gt(q(j.start_time),1),l("span",kb," - "+q(j.end_time),1)]),l("div",Cb,[l("div",xb,[l("span",$b,q(j.kind),1),j.goal_id?($(),P("span",Sb,"长期")):pe("",!0),l("span",{class:Xe(["pi-text",{strike:j.status==="done"}])},q(j.title),3),j.status==="done"?($(),P("span",Eb,"已完成")):j.status==="skip"?($(),P("span",Tb,"已跳过")):pe("",!0)]),j.note?($(),P("div",Ab,q(j.note),1)):pe("",!0),l("div",Pb,[j.timer_started_at?($(),P("span",Ob,"计时中 · 已 "+q(Te(j))+" 分钟",1)):j.actual_minutes>0?($(),P(Ke,{key:1},[gt("实际投入 "+q(j.actual_minutes)+" 分钟",1)],64)):pe("",!0)])]),l("div",Mb,[j.status!=="done"?($(),P("button",{key:0,class:Xe(["btn btn-xs",{"timer-on":!!j.timer_started_at}]),onClick:se=>ye(j)},q(j.timer_started_at?"停止计时":"计时"),11,Ib)):pe("",!0),j.status!=="done"?($(),P("button",{key:1,class:"btn btn-xs",onClick:se=>Pe(j,"done")},"完成",8,jb)):pe("",!0),j.status==="todo"?($(),P("button",{key:2,class:"btn btn-xs",onClick:se=>Pe(j,"skip")},"跳过",8,Db)):pe("",!0),j.status!=="todo"?($(),P("button",{key:3,class:"btn btn-xs",onClick:se=>Pe(j,"todo")},"恢复",8,Lb)):pe("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:se=>xt(j)},[we(We,{name:"edit",size:14})],8,Kb),l("button",{class:"icon-btn",title:"删除",onClick:se=>bt(j)},[we(We,{name:"close",size:14})],8,Rb)])],2))),128))]),($(),kt(Kn,{to:"body"},[ze.value?($(),P("div",{key:0,class:"mask",onClick:C[7]||(C[7]=Ft(j=>ze.value=!1,["self"]))},[l("div",Nb,[l("div",Fb,[l("span",Vb,q(de.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:C[0]||(C[0]=j=>ze.value=!1)},[we(We,{name:"close",size:16})])]),l("div",Bb,[l("div",Ub,[C[23]||(C[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[1]||(C[1]=j=>xe.value=j),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Ot(qt,["enter"])},null,544),[[Fe,xe.value]])]),l("div",qb,[C[24]||(C[24]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":C[2]||(C[2]=j=>Ee.value=j)},[($(),P(Ke,null,nt(ft,j=>l("option",{key:j,value:j},q(j),9,Hb)),64))],512),[[ps,Ee.value]])]),l("div",zb,[l("div",null,[C[25]||(C[25]=l("label",null,"开始时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":C[3]||(C[3]=j=>je.value=j)},null,512),[[Fe,je.value]])]),l("div",null,[C[26]||(C[26]=l("label",null,"结束时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":C[4]||(C[4]=j=>Ce.value=j)},null,512),[[Fe,Ce.value]])])]),l("div",Wb,[C[27]||(C[27]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[5]||(C[5]=j=>fe.value=j),placeholder:"目标、资料、提醒等",onKeydown:Ot(qt,["enter"])},null,544),[[Fe,fe.value]])]),De.value?($(),P("div",Gb,q(De.value),1)):pe("",!0)]),l("div",Yb,[l("button",{class:"btn btn-sm",onClick:C[6]||(C[6]=j=>ze.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:qt},q(de.value?"保存":"添加"),1)])])])):pe("",!0)])),($(),kt(Kn,{to:"body"},[o.value?($(),P("div",{key:0,class:"mask",onClick:C[15]||(C[15]=Ft(j=>o.value=!1,["self"]))},[l("div",Jb,[l("div",Xb,[l("span",Qb,q(r.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:C[8]||(C[8]=j=>o.value=!1)},[we(We,{name:"close",size:16})])]),l("div",Zb,[l("div",ew,[C[28]||(C[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[9]||(C[9]=j=>i.value=j),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Fe,i.value]])]),l("div",tw,[C[29]||(C[29]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":C[10]||(C[10]=j=>c.value=j)},[($(),P(Ke,null,nt(ft,j=>l("option",{key:j,value:j},q(j),9,nw)),64))],512),[[ps,c.value]])]),l("div",sw,[l("div",null,[C[30]||(C[30]=l("label",null,"开始日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":C[11]||(C[11]=j=>f.value=j)},null,512),[[Fe,f.value]])]),l("div",null,[C[31]||(C[31]=l("label",null,"结束日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":C[12]||(C[12]=j=>v.value=j)},null,512),[[Fe,v.value]])])]),l("div",ow,[C[32]||(C[32]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[13]||(C[13]=j=>b.value=j)},null,512),[[Fe,b.value]])]),h.value?($(),P("div",rw,q(h.value),1)):pe("",!0),C[33]||(C[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",aw,[l("button",{class:"btn btn-sm",onClick:C[14]||(C[14]=j=>o.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:M},q(r.value?"保存":"创建"),1)])])])):pe("",!0)])),we(wn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:C[16]||(C[16]=j=>_.value=null),onConfirm:G},null,8,["open","message"])]))}}),lw=Kt(iw,[["__scopeId","data-v-ffd19b28"]]),uw={class:"stats"},cw={class:"cards"},dw={class:"card stat-card"},fw={class:"stat-num num"},pw={class:"card stat-card"},vw={class:"stat-num num"},mw={class:"card stat-card"},hw={class:"stat-num num"},yw={class:"card stat-card"},gw={class:"stat-num num"},bw={class:"card section"},ww={class:"heat"},_w=["title"],kw={class:"two-col"},Cw={class:"card section"},xw={class:"bar-label"},$w={class:"bar-track"},Sw={class:"muted num bar-num"},Ew={key:0,class:"muted"},Tw={class:"card section"},Aw={class:"bar-label"},Pw={class:"bar-track"},Ow={class:"muted num bar-num"},Mw={key:0,class:"muted"},Iw={class:"card section"},jw={class:"bar-label loc-label"},Dw={class:"bar-track"},Lw={class:"muted num bar-num"},Kw={key:0,class:"muted"},Rw=Dt({__name:"StatsView",setup(e){const t=A({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=A([]),o=A([]),r=A([]),i=A([]);async function c(){const b=it(),h="2000-01-01",_=await Promise.all([vs(),Xo(h,b),Qo(h,b),ao(!0)]),T=_[0],x=_[1],M=_[2],G=_[3],oe=x.filter(ye=>ye.clock_in_at||ye.kind==="makeup");let ae=0;for(const ye of oe){const Pe=co(ye,ye.date,T,ye.date===b);ae+=Pe.workedMinutes??0}const le=new Set(M.map(ye=>ye.date));let Y=0,E=b;for(le.has(E)||(E=Ut(b,-1));le.has(E);)Y++,E=Ut(E,-1);t.value={attendDays:oe.length,totalHours:(ae/60).toFixed(1),itemCount:M.length,streak:Y};const U=new Map;for(const ye of oe){const Pe=ye.location||"未记录";U.set(Pe,(U.get(Pe)||0)+1)}i.value=Array.from(U.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/(oe.length||1)*100)})).sort((ye,Pe)=>Pe.count-ye.count);const Q=M.length||1,V=await Zo(),te=new Map;for(const ye of M)te.set(ye.category,(te.get(ye.category)||0)+1);const I=new Set(V);for(const ye of te.keys())I.has(ye)||V.push(ye);o.value=V.map(ye=>{const Pe=te.get(ye)||0;return{key:ye,label:ye,count:Pe,percent:Math.round(Pe/Q*100)}}).filter(ye=>ye.count>0).sort((ye,Pe)=>Pe.count-ye.count);const S=new Map(G.map(ye=>[ye.id,ye.name])),O=new Map;for(const ye of M){const Pe=ye.project_id?S.get(ye.project_id)||"已删除项目":"无项目";O.set(Pe,(O.get(Pe)||0)+1)}r.value=Array.from(O.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/Q*100)})).sort((ye,Pe)=>Pe.count-ye.count);const Z=new Map;for(const ye of M)Z.set(ye.date,(Z.get(ye.date)||0)+1);const Oe=Zs(b),Te=[];for(let ye=11;ye>=0;ye--){const Pe=Ut(Oe,-7*ye),ze=[];for(let de=0;de<7;de++){const xe=Ut(Pe,de);ze.push({date:xe,count:Z.get(xe)||0})}Te.push(ze)}n.value=Te}ln(async()=>{await c()}),ht(uo,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,h){return b+" · "+(h?h+" 条":"无记录")}return(b,h)=>($(),P("div",uw,[l("div",cw,[l("div",dw,[h[0]||(h[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",fw,q(t.value.attendDays),1)]),l("div",pw,[h[1]||(h[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",vw,q(t.value.totalHours),1)]),l("div",mw,[h[2]||(h[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",hw,q(t.value.itemCount),1)]),l("div",yw,[h[3]||(h[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",gw,q(t.value.streak),1)])]),l("div",bw,[h[4]||(h[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",ww,[($(!0),P(Ke,null,nt(n.value,(_,T)=>($(),P("div",{key:T,class:"heat-col"},[($(!0),P(Ke,null,nt(_,x=>($(),P("span",{key:x.date,class:Xe(["heat-cell","lv"+f(x.count)]),title:v(x.date,x.count)},null,10,_w))),128))]))),128))]),h[5]||(h[5]=zp('
少多
',1))]),l("div",kw,[l("div",Cw,[h[6]||(h[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),P(Ke,null,nt(o.value,_=>($(),P("div",{key:_.key,class:"bar-row"},[l("span",xw,q(_.label),1),l("span",$w,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Sw,q(_.count)+" 条 · "+q(_.percent)+"%",1)]))),128)),o.value.length?pe("",!0):($(),P("div",Ew,"暂无数据"))]),l("div",Tw,[h[7]||(h[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),P(Ke,null,nt(r.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",Aw,q(_.name),1),l("span",Pw,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Ow,q(_.count)+" 条 · "+q(_.percent)+"%",1)]))),128)),r.value.length?pe("",!0):($(),P("div",Mw,"暂无数据"))])]),l("div",Iw,[h[8]||(h[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),P(Ke,null,nt(i.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",jw,q(_.name),1),l("span",Dw,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Lw,q(_.count)+" 天 · "+q(_.percent)+"%",1)]))),128)),i.value.length?pe("",!0):($(),P("div",Kw,"暂无数据"))])]))}}),Nw=Kt(Rw,[["__scopeId","data-v-5469ae68"]]);async function Fw(e,t,n){const o=it(),r=await Promise.all([vs(),Xo(e,t),Qo(e,t),ao(!0),gh(e,t),Zo()]),i=r[0],c=r[1],f=r[2],v=r[3],b=r[4],h=r[5];let _=0,T=0,x=0;for(const O of c){(O.clock_in_at||O.kind==="makeup")&&_++,O.kind==="makeup"&&x++;const Z=co(O,O.date,i,O.date===o);T+=Z.workedMinutes??0}const M=new Map;for(const O of c){if(!(O.clock_in_at||O.kind==="makeup"))continue;const Z=O.location||"未记录";M.set(Z,(M.get(Z)||0)+1)}const G=Array.from(M.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,Z)=>Z.count-O.count),oe=f.length||1,ae=new Map;for(const O of f)ae.set(O.category,(ae.get(O.category)||0)+1);const le=new Set(h);for(const O of ae.keys())le.has(O)||h.push(O);const Y=h.map(O=>{const Z=ae.get(O)||0;return{key:O,label:O,count:Z,percent:Math.round(Z/oe*100)}}).filter(O=>O.count>0).sort((O,Z)=>Z.count-O.count),E=new Map(v.map(O=>[O.id,O.name])),U=new Map;for(const O of f){const Z=O.project_id?E.get(O.project_id)||"已删除项目":"无项目";U.set(Z,(U.get(Z)||0)+1)}const Q=Array.from(U.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,Z)=>Z.count-O.count),V=f.filter(O=>O.is_milestone===1).map(O=>({date:O.date,content:O.content})),te=f.filter(O=>O.needs_followup===1).map(O=>({date:O.date,content:O.content,remark:O.remark||""})),I=f.filter(O=>!!O.takeaway).map(O=>({date:O.date,text:O.takeaway})),S=b.map(O=>({weekStart:O.week_start,highlights:O.highlights||"",challenges:O.challenges||"",plan_next:O.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(T/60).toFixed(1),makeupCount:x,leaveCount:c.filter(O=>O.kind==="leave").length,itemCount:f.length,categoryStats:Y,projectStats:Q,locationStats:G,milestones:V,followups:te,takeaways:I,weekNotes:S}}function Vw(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 Wi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Bw(e){const t=await Promise.all([St("ai_base_url",""),St("ai_api_key",""),St("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),o=t[1].trim(),r=t[2].trim();if(!n||!r)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};o&&(c.Authorization="Bearer "+o);const v=JSON.stringify({model:r,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let T="接口返回 "+b.status;try{const x=await b.json();x&&x.error&&x.error.message&&(T+=":"+x.error.message)}catch{}throw new Error(T)}const h=await b.json(),_=h&&h.choices&&h.choices[0]&&h.choices[0].message&&h.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Uw={class:"report"},qw={class:"report-toolbar"},Hw={class:"seg"},zw=["onClick"],Ww=["disabled"],Gw=["disabled"],Yw={key:0,class:"ai-error"},Jw={class:"report-grid"},Xw={class:"report-left"},Qw={class:"card section"},Zw={class:"section-title"},e_={class:"muted note-saved"},t_={class:"card section"},n_={class:"report-right"},s_={key:0,class:"card section"},o_={class:"sum-row"},r_={class:"num"},a_={class:"sum-row"},i_={class:"num"},l_={class:"sum-row"},u_={class:"num"},c_={class:"sum-row"},d_={class:"num"},f_={class:"sum-row"},p_={class:"num"},v_={class:"muted"},m_={class:"num"},h_={key:0,class:"muted sum-empty"},y_={class:"muted"},g_={key:1,class:"muted sum-empty"},b_={class:"muted"},w_={key:2,class:"muted sum-empty"},__={class:"muted"},k_={key:3,class:"muted sum-empty"},C_=Dt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=A("week"),o=A(Zs(it())),r=A(it()),i=A(null),c=A(""),f=A(!1),v=A(!1),b=A(null),h=A(""),_=A(Zs(it())),T=A(""),x=A(""),M=A(""),G=A(!1);async function oe(){const te=await yl(_.value);T.value=(te==null?void 0:te.highlights)||"",x.value=(te==null?void 0:te.challenges)||"",M.value=(te==null?void 0:te.plan_next)||"",G.value=!1}async function ae(){await yh(_.value,{highlights:T.value.trim()||null,challenges:x.value.trim()||null,plan_next:M.value.trim()||null}),G.value=!0,await Y()}function le(te){const I=it();if(te==="week"){const S=Zs(I);return{start:S,end:Ut(S,6),label:"本周"}}if(te==="month"){const S=I.slice(0,7);return{start:S+"-01",end:I,label:S+" 本月"}}return te==="all"?{start:"2000-01-01",end:I,label:"全部实习期"}:{start:o.value,end:r.value,label:o.value+" ~ "+r.value}}async function Y(){f.value=!0;const te=le(n.value),I=await Fw(te.start,te.end,te.label);i.value=I,c.value=Vw(I),f.value=!1}ht(n,Y),ht([o,r],()=>{n.value==="custom"&&Y()}),ln(async()=>{await oe(),await Y()});async function E(){const te=it().replace(/-/g,""),I=await Sa("实习工作总结_"+te+".md",c.value);Ue(I?"总结已导出到:"+I:"总结已导出到系统下载目录")}async function U(){await Wi(c.value),Ue("总结已复制到剪贴板")}async function Q(){if(v.value)return;h.value="";const te=c.value.trim();if(!te){h.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await Bw(te),Ue("AI 润色完成")}catch(I){b.value=null,h.value=I instanceof Error?I.message:"润色失败"}v.value=!1}function V(){b.value!==null&&(c.value=b.value),b.value=null}return(te,I)=>($(),P("div",Uw,[l("div",qw,[l("div",Hw,[($(),P(Ke,null,nt(t,S=>l("button",{key:S.key,class:Xe(["seg-btn",{active:n.value===S.key}]),onClick:O=>n.value=S.key},q(S.label),11,zw)),64))]),n.value==="custom"?($(),P(Ke,{key:0},[Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[0]||(I[0]=S=>o.value=S)},null,512),[[Fe,o.value]]),I[6]||(I[6]=l("span",{class:"muted"},"至",-1)),Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[1]||(I[1]=S=>r.value=S)},null,512),[[Fe,r.value]])],64)):pe("",!0),I[10]||(I[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Q},[we(We,{name:"edit",size:14}),I[7]||(I[7]=gt("AI 润色 ",-1))],8,Ww),b.value!==null?($(),P("button",{key:1,class:"btn btn-sm",onClick:V},"还原润色前")):pe("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:Y},[we(We,{name:"edit",size:14}),I[8]||(I[8]=gt("重新生成 ",-1))],8,Gw),l("button",{class:"btn btn-sm",onClick:U},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:E},[we(We,{name:"export",size:14}),I[9]||(I[9]=gt("导出 Markdown ",-1))])]),h.value?($(),P("div",Yw,q(h.value),1)):pe("",!0),l("div",Jw,[l("div",Xw,[l("div",Qw,[l("div",Zw,"本周周记("+q(_.value)+" 起)",1),I[11]||(I[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":I[2]||(I[2]=S=>T.value=S),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[Fe,T.value]]),I[12]||(I[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":I[3]||(I[3]=S=>x.value=S),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[Fe,x.value]]),I[13]||(I[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=S=>M.value=S),placeholder:"下周准备做什么",onBlur:ae},null,544),[[Fe,M.value]]),l("div",e_,q(G.value?"已保存":"失焦自动保存"),1)]),l("div",t_,[I[14]||(I[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Me(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":I[5]||(I[5]=S=>c.value=S),spellcheck:"false"},null,512),[[Fe,c.value]])])]),l("div",n_,[i.value?($(),P("div",s_,[I[20]||(I[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",o_,[I[15]||(I[15]=l("span",{class:"muted"},"出勤",-1)),l("span",r_,q(i.value.attendDays)+" 天",1)]),l("div",a_,[I[16]||(I[16]=l("span",{class:"muted"},"工时",-1)),l("span",i_,q(i.value.totalHours)+" 小时",1)]),l("div",l_,[I[17]||(I[17]=l("span",{class:"muted"},"补卡",-1)),l("span",u_,q(i.value.makeupCount)+" 次",1)]),l("div",c_,[I[18]||(I[18]=l("span",{class:"muted"},"请假",-1)),l("span",d_,q(i.value.leaveCount)+" 天",1)]),l("div",f_,[I[19]||(I[19]=l("span",{class:"muted"},"记录",-1)),l("span",p_,q(i.value.itemCount)+" 条",1)]),I[21]||(I[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),P(Ke,null,nt(i.value.categoryStats,S=>($(),P("div",{key:S.key,class:"sum-row"},[l("span",v_,q(S.label),1),l("span",m_,q(S.count)+" 条 · "+q(S.percent)+"%",1)]))),128)),i.value.categoryStats.length?pe("",!0):($(),P("div",h_,"(无)")),I[22]||(I[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),P(Ke,null,nt(i.value.milestones,(S,O)=>($(),P("div",{key:"m"+O,class:"sum-item"},[gt(q(S.content),1),l("span",y_,"("+q(S.date)+")",1)]))),128)),i.value.milestones.length?pe("",!0):($(),P("div",g_,"(无)")),I[23]||(I[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),P(Ke,null,nt(i.value.followups,(S,O)=>($(),P("div",{key:"f"+O,class:"sum-item"},[gt(q(S.content),1),l("span",b_,"("+q(S.date)+")",1)]))),128)),i.value.followups.length?pe("",!0):($(),P("div",w_,"(无)")),I[24]||(I[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),P(Ke,null,nt(i.value.takeaways,(S,O)=>($(),P("div",{key:"t"+O,class:"sum-item"},[gt(q(S.text),1),l("span",__,"("+q(S.date)+")",1)]))),128)),i.value.takeaways.length?pe("",!0):($(),P("div",k_,"(无)"))])):pe("",!0)])])]))}}),x_=Kt(C_,[["__scopeId","data-v-7e1b08ed"]]),$_=["aria-label"],S_={class:"dialog-head"},E_={class:"dialog-title"},T_={class:"dialog-body"},A_={class:"form-grid"},P_={class:"field span2"},O_={class:"seg"},M_={class:"field"},I_={class:"field"},j_={class:"field"},D_=["value"],L_={class:"add-cat"},K_=["onKeydown"],R_={key:0,class:"field"},N_={class:"seg"},F_={class:"field span2"},V_={key:0,class:"form-error"},B_={class:"dialog-btns"},U_=Dt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=A("expense"),i=A(""),c=A(""),f=A(""),v=A(""),b=A(!1),h=A(!1),_=A(""),T=A(null);function x(E){n.open&&E.key==="Escape"&&o("cancel")}ht(()=>n.open,async E=>{var U;E?(await G(),r.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,h.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",x),await Rs(),(U=T.value)==null||U.focus()):window.removeEventListener("keydown",x)}),Cn(()=>window.removeEventListener("keydown",x)),ht(r,async()=>{await G(),i.value=M.value[0]||""});const M=A([]);async function G(){M.value=await Wo(r.value)}const oe=A("");async function ae(){const E=oe.value.trim();if(E){if(M.value.includes(E)){oe.value="";return}M.value.push(E),await zi(r.value,M.value),i.value=E,oe.value=""}}function le(){return i.value&&M.value.includes(i.value)?i.value:M.value[0]}function Y(){const E=String(c.value??"").trim(),U=Number(E);if(!E||!isFinite(U)||U<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Q=r.value==="expense"&&b.value?1:0;o("save",{type:r.value,category:le(),amount:Math.round(U*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Q,reimbursed:Q&&h.value?1:0})}return(E,U)=>($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:U[12]||(U[12]=Ft(Q=>o("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",S_,[l("span",E_,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=Q=>o("cancel"))},[we(We,{name:"close",size:16})])]),l("div",T_,[l("div",A_,[l("div",P_,[U[13]||(U[13]=l("label",null,"类型",-1)),l("div",O_,[l("button",{class:Xe(["seg-btn",{active:r.value==="expense"}]),onClick:U[1]||(U[1]=Q=>r.value="expense")},"支出",2),l("button",{class:Xe(["seg-btn",{active:r.value==="income"}]),onClick:U[2]||(U[2]=Q=>r.value="income")},"收入",2)])]),l("div",M_,[U[14]||(U[14]=l("label",null,"金额(元,必填)",-1)),Me(l("input",{ref_key:"amountInput",ref:T,class:Xe(["input",{invalid:_.value}]),"onUpdate:modelValue":U[3]||(U[3]=Q=>c.value=Q),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Fe,c.value]])]),l("div",I_,[U[15]||(U[15]=l("label",null,"日期(必填)",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":U[4]||(U[4]=Q=>f.value=Q)},null,512),[[Fe,f.value]])]),l("div",j_,[U[16]||(U[16]=l("label",null,"分类(可直接新增)",-1)),Me(l("select",{class:"select","onUpdate:modelValue":U[5]||(U[5]=Q=>i.value=Q)},[($(!0),P(Ke,null,nt(M.value,Q=>($(),P("option",{key:Q,value:Q},q(Q),9,D_))),128))],512),[[ps,i.value]]),l("div",L_,[Me(l("input",{class:"input add-cat-input","onUpdate:modelValue":U[6]||(U[6]=Q=>oe.value=Q),placeholder:"新增分类名",onKeydown:Ot(Ft(ae,["prevent"]),["enter"])},null,40,K_),[[Fe,oe.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ae},"添加")])]),r.value==="expense"?($(),P("div",R_,[U[17]||(U[17]=l("label",null,"报销状态",-1)),l("div",N_,[l("button",{class:Xe(["seg-btn",{active:!b.value}]),onClick:U[7]||(U[7]=Q=>{b.value=!1,h.value=!1})},"无需报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&!h.value}]),onClick:U[8]||(U[8]=Q=>{b.value=!0,h.value=!1})},"待报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&h.value}]),onClick:U[9]||(U[9]=Q=>{b.value=!0,h.value=!0})},"已报销",2)])])):pe("",!0),l("div",F_,[U[18]||(U[18]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":U[10]||(U[10]=Q=>v.value=Q),placeholder:"选填"},null,512),[[Fe,v.value]])])]),_.value?($(),P("div",V_,q(_.value),1)):pe("",!0)]),l("div",B_,[l("button",{class:"btn btn-sm",onClick:U[11]||(U[11]=Q=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Y},"保存")])],8,$_)])):pe("",!0)]),_:1})]))}}),q_=Kt(U_,[["__scopeId","data-v-1b57c1af"]]),H_={class:"ledger-page"},z_={class:"ledger-toolbar"},W_={class:"month-title num"},G_={class:"cards"},Y_={class:"card stat-card stat-income"},J_={class:"stat-num num amt-income"},X_={class:"card stat-card stat-expense"},Q_={class:"stat-num num"},Z_={class:"card stat-card stat-balance"},e1={class:"card stat-card stat-pending"},t1={class:"stat-num num amt-warn"},n1={key:0,class:"card sec"},s1={class:"bar-label"},o1={class:"bar-track"},r1={class:"muted num bar-num"},a1={key:1,class:"card section"},i1={class:"form-error"},l1={class:"card table-card"},u1={class:"tx-table"},c1={class:"num","data-label":"日期"},d1={"data-label":"分类"},f1={class:"tag"},p1={class:"td-note","data-label":"备注"},v1={"data-label":"报销"},m1={key:0,class:"muted"},h1={key:1,class:"tx-done"},y1={key:2,class:"tx-pending"},g1={class:"ops-cell"},b1={class:"ops"},w1=["onClick"],_1=["onClick"],k1=["onClick"],C1={key:0},x1={class:"muted table-note num"},$1=Dt({__name:"LedgerView",setup(e){const t=A(it()),n=A([]),o=A(!0),r=A("");it();const i=A(""),c=A(""),f=A(!1),v=A(null),b=A({type:"expense",category:"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0}),h=A(null),_=rt(()=>t.value.slice(0,7)+"-01"),T=rt(()=>{const de=Number(t.value.slice(0,4)),xe=Number(t.value.slice(5,7))-1,Ee=new Date(de,xe+1,0).getDate();return t.value.slice(0,7)+"-"+(Ee<10?"0"+Ee:String(Ee))}),x=rt(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function M(){o.value=!0;try{n.value=await Nh(_.value,T.value),c.value=""}catch(de){c.value="账目加载失败:"+(de instanceof Error?de.stack||de.message:String(de)),Ue("账目加载失败")}o.value=!1}ln(M),ht(t,M);const G=A([]),oe=A([]);async function ae(){G.value=await Wo("expense"),oe.value=await Wo("income")}ae();const le=rt(()=>n.value.slice().sort((de,xe)=>de.date===xe.date?xe.id-de.id:de.date{let de=0,xe=0,Ee=0;for(const je of n.value)je.type==="income"?de+=je.amount:(xe+=je.amount,je.reimbursable===1&&je.reimbursed!==1&&(Ee+=je.amount));return{income:de,expense:xe,pending:Ee,balance:de-xe}}),E=A("all"),U=A("all"),Q=rt(()=>le.value.filter(de=>!(E.value!=="all"&&de.type!==E.value||U.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||U.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),V=rt(()=>{const de=new Map;let xe=0;for(const je of n.value)je.type==="expense"&&(de.set(je.category,(de.get(je.category)||0)+je.amount),xe+=je.amount);const Ee=xe||1;return Array.from(de.entries()).map(je=>({name:je[0],amount:je[1],percent:Math.round(je[1]/Ee*100)})).sort((je,Ce)=>Ce.amount-je.amount)});function te(de){return(de/100).toFixed(2)}function I(de){return(de.type==="income"?"+":"-")+te(de.amount)}function S(){t.value=ta(t.value,-1)}function O(){t.value=ta(t.value,1)}function Z(){t.value=it()}ht(r,()=>{i.value&&(i.value="")});async function Oe(de){await Uh(de.id),await M(),Ue("已标记为已报销")}function Te(de){v.value=de.id,b.value={type:de.type,category:de.category,amountYuan:te(de.amount),date:de.date,note:de.note||"",reimbursable:de.reimbursable,reimbursed:de.reimbursed},f.value=!0}function ye(){v.value=null,b.value={type:"expense",category:G.value[0]||"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function Pe(de){if(v.value){await Vh(v.value,de),f.value=!1,await M(),Ue("账目已更新");return}await Fh({type:de.type,category:de.category,amount:de.amount,date:de.date,note:de.note,reimbursable:de.reimbursable,reimbursed:de.reimbursed}),f.value=!1,await M(),Ue("已记一笔")}async function ze(){h.value&&h.value.id&&await Bh(h.value.id),h.value=null,await M(),Ue("账目已删除")}return(de,xe)=>($(),P("div",H_,[l("div",z_,[l("button",{class:"icon-btn",onClick:S},[we(We,{name:"chevron-left",size:16})]),l("span",W_,q(x.value),1),l("button",{class:"icon-btn",onClick:O},[we(We,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:Z},"回到本月"),xe[7]||(xe[7]=l("span",{class:"flex1"},null,-1)),Me(l("select",{class:"select w-filter","onUpdate:modelValue":xe[0]||(xe[0]=Ee=>E.value=Ee)},[...xe[4]||(xe[4]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[ps,E.value]]),Me(l("select",{class:"select w-filter","onUpdate:modelValue":xe[1]||(xe[1]=Ee=>U.value=Ee)},[...xe[5]||(xe[5]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[ps,U.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ye},[we(We,{name:"plus",size:14}),xe[6]||(xe[6]=gt(" 记一笔",-1))])]),l("div",G_,[l("div",Y_,[xe[8]||(xe[8]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",J_,q(te(Y.value.income)),1)]),l("div",X_,[xe[9]||(xe[9]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",Q_,q(te(Y.value.expense)),1)]),l("div",Z_,[xe[10]||(xe[10]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Xe(["stat-num num",{"amt-income":Y.value.balance>=0,"amt-expense":Y.value.balance<0}])},q(te(Y.value.balance)),3)]),l("div",e1,[xe[11]||(xe[11]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",t1,q(te(Y.value.pending)),1)])]),V.value.length?($(),P("div",n1,[xe[12]||(xe[12]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),P(Ke,null,nt(V.value,Ee=>($(),P("div",{key:Ee.name,class:"bar-row"},[l("span",s1,q(Ee.name),1),l("span",o1,[l("span",{class:"bar-fill",style:zn({width:Ee.percent+"%"})},null,4)]),l("span",r1,q(te(Ee.amount))+" 元 · "+q(Ee.percent)+"%",1)]))),128))])):pe("",!0),c.value?($(),P("div",a1,[l("div",i1,q(c.value),1),xe[13]||(xe[13]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):pe("",!0),l("div",l1,[l("table",u1,[xe[15]||(xe[15]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(Ke,null,nt(Q.value,Ee=>($(),P("tr",{key:Ee.id},[l("td",c1,q(Ee.date),1),l("td",d1,[l("span",f1,q(Ee.category),1)]),l("td",{class:Xe(["num",Ee.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},q(I(Ee)),3),l("td",p1,q(Ee.note||"--"),1),l("td",v1,[Ee.type!=="expense"||Ee.reimbursable!==1?($(),P("span",m1,"--")):Ee.reimbursed===1?($(),P("span",h1,"已报销")):($(),P("span",y1,"待报销"))]),l("td",g1,[l("div",b1,[Ee.type==="expense"&&Ee.reimbursable===1&&Ee.reimbursed!==1?($(),P("button",{key:0,class:"btn btn-xs",onClick:je=>Oe(Ee)},"标记已报销",8,w1)):pe("",!0),l("button",{class:"btn btn-xs",onClick:je=>Te(Ee)},"编辑",8,_1),l("button",{class:"btn btn-xs",onClick:je=>h.value=Ee},"删除",8,k1)])])]))),128)),!Q.value.length&&!o.value?($(),P("tr",C1,[...xe[14]||(xe[14]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):pe("",!0)])])]),l("div",x1,"本月 "+q(n.value.length)+" 条 · 当前筛选 "+q(Q.value.length)+" 条",1),we(q_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:xe[2]||(xe[2]=Ee=>f.value=!1),onSave:Pe},null,8,["open","title","initial"]),we(wn,{open:!!h.value,title:"删除确认",message:h.value?"将删除 "+h.value.date+" 的账目("+h.value.category+" "+te(h.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:xe[3]||(xe[3]=Ee=>h.value=null),onConfirm:ze},null,8,["open","message"])]))}}),S1=Kt($1,[["__scopeId","data-v-c38f4109"]]),E1={class:"memo-page"},T1={class:"card memo-list"},A1={class:"pane-head"},P1={class:"pane-title"},O1={class:"memo-scroll"},M1=["onClick"],I1={class:"memo-item-title"},j1={class:"muted memo-item-sub"},D1={class:"muted num memo-item-time"},L1={key:0,class:"muted empty"},K1={class:"card memo-editor"},R1={class:"editor-foot"},N1={class:"muted foot-info"},F1=["disabled"],V1=["disabled"],B1={key:1,class:"empty muted editor-empty"},U1=Dt({__name:"MemoView",setup(e){const t=A([]),n=A(null),o=A(!1),r=A(""),i=A(""),c=A(null),f=A(null);async function v(){if(t.value=await Ih(),n.value&&n.value.id){const Q=t.value.find(V=>V.id===n.value.id);Q&&(n.value=Q)}}ln(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Cn(()=>window.removeEventListener("keydown",b)),ht(Fi,async Q=>{if(!Q)return;t.value.length||await v();const V=t.value.find(te=>te.id===Q);Fi.value=null,V&&T(V)},{immediate:!0});function b(Q){(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="s"&&o.value&&h.value&&(Q.preventDefault(),oe())}const h=rt(()=>{if(!o.value)return!1;const Q=n.value?n.value.title:"",V=n.value?n.value.content:"";return r.value!==Q||i.value!==V});function _(Q){n.value=Q,o.value=!0,r.value=Q.title,i.value=Q.content}function T(Q){if(!(o.value&&n.value&&n.value.id===Q.id)){if(h.value){f.value={type:"select",memo:Q};return}_(Q)}}function x(){if(h.value){f.value={type:"new"};return}M()}function M(){n.value=null,o.value=!0,r.value="",i.value=""}function G(){n.value?_(n.value):M()}async function oe(){if(!r.value.trim()&&!i.value.trim()){Ue("标题与内容不能都为空");return}if(n.value&&n.value.id)await Dh(n.value.id,r.value,i.value),Ue("备忘已保存");else{const Q=await jh(r.value,i.value);n.value=Q,r.value=Q.title,i.value=Q.content,Ue("备忘已创建")}await v()}function ae(){n.value&&n.value.id&&(c.value=n.value)}async function le(){c.value&&c.value.id&&(await Lh(c.value.id),Ue("备忘已删除")),c.value=null,await v(),M()}function Y(){const Q=f.value;f.value=null,Q&&(Q.type==="select"?_(Q.memo):M())}function E(Q){return(Q.content||"").replace(/\s+/g," ").slice(0,30)}function U(Q){return Q.replace("T"," ").slice(0,16)}return(Q,V)=>($(),P("div",E1,[l("aside",T1,[l("div",A1,[l("span",P1,"备忘录("+q(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:x},"新建")]),l("div",O1,[($(!0),P(Ke,null,nt(t.value,te=>($(),P("div",{key:te.id,class:Xe(["memo-item",{active:o.value&&n.value&&n.value.id===te.id}]),onClick:I=>T(te)},[l("div",I1,q(te.title||"无标题"),1),l("div",j1,q(E(te)||"空"),1),l("div",D1,q(U(te.updated_at)),1)],10,M1))),128)),t.value.length?pe("",!0):($(),P("div",L1,"暂无备忘"))])]),l("section",K1,[o.value?($(),P(Ke,{key:0},[Me(l("input",{class:"input title-input","onUpdate:modelValue":V[0]||(V[0]=te=>r.value=te),placeholder:"标题"},null,512),[[Fe,r.value]]),Me(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":V[1]||(V[1]=te=>i.value=te),placeholder:"内容"},null,512),[[Fe,i.value]]),l("div",R1,[l("span",N1,[h.value?($(),P(Ke,{key:0},[gt("有未保存修改")],64)):n.value&&n.value.id?($(),P(Ke,{key:1},[gt("更新于 "+q(U(n.value.updated_at)),1)],64)):($(),P(Ke,{key:2},[gt("新备忘")],64))]),V[4]||(V[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),P("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):pe("",!0),l("button",{class:"btn btn-sm",disabled:!h.value,onClick:G},"放弃修改",8,F1),l("button",{class:"btn btn-primary btn-sm",disabled:!h.value,onClick:oe},"保存",8,V1)])],64)):($(),P("div",B1,"选择左侧备忘,或点击右上角新建"))]),we(wn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:V[2]||(V[2]=te=>c.value=null),onConfirm:le},null,8,["open","message"]),we(wn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:V[3]||(V[3]=te=>f.value=null),onConfirm:Y},null,8,["open"])]))}}),q1=Kt(U1,[["__scopeId","data-v-a0931fc7"]]),H1=["aria-label"],z1={class:"dialog-head"},W1={class:"dialog-title"},G1={class:"dialog-body"},Y1={class:"form-grid"},J1={class:"field span2"},X1={class:"field span2"},Q1={class:"field span2"},Z1={class:"pwd-row"},e0={class:"field span2"},t0={key:0,class:"form-error"},n0={class:"dialog-btns"},s0=Dt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=A(""),i=A(""),c=A(""),f=A(""),v=A(""),b=A(null);function h(x){n.open&&x.key==="Escape"&&o("cancel")}ht(()=>n.open,async x=>{var M;x?(r.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",h),await Rs(),(M=b.value)==null||M.focus()):window.removeEventListener("keydown",h)}),Cn(()=>window.removeEventListener("keydown",h));function _(){const x="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",G=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let ae=0;ae($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Ft(G=>o("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",z1,[l("span",W1,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=G=>o("cancel"))},[we(We,{name:"close",size:16})])]),l("div",G1,[l("div",Y1,[l("div",J1,[M[7]||(M[7]=l("label",null,"系统名称(必填)",-1)),Me(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":M[1]||(M[1]=G=>r.value=G),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Fe,r.value]])]),l("div",X1,[M[8]||(M[8]=l("label",null,"账号(必填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=G=>i.value=G),placeholder:"用户名、工号或邮箱"},null,512),[[Fe,i.value]])]),l("div",Q1,[M[9]||(M[9]=l("label",null,"密码(必填)",-1)),l("div",Z1,[Me(l("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=G=>c.value=G),placeholder:"输入或点击生成"},null,512),[[Fe,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",e0,[M[10]||(M[10]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=G=>f.value=G),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Fe,f.value]])])]),v.value?($(),P("div",t0,q(v.value),1)):pe("",!0)]),l("div",n0,[l("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=G=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:T},"保存")])],8,H1)])):pe("",!0)]),_:1})]))}}),o0=Kt(s0,[["__scopeId","data-v-2eafe20e"]]),r0={class:"vault-page"},a0={key:0,class:"empty muted"},i0={key:1,class:"card lock-card"},l0={class:"lock-badge"},u0={key:0,class:"form-error"},c0=["disabled"],d0={key:0,class:"form-error"},f0=["disabled"],p0={class:"vault-toolbar"},v0={class:"search-wrap"},m0={class:"card table-card"},h0={class:"cred-table"},y0={class:"td-system"},g0=["onClick"],b0={class:"pwd-cell"},w0={class:"num pwd-text"},_0=["onClick"],k0=["onClick"],C0={class:"td-remark"},x0={class:"td-ops"},$0={class:"ops"},S0=["onClick"],E0=["onClick"],T0={key:0},A0={class:"muted table-note num"},P0={class:"dialog pwd-dialog"},O0={class:"dialog-head"},M0={class:"dialog-body"},I0={class:"vp-field"},j0={class:"vp-field"},D0={class:"vp-field"},L0={key:0,class:"form-error"},K0={class:"dialog-btns"},R0=5*60*1e3,N0=Dt({__name:"VaultView",setup(e){const t=A(null),n=A(pm()),o=A(!1),r=A(""),i=A(""),c=A(""),f=A(""),v=A(""),b=A([]),h=A(""),_=A({}),T=A(!1),x=A(null),M=A({system:"",account:"",password:"",remark:""}),G=A(null),oe=A(!1),ae=A(""),le=A(""),Y=A(""),E=A("");async function U(){b.value=await gm(),_.value={}}let Q=null;function V(){Q!==null&&window.clearTimeout(Q),Q=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Ue("长时间未操作,密码库已自动锁定"))},R0)}function te(){n.value&&V()}ln(async()=>{t.value=await dd(),window.addEventListener("click",te),window.addEventListener("keydown",te),n.value&&V()}),Cn(()=>{window.removeEventListener("click",te),window.removeEventListener("keydown",te),Q!==null&&window.clearTimeout(Q)});const I=rt(()=>{const Ce=h.value.trim().toLowerCase();return Ce?b.value.filter(fe=>(fe.system+" "+fe.account+" "+(fe.remark||"")).toLowerCase().includes(Ce)):b.value});async function S(){if(!o.value){if(c.value="",!r.value){c.value="请输入主密码";return}if(r.value.length<6){c.value="主密码至少 6 位";return}if(r.value!==i.value){c.value="两次输入的主密码不一致";return}o.value=!0;try{await vm(r.value),r.value="",i.value="",n.value=!0,V(),await U(),Ue("主密码已设置,密码库已解锁")}catch(Ce){c.value=Ce instanceof Error?Ce.message:"设置失败"}o.value=!1}}async function O(){if(!o.value){if(v.value="",!f.value){v.value="请输入主密码";return}o.value=!0;try{await mm(f.value),f.value="",n.value=!0,V(),await U()}catch(Ce){v.value=Ce instanceof Error?Ce.message:"解锁失败"}o.value=!1}}function Z(){oa(),n.value=!1,b.value=[],_.value={},Q!==null&&window.clearTimeout(Q),Ue("密码库已锁定")}async function Oe(Ce){const fe=Ce.id;if(_.value[fe]){_.value[fe]=!1;return}try{Ce.passwordPlain=await yi(fe),_.value[fe]=!0}catch(De){Ue(De instanceof Error?De.message:"解密失败")}}async function Te(Ce){try{const fe=await yi(Ce.id);await Wi(fe),Ue("密码已复制")}catch(fe){Ue(fe instanceof Error?fe.message:"复制失败")}}async function ye(Ce){await Wi(Ce.account),Ue("账号已复制")}function Pe(){x.value=null,M.value={system:"",account:"",password:"",remark:""},T.value=!0}async function ze(Ce){try{const fe=await yi(Ce.id);x.value=Ce.id,M.value={system:Ce.system,account:Ce.account,password:fe,remark:Ce.remark||""},T.value=!0}catch(fe){Ue(fe instanceof Error?fe.message:"解密失败")}}async function de(Ce){const fe=x.value??void 0;await bm(Ce,fe),T.value=!1,await U(),Ue(fe?"账号已更新":"账号已添加")}async function xe(){G.value&&G.value.id&&(await wm(G.value.id),Ue("账号已删除")),G.value=null,await U()}function Ee(){ae.value="",le.value="",Y.value="",E.value="",oe.value=!0}async function je(){E.value="";try{const Ce=await _m(ae.value,le.value);oe.value=!1,ae.value="",le.value="",Y.value="",Ue("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){E.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,fe)=>($(),P("div",r0,[t.value===null?($(),P("div",a0,"加载中")):n.value?($(),P(Ke,{key:2},[l("div",p0,[l("div",v0,[we(We,{name:"search",size:14,class:"search-icon"}),Me(l("input",{class:"input","onUpdate:modelValue":fe[3]||(fe[3]=De=>h.value=De),placeholder:"搜索系统名称、账号或备注"},null,512),[[Fe,h.value]])]),fe[16]||(fe[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:Ee},"修改主密码"),l("button",{class:"btn btn-sm",onClick:Z},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"新增账号")]),l("div",m0,[l("table",h0,[fe[18]||(fe[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(Ke,null,nt(I.value,De=>($(),P("tr",{key:De.id},[l("td",y0,q(De.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ft=>ye(De)},q(De.account),9,g0)]),l("td",null,[l("div",b0,[l("span",w0,q(_.value[De.id]?De.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ft=>Oe(De)},q(_.value[De.id]?"隐藏":"显示"),9,_0),l("button",{class:"btn btn-xs",onClick:ft=>Te(De)},"复制",8,k0)])]),l("td",C0,q(De.remark||"--"),1),l("td",x0,[l("div",$0,[l("button",{class:"btn btn-xs",onClick:ft=>ze(De)},"编辑",8,S0),l("button",{class:"btn btn-xs",onClick:ft=>G.value=De},"删除",8,E0)])])]))),128)),I.value.length?pe("",!0):($(),P("tr",T0,[...fe[17]||(fe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",A0,"共 "+q(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),P("div",i0,[l("div",l0,[we(We,{name:"lock",size:26})]),t.value===!1?($(),P(Ke,{key:0},[fe[12]||(fe[12]=l("div",{class:"lock-title"},"设置主密码",-1)),fe[13]||(fe[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[0]||(fe[0]=De=>r.value=De),placeholder:"设置主密码(至少 6 位)",onKeydown:Ot(S,["enter"])},null,544),[[Fe,r.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[1]||(fe[1]=De=>i.value=De),placeholder:"再次输入主密码",onKeydown:Ot(S,["enter"])},null,544),[[Fe,i.value]]),c.value?($(),P("div",u0,q(c.value),1)):pe("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:S},"完成设置并解锁",8,c0)],64)):($(),P(Ke,{key:1},[fe[14]||(fe[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),fe[15]||(fe[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[2]||(fe[2]=De=>f.value=De),placeholder:"主密码",onKeydown:Ot(O,["enter"])},null,544),[[Fe,f.value]]),v.value?($(),P("div",d0,q(v.value),1)):pe("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:O},"解锁",8,f0)],64))])),we(o0,{open:T.value,title:x.value?"编辑账号":"新增账号",initial:M.value,onCancel:fe[4]||(fe[4]=De=>T.value=!1),onSave:de},null,8,["open","title","initial"]),we(wn,{open:!!G.value,title:"删除确认",message:G.value?"将删除系统「"+G.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[5]||(fe[5]=De=>G.value=null),onConfirm:xe},null,8,["open","message"]),($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[oe.value?($(),P("div",{key:0,class:"mask",onClick:fe[11]||(fe[11]=Ft(De=>oe.value=!1,["self"]))},[l("div",P0,[l("div",O0,[fe[19]||(fe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:fe[6]||(fe[6]=De=>oe.value=!1)},[we(We,{name:"close",size:16})])]),l("div",M0,[l("div",I0,[fe[20]||(fe[20]=l("label",null,"旧主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[7]||(fe[7]=De=>ae.value=De)},null,512),[[Fe,ae.value]])]),l("div",j0,[fe[21]||(fe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[8]||(fe[8]=De=>le.value=De)},null,512),[[Fe,le.value]])]),l("div",D0,[fe[22]||(fe[22]=l("label",null,"确认新主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[9]||(fe[9]=De=>Y.value=De)},null,512),[[Fe,Y.value]])]),E.value?($(),P("div",L0,q(E.value),1)):pe("",!0),fe[23]||(fe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",K0,[l("button",{class:"btn btn-sm",onClick:fe[10]||(fe[10]=De=>oe.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:je},"确认修改")])])])):pe("",!0)]),_:1})]))]))}}),F0=Kt(N0,[["__scopeId","data-v-6d2745bc"]]),V0=["aria-label"],B0={class:"dialog-head"},U0={class:"dialog-title"},q0={class:"dialog-body"},H0={class:"field"},z0={key:0},W0=["placeholder"],G0={key:1,class:"form-error"},Y0={class:"dialog-btns"},J0=Dt({__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=A(""),i=A(""),c=A(null);function f(b){n.open&&b.key==="Escape"&&o("cancel")}ht(()=>n.open,async b=>{var h,_;b?(r.value=n.initial,i.value="",window.addEventListener("keydown",f),await Rs(),(h=c.value)==null||h.focus(),(_=c.value)==null||_.select()):window.removeEventListener("keydown",f)}),Cn(()=>window.removeEventListener("keydown",f));function v(){const b=r.value.trim();if(!b){i.value="请输入内容";return}const h=n.validate?n.validate(b):null;if(h){i.value=h;return}o("confirm",b)}return(b,h)=>($(),kt(Kn,{to:"body"},[we(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:h[3]||(h[3]=Ft(_=>o("cancel"),["self"]))},[l("div",{class:"dialog input-dialog",role:"dialog","aria-label":e.title},[l("div",B0,[l("span",U0,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:h[0]||(h[0]=_=>o("cancel"))},[we(We,{name:"close",size:16})])]),l("div",q0,[l("div",H0,[e.label?($(),P("label",z0,q(e.label),1)):pe("",!0),Me(l("input",{ref_key:"input",ref:c,class:Xe(["input",{invalid:i.value}]),"onUpdate:modelValue":h[1]||(h[1]=_=>r.value=_),placeholder:e.placeholder,maxlength:"20",onKeydown:Ot(v,["enter"])},null,42,W0),[[Fe,r.value]]),i.value?($(),P("div",G0,q(i.value),1)):pe("",!0)])]),l("div",Y0,[l("button",{class:"btn btn-sm",onClick:h[2]||(h[2]=_=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:v},q(e.confirmText),1)])],8,V0)])):pe("",!0)]),_:1})]))}}),X0=Kt(J0,[["__scopeId","data-v-4b14ba4f"]]);function Q0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Uu(e,t){const o="\uFEFF"+t.map(f=>f.map(Q0).join(",")).join(`\r -`);if(lo.isNativePlatform()){const{downloadText:f}=await Md(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Hg);return{downloadText:v}},void 0,import.meta.url);return f(e,o)}const r=new Blob([o],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(r),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const Z0={class:"settings"},ek={class:"card section"},tk={class:"muted acc-line"},nk={class:"ai-grid"},sk={class:"rule-item"},ok={class:"rule-item"},rk={class:"rule-item"},ak={key:0,class:"form-error"},ik={class:"rule-save"},lk={class:"card section"},uk={class:"rule-grid"},ck={class:"rule-item"},dk={class:"rule-item"},fk={class:"rule-item"},pk={class:"rule-item"},vk={class:"rule-item"},mk={class:"card section"},hk={class:"proj-add"},yk={key:0,class:"muted proj-tip"},gk=["onKeydown"],bk=["onClick"],wk=["onClick"],_k=["onClick"],kk={key:1,class:"muted"},Ck={class:"card section"},xk={class:"card section"},$k={class:"muted acc-line"},Sk={class:"rule-save"},Ek=["disabled"],Tk={key:0,class:"muted acc-line"},Ak={key:1,class:"form-error"},Pk={key:2,class:"form-error"},Ok={class:"card section"},Mk={class:"ai-grid"},Ik={class:"rule-item"},jk={class:"rule-item"},Dk={class:"rule-item"},Lk={class:"card section"},Kk={class:"cat-block"},Rk={class:"cat-head"},Nk={class:"cat-chips"},Fk=["onClick"],Vk=["onClick"],Bk={class:"cat-block"},Uk={class:"cat-head"},qk={class:"cat-chips"},Hk=["onClick"],zk=["onClick"],Wk={class:"cat-block"},Gk={class:"cat-head"},Yk={class:"cat-chips"},Jk=["onClick"],Xk=["onClick"],Qk={class:"card section"},Zk={class:"backup-row"},eC={key:0,class:"import-error"},tC=Dt({__name:"SettingsView",setup(e){var qe;const t=A({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=A([]),o=A(""),r=A(""),i=A(""),c=A(""),f=A(""),v=A(""),b=A(null),h=A(""),_=A([]),T=A([]),x=A([]);async function M(){_.value=await Zo(),T.value=await Wo("expense"),x.value=await Wo("income")}const G=A({open:!1,kind:"log",index:-1,initial:""}),oe=A(null);function ae(ie){return ie==="log"?_.value:ie==="expense"?T.value:x.value}async function le(ie,z){ie==="log"?(_.value=z,await Yh(z)):ie==="expense"?(T.value=z,await zi("expense",z)):(x.value=z,await zi("income",z))}function Y(ie){G.value={open:!0,kind:ie,index:-1,initial:""}}function E(ie,z,ue){G.value={open:!0,kind:ie,index:z,initial:ue}}function U(ie){const{kind:z,index:ue}=G.value,Le=ae(z);return Le.includes(ie)&&!(ue>=0&&Le[ue]===ie)?"该分类已存在":null}async function Q(ie){const{kind:z,index:ue}=G.value;ue>=0?(await le(z,ae(z).map((Le,st)=>st===ue?ie:Le)),Ue("分类已更新(历史记录自动跟随显示)")):(await le(z,[...ae(z),ie]),Ue("分类已添加")),G.value.open=!1}function V(ie,z){const ue=ae(ie);if(ue.length<=1){Ue("至少保留一个分类");return}oe.value={kind:ie,index:z,name:ue[z]}}async function te(){if(!oe.value)return;const{kind:ie,index:z}=oe.value;await le(ie,ae(ie).filter((ue,Le)=>Le!==z)),Ue("分类已删除"),oe.value=null}const I=A(null),S=A(null),O=A(""),Z=A(((qe=zo())==null?void 0:qe.username)||""),Oe=A(""),Te=A(""),ye=A(""),Pe=A(""),ze=A(!1),de="0.6.9",xe=A(""),Ee=A(""),je=A(""),Ce=A(""),fe=A(!1),De=A("");async function ft(){var ie;xe.value=((ie=pn())==null?void 0:ie.username)||"",De.value=await Um(),Ce.value=eo.value}ht(eo,ie=>{Ce.value=ie});async function Ct(){je.value="";try{await bd(),Ue("云端绑定已重建")}catch(ie){je.value=ie instanceof Error?ie.message:"绑定失败"}}async function xt(){if(!fe.value){je.value="",Ce.value=eo.value,fe.value=!0;try{const ie=await Vi();De.value=ie.at,Ee.value="推送 "+ie.pushed+" 条 · 拉取 "+ie.pulled+" 条 · 删除 "+ie.removed+" 条",Ce.value="",Ue("同步完成")}catch(ie){je.value=ie instanceof Error?ie.message:"同步失败"}fe.value=!1}}async function qt(){if(Pe.value="",Te.value!==ye.value){Pe.value="两次输入的新密码不一致";return}try{await Lm(Oe.value,Te.value),Oe.value="",Te.value="",ye.value="",Ue("登录密码已修改")}catch(ie){Pe.value=ie instanceof Error?ie.message:"修改失败"}}async function bt(){await Km(),window.location.reload()}async function Re(){t.value=await vs(),n.value=await ao(!0),i.value=(await hl()).join(` -`),c.value=await St("ai_base_url",""),f.value=await St("ai_api_key",""),v.value=await St("ai_model",""),await ft(),await M()}async function g(){await Lt("ai_base_url",c.value.trim()),await Lt("ai_api_key",f.value.trim()),await Lt("ai_model",v.value.trim()),Ue("AI 配置已保存")}async function m(){const ie=it(),z=await Promise.all([Qo("2000-01-01",ie),ao(!0)]),ue=z[0],Le=z[1],st=new Map(Le.map(Qe=>[Qe.id,Qe.name])),mt=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Qe of ue)mt.push([Qe.date,qo(Qe.category),Qe.project_id&&st.get(Qe.project_id)||"",Qe.content,Qe.minutes==null?"":Qe.minutes,Qe.is_milestone?"是":"",Qe.needs_followup?"是":"",Qe.takeaway||"",Qe.remark||""]);const It=await Uu("工作记录_"+ie.replace(/-/g,"")+".csv",mt);Ue(It?"CSV 已导出到:"+It:"CSV 已导出到系统下载目录")}async function C(){const ie=it(),z=await Promise.all([vs(),Xo("2000-01-01",ie)]),ue=z[0],Le=z[1],st=["周日","周一","周二","周三","周四","周五","周六"],mt=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Qe of Le){const Xt=co(Qe,Qe.date,ue,Qe.date===ie);mt.push([Qe.date,st[Ns(Qe.date).getDay()],Xt.label,Qe.clock_in_at?_n(Qe.clock_in_at):"",Qe.clock_out_at?_n(Qe.clock_out_at):"",Qe.location||"",Qe.kind==="makeup"?"补卡":Qe.kind==="leave"?"休假":"正常",Qe.note||""])}const It=await Uu("考勤记录_"+ie.replace(/-/g,"")+".csv",mt);Ue(It?"CSV 已导出到:"+It:"CSV 已导出到系统下载目录")}ln(Re);async function j(){await Lt("work_start",t.value.work_start),await Lt("work_end",t.value.work_end),await Lt("grace_minutes",String(t.value.grace_minutes)),await Lt("lunch_minutes",String(t.value.lunch_minutes)),await Lt("remind_weekly",t.value.remind_weekly),Ue("打卡规则已保存")}async function se(){await $d(i.value.split(` -`)),Ue("常用地点已保存")}async function W(){const ie=o.value.trim();if(ie){try{await oh(ie),r.value="",o.value=""}catch{r.value="项目名已存在"}await Re()}}function ge(ie){b.value=ie.id,h.value=ie.name}async function be(ie){const z=h.value.trim();if(z)try{await rh(ie.id,z),r.value=""}catch{r.value="项目名已存在"}b.value=null,await Re()}async function ke(ie){await ah(ie.id,ie.archived!==1),await Re()}async function ce(){try{const ie=await qh(),z=await Sa("实习日志备份_"+it().replace(/-/g,"")+".json",ie);Ue(z?"备份已导出到:"+z:"备份已导出到系统下载目录")}catch(ie){Ue("导出失败:"+(ie instanceof Error?ie.message:String(ie)))}}function Ne(ie){const z=ie.target,ue=z.files&&z.files[0];if(O.value="",!ue)return;const Le=ue.name;ue.text().then(st=>{S.value={name:Le,text:st}}),z.value=""}async function Ae(){if(S.value)try{await Hh(S.value.text),S.value=null,O.value="",await Re(),Ue("数据导入完成")}catch(ie){S.value=null,O.value=ie instanceof Error?ie.message:"导入失败"}}return(ie,z)=>($(),P("div",Z0,[l("div",ek,[z[27]||(z[27]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",tk,"v"+q(sn(de))+" · 当前账号 "+q(Z.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",nk,[l("div",sk,[z[24]||(z[24]=l("label",null,"旧登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":z[0]||(z[0]=ue=>Oe.value=ue)},null,512),[[Fe,Oe.value]])]),l("div",ok,[z[25]||(z[25]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":z[1]||(z[1]=ue=>Te.value=ue)},null,512),[[Fe,Te.value]])]),l("div",rk,[z[26]||(z[26]=l("label",null,"确认新登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":z[2]||(z[2]=ue=>ye.value=ue)},null,512),[[Fe,ye.value]])])]),Pe.value?($(),P("div",ak,q(Pe.value),1)):pe("",!0),l("div",ik,[l("button",{class:"btn btn-primary btn-sm",onClick:qt},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:z[3]||(z[3]=ue=>ze.value=!0)},"删除此用户及全部数据")])]),l("div",lk,[z[34]||(z[34]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",uk,[l("div",ck,[z[28]||(z[28]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":z[4]||(z[4]=ue=>t.value.work_start=ue)},null,512),[[Fe,t.value.work_start]])]),l("div",dk,[z[29]||(z[29]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":z[5]||(z[5]=ue=>t.value.work_end=ue)},null,512),[[Fe,t.value.work_end]])]),l("div",fk,[z[30]||(z[30]=l("label",null,"迟到宽限(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":z[6]||(z[6]=ue=>t.value.grace_minutes=ue)},null,512),[[Fe,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",pk,[z[31]||(z[31]=l("label",null,"午休扣除(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":z[7]||(z[7]=ue=>t.value.lunch_minutes=ue)},null,512),[[Fe,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",vk,[z[33]||(z[33]=l("label",null,"周记提醒",-1)),Me(l("select",{class:"select","onUpdate:modelValue":z[8]||(z[8]=ue=>t.value.remind_weekly=ue)},[...z[32]||(z[32]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[ps,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:j},"保存规则")])]),l("div",mk,[z[35]||(z[35]=l("div",{class:"section-title"},"项目管理",-1)),l("div",hk,[Me(l("input",{class:"input","onUpdate:modelValue":z[9]||(z[9]=ue=>o.value=ue),placeholder:"新项目名称",onKeydown:Ot(W,["enter"])},null,544),[[Fe,o.value]]),l("button",{class:"btn btn-sm",onClick:W},"添加")]),r.value?($(),P("div",yk,q(r.value),1)):pe("",!0),($(!0),P(Ke,null,nt(n.value,ue=>($(),P("div",{key:ue.id,class:"proj-row"},[b.value===ue.id?($(),P(Ke,{key:0},[Me(l("input",{class:"input","onUpdate:modelValue":z[10]||(z[10]=Le=>h.value=Le),onKeydown:Ot(Le=>be(ue),["enter"])},null,40,gk),[[Fe,h.value]]),l("button",{class:"btn btn-sm",onClick:Le=>be(ue)},"保存",8,bk),l("button",{class:"btn btn-sm",onClick:z[11]||(z[11]=Le=>b.value=null)},"取消")],64)):($(),P(Ke,{key:1},[l("span",{class:Xe(["proj-name",{archived:ue.archived===1}])},q(ue.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:Le=>ge(ue)},[we(We,{name:"edit",size:14})],8,wk),l("button",{class:"btn btn-sm",onClick:Le=>ke(ue)},q(ue.archived===1?"恢复":"归档"),9,_k)],64))]))),128)),n.value.length?pe("",!0):($(),P("div",kk,"暂无项目,先添加一个"))]),l("div",Ck,[z[37]||(z[37]=l("div",{class:"section-title"},"常用地点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":z[12]||(z[12]=ue=>i.value=ue),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Fe,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:se},"保存地点"),z[36]||(z[36]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",xk,[z[38]||(z[38]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",$k,"云端账号:"+q(xe.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",Sk,[l("button",{class:"btn btn-primary btn-sm",disabled:fe.value,onClick:xt},q(fe.value?"同步中":"立即同步"),9,Ek),l("button",{class:"btn btn-sm",onClick:Ct},"重新校验连接")]),Ee.value?($(),P("div",Tk,"上次同步:"+q(De.value||"--")+" · "+q(Ee.value),1)):pe("",!0),je.value?($(),P("div",Ak,q(je.value),1)):pe("",!0),Ce.value?($(),P("div",Pk,"最近自动同步失败:"+q(Ce.value)+"(可点「立即同步」重试)",1)):pe("",!0)]),l("div",Ok,[z[43]||(z[43]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",Mk,[l("div",Ik,[z[39]||(z[39]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":z[13]||(z[13]=ue=>c.value=ue),placeholder:"https://api.example.com/v1"},null,512),[[Fe,c.value]])]),l("div",jk,[z[40]||(z[40]=l("label",null,"API Key",-1)),Me(l("input",{class:"input","onUpdate:modelValue":z[14]||(z[14]=ue=>f.value=ue),placeholder:"sk-..."},null,512),[[Fe,f.value]])]),l("div",Dk,[z[41]||(z[41]=l("label",null,"模型名称",-1)),Me(l("input",{class:"input","onUpdate:modelValue":z[15]||(z[15]=ue=>v.value=ue),placeholder:"如:deepseek-chat"},null,512),[[Fe,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:g},"保存 AI 配置"),z[42]||(z[42]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",Lk,[z[47]||(z[47]=l("div",{class:"section-title"},"工作分类",-1)),l("div",Kk,[l("div",Rk,[z[44]||(z[44]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:z[16]||(z[16]=ue=>Y("log"))},"添加")]),l("div",Nk,[($(!0),P(Ke,null,nt(_.value,(ue,Le)=>($(),P("span",{key:ue+Le,class:"cat-chip"},[gt(q(ue)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("log",Le,ue)},"改",8,Fk),l("button",{class:"chip-btn",title:"删除",onClick:st=>V("log",Le)},"删",8,Vk)]))),128))])]),l("div",Bk,[l("div",Uk,[z[45]||(z[45]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:z[17]||(z[17]=ue=>Y("expense"))},"添加")]),l("div",qk,[($(!0),P(Ke,null,nt(T.value,(ue,Le)=>($(),P("span",{key:ue+Le,class:"cat-chip"},[gt(q(ue)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("expense",Le,ue)},"改",8,Hk),l("button",{class:"chip-btn",title:"删除",onClick:st=>V("expense",Le)},"删",8,zk)]))),128))])]),l("div",Wk,[l("div",Gk,[z[46]||(z[46]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:z[18]||(z[18]=ue=>Y("income"))},"添加")]),l("div",Yk,[($(!0),P(Ke,null,nt(x.value,(ue,Le)=>($(),P("span",{key:ue+Le,class:"cat-chip"},[gt(q(ue)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("income",Le,ue)},"改",8,Jk),l("button",{class:"chip-btn",title:"删除",onClick:st=>V("income",Le)},"删",8,Xk)]))),128))])])]),l("div",Qk,[z[48]||(z[48]=l("div",{class:"section-title"},"数据备份",-1)),l("div",Zk,[l("button",{class:"btn btn-sm",onClick:ce},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:z[19]||(z[19]=ue=>{var Le;return(Le=I.value)==null?void 0:Le.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:m},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:C},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:I,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Ne},null,544)]),O.value?($(),P("div",eC,q(O.value),1)):pe("",!0),z[49]||(z[49]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),we(X0,{open:G.value.open,title:G.value.index>=0?"修改分类名称":"添加分类",label:"分类名称",placeholder:"如:制度学习 / 差旅交通",initial:G.value.initial,validate:U,"confirm-text":"保存",onCancel:z[20]||(z[20]=ue=>G.value.open=!1),onConfirm:Q},null,8,["open","title","initial"]),we(wn,{open:!!oe.value,title:"删除分类",message:oe.value?"将删除分类「"+oe.value.name+"」。历史记录不受影响,仍按原分类展示。":"","confirm-text":"删除",danger:"",onCancel:z[21]||(z[21]=ue=>oe.value=null),onConfirm:te},null,8,["open","message"]),we(wn,{open:!!S.value,title:"导入确认",message:S.value?"将从文件「"+S.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:z[22]||(z[22]=ue=>S.value=null),onConfirm:Ae},null,8,["open","message"]),we(wn,{open:ze.value,title:"删除用户确认",message:"将永久删除云端账号「"+Z.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:z[23]||(z[23]=ue=>ze.value=!1),onConfirm:bt},null,8,["open","message"])]))}}),nC=Kt(tC,[["__scopeId","data-v-10f77319"]]),sC={class:"tp-main"},oC={class:"tp-title"},rC={class:"tp-meta"},aC={class:"tp-time num"},iC=Dt({__name:"TimerPanel",setup(e){const t=A(null),n=A(Date.now());let o=null,r=null;async function i(){try{t.value=await wh()}catch{}}const c=rt(()=>{const h=t.value;if(!h||!h.timer_started_at)return 0;const _=(h.actual_minutes||0)*60,T=Math.max(0,Math.floor((n.value-new Date(h.timer_started_at).getTime())/1e3));return _+T}),f=rt(()=>{const h=c.value,_=Math.floor(h/3600),T=Math.floor(h%3600/60),x=h%60,M=G=>String(G).padStart(2,"0");return _>0?_+":"+M(T)+":"+M(x):T+":"+M(x)});async function v(){const h=t.value;h&&(await $a(h.id),Ue("已停止计时:"+h.title),await i())}function b(){location.hash="#/plan"}return ht(yd,()=>{i()}),ln(()=>{i(),o=window.setInterval(()=>{i()},15e3),r=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",i)}),Cn(()=>{o!==null&&window.clearInterval(o),r!==null&&window.clearInterval(r),window.removeEventListener("focus",i)}),(h,_)=>($(),kt(hs,{name:"tp"},{default:Rn(()=>[t.value&&t.value.timer_started_at?($(),P("div",{key:0,class:"tp",onClick:b,title:"点击查看计划页"},[_[0]||(_[0]=l("span",{class:"tp-pulse"},null,-1)),l("span",sC,[l("span",oC,q(t.value.title),1),l("span",rC,q(t.value.kind)+" · 计时中",1)]),l("span",aC,q(f.value),1),l("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Ft(v,["stop"])},"停止")])):pe("",!0)]),_:1}))}}),lC=Kt(iC,[["__scopeId","data-v-a8f9ed22"]]),uC={class:"admin-page"},cC={class:"card table-card"},dC={class:"toolbar"},fC={key:0,class:"form-error tb-error"},pC={class:"admin-table"},vC={class:"td-name","data-label":"用户名"},mC={"data-label":"角色"},hC={key:0,class:"role-badge"},yC={key:1,class:"muted"},gC={class:"muted num","data-label":"创建时间"},bC={class:"muted num","data-label":"数据量"},wC={class:"td-ops"},_C={class:"ops"},kC=["onClick"],CC=["disabled","onClick"],xC={key:0},$C={key:1,class:"muted load-line"},SC={class:"dialog",role:"dialog","aria-label":"新增用户"},EC={class:"dialog-head"},TC={class:"dialog-body"},AC={class:"form-row"},PC={class:"form-row"},OC={class:"form-row"},MC={key:0,class:"form-error"},IC={class:"dialog-btns"},jC=["disabled"],DC={class:"dialog",role:"dialog","aria-label":"重置密码"},LC={class:"dialog-head"},KC={class:"dialog-title"},RC={class:"dialog-body"},NC={class:"form-row"},FC={key:0,class:"form-error"},VC={class:"dialog-btns"},BC=["disabled"],UC=Dt({__name:"UserAdminView",setup(e){const t=A([]),n=A(""),o=A(!0),r=A("");async function i(I,S){const O=await Fs();let Z=xa();if(!Z){const Te=pn(),ye=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Te==null?void 0:Te.username,password:Te==null?void 0:Te.password})});if(ye.ok){const Pe=await ye.json();Z=String(Pe.token||""),Ho(Z)}}const Oe=await fetch(O+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:S?JSON.stringify(S):void 0});if(Oe.status===401&&pn()){const Te=pn(),ye=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Te==null?void 0:Te.username,password:Te==null?void 0:Te.password})});if(ye.ok){const Pe=await ye.json();Z=String(Pe.token||""),Ho(Z);const ze=await fetch(O+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:S?JSON.stringify(S):void 0});return{ok:ze.ok,status:ze.status,data:await ze.json().catch(()=>({}))}}}return{ok:Oe.ok,status:Oe.status,data:await Oe.json().catch(()=>({}))}}async function c(){o.value=!0,r.value="";const I=await i("/api/admin/users");if(!I.ok){o.value=!1,r.value=I.data&&I.data.error||"加载失败 "+I.status;return}t.value=I.data.users||[],n.value=I.data.me||"",o.value=!1}function f(I){return I<=0?"--":I<1024?I+" B":I<1024*1024?(I/1024).toFixed(1)+" KB":(I/1024/1024).toFixed(2)+" MB"}function v(I){return(I||"").slice(0,10)}const b=A(!1),h=A(""),_=A(""),T=A(""),x=A(""),M=A(!1);function G(){b.value=!0,x.value="",h.value="",_.value="",T.value=""}async function oe(){const I=h.value.trim();if(_.value!==T.value){x.value="两次输入的密码不一致";return}if(_.value.length<6){x.value="密码至少 6 位";return}M.value=!0;const S=await i("/api/admin/users/create",{username:I,password:_.value});if(M.value=!1,!S.ok){x.value=S.data&&S.data.error||"创建失败 "+S.status;return}Ue("用户「"+I+"」已创建"),b.value=!1,await c()}const ae=A(null),le=A(""),Y=A(""),E=A(!1);function U(I){ae.value=I,le.value="",Y.value=""}async function Q(){if(!ae.value)return;if(le.value.length<6){Y.value="密码至少 6 位";return}E.value=!0;const I=await i("/api/admin/users/password",{userId:ae.value.id,newPassword:le.value});if(E.value=!1,!I.ok){Y.value=I.data&&I.data.error||"重置失败 "+I.status;return}Ue("已重置「"+ae.value.username+"」的登录密码"),ae.value=null}const V=A(null);async function te(){if(!V.value)return;const I=await i("/api/admin/users/delete",{userId:V.value.id});if(!I.ok){V.value=null,Ue(I.data&&I.data.error||"删除失败");return}Ue("已删除账号「"+V.value.username+"」及其全部云端数据"),V.value=null,await c()}return ln(c),(I,S)=>($(),P("div",uC,[l("div",cC,[l("div",dC,[S[12]||(S[12]=l("div",{class:"head-wrap"},[l("div",{class:"tb-title"},"用户管理"),l("div",{class:"muted tb-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:G},[we(We,{name:"plus",size:14}),S[11]||(S[11]=gt(" 新增用户 ",-1))])]),r.value?($(),P("div",fC,q(r.value),1)):pe("",!0),l("table",pC,[S[14]||(S[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(Ke,null,nt(t.value,O=>($(),P("tr",{key:O.id},[l("td",vC,q(O.username),1),l("td",mC,[O.role==="admin"?($(),P("span",hC,"管理员")):($(),P("span",yC,"普通用户"))]),l("td",gC,q(v(O.created_at)),1),l("td",bC,q(f(O.data_bytes)),1),l("td",wC,[l("div",_C,[l("button",{class:"btn btn-xs",onClick:Z=>U(O)},"重置密码",8,kC),l("button",{class:"btn btn-xs btn-danger",disabled:O.id===n.value,onClick:Z=>V.value=O},"删除",8,CC)])])]))),128)),!o.value&&!t.value.length?($(),P("tr",xC,[...S[13]||(S[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):pe("",!0)])]),o.value?($(),P("div",$C,"加载中")):pe("",!0)]),S[20]||(S[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),kt(Kn,{to:"body"},[b.value?($(),P("div",{key:0,class:"mask",onClick:S[5]||(S[5]=Ft(O=>b.value=!1,["self"]))},[l("div",SC,[l("div",EC,[S[15]||(S[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:S[0]||(S[0]=O=>b.value=!1)},[we(We,{name:"close",size:16})])]),l("div",TC,[l("div",AC,[S[16]||(S[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":S[1]||(S[1]=O=>h.value=O),placeholder:"如:xiaowang"},null,512),[[Fe,h.value]])]),l("div",PC,[S[17]||(S[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[2]||(S[2]=O=>_.value=O),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Fe,_.value]])]),l("div",OC,[S[18]||(S[18]=l("label",null,"确认密码",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[3]||(S[3]=O=>T.value=O),onKeydown:Ot(oe,["enter"])},null,544),[[Fe,T.value]])]),x.value?($(),P("div",MC,q(x.value),1)):pe("",!0)]),l("div",IC,[l("button",{class:"btn btn-sm",onClick:S[4]||(S[4]=O=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:M.value||!h.value.trim(),onClick:oe},q(M.value?"创建中":"创建"),9,jC)])])])):pe("",!0)])),($(),kt(Kn,{to:"body"},[ae.value?($(),P("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Ft(O=>ae.value=null,["self"]))},[l("div",DC,[l("div",LC,[l("span",KC,"重置「"+q(ae.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:S[6]||(S[6]=O=>ae.value=null)},[we(We,{name:"close",size:16})])]),l("div",RC,[l("div",NC,[S[19]||(S[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[7]||(S[7]=O=>le.value=O),onKeydown:Ot(Q,["enter"])},null,544),[[Fe,le.value]])]),Y.value?($(),P("div",FC,q(Y.value),1)):pe("",!0)]),l("div",VC,[l("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=O=>ae.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:E.value,onClick:Q},q(E.value?"提交中":"重置"),9,BC)])])])):pe("",!0)])),we(wn,{open:!!V.value,title:"删除用户确认",message:V.value?"将永久删除云端账号「"+V.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:S[10]||(S[10]=O=>V.value=null),onConfirm:te},null,8,["open","message"])]))}}),qC=Kt(UC,[["__scopeId","data-v-2d48d2c9"]]),HC={class:"login-page"},zC={class:"card login-card"},WC={class:"login-brand"},GC={class:"brand-icon"},YC={class:"seg"},JC=["placeholder"],XC={key:1,class:"form-error"},QC=["disabled"],ZC=Dt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,o=A("login"),r=A(""),i=A(""),c=A(""),f=A(""),v=A(!1);function b(_){o.value=_,f.value="",c.value=""}async function h(){if(!v.value){f.value="",v.value=!0;try{let _;if(o.value==="login")_=await Om(r.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Mm(r.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,T)=>($(),P("div",HC,[l("div",zC,[l("div",WC,[l("div",GC,[we(We,{name:"calendar",size:22})]),T[5]||(T[5]=l("div",{class:"login-title"},"实习工作日志",-1)),T[6]||(T[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),T[7]||(T[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",YC,[l("button",{class:Xe(["seg-btn",{active:o.value==="login"}]),onClick:T[0]||(T[0]=x=>b("login"))},"登录",2),l("button",{class:Xe(["seg-btn",{active:o.value==="create"}]),onClick:T[1]||(T[1]=x=>b("create"))},"创建用户",2)]),Me(l("input",{class:"input","onUpdate:modelValue":T[2]||(T[2]=x=>r.value=x),placeholder:"用户名(2 到 20 个字符)",onKeydown:Ot(h,["enter"])},null,544),[[Fe,r.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":T[3]||(T[3]=x=>i.value=x),placeholder:o.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Ot(h,["enter"])},null,40,JC),[[Fe,i.value]]),o.value==="create"?Me(($(),P("input",{key:0,type:"password",class:"input","onUpdate:modelValue":T[4]||(T[4]=x=>c.value=x),placeholder:"再次输入密码",onKeydown:Ot(h,["enter"])},null,544)),[[Fe,c.value]]):pe("",!0),f.value?($(),P("div",XC,q(f.value),1)):pe("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:h},q(o.value==="login"?"登录":"创建并进入"),9,QC),T[8]||(T[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),ex=Kt(ZC,[["__scopeId","data-v-e9c1c40d"]]),tx={key:1,class:"app"},nx={class:"side"},sx={class:"brand-mark"},ox={class:"side-nav"},rx={key:0,class:"nav-group"},ax=["data-tip","onClick"],ix={class:"nav-label"},lx={class:"side-foot"},ux={class:"avatar"},cx={class:"foot-name"},dx={class:"main"},fx={class:"topbar"},px={class:"title"},vx={class:"gsearch"},mx={key:0,class:"gs-panel"},hx={key:0,class:"gs-group muted"},yx=["onMousedown"],gx={class:"tag"},bx={class:"gs-text"},wx={class:"muted num gs-date"},_x={key:1,class:"gs-group muted"},kx=["onMousedown"],Cx={class:"gs-text"},xx={class:"muted gs-sub"},$x={key:1,class:"gs-empty muted"},Sx={class:"topbar-actions"},Ex=["disabled"],Tx={class:"num"},Ax={class:"content"},Px={class:"content-inner"},Ox={class:"tabbar"},Mx=["onClick"],Ix={class:"sheet-user num"},jx=["onClick"],Dx={class:"sheet-name"},Lx={class:"msw"},Kx={class:"msw-bar"},Rx={class:"msw-results"},Nx={key:0,class:"gs-group muted"},Fx=["onMousedown"],Vx={class:"tag"},Bx={class:"gs-text"},Ux={class:"muted num gs-date"},qx={key:1,class:"gs-group muted"},Hx=["onMousedown"],zx={class:"gs-text"},Wx={class:"muted gs-sub"},Gx={key:1,class:"gs-empty muted"},Yx={class:"toast-wrap"},Jx=Dt({__name:"App",setup(e){const t=by(),n=A(zo());async function o(g){n.value=g,aa(g.userId),location.hash="#/calendar",U.value="calendar",await De(),await Re(),c();try{await bd(),await no()}catch{}Ue("欢迎,"+g.username);const m=sessionStorage.getItem("dsh_migrate_toast");m&&(sessionStorage.removeItem("dsh_migrate_toast"),Ue("已迁移原有数据 "+m+" 条"))}async function r(){Pe.value=!1,Te.value=!1,Gm(),i!==null&&(window.clearInterval(i),i=null),await jm(),n.value=null,U.value="calendar",location.hash="#/calendar",Ue("已退出登录")}let i=null;function c(){Wm(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{no()},60*1e3),no()}const f=A(null),v=A(""),b=A(!1),h=A({logs:[],memos:[]});let _=null;const T=rt(()=>!!(h.value.logs.length||h.value.memos.length));function x(){_&&window.clearTimeout(_);const g=v.value;_=window.setTimeout(async()=>{const m=g.trim();if(!m){h.value={logs:[],memos:[]};return}const C=await Promise.all([Kh(m,8),Rh(m,4)]);h.value={logs:C[0],memos:C[1]}},200)}function M(){v.value="",h.value={logs:[],memos:[]},b.value=!1}function G(g){Ni.value=g.date,Q("calendar"),M()}function oe(g){Fi.value=g.id,Q("memo"),M()}function ae(){window.setTimeout(()=>{b.value=!1},150)}function le(g){var m;(g.ctrlKey||g.metaKey)&&g.key.toLowerCase()==="k"&&(g.preventDefault(),(m=f.value)==null||m.focus())}const Y=[{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 E(){var m;const g=(location.hash||"").replace("#/","");return!Y.some(C=>C.key===g)||g==="admin"&&(((m=zo())==null?void 0:m.username)||"")!=="xionglin"?"calendar":g}const U=A(E());window.addEventListener("hashchange",()=>{U.value=E()});function Q(g){location.hash="#/"+g}const V=rt(()=>Y.find(g=>g.key===U.value)||Y[0]),te=rt(()=>{var g;return(((g=n.value)==null?void 0:g.username)||"")==="xionglin"}),I=rt(()=>te.value?Y:Y.filter(g=>g.key!=="admin")),S=rt(()=>{const g=Y.filter(m=>!Z.includes(m.key));return te.value?g:g.filter(m=>m.key!=="admin")}),O=rt(()=>S.value.some(g=>g.key===U.value));ht([te,U],()=>{U.value==="admin"&&!te.value&&Q("calendar")},{immediate:!0});const Z=["calendar","today","plan","ledger"],Oe=Y.filter(g=>Z.includes(g.key)),Te=A(!1);function ye(g){Te.value=!1,Q(g)}const Pe=A(!1),ze=A(null);function de(){Pe.value=!0,window.setTimeout(()=>{var g;return(g=ze.value)==null?void 0:g.focus()},60)}function xe(g){G(g),Pe.value=!1}function Ee(g){oe(g),Pe.value=!1}const je=A(it()),Ce=A(void 0),fe=A(!1);async function De(){if(Ce.value=await kn(je.value),fe.value=!1,new Date().getHours()<4){const m=await kn(Ut(je.value,-1));fe.value=!!(m&&m.clock_in_at&&!m.clock_out_at)}}const ft=rt(()=>{const g=Ce.value;return g&&g.clock_in_at&&!g.clock_out_at?!0:fe.value&&!(g&&g.clock_in_at)}),Ct=rt(()=>{const g=Ce.value;return!!(g&&g.clock_in_at&&g.clock_out_at)}),xt=rt(()=>{const g=Ce.value;return ft.value?"下班打卡":Ct.value?"已打卡 "+_n(g==null?void 0:g.clock_in_at)+" - "+_n(g==null?void 0:g.clock_out_at):"上班打卡"});async function qt(){if(ft.value)try{await lh()}catch{}else await Sd(je.value);await De(),as()}ht(uo,()=>{n.value&&De()});const bt=A(!1);async function Re(){if((await vs()).remind_weekly==="off"){bt.value=!1;return}const m=new Date().getDay();if(m===5||m===6||m===0){const C=await yl(Zs(je.value));bt.value=!C||!C.highlights&&!C.challenges&&!C.plan_next}else bt.value=!1}return ln(async()=>{window.addEventListener("keydown",le),n.value&&(aa(n.value.userId),await De(),await Re(),c())}),(g,m)=>{var C,j,se;return n.value?($(),P("div",tx,[l("nav",nx,[l("div",{class:"brand",onClick:m[0]||(m[0]=W=>Q("calendar"))},[l("span",sx,[we(We,{name:"calendar",size:15})]),m[12]||(m[12]=l("span",{class:"brand-name"},"实习工作日志",-1))]),l("div",ox,[($(!0),P(Ke,null,nt(I.value,(W,ge)=>($(),P(Ke,{key:W.key},[ge===0||W.group!==I.value[ge-1].group?($(),P("div",rx,q(W.group),1)):pe("",!0),l("button",{class:Xe(["nav-btn",{active:U.value===W.key}]),"data-tip":W.name,onClick:be=>Q(W.key)},[we(We,{name:W.icon,size:17},null,8,["name"]),l("span",ix,q(W.name),1)],10,ax)],64))),128))]),l("div",lx,[l("span",ux,q((((C=n.value)==null?void 0:C.username)||"用户").slice(0,1).toUpperCase()),1),l("span",cx,q((j=n.value)==null?void 0:j.username),1),l("button",{class:"icon-btn",title:"退出登录",onClick:r},[we(We,{name:"export",size:15})])])]),l("div",dx,[l("header",fx,[l("span",px,q(V.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:de},[we(We,{name:"search",size:16})]),l("div",vx,[we(We,{name:"search",size:14,class:"gs-icon"}),Me(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":m[1]||(m[1]=W=>v.value=W),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:x,onFocus:m[2]||(m[2]=W=>b.value=!0),onBlur:ae,onKeydown:Ot(M,["esc"])},null,544),[[Fe,v.value]]),b.value&&v.value.trim()?($(),P("div",mx,[T.value?($(),P(Ke,{key:0},[h.value.logs.length?($(),P("div",hx,"工作记录")):pe("",!0),($(!0),P(Ke,null,nt(h.value.logs,W=>($(),P("div",{key:"l"+W.id,class:"gs-item",onMousedown:Ft(ge=>G(W),["prevent"])},[l("span",gx,q(sn(qo)(W.category)),1),l("span",bx,q(W.content),1),l("span",wx,q(W.date),1)],40,yx))),128)),h.value.memos.length?($(),P("div",_x,"备忘录")):pe("",!0),($(!0),P(Ke,null,nt(h.value.memos,W=>($(),P("div",{key:"m"+W.id,class:"gs-item",onMousedown:Ft(ge=>oe(W),["prevent"])},[l("span",Cx,q(W.title||"无标题"),1),l("span",xx,q(W.content),1)],40,kx))),128))],64)):($(),P("div",$x,"无匹配结果"))])):pe("",!0)]),m[14]||(m[14]=l("span",{class:"flex1"},null,-1)),l("div",Sx,[bt.value?($(),P("button",{key:0,class:"week-tip",onClick:m[3]||(m[3]=W=>Q("report"))},[...m[13]||(m[13]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),gt(" 填写本周周记 ",-1)])])):pe("",!0),l("button",{class:"btn btn-primary",disabled:Ct.value,onClick:qt},[we(We,{name:Ct.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",Tx,q(xt.value),1)],8,Ex)])]),l("main",Ax,[l("div",Px,[U.value==="calendar"?($(),kt(Og,{key:0})):U.value==="today"?($(),kt(tb,{key:1})):U.value==="plan"?($(),kt(lw,{key:2})):U.value==="stats"?($(),kt(Nw,{key:3})):U.value==="report"?($(),kt(x_,{key:4})):U.value==="ledger"?($(),kt(S1,{key:5})):U.value==="memo"?($(),kt(q1,{key:6})):U.value==="vault"?($(),kt(F0,{key:7})):U.value==="admin"?($(),kt(qC,{key:8})):($(),kt(nC,{key:9}))])]),l("nav",Ox,[($(!0),P(Ke,null,nt(sn(Oe),W=>($(),P("button",{key:W.key,class:Xe(["tab-btn",{active:U.value===W.key}]),onClick:ge=>Q(W.key)},[we(We,{name:W.icon,size:20},null,8,["name"]),l("span",null,q(W.name),1)],10,Mx))),128)),l("button",{class:Xe(["tab-btn",{active:O.value}]),onClick:m[4]||(m[4]=W=>Te.value=!0)},[we(We,{name:"more",size:20}),m[15]||(m[15]=l("span",null,"更多",-1))],2)]),Te.value?($(),P("div",{key:0,class:"sheet-mask",onClick:m[7]||(m[7]=W=>Te.value=!1)},[l("div",{class:"more-sheet",onClick:m[6]||(m[6]=Ft(()=>{},["stop"]))},[m[17]||(m[17]=l("div",{class:"sheet-handle"},null,-1)),l("div",Ix,q((se=n.value)==null?void 0:se.username),1),($(!0),P(Ke,null,nt(S.value,W=>($(),P("button",{key:W.key,class:"sheet-row",onClick:ge=>ye(W.key)},[we(We,{name:W.icon,size:18},null,8,["name"]),l("span",Dx,q(W.name),1),we(We,{name:"chevron-right",size:14,class:"sheet-go"})],8,jx))),128)),m[18]||(m[18]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:m[5]||(m[5]=W=>{Te.value=!1,r()})},[we(We,{name:"close",size:18}),m[16]||(m[16]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):pe("",!0),Pe.value?($(),P("div",{key:1,class:"msw-mask",onClick:m[11]||(m[11]=Ft(W=>Pe.value=!1,["self"]))},[l("div",Lx,[l("div",Kx,[we(We,{name:"search",size:16,class:"msw-icon"}),Me(l("input",{ref_key:"msInput",ref:ze,class:"msw-input","onUpdate:modelValue":m[8]||(m[8]=W=>v.value=W),placeholder:"搜索工作记录与备忘录",onInput:x,onKeydown:m[9]||(m[9]=Ot(W=>Pe.value=!1,["esc"]))},null,544),[[Fe,v.value]]),l("button",{class:"icon-btn",onClick:m[10]||(m[10]=W=>{M(),Pe.value=!1})},[we(We,{name:"close",size:16})])]),l("div",Rx,[T.value?($(),P(Ke,{key:0},[h.value.logs.length?($(),P("div",Nx,"工作记录")):pe("",!0),($(!0),P(Ke,null,nt(h.value.logs,W=>($(),P("div",{key:"l"+W.id,class:"msw-item",onMousedown:Ft(ge=>xe(W),["prevent"])},[l("span",Vx,q(sn(qo)(W.category)),1),l("span",Bx,q(W.content),1),l("span",Ux,q(W.date),1)],40,Fx))),128)),h.value.memos.length?($(),P("div",qx,"备忘录")):pe("",!0),($(!0),P(Ke,null,nt(h.value.memos,W=>($(),P("div",{key:"m"+W.id,class:"msw-item",onMousedown:Ft(ge=>Ee(W),["prevent"])},[l("span",zx,q(W.title||"无标题"),1),l("span",Wx,q(W.content),1)],40,Hx))),128))],64)):v.value.trim()?($(),P("div",Gx,"无匹配结果")):pe("",!0)])])])):pe("",!0)]),n.value?($(),kt(lC,{key:0})):pe("",!0),l("div",Yx,[we(Av,{name:"toast"},{default:Rn(()=>[($(!0),P(Ke,null,nt(sn(t),W=>($(),P("div",{key:W.id,class:"toast"},q(W.text),1))),128))]),_:1})])])):($(),kt(ex,{key:0,onLogin:o}))}}}),Xx=Kt(Jx,[["__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",i=>{i.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 Qx(){const e=await Im();e&&aa(e.userId);const t=qv(Xx);t.config.errorHandler=(n,o,r)=>{const i=n;Vr("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.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(()=>{})})}Qx().catch(e=>{Vr("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Dd as W,Md as _,Ug as b,jd as r}; +**/let Mi;const gu=typeof window<"u"&&window.trustedTypes;if(gu)try{Mi=gu.createPolicy("vue",{createHTML:e=>e})}catch{}const ed=Mi?e=>Mi.createHTML(e):e=>e,ov="http://www.w3.org/2000/svg",rv="http://www.w3.org/1998/Math/MathML",Bn=typeof document<"u"?document:null,bu=Bn&&Bn.createElement("template"),av={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(ov,e):t==="mathml"?Bn.createElementNS(rv,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,i){const c=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{bu.innerHTML=ed(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const f=bu.content;if(o==="svg"||o==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ss="transition",Co="animation",so=Symbol("_vtc"),td={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nd=Mt({},$c,td),iv=e=>(e.displayName="Transition",e.props=nd,e),hs=iv((e,{slots:t})=>nv(ip,sd(e),t)),Es=(e,t=[])=>{We(e)?e.forEach(n=>n(...t)):e&&e(...t)},wu=e=>e?We(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const Z in e)Z in td||(t[Z]=e[Z]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:h=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:A=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,M=lv(r),G=M&&M[0],oe=M&&M[1],{onBeforeEnter:le,onEnter:ce,onEnterCancelled:Y,onLeave:E,onLeaveCancelled:U,onBeforeAppear:Q=le,onAppear:B=ce,onAppearCancelled:te=Y}=t,I=(Z,Oe,Ee,be)=>{Z._enterCancelled=be,rs(Z,Oe?h:f),rs(Z,Oe?b:c),Ee&&Ee()},S=(Z,Oe)=>{Z._isLeaving=!1,rs(Z,_),rs(Z,x),rs(Z,A),Oe&&Oe()},O=Z=>(Oe,Ee)=>{const be=Z?B:ce,Ae=()=>I(Oe,Z,Ee);Es(be,[Oe,Ae]),_u(()=>{rs(Oe,Z?v:i),Sn(Oe,Z?h:f),wu(be)||ku(Oe,o,G,Ae)})};return Mt(t,{onBeforeEnter(Z){Es(le,[Z]),Sn(Z,i),Sn(Z,c)},onBeforeAppear(Z){Es(Q,[Z]),Sn(Z,v),Sn(Z,b)},onEnter:O(!1),onAppear:O(!0),onLeave(Z,Oe){Z._isLeaving=!0;const Ee=()=>S(Z,Oe);Sn(Z,_),Z._enterCancelled?(Sn(Z,A),Ii(Z)):(Ii(Z),Sn(Z,A)),_u(()=>{Z._isLeaving&&(rs(Z,_),Sn(Z,x),wu(E)||ku(Z,o,oe,Ee))}),Es(E,[Z,Ee])},onEnterCancelled(Z){I(Z,!1,void 0,!0),Es(Y,[Z])},onAppearCancelled(Z){I(Z,!0,void 0,!0),Es(te,[Z])},onLeaveCancelled(Z){S(Z),Es(U,[Z])}})}function lv(e){if(e==null)return null;if(mt(e))return[pi(e.enter),pi(e.leave)];{const t=pi(e);return[t,t]}}function pi(e){return ff(e)}function Sn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[so]||(e[so]=new Set)).add(t)}function rs(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 _u(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uv=0;function ku(e,t,n,o){const r=e._endId=++uv,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=od(e,t);if(!c)return o();const b=c+"end";let h=0;const _=()=>{e.removeEventListener(b,A),i()},A=x=>{x.target===e&&++h>=v&&_()};setTimeout(()=>{h(n[M]||"").split(", "),r=o(`${ss}Delay`),i=o(`${ss}Duration`),c=Cu(r,i),f=o(`${Co}Delay`),v=o(`${Co}Duration`),b=Cu(f,v);let h=null,_=0,A=0;t===ss?c>0&&(h=ss,_=c,A=i.length):t===Co?b>0&&(h=Co,_=b,A=v.length):(_=Math.max(c,b),h=_>0?c>b?ss:Co:null,A=h?h===ss?i.length:v.length:0);const x=h===ss&&/\b(?:transform|all)(?:,|$)/.test(o(`${ss}Property`).toString());return{type:h,timeout:_,propCount:A,hasTransform:x}}function Cu(e,t){for(;e.lengthxu(n)+xu(e[o])))}function xu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ii(e){return(e?e.ownerDocument:document).body.offsetHeight}function cv(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 $u=Symbol("_vod"),rd=Symbol("_vsh"),dv=Symbol(""),fv=/(?:^|;)\s*display\s*:/;function pv(e,t,n){const o=e.style,r=Et(n);let i=!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"&&(i=!0);const f=n[c];f!=null?mv(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[dv];c&&(n+=";"+c),o.cssText=n,i=fv.test(n)}}else t&&e.removeAttribute("style");$u in e&&((!r||t!==n)&&(e[$u]=i?o.display:""),e[rd]&&(o.display="none"))}const Ar=/\s*!important$/;function So(e,t,n){if(We(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=vv(e,t);Ar.test(n)?e.setProperty(ms(o),n.replace(Ar,""),"important"):e[o]=n}}const Su=["Webkit","Moz","ms"],vi={};function vv(e,t){const n=vi[t];if(n)return n;let o=gn(t);if(o!=="filter"&&o in e)return vi[t]=o;o=Gu(o);for(let r=0;rmi||(_v.then(()=>mi=0),mi=Date.now());function Cv(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 i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const c=r.slice(),f=[o];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,o,r,i)=>{const c=r==="svg";t==="class"?cv(e,o,c):t==="style"?pv(e,n,o):ua(t)?ca(t)||yv(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$v(e,t,o,c))?(Au(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tu(e,t,o,c,i,t!=="value")):e._isVueCE&&(Sv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Et(o)))?Au(e,gn(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Tu(e,t,o,c))};function $v(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ou(t)&&et(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 Ou(t)&&Et(n)?!1:t in e}function Sv(e,t){const n=e._def.props;if(!n)return!1;const o=gn(t);return Array.isArray(n)?n.some(r=>gn(r)===o):Object.keys(n).some(r=>gn(r)===o)}const ad=new WeakMap,id=new WeakMap,Xr=Symbol("_moveCb"),Mu=Symbol("_enterCb"),ji=new WeakMap,Ev=e=>(delete e.props.mode,e),Tv=Ev({name:"TransitionGroup",props:Mt({},nd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=cl(),o=xc();let r,i,c,f;const v=()=>(f===void 0&&(f=r.length>0&&Lv(r[0].el,n.vnode.el,Iu(e))),f);return Pc(()=>{if(ji.delete(n),!v()){r=[],c=void 0;return}const b=Iu(e);r.forEach(Pv);const h=c&&Dv(c,n.vnode.el);c=void 0,r.forEach(A=>Ov(A,h));const _=r.filter(Mv);Ii(n.vnode.el),_.forEach(A=>{const x=A.el,M=x.style;Sn(x,b),M.transform=M.webkitTransform=M.transitionDuration="";const G=x[Xr]=oe=>{oe&&oe.target!==x||(!oe||oe.propertyName.endsWith("transform"))&&(x.removeEventListener("transitionend",G),x[Xr]=null,rs(x,b))};x.addEventListener("transitionend",G)}),r=[]}),()=>{const b=dt(e),h=sd(b);let _=b.tag||je;if(r=[],f=void 0,i)for(let A=0;Ao.willMove()&&o.item.contains(t));return n&&ka(n.item,n)}function Lv(e,t,n){const o=e.cloneNode(),r=e[so];r&&r.forEach(f=>{f.split(/\s+/).forEach(v=>v&&o.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&o.classList.add(f)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:c}=od(o);return i.removeChild(o),c}const Qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return We(t)?n=>Mr(t,n):t};function Kv(e){e.target.composing=!0}function ju(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Pr=Symbol("_initialValue");function hi(e,t,n){return t&&(e=e.trim()),n&&(e=fa(e)),e}const Re={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 i=o||r.props&&r.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](hi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=hi(e.value,n,i)}),t||(Os(e,"compositionstart",Kv),Os(e,"compositionend",ju),Os(e,"change",ju))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",i=e[Pr];delete e[Pr],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](hi(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},c){if(e[Is]=Qr(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?fa(e.value):e.value,v=t??"";if(f===v)return;const b=e.getRootNode();(b instanceof Document||b instanceof ShadowRoot)&&b.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===v)||(e.value=v)}},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,v=>v.selected).map(v=>n?fa(Zr(v)):Zr(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(r):r:r[0],f=e._pendingValue=[i,i?We(c)?r.slice():r:c];try{e[Is](c)}finally{Rs(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Qr(o)},mounted(e,{value:t}){Du(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||!Rv(t,n[1],n[0]))&&Du(e,t)}};function Rv(e,t,n){if(!n||We(e))return cs(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 Du(e,t){const n=e.multiple,o=We(t);if(!(n&&!o&&!Ls(t))){for(let r=0,i=e.options.length;rString(b)===String(f)):c.selected=_f(t,f)>-1}else c.selected=t.has(f);else if(cs(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 Fv=["ctrl","shift","alt","meta"],Nv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Fv.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,...i)=>{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 i=ms(r.key);if(t.some(c=>c===i||Vv[c]===i))return e(r)})},Bv=Mt({patchProp:xv},av);let Lu;function Uv(){return Lu||(Lu=Fp(Bv))}const qv=(...e)=>{const t=Uv().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=zv(o);if(!r)return;const i=t._component;!et(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const c=n(r,!1,Hv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t};function Hv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function zv(e){return Et(e)?document.querySelector(e):e}function Tt(e){return''+e+""}const Wv={calendar:Tt(''),clock:Tt(''),"check-circle":Tt(''),edit:Tt(''),tag:Tt(''),star:Tt(''),close:Tt(''),flag:Tt(''),chart:Tt(''),export:Tt(''),"chevron-left":Tt(''),"chevron-right":Tt(''),"chevron-down":Tt(''),plus:Tt(''),search:Tt(''),settings:Tt(''),memo:Tt(''),lock:Tt(''),wallet:Tt(''),more:Tt(''),shield:Tt(''),warning:Tt(''),plan:Tt('')},Gv=["innerHTML"],ze=Dt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=ot(()=>Wv[t.name]||"");return(o,r)=>($(),T("span",{class:"icon",style:zn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Gv))}}),Yv=["aria-label"],Jv={class:"confirm-body"},Xv={key:0,class:"confirm-badge"},Qv={class:"confirm-text"},Zv={class:"confirm-msg"},em={class:"confirm-btns"},tm=Dt({__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(i){n.open&&i.key==="Escape"&&o("cancel")}return vt(()=>n.open,i=>{i?window.addEventListener("keydown",r):window.removeEventListener("keydown",r)}),Cn(()=>window.removeEventListener("keydown",r)),(i,c)=>($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),T("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Nt(f=>o("cancel"),["self"]))},[l("div",{class:"dialog confirm-dialog",role:"dialog","aria-label":e.title},[l("div",Jv,[e.danger?($(),T("div",Xv,[ke(ze,{name:"warning",size:22})])):ve("",!0),l("div",Qv,[l("div",{class:Je(["confirm-title",{"is-danger":e.danger}])},q(e.title),3),l("div",Zv,q(e.message),1)])]),l("div",em,[l("button",{class:"btn",onClick:c[0]||(c[0]=f=>o("cancel"))},q(e.cancelText),1),l("button",{class:Je(["btn",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>o("confirm"))},q(e.confirmText),3)])],8,Yv)])):ve("",!0)]),_:1})]))}}),Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},wn=Kt(tm,[["__scopeId","data-v-1f3675f2"]]);var Ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}};(function(e,t){((n,o)=>{e.exports=o()})(Ku,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"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,h={}.hasOwnProperty;function _(s,a){return h.call(s,a)}function A(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){M(s,u,a[u])})}var x=Object.defineProperty;function M(s,a,u,d){x(s,a,v(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function G(s){return{from:function(a){return s.prototype=Object.create(a.prototype),M(s.prototype,"constructor",s),{extend:A.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,le=[].slice;function ce(s,a,u){return le.call(s,a,u)}function Y(s,a){return a(s)}function E(s){if(!s)throw new Error("Assertion Failed")}function U(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Q(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?[z=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(z),de]:[de,b(de),de]),de=z[0],Ws=z[1],Ws=Ws&&Ws.then,De=de&&de.constructor,st=!!z[2],ht=function(s,a){Jn.push([s,a]),Qe&&(queueMicrotask(Kd),Qe=!1)},It=!0,Qe=!0,Xt=[],ys=[],Vt=C,jt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:m,pgp:!1,env:{},finalize:m},Ue=jt,Jn=[],gs=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&&Ta(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(k,L){y instanceof Ie?y._then(k,L):y.then(k,L)}):(d._state=!0,d._value=y,bl(d)),w&&Bs()}},Ta.bind(null,d))}catch(y){Ta(d,y)}}(this,s)}var Ea={get:function(){var s=Ue,a=or;function u(d,p){var y=this,w=!s.global&&(s!==Ue||a!==or),k=w&&!Qn(),L=new Ie(function(J,R){Aa(y,new gl(_l(d,s,w,k),_l(p,s,w,k),J,R,s))});return this._consoleTask&&(L._consoleTask=this._consoleTask),L}return u.prototype=Be,u},set:function(s){M(this,"then",s&&s.prototype===Be?Ea:{get:function(){return s},set:Ea.set})}};function gl(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 Ta(s,a){var u,d;ys.push(a),s._state===null&&(u=s._lib&&Vs(),a=Vt(a),s._state=!1,s._value=a,d=s,Xt.some(function(p){return p._value===d._value})||Xt.push(d),bl(s),u)&&Bs()}function bl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=Xt.length;w;)if(Xt[--w]._value===y._value)return Xt.splice(w,1)})(a),u.resolve(d)}catch(y){u.reject(y)}finally{--gs==0&&Pa(),--u.psd.ref||u.psd.finalize()}}function Kd(){bs(jt,function(){Vs()&&Bs()})}function Vs(){var s=It;return Qe=It=!1,s}function Bs(){var s,a,u;do for(;0.",kl="String expected.",ar="__dbnames",Ma="readonly",Ia="readwrite";function _s(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var Cl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function 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 xl(){throw Le.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function at(s,a){try{var u=$l(s),d=$l(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=R,L=w;if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function J(){this.constructor=k}function R(){return w!==null&&w.apply(this,arguments)||this}return n(k,L),k.prototype=L===null?Object.create(L):(J.prototype=L.prototype,new J),Object.defineProperty(R.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),R.prototype.table=function(){return u},R})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function y(w){if(!w)return w;var k,L=Object.create(s.prototype);for(k in w)if(!d.has(k))try{L[k]=w[k]}catch{}return L}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=y,this.hook("reading",y),s},wt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},wt.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(k){return u.core.mutate({trans:k,type:"add",keys:a!=null?[a]:null,values:[w]})}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):k.lastResult}).then(function(k){if(y)try{B(s,y,k)}catch{}return k})},wt.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 Tl(w,a),d&&B(w,d,s),u.core.mutate({trans:p,type:"put",values:[w],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):!!y})})})},wt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Q(s,this.schema.primKey.keyPath))===void 0?At(new Le.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},wt.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(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:a!=null?[a]:null})}).then(function(k){return k.numFailures?Ie.reject(k.failures[0]):k.lastResult}).then(function(k){if(y)try{B(s,y,k)}catch{}return k})},wt.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})})},wt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:Cl}).then(function(u){return lr(s,null,u)})}).then(function(a){return a.numFailures?Ie.reject(a.failures[0]):void 0})},wt.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)})})})},wt.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 k=d.schema.primKey,J=k.auto,k=k.keyPath;if(k&&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 L=s.length,J=k&&J?s.map(ir(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:J,wantResults:y}).then(function(R){var D=R.numFailures,K=R.failures;if(D===0)return y?R.results:R.lastResult;throw new xt("".concat(d.name,".bulkAdd(): ").concat(D," of ").concat(L," operations failed"),K)})})},wt.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 k=d.schema.primKey,J=k.auto,k=k.keyPath;if(k&&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 L=s.length,J=k&&J?s.map(ir(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:J,wantResults:y}).then(function(R){var D=R.numFailures,K=R.failures;if(D===0)return y?R.results:R.lastResult;throw new xt("".concat(d.name,".bulkPut(): ").concat(D," of ").concat(L," operations failed"),K)})})},wt.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(k){var L=[],J=[],R=(s.forEach(function(D,K){var H=D.key,N=D.changes,F=k[K];if(F){for(var V=0,ee=Object.keys(N);VX+ie&&V(X+J)})})}var ee=qs(u)&&u.limit===1/0&&(typeof s!="function"||N)&&{index:u.index,range:u.range};return V(0).then(function(){if(0{for(var Ye=Math.min(Ce.length,Ne.length),tt=-1,rt=0;rt=K})).length===0?Ie.resolve():(V.forEach(function(X){F.push(function(){var ie,he,ge,Se=ee,Ce=X._cfg.dbschema,Fe=(yr(D,Se,N),yr(D,Ce,N),ee=D._dbSchema=Ce,Va(Se,Ce)),$e=(Fe.add.forEach(function(Ne){Ba(N,Ne[0],Ne[1].primKey,Ne[1].indexes)}),Fe.change.forEach(function(Ne){if(Ne.recreate)throw new Le.Upgrade("Not yet support for changing primary key");var ye=N.objectStore(Ne.name);Ne.add.forEach(function(Ge){return mr(ye,Ge)}),Ne.change.forEach(function(Ge){ye.deleteIndex(Ge.name),mr(ye,Ge)}),Ne.del.forEach(function(Ge){return ye.deleteIndex(Ge)})}),X._cfg.contentUpgrade);if($e&&X._cfg.version>K)return pr(D,N),H._memoizedTables={},ie=te(Ce),Fe.del.forEach(function(Ne){ie[Ne]=Se[Ne]}),Na(D,[D.Transaction.prototype]),vr(D,[D.Transaction.prototype],c(ie),ie),H.schema=ie,(he=me($e))&&Us(),Ce=Ie.follow(function(){var Ne;(ge=$e(H))&&he&&(Ne=Qn.bind(null,null),ge.then(Ne,Ne))}),ge&&typeof ge.then=="function"?Ie.resolve(ge):Ce.then(function(){return ge})}),F.push(function(ie){var he,ge,Se=X._cfg.dbschema;he=Se,ge=ie,[].slice.call(ge.db.objectStoreNames).forEach(function(Ce){return he[Ce]==null&&ge.db.deleteObjectStore(Ce)}),Na(D,[D.Transaction.prototype]),vr(D,[D.Transaction.prototype],D._storeNames,D._dbSchema),H.schema=D._dbSchema}),F.push(function(ie){D.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(D.idbdb.version/10)===X._cfg.version?(D.idbdb.deleteObjectStore("$meta"),delete D._dbSchema.$meta,D._storeNames=D._storeNames.filter(function(he){return he!=="$meta"})):ie.objectStore("$meta").put(X._cfg.version,"version"))})}),function X(){return F.length?Ie.resolve(F.shift()(H.idbtrans)).then(X):Ie.resolve()}().then(function(){Kl(ee,N)}))}).catch(w);var L,J;c(p).forEach(function(R){Ba(u,R,p[R].primKey,p[R].indexes)}),pr(s,u),Ie.follow(function(){return s.on.populate.fire(y)}).catch(w)})}function Jd(s,a){Kl(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=Va(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 k=a.objectStore(w.name);w.add.forEach(function(L){Ke&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(L.src)),mr(k,L)})})(p[d]);if(typeof y=="object")return y.value}}function Va(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 k=p.idxByName,L=y.idxByName,J=void 0;for(J in k)L[J]||w.del.push(J);for(J in L){var R=k[J],D=L[J];R?R.src!==D.src&&w.change.push(D):w.add.push(D)}(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 Ua(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Nn(ar,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function qa(s){return s&&typeof s.databases=="function"}function Ha(s){return Xn(function(){return Ue.letThrough=!0,s()})}function za(s){return!("from"in s)}var Ht=function(s,a){var u;if(!this)return u=new Ht,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:V.oldVersion,D=ee<1,s.idbdb=F.result,y&&Jd(s,R),Yd(s,ee/10,R,H))},H),F.onsuccess=$t(function(){R=null;var V,ee,X,ie,he,ge,Se=s.idbdb=F.result,Ce=ce(Se.objectStoreNames);if(0"u"?Ie.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(K){function H(){return indexedDB.databases().finally(K)}L=setInterval(H,100),H()}).finally(function(){return clearInterval(L)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Ie.resolve(Ha(function(){return s.on.ready.fire(s.vip)})).then(function K(){var H;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=at(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=at(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 of(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&&qe(y,p)},3e3))})}var rf={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,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(y=new AbortController).signal,k.addEventListener("abort",(w=function(L){return function(){if(y.abort(),d==="readwrite"){for(var J=new Set,R=0,D=u;R{var ee=ks["idb://".concat(H,"/").concat(N)];if(!ee)return[];if(!(H=ee.queries[F]))return[null,!1,ee,null];var X=H[(V.query?V.query.index.name:null)||""];if(!X)return[null,!1,ee,null];switch(F){case"query":var ie=(he=V.direction)!=null?he:"next",he=X.find(function(ge){var Se;return ge.req.limit===V.limit&&ge.req.values===V.values&&((Se=ge.req.direction)!=null?Se:"next")===ie&&Gl(ge.req.query.range,V.query.range)});return he?[he,!0,ee,X]:[X.find(function(ge){var Se;return("limit"in ge.req?ge.req.limit:1/0)>=V.limit&&((Se=ge.req.direction)!=null?Se:"next")===ie&&(!V.values||ge.req.values)&&sf(ge.req.query.range,V.query.range)}),!1,ee,X];case"count":return he=X.find(function(ge){return Gl(ge.req.query.range,V.query.range)}),[he,!!he,ee,X]}})(a,u,"query",y),K=D[0],J=D[2],R=D[3],K&&D[1]?K.obsSet=y.obsSet:(D=d.query(y).then(function(H){var N=H.result;if(K&&(K.res=N),w){for(var F=0,V=N.length;F{var he=Vs();try{y&&Us();var ge=Xn(s,ie);return ge=y?ge.finally(Qn):ge}finally{he&&Bs()}})(ee={subscr:V,signal:w.signal,requery:K,querier:s,trans:null}),D||(ts.storagemutated.subscribe(N),D=!0),Promise.resolve(X).then(function(ie){u=!0,a=ie,k||ee.signal.aborted||(H()||(J=V,H())?K():(L={},Oa(function(){return!k&&p.next&&p.next(ie)})))},function(ie){u=!1,["DatabaseClosedError","AbortError"].includes(ie==null?void 0:ie.name)||k||Oa(function(){k||p.error&&p.error(ie)})}))};return setTimeout(K,0),R});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var Cs=Nn;function ni(s){var a=ns;try{ns=!0,ts.storagemutated.fire(s),Ja(s,!0)}finally{ns=a}}A(Cs,o(o({},re),{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,(qa(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ar})}):Ua(u,a).toCollection().primaryKeys()).then(s)}catch{return At(new Le.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return Ue.trans?bs(Ue.transless||jt,s):s()},vip:Ha,async:function(s){return function(){try{var a=Xa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Ie.resolve(a)}catch(u){return At(u)}}},spawn:function(s,a,u){try{var d=Xa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Ie.resolve(d)}catch(p){return At(p)}},currentTransaction:{get:function(){return Ue.trans||null}},waitFor:function(s,a){return s=Ie.resolve(typeof s=="function"?Cs.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:G,extend:v,props:A,override:Y,Events:po,on:ts,liveQuery:Yl,extendObservabilitySet:br,getByKeyPath:Q,setByKeyPath:B,delByKeyPath:function(s,a){typeof a=="string"?B(s,a,void 0):"length"in a&&[].map.call(a,function(u){B(s,u,void 0)})},shallowClone:te,deepClone:Oe,getObjectDiff:Qa,cmp:at,asap:U,minKey:-1/0,addons:[],connections:{get:go.toArray},errnames:qt,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"&&(ts(fr,function(s){ns||(s=new CustomEvent(La,{detail:s}),ns=!0,dispatchEvent(s),ns=!1)}),addEventListener(La,function(s){s=s.detail,ns||ni(s)}));var Gs,ns=!1,Jl=function(){};return typeof BroadcastChannel<"u"&&((Jl=function(){(Gs=new BroadcastChannel(La)).onmessage=function(s){return s.data&&ni(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),ts(fr,function(s){ns||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Nn.disableBfCache&&s.persisted){Ke&&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 ne;function am(e){ne=e}function dl(){ne&&ne.close(),ne=void 0}const im=6,Fu=["公司","客户现场","出差","居家办公"],lm={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function qo(e){return lm[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 it(){return Gn(new Date)}function lt(){const e=new Date;return Gn(e)+"T"+Io(e.getHours())+":"+Io(e.getMinutes())+":"+Io(e.getSeconds())}function _n(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function Fs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Ut(e,t){const n=Fs(e);return n.setDate(n.getDate()+t),Gn(n)}function ta(e,t){const n=Fs(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=Fs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Gn(t)}function um(e){const t=Fs(e).getDay();return t===0||t===6}function cm(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ud(e){const t=Fs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const dm=15e4;function Li(e){const t=new Uint8Array(e);let n="";for(let o=0;o({}));if(!r.ok){const c=i&&i.error||"服务返回 "+r.status;throw e==="register"&&r.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function ml(e,t,n){const o=await Pm(n,e,t);aa(o.userId);const r={userId:o.userId,username:o.username};return Tm(r),md(o.username,t),r}async function Om(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return ml(n,t,"login")}async function Mm(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 ml(o,t,"register")}async function Im(){const e=pn();if(!e)return null;try{return await ml(e.username,e.password,"login")}catch{return null}}async function jm(){oa(),dl(),ra=null,vd()}function Dm(){oa(),dl(),ra=null,vd(),Am()}async function Lm(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 i;try{i=await fetch(r+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+hd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!i.ok){const c=await i.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+i.status)}md(o.username,t)}async function Km(){if(!zo())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+hd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const o=await n.json().catch(()=>({}));throw new Error(o&&o.error||"删除失败 "+n.status)}Dm()}function hd(){return xa()}const Fi=P(null),Ni=P(null),uo=P(0);function is(){uo.value++}const yd=P(0);function Rm(){yd.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 Fm(e){return ne.table(e).toArray()}function Kr(e,t){return e==="setting"?t.key:t.id}async function Nm(){for(const e of ro){const t=ne.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=Vm()),!o.updated_at&&o.created_at&&(r.updated_at=o.created_at),Object.keys(r).length&&await t.update(Kr(e,o),r)}}}function Vm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Bm(){return pn()!=null}async function Um(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function qm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function gd(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 Hm(e,t){let n=xa();return n||(n=await gd(e,t),Ho(n),n)}async function bd(){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 Vi(){const e=pn();if(!e)throw new Error("未登录,无法同步");return Cd({baseUrl:await Ns(),username:e.username,password:e.password})}async function wd(){try{await Vi()}catch(e){eo.value=e instanceof Error?e.message:String(e);try{await Vi()}catch{}}}function _d(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 i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(o.puuid=i.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 kd(){const e=await ne.work_log.toArray(),t=await ne.project.toArray(),n=await ne.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,Rr=!1,Bi=!1,to=null,En=null,Ui="",qi=!1,Fr=null;async function no(){if(jo){Rr=!0;return}try{if(!await Bm())return;await Cd(await zm()),eo.value=""}catch(e){eo.value=e instanceof Error?e.message:String(e)}}async function zm(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function Wm(){if(qi)return;qi=!0,Fr=om(async()=>{const t={};for(const n of ro)t[n]=await ne.table(n).count();return t}).subscribe({next:()=>{Bi||jo||(to&&globalThis.clearTimeout(to),to=globalThis.setTimeout(()=>{no()},3e3))},error:()=>{}})}function Gm(){Fr&&(Fr.unsubscribe(),Fr=null),En&&(En.close(),En=null,Ui=""),to&&(globalThis.clearTimeout(to),to=null),qi=!1}function Ym(e,t){const n=e+"|"+t;if(!(En&&Ui===n)){En&&(En.close(),En=null);try{En=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ui=n,En.onmessage=()=>{no()}}catch{En=null}}}async function Cd(e){if(jo)return Rr=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};jo=!0,Bi=!0;try{const t=await Hi(e);return Rr&&(Rr=!1,globalThis.setTimeout(()=>{no()},800)),t}finally{jo=!1,Bi=!1}}async function Hi(e,t=!1){var Q;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Nm();const o=await kd(),r=await ne.sync_mirror.toArray(),i=new Map;for(const B of r)i.set(B.table+"|"+B.uuid,B);const c={},f=[];let v=0;for(const B of ro){let te=await Fm(B);B==="setting"&&(te=te.filter(S=>!Xs.has(S.key)));const I=new Map;for(const S of te)I.set(S.uuid,S);for(const[S,O]of I){const Z=_d(B,O,o),Oe=Lr(Z),Ee=i.get(B+"|"+S);(!Ee||Ee.hash!==Oe)&&(c[B]=c[B]||[],c[B].push(Z),v++)}for(const[S,O]of i)S.startsWith(B+"|")&&!I.has(O.uuid)&&f.push({table:B,uuid:O.uuid,deleted_at:lt()});c[B]=c[B]||[]}f.push(...eh());const b=await Hm(n,e),h=B=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+B},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let _=await h(b);if(_.status===401){Ho("");const B=await gd(n,e);Ho(B),_=await h(B)}if(!_.ok)throw new Error("同步服务返回 "+_.status);const A=await _.json(),x=String(A.dataEpoch||""),M="dsh_sync_epoch_"+(((Q=pn())==null?void 0:Q.username)||"anon"),G=x?localStorage.getItem(M):null;if(!t&&G&&x&&G!==x)return await ne.sync_mirror.clear(),localStorage.setItem(M,x),Hi(e,!0);const oe=A.tables||{},le=A.tombstones||[],ce=ro.reduce((B,te)=>B+(oe[te]||[]).length,0),Y=r.length-f.length;if(!t&&ce0||E.removed>0||v>0)&&is(),{pushed:v,pulled:E.changed,removed:E.removed,errors:0,at:U}}function xd(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function Jm(){try{const e=localStorage.getItem(xd());if(e)return JSON.parse(e)}catch{}return{}}function Xm(e){try{localStorage.setItem(xd(),JSON.stringify(e))}catch{}}async function Qm(e,t){const n=Jm(),o=new Set(t.map(x=>x.table+"|"+x.uuid)),r=new Map;for(const x of await ne.sync_mirror.toArray())r.set(x.table+"|"+x.uuid,x);const i=new Set(Array.from(r.keys()).map(x=>x.split("|")[1]));let c=0,f=0;const v={},b={},h={};for(const x of ro){const M=ne.table(x),G=await M.toArray(),oe=new Map(G.map(S=>[Kr(x,S),S])),le=new Map(G.filter(S=>S.uuid).map(S=>[S.uuid,S])),ce=(e[x]||[]).filter(S=>S&&typeof S=="object"&&S.uuid).filter(S=>!o.has(x+"|"+S.uuid)),Y=ce.filter(S=>!(x==="setting"&&Xs.has(S.key))),E=ce.filter(S=>x==="setting"&&Xs.has(S.key));for(const S of E)Zm(x,S.uuid);const U=x==="setting"?[]:G.filter(S=>S.uuid&&!i.has(S.uuid)&&!o.has(x+"|"+S.uuid)),Q={v:Math.max(0,...G.map(S=>Number(S.id)||0))};Y.length;const B=[];for(const S of Y){const O={...S};if(x==="log_item"){const Ee=O.wuuid?v[O.wuuid]:void 0;if(!Ee)continue;O.work_log_id=Ee,delete O.wuuid,O.project_id=O.puuid?b[O.puuid]??null:null,delete O.puuid}if(x==="plan")if(O.guuid){const Ee=h[O.guuid];O.goal_id=Ee??null,delete O.guuid}else O.goal_id=null;let Z=Kr(x,S);if(x==="setting")Z=S.key;else{const Ee=n[x]&&n[x][S.uuid],be=le.get(S.uuid);be&&be.id!=null?Z=be.id:typeof Ee=="number"?Z=Ee:Z=++Q.v}const Oe={...O,id:Z};x==="setting"&&Xs.has(Oe.key)||(B.push(Oe),x==="work_log"&&(v[S.uuid]=Z),x==="project"&&(b[S.uuid]=Z),x==="goal"&&(h[S.uuid]=Z))}const te=B.concat(U);for(const S of te){const O=oe.get(Kr(x,S));(!O||Lr(O)!==Lr(S))&&c++}f+=G.filter(S=>S.uuid&&!B.some(O=>O.uuid===S.uuid)&&!o.has(x+"|"+S.uuid)).length,await M.clear(),te.length&&await M.bulkPut(te);const I={};for(const S of te)S.uuid&&(I[S.uuid]=S.id);n[x]=I}Xm(n);const _=await kd(),A=[];for(const x of ro){const M=await ne.table(x).toArray();for(const G of M)x==="setting"&&Xs.has(G.key)||G.uuid&&A.push({table:x,uuid:G.uuid,hash:Lr(_d(x,G,_))})}return await ne.sync_mirror.clear(),A.length&&await ne.sync_mirror.bulkAdd(A.map(x=>({...x}))),await ne.tombstone.clear(),{changed:c,removed:f+ia.length}}const ia=[];function Zm(e,t){ia.some(n=>n.table===e&&n.uuid===t)||ia.push({table:e,uuid:t,deleted_at:lt()})}function eh(){return ia.splice(0)}const th=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function ut(){await wd()}async function St(e,t){const n=await ne.setting.get(e);return n?n.value:t}async function Lt(e,t){await ne.setting.put({key:e,value:t}),th.has(e)||await ut()}async function vs(){const e=await Promise.all([St("work_start","09:00"),St("work_end","18:00"),St("grace_minutes","10"),St("lunch_minutes","60"),St("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 nh(){return St("last_location","")}async function sh(e,t){const n=t.trim();await Lt("last_location",n),n&&await la(n);let o=!1;const r=await kn(e);r&&r.id?(r.location||"")!==n&&(await ne.attendance.update(r.id,{location:n||null}),o=!0):n&&(await ne.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:lt()}),o=!0),o&&await ut()}async function hl(){const e=await St("location_presets","");if(!e)return Fu.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Fu.slice()}async function $d(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Lt("location_presets",JSON.stringify(t))}async function la(e){const t=e.trim();if(!t)return;const n=await hl();n.includes(t)||await $d([...n,t])}async function ao(e=!1){const t=await ne.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function oh(e){await ne.project.add({name:e.trim(),archived:0,created_at:lt()}),await ut()}async function rh(e,t){await ne.project.update(e,{name:t.trim()}),await ut()}async function ah(e,t){await ne.project.update(e,{archived:t?1:0}),await ut()}async function kn(e){return ne.attendance.where("date").equals(e).first()}async function Sd(e,t){const n=((t===void 0?await St("last_location",""):t)||"").trim();let o=!1;const r=await kn(e);if(r&&r.id){if(!r.clock_in_at){const i={clock_in_at:lt()};n&&(i.location=n),await ne.attendance.update(r.id,i),o=!0}n&&(await St("last_location","")!==n&&await Lt("last_location",n),await la(n)),o&&await ut();return}await ne.attendance.add({date:e,clock_in_at:lt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:lt()}),n&&(await Lt("last_location",n),await la(n)),await ut()}async function ih(e){const t=await kn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await ne.attendance.update(t.id,{clock_out_at:lt()}),await ut())}async function lh(){const e=new Date,t=Gn(e);let n="";if(e.getHours()<4){const o=await kn(Ut(t,-1));o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await ne.attendance.update(o.id,{clock_out_at:lt()}),n=o.date)}if(!n){const o=await kn(t);o&&o.id&&o.clock_in_at&&!o.clock_out_at&&(await ne.attendance.update(o.id,{clock_out_at:lt()}),n=o.date)}if(!n)throw new Error("没有进行中的打卡");return await ut(),n}async function uh(e,t,n,o,r){(r||"").trim()&&await la(r);const i=await kn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:o||null,location:(r||"").trim()||null,created_at:lt()};i&&i.id?await ne.attendance.update(i.id,c):await ne.attendance.add(c),await ut()}async function ch(e,t,n){const o=(n||"").trim();if(!o)return;const r=await kn(e);r&&r.id&&(await ne.attendance.update(r.id,{[t]:e+"T"+o+":00"}),await ut())}async function Xo(e,t){return ne.attendance.where("date").between(e,t,!0,!0).toArray()}async function dh(e,t){const n=await kn(e);if(t){const o={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:lt()};n&&n.id?await ne.attendance.update(n.id,o):await ne.attendance.add({...o,note:null,location:null})}else n&&n.id&&await ne.attendance.update(n.id,{kind:"normal"});await ut()}async function fh(e){const t=await ne.work_log.where("date").equals(e).first();return t||{id:await ne.work_log.add({date:e,created_at:lt()}),date:e,created_at:lt()}}async function ph(e){return ne.work_log.where("date").equals(e).first()}async function vh(e){const t=await ph(e);return!t||!t.id?[]:(await ne.log_item.where("work_log_id").equals(t.id).toArray()).sort((o,r)=>r.id-o.id)}async function mh(e,t){const n=await ne.work_log.where("date").equals(e).first();let o;n&&n.id?o=n:o=await fh(e),await ne.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:lt()});const r=t.project_id?String(t.project_id):"";await St("last_project","")!==r&&await Lt("last_project",r),await St("last_category","")!==t.category&&await Lt("last_category",t.category),await ut()}async function gi(e,t){await ne.table("log_item").update(e,t),await ut()}async function hh(e){await ne.table("log_item").delete(e),await ut()}async function Qo(e,t){const n=await ne.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const o=new Map(n.map(i=>[i.id,i.date]));return(await ne.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:o.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function _h(e){const t=lt();await ne.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 ut()}async function kh(e,t){await ne.plan.update(e,{...t,updated_at:lt()}),await ut()}async function Ch(e){await ne.plan.delete(e),await ut()}async function xh(e,t){const n=await ne.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await $a(e),await ne.plan.update(e,{status:t,updated_at:lt()}),await ut())}async function $h(e){const t=await ne.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await $a(n.id);await ne.plan.update(e,{timer_started_at:lt(),updated_at:lt()}),await ut()}async function $a(e){const t=await ne.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 ne.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:lt()}),await ut()}const Sh=366;function Eh(e,t){const n=[];let o=e,r=0;for(;o<=t&&rr.status==="done").length,total:o.length})}return t}async function Ah(){return(await ne.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await ne.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 Rh(e,t=4){const n=e.trim().toLowerCase();return n?(await ne.memo.toArray()).filter(r=>((r.title||"")+" "+(r.content||"")).toLowerCase().includes(n)).sort((r,i)=>r.updated_at{await Promise.all([ne.project.clear(),ne.work_log.clear(),o.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear(),r.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await ne.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ne.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 ne.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ne.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ne.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ne.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ne.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 i.bulkAdd(n.plan)}),await ut()}const zh=["制度学习","产品学习","打杂","项目实操","售后服务"],Wh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Gh=["工资","报销","其他"],Ed="log_categories",Td="ledger_expense_categories",Ad="ledger_income_categories";function Pd(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 Pd(await St(Ed,""),zh)}async function Yh(e){await Lt(Ed,JSON.stringify(e))}async function Wo(e){return Pd(await St(e==="expense"?Td:Ad,""),e==="expense"?Wh:Gh)}async function zi(e,t){await Lt(e==="expense"?Td:Ad,JSON.stringify(t))}const Jh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Xh={class:"dialog-head"},Qh={class:"dialog-title"},Zh={key:0,class:"muted dialog-sub"},ey={class:"dialog-body"},ty={class:"form-grid"},ny={class:"field span2"},sy={key:0,class:"form-error"},oy={class:"field"},ry=["value"],ay={class:"field"},iy=["value"],ly={class:"field"},uy={class:"min-chips"},cy=["onClick"],dy={class:"field"},fy={class:"field span2"},py={class:"field"},vy={class:"field"},my={class:"dialog-btns"},hy=Dt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=P([]);Zo().then(ce=>{n.value=ce});const o=e,r=t,i=P(""),c=P(null),f=P("dev"),v=P(null),b=P(""),h=P(""),_=P(0),A=P(0),x=P(""),M=P(null),G=ot(()=>{var E;const ce=o.projects.filter(U=>U.archived!==1),Y=(E=o.item)==null?void 0:E.project_id;if(Y&&!ce.some(U=>U.id===Y)){const U=o.projects.find(B=>B.id===Y),Q=ce.slice();return U&&Q.unshift({...U,name:U.name+"(已归档)"}),Q}return ce});function oe(ce){o.open&&ce.key==="Escape"&&r("cancel")}vt(()=>o.open,async ce=>{var Y;if(ce){const E=o.item;i.value=(E==null?void 0:E.content)??"",c.value=(E==null?void 0:E.project_id)??null,f.value=(E==null?void 0:E.category)??"dev",v.value=(E==null?void 0:E.minutes)??null,b.value=(E==null?void 0:E.takeaway)??"",h.value=(E==null?void 0:E.remark)??"",_.value=(E==null?void 0:E.is_milestone)??0,A.value=(E==null?void 0:E.needs_followup)??0,x.value="",window.addEventListener("keydown",oe),await Rs(),(Y=M.value)==null||Y.focus()}else window.removeEventListener("keydown",oe)}),Cn(()=>window.removeEventListener("keydown",oe)),vt(i,()=>{x.value&&(x.value="")});function le(){const ce=i.value.trim();if(!ce){x.value="请填写工作内容";return}if(!o.item||!o.item.id){r("save",{id:0,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value,needs_followup:A.value});return}r("save",{id:o.item.id,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:h.value.trim()||null,is_milestone:_.value?1:0,needs_followup:A.value?1:0})}return(ce,Y)=>($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),T("div",{key:0,class:"mask",onClick:Y[10]||(Y[10]=Nt(E=>r("cancel"),["self"]))},[l("div",Jh,[l("div",Xh,[l("div",null,[l("div",Qh,q(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),T("div",Zh,q(e.date),1)):ve("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:Y[0]||(Y[0]=E=>r("cancel"))},[ke(ze,{name:"close",size:16})])]),l("div",ey,[l("div",ty,[l("div",ny,[Y[11]||(Y[11]=l("label",null,"工作内容(必填)",-1)),Pe(l("input",{ref_key:"contentInput",ref:M,class:Je(["input",{invalid:x.value}]),"onUpdate:modelValue":Y[1]||(Y[1]=E=>i.value=E),onKeydown:Ot(le,["enter"])},null,34),[[Re,i.value]]),x.value?($(),T("div",sy,q(x.value),1)):ve("",!0)]),l("div",oy,[Y[13]||(Y[13]=l("label",null,"所属项目",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":Y[2]||(Y[2]=E=>c.value=E)},[Y[12]||(Y[12]=l("option",{value:null},"无项目",-1)),($(!0),T(je,null,nt(G.value,E=>($(),T("option",{key:E.id,value:E.id},q(E.name),9,ry))),128))],512),[[Wn,c.value]])]),l("div",ay,[Y[14]||(Y[14]=l("label",null,"工作分类",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":Y[3]||(Y[3]=E=>f.value=E)},[($(!0),T(je,null,nt(n.value,E=>($(),T("option",{key:E,value:E},q(E),9,iy))),128))],512),[[Wn,f.value]])]),l("div",ly,[Y[15]||(Y[15]=l("label",null,"耗时(分钟)",-1)),Pe(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":Y[4]||(Y[4]=E=>v.value=E),placeholder:"选填"},null,512),[[Re,v.value,void 0,{number:!0}]]),l("div",uy,[($(),T(je,null,nt([15,30,60,90,120],E=>l("button",{key:E,type:"button",class:Je(["min-chip",{on:v.value===E}]),onClick:U=>v.value=v.value===E?null:E},q(E)+"分",11,cy)),64))])]),l("div",dy,[Y[16]||(Y[16]=l("label",null,"主要收获",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":Y[5]||(Y[5]=E=>b.value=E),placeholder:"一句话:学到了什么"},null,512),[[Re,b.value]])]),l("div",fy,[Y[17]||(Y[17]=l("label",null,"备注",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":Y[6]||(Y[6]=E=>h.value=E),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,h.value]])]),l("div",py,[Y[18]||(Y[18]=l("label",null,"成果标记",-1)),l("button",{class:Je(["toggle-btn",{on:_.value===1}]),onClick:Y[7]||(Y[7]=E=>_.value=_.value===1?0:1)},q(_.value===1?"已标记为成果":"未标记"),3)]),l("div",vy,[Y[19]||(Y[19]=l("label",null,"待跟进",-1)),l("button",{class:Je(["toggle-btn",{onwarn:A.value===1}]),onClick:Y[8]||(Y[8]=E=>A.value=A.value===1?0:1)},q(A.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",my,[l("button",{class:"btn btn-sm",onClick:Y[9]||(Y[9]=E=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:le},q(e.item?"保存修改":"添加"),1)])])])):ve("",!0)]),_:1})]))}}),yy=Kt(hy,[["__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(um(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 i=Or(_n(e.clock_in_at)),c=Or(_n(e.clock_out_at)),f=Or(n.work_start),v=Or(n.work_end);let b="normal";!r&&i>f+n.grace_minutes?b="late":!r&&c{Nr.value=Nr.value.filter(n=>n.id!==t)},2e3)}function by(){return Nr}const wy={class:"day-panel"},_y={class:"dp-head"},ky={class:"dp-date"},Cy={class:"card sec"},xy={class:"att-grid"},$y={class:"att-cell"},Sy={key:0,class:"edit-row"},Ey={key:1,class:"att-val"},Ty={class:"att-cell"},Ay={key:0,class:"edit-row"},Py={key:1,class:"att-val"},Oy={class:"att-cell"},My=["list"],Iy=["id"],jy=["value"],Dy={class:"att-cell"},Ly={class:"att-val status-val"},Ky={key:0,class:"tag"},Ry={key:1,class:"muted"},Fy={key:0,class:"att-note muted"},Ny={class:"att-actions"},Vy=["disabled"],By=["disabled"],Uy=["disabled"],qy=["disabled"],Hy={key:0,class:"card sec makeup"},zy={class:"form-grid"},Wy={class:"field"},Gy={class:"field"},Yy={class:"field span2"},Jy=["list"],Xy={class:"field span2"},Qy={key:0,class:"form-error"},Zy={class:"form-footer"},eg={class:"list-sec"},tg={class:"sec-head"},ng={class:"sec-title"},sg={key:0,class:"empty muted"},og={class:"item-main"},rg={class:"tag"},ag=["onClick"],ig={key:0,class:"muted item-meta"},lg={key:1,class:"muted num item-meta"},ug=["onClick"],cg=["onClick"],dg=["onClick"],fg=["onClick"],pg={key:0,class:"item-sub"},vg={key:0,class:"muted2"},mg={key:1,class:"muted"},hg={key:1,class:"dp-foot muted num"},yg=Dt({__name:"DayPanel",props:{date:{}},setup(e){const t=P([]);Zo().then(g=>{t.value=g});const n=e,o=P(!0),r=P(null),i=P(void 0),c=P([]),f=P([]),v=P(""),b=P([]),h=ot(()=>"loc-list-"+n.date),_=ot(()=>n.date===it());async function A(){o.value=!0,r.value=await vs(),i.value=await kn(n.date),c.value=await vh(n.date),f.value=await ao(!0),b.value=await hl(),v.value=i.value&&i.value.location||await nh(),o.value=!1}ln(A),vt(()=>n.date,A),vt(uo,()=>{A()});function x(g){if(!g)return"";const m=f.value.find(C=>C.id===g);return m?m.name:"已删除项目"}const M=ot(()=>r.value?co(i.value,n.date,r.value,_.value):null),G=ot(()=>c.value.reduce((g,m)=>g+(m.minutes||0),0)),oe=P(!1);async function le(){oe.value||(oe.value=!0,await Sd(n.date,v.value),await A(),is(),Ve("上班打卡成功"),oe.value=!1)}async function ce(){oe.value||(oe.value=!0,await ih(n.date),await A(),is(),Ve("下班打卡成功"),oe.value=!1)}async function Y(){await sh(n.date,v.value),is(),Ve("地点已更新")}const E=P(!1),U=ot(()=>{var g;return((g=i.value)==null?void 0:g.kind)==="leave"});function Q(){if(i.value&&i.value.clock_in_at){E.value=!0;return}B(!0)}async function B(g){E.value=!1,await dh(n.date,g),await A(),is(),Ve(g?"已标记为休假":"已取消休假")}const te=P(null),I=P(""),S=P(null);vt(te,async g=>{var m;g&&(await Rs(),(m=S.value)==null||m.focus())});function O(g){var C,j;const m=g==="in"?(C=i.value)==null?void 0:C.clock_in_at:(j=i.value)==null?void 0:j.clock_out_at;te.value=g,I.value=m?_n(m):g==="in"?"09:00":"18:00"}function Z(){te.value=null}async function Oe(){const g=te.value;g&&(te.value=null,I.value&&(await ch(n.date,g==="in"?"clock_in_at":"clock_out_at",I.value),await A(),is(),Ve("打卡时间已修改")))}const Ee=P(!1),be=P("09:00"),Ae=P("18:00"),He=P(""),qe=P(""),Xe=P("");function pe(){qe.value=v.value,Xe.value="",Ee.value=!Ee.value}async function me(){if(!be.value||!Ae.value){Xe.value="请填写上班与下班时间";return}await uh(n.date,n.date+"T"+be.value+":00",n.date+"T"+Ae.value+":00",He.value.trim(),qe.value),Ee.value=!1,He.value="",Xe.value="",await A(),is(),Ve("补卡已保存")}const re=P(null),ae=P(!1);function Me(g){re.value=g,ae.value=!0}function ft(){re.value=null,ae.value=!0}async function Ct(g){g.id?(await gi(g.id,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark,is_milestone:g.is_milestone,needs_followup:g.needs_followup}),Ve("记录已更新")):(await mh(n.date,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark}),Ve("记录已添加")),re.value=null,ae.value=!1,await A()}async function xt(g){await gi(g.id,{is_milestone:g.is_milestone?0:1}),await A()}async function qt(g){await gi(g.id,{needs_followup:g.needs_followup?0:1}),await A()}const bt=P(null);async function Le(){bt.value&&bt.value.id&&await hh(bt.value.id),bt.value=null,await A(),Ve("记录已删除")}return(g,m)=>($(),T("div",wy,[l("div",_y,[l("div",ky,q(sn(ud)(e.date)),1)]),l("div",Cy,[m[19]||(m[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",xy,[l("div",$y,[m[15]||(m[15]=l("label",null,"上班时间",-1)),te.value==="in"?($(),T("div",Sy,[Pe(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[0]||(m[0]=C=>I.value=C),onKeydown:[Ot(Oe,["enter"]),Ot(Z,["esc"])]},null,544),[[Re,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),l("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),T("div",Ey,[l("span",{class:Je(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},q(i.value&&i.value.clock_in_at?sn(_n)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),T("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:m[1]||(m[1]=C=>O("in"))},[ke(ze,{name:"edit",size:13})])):ve("",!0)]))]),l("div",Ty,[m[16]||(m[16]=l("label",null,"下班时间",-1)),te.value==="out"?($(),T("div",Ay,[Pe(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[2]||(m[2]=C=>I.value=C),onKeydown:[Ot(Oe,["enter"]),Ot(Z,["esc"])]},null,544),[[Re,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Oe},"确认"),l("button",{class:"btn btn-sm",onClick:Z},"取消")])):($(),T("div",Py,[l("span",{class:Je(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},q(i.value&&i.value.clock_out_at?sn(_n)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),T("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:m[3]||(m[3]=C=>O("out"))},[ke(ze,{name:"edit",size:13})])):ve("",!0)]))]),l("div",Oy,[m[17]||(m[17]=l("label",null,"上班地点",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":m[4]||(m[4]=C=>v.value=C),list:h.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:Y},null,40,My),[[Re,v.value]]),l("datalist",{id:h.value},[($(!0),T(je,null,nt(b.value,C=>($(),T("option",{key:C,value:C},null,8,jy))),128))],8,Iy)]),l("div",Dy,[m[18]||(m[18]=l("label",null,"考勤状态",-1)),l("div",Ly,[M.value?($(),T(je,{key:0},[l("span",{class:Je(["dot",M.value.status])},null,2),l("span",null,q(M.value.label),1),i.value&&i.value.kind==="makeup"?($(),T("span",Ky,"补卡")):ve("",!0)],64)):($(),T("span",Ry,"--"))])])]),i.value&&i.value.note?($(),T("div",Fy,"补卡说明:"+q(i.value.note),1)):ve("",!0),l("div",Ny,[_.value&&(!i.value||!i.value.clock_in_at)?($(),T("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:le},"上班打卡",8,Vy)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),T("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ce},"下班打卡",8,By)):ve("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),T("button",{key:2,class:"btn btn-sm",onClick:pe},"补卡")):ve("",!0),U.value?($(),T("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:m[5]||(m[5]=C=>B(!1))},"取消休假",8,qy)):($(),T("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:Q},"标记休假",8,Uy))])]),Ee.value?($(),T("div",Hy,[m[24]||(m[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",zy,[l("div",Wy,[m[20]||(m[20]=l("label",null,"上班时间",-1)),Pe(l("input",{type:"time",class:"input","onUpdate:modelValue":m[6]||(m[6]=C=>be.value=C)},null,512),[[Re,be.value]])]),l("div",Gy,[m[21]||(m[21]=l("label",null,"下班时间",-1)),Pe(l("input",{type:"time",class:"input","onUpdate:modelValue":m[7]||(m[7]=C=>Ae.value=C)},null,512),[[Re,Ae.value]])]),l("div",Yy,[m[22]||(m[22]=l("label",null,"上班地点",-1)),Pe(l("input",{class:"input",list:h.value,"onUpdate:modelValue":m[8]||(m[8]=C=>qe.value=C),placeholder:"可直接输入"},null,8,Jy),[[Re,qe.value]])]),l("div",Xy,[m[23]||(m[23]=l("label",null,"补卡原因",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=C=>He.value=C),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,He.value]])])]),Xe.value?($(),T("div",Qy,q(Xe.value),1)):ve("",!0),l("div",Zy,[l("button",{class:"btn btn-sm",onClick:m[10]||(m[10]=C=>Ee.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:me},"保存补卡")])])):ve("",!0),l("div",eg,[l("div",tg,[l("span",ng,"工作记录("+q(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:ft},[ke(ze,{name:"plus",size:14}),m[25]||(m[25]=gt(" 添加记录",-1))])]),!c.value.length&&!o.value?($(),T("div",sg,"暂无记录")):ve("",!0),($(!0),T(je,null,nt(c.value,C=>($(),T("div",{key:C.id,class:"item"},[l("div",og,[l("span",rg,q(sn(qo)(C.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:j=>Me(C)},q(C.content),9,ag),C.project_id?($(),T("span",ig,q(x(C.project_id)),1)):ve("",!0),C.minutes?($(),T("span",lg,q(C.minutes)+" 分钟",1)):ve("",!0),m[26]||(m[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:j=>Me(C)},[ke(ze,{name:"edit",size:14})],8,ug),l("button",{class:Je(["icon-btn",{active:C.is_milestone===1}]),title:"成果标记",onClick:j=>xt(C)},[ke(ze,{name:"star",size:14})],10,cg),l("button",{class:Je(["icon-btn",{"active-warn":C.needs_followup===1}]),title:"待跟进",onClick:j=>qt(C)},[ke(ze,{name:"flag",size:14})],10,dg),l("button",{class:"icon-btn",title:"删除",onClick:j=>bt.value=C},[ke(ze,{name:"close",size:14})],8,fg)]),C.takeaway||C.remark?($(),T("div",pg,[C.takeaway?($(),T("div",vg,"收获:"+q(C.takeaway),1)):ve("",!0),C.remark?($(),T("div",mg,"备注:"+q(C.remark),1)):ve("",!0)])):ve("",!0)]))),128)),c.value.length?($(),T("div",hg,[gt(" 共 "+q(c.value.length)+" 条事项 ",1),G.value?($(),T(je,{key:0},[gt(" · "+q((G.value/60).toFixed(1))+" 小时",1)],64)):ve("",!0)])):ve("",!0)]),ke(wn,{open:!!bt.value,title:"删除确认",message:bt.value?"将删除工作记录「"+bt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:m[11]||(m[11]=C=>bt.value=null),onConfirm:Le},null,8,["open","message"]),ke(wn,{open:E.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:m[12]||(m[12]=C=>E.value=!1),onConfirm:m[13]||(m[13]=C=>B(!0))},null,8,["open"]),ke(yy,{open:ae.value,item:re.value,projects:f.value,date:e.date,onCancel:m[14]||(m[14]=C=>ae.value=!1),onSave:Ct},null,8,["open","item","projects","date"])]))}}),Od=Kt(yg,[["__scopeId","data-v-81276f4c"]]),gg={class:"cal-page"},bg={class:"cal-toolbar"},wg={class:"cal-title num"},_g=["disabled"],kg={class:"card cal-card"},Cg={class:"cal-head"},xg={class:"cal-grid"},$g=["title","onClick"],Sg={class:"cal-marks"},Eg={key:0,class:"drawer"},Tg={class:"drawer-head"},Ag={class:"drawer-body"},Pg=Dt({__name:"CalendarView",setup(e){const t=P(it()),n=ot(()=>Number(t.value.slice(0,4))),o=ot(()=>Number(t.value.slice(5,7))-1),r=ot(()=>n.value+" 年 "+(o.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=ot(()=>{const E=(new Date(n.value,o.value,1).getDay()+6)%7,U=new Date(n.value,o.value+1,0).getDate(),Q=[];for(let B=0;B[O.date,O])),te=U[2],I=new Map;for(const O of c.value){if(!O.inMonth)continue;const Z=co(B.get(O.date),O.date,Q,O.date===v),Oe=te.filter(Ee=>Ee.date===O.date);I.set(O.date,{status:Z.status,label:Z.label,location:((S=B.get(O.date))==null?void 0:S.location)||"",hasLog:Oe.length>0,hasMilestone:Oe.some(Ee=>Ee.is_milestone===1)})}f.value=I}vt([n,o],b,{immediate:!0}),vt(uo,()=>{b()});function h(Y){var E;return((E=f.value.get(Y))==null?void 0:E.status)??""}function _(Y){const E=f.value.get(Y);return E?Y+" · "+E.label+(E.location?" · "+E.location:""):Y}function A(Y){var E;return!!((E=f.value.get(Y))!=null&&E.hasLog)}function x(Y){var E;return!!((E=f.value.get(Y))!=null&&E.hasMilestone)}function M(){t.value=ta(t.value,-1)}function G(){t.value=ta(t.value,1)}function oe(){t.value=it()}const le=P(null);function ce(Y,E){E&&(le.value=Y)}return vt(Fi,Y=>{Y&&(t.value=Y,le.value=Y,Fi.value=null)},{immediate:!0}),(Y,E)=>($(),T("div",gg,[l("div",bg,[l("button",{class:"icon-btn",title:"上一月",onClick:M},[ke(ze,{name:"chevron-left",size:16})]),l("span",wg,q(r.value),1),l("button",{class:"icon-btn",title:"下一月",onClick:G},[ke(ze,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",disabled:t.value===sn(v),onClick:oe},"回到本月",8,_g)]),l("div",kg,[l("div",Cg,[($(),T(je,null,nt(i,U=>l("span",{key:U,class:"cal-week"},q(U),1)),64))]),l("div",xg,[($(!0),T(je,null,nt(c.value,(U,Q)=>($(),T("button",{key:Q,class:Je(["cal-cell",{blank:!U.inMonth,weekend:U.weekend,selected:le.value===U.date,"is-today":U.date===sn(v)}]),title:U.inMonth?_(U.date):void 0,onClick:B=>ce(U.date,U.inMonth)},[U.inMonth?($(),T(je,{key:0},[l("span",{class:Je(["daynum num",{today:U.date===sn(v)}])},q(Number(U.date.slice(8,10))),3),l("span",Sg,[h(U.date)?($(),T("span",{key:0,class:Je(["dot",h(U.date)])},null,2)):ve("",!0),A(U.date)?($(),kt(ze,{key:1,name:"check-circle",size:12,class:"mark-log"})):ve("",!0),x(U.date)?($(),kt(ze,{key:2,name:"star",size:12,class:"mark-star"})):ve("",!0)])],64)):ve("",!0)],10,$g))),128))])]),ke(hs,{name:"drawer"},{default:Rn(()=>[le.value?($(),T("aside",Eg,[l("div",Tg,[E[1]||(E[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:E[0]||(E[0]=U=>le.value=null)},[ke(ze,{name:"close",size:16})])]),l("div",Ag,[ke(Od,{date:le.value},null,8,["date"])])])):ve("",!0)]),_:1})]))}}),Og=Kt(Pg,[["__scopeId","data-v-abd71a5b"]]),Mg="modulepreload",Ig=function(e,t){return new URL(e,t).href},Nu={},Md=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]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));r=Promise.allSettled(n.map(b=>{if(b=Ig(b,o),b in Nu)return;Nu[b]=!0;const h=b.endsWith(".css"),_=h?'[rel="stylesheet"]':"";if(!!o)for(let M=c.length-1;M>=0;M--){const G=c[M];if(G.href===b&&(!h||G.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const x=document.createElement("link");if(x.rel=h?"stylesheet":Mg,h||(x.as="script"),x.crossOrigin="",x.href=b,v&&x.setAttribute("nonce",v),document.head.appendChild(x),h)return new Promise((M,G)=>{x.addEventListener("load",M),x.addEventListener("error",()=>G(new Error(`Unable to preload CSS for ${b}`)))})}))}function i(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"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const jg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},o=(i,c)=>{n.platforms.set(i,c)},r=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=o,n.setPlatform=r,n},Dg=e=>e.CapacitorPlatforms=jg(e),Id=Dg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Id.addPlatform;Id.setPlatform;var io;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(io||(io={}));class bi extends Error{constructor(t,n,o){super(t),this.message=t,this.code=n,this.data=o}}const Lg=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"},Kg=e=>{var t,n,o,r,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,h=()=>c!==null?c.name:Lg(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||h,A=()=>_()!=="web",x=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||A,M=B=>{const te=E.get(B);return!!(te!=null&&te.platforms.has(_())||le(B))},G=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||M,oe=B=>{var te;return(te=f.PluginHeaders)===null||te===void 0?void 0:te.find(I=>I.name===B)},le=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.getPluginHeader)||oe,ce=B=>e.console.error(B),Y=(B,te,I)=>Promise.reject(`${I} does not have an implementation of "${te}".`),E=new Map,U=(B,te={})=>{const I=E.get(B);if(I)return console.warn(`Capacitor plugin "${B}" already registered. Cannot register plugins twice.`),I.proxy;const S=_(),O=le(B);let Z;const Oe=async()=>(!Z&&S in te?Z=typeof te[S]=="function"?Z=await te[S]():Z=te[S]:c!==null&&!Z&&"web"in te&&(Z=typeof te.web=="function"?Z=await te.web():Z=te.web),Z),Ee=(pe,me)=>{var re,ae;if(O){const Me=O==null?void 0:O.methods.find(ft=>me===ft.name);if(Me)return Me.rtype==="promise"?ft=>f.nativePromise(B,me.toString(),ft):(ft,Ct)=>f.nativeCallback(B,me.toString(),ft,Ct);if(pe)return(re=pe[me])===null||re===void 0?void 0:re.bind(pe)}else{if(pe)return(ae=pe[me])===null||ae===void 0?void 0:ae.bind(pe);throw new bi(`"${B}" plugin is not implemented on ${S}`,io.Unimplemented)}},be=pe=>{let me;const re=(...ae)=>{const Me=Oe().then(ft=>{const Ct=Ee(ft,pe);if(Ct){const xt=Ct(...ae);return me=xt==null?void 0:xt.remove,xt}else throw new bi(`"${B}.${pe}()" is not implemented on ${S}`,io.Unimplemented)});return pe==="addListener"&&(Me.remove=async()=>me()),Me};return re.toString=()=>`${pe.toString()}() { [capacitor code] }`,Object.defineProperty(re,"name",{value:pe,writable:!1,configurable:!1}),re},Ae=be("addListener"),He=be("removeListener"),qe=(pe,me)=>{const re=Ae({eventName:pe},me),ae=async()=>{const ft=await re;He({eventName:pe,callbackId:ft},me)},Me=new Promise(ft=>re.then(()=>ft({remove:ae})));return Me.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await ae()},Me},Xe=new Proxy({},{get(pe,me){switch(me){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return O?qe:Ae;case"removeListener":return He;default:return be(me)}}});return v[B]=Xe,E.set(B,{name:B,proxy:Xe,platforms:new Set([...Object.keys(te),...O?[S]:[]])}),Xe},Q=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||U;return f.convertFileSrc||(f.convertFileSrc=B=>B),f.getPlatform=_,f.handleError=ce,f.isNativePlatform=x,f.isPluginAvailable=G,f.pluginMethodNoop=Y,f.registerPlugin=Q,f.Exception=bi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Rg=e=>e.Capacitor=Kg(e),lo=Rg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),jd=lo.registerPlugin;lo.Plugins;class Dd{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 i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),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 i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}r.forEach(i=>i(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 Vu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Bu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Fg extends Dd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(o=>{if(o.length<=0)return;let[r,i]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=Bu(r).trim(),i=Bu(i).trim(),n[r]=i}),n}async setCookie(t){try{const n=Vu(t.key),o=Vu(t.value),r=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${o||""}${r}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}jd("CapacitorCookies",{web:()=>new Fg});const Ng=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)}),Vg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(r=>r.toLocaleLowerCase()).reduce((r,i,c)=>(r[i]=e[t[c]],r),{})},Bg=(e,t=!0)=>e?Object.entries(e).reduce((o,r)=>{const[i,c]=r;let f,v;return Array.isArray(c)?(v="",c.forEach(b=>{f=t?encodeURIComponent(b):b,v+=`${i}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${i}=${f}`),`${o}&${v}`},"").substr(1):null,Ug=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=Vg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(r.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class qg extends Dd{async request(t){const n=Ug(t,t.webFetchExtra),o=Bg(t.params,t.shouldEncodeUrlParams),r=o?`${t.url}?${o}`:t.url,i=await fetch(r,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Ng(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const h={};return i.headers.forEach((_,A)=>{h[A]=_}),{data:v,headers:h,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}jd("CapacitorHttp",{web:()=>new qg});async function Sa(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:v}=await Md(async()=>{const{Filesystem:b,Directory:h,Encoding:_}=await import("./index-CrEWT5E8.js");return{Filesystem:b,Directory:h,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:v.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:v.UTF8,recursive:!0})).uri}}const o=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(o),i=document.createElement("a");return i.href=r,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e4),""}const Hg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Sa},Symbol.toStringTag,{value:"Module"})),zg={class:"detail-page"},Wg={class:"card toolbar"},Gg={class:"nav-row"},Yg=["value"],Jg=["disabled"],Xg={class:"exp-row"},Qg={class:"seg"},Zg=["disabled"],eb=Dt({__name:"TodayView",setup(e){const t=P(it()),n=ot(()=>t.value===it());function o(){t.value=Ut(t.value,-1)}function r(){t.value=Ut(t.value,1)}function i(){t.value=it()}const c=P("day"),f=P(it()),v=P(it()),b=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:Ut(x,6),label:x+"_"+Ut(x,6)}}if(c.value==="month"){const x=f.value.slice(0,4),M=f.value.slice(5,7),G=new Date(Number(x),Number(M),0).getDate();return{start:x+"-"+M+"-01",end:x+"-"+M+"-"+G,label:x+"-"+M}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:x,end:M,label:G}=h(),[oe,le,ce,Y]=await Promise.all([vs(),Xo(x,M),Qo(x,M),ao(!0)]),E=new Map(Y.map(I=>[I.id,I.name])),U=["# 工作详情 "+G,""],Q=["周日","周一","周二","周三","周四","周五","周六"];let B=x,te=0;for(;B<=M&&te<400;){const I=ce.filter(O=>O.date===B),S=le.find(O=>O.date===B);if(S||I.length){if(U.push("## "+B+" "+Q[new Date(B+"T00:00:00").getDay()],""),S&&(S.clock_in_at||S.kind==="makeup")){const O=co(S,B,oe,B===it()),Z=[_n(S.clock_in_at),"–",_n(S.clock_out_at),"·",O.label];S.location&&Z.push("· 地点:"+S.location),U.push("考勤:"+Z.join(" "),"")}for(const O of I){const Z=O.project_id&&E.get(O.project_id)||"",Oe="- 【"+qo(O.category)+"】"+O.content+(O.minutes?"("+O.minutes+" 分钟)":"")+(Z?" @"+Z:"");U.push(Oe),O.takeaway&&U.push(" - 收获:"+O.takeaway),O.needs_followup===1&&O.remark?U.push(" - 待跟进:"+O.remark):O.remark&&U.push(" - 备注:"+O.remark)}U.push("")}B=Ut(B,1),te++}await Sa("工作详情_"+G+".md",U.join(` +`)),Ve("已导出 Markdown")}finally{b.value=!1}}}function A(x){const M=x.target.value;M&&(t.value=M)}return vt(t,x=>{f.value=x,c.value==="custom"&&(v.value=x)}),(x,M)=>($(),T("div",zg,[l("div",Wg,[l("div",Gg,[l("button",{class:"icon-btn",title:"前一天",onClick:o},[ke(ze,{name:"chevron-left",size:16})]),l("span",{class:Je(["date-title num",{"is-today":n.value}])},q(sn(ud)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:r},[ke(ze,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:A},null,40,Yg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Jg)]),M[7]||(M[7]=l("div",{class:"tool-sep"},null,-1)),l("div",Xg,[M[6]||(M[6]=l("span",{class:"muted exp-label"},"导出",-1)),l("div",Qg,[l("button",{class:Je(["seg-btn",{active:c.value==="day"}]),onClick:M[0]||(M[0]=G=>c.value="day")},"指定日",2),l("button",{class:Je(["seg-btn",{active:c.value==="week"}]),onClick:M[1]||(M[1]=G=>c.value="week")},"当周",2),l("button",{class:Je(["seg-btn",{active:c.value==="month"}]),onClick:M[2]||(M[2]=G=>c.value="month")},"当月",2),l("button",{class:Je(["seg-btn",{active:c.value==="custom"}]),onClick:M[3]||(M[3]=G=>c.value="custom")},"自定义",2)]),c.value!=="day"?Pe(($(),T("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":M[4]||(M[4]=G=>f.value=G)},null,512)),[[Re,f.value]]):ve("",!0),c.value==="custom"?Pe(($(),T("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":M[5]||(M[5]=G=>v.value=G)},null,512)),[[Re,v.value]]):ve("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,Zg)])]),ke(Od,{date:t.value},null,8,["date"])]))}}),tb=Kt(eb,[["__scopeId","data-v-2bb84c76"]]),nb={class:"plan-page"},sb={class:"blk-head"},ob={key:0,class:"card empty muted"},rb={class:"goal-main"},ab={class:"goal-line"},ib={class:"tag"},lb={class:"goal-name"},ub={class:"muted num goal-range"},cb={class:"goal-bar"},db={class:"muted num goal-meta"},fb={class:"goal-ops"},pb=["onClick"],vb=["onClick"],mb={class:"blk-head day-head"},hb={class:"blk-head-text"},yb={class:"muted blk-sub num"},gb={class:"day-ops"},bb={class:"card list-card"},wb={key:0,class:"empty muted"},_b={class:"pi-time num"},kb={class:"muted"},Cb={class:"pi-main"},xb={class:"pi-title"},$b={class:"tag"},Sb={key:0,class:"tag tag-goal"},Eb={key:1,class:"state-done"},Tb={key:2,class:"state-skip"},Ab={key:0,class:"muted pi-note"},Pb={class:"muted pi-meta num"},Ob={key:0,class:"timer-live"},Mb={class:"pi-ops"},Ib=["onClick"],jb=["onClick"],Db=["onClick"],Lb=["onClick"],Kb=["onClick"],Rb=["onClick"],Fb={class:"dialog",role:"dialog","aria-label":"计划"},Nb={class:"dialog-head"},Vb={class:"dialog-title"},Bb={class:"dialog-body"},Ub={class:"form-row"},qb={class:"form-row"},Hb=["value"],zb={class:"form-row two"},Wb={class:"form-row"},Gb={key:0,class:"form-error"},Yb={class:"dialog-btns"},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=Dt({__name:"PlanView",setup(e){const t=P([]),n=P({}),o=P(!1),r=P(null),i=P(""),c=P("学习"),f=P(it()),v=P(Ut(it(),6)),b=P(""),h=P(""),_=P(null);function A(){r.value=null,i.value="",c.value="学习",f.value=it(),v.value=Ut(it(),6),b.value="",h.value="",o.value=!0}function x(m){r.value=m,i.value=m.title,c.value=m.kind,f.value=m.start_date,v.value=m.end_date,b.value=m.note||"",h.value="",o.value=!0}async function M(){if(!i.value.trim()){h.value="请填写计划名称";return}if(v.valueoe.value===it());async function Q(){ce.value=!0;const[m,C,j]=await Promise.all([bh(oe.value),Ah(),Th()]);le.value=m,t.value=C;const se={};for(const W of j)se[String(W.goalId)]={done:W.done,total:W.total};n.value=se,ce.value=!1}vt(oe,Q),vt(uo,Q),ln(()=>{Q(),E=window.setInterval(()=>{Y.value=Date.now()},3e4)}),Cn(()=>{E&&window.clearInterval(E)});function B(){oe.value=Ut(oe.value,-1)}function te(){oe.value=Ut(oe.value,1)}function I(){oe.value=it()}const S=ot(()=>{const m=le.value.length,C=le.value.filter(_e=>_e.status==="done").length,j=le.value.reduce((_e,xe)=>_e+O(xe),0),se=le.value.reduce((_e,xe)=>_e+(xe.actual_minutes||0),0);let W=0;const we=Oe.value;if(we){const _e=le.value.find(xe=>xe.id===we);_e&&(W=Ee(_e))}return{total:m,done:C,plannedMin:j,actualMin:se+W}});function O(m){const[C,j]=m.start_time.split(":").map(Number),[se,W]=m.end_time.split(":").map(Number);return Math.max(0,se*60+W-(C*60+j))}function Z(m){return m<60?m+" 分钟":Math.floor(m/60)+" 小时 "+m%60+" 分"}const Oe=ot(()=>{const m=le.value.find(C=>!!C.timer_started_at);return m?m.id:null});function Ee(m){if(!m.timer_started_at)return m.actual_minutes||0;const C=Math.max(0,Math.round((Y.value-new Date(m.timer_started_at).getTime())/6e4));return(m.actual_minutes||0)+C}async function be(m){m.timer_started_at?(await $a(m.id),Ve("已停止计时:"+m.title)):(await $h(m.id),Ve("开始计时:"+m.title)),Rm(),await Q()}async function Ae(m,C){await xh(m.id,C),await Q()}const He=P(!1),qe=P(null),Xe=P(""),pe=P("学习"),me=P("09:00"),re=P("10:00"),ae=P(""),Me=P(""),ft=["学习","健身","自律","工作","阅读","其他"];function Ct(){qe.value=null,Xe.value="",pe.value="学习",me.value="09:00",re.value="10:00",ae.value="",Me.value="",He.value=!0}function xt(m){qe.value=m.id,Xe.value=m.title,pe.value=m.kind,me.value=m.start_time,re.value=m.end_time,ae.value=m.note||"",Me.value="",He.value=!0}async function qt(){if(!Xe.value.trim()){Me.value="请填写计划内容";return}if(re.value<=me.value){Me.value="结束时间需晚于开始时间";return}qe.value?(await kh(qe.value,{title:Xe.value.trim(),kind:pe.value,start_time:me.value,end_time:re.value,note:ae.value}),Ve("计划已更新")):(await _h({date:oe.value,start_time:me.value,end_time:re.value,title:Xe.value,kind:pe.value,note:ae.value}),Ve("计划已添加")),He.value=!1,await Q()}async function bt(m){await Ch(m.id),Ve("已删除"),await Q()}const Le=["周日","周一","周二","周三","周四","周五","周六"];function g(m){return Le[Fs(m).getDay()]}return(m,C)=>($(),T("div",nb,[l("div",sb,[C[18]||(C[18]=l("div",{class:"blk-head-text"},[l("div",{class:"blk-title"},"长期计划"),l("div",{class:"muted blk-sub"},"跨越多天的目标,自动落实到每一天")],-1)),l("button",{class:"btn btn-sm",onClick:A},[ke(ze,{name:"plus",size:14}),C[17]||(C[17]=gt(" 新建长期计划",-1))])]),t.value.length?ve("",!0):($(),T("div",ob," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),T(je,null,nt(t.value,j=>($(),T("div",{key:j.id,class:"card goal-card"},[l("div",rb,[l("div",ab,[l("span",ib,q(j.kind),1),l("span",lb,q(j.title),1),l("span",ub,q(j.start_date.slice(5))+" ~ "+q(j.end_date.slice(5)),1)]),l("div",cb,[l("span",{class:"goal-bar-fill",style:zn({width:(n.value[String(j.id)]?Math.round(n.value[String(j.id)].done/Math.max(1,n.value[String(j.id)].total)*100):0)+"%",background:n.value[String(j.id)]&&n.value[String(j.id)].done>=n.value[String(j.id)].total&&n.value[String(j.id)].total>0?"var(--ok)":"var(--accent)"})},null,4)]),l("div",db,[gt(q(n.value[String(j.id)]?n.value[String(j.id)].done+"/"+n.value[String(j.id)].total+" 天已完成":"0/"+(n.value[String(j.id)]?n.value[String(j.id)].total:0)+" 天")+" ",1),j.note?($(),T(je,{key:0},[gt(" · "+q(j.note),1)],64)):ve("",!0)])]),l("div",fb,[l("button",{class:"icon-btn",title:"编辑",onClick:se=>x(j)},[ke(ze,{name:"edit",size:14})],8,pb),l("button",{class:"icon-btn",title:"删除",onClick:se=>_.value=j},[ke(ze,{name:"close",size:14})],8,vb)])]))),128)),l("div",mb,[l("div",hb,[C[21]||(C[21]=l("div",{class:"blk-title"},"每日安排",-1)),l("div",yb,[gt(" 共 "+q(S.value.total)+" 项 · 完成 "+q(S.value.done)+" 项 · 计划 "+q(Z(S.value.plannedMin))+" · 实际投入 "+q(Z(S.value.actualMin))+" ",1),Oe.value?($(),T(je,{key:0},[C[19]||(C[19]=gt(" · ",-1)),C[20]||(C[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):ve("",!0)])]),l("div",gb,[l("button",{class:"icon-btn",title:"前一天",onClick:B},[ke(ze,{name:"chevron-left",size:16})]),l("span",{class:Je(["date-chip num",{today:U.value}])},q(oe.value.slice(5))+" "+q(g(oe.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:te},[ke(ze,{name:"chevron-right",size:16})]),l("button",{class:Je(["btn btn-sm",{"btn-primary":!U.value}]),onClick:I},"今天",2),l("button",{class:"btn btn-primary btn-sm",onClick:Ct},[ke(ze,{name:"plus",size:14}),C[22]||(C[22]=gt(" 添加计划",-1))])])]),l("div",bb,[!ce.value&&!le.value.length?($(),T("div",wb,"今天还没有计划,点「添加计划」开始规划。")):ve("",!0),($(!0),T(je,null,nt(le.value,j=>($(),T("div",{key:j.id,class:Je(["plan-item",{done:j.status==="done",skip:j.status==="skip",running:!!j.timer_started_at}])},[l("div",_b,[gt(q(j.start_time),1),l("span",kb," - "+q(j.end_time),1)]),l("div",Cb,[l("div",xb,[l("span",$b,q(j.kind),1),j.goal_id?($(),T("span",Sb,"长期")):ve("",!0),l("span",{class:Je(["pi-text",{strike:j.status==="done"}])},q(j.title),3),j.status==="done"?($(),T("span",Eb,"已完成")):j.status==="skip"?($(),T("span",Tb,"已跳过")):ve("",!0)]),j.note?($(),T("div",Ab,q(j.note),1)):ve("",!0),l("div",Pb,[j.timer_started_at?($(),T("span",Ob,"计时中 · 已 "+q(Ee(j))+" 分钟",1)):j.actual_minutes>0?($(),T(je,{key:1},[gt("实际投入 "+q(j.actual_minutes)+" 分钟",1)],64)):ve("",!0)])]),l("div",Mb,[j.status!=="done"?($(),T("button",{key:0,class:Je(["btn btn-xs",{"timer-on":!!j.timer_started_at}]),onClick:se=>be(j)},q(j.timer_started_at?"停止计时":"计时"),11,Ib)):ve("",!0),j.status!=="done"?($(),T("button",{key:1,class:"btn btn-xs",onClick:se=>Ae(j,"done")},"完成",8,jb)):ve("",!0),j.status==="todo"?($(),T("button",{key:2,class:"btn btn-xs",onClick:se=>Ae(j,"skip")},"跳过",8,Db)):ve("",!0),j.status!=="todo"?($(),T("button",{key:3,class:"btn btn-xs",onClick:se=>Ae(j,"todo")},"恢复",8,Lb)):ve("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:se=>xt(j)},[ke(ze,{name:"edit",size:14})],8,Kb),l("button",{class:"icon-btn",title:"删除",onClick:se=>bt(j)},[ke(ze,{name:"close",size:14})],8,Rb)])],2))),128))]),($(),kt(Kn,{to:"body"},[He.value?($(),T("div",{key:0,class:"mask",onClick:C[7]||(C[7]=Nt(j=>He.value=!1,["self"]))},[l("div",Fb,[l("div",Nb,[l("span",Vb,q(qe.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:C[0]||(C[0]=j=>He.value=!1)},[ke(ze,{name:"close",size:16})])]),l("div",Bb,[l("div",Ub,[C[23]||(C[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":C[1]||(C[1]=j=>Xe.value=j),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Ot(qt,["enter"])},null,544),[[Re,Xe.value]])]),l("div",qb,[C[24]||(C[24]=l("label",null,"类别",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":C[2]||(C[2]=j=>pe.value=j)},[($(),T(je,null,nt(ft,j=>l("option",{key:j,value:j},q(j),9,Hb)),64))],512),[[Wn,pe.value]])]),l("div",zb,[l("div",null,[C[25]||(C[25]=l("label",null,"开始时间",-1)),Pe(l("input",{class:"input",type:"time","onUpdate:modelValue":C[3]||(C[3]=j=>me.value=j)},null,512),[[Re,me.value]])]),l("div",null,[C[26]||(C[26]=l("label",null,"结束时间",-1)),Pe(l("input",{class:"input",type:"time","onUpdate:modelValue":C[4]||(C[4]=j=>re.value=j)},null,512),[[Re,re.value]])])]),l("div",Wb,[C[27]||(C[27]=l("label",null,"备注(选填)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":C[5]||(C[5]=j=>ae.value=j),placeholder:"目标、资料、提醒等",onKeydown:Ot(qt,["enter"])},null,544),[[Re,ae.value]])]),Me.value?($(),T("div",Gb,q(Me.value),1)):ve("",!0)]),l("div",Yb,[l("button",{class:"btn btn-sm",onClick:C[6]||(C[6]=j=>He.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:qt},q(qe.value?"保存":"添加"),1)])])])):ve("",!0)])),($(),kt(Kn,{to:"body"},[o.value?($(),T("div",{key:0,class:"mask",onClick:C[15]||(C[15]=Nt(j=>o.value=!1,["self"]))},[l("div",Jb,[l("div",Xb,[l("span",Qb,q(r.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:C[8]||(C[8]=j=>o.value=!1)},[ke(ze,{name:"close",size:16})])]),l("div",Zb,[l("div",ew,[C[28]||(C[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":C[9]||(C[9]=j=>i.value=j),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Re,i.value]])]),l("div",tw,[C[29]||(C[29]=l("label",null,"类别",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":C[10]||(C[10]=j=>c.value=j)},[($(),T(je,null,nt(ft,j=>l("option",{key:j,value:j},q(j),9,nw)),64))],512),[[Wn,c.value]])]),l("div",sw,[l("div",null,[C[30]||(C[30]=l("label",null,"开始日期",-1)),Pe(l("input",{class:"input",type:"date","onUpdate:modelValue":C[11]||(C[11]=j=>f.value=j)},null,512),[[Re,f.value]])]),l("div",null,[C[31]||(C[31]=l("label",null,"结束日期",-1)),Pe(l("input",{class:"input",type:"date","onUpdate:modelValue":C[12]||(C[12]=j=>v.value=j)},null,512),[[Re,v.value]])])]),l("div",ow,[C[32]||(C[32]=l("label",null,"备注(选填)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":C[13]||(C[13]=j=>b.value=j)},null,512),[[Re,b.value]])]),h.value?($(),T("div",rw,q(h.value),1)):ve("",!0),C[33]||(C[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",aw,[l("button",{class:"btn btn-sm",onClick:C[14]||(C[14]=j=>o.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:M},q(r.value?"保存":"创建"),1)])])])):ve("",!0)])),ke(wn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:C[16]||(C[16]=j=>_.value=null),onConfirm:G},null,8,["open","message"])]))}}),lw=Kt(iw,[["__scopeId","data-v-ffd19b28"]]),uw={class:"stats"},cw={class:"cards"},dw={class:"card stat-card"},fw={class:"stat-num num"},pw={class:"card stat-card"},vw={class:"stat-num num"},mw={class:"card stat-card"},hw={class:"stat-num num"},yw={class:"card stat-card"},gw={class:"stat-num num"},bw={class:"card section"},ww={class:"heat"},_w=["title"],kw={class:"two-col"},Cw={class:"card section"},xw={class:"bar-label"},$w={class:"bar-track"},Sw={class:"muted num bar-num"},Ew={key:0,class:"muted"},Tw={class:"card section"},Aw={class:"bar-label"},Pw={class:"bar-track"},Ow={class:"muted num bar-num"},Mw={key:0,class:"muted"},Iw={class:"card section"},jw={class:"bar-label loc-label"},Dw={class:"bar-track"},Lw={class:"muted num bar-num"},Kw={key:0,class:"muted"},Rw=Dt({__name:"StatsView",setup(e){const t=P({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=P([]),o=P([]),r=P([]),i=P([]);async function c(){const b=it(),h="2000-01-01",_=await Promise.all([vs(),Xo(h,b),Qo(h,b),ao(!0)]),A=_[0],x=_[1],M=_[2],G=_[3],oe=x.filter(be=>be.clock_in_at||be.kind==="makeup");let le=0;for(const be of oe){const Ae=co(be,be.date,A,be.date===b);le+=Ae.workedMinutes??0}const ce=new Set(M.map(be=>be.date));let Y=0,E=b;for(ce.has(E)||(E=Ut(b,-1));ce.has(E);)Y++,E=Ut(E,-1);t.value={attendDays:oe.length,totalHours:(le/60).toFixed(1),itemCount:M.length,streak:Y};const U=new Map;for(const be of oe){const Ae=be.location||"未记录";U.set(Ae,(U.get(Ae)||0)+1)}i.value=Array.from(U.entries()).map(be=>({name:be[0],count:be[1],percent:Math.round(be[1]/(oe.length||1)*100)})).sort((be,Ae)=>Ae.count-be.count);const Q=M.length||1,B=await Zo(),te=new Map;for(const be of M)te.set(be.category,(te.get(be.category)||0)+1);const I=new Set(B);for(const be of te.keys())I.has(be)||B.push(be);o.value=B.map(be=>{const Ae=te.get(be)||0;return{key:be,label:be,count:Ae,percent:Math.round(Ae/Q*100)}}).filter(be=>be.count>0).sort((be,Ae)=>Ae.count-be.count);const S=new Map(G.map(be=>[be.id,be.name])),O=new Map;for(const be of M){const Ae=be.project_id?S.get(be.project_id)||"已删除项目":"无项目";O.set(Ae,(O.get(Ae)||0)+1)}r.value=Array.from(O.entries()).map(be=>({name:be[0],count:be[1],percent:Math.round(be[1]/Q*100)})).sort((be,Ae)=>Ae.count-be.count);const Z=new Map;for(const be of M)Z.set(be.date,(Z.get(be.date)||0)+1);const Oe=Zs(b),Ee=[];for(let be=11;be>=0;be--){const Ae=Ut(Oe,-7*be),He=[];for(let qe=0;qe<7;qe++){const Xe=Ut(Ae,qe);He.push({date:Xe,count:Z.get(Xe)||0})}Ee.push(He)}n.value=Ee}ln(async()=>{await c()}),vt(uo,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,h){return b+" · "+(h?h+" 条":"无记录")}return(b,h)=>($(),T("div",uw,[l("div",cw,[l("div",dw,[h[0]||(h[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",fw,q(t.value.attendDays),1)]),l("div",pw,[h[1]||(h[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",vw,q(t.value.totalHours),1)]),l("div",mw,[h[2]||(h[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",hw,q(t.value.itemCount),1)]),l("div",yw,[h[3]||(h[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",gw,q(t.value.streak),1)])]),l("div",bw,[h[4]||(h[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",ww,[($(!0),T(je,null,nt(n.value,(_,A)=>($(),T("div",{key:A,class:"heat-col"},[($(!0),T(je,null,nt(_,x=>($(),T("span",{key:x.date,class:Je(["heat-cell","lv"+f(x.count)]),title:v(x.date,x.count)},null,10,_w))),128))]))),128))]),h[5]||(h[5]=zp('
少多
',1))]),l("div",kw,[l("div",Cw,[h[6]||(h[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),T(je,null,nt(o.value,_=>($(),T("div",{key:_.key,class:"bar-row"},[l("span",xw,q(_.label),1),l("span",$w,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Sw,q(_.count)+" 条 · "+q(_.percent)+"%",1)]))),128)),o.value.length?ve("",!0):($(),T("div",Ew,"暂无数据"))]),l("div",Tw,[h[7]||(h[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),T(je,null,nt(r.value,_=>($(),T("div",{key:_.name,class:"bar-row"},[l("span",Aw,q(_.name),1),l("span",Pw,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Ow,q(_.count)+" 条 · "+q(_.percent)+"%",1)]))),128)),r.value.length?ve("",!0):($(),T("div",Mw,"暂无数据"))])]),l("div",Iw,[h[8]||(h[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),T(je,null,nt(i.value,_=>($(),T("div",{key:_.name,class:"bar-row"},[l("span",jw,q(_.name),1),l("span",Dw,[l("span",{class:"bar-fill",style:zn({width:_.percent+"%"})},null,4)]),l("span",Lw,q(_.count)+" 天 · "+q(_.percent)+"%",1)]))),128)),i.value.length?ve("",!0):($(),T("div",Kw,"暂无数据"))])]))}}),Fw=Kt(Rw,[["__scopeId","data-v-5469ae68"]]);async function Nw(e,t,n){const o=it(),r=await Promise.all([vs(),Xo(e,t),Qo(e,t),ao(!0),gh(e,t),Zo()]),i=r[0],c=r[1],f=r[2],v=r[3],b=r[4],h=r[5];let _=0,A=0,x=0;for(const O of c){(O.clock_in_at||O.kind==="makeup")&&_++,O.kind==="makeup"&&x++;const Z=co(O,O.date,i,O.date===o);A+=Z.workedMinutes??0}const M=new Map;for(const O of c){if(!(O.clock_in_at||O.kind==="makeup"))continue;const Z=O.location||"未记录";M.set(Z,(M.get(Z)||0)+1)}const G=Array.from(M.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,Z)=>Z.count-O.count),oe=f.length||1,le=new Map;for(const O of f)le.set(O.category,(le.get(O.category)||0)+1);const ce=new Set(h);for(const O of le.keys())ce.has(O)||h.push(O);const Y=h.map(O=>{const Z=le.get(O)||0;return{key:O,label:O,count:Z,percent:Math.round(Z/oe*100)}}).filter(O=>O.count>0).sort((O,Z)=>Z.count-O.count),E=new Map(v.map(O=>[O.id,O.name])),U=new Map;for(const O of f){const Z=O.project_id?E.get(O.project_id)||"已删除项目":"无项目";U.set(Z,(U.get(Z)||0)+1)}const Q=Array.from(U.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,Z)=>Z.count-O.count),B=f.filter(O=>O.is_milestone===1).map(O=>({date:O.date,content:O.content})),te=f.filter(O=>O.needs_followup===1).map(O=>({date:O.date,content:O.content,remark:O.remark||""})),I=f.filter(O=>!!O.takeaway).map(O=>({date:O.date,text:O.takeaway})),S=b.map(O=>({weekStart:O.week_start,highlights:O.highlights||"",challenges:O.challenges||"",plan_next:O.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(A/60).toFixed(1),makeupCount:x,leaveCount:c.filter(O=>O.kind==="leave").length,itemCount:f.length,categoryStats:Y,projectStats:Q,locationStats:G,milestones:B,followups:te,takeaways:I,weekNotes:S}}function Vw(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 Wi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Bw(e){const t=await Promise.all([St("ai_base_url",""),St("ai_api_key",""),St("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),o=t[1].trim(),r=t[2].trim();if(!n||!r)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};o&&(c.Authorization="Bearer "+o);const v=JSON.stringify({model:r,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let A="接口返回 "+b.status;try{const x=await b.json();x&&x.error&&x.error.message&&(A+=":"+x.error.message)}catch{}throw new Error(A)}const h=await b.json(),_=h&&h.choices&&h.choices[0]&&h.choices[0].message&&h.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Uw={class:"report"},qw={class:"report-toolbar"},Hw={class:"seg"},zw=["onClick"],Ww=["disabled"],Gw=["disabled"],Yw={key:0,class:"ai-error"},Jw={class:"report-grid"},Xw={class:"report-left"},Qw={class:"card section"},Zw={class:"section-title"},e_={class:"muted note-saved"},t_={class:"card section"},n_={class:"report-right"},s_={key:0,class:"card section"},o_={class:"sum-row"},r_={class:"num"},a_={class:"sum-row"},i_={class:"num"},l_={class:"sum-row"},u_={class:"num"},c_={class:"sum-row"},d_={class:"num"},f_={class:"sum-row"},p_={class:"num"},v_={class:"muted"},m_={class:"num"},h_={key:0,class:"muted sum-empty"},y_={class:"muted"},g_={key:1,class:"muted sum-empty"},b_={class:"muted"},w_={key:2,class:"muted sum-empty"},__={class:"muted"},k_={key:3,class:"muted sum-empty"},C_=Dt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=P("week"),o=P(Zs(it())),r=P(it()),i=P(null),c=P(""),f=P(!1),v=P(!1),b=P(null),h=P(""),_=P(Zs(it())),A=P(""),x=P(""),M=P(""),G=P(!1);async function oe(){const te=await yl(_.value);A.value=(te==null?void 0:te.highlights)||"",x.value=(te==null?void 0:te.challenges)||"",M.value=(te==null?void 0:te.plan_next)||"",G.value=!1}async function le(){await yh(_.value,{highlights:A.value.trim()||null,challenges:x.value.trim()||null,plan_next:M.value.trim()||null}),G.value=!0,await Y()}function ce(te){const I=it();if(te==="week"){const S=Zs(I);return{start:S,end:Ut(S,6),label:"本周"}}if(te==="month"){const S=I.slice(0,7);return{start:S+"-01",end:I,label:S+" 本月"}}return te==="all"?{start:"2000-01-01",end:I,label:"全部实习期"}:{start:o.value,end:r.value,label:o.value+" ~ "+r.value}}async function Y(){f.value=!0;const te=ce(n.value),I=await Nw(te.start,te.end,te.label);i.value=I,c.value=Vw(I),f.value=!1}vt(n,Y),vt([o,r],()=>{n.value==="custom"&&Y()}),ln(async()=>{await oe(),await Y()});async function E(){const te=it().replace(/-/g,""),I=await Sa("实习工作总结_"+te+".md",c.value);Ve(I?"总结已导出到:"+I:"总结已导出到系统下载目录")}async function U(){await Wi(c.value),Ve("总结已复制到剪贴板")}async function Q(){if(v.value)return;h.value="";const te=c.value.trim();if(!te){h.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await Bw(te),Ve("AI 润色完成")}catch(I){b.value=null,h.value=I instanceof Error?I.message:"润色失败"}v.value=!1}function B(){b.value!==null&&(c.value=b.value),b.value=null}return(te,I)=>($(),T("div",Uw,[l("div",qw,[l("div",Hw,[($(),T(je,null,nt(t,S=>l("button",{key:S.key,class:Je(["seg-btn",{active:n.value===S.key}]),onClick:O=>n.value=S.key},q(S.label),11,zw)),64))]),n.value==="custom"?($(),T(je,{key:0},[Pe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[0]||(I[0]=S=>o.value=S)},null,512),[[Re,o.value]]),I[6]||(I[6]=l("span",{class:"muted"},"至",-1)),Pe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[1]||(I[1]=S=>r.value=S)},null,512),[[Re,r.value]])],64)):ve("",!0),I[10]||(I[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Q},[ke(ze,{name:"edit",size:14}),I[7]||(I[7]=gt("AI 润色 ",-1))],8,Ww),b.value!==null?($(),T("button",{key:1,class:"btn btn-sm",onClick:B},"还原润色前")):ve("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:Y},[ke(ze,{name:"edit",size:14}),I[8]||(I[8]=gt("重新生成 ",-1))],8,Gw),l("button",{class:"btn btn-sm",onClick:U},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:E},[ke(ze,{name:"export",size:14}),I[9]||(I[9]=gt("导出 Markdown ",-1))])]),h.value?($(),T("div",Yw,q(h.value),1)):ve("",!0),l("div",Jw,[l("div",Xw,[l("div",Qw,[l("div",Zw,"本周周记("+q(_.value)+" 起)",1),I[11]||(I[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":I[2]||(I[2]=S=>A.value=S),placeholder:"本周最有价值的一件事",onBlur:le},null,544),[[Re,A.value]]),I[12]||(I[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":I[3]||(I[3]=S=>x.value=S),placeholder:"遇到的问题与教训",onBlur:le},null,544),[[Re,x.value]]),I[13]||(I[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=S=>M.value=S),placeholder:"下周准备做什么",onBlur:le},null,544),[[Re,M.value]]),l("div",e_,q(G.value?"已保存":"失焦自动保存"),1)]),l("div",t_,[I[14]||(I[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Pe(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":I[5]||(I[5]=S=>c.value=S),spellcheck:"false"},null,512),[[Re,c.value]])])]),l("div",n_,[i.value?($(),T("div",s_,[I[20]||(I[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",o_,[I[15]||(I[15]=l("span",{class:"muted"},"出勤",-1)),l("span",r_,q(i.value.attendDays)+" 天",1)]),l("div",a_,[I[16]||(I[16]=l("span",{class:"muted"},"工时",-1)),l("span",i_,q(i.value.totalHours)+" 小时",1)]),l("div",l_,[I[17]||(I[17]=l("span",{class:"muted"},"补卡",-1)),l("span",u_,q(i.value.makeupCount)+" 次",1)]),l("div",c_,[I[18]||(I[18]=l("span",{class:"muted"},"请假",-1)),l("span",d_,q(i.value.leaveCount)+" 天",1)]),l("div",f_,[I[19]||(I[19]=l("span",{class:"muted"},"记录",-1)),l("span",p_,q(i.value.itemCount)+" 条",1)]),I[21]||(I[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),T(je,null,nt(i.value.categoryStats,S=>($(),T("div",{key:S.key,class:"sum-row"},[l("span",v_,q(S.label),1),l("span",m_,q(S.count)+" 条 · "+q(S.percent)+"%",1)]))),128)),i.value.categoryStats.length?ve("",!0):($(),T("div",h_,"(无)")),I[22]||(I[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),T(je,null,nt(i.value.milestones,(S,O)=>($(),T("div",{key:"m"+O,class:"sum-item"},[gt(q(S.content),1),l("span",y_,"("+q(S.date)+")",1)]))),128)),i.value.milestones.length?ve("",!0):($(),T("div",g_,"(无)")),I[23]||(I[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),T(je,null,nt(i.value.followups,(S,O)=>($(),T("div",{key:"f"+O,class:"sum-item"},[gt(q(S.content),1),l("span",b_,"("+q(S.date)+")",1)]))),128)),i.value.followups.length?ve("",!0):($(),T("div",w_,"(无)")),I[24]||(I[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),T(je,null,nt(i.value.takeaways,(S,O)=>($(),T("div",{key:"t"+O,class:"sum-item"},[gt(q(S.text),1),l("span",__,"("+q(S.date)+")",1)]))),128)),i.value.takeaways.length?ve("",!0):($(),T("div",k_,"(无)"))])):ve("",!0)])])]))}}),x_=Kt(C_,[["__scopeId","data-v-7e1b08ed"]]),$_=["aria-label"],S_={class:"dialog-head"},E_={class:"dialog-title"},T_={class:"dialog-body"},A_={class:"form-grid"},P_={class:"field span2"},O_={class:"seg"},M_={class:"field"},I_={class:"field"},j_={class:"field"},D_=["value"],L_={class:"add-cat"},K_=["onKeydown"],R_={key:0,class:"field"},F_={class:"seg"},N_={class:"field span2"},V_={key:0,class:"form-error"},B_={class:"dialog-btns"},U_=Dt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=P("expense"),i=P(""),c=P(""),f=P(""),v=P(""),b=P(!1),h=P(!1),_=P(""),A=P(null);function x(E){n.open&&E.key==="Escape"&&o("cancel")}vt(()=>n.open,async E=>{var U;E?(await G(),r.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,h.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",x),await Rs(),(U=A.value)==null||U.focus()):window.removeEventListener("keydown",x)}),Cn(()=>window.removeEventListener("keydown",x)),vt(r,async()=>{await G(),i.value=M.value[0]||""});const M=P([]);async function G(){M.value=await Wo(r.value)}const oe=P("");async function le(){const E=oe.value.trim();if(E){if(M.value.includes(E)){oe.value="";return}M.value.push(E),await zi(r.value,M.value),i.value=E,oe.value=""}}function ce(){return i.value&&M.value.includes(i.value)?i.value:M.value[0]}function Y(){const E=String(c.value??"").trim(),U=Number(E);if(!E||!isFinite(U)||U<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Q=r.value==="expense"&&b.value?1:0;o("save",{type:r.value,category:ce(),amount:Math.round(U*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Q,reimbursed:Q&&h.value?1:0})}return(E,U)=>($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),T("div",{key:0,class:"mask",onClick:U[12]||(U[12]=Nt(Q=>o("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",S_,[l("span",E_,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=Q=>o("cancel"))},[ke(ze,{name:"close",size:16})])]),l("div",T_,[l("div",A_,[l("div",P_,[U[13]||(U[13]=l("label",null,"类型",-1)),l("div",O_,[l("button",{class:Je(["seg-btn",{active:r.value==="expense"}]),onClick:U[1]||(U[1]=Q=>r.value="expense")},"支出",2),l("button",{class:Je(["seg-btn",{active:r.value==="income"}]),onClick:U[2]||(U[2]=Q=>r.value="income")},"收入",2)])]),l("div",M_,[U[14]||(U[14]=l("label",null,"金额(元,必填)",-1)),Pe(l("input",{ref_key:"amountInput",ref:A,class:Je(["input",{invalid:_.value}]),"onUpdate:modelValue":U[3]||(U[3]=Q=>c.value=Q),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,c.value]])]),l("div",I_,[U[15]||(U[15]=l("label",null,"日期(必填)",-1)),Pe(l("input",{class:"input",type:"date","onUpdate:modelValue":U[4]||(U[4]=Q=>f.value=Q)},null,512),[[Re,f.value]])]),l("div",j_,[U[16]||(U[16]=l("label",null,"分类(可直接新增)",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":U[5]||(U[5]=Q=>i.value=Q)},[($(!0),T(je,null,nt(M.value,Q=>($(),T("option",{key:Q,value:Q},q(Q),9,D_))),128))],512),[[Wn,i.value]]),l("div",L_,[Pe(l("input",{class:"input add-cat-input","onUpdate:modelValue":U[6]||(U[6]=Q=>oe.value=Q),placeholder:"新增分类名",onKeydown:Ot(Nt(le,["prevent"]),["enter"])},null,40,K_),[[Re,oe.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:le},"添加")])]),r.value==="expense"?($(),T("div",R_,[U[17]||(U[17]=l("label",null,"报销状态",-1)),l("div",F_,[l("button",{class:Je(["seg-btn",{active:!b.value}]),onClick:U[7]||(U[7]=Q=>{b.value=!1,h.value=!1})},"无需报销",2),l("button",{class:Je(["seg-btn",{active:b.value&&!h.value}]),onClick:U[8]||(U[8]=Q=>{b.value=!0,h.value=!1})},"待报销",2),l("button",{class:Je(["seg-btn",{active:b.value&&h.value}]),onClick:U[9]||(U[9]=Q=>{b.value=!0,h.value=!0})},"已报销",2)])])):ve("",!0),l("div",N_,[U[18]||(U[18]=l("label",null,"备注",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":U[10]||(U[10]=Q=>v.value=Q),placeholder:"选填"},null,512),[[Re,v.value]])])]),_.value?($(),T("div",V_,q(_.value),1)):ve("",!0)]),l("div",B_,[l("button",{class:"btn btn-sm",onClick:U[11]||(U[11]=Q=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Y},"保存")])],8,$_)])):ve("",!0)]),_:1})]))}}),q_=Kt(U_,[["__scopeId","data-v-1b57c1af"]]),H_={class:"ledger-page"},z_={class:"ledger-toolbar"},W_={class:"month-title num"},G_=["value"],Y_={class:"cards"},J_={class:"card stat-card stat-income"},X_={class:"stat-num num amt-income"},Q_={class:"card stat-card stat-expense"},Z_={class:"stat-num num"},e1={class:"card stat-card stat-balance"},t1={class:"card stat-card stat-pending"},n1={class:"stat-num num amt-warn"},s1={key:0,class:"card sec"},o1={class:"bar-label"},r1={class:"bar-track"},a1={class:"muted num bar-num"},i1={key:1,class:"card section"},l1={class:"form-error"},u1={class:"card table-card"},c1={class:"tx-table"},d1={class:"num","data-label":"日期"},f1={"data-label":"分类"},p1={class:"tag"},v1={class:"td-note","data-label":"备注"},m1={"data-label":"报销"},h1={key:0,class:"muted"},y1={key:1,class:"tx-done"},g1={key:2,class:"tx-pending"},b1={class:"ops-cell"},w1={class:"ops"},_1=["onClick"],k1=["onClick"],C1=["onClick"],x1={key:0},$1={class:"muted table-note num"},S1=Dt({__name:"LedgerView",setup(e){const t=P(it()),n=P([]),o=P(!0),r=P("");it();const i=P(""),c=P(""),f=P(!1),v=P(null),b=P({type:"expense",category:"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0}),h=P(null),_=ot(()=>t.value.slice(0,7)+"-01"),A=ot(()=>{const pe=Number(t.value.slice(0,4)),me=Number(t.value.slice(5,7))-1,re=new Date(pe,me+1,0).getDate();return t.value.slice(0,7)+"-"+(re<10?"0"+re:String(re))}),x=ot(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function M(){o.value=!0;try{n.value=await Fh(_.value,A.value),c.value=""}catch(pe){c.value="账目加载失败:"+(pe instanceof Error?pe.stack||pe.message:String(pe)),Ve("账目加载失败")}o.value=!1}ln(M),vt(t,M);const G=P([]),oe=P([]);async function le(){G.value=await Wo("expense"),oe.value=await Wo("income")}le();const ce=ot(()=>n.value.slice().sort((pe,me)=>pe.date===me.date?me.id-pe.id:pe.date{let pe=0,me=0,re=0;for(const ae of n.value)ae.type==="income"?pe+=ae.amount:(me+=ae.amount,ae.reimbursable===1&&ae.reimbursed!==1&&(re+=ae.amount));return{income:pe,expense:me,pending:re,balance:pe-me}}),E=P("all"),U=P("all"),Q=P("all");vt(t,()=>{Q.value="all"});const B=ot(()=>Array.from(new Set(n.value.map(pe=>pe.category))).sort((pe,me)=>pe.localeCompare(me,"zh"))),te=ot(()=>ce.value.filter(pe=>!(E.value!=="all"&&pe.type!==E.value||Q.value!=="all"&&pe.category!==Q.value||U.value==="pending"&&!(pe.type==="expense"&&pe.reimbursable===1&&pe.reimbursed!==1)||U.value==="done"&&!(pe.reimbursable===1&&pe.reimbursed===1)))),I=ot(()=>{const pe=new Map;let me=0;for(const ae of n.value)ae.type==="expense"&&(pe.set(ae.category,(pe.get(ae.category)||0)+ae.amount),me+=ae.amount);const re=me||1;return Array.from(pe.entries()).map(ae=>({name:ae[0],amount:ae[1],percent:Math.round(ae[1]/re*100)})).sort((ae,Me)=>Me.amount-ae.amount)});function S(pe){return(pe/100).toFixed(2)}function O(pe){return(pe.type==="income"?"+":"-")+S(pe.amount)}function Z(){t.value=ta(t.value,-1)}function Oe(){t.value=ta(t.value,1)}function Ee(){t.value=it()}vt(r,()=>{i.value&&(i.value="")});async function be(pe){await Uh(pe.id),await M(),Ve("已标记为已报销")}function Ae(pe){v.value=pe.id,b.value={type:pe.type,category:pe.category,amountYuan:S(pe.amount),date:pe.date,note:pe.note||"",reimbursable:pe.reimbursable,reimbursed:pe.reimbursed},f.value=!0}function He(){v.value=null,b.value={type:"expense",category:G.value[0]||"",amountYuan:"",date:it(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function qe(pe){if(v.value){await Vh(v.value,pe),f.value=!1,await M(),Ve("账目已更新");return}await Nh({type:pe.type,category:pe.category,amount:pe.amount,date:pe.date,note:pe.note,reimbursable:pe.reimbursable,reimbursed:pe.reimbursed}),f.value=!1,await M(),Ve("已记一笔")}async function Xe(){h.value&&h.value.id&&await Bh(h.value.id),h.value=null,await M(),Ve("账目已删除")}return(pe,me)=>($(),T("div",H_,[l("div",z_,[l("button",{class:"icon-btn",onClick:Z},[ke(ze,{name:"chevron-left",size:16})]),l("span",W_,q(x.value),1),l("button",{class:"icon-btn",onClick:Oe},[ke(ze,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:Ee},"回到本月"),me[9]||(me[9]=l("span",{class:"flex1"},null,-1)),Pe(l("select",{class:"select w-filter","onUpdate:modelValue":me[0]||(me[0]=re=>E.value=re)},[...me[5]||(me[5]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[Wn,E.value]]),Pe(l("select",{class:"select w-filter","onUpdate:modelValue":me[1]||(me[1]=re=>Q.value=re)},[me[6]||(me[6]=l("option",{value:"all"},"全部分类",-1)),($(!0),T(je,null,nt(B.value,re=>($(),T("option",{key:re,value:re},q(re),9,G_))),128))],512),[[Wn,Q.value]]),Pe(l("select",{class:"select w-filter","onUpdate:modelValue":me[2]||(me[2]=re=>U.value=re)},[...me[7]||(me[7]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[Wn,U.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:He},[ke(ze,{name:"plus",size:14}),me[8]||(me[8]=gt(" 记一笔",-1))])]),l("div",Y_,[l("div",J_,[me[10]||(me[10]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",X_,q(S(Y.value.income)),1)]),l("div",Q_,[me[11]||(me[11]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",Z_,q(S(Y.value.expense)),1)]),l("div",e1,[me[12]||(me[12]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Je(["stat-num num",{"amt-income":Y.value.balance>=0,"amt-expense":Y.value.balance<0}])},q(S(Y.value.balance)),3)]),l("div",t1,[me[13]||(me[13]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",n1,q(S(Y.value.pending)),1)])]),I.value.length?($(),T("div",s1,[me[14]||(me[14]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),T(je,null,nt(I.value,re=>($(),T("div",{key:re.name,class:"bar-row"},[l("span",o1,q(re.name),1),l("span",r1,[l("span",{class:"bar-fill",style:zn({width:re.percent+"%"})},null,4)]),l("span",a1,q(S(re.amount))+" 元 · "+q(re.percent)+"%",1)]))),128))])):ve("",!0),c.value?($(),T("div",i1,[l("div",l1,q(c.value),1),me[15]||(me[15]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):ve("",!0),l("div",u1,[l("table",c1,[me[17]||(me[17]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),T(je,null,nt(te.value,re=>($(),T("tr",{key:re.id},[l("td",d1,q(re.date),1),l("td",f1,[l("span",p1,q(re.category),1)]),l("td",{class:Je(["num",re.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},q(O(re)),3),l("td",v1,q(re.note||"--"),1),l("td",m1,[re.type!=="expense"||re.reimbursable!==1?($(),T("span",h1,"--")):re.reimbursed===1?($(),T("span",y1,"已报销")):($(),T("span",g1,"待报销"))]),l("td",b1,[l("div",w1,[re.type==="expense"&&re.reimbursable===1&&re.reimbursed!==1?($(),T("button",{key:0,class:"btn btn-xs",onClick:ae=>be(re)},"标记已报销",8,_1)):ve("",!0),l("button",{class:"btn btn-xs",onClick:ae=>Ae(re)},"编辑",8,k1),l("button",{class:"btn btn-xs",onClick:ae=>h.value=re},"删除",8,C1)])])]))),128)),!te.value.length&&!o.value?($(),T("tr",x1,[...me[16]||(me[16]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):ve("",!0)])])]),l("div",$1,"本月 "+q(n.value.length)+" 条 · 当前筛选 "+q(te.value.length)+" 条",1),ke(q_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:me[3]||(me[3]=re=>f.value=!1),onSave:qe},null,8,["open","title","initial"]),ke(wn,{open:!!h.value,title:"删除确认",message:h.value?"将删除 "+h.value.date+" 的账目("+h.value.category+" "+S(h.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:me[4]||(me[4]=re=>h.value=null),onConfirm:Xe},null,8,["open","message"])]))}}),E1=Kt(S1,[["__scopeId","data-v-d74b18a8"]]),T1={class:"memo-page"},A1={class:"card memo-list"},P1={class:"pane-head"},O1={class:"pane-title"},M1={class:"memo-scroll"},I1=["onClick"],j1={class:"memo-item-title"},D1={class:"muted memo-item-sub"},L1={class:"muted num memo-item-time"},K1={key:0,class:"muted empty"},R1={class:"card memo-editor"},F1={class:"editor-foot"},N1={class:"muted foot-info"},V1=["disabled"],B1=["disabled"],U1={key:1,class:"empty muted editor-empty"},q1=Dt({__name:"MemoView",setup(e){const t=P([]),n=P(null),o=P(!1),r=P(""),i=P(""),c=P(null),f=P(null);async function v(){if(t.value=await Ih(),n.value&&n.value.id){const Q=t.value.find(B=>B.id===n.value.id);Q&&(n.value=Q)}}ln(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Cn(()=>window.removeEventListener("keydown",b)),vt(Ni,async Q=>{if(!Q)return;t.value.length||await v();const B=t.value.find(te=>te.id===Q);Ni.value=null,B&&A(B)},{immediate:!0});function b(Q){(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="s"&&o.value&&h.value&&(Q.preventDefault(),oe())}const h=ot(()=>{if(!o.value)return!1;const Q=n.value?n.value.title:"",B=n.value?n.value.content:"";return r.value!==Q||i.value!==B});function _(Q){n.value=Q,o.value=!0,r.value=Q.title,i.value=Q.content}function A(Q){if(!(o.value&&n.value&&n.value.id===Q.id)){if(h.value){f.value={type:"select",memo:Q};return}_(Q)}}function x(){if(h.value){f.value={type:"new"};return}M()}function M(){n.value=null,o.value=!0,r.value="",i.value=""}function G(){n.value?_(n.value):M()}async function oe(){if(!r.value.trim()&&!i.value.trim()){Ve("标题与内容不能都为空");return}if(n.value&&n.value.id)await Dh(n.value.id,r.value,i.value),Ve("备忘已保存");else{const Q=await jh(r.value,i.value);n.value=Q,r.value=Q.title,i.value=Q.content,Ve("备忘已创建")}await v()}function le(){n.value&&n.value.id&&(c.value=n.value)}async function ce(){c.value&&c.value.id&&(await Lh(c.value.id),Ve("备忘已删除")),c.value=null,await v(),M()}function Y(){const Q=f.value;f.value=null,Q&&(Q.type==="select"?_(Q.memo):M())}function E(Q){return(Q.content||"").replace(/\s+/g," ").slice(0,30)}function U(Q){return Q.replace("T"," ").slice(0,16)}return(Q,B)=>($(),T("div",T1,[l("aside",A1,[l("div",P1,[l("span",O1,"备忘录("+q(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:x},"新建")]),l("div",M1,[($(!0),T(je,null,nt(t.value,te=>($(),T("div",{key:te.id,class:Je(["memo-item",{active:o.value&&n.value&&n.value.id===te.id}]),onClick:I=>A(te)},[l("div",j1,q(te.title||"无标题"),1),l("div",D1,q(E(te)||"空"),1),l("div",L1,q(U(te.updated_at)),1)],10,I1))),128)),t.value.length?ve("",!0):($(),T("div",K1,"暂无备忘"))])]),l("section",R1,[o.value?($(),T(je,{key:0},[Pe(l("input",{class:"input title-input","onUpdate:modelValue":B[0]||(B[0]=te=>r.value=te),placeholder:"标题"},null,512),[[Re,r.value]]),Pe(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":B[1]||(B[1]=te=>i.value=te),placeholder:"内容"},null,512),[[Re,i.value]]),l("div",F1,[l("span",N1,[h.value?($(),T(je,{key:0},[gt("有未保存修改")],64)):n.value&&n.value.id?($(),T(je,{key:1},[gt("更新于 "+q(U(n.value.updated_at)),1)],64)):($(),T(je,{key:2},[gt("新备忘")],64))]),B[4]||(B[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),T("button",{key:0,class:"btn btn-sm",onClick:le},"删除")):ve("",!0),l("button",{class:"btn btn-sm",disabled:!h.value,onClick:G},"放弃修改",8,V1),l("button",{class:"btn btn-primary btn-sm",disabled:!h.value,onClick:oe},"保存",8,B1)])],64)):($(),T("div",U1,"选择左侧备忘,或点击右上角新建"))]),ke(wn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:B[2]||(B[2]=te=>c.value=null),onConfirm:ce},null,8,["open","message"]),ke(wn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:B[3]||(B[3]=te=>f.value=null),onConfirm:Y},null,8,["open"])]))}}),H1=Kt(q1,[["__scopeId","data-v-a0931fc7"]]),z1=["aria-label"],W1={class:"dialog-head"},G1={class:"dialog-title"},Y1={class:"dialog-body"},J1={class:"form-grid"},X1={class:"field span2"},Q1={class:"field span2"},Z1={class:"field span2"},e0={class:"pwd-row"},t0={class:"field span2"},n0={key:0,class:"form-error"},s0={class:"dialog-btns"},o0=Dt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,o=t,r=P(""),i=P(""),c=P(""),f=P(""),v=P(""),b=P(null);function h(x){n.open&&x.key==="Escape"&&o("cancel")}vt(()=>n.open,async x=>{var M;x?(r.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",h),await Rs(),(M=b.value)==null||M.focus()):window.removeEventListener("keydown",h)}),Cn(()=>window.removeEventListener("keydown",h));function _(){const x="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",G=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let le=0;le($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),T("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Nt(G=>o("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",W1,[l("span",G1,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=G=>o("cancel"))},[ke(ze,{name:"close",size:16})])]),l("div",Y1,[l("div",J1,[l("div",X1,[M[7]||(M[7]=l("label",null,"系统名称(必填)",-1)),Pe(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":M[1]||(M[1]=G=>r.value=G),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,r.value]])]),l("div",Q1,[M[8]||(M[8]=l("label",null,"账号(必填)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=G=>i.value=G),placeholder:"用户名、工号或邮箱"},null,512),[[Re,i.value]])]),l("div",Z1,[M[9]||(M[9]=l("label",null,"密码(必填)",-1)),l("div",e0,[Pe(l("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=G=>c.value=G),placeholder:"输入或点击生成"},null,512),[[Re,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",t0,[M[10]||(M[10]=l("label",null,"备注",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=G=>f.value=G),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),v.value?($(),T("div",n0,q(v.value),1)):ve("",!0)]),l("div",s0,[l("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=G=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:A},"保存")])],8,z1)])):ve("",!0)]),_:1})]))}}),r0=Kt(o0,[["__scopeId","data-v-2eafe20e"]]),a0={class:"vault-page"},i0={key:0,class:"empty muted"},l0={key:1,class:"card lock-card"},u0={class:"lock-badge"},c0={key:0,class:"form-error"},d0=["disabled"],f0={key:0,class:"form-error"},p0=["disabled"],v0={class:"vault-toolbar"},m0={class:"search-wrap"},h0={class:"card table-card"},y0={class:"cred-table"},g0={class:"td-system"},b0=["onClick"],w0={class:"pwd-cell"},_0={class:"num pwd-text"},k0=["onClick"],C0=["onClick"],x0={class:"td-remark"},$0={class:"td-ops"},S0={class:"ops"},E0=["onClick"],T0=["onClick"],A0={key:0},P0={class:"muted table-note num"},O0={class:"dialog pwd-dialog"},M0={class:"dialog-head"},I0={class:"dialog-body"},j0={class:"vp-field"},D0={class:"vp-field"},L0={class:"vp-field"},K0={key:0,class:"form-error"},R0={class:"dialog-btns"},F0=5*60*1e3,N0=Dt({__name:"VaultView",setup(e){const t=P(null),n=P(pm()),o=P(!1),r=P(""),i=P(""),c=P(""),f=P(""),v=P(""),b=P([]),h=P(""),_=P({}),A=P(!1),x=P(null),M=P({system:"",account:"",password:"",remark:""}),G=P(null),oe=P(!1),le=P(""),ce=P(""),Y=P(""),E=P("");async function U(){b.value=await gm(),_.value={}}let Q=null;function B(){Q!==null&&window.clearTimeout(Q),Q=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Ve("长时间未操作,密码库已自动锁定"))},F0)}function te(){n.value&&B()}ln(async()=>{t.value=await dd(),window.addEventListener("click",te),window.addEventListener("keydown",te),n.value&&B()}),Cn(()=>{window.removeEventListener("click",te),window.removeEventListener("keydown",te),Q!==null&&window.clearTimeout(Q)});const I=ot(()=>{const re=h.value.trim().toLowerCase();return re?b.value.filter(ae=>(ae.system+" "+ae.account+" "+(ae.remark||"")).toLowerCase().includes(re)):b.value});async function S(){if(!o.value){if(c.value="",!r.value){c.value="请输入主密码";return}if(r.value.length<6){c.value="主密码至少 6 位";return}if(r.value!==i.value){c.value="两次输入的主密码不一致";return}o.value=!0;try{await vm(r.value),r.value="",i.value="",n.value=!0,B(),await U(),Ve("主密码已设置,密码库已解锁")}catch(re){c.value=re instanceof Error?re.message:"设置失败"}o.value=!1}}async function O(){if(!o.value){if(v.value="",!f.value){v.value="请输入主密码";return}o.value=!0;try{await mm(f.value),f.value="",n.value=!0,B(),await U()}catch(re){v.value=re instanceof Error?re.message:"解锁失败"}o.value=!1}}function Z(){oa(),n.value=!1,b.value=[],_.value={},Q!==null&&window.clearTimeout(Q),Ve("密码库已锁定")}async function Oe(re){const ae=re.id;if(_.value[ae]){_.value[ae]=!1;return}try{re.passwordPlain=await yi(ae),_.value[ae]=!0}catch(Me){Ve(Me instanceof Error?Me.message:"解密失败")}}async function Ee(re){try{const ae=await yi(re.id);await Wi(ae),Ve("密码已复制")}catch(ae){Ve(ae instanceof Error?ae.message:"复制失败")}}async function be(re){await Wi(re.account),Ve("账号已复制")}function Ae(){x.value=null,M.value={system:"",account:"",password:"",remark:""},A.value=!0}async function He(re){try{const ae=await yi(re.id);x.value=re.id,M.value={system:re.system,account:re.account,password:ae,remark:re.remark||""},A.value=!0}catch(ae){Ve(ae instanceof Error?ae.message:"解密失败")}}async function qe(re){const ae=x.value??void 0;await bm(re,ae),A.value=!1,await U(),Ve(ae?"账号已更新":"账号已添加")}async function Xe(){G.value&&G.value.id&&(await wm(G.value.id),Ve("账号已删除")),G.value=null,await U()}function pe(){le.value="",ce.value="",Y.value="",E.value="",oe.value=!0}async function me(){E.value="";try{const re=await _m(le.value,ce.value);oe.value=!1,le.value="",ce.value="",Y.value="",Ve("主密码已修改,"+re+" 条账号密码已重新加密")}catch(re){E.value=re instanceof Error?re.message:"修改失败"}}return(re,ae)=>($(),T("div",a0,[t.value===null?($(),T("div",i0,"加载中")):n.value?($(),T(je,{key:2},[l("div",v0,[l("div",m0,[ke(ze,{name:"search",size:14,class:"search-icon"}),Pe(l("input",{class:"input","onUpdate:modelValue":ae[3]||(ae[3]=Me=>h.value=Me),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,h.value]])]),ae[16]||(ae[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:pe},"修改主密码"),l("button",{class:"btn btn-sm",onClick:Z},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Ae},"新增账号")]),l("div",h0,[l("table",y0,[ae[18]||(ae[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),T(je,null,nt(I.value,Me=>($(),T("tr",{key:Me.id},[l("td",g0,q(Me.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ft=>be(Me)},q(Me.account),9,b0)]),l("td",null,[l("div",w0,[l("span",_0,q(_.value[Me.id]?Me.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ft=>Oe(Me)},q(_.value[Me.id]?"隐藏":"显示"),9,k0),l("button",{class:"btn btn-xs",onClick:ft=>Ee(Me)},"复制",8,C0)])]),l("td",x0,q(Me.remark||"--"),1),l("td",$0,[l("div",S0,[l("button",{class:"btn btn-xs",onClick:ft=>He(Me)},"编辑",8,E0),l("button",{class:"btn btn-xs",onClick:ft=>G.value=Me},"删除",8,T0)])])]))),128)),I.value.length?ve("",!0):($(),T("tr",A0,[...ae[17]||(ae[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",P0,"共 "+q(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),T("div",l0,[l("div",u0,[ke(ze,{name:"lock",size:26})]),t.value===!1?($(),T(je,{key:0},[ae[12]||(ae[12]=l("div",{class:"lock-title"},"设置主密码",-1)),ae[13]||(ae[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[0]||(ae[0]=Me=>r.value=Me),placeholder:"设置主密码(至少 6 位)",onKeydown:Ot(S,["enter"])},null,544),[[Re,r.value]]),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[1]||(ae[1]=Me=>i.value=Me),placeholder:"再次输入主密码",onKeydown:Ot(S,["enter"])},null,544),[[Re,i.value]]),c.value?($(),T("div",c0,q(c.value),1)):ve("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:S},"完成设置并解锁",8,d0)],64)):($(),T(je,{key:1},[ae[14]||(ae[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),ae[15]||(ae[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[2]||(ae[2]=Me=>f.value=Me),placeholder:"主密码",onKeydown:Ot(O,["enter"])},null,544),[[Re,f.value]]),v.value?($(),T("div",f0,q(v.value),1)):ve("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:o.value,onClick:O},"解锁",8,p0)],64))])),ke(r0,{open:A.value,title:x.value?"编辑账号":"新增账号",initial:M.value,onCancel:ae[4]||(ae[4]=Me=>A.value=!1),onSave:qe},null,8,["open","title","initial"]),ke(wn,{open:!!G.value,title:"删除确认",message:G.value?"将删除系统「"+G.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ae[5]||(ae[5]=Me=>G.value=null),onConfirm:Xe},null,8,["open","message"]),($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[oe.value?($(),T("div",{key:0,class:"mask",onClick:ae[11]||(ae[11]=Nt(Me=>oe.value=!1,["self"]))},[l("div",O0,[l("div",M0,[ae[19]||(ae[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:ae[6]||(ae[6]=Me=>oe.value=!1)},[ke(ze,{name:"close",size:16})])]),l("div",I0,[l("div",j0,[ae[20]||(ae[20]=l("label",null,"旧主密码",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[7]||(ae[7]=Me=>le.value=Me)},null,512),[[Re,le.value]])]),l("div",D0,[ae[21]||(ae[21]=l("label",null,"新主密码(至少 6 位)",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[8]||(ae[8]=Me=>ce.value=Me)},null,512),[[Re,ce.value]])]),l("div",L0,[ae[22]||(ae[22]=l("label",null,"确认新主密码",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":ae[9]||(ae[9]=Me=>Y.value=Me)},null,512),[[Re,Y.value]])]),E.value?($(),T("div",K0,q(E.value),1)):ve("",!0),ae[23]||(ae[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",R0,[l("button",{class:"btn btn-sm",onClick:ae[10]||(ae[10]=Me=>oe.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:me},"确认修改")])])])):ve("",!0)]),_:1})]))]))}}),V0=Kt(N0,[["__scopeId","data-v-6d2745bc"]]),B0=["aria-label"],U0={class:"dialog-head"},q0={class:"dialog-title"},H0={class:"dialog-body"},z0={class:"field"},W0={key:0},G0=["placeholder"],Y0={key:1,class:"form-error"},J0={class:"dialog-btns"},X0=Dt({__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(""),i=P(""),c=P(null);function f(b){n.open&&b.key==="Escape"&&o("cancel")}vt(()=>n.open,async b=>{var h,_;b?(r.value=n.initial,i.value="",window.addEventListener("keydown",f),await Rs(),(h=c.value)==null||h.focus(),(_=c.value)==null||_.select()):window.removeEventListener("keydown",f)}),Cn(()=>window.removeEventListener("keydown",f));function v(){const b=r.value.trim();if(!b){i.value="请输入内容";return}const h=n.validate?n.validate(b):null;if(h){i.value=h;return}o("confirm",b)}return(b,h)=>($(),kt(Kn,{to:"body"},[ke(hs,{name:"modal"},{default:Rn(()=>[e.open?($(),T("div",{key:0,class:"mask",onClick:h[3]||(h[3]=Nt(_=>o("cancel"),["self"]))},[l("div",{class:"dialog input-dialog",role:"dialog","aria-label":e.title},[l("div",U0,[l("span",q0,q(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:h[0]||(h[0]=_=>o("cancel"))},[ke(ze,{name:"close",size:16})])]),l("div",H0,[l("div",z0,[e.label?($(),T("label",W0,q(e.label),1)):ve("",!0),Pe(l("input",{ref_key:"input",ref:c,class:Je(["input",{invalid:i.value}]),"onUpdate:modelValue":h[1]||(h[1]=_=>r.value=_),placeholder:e.placeholder,maxlength:"20",onKeydown:Ot(v,["enter"])},null,42,G0),[[Re,r.value]]),i.value?($(),T("div",Y0,q(i.value),1)):ve("",!0)])]),l("div",J0,[l("button",{class:"btn btn-sm",onClick:h[2]||(h[2]=_=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:v},q(e.confirmText),1)])],8,B0)])):ve("",!0)]),_:1})]))}}),Q0=Kt(X0,[["__scopeId","data-v-4b14ba4f"]]);function Z0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Uu(e,t){const o="\uFEFF"+t.map(f=>f.map(Z0).join(",")).join(`\r +`);if(lo.isNativePlatform()){const{downloadText:f}=await Md(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Hg);return{downloadText:v}},void 0,import.meta.url);return f(e,o)}const r=new Blob([o],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(r),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const ek={class:"settings"},tk={class:"card section"},nk={class:"muted acc-line"},sk={class:"ai-grid"},ok={class:"rule-item"},rk={class:"rule-item"},ak={class:"rule-item"},ik={key:0,class:"form-error"},lk={class:"rule-save"},uk={class:"card section"},ck={class:"rule-grid"},dk={class:"rule-item"},fk={class:"rule-item"},pk={class:"rule-item"},vk={class:"rule-item"},mk={class:"rule-item"},hk={class:"card section"},yk={class:"proj-add"},gk={key:0,class:"muted proj-tip"},bk=["onKeydown"],wk=["onClick"],_k=["onClick"],kk=["onClick"],Ck={key:1,class:"muted"},xk={class:"card section"},$k={class:"card section"},Sk={class:"muted acc-line"},Ek={class:"rule-save"},Tk=["disabled"],Ak={key:0,class:"muted acc-line"},Pk={key:1,class:"form-error"},Ok={key:2,class:"form-error"},Mk={class:"card section"},Ik={class:"ai-grid"},jk={class:"rule-item"},Dk={class:"rule-item"},Lk={class:"rule-item"},Kk={class:"card section"},Rk={class:"cat-block"},Fk={class:"cat-head"},Nk={class:"cat-chips"},Vk=["onClick"],Bk=["onClick"],Uk={class:"cat-block"},qk={class:"cat-head"},Hk={class:"cat-chips"},zk=["onClick"],Wk=["onClick"],Gk={class:"cat-block"},Yk={class:"cat-head"},Jk={class:"cat-chips"},Xk=["onClick"],Qk=["onClick"],Zk={class:"card section"},eC={class:"backup-row"},tC={key:0,class:"import-error"},nC=Dt({__name:"SettingsView",setup(e){var Be;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(""),i=P(""),c=P(""),f=P(""),v=P(""),b=P(null),h=P(""),_=P([]),A=P([]),x=P([]);async function M(){_.value=await Zo(),A.value=await Wo("expense"),x.value=await Wo("income")}const G=P({open:!1,kind:"log",index:-1,initial:""}),oe=P(null);function le(ue){return ue==="log"?_.value:ue==="expense"?A.value:x.value}async function ce(ue,z){ue==="log"?(_.value=z,await Yh(z)):ue==="expense"?(A.value=z,await zi("expense",z)):(x.value=z,await zi("income",z))}function Y(ue){G.value={open:!0,kind:ue,index:-1,initial:""}}function E(ue,z,de){G.value={open:!0,kind:ue,index:z,initial:de}}function U(ue){const{kind:z,index:de}=G.value,De=le(z);return De.includes(ue)&&!(de>=0&&De[de]===ue)?"该分类已存在":null}async function Q(ue){const{kind:z,index:de}=G.value;de>=0?(await ce(z,le(z).map((De,st)=>st===de?ue:De)),Ve("分类已更新(历史记录自动跟随显示)")):(await ce(z,[...le(z),ue]),Ve("分类已添加")),G.value.open=!1}function B(ue,z){const de=le(ue);if(de.length<=1){Ve("至少保留一个分类");return}oe.value={kind:ue,index:z,name:de[z]}}async function te(){if(!oe.value)return;const{kind:ue,index:z}=oe.value;await ce(ue,le(ue).filter((de,De)=>De!==z)),Ve("分类已删除"),oe.value=null}const I=P(null),S=P(null),O=P(""),Z=P(((Be=zo())==null?void 0:Be.username)||""),Oe=P(""),Ee=P(""),be=P(""),Ae=P(""),He=P(!1),qe="0.7.0",Xe=P(""),pe=P(""),me=P(""),re=P(""),ae=P(!1),Me=P("");async function ft(){var ue;Xe.value=((ue=pn())==null?void 0:ue.username)||"",Me.value=await Um(),re.value=eo.value}vt(eo,ue=>{re.value=ue});async function Ct(){me.value="";try{await bd(),Ve("云端绑定已重建")}catch(ue){me.value=ue instanceof Error?ue.message:"绑定失败"}}async function xt(){if(!ae.value){me.value="",re.value=eo.value,ae.value=!0;try{const ue=await Vi();Me.value=ue.at,pe.value="推送 "+ue.pushed+" 条 · 拉取 "+ue.pulled+" 条 · 删除 "+ue.removed+" 条",re.value="",Ve("同步完成")}catch(ue){me.value=ue instanceof Error?ue.message:"同步失败"}ae.value=!1}}async function qt(){if(Ae.value="",Ee.value!==be.value){Ae.value="两次输入的新密码不一致";return}try{await Lm(Oe.value,Ee.value),Oe.value="",Ee.value="",be.value="",Ve("登录密码已修改")}catch(ue){Ae.value=ue instanceof Error?ue.message:"修改失败"}}async function bt(){await Km(),window.location.reload()}async function Le(){t.value=await vs(),n.value=await ao(!0),i.value=(await hl()).join(` +`),c.value=await St("ai_base_url",""),f.value=await St("ai_api_key",""),v.value=await St("ai_model",""),await ft(),await M()}async function g(){await Lt("ai_base_url",c.value.trim()),await Lt("ai_api_key",f.value.trim()),await Lt("ai_model",v.value.trim()),Ve("AI 配置已保存")}async function m(){const ue=it(),z=await Promise.all([Qo("2000-01-01",ue),ao(!0)]),de=z[0],De=z[1],st=new Map(De.map(Qe=>[Qe.id,Qe.name])),ht=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Qe of de)ht.push([Qe.date,qo(Qe.category),Qe.project_id&&st.get(Qe.project_id)||"",Qe.content,Qe.minutes==null?"":Qe.minutes,Qe.is_milestone?"是":"",Qe.needs_followup?"是":"",Qe.takeaway||"",Qe.remark||""]);const It=await Uu("工作记录_"+ue.replace(/-/g,"")+".csv",ht);Ve(It?"CSV 已导出到:"+It:"CSV 已导出到系统下载目录")}async function C(){const ue=it(),z=await Promise.all([vs(),Xo("2000-01-01",ue)]),de=z[0],De=z[1],st=["周日","周一","周二","周三","周四","周五","周六"],ht=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Qe of De){const Xt=co(Qe,Qe.date,de,Qe.date===ue);ht.push([Qe.date,st[Fs(Qe.date).getDay()],Xt.label,Qe.clock_in_at?_n(Qe.clock_in_at):"",Qe.clock_out_at?_n(Qe.clock_out_at):"",Qe.location||"",Qe.kind==="makeup"?"补卡":Qe.kind==="leave"?"休假":"正常",Qe.note||""])}const It=await Uu("考勤记录_"+ue.replace(/-/g,"")+".csv",ht);Ve(It?"CSV 已导出到:"+It:"CSV 已导出到系统下载目录")}ln(Le);async function j(){await Lt("work_start",t.value.work_start),await Lt("work_end",t.value.work_end),await Lt("grace_minutes",String(t.value.grace_minutes)),await Lt("lunch_minutes",String(t.value.lunch_minutes)),await Lt("remind_weekly",t.value.remind_weekly),Ve("打卡规则已保存")}async function se(){await $d(i.value.split(` +`)),Ve("常用地点已保存")}async function W(){const ue=o.value.trim();if(ue){try{await oh(ue),r.value="",o.value=""}catch{r.value="项目名已存在"}await Le()}}function we(ue){b.value=ue.id,h.value=ue.name}async function _e(ue){const z=h.value.trim();if(z)try{await rh(ue.id,z),r.value=""}catch{r.value="项目名已存在"}b.value=null,await Le()}async function xe(ue){await ah(ue.id,ue.archived!==1),await Le()}async function fe(){try{const ue=await qh(),z=await Sa("实习日志备份_"+it().replace(/-/g,"")+".json",ue);Ve(z?"备份已导出到:"+z:"备份已导出到系统下载目录")}catch(ue){Ve("导出失败:"+(ue instanceof Error?ue.message:String(ue)))}}function Ke(ue){const z=ue.target,de=z.files&&z.files[0];if(O.value="",!de)return;const De=de.name;de.text().then(st=>{S.value={name:De,text:st}}),z.value=""}async function Te(){if(S.value)try{await Hh(S.value.text),S.value=null,O.value="",await Le(),Ve("数据导入完成")}catch(ue){S.value=null,O.value=ue instanceof Error?ue.message:"导入失败"}}return(ue,z)=>($(),T("div",ek,[l("div",tk,[z[27]||(z[27]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",nk,"v"+q(sn(qe))+" · 当前账号 "+q(Z.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",sk,[l("div",ok,[z[24]||(z[24]=l("label",null,"旧登录密码",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":z[0]||(z[0]=de=>Oe.value=de)},null,512),[[Re,Oe.value]])]),l("div",rk,[z[25]||(z[25]=l("label",null,"新登录密码(至少 6 位)",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":z[1]||(z[1]=de=>Ee.value=de)},null,512),[[Re,Ee.value]])]),l("div",ak,[z[26]||(z[26]=l("label",null,"确认新登录密码",-1)),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":z[2]||(z[2]=de=>be.value=de)},null,512),[[Re,be.value]])])]),Ae.value?($(),T("div",ik,q(Ae.value),1)):ve("",!0),l("div",lk,[l("button",{class:"btn btn-primary btn-sm",onClick:qt},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:z[3]||(z[3]=de=>He.value=!0)},"删除此用户及全部数据")])]),l("div",uk,[z[34]||(z[34]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",ck,[l("div",dk,[z[28]||(z[28]=l("label",null,"上班时间",-1)),Pe(l("input",{type:"time",class:"input","onUpdate:modelValue":z[4]||(z[4]=de=>t.value.work_start=de)},null,512),[[Re,t.value.work_start]])]),l("div",fk,[z[29]||(z[29]=l("label",null,"下班时间",-1)),Pe(l("input",{type:"time",class:"input","onUpdate:modelValue":z[5]||(z[5]=de=>t.value.work_end=de)},null,512),[[Re,t.value.work_end]])]),l("div",pk,[z[30]||(z[30]=l("label",null,"迟到宽限(分钟)",-1)),Pe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":z[6]||(z[6]=de=>t.value.grace_minutes=de)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",vk,[z[31]||(z[31]=l("label",null,"午休扣除(分钟)",-1)),Pe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":z[7]||(z[7]=de=>t.value.lunch_minutes=de)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",mk,[z[33]||(z[33]=l("label",null,"周记提醒",-1)),Pe(l("select",{class:"select","onUpdate:modelValue":z[8]||(z[8]=de=>t.value.remind_weekly=de)},[...z[32]||(z[32]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[Wn,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:j},"保存规则")])]),l("div",hk,[z[35]||(z[35]=l("div",{class:"section-title"},"项目管理",-1)),l("div",yk,[Pe(l("input",{class:"input","onUpdate:modelValue":z[9]||(z[9]=de=>o.value=de),placeholder:"新项目名称",onKeydown:Ot(W,["enter"])},null,544),[[Re,o.value]]),l("button",{class:"btn btn-sm",onClick:W},"添加")]),r.value?($(),T("div",gk,q(r.value),1)):ve("",!0),($(!0),T(je,null,nt(n.value,de=>($(),T("div",{key:de.id,class:"proj-row"},[b.value===de.id?($(),T(je,{key:0},[Pe(l("input",{class:"input","onUpdate:modelValue":z[10]||(z[10]=De=>h.value=De),onKeydown:Ot(De=>_e(de),["enter"])},null,40,bk),[[Re,h.value]]),l("button",{class:"btn btn-sm",onClick:De=>_e(de)},"保存",8,wk),l("button",{class:"btn btn-sm",onClick:z[11]||(z[11]=De=>b.value=null)},"取消")],64)):($(),T(je,{key:1},[l("span",{class:Je(["proj-name",{archived:de.archived===1}])},q(de.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:De=>we(de)},[ke(ze,{name:"edit",size:14})],8,_k),l("button",{class:"btn btn-sm",onClick:De=>xe(de)},q(de.archived===1?"恢复":"归档"),9,kk)],64))]))),128)),n.value.length?ve("",!0):($(),T("div",Ck,"暂无项目,先添加一个"))]),l("div",xk,[z[37]||(z[37]=l("div",{class:"section-title"},"常用地点",-1)),Pe(l("textarea",{class:"textarea","onUpdate:modelValue":z[12]||(z[12]=de=>i.value=de),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:se},"保存地点"),z[36]||(z[36]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",$k,[z[38]||(z[38]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",Sk,"云端账号:"+q(Xe.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",Ek,[l("button",{class:"btn btn-primary btn-sm",disabled:ae.value,onClick:xt},q(ae.value?"同步中":"立即同步"),9,Tk),l("button",{class:"btn btn-sm",onClick:Ct},"重新校验连接")]),pe.value?($(),T("div",Ak,"上次同步:"+q(Me.value||"--")+" · "+q(pe.value),1)):ve("",!0),me.value?($(),T("div",Pk,q(me.value),1)):ve("",!0),re.value?($(),T("div",Ok,"最近自动同步失败:"+q(re.value)+"(可点「立即同步」重试)",1)):ve("",!0)]),l("div",Mk,[z[43]||(z[43]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",Ik,[l("div",jk,[z[39]||(z[39]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":z[13]||(z[13]=de=>c.value=de),placeholder:"https://api.example.com/v1"},null,512),[[Re,c.value]])]),l("div",Dk,[z[40]||(z[40]=l("label",null,"API Key",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":z[14]||(z[14]=de=>f.value=de),placeholder:"sk-..."},null,512),[[Re,f.value]])]),l("div",Lk,[z[41]||(z[41]=l("label",null,"模型名称",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":z[15]||(z[15]=de=>v.value=de),placeholder:"如:deepseek-chat"},null,512),[[Re,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:g},"保存 AI 配置"),z[42]||(z[42]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",Kk,[z[47]||(z[47]=l("div",{class:"section-title"},"工作分类",-1)),l("div",Rk,[l("div",Fk,[z[44]||(z[44]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:z[16]||(z[16]=de=>Y("log"))},"添加")]),l("div",Nk,[($(!0),T(je,null,nt(_.value,(de,De)=>($(),T("span",{key:de+De,class:"cat-chip"},[gt(q(de)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("log",De,de)},"改",8,Vk),l("button",{class:"chip-btn",title:"删除",onClick:st=>B("log",De)},"删",8,Bk)]))),128))])]),l("div",Uk,[l("div",qk,[z[45]||(z[45]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:z[17]||(z[17]=de=>Y("expense"))},"添加")]),l("div",Hk,[($(!0),T(je,null,nt(A.value,(de,De)=>($(),T("span",{key:de+De,class:"cat-chip"},[gt(q(de)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("expense",De,de)},"改",8,zk),l("button",{class:"chip-btn",title:"删除",onClick:st=>B("expense",De)},"删",8,Wk)]))),128))])]),l("div",Gk,[l("div",Yk,[z[46]||(z[46]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:z[18]||(z[18]=de=>Y("income"))},"添加")]),l("div",Jk,[($(!0),T(je,null,nt(x.value,(de,De)=>($(),T("span",{key:de+De,class:"cat-chip"},[gt(q(de)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:st=>E("income",De,de)},"改",8,Xk),l("button",{class:"chip-btn",title:"删除",onClick:st=>B("income",De)},"删",8,Qk)]))),128))])])]),l("div",Zk,[z[48]||(z[48]=l("div",{class:"section-title"},"数据备份",-1)),l("div",eC,[l("button",{class:"btn btn-sm",onClick:fe},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:z[19]||(z[19]=de=>{var De;return(De=I.value)==null?void 0:De.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:m},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:C},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:I,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Ke},null,544)]),O.value?($(),T("div",tC,q(O.value),1)):ve("",!0),z[49]||(z[49]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),ke(Q0,{open:G.value.open,title:G.value.index>=0?"修改分类名称":"添加分类",label:"分类名称",placeholder:"如:制度学习 / 差旅交通",initial:G.value.initial,validate:U,"confirm-text":"保存",onCancel:z[20]||(z[20]=de=>G.value.open=!1),onConfirm:Q},null,8,["open","title","initial"]),ke(wn,{open:!!oe.value,title:"删除分类",message:oe.value?"将删除分类「"+oe.value.name+"」。历史记录不受影响,仍按原分类展示。":"","confirm-text":"删除",danger:"",onCancel:z[21]||(z[21]=de=>oe.value=null),onConfirm:te},null,8,["open","message"]),ke(wn,{open:!!S.value,title:"导入确认",message:S.value?"将从文件「"+S.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:z[22]||(z[22]=de=>S.value=null),onConfirm:Te},null,8,["open","message"]),ke(wn,{open:He.value,title:"删除用户确认",message:"将永久删除云端账号「"+Z.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:z[23]||(z[23]=de=>He.value=!1),onConfirm:bt},null,8,["open","message"])]))}}),sC=Kt(nC,[["__scopeId","data-v-10f77319"]]),oC={class:"tp-main"},rC={class:"tp-title"},aC={class:"tp-meta"},iC={class:"tp-time num"},lC=Dt({__name:"TimerPanel",setup(e){const t=P(null),n=P(Date.now());let o=null,r=null;async function i(){try{t.value=await wh()}catch{}}const c=ot(()=>{const h=t.value;if(!h||!h.timer_started_at)return 0;const _=(h.actual_minutes||0)*60,A=Math.max(0,Math.floor((n.value-new Date(h.timer_started_at).getTime())/1e3));return _+A}),f=ot(()=>{const h=c.value,_=Math.floor(h/3600),A=Math.floor(h%3600/60),x=h%60,M=G=>String(G).padStart(2,"0");return _>0?_+":"+M(A)+":"+M(x):A+":"+M(x)});async function v(){const h=t.value;h&&(await $a(h.id),Ve("已停止计时:"+h.title),await i())}function b(){location.hash="#/plan"}return vt(yd,()=>{i()}),ln(()=>{i(),o=window.setInterval(()=>{i()},15e3),r=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",i)}),Cn(()=>{o!==null&&window.clearInterval(o),r!==null&&window.clearInterval(r),window.removeEventListener("focus",i)}),(h,_)=>($(),kt(hs,{name:"tp"},{default:Rn(()=>[t.value&&t.value.timer_started_at?($(),T("div",{key:0,class:"tp",onClick:b,title:"点击查看计划页"},[_[0]||(_[0]=l("span",{class:"tp-pulse"},null,-1)),l("span",oC,[l("span",rC,q(t.value.title),1),l("span",aC,q(t.value.kind)+" · 计时中",1)]),l("span",iC,q(f.value),1),l("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Nt(v,["stop"])},"停止")])):ve("",!0)]),_:1}))}}),uC=Kt(lC,[["__scopeId","data-v-a8f9ed22"]]),cC={class:"admin-page"},dC={class:"card table-card"},fC={class:"toolbar"},pC={key:0,class:"form-error tb-error"},vC={class:"admin-table"},mC={class:"td-name","data-label":"用户名"},hC={"data-label":"角色"},yC={key:0,class:"role-badge"},gC={key:1,class:"muted"},bC={class:"muted num","data-label":"创建时间"},wC={class:"muted num","data-label":"数据量"},_C={class:"td-ops"},kC={class:"ops"},CC=["onClick"],xC=["disabled","onClick"],$C={key:0},SC={key:1,class:"muted load-line"},EC={class:"dialog",role:"dialog","aria-label":"新增用户"},TC={class:"dialog-head"},AC={class:"dialog-body"},PC={class:"form-row"},OC={class:"form-row"},MC={class:"form-row"},IC={key:0,class:"form-error"},jC={class:"dialog-btns"},DC=["disabled"],LC={class:"dialog",role:"dialog","aria-label":"重置密码"},KC={class:"dialog-head"},RC={class:"dialog-title"},FC={class:"dialog-body"},NC={class:"form-row"},VC={key:0,class:"form-error"},BC={class:"dialog-btns"},UC=["disabled"],qC=Dt({__name:"UserAdminView",setup(e){const t=P([]),n=P(""),o=P(!0),r=P("");async function i(I,S){const O=await Ns();let Z=xa();if(!Z){const Ee=pn(),be=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ee==null?void 0:Ee.username,password:Ee==null?void 0:Ee.password})});if(be.ok){const Ae=await be.json();Z=String(Ae.token||""),Ho(Z)}}const Oe=await fetch(O+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:S?JSON.stringify(S):void 0});if(Oe.status===401&&pn()){const Ee=pn(),be=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ee==null?void 0:Ee.username,password:Ee==null?void 0:Ee.password})});if(be.ok){const Ae=await be.json();Z=String(Ae.token||""),Ho(Z);const He=await fetch(O+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:S?JSON.stringify(S):void 0});return{ok:He.ok,status:He.status,data:await He.json().catch(()=>({}))}}}return{ok:Oe.ok,status:Oe.status,data:await Oe.json().catch(()=>({}))}}async function c(){o.value=!0,r.value="";const I=await i("/api/admin/users");if(!I.ok){o.value=!1,r.value=I.data&&I.data.error||"加载失败 "+I.status;return}t.value=I.data.users||[],n.value=I.data.me||"",o.value=!1}function f(I){return I<=0?"--":I<1024?I+" B":I<1024*1024?(I/1024).toFixed(1)+" KB":(I/1024/1024).toFixed(2)+" MB"}function v(I){return(I||"").slice(0,10)}const b=P(!1),h=P(""),_=P(""),A=P(""),x=P(""),M=P(!1);function G(){b.value=!0,x.value="",h.value="",_.value="",A.value=""}async function oe(){const I=h.value.trim();if(_.value!==A.value){x.value="两次输入的密码不一致";return}if(_.value.length<6){x.value="密码至少 6 位";return}M.value=!0;const S=await i("/api/admin/users/create",{username:I,password:_.value});if(M.value=!1,!S.ok){x.value=S.data&&S.data.error||"创建失败 "+S.status;return}Ve("用户「"+I+"」已创建"),b.value=!1,await c()}const le=P(null),ce=P(""),Y=P(""),E=P(!1);function U(I){le.value=I,ce.value="",Y.value=""}async function Q(){if(!le.value)return;if(ce.value.length<6){Y.value="密码至少 6 位";return}E.value=!0;const I=await i("/api/admin/users/password",{userId:le.value.id,newPassword:ce.value});if(E.value=!1,!I.ok){Y.value=I.data&&I.data.error||"重置失败 "+I.status;return}Ve("已重置「"+le.value.username+"」的登录密码"),le.value=null}const B=P(null);async function te(){if(!B.value)return;const I=await i("/api/admin/users/delete",{userId:B.value.id});if(!I.ok){B.value=null,Ve(I.data&&I.data.error||"删除失败");return}Ve("已删除账号「"+B.value.username+"」及其全部云端数据"),B.value=null,await c()}return ln(c),(I,S)=>($(),T("div",cC,[l("div",dC,[l("div",fC,[S[12]||(S[12]=l("div",{class:"head-wrap"},[l("div",{class:"tb-title"},"用户管理"),l("div",{class:"muted tb-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:G},[ke(ze,{name:"plus",size:14}),S[11]||(S[11]=gt(" 新增用户 ",-1))])]),r.value?($(),T("div",pC,q(r.value),1)):ve("",!0),l("table",vC,[S[14]||(S[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),T(je,null,nt(t.value,O=>($(),T("tr",{key:O.id},[l("td",mC,q(O.username),1),l("td",hC,[O.role==="admin"?($(),T("span",yC,"管理员")):($(),T("span",gC,"普通用户"))]),l("td",bC,q(v(O.created_at)),1),l("td",wC,q(f(O.data_bytes)),1),l("td",_C,[l("div",kC,[l("button",{class:"btn btn-xs",onClick:Z=>U(O)},"重置密码",8,CC),l("button",{class:"btn btn-xs btn-danger",disabled:O.id===n.value,onClick:Z=>B.value=O},"删除",8,xC)])])]))),128)),!o.value&&!t.value.length?($(),T("tr",$C,[...S[13]||(S[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):ve("",!0)])]),o.value?($(),T("div",SC,"加载中")):ve("",!0)]),S[20]||(S[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),kt(Kn,{to:"body"},[b.value?($(),T("div",{key:0,class:"mask",onClick:S[5]||(S[5]=Nt(O=>b.value=!1,["self"]))},[l("div",EC,[l("div",TC,[S[15]||(S[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:S[0]||(S[0]=O=>b.value=!1)},[ke(ze,{name:"close",size:16})])]),l("div",AC,[l("div",PC,[S[16]||(S[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Pe(l("input",{class:"input","onUpdate:modelValue":S[1]||(S[1]=O=>h.value=O),placeholder:"如:xiaowang"},null,512),[[Re,h.value]])]),l("div",OC,[S[17]||(S[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Pe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[2]||(S[2]=O=>_.value=O),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Re,_.value]])]),l("div",MC,[S[18]||(S[18]=l("label",null,"确认密码",-1)),Pe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[3]||(S[3]=O=>A.value=O),onKeydown:Ot(oe,["enter"])},null,544),[[Re,A.value]])]),x.value?($(),T("div",IC,q(x.value),1)):ve("",!0)]),l("div",jC,[l("button",{class:"btn btn-sm",onClick:S[4]||(S[4]=O=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:M.value||!h.value.trim(),onClick:oe},q(M.value?"创建中":"创建"),9,DC)])])])):ve("",!0)])),($(),kt(Kn,{to:"body"},[le.value?($(),T("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Nt(O=>le.value=null,["self"]))},[l("div",LC,[l("div",KC,[l("span",RC,"重置「"+q(le.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:S[6]||(S[6]=O=>le.value=null)},[ke(ze,{name:"close",size:16})])]),l("div",FC,[l("div",NC,[S[19]||(S[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Pe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[7]||(S[7]=O=>ce.value=O),onKeydown:Ot(Q,["enter"])},null,544),[[Re,ce.value]])]),Y.value?($(),T("div",VC,q(Y.value),1)):ve("",!0)]),l("div",BC,[l("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=O=>le.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:E.value,onClick:Q},q(E.value?"提交中":"重置"),9,UC)])])])):ve("",!0)])),ke(wn,{open:!!B.value,title:"删除用户确认",message:B.value?"将永久删除云端账号「"+B.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:S[10]||(S[10]=O=>B.value=null),onConfirm:te},null,8,["open","message"])]))}}),HC=Kt(qC,[["__scopeId","data-v-2d48d2c9"]]),zC={class:"login-page"},WC={class:"card login-card"},GC={class:"login-brand"},YC={class:"brand-icon"},JC={class:"seg"},XC=["placeholder"],QC={key:1,class:"form-error"},ZC=["disabled"],ex=Dt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,o=P("login"),r=P(""),i=P(""),c=P(""),f=P(""),v=P(!1);function b(_){o.value=_,f.value="",c.value=""}async function h(){if(!v.value){f.value="",v.value=!0;try{let _;if(o.value==="login")_=await Om(r.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Mm(r.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,A)=>($(),T("div",zC,[l("div",WC,[l("div",GC,[l("div",YC,[ke(ze,{name:"calendar",size:22})]),A[5]||(A[5]=l("div",{class:"login-title"},"实习工作日志",-1)),A[6]||(A[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),A[7]||(A[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",JC,[l("button",{class:Je(["seg-btn",{active:o.value==="login"}]),onClick:A[0]||(A[0]=x=>b("login"))},"登录",2),l("button",{class:Je(["seg-btn",{active:o.value==="create"}]),onClick:A[1]||(A[1]=x=>b("create"))},"创建用户",2)]),Pe(l("input",{class:"input","onUpdate:modelValue":A[2]||(A[2]=x=>r.value=x),placeholder:"用户名(2 到 20 个字符)",onKeydown:Ot(h,["enter"])},null,544),[[Re,r.value]]),Pe(l("input",{type:"password",class:"input","onUpdate:modelValue":A[3]||(A[3]=x=>i.value=x),placeholder:o.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Ot(h,["enter"])},null,40,XC),[[Re,i.value]]),o.value==="create"?Pe(($(),T("input",{key:0,type:"password",class:"input","onUpdate:modelValue":A[4]||(A[4]=x=>c.value=x),placeholder:"再次输入密码",onKeydown:Ot(h,["enter"])},null,544)),[[Re,c.value]]):ve("",!0),f.value?($(),T("div",QC,q(f.value),1)):ve("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:h},q(o.value==="login"?"登录":"创建并进入"),9,ZC),A[8]||(A[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),tx=Kt(ex,[["__scopeId","data-v-e9c1c40d"]]),nx={key:1,class:"app"},sx={class:"side"},ox={class:"brand-mark"},rx={class:"side-nav"},ax={key:0,class:"nav-group"},ix=["data-tip","onClick"],lx={class:"nav-label"},ux={class:"side-foot"},cx={class:"avatar"},dx={class:"foot-name"},fx={class:"main"},px={class:"topbar"},vx={class:"title"},mx={class:"gsearch"},hx={key:0,class:"gs-panel"},yx={key:0,class:"gs-group muted"},gx=["onMousedown"],bx={class:"tag"},wx={class:"gs-text"},_x={class:"muted num gs-date"},kx={key:1,class:"gs-group muted"},Cx=["onMousedown"],xx={class:"gs-text"},$x={class:"muted gs-sub"},Sx={key:1,class:"gs-empty muted"},Ex={class:"topbar-actions"},Tx=["disabled"],Ax={class:"num"},Px={class:"content"},Ox={class:"content-inner"},Mx={class:"tabbar"},Ix=["onClick"],jx={class:"sheet-user num"},Dx=["onClick"],Lx={class:"sheet-name"},Kx={class:"msw"},Rx={class:"msw-bar"},Fx={class:"msw-results"},Nx={key:0,class:"gs-group muted"},Vx=["onMousedown"],Bx={class:"tag"},Ux={class:"gs-text"},qx={class:"muted num gs-date"},Hx={key:1,class:"gs-group muted"},zx=["onMousedown"],Wx={class:"gs-text"},Gx={class:"muted gs-sub"},Yx={key:1,class:"gs-empty muted"},Jx={class:"toast-wrap"},Xx=Dt({__name:"App",setup(e){const t=by(),n=P(zo());async function o(g){n.value=g,aa(g.userId),location.hash="#/calendar",U.value="calendar",await Me(),await Le(),c();try{await bd(),await no()}catch{}Ve("欢迎,"+g.username);const m=sessionStorage.getItem("dsh_migrate_toast");m&&(sessionStorage.removeItem("dsh_migrate_toast"),Ve("已迁移原有数据 "+m+" 条"))}async function r(){Ae.value=!1,Ee.value=!1,Gm(),i!==null&&(window.clearInterval(i),i=null),await jm(),n.value=null,U.value="calendar",location.hash="#/calendar",Ve("已退出登录")}let i=null;function c(){Wm(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{no()},60*1e3),no()}const f=P(null),v=P(""),b=P(!1),h=P({logs:[],memos:[]});let _=null;const A=ot(()=>!!(h.value.logs.length||h.value.memos.length));function x(){_&&window.clearTimeout(_);const g=v.value;_=window.setTimeout(async()=>{const m=g.trim();if(!m){h.value={logs:[],memos:[]};return}const C=await Promise.all([Kh(m,8),Rh(m,4)]);h.value={logs:C[0],memos:C[1]}},200)}function M(){v.value="",h.value={logs:[],memos:[]},b.value=!1}function G(g){Fi.value=g.date,Q("calendar"),M()}function oe(g){Ni.value=g.id,Q("memo"),M()}function le(){window.setTimeout(()=>{b.value=!1},150)}function ce(g){var m;(g.ctrlKey||g.metaKey)&&g.key.toLowerCase()==="k"&&(g.preventDefault(),(m=f.value)==null||m.focus())}const Y=[{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 E(){var m;const g=(location.hash||"").replace("#/","");return!Y.some(C=>C.key===g)||g==="admin"&&(((m=zo())==null?void 0:m.username)||"")!=="xionglin"?"calendar":g}const U=P(E());window.addEventListener("hashchange",()=>{U.value=E()});function Q(g){location.hash="#/"+g}const B=ot(()=>Y.find(g=>g.key===U.value)||Y[0]),te=ot(()=>{var g;return(((g=n.value)==null?void 0:g.username)||"")==="xionglin"}),I=ot(()=>te.value?Y:Y.filter(g=>g.key!=="admin")),S=ot(()=>{const g=Y.filter(m=>!Z.includes(m.key));return te.value?g:g.filter(m=>m.key!=="admin")}),O=ot(()=>S.value.some(g=>g.key===U.value));vt([te,U],()=>{U.value==="admin"&&!te.value&&Q("calendar")},{immediate:!0});const Z=["calendar","today","plan","ledger"],Oe=Y.filter(g=>Z.includes(g.key)),Ee=P(!1);function be(g){Ee.value=!1,Q(g)}const Ae=P(!1),He=P(null);function qe(){Ae.value=!0,window.setTimeout(()=>{var g;return(g=He.value)==null?void 0:g.focus()},60)}function Xe(g){G(g),Ae.value=!1}function pe(g){oe(g),Ae.value=!1}const me=P(it()),re=P(void 0),ae=P(!1);async function Me(){if(re.value=await kn(me.value),ae.value=!1,new Date().getHours()<4){const m=await kn(Ut(me.value,-1));ae.value=!!(m&&m.clock_in_at&&!m.clock_out_at)}}const ft=ot(()=>{const g=re.value;return g&&g.clock_in_at&&!g.clock_out_at?!0:ae.value&&!(g&&g.clock_in_at)}),Ct=ot(()=>{const g=re.value;return!!(g&&g.clock_in_at&&g.clock_out_at)}),xt=ot(()=>{const g=re.value;return ft.value?"下班打卡":Ct.value?"已打卡 "+_n(g==null?void 0:g.clock_in_at)+" - "+_n(g==null?void 0:g.clock_out_at):"上班打卡"});async function qt(){if(ft.value)try{await lh()}catch{}else await Sd(me.value);await Me(),is()}vt(uo,()=>{n.value&&Me()});const bt=P(!1);async function Le(){if((await vs()).remind_weekly==="off"){bt.value=!1;return}const m=new Date().getDay();if(m===5||m===6||m===0){const C=await yl(Zs(me.value));bt.value=!C||!C.highlights&&!C.challenges&&!C.plan_next}else bt.value=!1}return ln(async()=>{window.addEventListener("keydown",ce),n.value&&(aa(n.value.userId),await Me(),await Le(),c())}),(g,m)=>{var C,j,se;return n.value?($(),T("div",nx,[l("nav",sx,[l("div",{class:"brand",onClick:m[0]||(m[0]=W=>Q("calendar"))},[l("span",ox,[ke(ze,{name:"calendar",size:15})]),m[12]||(m[12]=l("span",{class:"brand-name"},"实习工作日志",-1))]),l("div",rx,[($(!0),T(je,null,nt(I.value,(W,we)=>($(),T(je,{key:W.key},[we===0||W.group!==I.value[we-1].group?($(),T("div",ax,q(W.group),1)):ve("",!0),l("button",{class:Je(["nav-btn",{active:U.value===W.key}]),"data-tip":W.name,onClick:_e=>Q(W.key)},[ke(ze,{name:W.icon,size:17},null,8,["name"]),l("span",lx,q(W.name),1)],10,ix)],64))),128))]),l("div",ux,[l("span",cx,q((((C=n.value)==null?void 0:C.username)||"用户").slice(0,1).toUpperCase()),1),l("span",dx,q((j=n.value)==null?void 0:j.username),1),l("button",{class:"icon-btn",title:"退出登录",onClick:r},[ke(ze,{name:"export",size:15})])])]),l("div",fx,[l("header",px,[l("span",vx,q(B.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:qe},[ke(ze,{name:"search",size:16})]),l("div",mx,[ke(ze,{name:"search",size:14,class:"gs-icon"}),Pe(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":m[1]||(m[1]=W=>v.value=W),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:x,onFocus:m[2]||(m[2]=W=>b.value=!0),onBlur:le,onKeydown:Ot(M,["esc"])},null,544),[[Re,v.value]]),b.value&&v.value.trim()?($(),T("div",hx,[A.value?($(),T(je,{key:0},[h.value.logs.length?($(),T("div",yx,"工作记录")):ve("",!0),($(!0),T(je,null,nt(h.value.logs,W=>($(),T("div",{key:"l"+W.id,class:"gs-item",onMousedown:Nt(we=>G(W),["prevent"])},[l("span",bx,q(sn(qo)(W.category)),1),l("span",wx,q(W.content),1),l("span",_x,q(W.date),1)],40,gx))),128)),h.value.memos.length?($(),T("div",kx,"备忘录")):ve("",!0),($(!0),T(je,null,nt(h.value.memos,W=>($(),T("div",{key:"m"+W.id,class:"gs-item",onMousedown:Nt(we=>oe(W),["prevent"])},[l("span",xx,q(W.title||"无标题"),1),l("span",$x,q(W.content),1)],40,Cx))),128))],64)):($(),T("div",Sx,"无匹配结果"))])):ve("",!0)]),m[14]||(m[14]=l("span",{class:"flex1"},null,-1)),l("div",Ex,[bt.value?($(),T("button",{key:0,class:"week-tip",onClick:m[3]||(m[3]=W=>Q("report"))},[...m[13]||(m[13]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),gt(" 填写本周周记 ",-1)])])):ve("",!0),l("button",{class:"btn btn-primary",disabled:Ct.value,onClick:qt},[ke(ze,{name:Ct.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",Ax,q(xt.value),1)],8,Tx)])]),l("main",Px,[l("div",Ox,[U.value==="calendar"?($(),kt(Og,{key:0})):U.value==="today"?($(),kt(tb,{key:1})):U.value==="plan"?($(),kt(lw,{key:2})):U.value==="stats"?($(),kt(Fw,{key:3})):U.value==="report"?($(),kt(x_,{key:4})):U.value==="ledger"?($(),kt(E1,{key:5})):U.value==="memo"?($(),kt(H1,{key:6})):U.value==="vault"?($(),kt(V0,{key:7})):U.value==="admin"?($(),kt(HC,{key:8})):($(),kt(sC,{key:9}))])]),l("nav",Mx,[($(!0),T(je,null,nt(sn(Oe),W=>($(),T("button",{key:W.key,class:Je(["tab-btn",{active:U.value===W.key}]),onClick:we=>Q(W.key)},[ke(ze,{name:W.icon,size:20},null,8,["name"]),l("span",null,q(W.name),1)],10,Ix))),128)),l("button",{class:Je(["tab-btn",{active:O.value}]),onClick:m[4]||(m[4]=W=>Ee.value=!0)},[ke(ze,{name:"more",size:20}),m[15]||(m[15]=l("span",null,"更多",-1))],2)]),Ee.value?($(),T("div",{key:0,class:"sheet-mask",onClick:m[7]||(m[7]=W=>Ee.value=!1)},[l("div",{class:"more-sheet",onClick:m[6]||(m[6]=Nt(()=>{},["stop"]))},[m[17]||(m[17]=l("div",{class:"sheet-handle"},null,-1)),l("div",jx,q((se=n.value)==null?void 0:se.username),1),($(!0),T(je,null,nt(S.value,W=>($(),T("button",{key:W.key,class:"sheet-row",onClick:we=>be(W.key)},[ke(ze,{name:W.icon,size:18},null,8,["name"]),l("span",Lx,q(W.name),1),ke(ze,{name:"chevron-right",size:14,class:"sheet-go"})],8,Dx))),128)),m[18]||(m[18]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:m[5]||(m[5]=W=>{Ee.value=!1,r()})},[ke(ze,{name:"close",size:18}),m[16]||(m[16]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):ve("",!0),Ae.value?($(),T("div",{key:1,class:"msw-mask",onClick:m[11]||(m[11]=Nt(W=>Ae.value=!1,["self"]))},[l("div",Kx,[l("div",Rx,[ke(ze,{name:"search",size:16,class:"msw-icon"}),Pe(l("input",{ref_key:"msInput",ref:He,class:"msw-input","onUpdate:modelValue":m[8]||(m[8]=W=>v.value=W),placeholder:"搜索工作记录与备忘录",onInput:x,onKeydown:m[9]||(m[9]=Ot(W=>Ae.value=!1,["esc"]))},null,544),[[Re,v.value]]),l("button",{class:"icon-btn",onClick:m[10]||(m[10]=W=>{M(),Ae.value=!1})},[ke(ze,{name:"close",size:16})])]),l("div",Fx,[A.value?($(),T(je,{key:0},[h.value.logs.length?($(),T("div",Nx,"工作记录")):ve("",!0),($(!0),T(je,null,nt(h.value.logs,W=>($(),T("div",{key:"l"+W.id,class:"msw-item",onMousedown:Nt(we=>Xe(W),["prevent"])},[l("span",Bx,q(sn(qo)(W.category)),1),l("span",Ux,q(W.content),1),l("span",qx,q(W.date),1)],40,Vx))),128)),h.value.memos.length?($(),T("div",Hx,"备忘录")):ve("",!0),($(!0),T(je,null,nt(h.value.memos,W=>($(),T("div",{key:"m"+W.id,class:"msw-item",onMousedown:Nt(we=>pe(W),["prevent"])},[l("span",Wx,q(W.title||"无标题"),1),l("span",Gx,q(W.content),1)],40,zx))),128))],64)):v.value.trim()?($(),T("div",Yx,"无匹配结果")):ve("",!0)])])])):ve("",!0)]),n.value?($(),kt(uC,{key:0})):ve("",!0),l("div",Jx,[ke(Av,{name:"toast"},{default:Rn(()=>[($(!0),T(je,null,nt(sn(t),W=>($(),T("div",{key:W.id,class:"toast"},q(W.text),1))),128))]),_:1})])])):($(),kt(tx,{key:0,onLogin:o}))}}}),Qx=Kt(Xx,[["__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",i=>{i.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 Zx(){const e=await Im();e&&aa(e.userId);const t=qv(Qx);t.config.errorHandler=(n,o,r)=>{const i=n;Vr("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.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(()=>{})})}Zx().catch(e=>{Vr("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Dd as W,Md as _,Ug as b,jd as r}; diff --git a/intern-log/dist/assets/web-OZOB5r8S.js b/intern-log/dist/assets/web-Cn9aGqjN.js similarity index 98% rename from intern-log/dist/assets/web-OZOB5r8S.js rename to intern-log/dist/assets/web-Cn9aGqjN.js index e5fb993..31b092e 100644 --- a/intern-log/dist/assets/web-OZOB5r8S.js +++ b/intern-log/dist/assets/web-Cn9aGqjN.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-BkEETrCl.js";import{Encoding as E}from"./index-oGn7bwPd.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-vpp14W9X.js";import{Encoding as E}from"./index-CrEWT5E8.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 c31250d..e1517d1 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 91c55db..3d608f9 100644 --- a/intern-log/package.json +++ b/intern-log/package.json @@ -1,7 +1,7 @@ { "name": "intern-log", "private": true, - "version": "0.6.9", + "version": "0.7.0", "type": "module", "scripts": { "dev": "vite", diff --git a/intern-log/src/views/LedgerView.vue b/intern-log/src/views/LedgerView.vue index 3180ca4..2f5231b 100644 --- a/intern-log/src/views/LedgerView.vue +++ b/intern-log/src/views/LedgerView.vue @@ -86,9 +86,16 @@ const summary = computed(() => { const typeFilter = ref<'all' | TxType>('all') const reimbFilter = ref<'all' | 'pending' | 'done'>('all') +const catFilter = ref('all') +// 切换月份时重置分类筛选(新月份的分类集合可能不同) +watch(monthRef, () => { catFilter.value = 'all' }) +const usedCategories = computed(() => + Array.from(new Set(rows.value.map(r => r.category))).sort((a, b) => a.localeCompare(b, 'zh')) +) const filtered = computed(() => sorted.value.filter(r => { if (typeFilter.value !== 'all' && r.type !== typeFilter.value) return false + if (catFilter.value !== 'all' && r.category !== catFilter.value) return false if (reimbFilter.value === 'pending' && !(r.type === 'expense' && r.reimbursable === 1 && r.reimbursed !== 1)) return false if (reimbFilter.value === 'done' && !(r.reimbursable === 1 && r.reimbursed === 1)) return false return true @@ -227,6 +234,10 @@ async function confirmDelete() { +