From 5a6ab2b32268dc5c01e89959186dcc95d4772441 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Oct 2026 21:48:33 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E5=85=A8=E7=BB=84=E4=BB=B6=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=89=93=E7=A3=A8(=E6=8C=89=E4=B8=8B=E6=80=81/?= =?UTF-8?q?=E7=BB=86=E6=BB=9A=E5=8A=A8=E6=9D=A1/tooltip=E4=BF=AE=E5=A4=8D/?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8D=A1=E8=AF=AD=E4=B9=89=E8=89=B2=E6=9D=A1?= =?UTF-8?q?/=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=AE=8C=E6=88=90=E6=80=81/?= =?UTF-8?q?=E5=8D=B1=E9=99=A9=E7=A1=AE=E8=AE=A4=E8=AD=A6=E7=A4=BA/?= =?UTF-8?q?=E8=80=97=E6=97=B6chips/=E6=97=A5=E5=8E=86=E4=BB=8A=E6=97=A5?= =?UTF-8?q?=E9=AB=98=E4=BA=AE/=E5=AF=86=E7=A0=81=E7=AD=89=E5=AE=BD/?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E8=B4=A8=E6=84=9F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/release-notes-v0.6.7.md | 27 ++++++++++++++++++ intern-log/dist/assets/index-BuZbSc5_.css | 1 - intern-log/dist/assets/index-CsewO6wh.css | 1 + .../{index-B69AvT0j.js => index-_jYZgWOD.js} | 4 +-- .../{index-DP7vL7H5.js => index-o_Kd7ZbB.js} | 28 +++++++++---------- .../{web-B4MkFHMk.js => web-CEj0vlG8.js} | 2 +- intern-log/dist/index.html | 4 +-- intern-log/package.json | 2 +- intern-log/src/App.vue | 13 ++++++++- intern-log/src/components/ConfirmDialog.vue | 3 +- intern-log/src/components/log/DayPanel.vue | 3 +- .../src/components/log/EditLogDialog.vue | 21 ++++++++++++++ intern-log/src/styles/tokens.css | 14 +++++++++- intern-log/src/views/CalendarView.vue | 6 ++-- intern-log/src/views/LedgerView.vue | 13 ++++++--- intern-log/src/views/LoginView.vue | 3 +- intern-log/src/views/PlanView.vue | 5 +++- intern-log/src/views/ReportView.vue | 1 + intern-log/src/views/VaultView.vue | 2 +- 19 files changed, 119 insertions(+), 34 deletions(-) create mode 100644 docs/release-notes-v0.6.7.md delete mode 100644 intern-log/dist/assets/index-BuZbSc5_.css create mode 100644 intern-log/dist/assets/index-CsewO6wh.css rename intern-log/dist/assets/{index-B69AvT0j.js => index-_jYZgWOD.js} (69%) rename intern-log/dist/assets/{index-DP7vL7H5.js => index-o_Kd7ZbB.js} (62%) rename intern-log/dist/assets/{web-B4MkFHMk.js => web-CEj0vlG8.js} (98%) diff --git a/docs/release-notes-v0.6.7.md b/docs/release-notes-v0.6.7.md new file mode 100644 index 0000000..f313042 --- /dev/null +++ b/docs/release-notes-v0.6.7.md @@ -0,0 +1,27 @@ +# v0.6.7 发布说明(2026-10-26) + +## 全组件 UI 审核打磨(19 个界面/组件逐一过审) + +**交互反馈** +- 按钮增加按下态(轻微下沉 + 主按钮阴影收起),主按钮带品牌色微阴影 +- 全局细滚动条(8px 圆角,滚动区域观感统一) +- 修复侧栏 tooltip:仅折叠态(平板)显示,宽侧栏不再多余弹泡 + +**语义色与信息层级** +- 记账统计卡增加语义色条:收入绿 / 支出灰 / 结余蓝 / 待报销橙 +- 长期计划进度条 100% 完成时变绿 +- 危险确认弹窗标题红色警示 +- 详情页出勤时间数字加大加粗;工作记录内容字重提升;总结页摘要数字加粗 +- 密码库密码文本改等宽字体 +- 记账表格金额列右对齐 + +**体验升级** +- 记录弹窗「耗时」新增快捷选择 chips(15/30/60/90/120 分) +- 登录页背景渐变质感、输入框加高 +- 日历:今日格子淡蓝高亮、非本月格灰底、周标题字重 +- 移动端「更多」弹层加拖拽指示条 + +## 部署 + +- 服务器:`cd /opt/daywork && git pull && cd server && docker compose up -d --build`(网页端即生效) +- 桌面 / 安卓:安装 0.6.7 安装包 diff --git a/intern-log/dist/assets/index-BuZbSc5_.css b/intern-log/dist/assets/index-BuZbSc5_.css deleted file mode 100644 index 42e45e4..0000000 --- a/intern-log/dist/assets/index-BuZbSc5_.css +++ /dev/null @@ -1 +0,0 @@ -.dialog[data-v-2e4b0ab5]{width:380px}.dialog-msg[data-v-2e4b0ab5]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-2e4b0ab5]{margin-top:20px}.dialog[data-v-f3b19176]{width:560px}.dp-head[data-v-5c65c1f9]{margin-bottom:12px}.dp-date[data-v-5c65c1f9]{font-size:14px;font-weight:600}.att-grid[data-v-5c65c1f9]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-5c65c1f9]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-5c65c1f9]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.val-empty[data-v-5c65c1f9]{color:var(--text-3)}.edit-row[data-v-5c65c1f9]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-5c65c1f9]{width:104px}.att-note[data-v-5c65c1f9]{margin-top:10px;font-size:12px}.att-actions[data-v-5c65c1f9]{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.form-footer[data-v-5c65c1f9]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.list-sec[data-v-5c65c1f9]{margin-bottom:4px}.sec-head[data-v-5c65c1f9]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-5c65c1f9]{margin-bottom:0}.item[data-v-5c65c1f9]{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-5c65c1f9]:hover{border-color:var(--border-strong);background:var(--bg-page)}.item-main[data-v-5c65c1f9]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-5c65c1f9]{cursor:text;word-break:break-all}.item-meta[data-v-5c65c1f9]{font-size:12px}.item-sub[data-v-5c65c1f9]{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-5c65c1f9]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.dp-head[data-v-5c65c1f9]{margin-bottom:10px}.att-grid[data-v-5c65c1f9]{grid-template-columns:1fr 1fr;gap:10px 12px}.att-cell label[data-v-5c65c1f9]{margin-bottom:3px}.att-actions[data-v-5c65c1f9]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.att-actions .btn[data-v-5c65c1f9]{width:100%}.edit-row[data-v-5c65c1f9]{flex-wrap:wrap}.edit-row .time-input[data-v-5c65c1f9]{width:100%;flex:1 1 100%}.edit-row .btn[data-v-5c65c1f9]{flex:1}.item-main[data-v-5c65c1f9]{gap:6px}}.cal-toolbar[data-v-335328a3]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-335328a3]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-card[data-v-335328a3]{padding:0;overflow:hidden}.cal-head[data-v-335328a3],.cal-grid[data-v-335328a3]{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border)}.cal-week[data-v-335328a3]{background:var(--bg-subtle);text-align:center;padding:7px 0;font-size:12px;color:var(--text-3)}.cal-cell[data-v-335328a3]{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-335328a3]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-335328a3]{cursor:default}.cal-cell.selected[data-v-335328a3]{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}.daynum.today[data-v-335328a3]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-335328a3]{color:var(--text-3)}.cal-marks[data-v-335328a3]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-335328a3]{color:var(--text-3)}.mark-star[data-v-335328a3]{color:var(--accent)}.drawer[data-v-335328a3]{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-335328a3]{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-335328a3]{font-weight:600}.drawer-body[data-v-335328a3]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-335328a3],.drawer-leave-active[data-v-335328a3]{transition:opacity .15s ease}.drawer-enter-from[data-v-335328a3],.drawer-leave-to[data-v-335328a3]{opacity:0}@media (max-width: 720px){.cal-title[data-v-335328a3]{min-width:76px;font-size:13px}.drawer[data-v-335328a3]{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-eee1e1ed]{display:flex;flex-direction:column}.blk-head[data-v-eee1e1ed]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 2px 10px}.blk-head-text[data-v-eee1e1ed]{min-width:0}.blk-title[data-v-eee1e1ed]{font-size:14px;font-weight:600}.blk-sub[data-v-eee1e1ed]{font-size:12px;margin-top:1px}.day-head[data-v-eee1e1ed]{margin-top:18px}.day-ops[data-v-eee1e1ed]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.date-chip[data-v-eee1e1ed]{min-width:74px;text-align:center;font-weight:600;font-size:13px}.date-chip.today[data-v-eee1e1ed]{color:var(--accent)}.timer-live[data-v-eee1e1ed]{color:var(--accent);font-weight:600}.goal-card[data-v-eee1e1ed]{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;margin-bottom:10px}.goal-main[data-v-eee1e1ed]{flex:1;min-width:0}.goal-line[data-v-eee1e1ed]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.goal-name[data-v-eee1e1ed]{font-size:14px;font-weight:500;word-break:break-all}.goal-range[data-v-eee1e1ed]{font-size:12px}.goal-bar[data-v-eee1e1ed]{height:6px;border-radius:3px;background:var(--bg-subtle);overflow:hidden;margin-top:10px}.goal-bar-fill[data-v-eee1e1ed]{display:block;height:100%;background:var(--accent);border-radius:3px}.goal-meta[data-v-eee1e1ed]{font-size:12px;margin-top:6px}.goal-ops[data-v-eee1e1ed]{display:flex;gap:4px}.list-card[data-v-eee1e1ed]{overflow:hidden}.plan-item[data-v-eee1e1ed]{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border)}.plan-item[data-v-eee1e1ed]:last-child{border-bottom:none}.plan-item.done[data-v-eee1e1ed]{opacity:.6}.plan-item.skip[data-v-eee1e1ed]{opacity:.48}.plan-item.running[data-v-eee1e1ed]{box-shadow:inset 3px 0 0 var(--accent)}.pi-time[data-v-eee1e1ed]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-eee1e1ed]{flex:1;min-width:0}.pi-title[data-v-eee1e1ed]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-eee1e1ed]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-eee1e1ed]{text-decoration:line-through}.state-done[data-v-eee1e1ed]{color:var(--ok);font-size:12px}.state-skip[data-v-eee1e1ed]{color:var(--text-3);font-size:12px}.pi-note[data-v-eee1e1ed],.pi-meta[data-v-eee1e1ed]{font-size:12px;margin-top:3px}.pi-ops[data-v-eee1e1ed]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-eee1e1ed]{color:var(--accent);border-color:var(--accent)}.empty[data-v-eee1e1ed]{padding:28px 16px}.dialog[data-v-eee1e1ed]{width:420px}.form-row[data-v-eee1e1ed]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row.two[data-v-eee1e1ed]{flex-direction:row;gap:10px}.form-row.two>div[data-v-eee1e1ed]{flex:1;display:flex;flex-direction:column;gap:5px}.goal-hint[data-v-eee1e1ed]{font-size:12px;margin-top:8px}@media (max-width: 720px){.blk-head[data-v-eee1e1ed]{margin:0 0 10px}.day-head[data-v-eee1e1ed]{margin-top:16px}.day-ops[data-v-eee1e1ed]{width:100%}.day-ops .btn[data-v-eee1e1ed]{flex:1;min-width:0}.day-ops .btn-primary[data-v-eee1e1ed]{flex:1.5}.date-chip[data-v-eee1e1ed]{min-width:64px}.plan-item[data-v-eee1e1ed]{flex-wrap:wrap;padding:12px;gap:10px}.pi-time[data-v-eee1e1ed]{min-width:0;padding-top:0}.pi-ops[data-v-eee1e1ed]{width:100%;justify-content:flex-start;gap:8px}.pi-ops .btn-xs[data-v-eee1e1ed]{flex:1;min-height:32px}.goal-card[data-v-eee1e1ed]{position:relative;flex-direction:column;gap:8px}.goal-main[data-v-eee1e1ed]{padding-right:0}.goal-line[data-v-eee1e1ed]{padding-right:72px}.goal-ops[data-v-eee1e1ed]{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-7a4275e6]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-7a4275e6]{color:var(--danger);font-size:12px;margin:0 0 8px}.w-date[data-v-7a4275e6]{width:140px;flex:none}.report-grid[data-v-7a4275e6]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section-title[data-v-7a4275e6]{margin-bottom:10px}.section+.section[data-v-7a4275e6]{margin-top:12px}.note-label[data-v-7a4275e6]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-7a4275e6]{font-size:12px;margin-top:6px}.md-editor[data-v-7a4275e6]{min-height:420px;line-height:1.7}.sum-row[data-v-7a4275e6]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-7a4275e6]{font-weight:600;margin:12px 0 4px;font-size:12px;color:var(--text-2)}.sum-item[data-v-7a4275e6]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-7a4275e6]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-7a4275e6]{grid-template-columns:1fr}}@media (max-width: 720px){.report-toolbar[data-v-7a4275e6]{gap:8px}.report-toolbar .seg[data-v-7a4275e6]{flex:1 1 100%;display:flex}.report-toolbar .seg-btn[data-v-7a4275e6]{flex:1}.w-date[data-v-7a4275e6]{flex:1;min-width:0;width:auto}.md-editor[data-v-7a4275e6]{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-da2504e7]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-da2504e7]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-da2504e7]{width:110px;flex:none}.cards[data-v-da2504e7]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.card.sec[data-v-da2504e7],.card.section[data-v-da2504e7]{margin-top:12px}.bar-label[data-v-da2504e7]{width:56px}.bar-num[data-v-da2504e7]{width:118px}.td-note[data-v-da2504e7]{color:var(--text-2)}.tx-pending[data-v-da2504e7]{color:var(--warn);font-size:12px}.tx-done[data-v-da2504e7]{color:var(--ok);font-size:12px}.th-ops[data-v-da2504e7]{width:220px}.ops[data-v-da2504e7]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-da2504e7]{overflow-x:auto}.table-note[data-v-da2504e7]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 720px){.ledger-toolbar[data-v-da2504e7]{gap:8px}.ledger-toolbar .flex1[data-v-da2504e7]{display:none}.month-title[data-v-da2504e7]{min-width:0;flex:1;text-align:left}.w-filter[data-v-da2504e7]{flex:1 1 calc(50% - 4px);min-width:0;width:auto}.ledger-toolbar .btn-primary[data-v-da2504e7]{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-a96af9e5]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-a96af9e5]{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-a96af9e5]{font-size:15px;font-weight:600}.lock-tip[data-v-a96af9e5]{font-size:12px;line-height:1.7}.lock-btn[data-v-a96af9e5]{margin-top:4px}.vault-toolbar[data-v-a96af9e5]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-a96af9e5]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-a96af9e5]{padding-left:30px}.search-icon[data-v-a96af9e5]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-a96af9e5]{overflow-x:auto}.td-system[data-v-a96af9e5]{font-weight:500}.th-ops[data-v-a96af9e5]{width:150px}.pwd-cell[data-v-a96af9e5]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-a96af9e5]{letter-spacing:1px}.copyable[data-v-a96af9e5]{cursor:pointer}.copyable[data-v-a96af9e5]:hover{color:var(--accent)}.ops[data-v-a96af9e5]{display:flex;gap:4px;flex-wrap:wrap}.table-note[data-v-a96af9e5]{margin-top:10px;font-size:12px;text-align:right}.dialog[data-v-a96af9e5]{width:440px}.vp-field[data-v-a96af9e5]{margin-bottom:10px}.vp-tip[data-v-a96af9e5]{font-size:12px;margin-top:8px}.settings[data-v-aad752b5]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-aad752b5]{font-size:12px;margin-bottom:10px;line-height:1.7}.rule-grid[data-v-aad752b5]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-aad752b5]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-aad752b5]{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.proj-add[data-v-aad752b5]{display:flex;gap:8px}.proj-tip[data-v-aad752b5]{font-size:12px;margin-top:6px}.proj-row[data-v-aad752b5]{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-aad752b5]:last-child{border-bottom:none}.proj-name[data-v-aad752b5]{flex:1;word-break:break-all}.proj-name.archived[data-v-aad752b5]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-aad752b5]{font-size:12px}.ai-grid[data-v-aad752b5]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-aad752b5]{display:flex;gap:8px;flex-wrap:wrap}.cat-block[data-v-aad752b5]{margin-top:12px}.cat-block[data-v-aad752b5]:first-of-type{margin-top:0}.cat-head[data-v-aad752b5]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-aad752b5]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-aad752b5]{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-aad752b5]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-aad752b5]:hover{color:var(--accent)}.import-error[data-v-aad752b5]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-aad752b5]{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-089817d7]{min-height:100vh;min-height:100dvh;background:var(--bg-app);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-089817d7]{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-089817d7]{text-align:center;margin-bottom:6px}.brand-icon[data-v-089817d7]{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-089817d7]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-089817d7]{font-size:12px;margin-top:4px;line-height:1.7}.form-error[data-v-089817d7]{color:var(--danger);font-size:12px}.login-btn[data-v-089817d7]{margin-top:2px;height:36px}.login-note[data-v-089817d7]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-21234495]{display:flex;height:100vh;height:100dvh;overflow:hidden;background:var(--bg-app)}.side[data-v-21234495]{width:var(--side-w);flex:none;display:flex;flex-direction:column;background:var(--bg-page);border-right:1px solid var(--border)}.brand[data-v-21234495]{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-21234495]{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-21234495]{font-size:14px;font-weight:600;letter-spacing:.3px;white-space:nowrap}.side-nav[data-v-21234495]{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:2px}.nav-group[data-v-21234495]{font-size:11px;color:var(--text-3);padding:12px 8px 4px;letter-spacing:2px;white-space:nowrap}.nav-btn[data-v-21234495]{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-21234495]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-21234495]{background:var(--accent-bg);color:var(--accent);font-weight:500}.nav-btn.active[data-v-21234495]:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:2px;background:var(--accent)}.nav-label[data-v-21234495]{white-space:nowrap}.nav-btn[data-v-21234495]: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-21234495]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--border)}.avatar[data-v-21234495]{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-21234495]{flex:1;min-width:0;font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main[data-v-21234495]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-21234495]{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-21234495]{font-size:15px;font-weight:600;white-space:nowrap}.topbar-actions[data-v-21234495]{display:flex;align-items:center;gap:8px}.gsearch[data-v-21234495]{position:relative;width:320px;max-width:38vw}.gs-icon[data-v-21234495]{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-21234495]{height:32px;padding-left:31px;border-radius:999px;background:var(--bg-subtle);border-color:transparent}.gs-input[data-v-21234495]:focus{background:var(--bg-page);border-color:var(--accent)}.gs-panel[data-v-21234495]{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-21234495]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-21234495]{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-21234495]:hover{background:var(--bg-hover)}.gs-text[data-v-21234495],.gs-sub[data-v-21234495]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-21234495]{font-size:13px}.gs-sub[data-v-21234495]{font-size:12px}.gs-date[data-v-21234495]{font-size:12px;flex:none}.gs-empty[data-v-21234495]{padding:10px;font-size:12px;text-align:center}.week-tip[data-v-21234495]{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-21234495]:hover{background:#fdf4ec}.content[data-v-21234495]{flex:1;overflow:auto}.content-inner[data-v-21234495]{max-width:1280px;margin:0 auto;padding:20px 24px 48px}.toast-wrap[data-v-21234495]{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-21234495]{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-21234495],.toast-leave-to[data-v-21234495]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-21234495],.toast-leave-active[data-v-21234495]{transition:all .15s ease}.mob-search-btn[data-v-21234495]{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-21234495]{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-21234495]{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-21234495]{color:var(--accent);font-weight:500}.sheet-mask[data-v-21234495]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212966}.more-sheet[data-v-21234495]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:16px 16px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-user[data-v-21234495]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-21234495]{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-21234495]:hover,.sheet-row[data-v-21234495]:active{background:var(--bg-hover)}.sheet-name[data-v-21234495]{flex:1}.sheet-go[data-v-21234495]{color:var(--text-3)}.sheet-divider[data-v-21234495]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-21234495]{color:var(--danger)}.msw-mask[data-v-21234495]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-21234495]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-21234495]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-21234495]{color:var(--text-3)}.msw-input[data-v-21234495]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-21234495]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-21234495]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-21234495]:hover,.msw-item[data-v-21234495]:active{background:var(--bg-hover)}@media (max-width: 1000px) and (min-width: 721px){.side[data-v-21234495]{width:var(--side-w-collapsed)}.brand[data-v-21234495]{justify-content:center;padding:0}.brand-name[data-v-21234495],.nav-label[data-v-21234495],.nav-group[data-v-21234495]{display:none}.nav-btn[data-v-21234495]{justify-content:center;padding:0;width:40px;align-self:center}.nav-btn.active[data-v-21234495]:before{display:none}.side-foot[data-v-21234495]{flex-direction:column;gap:6px}.foot-name[data-v-21234495]{display:none}}@media (max-width: 720px){.app[data-v-21234495]{display:block;height:100dvh}.side[data-v-21234495]{display:none}.main[data-v-21234495]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-21234495]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-21234495]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-21234495],.gsearch .gs-panel[data-v-21234495]{display:none}.mob-search-btn[data-v-21234495]{display:flex}.topbar-actions[data-v-21234495]{margin-left:auto;gap:6px}.week-tip[data-v-21234495]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-21234495]{padding:0 12px;height:34px}.topbar-actions .btn .num[data-v-21234495]{font-size:12px}.tabbar[data-v-21234495]{display:flex}.tab-btn[data-v-21234495]{height:56px;font-size:11px}.tab-btn .icon[data-v-21234495]{width:22px;height:22px}.content[data-v-21234495]{flex:1;min-height:0}.content-inner[data-v-21234495]{max-width:none;padding:12px 12px calc(78px + env(safe-area-inset-bottom))}.toast-wrap[data-v-21234495]{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:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-deep);border-color:var(--accent-deep)}.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)}.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-CsewO6wh.css b/intern-log/dist/assets/index-CsewO6wh.css new file mode 100644 index 0000000..67a9560 --- /dev/null +++ b/intern-log/dist/assets/index-CsewO6wh.css @@ -0,0 +1 @@ +.dialog[data-v-40c3d6b5]{width:380px}.dialog-title.is-danger[data-v-40c3d6b5]{color:var(--danger)}.dialog-msg[data-v-40c3d6b5]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-40c3d6b5]{margin-top:20px}.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}.settings[data-v-aad752b5]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-aad752b5]{font-size:12px;margin-bottom:10px;line-height:1.7}.rule-grid[data-v-aad752b5]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-aad752b5]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-aad752b5]{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.proj-add[data-v-aad752b5]{display:flex;gap:8px}.proj-tip[data-v-aad752b5]{font-size:12px;margin-top:6px}.proj-row[data-v-aad752b5]{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-aad752b5]:last-child{border-bottom:none}.proj-name[data-v-aad752b5]{flex:1;word-break:break-all}.proj-name.archived[data-v-aad752b5]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-aad752b5]{font-size:12px}.ai-grid[data-v-aad752b5]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-aad752b5]{display:flex;gap:8px;flex-wrap:wrap}.cat-block[data-v-aad752b5]{margin-top:12px}.cat-block[data-v-aad752b5]:first-of-type{margin-top:0}.cat-head[data-v-aad752b5]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-aad752b5]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-aad752b5]{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-aad752b5]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-aad752b5]:hover{color:var(--accent)}.import-error[data-v-aad752b5]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-aad752b5]{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-B69AvT0j.js b/intern-log/dist/assets/index-_jYZgWOD.js similarity index 69% rename from intern-log/dist/assets/index-B69AvT0j.js rename to intern-log/dist/assets/index-_jYZgWOD.js index 78b649b..9920feb 100644 --- a/intern-log/dist/assets/index-B69AvT0j.js +++ b/intern-log/dist/assets/index-_jYZgWOD.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-B4MkFHMk.js","./index-DP7vL7H5.js","./index-BuZbSc5_.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-DP7vL7H5.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-B4MkFHMk.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-CEj0vlG8.js","./index-o_Kd7ZbB.js","./index-CsewO6wh.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-o_Kd7ZbB.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-CEj0vlG8.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-DP7vL7H5.js b/intern-log/dist/assets/index-o_Kd7ZbB.js similarity index 62% rename from intern-log/dist/assets/index-DP7vL7H5.js rename to intern-log/dist/assets/index-o_Kd7ZbB.js index 3a6cb0d..f0731db 100644 --- a/intern-log/dist/assets/index-DP7vL7H5.js +++ b/intern-log/dist/assets/index-o_Kd7ZbB.js @@ -2,26 +2,26 @@ * @vue/shared v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Yi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const mt={},Ms=[],Pn=()=>{},Hu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),Pt=Object.assign,Ji=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},uf=Object.prototype.hasOwnProperty,dt=(e,t)=>uf.call(e,t),He=Array.isArray,is=e=>Gr(e)==="[object Map]",Ls=e=>Gr(e)==="[object Set]",Ql=e=>Gr(e)==="[object Date]",Ye=e=>typeof e=="function",$t=e=>typeof e=="string",On=e=>typeof e=="symbol",ft=e=>e!==null&&typeof e=="object",zu=e=>(ft(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),Wu=Object.prototype.toString,Gr=e=>Wu.call(e),cf=e=>Gr(e).slice(8,-1),Gu=e=>Gr(e)==="[object Object]",Xi=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Er=Yi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},df=/-\w/g,gn=fa(e=>e.replace(df,t=>t.slice(1).toUpperCase())),ff=/\B([A-Z])/g,ms=fa(e=>e.replace(ff,"-$1").toLowerCase()),Yu=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),oi=fa(e=>e?`on${Yu(e)}`:""),An=(e,t)=>!Object.is(e,t),Io=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},pf=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let Zl;const va=()=>Zl||(Zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qn(e){if(He(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(vf).forEach(n=>{if(n){const r=n.split(mf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Xe(e){let t="";if($t(e))t=e;else if(He(e))for(let n=0;nus(n,t))}const Qu=e=>!!(e&&e.__v_isRef===!0),W=e=>$t(e)?e:e==null?"":He(e)||ft(e)&&(e.toString===Wu||!Ye(e.toString))?Qu(e)?W(e.value):JSON.stringify(e,Zu,2):String(e),Zu=(e,t)=>Qu(t)?Zu(e,t.value):is(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[ai(r,i)+" =>"]=o,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ai(n))}:On(t)?ai(t):ft(t)&&!He(t)&&!Gu(t)?String(t):t,ai=(e,t="")=>{var n;return On(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function Yi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const mt={},Ms=[],Pn=()=>{},Hu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),Pt=Object.assign,Ji=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},uf=Object.prototype.hasOwnProperty,dt=(e,t)=>uf.call(e,t),He=Array.isArray,is=e=>Gr(e)==="[object Map]",Ls=e=>Gr(e)==="[object Set]",Ql=e=>Gr(e)==="[object Date]",Je=e=>typeof e=="function",$t=e=>typeof e=="string",On=e=>typeof e=="symbol",ft=e=>e!==null&&typeof e=="object",zu=e=>(ft(e)||Je(e))&&Je(e.then)&&Je(e.catch),Wu=Object.prototype.toString,Gr=e=>Wu.call(e),cf=e=>Gr(e).slice(8,-1),Gu=e=>Gr(e)==="[object Object]",Xi=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Er=Yi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},df=/-\w/g,gn=fa(e=>e.replace(df,t=>t.slice(1).toUpperCase())),ff=/\B([A-Z])/g,ms=fa(e=>e.replace(ff,"-$1").toLowerCase()),Yu=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),oi=fa(e=>e?`on${Yu(e)}`:""),An=(e,t)=>!Object.is(e,t),Io=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},pf=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let Zl;const va=()=>Zl||(Zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qn(e){if(He(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(vf).forEach(n=>{if(n){const r=n.split(mf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ge(e){let t="";if($t(e))t=e;else if(He(e))for(let n=0;nus(n,t))}const Qu=e=>!!(e&&e.__v_isRef===!0),z=e=>$t(e)?e:e==null?"":He(e)||ft(e)&&(e.toString===Wu||!Je(e.toString))?Qu(e)?z(e.value):JSON.stringify(e,Zu,2):String(e),Zu=(e,t)=>Qu(t)?Zu(e,t.value):is(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[ai(r,i)+" =>"]=o,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ai(n))}:On(t)?ai(t):ft(t)&&!He(t)&&!Gu(t)?String(t):t,ai=(e,t="")=>{var n;return On(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Ft;class xf{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&&Ft&&(Ft.active?(this.parent=Ft,this.index=(Ft.scopes||(Ft.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Ft===this)Ft=this.prevScope;else{let t=Ft;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Ar){let t=Ar;for(Ar=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Tr;){let t=Tr;for(Tr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function sc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function rc(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),el(r),$f(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function ki(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===Dr)||(e.globalVersion=Dr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ki(e))))return;e.flags|=2;const t=e.dep,n=gt,r=bn;gt=e,bn=!0;try{sc(e);const o=e.fn(e._value);(t.version===0||An(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{gt=n,bn=r,rc(e),e.flags&=-3}}function el(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)el(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $f(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 ac=[];function Mn(){ac.push(bn),bn=!1}function In(){const e=ac.pop();bn=e===void 0?!0:e}function nu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=gt;gt=void 0;try{t()}finally{gt=n}}}let Dr=0;class Sf{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 tl{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(!gt||!bn||gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==gt)n=this.activeLink=new Sf(gt,this),gt.deps?(n.prevDep=gt.depsTail,gt.depsTail.nextDep=n,gt.depsTail=n):gt.deps=gt.depsTail=n,ic(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=gt.depsTail,n.nextDep=void 0,gt.depsTail.nextDep=n,gt.depsTail=n,gt.deps===n&&(gt.deps=r)}return n}trigger(t){this.version++,Dr++,this.notify(t)}notify(t){Qi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Zi()}}}function ic(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ic(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xi=new WeakMap,js=Symbol(""),Ci=Symbol(""),Lr=Symbol("");function zt(e,t,n){if(bn&>){let r=xi.get(e);r||xi.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new tl),o.map=r,o.key=n),o.track()}}function Bn(e,t,n,r,o,i){const c=xi.get(e);if(!c){Dr++;return}const f=v=>{v&&v.trigger()};if(Qi(),t==="clear")c.forEach(f);else{const v=He(e),b=v&&Xi(n);if(v&&n==="length"){const y=Number(r);c.forEach((_,E)=>{(E==="length"||E===Lr||!On(E)&&E>=y)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Lr)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),is(e)&&f(c.get(Ci)));break;case"delete":v||(f(c.get(js)),is(e)&&f(c.get(Ci)));break;case"set":is(e)&&f(c.get(js));break}}Zi()}function Ys(e){const t=ut(e);return t===e||(zt(t,"iterate",Lr),fn(e))?t:jn(e)?ls(e)?t.map(n=>cs(vn(n))):t.map(cs):t.map(vn)}function ma(e){return zt(e=ut(e),"iterate",Lr),e}function Sn(e,t){return jn(e)?cs(ls(e)?vn(t):t):vn(t)}const Ef={__proto__:null,[Symbol.iterator](){return li(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>He(t)?Ys(t):t))},entries(){return li(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Fn(this,"every",e,t,void 0,arguments)},filter(e,t){return Fn(this,"filter",e,t,n=>n.map(r=>Sn(this,r)),arguments)},find(e,t){return Fn(this,"find",e,t,n=>Sn(this,n),arguments)},findIndex(e,t){return Fn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fn(this,"findLast",e,t,n=>Sn(this,n),arguments)},findLastIndex(e,t){return Fn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fn(this,"forEach",e,t,void 0,arguments)},includes(...e){return ui(this,"includes",e)},indexOf(...e){return ui(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return ui(this,"lastIndexOf",e)},map(e,t){return Fn(this,"map",e,t,void 0,arguments)},pop(){return _r(this,"pop")},push(...e){return _r(this,"push",e)},reduce(e,...t){return ru(this,"reduce",e,t)},reduceRight(e,...t){return ru(this,"reduceRight",e,t)},shift(){return _r(this,"shift")},some(e,t){return Fn(this,"some",e,t,void 0,arguments)},splice(...e){return _r(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 _r(this,"unshift",e)},values(){return li(this,"values",e=>Sn(this,e))}};function li(e,t,n){const r=ma(e),o=r[t],i=o.call(r);if(r!==e&&!fn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>su(i.next(),n),o!==lc[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>su(i._next(),n)}return i}function su(e,t){return e.done||(e.value=t(e.value)),e}const lc=Array.prototype;function Fn(e,t,n,r,o,i){const c=ma(e),f=c!==e&&!fn(e),v=c[t];if(v!==lc[t]){const _=v.apply(e,i);return f?vn(_):_}let b=n;c!==e&&(f?b=function(_,E){return n.call(this,Sn(e,_),E,e)}:n.length>2&&(b=function(_,E){return n.call(this,_,E,e)}));const y=v.call(c,b,r);return f&&o?o(y):y}function ru(e,t,n,r){const o=ma(e),i=o!==e&&!fn(e);let c=n,f=!1;o!==e&&(i?(f=r.length===0,c=function(b,y,_){return f&&(f=!1,b=Sn(e,b)),n.call(this,b,Sn(e,y),_,e)}):n.length>3&&(c=function(b,y,_){return n.call(this,b,y,_,e)}));const v=o[t](c,...r);return f?Sn(e,v):v}function ui(e,t,n){const r=ut(e);zt(r,"iterate",Lr);const o=r[t](...n);return(o===-1||o===!1)&&ol(n[0])?(n[0]=ut(n[0]),r[t](...n)):o}function _r(e,t,n=[]){Mn(),Qi();const r=ut(e)[t].apply(e,n);return Zi(),In(),r}const Tf=Yi("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(On));function Af(e){On(e)||(e=String(e));const t=ut(this);return zt(t,"has",e),t.hasOwnProperty(e)}class cc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Ff:vc:i?pc:fc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const c=He(t);if(!o){let v;if(c&&(v=Ef[n]))return v;if(n==="hasOwnProperty")return Af}const f=Reflect.get(t,n,Gt(t)?t:r);if((On(n)?uc.has(n):Tf(n))||(o||zt(t,"get",n),i))return f;if(Gt(f)){const v=c&&Xi(n)?f:f.value;return o&&ft(v)?Si(v):v}return ft(f)?o?Si(f):sl(f):f}}class dc extends cc{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const c=He(t)&&Xi(n);if(!this._isShallow){const b=jn(i);if(!fn(r)&&!jn(r)&&(i=ut(i),r=ut(r)),!c&&Gt(i)&&!Gt(r))return b||(i.value=r),!0}const f=c?Number(n)e,So=e=>Reflect.getPrototypeOf(e);function jf(e,t,n){return function(...r){const o=this.__v_raw,i=ut(o),c=is(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=o[e](...r),y=n?$i:t?cs:vn;return!t&&zt(i,"iterate",v?Ci:js),Pt(Object.create(b),{next(){const{value:_,done:E}=b.next();return E?{value:_,done:E}:{value:f?[y(_[0]),y(_[1])]:y(_),done:E}}})}}function Eo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Df(e,t){const n={get(o){const i=this.__v_raw,c=ut(i),f=ut(o);e||(An(o,f)&&zt(c,"get",o),zt(c,"get",f));const{has:v}=So(c),b=t?$i:e?cs:vn;if(v.call(c,o))return b(i.get(o));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(o)},get size(){const o=this.__v_raw;return!e&&zt(ut(o),"iterate",js),o.size},has(o){const i=this.__v_raw,c=ut(i),f=ut(o);return e||(An(o,f)&&zt(c,"has",o),zt(c,"has",f)),o===f?i.has(o):i.has(o)||i.has(f)},forEach(o,i){const c=this,f=c.__v_raw,v=ut(f),b=t?$i:e?cs:vn;return!e&&zt(v,"iterate",js),f.forEach((y,_)=>o.call(i,b(y),b(_),c))}};return Pt(n,e?{add:Eo("add"),set:Eo("set"),delete:Eo("delete"),clear:Eo("clear")}:{add(o){const i=ut(this),c=So(i),f=ut(o),v=!t&&!fn(o)&&!jn(o)?f:o;return c.has.call(i,v)||An(o,v)&&c.has.call(i,o)||An(f,v)&&c.has.call(i,f)||(i.add(v),Bn(i,"add",v,v)),this},set(o,i){!t&&!fn(i)&&!jn(i)&&(i=ut(i));const c=ut(this),{has:f,get:v}=So(c);let b=f.call(c,o);b||(o=ut(o),b=f.call(c,o));const y=v.call(c,o);return c.set(o,i),b?An(i,y)&&Bn(c,"set",o,i):Bn(c,"add",o,i),this},delete(o){const i=ut(this),{has:c,get:f}=So(i);let v=c.call(i,o);v||(o=ut(o),v=c.call(i,o)),f&&f.call(i,o);const b=i.delete(o);return v&&Bn(i,"delete",o,void 0),b},clear(){const o=ut(this),i=o.size!==0,c=o.clear();return i&&Bn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=jf(o,e,t)}),n}function nl(e,t){const n=Df(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?r:Reflect.get(dt(n,o)&&o in r?n:r,o,i)}const Lf={get:nl(!1,!1)},Kf={get:nl(!1,!0)},Rf={get:nl(!0,!1)};const fc=new WeakMap,pc=new WeakMap,vc=new WeakMap,Ff=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 sl(e){return jn(e)?e:rl(e,!1,Of,Lf,fc)}function Vf(e){return rl(e,!1,If,Kf,pc)}function Si(e){return rl(e,!0,Mf,Rf,vc)}function rl(e,t,n,r,o){if(!ft(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const c=Nf(cf(e));if(c===0)return e;const f=new Proxy(e,c===2?r:n);return o.set(e,f),f}function ls(e){return jn(e)?ls(e.__v_raw):!!(e&&e.__v_isReactive)}function jn(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ol(e){return e?!!e.__v_raw:!1}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function Bf(e){return!dt(e,"__v_skip")&&Object.isExtensible(e)&&Ju(e,"__v_skip",!0),e}const vn=e=>ft(e)?sl(e):e,cs=e=>ft(e)?Si(e):e;function Gt(e){return e?e.__v_isRef===!0:!1}function M(e){return Uf(e,!1)}function Uf(e,t){return Gt(e)?e:new qf(e,t)}class qf{constructor(t,n){this.dep=new tl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ut(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,r=this.__v_isShallow||fn(t)||jn(t);t=r?t:ut(t),An(t,n)&&(this._rawValue=t,this._value=r?t:vn(t),this.dep.trigger())}}function on(e){return Gt(e)?e.value:e}const Hf={get:(e,t,n)=>t==="__v_raw"?e:on(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Gt(o)&&!Gt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function mc(e){return ls(e)?e:new Proxy(e,Hf)}class zf{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new tl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Dr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&>!==this)return nc(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 Wf(e,t,n=!1){let r,o;return Ye(e)?r=e:(r=e.get,o=e.set),new zf(r,o,n)}const To={},Uo=new WeakMap;let Es;function Gf(e,t=!1,n=Es){if(n){let r=Uo.get(n);r||Uo.set(n,r=[]),r.push(e)}}function Yf(e,t,n=mt){const{immediate:r,deep:o,once:i,scheduler:c,augmentJob:f,call:v}=n,b=T=>o?T:fn(T)||o===!1||o===0?Un(T,1):Un(T);let y,_,E,C,I=!1,Y=!1;if(Gt(e)?(_=()=>e.value,I=fn(e)):ls(e)?(_=()=>b(e),I=!0):He(e)?(Y=!0,I=e.some(T=>ls(T)||fn(T)),_=()=>e.map(T=>{if(Gt(T))return T.value;if(ls(T))return b(T);if(Ye(T))return v?v(T,2):T()})):Ye(e)?t?_=v?()=>v(e,2):e:_=()=>{if(E){Mn();try{E()}finally{In()}}const T=Es;Es=y;try{return v?v(e,3,[C]):e(C)}finally{Es=T}}:_=Pn,t&&o){const T=_,q=o===!0?1/0:o;_=()=>Un(T(),q)}const le=Cf(),ue=()=>{y.stop(),le&&le.active&&Ji(le.effects,y)};if(i&&t){const T=t;t=(...q)=>{try{return T(...q)}finally{ue()}}}let ce=Y?new Array(e.length).fill(To):To;const G=T=>{if(!(!(y.flags&1)||!y.dirty&&!T))if(t){const q=y.run();if(T||o||I||(Y?q.some((Z,N)=>An(Z,ce[N])):An(q,ce))){const Z=Es;Mn();try{E&&E(),Es=y;const N=[q,ce===To?void 0:Y&&ce[0]===To?[]:ce,C];ce=q,v?v(t,3,N):t(...N)}finally{Es=Z,In()}}}else y.run()};return f&&f(G),y=new ec(_),y.scheduler=c?()=>c(G,!1):G,C=T=>Gf(T,!1,y),E=y.onStop=()=>{const T=Uo.get(y);if(T){if(v)v(T,4);else for(const q of T)q();Uo.delete(y)}},t?r?G(!0):ce=y.run():c?c(G.bind(null,!0),!0):y.run(),ue.pause=y.pause.bind(y),ue.resume=y.resume.bind(y),ue.stop=ue,ue}function Un(e,t=1/0,n){if(t<=0||!ft(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Gt(e))Un(e.value,t,n);else if(He(e))for(let r=0;r{Un(r,t,n)});else if(Gu(e)){for(const r in e)Un(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Un(e[r],t,n)}return e}/** +**/let Ft;class xf{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&&Ft&&(Ft.active?(this.parent=Ft,this.index=(Ft.scopes||(Ft.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Ft===this)Ft=this.prevScope;else{let t=Ft;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Ar){let t=Ar;for(Ar=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Tr;){let t=Tr;for(Tr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function sc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function rc(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),el(r),$f(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function ki(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===Dr)||(e.globalVersion=Dr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ki(e))))return;e.flags|=2;const t=e.dep,n=gt,r=bn;gt=e,bn=!0;try{sc(e);const o=e.fn(e._value);(t.version===0||An(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{gt=n,bn=r,rc(e),e.flags&=-3}}function el(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)el(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $f(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 ac=[];function Mn(){ac.push(bn),bn=!1}function In(){const e=ac.pop();bn=e===void 0?!0:e}function nu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=gt;gt=void 0;try{t()}finally{gt=n}}}let Dr=0;class Sf{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 tl{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(!gt||!bn||gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==gt)n=this.activeLink=new Sf(gt,this),gt.deps?(n.prevDep=gt.depsTail,gt.depsTail.nextDep=n,gt.depsTail=n):gt.deps=gt.depsTail=n,ic(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=gt.depsTail,n.nextDep=void 0,gt.depsTail.nextDep=n,gt.depsTail=n,gt.deps===n&&(gt.deps=r)}return n}trigger(t){this.version++,Dr++,this.notify(t)}notify(t){Qi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Zi()}}}function ic(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ic(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xi=new WeakMap,js=Symbol(""),Ci=Symbol(""),Lr=Symbol("");function zt(e,t,n){if(bn&>){let r=xi.get(e);r||xi.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new tl),o.map=r,o.key=n),o.track()}}function Bn(e,t,n,r,o,i){const c=xi.get(e);if(!c){Dr++;return}const f=v=>{v&&v.trigger()};if(Qi(),t==="clear")c.forEach(f);else{const v=He(e),b=v&&Xi(n);if(v&&n==="length"){const y=Number(r);c.forEach((_,E)=>{(E==="length"||E===Lr||!On(E)&&E>=y)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Lr)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),is(e)&&f(c.get(Ci)));break;case"delete":v||(f(c.get(js)),is(e)&&f(c.get(Ci)));break;case"set":is(e)&&f(c.get(js));break}}Zi()}function Ys(e){const t=ut(e);return t===e||(zt(t,"iterate",Lr),fn(e))?t:jn(e)?ls(e)?t.map(n=>cs(vn(n))):t.map(cs):t.map(vn)}function ma(e){return zt(e=ut(e),"iterate",Lr),e}function Sn(e,t){return jn(e)?cs(ls(e)?vn(t):t):vn(t)}const Ef={__proto__:null,[Symbol.iterator](){return li(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Ys(this).concat(...e.map(t=>He(t)?Ys(t):t))},entries(){return li(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Fn(this,"every",e,t,void 0,arguments)},filter(e,t){return Fn(this,"filter",e,t,n=>n.map(r=>Sn(this,r)),arguments)},find(e,t){return Fn(this,"find",e,t,n=>Sn(this,n),arguments)},findIndex(e,t){return Fn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fn(this,"findLast",e,t,n=>Sn(this,n),arguments)},findLastIndex(e,t){return Fn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fn(this,"forEach",e,t,void 0,arguments)},includes(...e){return ui(this,"includes",e)},indexOf(...e){return ui(this,"indexOf",e)},join(e){return Ys(this).join(e)},lastIndexOf(...e){return ui(this,"lastIndexOf",e)},map(e,t){return Fn(this,"map",e,t,void 0,arguments)},pop(){return _r(this,"pop")},push(...e){return _r(this,"push",e)},reduce(e,...t){return ru(this,"reduce",e,t)},reduceRight(e,...t){return ru(this,"reduceRight",e,t)},shift(){return _r(this,"shift")},some(e,t){return Fn(this,"some",e,t,void 0,arguments)},splice(...e){return _r(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 _r(this,"unshift",e)},values(){return li(this,"values",e=>Sn(this,e))}};function li(e,t,n){const r=ma(e),o=r[t],i=o.call(r);if(r!==e&&!fn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>su(i.next(),n),o!==lc[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>su(i._next(),n)}return i}function su(e,t){return e.done||(e.value=t(e.value)),e}const lc=Array.prototype;function Fn(e,t,n,r,o,i){const c=ma(e),f=c!==e&&!fn(e),v=c[t];if(v!==lc[t]){const _=v.apply(e,i);return f?vn(_):_}let b=n;c!==e&&(f?b=function(_,E){return n.call(this,Sn(e,_),E,e)}:n.length>2&&(b=function(_,E){return n.call(this,_,E,e)}));const y=v.call(c,b,r);return f&&o?o(y):y}function ru(e,t,n,r){const o=ma(e),i=o!==e&&!fn(e);let c=n,f=!1;o!==e&&(i?(f=r.length===0,c=function(b,y,_){return f&&(f=!1,b=Sn(e,b)),n.call(this,b,Sn(e,y),_,e)}):n.length>3&&(c=function(b,y,_){return n.call(this,b,y,_,e)}));const v=o[t](c,...r);return f?Sn(e,v):v}function ui(e,t,n){const r=ut(e);zt(r,"iterate",Lr);const o=r[t](...n);return(o===-1||o===!1)&&ol(n[0])?(n[0]=ut(n[0]),r[t](...n)):o}function _r(e,t,n=[]){Mn(),Qi();const r=ut(e)[t].apply(e,n);return Zi(),In(),r}const Tf=Yi("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(On));function Af(e){On(e)||(e=String(e));const t=ut(this);return zt(t,"has",e),t.hasOwnProperty(e)}class cc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Ff:vc:i?pc:fc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const c=He(t);if(!o){let v;if(c&&(v=Ef[n]))return v;if(n==="hasOwnProperty")return Af}const f=Reflect.get(t,n,Gt(t)?t:r);if((On(n)?uc.has(n):Tf(n))||(o||zt(t,"get",n),i))return f;if(Gt(f)){const v=c&&Xi(n)?f:f.value;return o&&ft(v)?Si(v):v}return ft(f)?o?Si(f):sl(f):f}}class dc extends cc{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const c=He(t)&&Xi(n);if(!this._isShallow){const b=jn(i);if(!fn(r)&&!jn(r)&&(i=ut(i),r=ut(r)),!c&&Gt(i)&&!Gt(r))return b||(i.value=r),!0}const f=c?Number(n)e,So=e=>Reflect.getPrototypeOf(e);function jf(e,t,n){return function(...r){const o=this.__v_raw,i=ut(o),c=is(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=o[e](...r),y=n?$i:t?cs:vn;return!t&&zt(i,"iterate",v?Ci:js),Pt(Object.create(b),{next(){const{value:_,done:E}=b.next();return E?{value:_,done:E}:{value:f?[y(_[0]),y(_[1])]:y(_),done:E}}})}}function Eo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Df(e,t){const n={get(o){const i=this.__v_raw,c=ut(i),f=ut(o);e||(An(o,f)&&zt(c,"get",o),zt(c,"get",f));const{has:v}=So(c),b=t?$i:e?cs:vn;if(v.call(c,o))return b(i.get(o));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(o)},get size(){const o=this.__v_raw;return!e&&zt(ut(o),"iterate",js),o.size},has(o){const i=this.__v_raw,c=ut(i),f=ut(o);return e||(An(o,f)&&zt(c,"has",o),zt(c,"has",f)),o===f?i.has(o):i.has(o)||i.has(f)},forEach(o,i){const c=this,f=c.__v_raw,v=ut(f),b=t?$i:e?cs:vn;return!e&&zt(v,"iterate",js),f.forEach((y,_)=>o.call(i,b(y),b(_),c))}};return Pt(n,e?{add:Eo("add"),set:Eo("set"),delete:Eo("delete"),clear:Eo("clear")}:{add(o){const i=ut(this),c=So(i),f=ut(o),v=!t&&!fn(o)&&!jn(o)?f:o;return c.has.call(i,v)||An(o,v)&&c.has.call(i,o)||An(f,v)&&c.has.call(i,f)||(i.add(v),Bn(i,"add",v,v)),this},set(o,i){!t&&!fn(i)&&!jn(i)&&(i=ut(i));const c=ut(this),{has:f,get:v}=So(c);let b=f.call(c,o);b||(o=ut(o),b=f.call(c,o));const y=v.call(c,o);return c.set(o,i),b?An(i,y)&&Bn(c,"set",o,i):Bn(c,"add",o,i),this},delete(o){const i=ut(this),{has:c,get:f}=So(i);let v=c.call(i,o);v||(o=ut(o),v=c.call(i,o)),f&&f.call(i,o);const b=i.delete(o);return v&&Bn(i,"delete",o,void 0),b},clear(){const o=ut(this),i=o.size!==0,c=o.clear();return i&&Bn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=jf(o,e,t)}),n}function nl(e,t){const n=Df(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?r:Reflect.get(dt(n,o)&&o in r?n:r,o,i)}const Lf={get:nl(!1,!1)},Kf={get:nl(!1,!0)},Rf={get:nl(!0,!1)};const fc=new WeakMap,pc=new WeakMap,vc=new WeakMap,Ff=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 sl(e){return jn(e)?e:rl(e,!1,Of,Lf,fc)}function Vf(e){return rl(e,!1,If,Kf,pc)}function Si(e){return rl(e,!0,Mf,Rf,vc)}function rl(e,t,n,r,o){if(!ft(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const c=Nf(cf(e));if(c===0)return e;const f=new Proxy(e,c===2?r:n);return o.set(e,f),f}function ls(e){return jn(e)?ls(e.__v_raw):!!(e&&e.__v_isReactive)}function jn(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ol(e){return e?!!e.__v_raw:!1}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function Bf(e){return!dt(e,"__v_skip")&&Object.isExtensible(e)&&Ju(e,"__v_skip",!0),e}const vn=e=>ft(e)?sl(e):e,cs=e=>ft(e)?Si(e):e;function Gt(e){return e?e.__v_isRef===!0:!1}function M(e){return Uf(e,!1)}function Uf(e,t){return Gt(e)?e:new qf(e,t)}class qf{constructor(t,n){this.dep=new tl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ut(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,r=this.__v_isShallow||fn(t)||jn(t);t=r?t:ut(t),An(t,n)&&(this._rawValue=t,this._value=r?t:vn(t),this.dep.trigger())}}function nn(e){return Gt(e)?e.value:e}const Hf={get:(e,t,n)=>t==="__v_raw"?e:nn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Gt(o)&&!Gt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function mc(e){return ls(e)?e:new Proxy(e,Hf)}class zf{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new tl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Dr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&>!==this)return nc(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 Wf(e,t,n=!1){let r,o;return Je(e)?r=e:(r=e.get,o=e.set),new zf(r,o,n)}const To={},Uo=new WeakMap;let Es;function Gf(e,t=!1,n=Es){if(n){let r=Uo.get(n);r||Uo.set(n,r=[]),r.push(e)}}function Yf(e,t,n=mt){const{immediate:r,deep:o,once:i,scheduler:c,augmentJob:f,call:v}=n,b=T=>o?T:fn(T)||o===!1||o===0?Un(T,1):Un(T);let y,_,E,C,I=!1,Y=!1;if(Gt(e)?(_=()=>e.value,I=fn(e)):ls(e)?(_=()=>b(e),I=!0):He(e)?(Y=!0,I=e.some(T=>ls(T)||fn(T)),_=()=>e.map(T=>{if(Gt(T))return T.value;if(ls(T))return b(T);if(Je(T))return v?v(T,2):T()})):Je(e)?t?_=v?()=>v(e,2):e:_=()=>{if(E){Mn();try{E()}finally{In()}}const T=Es;Es=y;try{return v?v(e,3,[C]):e(C)}finally{Es=T}}:_=Pn,t&&o){const T=_,q=o===!0?1/0:o;_=()=>Un(T(),q)}const le=Cf(),ue=()=>{y.stop(),le&&le.active&&Ji(le.effects,y)};if(i&&t){const T=t;t=(...q)=>{try{return T(...q)}finally{ue()}}}let ce=Y?new Array(e.length).fill(To):To;const G=T=>{if(!(!(y.flags&1)||!y.dirty&&!T))if(t){const q=y.run();if(T||o||I||(Y?q.some((Z,N)=>An(Z,ce[N])):An(q,ce))){const Z=Es;Mn();try{E&&E(),Es=y;const N=[q,ce===To?void 0:Y&&ce[0]===To?[]:ce,C];ce=q,v?v(t,3,N):t(...N)}finally{Es=Z,In()}}}else y.run()};return f&&f(G),y=new ec(_),y.scheduler=c?()=>c(G,!1):G,C=T=>Gf(T,!1,y),E=y.onStop=()=>{const T=Uo.get(y);if(T){if(v)v(T,4);else for(const q of T)q();Uo.delete(y)}},t?r?G(!0):ce=y.run():c?c(G.bind(null,!0),!0):y.run(),ue.pause=y.pause.bind(y),ue.resume=y.resume.bind(y),ue.stop=ue,ue}function Un(e,t=1/0,n){if(t<=0||!ft(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Gt(e))Un(e.value,t,n);else if(He(e))for(let r=0;r{Un(r,t,n)});else if(Gu(e)){for(const r in e)Un(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Un(e[r],t,n)}return e}/** * @vue/runtime-core v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Yr(e,t,n,r){try{return r?e(...r):e()}catch(o){ha(o,t,n)}}function mn(e,t,n,r){if(Ye(e)){const o=Yr(e,t,n,r);return o&&zu(o)&&o.catch(i=>{ha(i,t,n)}),o}if(He(e)){const o=[];for(let i=0;i>>1,o=Zt[r],i=Kr(o);i=Kr(n)?Zt.push(e):Zt.splice(Xf(t),0,e),e.flags|=1,yc()}}function yc(){qo||(qo=hc.then(wc))}function Qf(e){if(!He(e))os&&e.id===-1?os.splice(Js+1,0,e):e.flags&1||(En.push(e),e.flags|=1);else for(let t=0;t=t))continue;Zt.splice(r,1),r=e?r-1:yn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function bc(e,t,n=0){if(En.length){let r=En,o=0;if(t){r=[];for(let c=0;cKr(c)-Kr(f));if(En.length=o,os){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function wc(e){try{for(yn=0;yn{r._d&&Yo(-1);const i=Ho(t),c=Ds.length;let f;try{f=e(...o)}finally{for(let v=Ds.length;v>c;v--)Yc();Ho(i),r._d&&Yo(1)}return f};return r._n=!0,r._c=!0,r._d=!0,r}function Me(e,t){if(dn===null)return e;const n=ka(dn),r=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ye(t)?t.call(r&&r.proxy):t}}const tp=Symbol.for("v-scx"),np=()=>jo(tp);function pt(e,t,n){return kc(e,t,n)}function kc(e,t,n=mt){const{immediate:r,deep:o,flush:i,once:c}=n,f=Pt({},n),v=t&&r||!t&&i!=="post";let b;if(Ur){if(i==="sync"){const C=np();b=C.__watcherHandles||(C.__watcherHandles=[])}else if(!v){const C=()=>{};return C.stop=Pn,C.resume=Pn,C.pause=Pn,C}}const y=en;f.call=(C,I,Y)=>mn(C,y,I,Y);let _=!1;i==="post"?f.scheduler=C=>{C.i=y,Qt(C,y&&y.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(C,I)=>{I?C():al(C)}),f.augmentJob=C=>{t&&(C.flags|=4),_&&(C.flags|=2,y&&(C.id=y.uid,C.i=y))};const E=Yf(e,t,f);return Ur&&(b?b.push(E):v&&E()),E}function sp(e,t,n){const r=this.proxy,o=$t(e)?e.includes(".")?xc(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const c=Jr(this),f=kc(o,i.bind(r),n);return c(),f}function xc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;oe.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),rp=e=>e&&(e.defer||e.defer===""),ou=e=>typeof SVGElement<"u"&&e instanceof SVGElement,au=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ei=(e,t)=>{const n=e&&e.to;return $t(n)?t?t(n):null:n},op={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,c,f,v,b){const{mc:y,pc:_,pbc:E,o:{insert:C,querySelector:I,createText:Y,createComment:le,parentNode:ue}}=b,ce=As(t.props);let{dynamicChildren:G}=t;const T=(N,se,j)=>{N.shapeFlag&16&&y(N.children,se,j,o,i,c,f,v)},q=(N=t)=>{const se=As(N.props),j=N.target=Ei(N.props,I),S=Ti(j,N,Y,C);j&&(c!=="svg"&&ou(j)?c="svg":c!=="mathml"&&au(j)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),se||(T(N,j,S),Cr(N,!1)))},Z=N=>{const se=()=>{if(ss.get(N)===se){if(ss.delete(N),As(N.props)){const j=ue(N.el)||n;T(N,j,N.anchor),Cr(N,!0)}q(N)}};ss.set(N,se),Qt(se,i)};if(e==null){const N=t.el=Y(""),se=t.anchor=Y("");if(C(N,n,r),C(se,n,r),rp(t.props)||i&&i.pendingBranch){Z(t);return}ce&&(T(t,n,se),Cr(t,!0)),q()}else{t.el=e.el;const N=t.anchor=e.anchor,se=ss.get(e);if(se){se.flags|=8,ss.delete(e),Z(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,S=t.targetAnchor=e.targetAnchor,P=As(e.props),te=P?n:j,Pe=P?N:S;if(c==="svg"||ou(j)?c="svg":(c==="mathml"||au(j))&&(c="mathml"),G?(E(e.dynamicChildren,G,te,o,i,c,f),cl(e,t,!0)):v||_(e,t,te,Pe,o,i,c,f,!1),ce)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ao(t,n,N,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Se=Ei(t.props,I);Se&&(t.target=Se,Ao(t,Se,null,b,0))}else P&&Ao(t,j,S,b,1);Cr(t,ce)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:y,target:_,props:E}=e,C=As(E),I=i||!C,Y=ss.get(e);if(Y&&(Y.flags|=8,ss.delete(e)),_&&(o(b),o(y)),i&&o(v),!Y&&(C||_)&&c&16)for(let le=0;le{e.isMounted=!0}),Mc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],Sc={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},ip={name:"BaseTransition",props:Sc,setup(e,{slots:t}){const n=dl(),r=$c();return()=>{const o=t.default&&il(t.default(),!0),i=o&&o.length?Ec(o):n.subTree?he():void 0;if(!i)return;const c=ut(e),{mode:f}=c;if(r.isLeaving)return di(i);const v=zo(i);if(!v)return di(i);let b=Rr(v,c,r,n,_=>b=_);v.type!==Wt&&ds(v,b);let y=n.subTree&&zo(n.subTree);if(y&&y.type!==Wt&&!Ps(y,v)&&Fr(n.subTree)){let _=Rr(y,c,r,n);if(ds(y,_),f==="out-in"&&v.type!==Wt)return r.isLeaving=!0,_.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,y=void 0},di(i);f==="in-out"&&v.type!==Wt?_.delayLeave=(E,C,I)=>{const Y=Tc(r,y);Y[String(y.key)]=y,E[cn]=()=>{C(),E[cn]=void 0,delete b.delayedLeave,y=void 0},b.delayedLeave=()=>{I(),delete b.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return i}}};function Ec(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Wt){t=n;break}}return t}const lp=ip;function Tc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Rr(e,t,n,r,o){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:y,onEnterCancelled:_,onBeforeLeave:E,onLeave:C,onAfterLeave:I,onLeaveCancelled:Y,onBeforeAppear:le,onAppear:ue,onAfterAppear:ce,onAppearCancelled:G}=t,T=String(e.key),q=Tc(n,e),Z=(j,S)=>{j&&mn(j,r,9,S)},N=(j,S)=>{const P=S[1];Z(j,S),He(j)?j.every(te=>te.length<=1)&&P():j.length<=1&&P()},se={mode:c,persisted:f,beforeEnter(j){let S=v;if(!n.isMounted)if(i)S=le||v;else return;j[cn]&&j[cn](!0);const P=q[T];if(P&&Ps(e,P)){let te=P.el[cn];if(!te){const Pe=Fr(P);te=Pe&&Pe.el[cn]}te&&te()}Z(S,[j])},enter(j){if(q[T]===e)return;let S=b,P=y,te=_;if(!n.isMounted)if(i)S=ue||b,P=ce||y,te=G||_;else return;let Pe=!1;j[kr]=ye=>{Pe||(Pe=!0,ye?Z(te,[j]):Z(P,[j]),se.delayedLeave&&se.delayedLeave(),j[kr]=void 0)};const Se=j[kr].bind(null,!1);S?N(S,[j,Se]):Se()},leave(j,S){const P=String(e.key);if(j[kr]&&j[kr](!0),n.isUnmounting)return S();Z(E,[j]);let te=!1;j[cn]=Se=>{te||(te=!0,S(),Se?Z(Y,[j]):Z(I,[j]),j[cn]=void 0,q[P]===e&&delete q[P])};const Pe=j[cn].bind(null,!1);q[P]=e,C?N(C,[j,Pe]):Pe()},clone(j){const S=Rr(j,t,n,r,o);return o&&o(S),S}};return se}function di(e){if(ga(e))return e=fs(e),e.children=null,e}function zo(e){if(!ga(e))return ya(e.type)&&e.children?Ec(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&&Ye(n.default))return n.default()}}function ds(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ds(ya(n.type)&&zo(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&&He(e.children)){const n=Kc(e.children,!1);n&&ds(n,t)}}function il(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;iPr(Y,t&&(He(t)?t[le]:t),n,r,o));return}if(Or(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Pr(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?ka(r.component):r.el,c=o?null:i,{i:f,r:v}=e,b=t&&t.r,y=f.refs===mt?f.refs={}:f.refs,_=f.setupState,E=ut(_),C=_===mt?Hu:Y=>iu(y,Y)?!1:dt(E,Y),I=(Y,le)=>!(le&&iu(y,le));if(b!=null&&b!==v){if(lu(t),$t(b))y[b]=null,C(b)&&(_[b]=null);else if(Gt(b)){const Y=t;I(b,Y.k)&&(b.value=null),Y.k&&(y[Y.k]=null)}}if(Ye(v))Yr(v,f,12,[c,y]);else{const Y=$t(v),le=Gt(v);if(Y||le){const ue=()=>{if(e.f){const ce=Y?C(v)?_[v]:y[v]:I()||!e.k?v.value:y[e.k];if(o)He(ce)&&Ji(ce,i);else if(He(ce))ce.includes(i)||ce.push(i);else if(Y)y[v]=[i],C(v)&&(_[v]=y[v]);else{const G=[i];I(v,e.k)&&(v.value=G),e.k&&(y[e.k]=G)}}else Y?(y[v]=c,C(v)&&(_[v]=c)):le&&(I(v,e.k)&&(v.value=c),e.k&&(y[e.k]=c))};if(c){const ce=()=>{ue(),Wo.delete(e)};ce.id=-1,Wo.set(e,ce),Qt(ce,n)}else lu(e),ue()}}}function lu(e){const t=Wo.get(e);t&&(t.flags|=8,Wo.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Or=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function up(e,t){Pc(e,"a",t)}function cp(e,t){Pc(e,"da",t)}function Pc(e,t,n=en){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ba(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ga(o.parent.vnode)&&dp(r,t,n,o),o=o.parent}}function dp(e,t,n,r){const o=ba(t,e,r,!0);Ln(()=>{Ji(r[t],o)},n)}function ba(e,t,n=en,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{Mn();const f=Jr(n),v=mn(t,n,e,c);return f(),In(),v});return r?o.unshift(i):o.push(i),i}}const Gn=e=>(t,n=en)=>{(!Ur||e==="sp")&&ba(e,(...r)=>t(...r),n)},fp=Gn("bm"),ln=Gn("m"),pp=Gn("bu"),Oc=Gn("u"),Mc=Gn("bum"),Ln=Gn("um"),vp=Gn("sp"),mp=Gn("rtg"),hp=Gn("rtc");function yp(e,t=en){ba("ec",e,t)}const gp=Symbol.for("v-ndc");function et(e,t,n,r){let o;const i=n,c=He(e);if(c||$t(e)){const f=c&&ls(e);let v=!1,b=!1;f&&(v=!fn(e),b=jn(e),e=ma(e)),o=new Array(e.length);for(let y=0,_=e.length;y<_;y++)o[y]=t(v?b?cs(vn(e[y])):vn(e[y]):e[y],y,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,b=f.length;ve?Zc(e)?ka(e):Ai(e.parent):null,Mr=Pt(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=>Ai(e.parent),$root:e=>Ai(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jc(e),$forceUpdate:e=>e.f||(e.f=()=>{al(e.update)}),$nextTick:e=>e.n||(e.n=ur.bind(e.proxy)),$watch:e=>sp.bind(e)}),fi=(e,t)=>e!==mt&&!e.__isScriptSetup&&dt(e,t),bp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const E=c[t];if(E!==void 0)switch(E){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(fi(r,t))return c[t]=1,r[t];if(o!==mt&&dt(o,t))return c[t]=2,o[t];if(dt(i,t))return c[t]=3,i[t];if(n!==mt&&dt(n,t))return c[t]=4,n[t];Pi&&(c[t]=0)}}const b=Mr[t];let y,_;if(b)return t==="$attrs"&&zt(e.attrs,"get",""),b(e);if((y=f.__cssModules)&&(y=y[t]))return y;if(n!==mt&&dt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,dt(_,t))return _[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return fi(o,t)?(o[t]=n,!0):r!==mt&&dt(r,t)?(r[t]=n,!0):dt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:c}},f){let v;return!!(n[f]||e!==mt&&f[0]!=="$"&&dt(e,f)||fi(t,f)||dt(i,f)||dt(r,f)||dt(Mr,f)||dt(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function uu(e){return He(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Pi=!0;function wp(e){const t=jc(e),n=e.proxy,r=e.ctx;Pi=!1,t.beforeCreate&&cu(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:c,watch:f,provide:v,inject:b,created:y,beforeMount:_,mounted:E,beforeUpdate:C,updated:I,activated:Y,deactivated:le,beforeDestroy:ue,beforeUnmount:ce,destroyed:G,unmounted:T,render:q,renderTracked:Z,renderTriggered:N,errorCaptured:se,serverPrefetch:j,expose:S,inheritAttrs:P,components:te,directives:Pe,filters:Se}=t;if(b&&_p(b,r,null),c)for(const Ue in c){const de=c[Ue];Ye(de)&&(r[Ue]=de.bind(n))}if(o){const Ue=o.call(n,n);ft(Ue)&&(e.data=sl(Ue))}if(Pi=!0,i)for(const Ue in i){const de=i[Ue],ke=Ye(de)?de.bind(n,n):Ye(de.get)?de.get.bind(n,n):Pn,Ee=!Ye(de)&&Ye(de.set)?de.set.bind(n):Pn,De=st({get:ke,set:Ee});Object.defineProperty(r,Ue,{enumerable:!0,configurable:!0,get:()=>De.value,set:$e=>De.value=$e})}if(f)for(const Ue in f)Ic(f[Ue],r,n,Ue);if(v){const Ue=Ye(v)?v.call(n):v;Reflect.ownKeys(Ue).forEach(de=>{ep(de,Ue[de])})}y&&cu(y,e,"c");function Ae(Ue,de){He(de)?de.forEach(ke=>Ue(ke.bind(n))):de&&Ue(de.bind(n))}if(Ae(fp,_),Ae(ln,E),Ae(pp,C),Ae(Oc,I),Ae(up,Y),Ae(cp,le),Ae(yp,se),Ae(hp,Z),Ae(mp,N),Ae(Mc,ce),Ae(Ln,T),Ae(vp,j),He(S))if(S.length){const Ue=e.exposed||(e.exposed={});S.forEach(de=>{Object.defineProperty(Ue,de,{get:()=>n[de],set:ke=>n[de]=ke,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===Pn&&(e.render=q),P!=null&&(e.inheritAttrs=P),te&&(e.components=te),Pe&&(e.directives=Pe),j&&Ac(e)}function _p(e,t,n=Pn){He(e)&&(e=Oi(e));for(const r in e){const o=e[r];let i;ft(o)?"default"in o?i=jo(o.from||r,o.default,!0):i=jo(o.from||r):i=jo(o),Gt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function cu(e,t,n){mn(He(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ic(e,t,n,r){let o=r.includes(".")?xc(n,r):()=>n[r];if($t(e)){const i=t[e];Ye(i)&&pt(o,i)}else if(Ye(e))pt(o,e.bind(n));else if(ft(e))if(He(e))e.forEach(i=>Ic(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&&pt(o,i,e)}}function jc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!o.length&&!n&&!r?v=t:(v={},o.length&&o.forEach(b=>Go(v,b,c,!0)),Go(v,t,c)),ft(t)&&i.set(t,v),v}function Go(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Go(e,i,n,!0),o&&o.forEach(c=>Go(e,c,n,!0));for(const c in t)if(!(r&&c==="expose")){const f=kp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const kp={data:du,props:fu,emits:fu,methods:$r,computed:$r,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:$r,directives:$r,watch:Cp,provide:du,inject:xp};function du(e,t){return t?e?function(){return Pt(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function xp(e,t){return $r(Oi(e),Oi(t))}function Oi(e){if(He(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 Tp(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||mt;let o=n;const i=t.startsWith("update:"),c=i&&Ep(r,t.slice(7));c&&(c.trim&&(o=n.map(y=>$t(y)?y.trim():y)),c.number&&(o=o.map(pa)));let f,v=r[f=oi(t)]||r[f=oi(gn(t))];!v&&i&&(v=r[f=oi(ms(t))]),v&&mn(v,e,6,o);const b=r[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(b,e,6,o)}}const Ap=new WeakMap;function Lc(e,t,n=!1){const r=n?Ap:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let c={},f=!1;if(!Ye(e)){const v=b=>{const y=Lc(b,t,!0);y&&(f=!0,Pt(c,y))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(ft(e)&&r.set(e,null),null):(He(i)?i.forEach(v=>c[v]=null):Pt(c,i),ft(e)&&r.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,ms(t))||dt(e,t))}function pu(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:y,props:_,data:E,setupState:C,ctx:I,inheritAttrs:Y}=e,le=Ho(e);let ue,ce;try{if(n.shapeFlag&4){const T=o||r,q=T;ue=Tn(b.call(q,T,y,_,C,E,I)),ce=f}else{const T=t;ue=Tn(T.length>1?T(_,{attrs:f,slots:c,emit:v}):T(_,null)),ce=t.props?f:Pp(f)}}catch(T){Ds.length=0,ha(T,e,1),ue=we(Wt)}let G=ue;if(ce&&Y!==!1){const T=Object.keys(ce),{shapeFlag:q}=G;T.length&&q&7&&(i&&T.some(da)&&(ce=Op(ce,i)),G=fs(G,ce,!1,!0))}if(n.dirs&&(G=fs(G,null,!1,!0),G.dirs=G.dirs?G.dirs.concat(n.dirs):n.dirs),n.transition){const T=ya(G.type)&&zo(G)||G;ds(T,n.transition)}return ue=G,Ho(le),ue}function Kc(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Op=(e,t)=>{const n={};for(const r in e)(!da(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mp(e,t,n){const{props:r,children:o,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 r?vu(r,c,b):!!c;if(v&8){const y=t.dynamicProps;for(let _=0;_Object.create(Fc),Vc=e=>Object.getPrototypeOf(e)===Fc;function jp(e,t,n,r=!1){const o={},i=Nc();e.propsDefaults=Object.create(null),Bc(e,t,o,i);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=r?o:Vf(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Dp(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,f=ut(o),[v]=e.propsOptions;let b=!1;if((r||c>0)&&!(c&16)){if(c&8){const y=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[E,C]=Uc(_,t,!0);Pt(c,E),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!i&&!v)return ft(e)&&r.set(e,Ms),Ms;if(He(i))for(let y=0;ye==="_"||e==="_ctx"||e==="$stable",ul=e=>He(e)?e.map(Tn):[Tn(e)],Kp=(e,t,n)=>{if(t._n)return t;const r=Wn((...o)=>ul(t(...o)),n);return r._c=!1,r},qc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(ll(o))continue;const i=e[o];if(Ye(i))t[o]=Kp(o,i,r);else if(i!=null){const c=ul(i);t[o]=()=>c}}},Hc=(e,t)=>{const n=ul(t);e.slots.default=()=>n},zc=(e,t,n)=>{for(const r in t)(n||!ll(r))&&(e[r]=t[r])},Rp=(e,t,n)=>{const r=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(zc(r,t,n),n&&Ju(r,"_",o,!0)):qc(t,r)}else t&&Hc(e,t)},Fp=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,c=mt;if(r.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:zc(o,t,n):(i=!t.$stable,qc(t,o)),c=t}else t&&(Hc(e,t),c={default:1});if(i)for(const f in o)!ll(f)&&c[f]==null&&delete o[f]},Qt=qp;function Np(e){return Vp(e)}function Vp(e,t){const n=va();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:y,parentNode:_,nextSibling:E,setScopeId:C=Pn,insertStaticContent:I}=e,Y=(g,m,x,D=null,ae=null,z=null,ee=void 0,A=null,X=!!m.dynamicChildren)=>{if(g===m)return;g&&!Ps(g,m)&&(D=_t(g),$e(g,ae,z,!0),g=null),m.patchFlag===-2&&(X=!1,m.dynamicChildren=null),m.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(m.dynamicChildren===Ms&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:ne,ref:Ce,shapeFlag:be}=m;switch(ne){case _a:le(g,m,x,D);break;case Wt:ue(g,m,x,D);break;case Do:g==null&&ce(m,x,D,ee);break;case je:te(g,m,x,D,ae,z,ee,A,X);break;default:be&1?q(g,m,x,D,ae,z,ee,A,X):be&6?Pe(g,m,x,D,ae,z,ee,A,X):(be&64||be&128)&&ne.process(g,m,x,D,ae,z,ee,A,X,vt)}Ce!=null&&ae?Pr(Ce,g&&g.ref,z,m||g,!m):Ce==null&&g&&g.ref!=null&&Pr(g.ref,null,z,g,!0)},le=(g,m,x,D)=>{if(g==null)r(m.el=f(m.children),x,D);else{const ae=m.el=g.el;m.children!==g.children&&b(ae,m.children)}},ue=(g,m,x,D)=>{g==null?r(m.el=v(m.children||""),x,D):m.el=g.el},ce=(g,m,x,D)=>{[g.el,g.anchor]=I(g.children,m,x,D,g.el,g.anchor)},G=({el:g,anchor:m},x,D)=>{let ae;for(;g&&g!==m;)ae=E(g),r(g,x,D),g=ae;r(m,x,D)},T=({el:g,anchor:m})=>{let x;for(;g&&g!==m;)x=E(g),o(g),g=x;o(m)},q=(g,m,x,D,ae,z,ee,A,X)=>{if(m.type==="svg"?ee="svg":m.type==="math"&&(ee="mathml"),g==null)Z(m,x,D,ae,z,ee,A,X);else{const ne=g.el&&g.el._isVueCE?g.el:null;try{ne&&ne._beginPatch(),j(g,m,ae,z,ee,A,X)}finally{ne&&ne._endPatch()}}},Z=(g,m,x,D,ae,z,ee,A)=>{let X,ne;const{props:Ce,shapeFlag:be,transition:Le,dirs:Te}=g;if(X=g.el=c(g.type,z,Ce&&Ce.is,Ce),be&8?y(X,g.children):be&16&&se(g.children,X,null,D,ae,pi(g,z),ee,A),Te&&Cs(g,null,D,"created"),N(X,g,g.scopeId,ee,D),Ce){for(const Ze in Ce)Ze!=="value"&&!Er(Ze)&&i(X,Ze,null,Ce[Ze],z,D);"value"in Ce&&i(X,"value",null,Ce.value,z),(ne=Ce.onVnodeBeforeMount)&&xn(ne,D,g)}Te&&Cs(g,null,D,"beforeMount");const Qe=Bp(ae,Le);Qe&&Le.beforeEnter(X),r(X,m,x),((ne=Ce&&Ce.onVnodeMounted)||Qe||Te)&&Qt(()=>{try{ne&&xn(ne,D,g),Qe&&Le.enter(X),Te&&Cs(g,null,D,"mounted")}finally{}},ae)},N=(g,m,x,D,ae)=>{if(x&&C(g,x),D)for(let z=0;z{for(let ne=X;ne{const A=m.el=g.el;let{patchFlag:X,dynamicChildren:ne,dirs:Ce}=m;X|=g.patchFlag&16;const be=g.props||mt,Le=m.props||mt;let Te;if(x&&$s(x,!1),(Te=Le.onVnodeBeforeUpdate)&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"beforeUpdate"),x&&$s(x,!0),ne&&(!g.dynamicChildren||g.dynamicChildren.length!==ne.length)&&(X=0,ee=!1,ne=null),(be.innerHTML&&Le.innerHTML==null||be.textContent&&Le.textContent==null)&&y(A,""),ne?S(g.dynamicChildren,ne,A,x,D,pi(m,ae),z):ee||de(g,m,A,null,x,D,pi(m,ae),z,!1),X>0){if(X&16)P(A,be,Le,x,ae);else if(X&2&&be.class!==Le.class&&i(A,"class",null,Le.class,ae),X&4&&i(A,"style",be.style,Le.style,ae),X&8){const Qe=m.dynamicProps;for(let Ze=0;Ze{Te&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"updated")},D)},S=(g,m,x,D,ae,z,ee)=>{for(let A=0;A{if(m!==x){if(m!==mt)for(const z in m)!Er(z)&&!(z in x)&&i(g,z,m[z],null,ae,D);for(const z in x){if(Er(z))continue;const ee=x[z],A=m[z];ee!==A&&z!=="value"&&i(g,z,A,ee,ae,D)}"value"in x&&i(g,"value",m.value,x.value,ae)}},te=(g,m,x,D,ae,z,ee,A,X)=>{const ne=m.el=g?g.el:f(""),Ce=m.anchor=g?g.anchor:f("");let{patchFlag:be,dynamicChildren:Le,slotScopeIds:Te}=m;Te&&(A=A?A.concat(Te):Te),g==null?(r(ne,x,D),r(Ce,x,D),se(m.children||[],x,Ce,ae,z,ee,A,X)):be>0&&be&64&&Le&&g.dynamicChildren&&g.dynamicChildren.length===Le.length?(S(g.dynamicChildren,Le,x,ae,z,ee,A),(m.key!=null||ae&&m===ae.subTree)&&cl(g,m,!0)):de(g,m,x,Ce,ae,z,ee,A,X)},Pe=(g,m,x,D,ae,z,ee,A,X)=>{m.slotScopeIds=A,g==null?m.shapeFlag&512?ae.ctx.activate(m,x,D,ee,X):Se(m,x,D,ae,z,ee,X):ye(g,m,X)},Se=(g,m,x,D,ae,z,ee)=>{const A=g.component=Xp(g,D,ae);if(ga(g)&&(A.ctx.renderer=vt),Qp(A,!1,ee),A.asyncDep){if(ae&&ae.registerDep(A,Ae,ee,z),!g.el){const X=A.subTree=we(Wt);ue(null,X,m,x),g.placeholder=X.el}}else Ae(A,g,m,x,ae,z,ee)},ye=(g,m,x)=>{const D=m.component=g.component;if(Mp(g,m,x))if(D.asyncDep&&!D.asyncResolved){m.el=g.el,m.placeholder=g.placeholder,Ue(D,m,x);return}else D.next=m,D.update();else m.el=g.el,m.placeholder=g.placeholder,D.vnode=m},Ae=(g,m,x,D,ae,z,ee)=>{const A=()=>{if(g.isMounted){let{next:be,bu:Le,u:Te,parent:Qe,vnode:Ze}=g;{const Yt=Wc(g);if(Yt){be&&(be.el=Ze.el,Ue(g,be,ee)),Yt.asyncDep.then(()=>{Qt(()=>{g.isUnmounted||ne()},ae)});return}}let tt=be,kt;$s(g,!1),be?(be.el=Ze.el,Ue(g,be,ee)):be=Ze,Le&&Io(Le),(kt=be.props&&be.props.onVnodeBeforeUpdate)&&xn(kt,Qe,be,Ze),$s(g,!0);const St=pu(g),tn=g.subTree;g.subTree=St,Y(tn,St,_(tn.el),_t(tn),g,ae,z),be.el=St.el,tt===null&&Ip(g,St.el),Te&&Qt(Te,ae),(kt=be.props&&be.props.onVnodeUpdated)&&Qt(()=>xn(kt,Qe,be,Ze),ae)}else{let be;const{el:Le,props:Te}=m,{bm:Qe,m:Ze,parent:tt,root:kt,type:St}=g,tn=Or(m);$s(g,!1),Qe&&Io(Qe),!tn&&(be=Te&&Te.onVnodeBeforeMount)&&xn(be,tt,m),$s(g,!0);{kt.ce&&kt.ce._hasShadowRoot()&&kt.ce._injectChildStyle(St,g.parent?g.parent.type:void 0);const Yt=g.subTree=pu(g);Y(null,Yt,x,D,g,ae,z),m.el=Yt.el}if(Ze&&Qt(Ze,ae),!tn&&(be=Te&&Te.onVnodeMounted)){const Yt=m;Qt(()=>xn(be,tt,Yt),ae)}(m.shapeFlag&256||tt&&Or(tt.vnode)&&tt.vnode.shapeFlag&256)&&g.a&&Qt(g.a,ae),g.isMounted=!0,m=x=D=null}};g.scope.on();const X=g.effect=new ec(A);g.scope.off();const ne=g.update=X.run.bind(X),Ce=g.job=X.runIfDirty.bind(X);Ce.i=g,Ce.id=g.uid,X.scheduler=()=>al(Ce),$s(g,!0),ne()},Ue=(g,m,x)=>{m.component=g;const D=g.vnode.props;g.vnode=m,g.next=null,Dp(g,m.props,D,x),Fp(g,m.children,x),Mn(),gc(g),In()},de=(g,m,x,D,ae,z,ee,A,X=!1)=>{const ne=g&&g.children,Ce=g?g.shapeFlag:0,be=m.children,{patchFlag:Le,shapeFlag:Te}=m;if(Le>0){if(Le&128){Ee(ne,be,x,D,ae,z,ee,A,X);return}else if(Le&256){ke(ne,be,x,D,ae,z,ee,A,X);return}}Te&8?(Ce&16&&bt(ne,ae,z),be!==ne&&y(x,be)):Ce&16?Te&16?Ee(ne,be,x,D,ae,z,ee,A,X):bt(ne,ae,z,!0):(Ce&8&&y(x,""),Te&16&&se(be,x,D,ae,z,ee,A,X))},ke=(g,m,x,D,ae,z,ee,A,X)=>{g=g||Ms,m=m||Ms;const ne=g.length,Ce=m.length,be=Math.min(ne,Ce);let Le;for(Le=0;LeCe?bt(g,ae,z,!0,!1,be):se(m,x,D,ae,z,ee,A,X,be)},Ee=(g,m,x,D,ae,z,ee,A,X)=>{let ne=0;const Ce=m.length;let be=g.length-1,Le=Ce-1;for(;ne<=be&&ne<=Le;){const Te=g[ne],Qe=m[ne]=X?Vn(m[ne]):Tn(m[ne]);if(Ps(Te,Qe))Y(Te,Qe,x,null,ae,z,ee,A,X);else break;ne++}for(;ne<=be&&ne<=Le;){const Te=g[be],Qe=m[Le]=X?Vn(m[Le]):Tn(m[Le]);if(Ps(Te,Qe))Y(Te,Qe,x,null,ae,z,ee,A,X);else break;be--,Le--}if(ne>be){if(ne<=Le){const Te=Le+1,Qe=TeLe)for(;ne<=be;)$e(g[ne],ae,z,!0),ne++;else{const Te=ne,Qe=ne,Ze=new Map;for(ne=Qe;ne<=Le;ne++){const Rt=m[ne]=X?Vn(m[ne]):Tn(m[ne]);Rt.key!=null&&Ze.set(Rt.key,ne)}let tt,kt=0;const St=Le-Qe+1;let tn=!1,Yt=0;const nn=new Array(St);for(ne=0;ne=St){$e(Rt,ae,z,!0);continue}let Ot;if(Rt.key!=null)Ot=Ze.get(Rt.key);else for(tt=Qe;tt<=Le;tt++)if(nn[tt-Qe]===0&&Ps(Rt,m[tt])){Ot=tt;break}Ot===void 0?$e(Rt,ae,z,!0):(nn[Ot-Qe]=ne+1,Ot>=Yt?Yt=Ot:tn=!0,Y(Rt,m[Ot],x,null,ae,z,ee,A,X),kt++)}const hs=tn?Up(nn):Ms;for(tt=hs.length-1,ne=St-1;ne>=0;ne--){const Rt=Qe+ne,Ot=m[Rt],Be=m[Rt+1],Yn=Rt+1{const{el:z,type:ee,transition:A,children:X,shapeFlag:ne}=g;if(ne&6){De(g.component.subTree,m,x,D);return}if(ne&128){g.suspense.move(m,x,D);return}if(ne&64){ee.move(g,m,x,vt);return}if(ee===je){r(z,m,x);for(let be=0;beA.enter(z),ae));else{const{leave:be,delayLeave:Le,afterLeave:Te}=A,Qe=()=>{g.ctx.isUnmounted?o(z):r(z,m,x)},Ze=()=>{const tt=z._isLeaving||!!z[cn];z._isLeaving&&z[cn](!0),A.persisted&&!tt?Qe():be(z,()=>{Qe(),Te&&Te()})};Le?Le(z,Qe,Ze):Ze()}else r(z,m,x)},$e=(g,m,x,D=!1,ae=!1)=>{const{type:z,props:ee,ref:A,children:X,dynamicChildren:ne,shapeFlag:Ce,patchFlag:be,dirs:Le,cacheIndex:Te,memo:Qe}=g;if((be===-2||ne&&ne.hasOnce)&&(ae=!1),A!=null&&(Mn(),Pr(A,null,x,g,!0),In()),Te!=null&&(!g.ctx||g.ctx===m)&&(m.renderCache[Te]=void 0),Ce&256){m.ctx.deactivate(g);return}const Ze=Ce&1&&Le,tt=!Or(g);let kt;if(tt&&(kt=ee&&ee.onVnodeBeforeUnmount)&&xn(kt,m,g),Ce&6)ct(g.component,x,D);else{if(Ce&128){g.suspense.unmount(x,D);return}Ze&&Cs(g,null,m,"beforeUnmount"),Ce&64?g.type.remove(g,m,x,vt,D):ne&&!ne.hasOnce&&(z!==je||be>0&&be&64)?bt(ne,m,x,!1,!0):(z===je&&be&384||!ae&&Ce&16)&&bt(X,m,x),D&&fe(g)}const St=Qe!=null&&Te==null;(tt&&(kt=ee&&ee.onVnodeUnmounted)||Ze||St)&&Qt(()=>{kt&&xn(kt,m,g),Ze&&Cs(g,null,m,"unmounted"),St&&(g.el=null)},x)},fe=g=>{const{type:m,el:x,anchor:D,transition:ae}=g,z=m===je;if(z&&!ae){Ie(x,D);return}if(m===Do){T(g),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave();return}const ee=z?Fr(g):g,A=()=>{z?_(x)&&Ie(x,D):o(x),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(ee&&ee.shapeFlag&1&&ae&&!ae.persisted){const{leave:X,delayLeave:ne}=ae,Ce=ee.el,be=()=>X(Ce,A);ne?ne(Ce,A,be):be()}else A()},Ie=(g,m)=>{let x;for(;g!==m;)x=E(g),o(g),g=x;o(m)},ct=(g,m,x)=>{const{bum:D,scope:ae,job:z,subTree:ee,um:A,m:X,a:ne}=g;hu(X),hu(ne),D&&Io(D),ae.stop(),z?(z.flags|=8,$e(ee,g,m,x)):g.vnode.el&&ee&&(ee.transition=g.vnode.transition,$e(ee,g,m,x)),A&&Qt(A,m),Qt(()=>{g.isUnmounted=!0},m)},bt=(g,m,x,D=!1,ae=!1,z=0)=>{for(let ee=z;ee{if(g.shapeFlag&6)return _t(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=E(g.anchor||g.el),x=m&&m[Cc];return x?E(x):m},Bt=(g,m,x)=>{const D=g&&m._vnode?void 0:g&&g.component?g.component.uid:Jp();Zf(()=>{g==null?m._vnode&&$e(m._vnode,null,null,!0):Y(m._vnode||null,g,m,null,null,null,x),m._vnode=g},D)},vt={p:Y,um:$e,m:De,r:fe,mt:Se,mc:se,pc:de,pbc:S,n:_t,o:e};return{render:Bt,hydrate:void 0,createApp:Sp(Bt)}}function pi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $s({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function cl(e,t,n=!1){const r=e.children,o=t.children;if(He(r)&&He(o))for(let i=0;i>1,e[n[f]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function Wc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Wc(t)}function hu(e){if(e)for(let t=0;te.__isSuspense;function qp(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):Qf(e)}const je=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function Yc(){Ds.pop(),an=Ds[Ds.length-1]||null}let Nr=1;function Yo(e,t=!1){Nr+=e,e<0&&an&&t&&(an.hasOnce=!0)}function Jc(e){return e.dynamicChildren=Nr>0?an||Ms:null,Yc(),Nr>0&&an&&an.push(e),e}function O(e,t,n,r,o,i){return Jc(l(e,t,n,r,o,i,!0))}function wt(e,t,n,r,o){return Jc(we(e,t,n,r,o,!0))}function Vr(e){return e?e.__v_isVNode===!0:!1}function Ps(e,t){return e.type===t.type&&e.key===t.key}const Xc=({key:e})=>e??null,Lo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||Gt(e)||Ye(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,r=0,o=null,i=e===je?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xc(t),ref:t&&Lo(t),scopeId:_c,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:dn};return f?(Jo(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=$t(n)?8:16),Nr>0&&!c&&an&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&an.push(v),v}const we=Hp;function Hp(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===gp)&&(e=Wt),Vr(e)){const f=fs(e,t,!0);return n&&Jo(f,n),Nr>0&&!i&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(nv(e)&&(e=e.__vccOpts),t){t=zp(t);let{class:f,style:v}=t;f&&!$t(f)&&(t.class=Xe(f)),ft(v)&&(ol(v)&&!He(v)&&(v=Pt({},v)),t.style=qn(v))}const c=$t(e)?1:Gc(e)?128:ya(e)?64:ft(e)?4:Ye(e)?2:0;return l(e,t,n,r,o,c,i,!0)}function zp(e){return e?ol(e)||Vc(e)?Pt({},e):e:null}function fs(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?Gp(o||{},t):o,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Xc(b),ref:t&&t.ref?n&&i?He(i)?i.concat(Lo(t)):[i,Lo(t)]:Lo(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&&fs(e.ssContent),ssFallback:e.ssFallback&&fs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&r&&ds(y,v.clone(y)),y}function ht(e=" ",t=0){return we(_a,null,e,t)}function Wp(e,t){const n=we(Do,null,e);return n.staticCount=t,n}function he(e="",t=!1){return t?($(),wt(Wt,null,e)):we(Wt,null,e)}function Tn(e){return e==null||typeof e=="boolean"?we(Wt):He(e)?we(je,null,e.slice()):Vr(e)?Vn(e):we(_a,null,String(e))}function Vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fs(e)}function Jo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(He(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Jo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=dn:o===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ye(t)){if(r&65){Jo(e,{default:t});return}t={default:t,_ctx:dn},n=32}else t=String(t),r&64?(n=16,t=[ht(t)]):n=8;e.children=t,e.shapeFlag|=n}function Gp(...e){const t={};for(let n=0;nen||dn;let Xo,Br;{const e=va(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(c=>c(i)):o[0](i)}};Xo=t("__VUE_INSTANCE_SETTERS__",n=>en=n),Br=t("__VUE_SSR_SETTERS__",n=>Ur=n)}const Jr=e=>{const t=en;return Xo(e),e.scope.on(),()=>{e.scope.off(),Xo(t)}},yu=()=>{en&&en.scope.off(),Xo(null)};function Zc(e){return e.vnode.shapeFlag&4}let Ur=!1;function Qp(e,t=!1,n=!1){t&&Br(t);const{props:r,children:o}=e.vnode,i=Zc(e);jp(e,r,i,t),Rp(e,o,n||t);const c=i?Zp(e,t):void 0;return t&&Br(!1),c}function Zp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,bp);const{setup:r}=n;if(r){Mn();const o=e.setupContext=r.length>1?tv(e):null,i=Jr(e),c=Yr(r,e,0,[e.props,o]),f=zu(c);if(In(),i(),(f||e.sp)&&!Or(e)&&Ac(e),f){if(c.then(yu,yu),t)return c.then(v=>{Br(!0);try{gu(e,v,t)}finally{Br(!1)}}).catch(v=>{ha(v,e,0)});e.asyncDep=c}else gu(e,c)}else ed(e)}function gu(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ft(t)&&(e.setupState=mc(t)),ed(e)}function ed(e,t,n){const r=e.type;e.render||(e.render=r.render||Pn);{const o=Jr(e);Mn();try{wp(e)}finally{In(),o()}}}const ev={get(e,t){return zt(e,"get",""),e[t]}};function tv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ev),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(mc(Bf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mr)return Mr[n](e)},has(t,n){return n in t||n in Mr}})):e.proxy}function nv(e){return Ye(e)&&"__vccOpts"in e}const st=(e,t)=>Wf(e,t,Ur);function sv(e,t,n){try{Yo(-1);const r=arguments.length;return r===2?ft(t)&&!He(t)?Vr(t)?we(e,null,[t]):we(e,t):we(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Vr(n)&&(n=[n]),we(e,t,n))}finally{Yo(1)}}const rv="3.5.44";/** +**/function Yr(e,t,n,r){try{return r?e(...r):e()}catch(o){ha(o,t,n)}}function mn(e,t,n,r){if(Je(e)){const o=Yr(e,t,n,r);return o&&zu(o)&&o.catch(i=>{ha(i,t,n)}),o}if(He(e)){const o=[];for(let i=0;i>>1,o=Zt[r],i=Kr(o);i=Kr(n)?Zt.push(e):Zt.splice(Xf(t),0,e),e.flags|=1,yc()}}function yc(){qo||(qo=hc.then(wc))}function Qf(e){if(!He(e))os&&e.id===-1?os.splice(Js+1,0,e):e.flags&1||(En.push(e),e.flags|=1);else for(let t=0;t=t))continue;Zt.splice(r,1),r=e?r-1:yn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function bc(e,t,n=0){if(En.length){let r=En,o=0;if(t){r=[];for(let c=0;cKr(c)-Kr(f));if(En.length=o,os){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function wc(e){try{for(yn=0;yn{r._d&&Yo(-1);const i=Ho(t),c=Ds.length;let f;try{f=e(...o)}finally{for(let v=Ds.length;v>c;v--)Yc();Ho(i),r._d&&Yo(1)}return f};return r._n=!0,r._c=!0,r._d=!0,r}function Me(e,t){if(dn===null)return e;const n=ka(dn),r=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Je(t)?t.call(r&&r.proxy):t}}const tp=Symbol.for("v-scx"),np=()=>jo(tp);function pt(e,t,n){return kc(e,t,n)}function kc(e,t,n=mt){const{immediate:r,deep:o,flush:i,once:c}=n,f=Pt({},n),v=t&&r||!t&&i!=="post";let b;if(Ur){if(i==="sync"){const C=np();b=C.__watcherHandles||(C.__watcherHandles=[])}else if(!v){const C=()=>{};return C.stop=Pn,C.resume=Pn,C.pause=Pn,C}}const y=en;f.call=(C,I,Y)=>mn(C,y,I,Y);let _=!1;i==="post"?f.scheduler=C=>{C.i=y,Qt(C,y&&y.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(C,I)=>{I?C():al(C)}),f.augmentJob=C=>{t&&(C.flags|=4),_&&(C.flags|=2,y&&(C.id=y.uid,C.i=y))};const E=Yf(e,t,f);return Ur&&(b?b.push(E):v&&E()),E}function sp(e,t,n){const r=this.proxy,o=$t(e)?e.includes(".")?xc(r,e):()=>r[e]:e.bind(r,r);let i;Je(t)?i=t:(i=t.handler,n=t);const c=Jr(this),f=kc(o,i.bind(r),n);return c(),f}function xc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;oe.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),rp=e=>e&&(e.defer||e.defer===""),ou=e=>typeof SVGElement<"u"&&e instanceof SVGElement,au=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ei=(e,t)=>{const n=e&&e.to;return $t(n)?t?t(n):null:n},op={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,c,f,v,b){const{mc:y,pc:_,pbc:E,o:{insert:C,querySelector:I,createText:Y,createComment:le,parentNode:ue}}=b,ce=As(t.props);let{dynamicChildren:G}=t;const T=(N,se,j)=>{N.shapeFlag&16&&y(N.children,se,j,o,i,c,f,v)},q=(N=t)=>{const se=As(N.props),j=N.target=Ei(N.props,I),S=Ti(j,N,Y,C);j&&(c!=="svg"&&ou(j)?c="svg":c!=="mathml"&&au(j)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),se||(T(N,j,S),Cr(N,!1)))},Z=N=>{const se=()=>{if(ss.get(N)===se){if(ss.delete(N),As(N.props)){const j=ue(N.el)||n;T(N,j,N.anchor),Cr(N,!0)}q(N)}};ss.set(N,se),Qt(se,i)};if(e==null){const N=t.el=Y(""),se=t.anchor=Y("");if(C(N,n,r),C(se,n,r),rp(t.props)||i&&i.pendingBranch){Z(t);return}ce&&(T(t,n,se),Cr(t,!0)),q()}else{t.el=e.el;const N=t.anchor=e.anchor,se=ss.get(e);if(se){se.flags|=8,ss.delete(e),Z(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,S=t.targetAnchor=e.targetAnchor,O=As(e.props),te=O?n:j,Pe=O?N:S;if(c==="svg"||ou(j)?c="svg":(c==="mathml"||au(j))&&(c="mathml"),G?(E(e.dynamicChildren,G,te,o,i,c,f),cl(e,t,!0)):v||_(e,t,te,Pe,o,i,c,f,!1),ce)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ao(t,n,N,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Se=Ei(t.props,I);Se&&(t.target=Se,Ao(t,Se,null,b,0))}else O&&Ao(t,j,S,b,1);Cr(t,ce)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:y,target:_,props:E}=e,C=As(E),I=i||!C,Y=ss.get(e);if(Y&&(Y.flags|=8,ss.delete(e)),_&&(o(b),o(y)),i&&o(v),!Y&&(C||_)&&c&16)for(let le=0;le{e.isMounted=!0}),Mc(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],Sc={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},ip={name:"BaseTransition",props:Sc,setup(e,{slots:t}){const n=dl(),r=$c();return()=>{const o=t.default&&il(t.default(),!0),i=o&&o.length?Ec(o):n.subTree?he():void 0;if(!i)return;const c=ut(e),{mode:f}=c;if(r.isLeaving)return di(i);const v=zo(i);if(!v)return di(i);let b=Rr(v,c,r,n,_=>b=_);v.type!==Wt&&ds(v,b);let y=n.subTree&&zo(n.subTree);if(y&&y.type!==Wt&&!Ps(y,v)&&Fr(n.subTree)){let _=Rr(y,c,r,n);if(ds(y,_),f==="out-in"&&v.type!==Wt)return r.isLeaving=!0,_.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,y=void 0},di(i);f==="in-out"&&v.type!==Wt?_.delayLeave=(E,C,I)=>{const Y=Tc(r,y);Y[String(y.key)]=y,E[cn]=()=>{C(),E[cn]=void 0,delete b.delayedLeave,y=void 0},b.delayedLeave=()=>{I(),delete b.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return i}}};function Ec(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Wt){t=n;break}}return t}const lp=ip;function Tc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Rr(e,t,n,r,o){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:y,onEnterCancelled:_,onBeforeLeave:E,onLeave:C,onAfterLeave:I,onLeaveCancelled:Y,onBeforeAppear:le,onAppear:ue,onAfterAppear:ce,onAppearCancelled:G}=t,T=String(e.key),q=Tc(n,e),Z=(j,S)=>{j&&mn(j,r,9,S)},N=(j,S)=>{const O=S[1];Z(j,S),He(j)?j.every(te=>te.length<=1)&&O():j.length<=1&&O()},se={mode:c,persisted:f,beforeEnter(j){let S=v;if(!n.isMounted)if(i)S=le||v;else return;j[cn]&&j[cn](!0);const O=q[T];if(O&&Ps(e,O)){let te=O.el[cn];if(!te){const Pe=Fr(O);te=Pe&&Pe.el[cn]}te&&te()}Z(S,[j])},enter(j){if(q[T]===e)return;let S=b,O=y,te=_;if(!n.isMounted)if(i)S=ue||b,O=ce||y,te=G||_;else return;let Pe=!1;j[kr]=ye=>{Pe||(Pe=!0,ye?Z(te,[j]):Z(O,[j]),se.delayedLeave&&se.delayedLeave(),j[kr]=void 0)};const Se=j[kr].bind(null,!1);S?N(S,[j,Se]):Se()},leave(j,S){const O=String(e.key);if(j[kr]&&j[kr](!0),n.isUnmounting)return S();Z(E,[j]);let te=!1;j[cn]=Se=>{te||(te=!0,S(),Se?Z(Y,[j]):Z(I,[j]),j[cn]=void 0,q[O]===e&&delete q[O])};const Pe=j[cn].bind(null,!1);q[O]=e,C?N(C,[j,Pe]):Pe()},clone(j){const S=Rr(j,t,n,r,o);return o&&o(S),S}};return se}function di(e){if(ga(e))return e=fs(e),e.children=null,e}function zo(e){if(!ga(e))return ya(e.type)&&e.children?Ec(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&&Je(n.default))return n.default()}}function ds(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ds(ya(n.type)&&zo(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===Ie&&He(e.children)){const n=Kc(e.children,!1);n&&ds(n,t)}}function il(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;iPr(Y,t&&(He(t)?t[le]:t),n,r,o));return}if(Or(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Pr(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?ka(r.component):r.el,c=o?null:i,{i:f,r:v}=e,b=t&&t.r,y=f.refs===mt?f.refs={}:f.refs,_=f.setupState,E=ut(_),C=_===mt?Hu:Y=>iu(y,Y)?!1:dt(E,Y),I=(Y,le)=>!(le&&iu(y,le));if(b!=null&&b!==v){if(lu(t),$t(b))y[b]=null,C(b)&&(_[b]=null);else if(Gt(b)){const Y=t;I(b,Y.k)&&(b.value=null),Y.k&&(y[Y.k]=null)}}if(Je(v))Yr(v,f,12,[c,y]);else{const Y=$t(v),le=Gt(v);if(Y||le){const ue=()=>{if(e.f){const ce=Y?C(v)?_[v]:y[v]:I()||!e.k?v.value:y[e.k];if(o)He(ce)&&Ji(ce,i);else if(He(ce))ce.includes(i)||ce.push(i);else if(Y)y[v]=[i],C(v)&&(_[v]=y[v]);else{const G=[i];I(v,e.k)&&(v.value=G),e.k&&(y[e.k]=G)}}else Y?(y[v]=c,C(v)&&(_[v]=c)):le&&(I(v,e.k)&&(v.value=c),e.k&&(y[e.k]=c))};if(c){const ce=()=>{ue(),Wo.delete(e)};ce.id=-1,Wo.set(e,ce),Qt(ce,n)}else lu(e),ue()}}}function lu(e){const t=Wo.get(e);t&&(t.flags|=8,Wo.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Or=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function up(e,t){Pc(e,"a",t)}function cp(e,t){Pc(e,"da",t)}function Pc(e,t,n=en){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ba(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ga(o.parent.vnode)&&dp(r,t,n,o),o=o.parent}}function dp(e,t,n,r){const o=ba(t,e,r,!0);Ln(()=>{Ji(r[t],o)},n)}function ba(e,t,n=en,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{Mn();const f=Jr(n),v=mn(t,n,e,c);return f(),In(),v});return r?o.unshift(i):o.push(i),i}}const Gn=e=>(t,n=en)=>{(!Ur||e==="sp")&&ba(e,(...r)=>t(...r),n)},fp=Gn("bm"),ln=Gn("m"),pp=Gn("bu"),Oc=Gn("u"),Mc=Gn("bum"),Ln=Gn("um"),vp=Gn("sp"),mp=Gn("rtg"),hp=Gn("rtc");function yp(e,t=en){ba("ec",e,t)}const gp=Symbol.for("v-ndc");function et(e,t,n,r){let o;const i=n,c=He(e);if(c||$t(e)){const f=c&&ls(e);let v=!1,b=!1;f&&(v=!fn(e),b=jn(e),e=ma(e)),o=new Array(e.length);for(let y=0,_=e.length;y<_;y++)o[y]=t(v?b?cs(vn(e[y])):vn(e[y]):e[y],y,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,b=f.length;ve?Zc(e)?ka(e):Ai(e.parent):null,Mr=Pt(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=>Ai(e.parent),$root:e=>Ai(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jc(e),$forceUpdate:e=>e.f||(e.f=()=>{al(e.update)}),$nextTick:e=>e.n||(e.n=ur.bind(e.proxy)),$watch:e=>sp.bind(e)}),fi=(e,t)=>e!==mt&&!e.__isScriptSetup&&dt(e,t),bp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const E=c[t];if(E!==void 0)switch(E){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(fi(r,t))return c[t]=1,r[t];if(o!==mt&&dt(o,t))return c[t]=2,o[t];if(dt(i,t))return c[t]=3,i[t];if(n!==mt&&dt(n,t))return c[t]=4,n[t];Pi&&(c[t]=0)}}const b=Mr[t];let y,_;if(b)return t==="$attrs"&&zt(e.attrs,"get",""),b(e);if((y=f.__cssModules)&&(y=y[t]))return y;if(n!==mt&&dt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,dt(_,t))return _[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return fi(o,t)?(o[t]=n,!0):r!==mt&&dt(r,t)?(r[t]=n,!0):dt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:c}},f){let v;return!!(n[f]||e!==mt&&f[0]!=="$"&&dt(e,f)||fi(t,f)||dt(i,f)||dt(r,f)||dt(Mr,f)||dt(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function uu(e){return He(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Pi=!0;function wp(e){const t=jc(e),n=e.proxy,r=e.ctx;Pi=!1,t.beforeCreate&&cu(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:c,watch:f,provide:v,inject:b,created:y,beforeMount:_,mounted:E,beforeUpdate:C,updated:I,activated:Y,deactivated:le,beforeDestroy:ue,beforeUnmount:ce,destroyed:G,unmounted:T,render:q,renderTracked:Z,renderTriggered:N,errorCaptured:se,serverPrefetch:j,expose:S,inheritAttrs:O,components:te,directives:Pe,filters:Se}=t;if(b&&_p(b,r,null),c)for(const Ue in c){const de=c[Ue];Je(de)&&(r[Ue]=de.bind(n))}if(o){const Ue=o.call(n,n);ft(Ue)&&(e.data=sl(Ue))}if(Pi=!0,i)for(const Ue in i){const de=i[Ue],ke=Je(de)?de.bind(n,n):Je(de.get)?de.get.bind(n,n):Pn,Ee=!Je(de)&&Je(de.set)?de.set.bind(n):Pn,De=st({get:ke,set:Ee});Object.defineProperty(r,Ue,{enumerable:!0,configurable:!0,get:()=>De.value,set:$e=>De.value=$e})}if(f)for(const Ue in f)Ic(f[Ue],r,n,Ue);if(v){const Ue=Je(v)?v.call(n):v;Reflect.ownKeys(Ue).forEach(de=>{ep(de,Ue[de])})}y&&cu(y,e,"c");function Ae(Ue,de){He(de)?de.forEach(ke=>Ue(ke.bind(n))):de&&Ue(de.bind(n))}if(Ae(fp,_),Ae(ln,E),Ae(pp,C),Ae(Oc,I),Ae(up,Y),Ae(cp,le),Ae(yp,se),Ae(hp,Z),Ae(mp,N),Ae(Mc,ce),Ae(Ln,T),Ae(vp,j),He(S))if(S.length){const Ue=e.exposed||(e.exposed={});S.forEach(de=>{Object.defineProperty(Ue,de,{get:()=>n[de],set:ke=>n[de]=ke,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===Pn&&(e.render=q),O!=null&&(e.inheritAttrs=O),te&&(e.components=te),Pe&&(e.directives=Pe),j&&Ac(e)}function _p(e,t,n=Pn){He(e)&&(e=Oi(e));for(const r in e){const o=e[r];let i;ft(o)?"default"in o?i=jo(o.from||r,o.default,!0):i=jo(o.from||r):i=jo(o),Gt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function cu(e,t,n){mn(He(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ic(e,t,n,r){let o=r.includes(".")?xc(n,r):()=>n[r];if($t(e)){const i=t[e];Je(i)&&pt(o,i)}else if(Je(e))pt(o,e.bind(n));else if(ft(e))if(He(e))e.forEach(i=>Ic(i,t,n,r));else{const i=Je(e.handler)?e.handler.bind(n):t[e.handler];Je(i)&&pt(o,i,e)}}function jc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!o.length&&!n&&!r?v=t:(v={},o.length&&o.forEach(b=>Go(v,b,c,!0)),Go(v,t,c)),ft(t)&&i.set(t,v),v}function Go(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Go(e,i,n,!0),o&&o.forEach(c=>Go(e,c,n,!0));for(const c in t)if(!(r&&c==="expose")){const f=kp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const kp={data:du,props:fu,emits:fu,methods:$r,computed:$r,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:$r,directives:$r,watch:Cp,provide:du,inject:xp};function du(e,t){return t?e?function(){return Pt(Je(e)?e.call(this,this):e,Je(t)?t.call(this,this):t)}:t:e}function xp(e,t){return $r(Oi(e),Oi(t))}function Oi(e){if(He(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 Tp(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||mt;let o=n;const i=t.startsWith("update:"),c=i&&Ep(r,t.slice(7));c&&(c.trim&&(o=n.map(y=>$t(y)?y.trim():y)),c.number&&(o=o.map(pa)));let f,v=r[f=oi(t)]||r[f=oi(gn(t))];!v&&i&&(v=r[f=oi(ms(t))]),v&&mn(v,e,6,o);const b=r[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,mn(b,e,6,o)}}const Ap=new WeakMap;function Lc(e,t,n=!1){const r=n?Ap:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let c={},f=!1;if(!Je(e)){const v=b=>{const y=Lc(b,t,!0);y&&(f=!0,Pt(c,y))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(ft(e)&&r.set(e,null),null):(He(i)?i.forEach(v=>c[v]=null):Pt(c,i),ft(e)&&r.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,ms(t))||dt(e,t))}function pu(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:y,props:_,data:E,setupState:C,ctx:I,inheritAttrs:Y}=e,le=Ho(e);let ue,ce;try{if(n.shapeFlag&4){const T=o||r,q=T;ue=Tn(b.call(q,T,y,_,C,E,I)),ce=f}else{const T=t;ue=Tn(T.length>1?T(_,{attrs:f,slots:c,emit:v}):T(_,null)),ce=t.props?f:Pp(f)}}catch(T){Ds.length=0,ha(T,e,1),ue=we(Wt)}let G=ue;if(ce&&Y!==!1){const T=Object.keys(ce),{shapeFlag:q}=G;T.length&&q&7&&(i&&T.some(da)&&(ce=Op(ce,i)),G=fs(G,ce,!1,!0))}if(n.dirs&&(G=fs(G,null,!1,!0),G.dirs=G.dirs?G.dirs.concat(n.dirs):n.dirs),n.transition){const T=ya(G.type)&&zo(G)||G;ds(T,n.transition)}return ue=G,Ho(le),ue}function Kc(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Op=(e,t)=>{const n={};for(const r in e)(!da(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mp(e,t,n){const{props:r,children:o,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 r?vu(r,c,b):!!c;if(v&8){const y=t.dynamicProps;for(let _=0;_Object.create(Fc),Vc=e=>Object.getPrototypeOf(e)===Fc;function jp(e,t,n,r=!1){const o={},i=Nc();e.propsDefaults=Object.create(null),Bc(e,t,o,i);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=r?o:Vf(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Dp(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,f=ut(o),[v]=e.propsOptions;let b=!1;if((r||c>0)&&!(c&16)){if(c&8){const y=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[E,C]=Uc(_,t,!0);Pt(c,E),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!i&&!v)return ft(e)&&r.set(e,Ms),Ms;if(He(i))for(let y=0;ye==="_"||e==="_ctx"||e==="$stable",ul=e=>He(e)?e.map(Tn):[Tn(e)],Kp=(e,t,n)=>{if(t._n)return t;const r=Wn((...o)=>ul(t(...o)),n);return r._c=!1,r},qc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(ll(o))continue;const i=e[o];if(Je(i))t[o]=Kp(o,i,r);else if(i!=null){const c=ul(i);t[o]=()=>c}}},Hc=(e,t)=>{const n=ul(t);e.slots.default=()=>n},zc=(e,t,n)=>{for(const r in t)(n||!ll(r))&&(e[r]=t[r])},Rp=(e,t,n)=>{const r=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(zc(r,t,n),n&&Ju(r,"_",o,!0)):qc(t,r)}else t&&Hc(e,t)},Fp=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,c=mt;if(r.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:zc(o,t,n):(i=!t.$stable,qc(t,o)),c=t}else t&&(Hc(e,t),c={default:1});if(i)for(const f in o)!ll(f)&&c[f]==null&&delete o[f]},Qt=qp;function Np(e){return Vp(e)}function Vp(e,t){const n=va();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:y,parentNode:_,nextSibling:E,setScopeId:C=Pn,insertStaticContent:I}=e,Y=(g,m,x,D=null,ae=null,W=null,ee=void 0,A=null,X=!!m.dynamicChildren)=>{if(g===m)return;g&&!Ps(g,m)&&(D=_t(g),$e(g,ae,W,!0),g=null),m.patchFlag===-2&&(X=!1,m.dynamicChildren=null),m.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(m.dynamicChildren===Ms&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:ne,ref:Ce,shapeFlag:be}=m;switch(ne){case _a:le(g,m,x,D);break;case Wt:ue(g,m,x,D);break;case Do:g==null&&ce(m,x,D,ee);break;case Ie:te(g,m,x,D,ae,W,ee,A,X);break;default:be&1?q(g,m,x,D,ae,W,ee,A,X):be&6?Pe(g,m,x,D,ae,W,ee,A,X):(be&64||be&128)&&ne.process(g,m,x,D,ae,W,ee,A,X,vt)}Ce!=null&&ae?Pr(Ce,g&&g.ref,W,m||g,!m):Ce==null&&g&&g.ref!=null&&Pr(g.ref,null,W,g,!0)},le=(g,m,x,D)=>{if(g==null)r(m.el=f(m.children),x,D);else{const ae=m.el=g.el;m.children!==g.children&&b(ae,m.children)}},ue=(g,m,x,D)=>{g==null?r(m.el=v(m.children||""),x,D):m.el=g.el},ce=(g,m,x,D)=>{[g.el,g.anchor]=I(g.children,m,x,D,g.el,g.anchor)},G=({el:g,anchor:m},x,D)=>{let ae;for(;g&&g!==m;)ae=E(g),r(g,x,D),g=ae;r(m,x,D)},T=({el:g,anchor:m})=>{let x;for(;g&&g!==m;)x=E(g),o(g),g=x;o(m)},q=(g,m,x,D,ae,W,ee,A,X)=>{if(m.type==="svg"?ee="svg":m.type==="math"&&(ee="mathml"),g==null)Z(m,x,D,ae,W,ee,A,X);else{const ne=g.el&&g.el._isVueCE?g.el:null;try{ne&&ne._beginPatch(),j(g,m,ae,W,ee,A,X)}finally{ne&&ne._endPatch()}}},Z=(g,m,x,D,ae,W,ee,A)=>{let X,ne;const{props:Ce,shapeFlag:be,transition:Le,dirs:Te}=g;if(X=g.el=c(g.type,W,Ce&&Ce.is,Ce),be&8?y(X,g.children):be&16&&se(g.children,X,null,D,ae,pi(g,W),ee,A),Te&&Cs(g,null,D,"created"),N(X,g,g.scopeId,ee,D),Ce){for(const Ze in Ce)Ze!=="value"&&!Er(Ze)&&i(X,Ze,null,Ce[Ze],W,D);"value"in Ce&&i(X,"value",null,Ce.value,W),(ne=Ce.onVnodeBeforeMount)&&xn(ne,D,g)}Te&&Cs(g,null,D,"beforeMount");const Qe=Bp(ae,Le);Qe&&Le.beforeEnter(X),r(X,m,x),((ne=Ce&&Ce.onVnodeMounted)||Qe||Te)&&Qt(()=>{try{ne&&xn(ne,D,g),Qe&&Le.enter(X),Te&&Cs(g,null,D,"mounted")}finally{}},ae)},N=(g,m,x,D,ae)=>{if(x&&C(g,x),D)for(let W=0;W{for(let ne=X;ne{const A=m.el=g.el;let{patchFlag:X,dynamicChildren:ne,dirs:Ce}=m;X|=g.patchFlag&16;const be=g.props||mt,Le=m.props||mt;let Te;if(x&&$s(x,!1),(Te=Le.onVnodeBeforeUpdate)&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"beforeUpdate"),x&&$s(x,!0),ne&&(!g.dynamicChildren||g.dynamicChildren.length!==ne.length)&&(X=0,ee=!1,ne=null),(be.innerHTML&&Le.innerHTML==null||be.textContent&&Le.textContent==null)&&y(A,""),ne?S(g.dynamicChildren,ne,A,x,D,pi(m,ae),W):ee||de(g,m,A,null,x,D,pi(m,ae),W,!1),X>0){if(X&16)O(A,be,Le,x,ae);else if(X&2&&be.class!==Le.class&&i(A,"class",null,Le.class,ae),X&4&&i(A,"style",be.style,Le.style,ae),X&8){const Qe=m.dynamicProps;for(let Ze=0;Ze{Te&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"updated")},D)},S=(g,m,x,D,ae,W,ee)=>{for(let A=0;A{if(m!==x){if(m!==mt)for(const W in m)!Er(W)&&!(W in x)&&i(g,W,m[W],null,ae,D);for(const W in x){if(Er(W))continue;const ee=x[W],A=m[W];ee!==A&&W!=="value"&&i(g,W,A,ee,ae,D)}"value"in x&&i(g,"value",m.value,x.value,ae)}},te=(g,m,x,D,ae,W,ee,A,X)=>{const ne=m.el=g?g.el:f(""),Ce=m.anchor=g?g.anchor:f("");let{patchFlag:be,dynamicChildren:Le,slotScopeIds:Te}=m;Te&&(A=A?A.concat(Te):Te),g==null?(r(ne,x,D),r(Ce,x,D),se(m.children||[],x,Ce,ae,W,ee,A,X)):be>0&&be&64&&Le&&g.dynamicChildren&&g.dynamicChildren.length===Le.length?(S(g.dynamicChildren,Le,x,ae,W,ee,A),(m.key!=null||ae&&m===ae.subTree)&&cl(g,m,!0)):de(g,m,x,Ce,ae,W,ee,A,X)},Pe=(g,m,x,D,ae,W,ee,A,X)=>{m.slotScopeIds=A,g==null?m.shapeFlag&512?ae.ctx.activate(m,x,D,ee,X):Se(m,x,D,ae,W,ee,X):ye(g,m,X)},Se=(g,m,x,D,ae,W,ee)=>{const A=g.component=Xp(g,D,ae);if(ga(g)&&(A.ctx.renderer=vt),Qp(A,!1,ee),A.asyncDep){if(ae&&ae.registerDep(A,Ae,ee,W),!g.el){const X=A.subTree=we(Wt);ue(null,X,m,x),g.placeholder=X.el}}else Ae(A,g,m,x,ae,W,ee)},ye=(g,m,x)=>{const D=m.component=g.component;if(Mp(g,m,x))if(D.asyncDep&&!D.asyncResolved){m.el=g.el,m.placeholder=g.placeholder,Ue(D,m,x);return}else D.next=m,D.update();else m.el=g.el,m.placeholder=g.placeholder,D.vnode=m},Ae=(g,m,x,D,ae,W,ee)=>{const A=()=>{if(g.isMounted){let{next:be,bu:Le,u:Te,parent:Qe,vnode:Ze}=g;{const Yt=Wc(g);if(Yt){be&&(be.el=Ze.el,Ue(g,be,ee)),Yt.asyncDep.then(()=>{Qt(()=>{g.isUnmounted||ne()},ae)});return}}let tt=be,kt;$s(g,!1),be?(be.el=Ze.el,Ue(g,be,ee)):be=Ze,Le&&Io(Le),(kt=be.props&&be.props.onVnodeBeforeUpdate)&&xn(kt,Qe,be,Ze),$s(g,!0);const St=pu(g),tn=g.subTree;g.subTree=St,Y(tn,St,_(tn.el),_t(tn),g,ae,W),be.el=St.el,tt===null&&Ip(g,St.el),Te&&Qt(Te,ae),(kt=be.props&&be.props.onVnodeUpdated)&&Qt(()=>xn(kt,Qe,be,Ze),ae)}else{let be;const{el:Le,props:Te}=m,{bm:Qe,m:Ze,parent:tt,root:kt,type:St}=g,tn=Or(m);$s(g,!1),Qe&&Io(Qe),!tn&&(be=Te&&Te.onVnodeBeforeMount)&&xn(be,tt,m),$s(g,!0);{kt.ce&&kt.ce._hasShadowRoot()&&kt.ce._injectChildStyle(St,g.parent?g.parent.type:void 0);const Yt=g.subTree=pu(g);Y(null,Yt,x,D,g,ae,W),m.el=Yt.el}if(Ze&&Qt(Ze,ae),!tn&&(be=Te&&Te.onVnodeMounted)){const Yt=m;Qt(()=>xn(be,tt,Yt),ae)}(m.shapeFlag&256||tt&&Or(tt.vnode)&&tt.vnode.shapeFlag&256)&&g.a&&Qt(g.a,ae),g.isMounted=!0,m=x=D=null}};g.scope.on();const X=g.effect=new ec(A);g.scope.off();const ne=g.update=X.run.bind(X),Ce=g.job=X.runIfDirty.bind(X);Ce.i=g,Ce.id=g.uid,X.scheduler=()=>al(Ce),$s(g,!0),ne()},Ue=(g,m,x)=>{m.component=g;const D=g.vnode.props;g.vnode=m,g.next=null,Dp(g,m.props,D,x),Fp(g,m.children,x),Mn(),gc(g),In()},de=(g,m,x,D,ae,W,ee,A,X=!1)=>{const ne=g&&g.children,Ce=g?g.shapeFlag:0,be=m.children,{patchFlag:Le,shapeFlag:Te}=m;if(Le>0){if(Le&128){Ee(ne,be,x,D,ae,W,ee,A,X);return}else if(Le&256){ke(ne,be,x,D,ae,W,ee,A,X);return}}Te&8?(Ce&16&&bt(ne,ae,W),be!==ne&&y(x,be)):Ce&16?Te&16?Ee(ne,be,x,D,ae,W,ee,A,X):bt(ne,ae,W,!0):(Ce&8&&y(x,""),Te&16&&se(be,x,D,ae,W,ee,A,X))},ke=(g,m,x,D,ae,W,ee,A,X)=>{g=g||Ms,m=m||Ms;const ne=g.length,Ce=m.length,be=Math.min(ne,Ce);let Le;for(Le=0;LeCe?bt(g,ae,W,!0,!1,be):se(m,x,D,ae,W,ee,A,X,be)},Ee=(g,m,x,D,ae,W,ee,A,X)=>{let ne=0;const Ce=m.length;let be=g.length-1,Le=Ce-1;for(;ne<=be&&ne<=Le;){const Te=g[ne],Qe=m[ne]=X?Vn(m[ne]):Tn(m[ne]);if(Ps(Te,Qe))Y(Te,Qe,x,null,ae,W,ee,A,X);else break;ne++}for(;ne<=be&&ne<=Le;){const Te=g[be],Qe=m[Le]=X?Vn(m[Le]):Tn(m[Le]);if(Ps(Te,Qe))Y(Te,Qe,x,null,ae,W,ee,A,X);else break;be--,Le--}if(ne>be){if(ne<=Le){const Te=Le+1,Qe=TeLe)for(;ne<=be;)$e(g[ne],ae,W,!0),ne++;else{const Te=ne,Qe=ne,Ze=new Map;for(ne=Qe;ne<=Le;ne++){const Rt=m[ne]=X?Vn(m[ne]):Tn(m[ne]);Rt.key!=null&&Ze.set(Rt.key,ne)}let tt,kt=0;const St=Le-Qe+1;let tn=!1,Yt=0;const sn=new Array(St);for(ne=0;ne=St){$e(Rt,ae,W,!0);continue}let Ot;if(Rt.key!=null)Ot=Ze.get(Rt.key);else for(tt=Qe;tt<=Le;tt++)if(sn[tt-Qe]===0&&Ps(Rt,m[tt])){Ot=tt;break}Ot===void 0?$e(Rt,ae,W,!0):(sn[Ot-Qe]=ne+1,Ot>=Yt?Yt=Ot:tn=!0,Y(Rt,m[Ot],x,null,ae,W,ee,A,X),kt++)}const hs=tn?Up(sn):Ms;for(tt=hs.length-1,ne=St-1;ne>=0;ne--){const Rt=Qe+ne,Ot=m[Rt],Be=m[Rt+1],Yn=Rt+1{const{el:W,type:ee,transition:A,children:X,shapeFlag:ne}=g;if(ne&6){De(g.component.subTree,m,x,D);return}if(ne&128){g.suspense.move(m,x,D);return}if(ne&64){ee.move(g,m,x,vt);return}if(ee===Ie){r(W,m,x);for(let be=0;beA.enter(W),ae));else{const{leave:be,delayLeave:Le,afterLeave:Te}=A,Qe=()=>{g.ctx.isUnmounted?o(W):r(W,m,x)},Ze=()=>{const tt=W._isLeaving||!!W[cn];W._isLeaving&&W[cn](!0),A.persisted&&!tt?Qe():be(W,()=>{Qe(),Te&&Te()})};Le?Le(W,Qe,Ze):Ze()}else r(W,m,x)},$e=(g,m,x,D=!1,ae=!1)=>{const{type:W,props:ee,ref:A,children:X,dynamicChildren:ne,shapeFlag:Ce,patchFlag:be,dirs:Le,cacheIndex:Te,memo:Qe}=g;if((be===-2||ne&&ne.hasOnce)&&(ae=!1),A!=null&&(Mn(),Pr(A,null,x,g,!0),In()),Te!=null&&(!g.ctx||g.ctx===m)&&(m.renderCache[Te]=void 0),Ce&256){m.ctx.deactivate(g);return}const Ze=Ce&1&&Le,tt=!Or(g);let kt;if(tt&&(kt=ee&&ee.onVnodeBeforeUnmount)&&xn(kt,m,g),Ce&6)ct(g.component,x,D);else{if(Ce&128){g.suspense.unmount(x,D);return}Ze&&Cs(g,null,m,"beforeUnmount"),Ce&64?g.type.remove(g,m,x,vt,D):ne&&!ne.hasOnce&&(W!==Ie||be>0&&be&64)?bt(ne,m,x,!1,!0):(W===Ie&&be&384||!ae&&Ce&16)&&bt(X,m,x),D&&fe(g)}const St=Qe!=null&&Te==null;(tt&&(kt=ee&&ee.onVnodeUnmounted)||Ze||St)&&Qt(()=>{kt&&xn(kt,m,g),Ze&&Cs(g,null,m,"unmounted"),St&&(g.el=null)},x)},fe=g=>{const{type:m,el:x,anchor:D,transition:ae}=g,W=m===Ie;if(W&&!ae){je(x,D);return}if(m===Do){T(g),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave();return}const ee=W?Fr(g):g,A=()=>{W?_(x)&&je(x,D):o(x),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(ee&&ee.shapeFlag&1&&ae&&!ae.persisted){const{leave:X,delayLeave:ne}=ae,Ce=ee.el,be=()=>X(Ce,A);ne?ne(Ce,A,be):be()}else A()},je=(g,m)=>{let x;for(;g!==m;)x=E(g),o(g),g=x;o(m)},ct=(g,m,x)=>{const{bum:D,scope:ae,job:W,subTree:ee,um:A,m:X,a:ne}=g;hu(X),hu(ne),D&&Io(D),ae.stop(),W?(W.flags|=8,$e(ee,g,m,x)):g.vnode.el&&ee&&(ee.transition=g.vnode.transition,$e(ee,g,m,x)),A&&Qt(A,m),Qt(()=>{g.isUnmounted=!0},m)},bt=(g,m,x,D=!1,ae=!1,W=0)=>{for(let ee=W;ee{if(g.shapeFlag&6)return _t(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=E(g.anchor||g.el),x=m&&m[Cc];return x?E(x):m},Bt=(g,m,x)=>{const D=g&&m._vnode?void 0:g&&g.component?g.component.uid:Jp();Zf(()=>{g==null?m._vnode&&$e(m._vnode,null,null,!0):Y(m._vnode||null,g,m,null,null,null,x),m._vnode=g},D)},vt={p:Y,um:$e,m:De,r:fe,mt:Se,mc:se,pc:de,pbc:S,n:_t,o:e};return{render:Bt,hydrate:void 0,createApp:Sp(Bt)}}function pi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $s({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function cl(e,t,n=!1){const r=e.children,o=t.children;if(He(r)&&He(o))for(let i=0;i>1,e[n[f]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function Wc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Wc(t)}function hu(e){if(e)for(let t=0;te.__isSuspense;function qp(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):Qf(e)}const Ie=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function Yc(){Ds.pop(),an=Ds[Ds.length-1]||null}let Nr=1;function Yo(e,t=!1){Nr+=e,e<0&&an&&t&&(an.hasOnce=!0)}function Jc(e){return e.dynamicChildren=Nr>0?an||Ms:null,Yc(),Nr>0&&an&&an.push(e),e}function P(e,t,n,r,o,i){return Jc(l(e,t,n,r,o,i,!0))}function wt(e,t,n,r,o){return Jc(we(e,t,n,r,o,!0))}function Vr(e){return e?e.__v_isVNode===!0:!1}function Ps(e,t){return e.type===t.type&&e.key===t.key}const Xc=({key:e})=>e??null,Lo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||Gt(e)||Je(e)?{i:dn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,r=0,o=null,i=e===Ie?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xc(t),ref:t&&Lo(t),scopeId:_c,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:dn};return f?(Jo(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=$t(n)?8:16),Nr>0&&!c&&an&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&an.push(v),v}const we=Hp;function Hp(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===gp)&&(e=Wt),Vr(e)){const f=fs(e,t,!0);return n&&Jo(f,n),Nr>0&&!i&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(nv(e)&&(e=e.__vccOpts),t){t=zp(t);let{class:f,style:v}=t;f&&!$t(f)&&(t.class=Ge(f)),ft(v)&&(ol(v)&&!He(v)&&(v=Pt({},v)),t.style=qn(v))}const c=$t(e)?1:Gc(e)?128:ya(e)?64:ft(e)?4:Je(e)?2:0;return l(e,t,n,r,o,c,i,!0)}function zp(e){return e?ol(e)||Vc(e)?Pt({},e):e:null}function fs(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?Gp(o||{},t):o,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Xc(b),ref:t&&t.ref?n&&i?He(i)?i.concat(Lo(t)):[i,Lo(t)]:Lo(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!==Ie?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fs(e.ssContent),ssFallback:e.ssFallback&&fs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&r&&ds(y,v.clone(y)),y}function ht(e=" ",t=0){return we(_a,null,e,t)}function Wp(e,t){const n=we(Do,null,e);return n.staticCount=t,n}function he(e="",t=!1){return t?($(),wt(Wt,null,e)):we(Wt,null,e)}function Tn(e){return e==null||typeof e=="boolean"?we(Wt):He(e)?we(Ie,null,e.slice()):Vr(e)?Vn(e):we(_a,null,String(e))}function Vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fs(e)}function Jo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(He(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Jo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=dn:o===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Je(t)){if(r&65){Jo(e,{default:t});return}t={default:t,_ctx:dn},n=32}else t=String(t),r&64?(n=16,t=[ht(t)]):n=8;e.children=t,e.shapeFlag|=n}function Gp(...e){const t={};for(let n=0;nen||dn;let Xo,Br;{const e=va(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(c=>c(i)):o[0](i)}};Xo=t("__VUE_INSTANCE_SETTERS__",n=>en=n),Br=t("__VUE_SSR_SETTERS__",n=>Ur=n)}const Jr=e=>{const t=en;return Xo(e),e.scope.on(),()=>{e.scope.off(),Xo(t)}},yu=()=>{en&&en.scope.off(),Xo(null)};function Zc(e){return e.vnode.shapeFlag&4}let Ur=!1;function Qp(e,t=!1,n=!1){t&&Br(t);const{props:r,children:o}=e.vnode,i=Zc(e);jp(e,r,i,t),Rp(e,o,n||t);const c=i?Zp(e,t):void 0;return t&&Br(!1),c}function Zp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,bp);const{setup:r}=n;if(r){Mn();const o=e.setupContext=r.length>1?tv(e):null,i=Jr(e),c=Yr(r,e,0,[e.props,o]),f=zu(c);if(In(),i(),(f||e.sp)&&!Or(e)&&Ac(e),f){if(c.then(yu,yu),t)return c.then(v=>{Br(!0);try{gu(e,v,t)}finally{Br(!1)}}).catch(v=>{ha(v,e,0)});e.asyncDep=c}else gu(e,c)}else ed(e)}function gu(e,t,n){Je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ft(t)&&(e.setupState=mc(t)),ed(e)}function ed(e,t,n){const r=e.type;e.render||(e.render=r.render||Pn);{const o=Jr(e);Mn();try{wp(e)}finally{In(),o()}}}const ev={get(e,t){return zt(e,"get",""),e[t]}};function tv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ev),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(mc(Bf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mr)return Mr[n](e)},has(t,n){return n in t||n in Mr}})):e.proxy}function nv(e){return Je(e)&&"__vccOpts"in e}const st=(e,t)=>Wf(e,t,Ur);function sv(e,t,n){try{Yo(-1);const r=arguments.length;return r===2?ft(t)&&!He(t)?Vr(t)?we(e,null,[t]):we(e,t):we(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Vr(n)&&(n=[n]),we(e,t,n))}finally{Yo(1)}}const rv="3.5.44";/** * @vue/runtime-dom v3.5.44 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ji;const bu=typeof window<"u"&&window.trustedTypes;if(bu)try{ji=bu.createPolicy("vue",{createHTML:e=>e})}catch{}const td=ji?e=>ji.createHTML(e):e=>e,ov="http://www.w3.org/2000/svg",av="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,wu=Nn&&Nn.createElement("template"),iv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(ov,e):t==="mathml"?Nn.createElementNS(av,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const c=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{wu.innerHTML=td(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const f=wu.content;if(r==="svg"||r==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ns="transition",xr="animation",sr=Symbol("_vtc"),nd={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},sd=Pt({},Sc,nd),lv=e=>(e.displayName="Transition",e.props=sd,e),Rs=lv((e,{slots:t})=>sv(lp,rd(e),t)),Ss=(e,t=[])=>{He(e)?e.forEach(n=>n(...t)):e&&e(...t)},_u=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function rd(e){const t={};for(const te in e)te in nd||(t[te]=e[te]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:y=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:E=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,I=uv(o),Y=I&&I[0],le=I&&I[1],{onBeforeEnter:ue,onEnter:ce,onEnterCancelled:G,onLeave:T,onLeaveCancelled:q,onBeforeAppear:Z=ue,onAppear:N=ce,onAppearCancelled:se=G}=t,j=(te,Pe,Se,ye)=>{te._enterCancelled=ye,rs(te,Pe?y:f),rs(te,Pe?b:c),Se&&Se()},S=(te,Pe)=>{te._isLeaving=!1,rs(te,_),rs(te,C),rs(te,E),Pe&&Pe()},P=te=>(Pe,Se)=>{const ye=te?N:ce,Ae=()=>j(Pe,te,Se);Ss(ye,[Pe,Ae]),ku(()=>{rs(Pe,te?v:i),Cn(Pe,te?y:f),_u(ye)||xu(Pe,r,Y,Ae)})};return Pt(t,{onBeforeEnter(te){Ss(ue,[te]),Cn(te,i),Cn(te,c)},onBeforeAppear(te){Ss(Z,[te]),Cn(te,v),Cn(te,b)},onEnter:P(!1),onAppear:P(!0),onLeave(te,Pe){te._isLeaving=!0;const Se=()=>S(te,Pe);Cn(te,_),te._enterCancelled?(Cn(te,E),Di(te)):(Di(te),Cn(te,E)),ku(()=>{te._isLeaving&&(rs(te,_),Cn(te,C),_u(T)||xu(te,r,le,Se))}),Ss(T,[te,Se])},onEnterCancelled(te){j(te,!1,void 0,!0),Ss(G,[te])},onAppearCancelled(te){j(te,!0,void 0,!0),Ss(se,[te])},onLeaveCancelled(te){S(te),Ss(q,[te])}})}function uv(e){if(e==null)return null;if(ft(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return pf(e)}function Cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[sr]||(e[sr]=new Set)).add(t)}function rs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[sr];n&&(n.delete(t),n.size||(e[sr]=void 0))}function ku(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let cv=0;function xu(e,t,n,r){const o=e._endId=++cv,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=od(e,t);if(!c)return r();const b=c+"end";let y=0;const _=()=>{e.removeEventListener(b,E),i()},E=C=>{C.target===e&&++y>=v&&_()};setTimeout(()=>{y(n[I]||"").split(", "),o=r(`${ns}Delay`),i=r(`${ns}Duration`),c=Cu(o,i),f=r(`${xr}Delay`),v=r(`${xr}Duration`),b=Cu(f,v);let y=null,_=0,E=0;t===ns?c>0&&(y=ns,_=c,E=i.length):t===xr?b>0&&(y=xr,_=b,E=v.length):(_=Math.max(c,b),y=_>0?c>b?ns:xr:null,E=y?y===ns?i.length:v.length:0);const C=y===ns&&/\b(?:transform|all)(?:,|$)/.test(r(`${ns}Property`).toString());return{type:y,timeout:_,propCount:E,hasTransform:C}}function Cu(e,t){for(;e.length$u(n)+$u(e[r])))}function $u(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Di(e){return(e?e.ownerDocument:document).body.offsetHeight}function dv(e,t,n){const r=e[sr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Su=Symbol("_vod"),ad=Symbol("_vsh"),fv=Symbol(""),pv=/(?:^|;)\s*display\s*:/;function vv(e,t,n){const r=e.style,o=$t(n);let i=!1;if(n&&!o){if(t)if($t(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&Sr(r,f,"")}else for(const c in t)n[c]==null&&Sr(r,c,"");for(const c in n){c==="display"&&(i=!0);const f=n[c];f!=null?hv(e,c,!$t(t)&&t?t[c]:void 0,f)||Sr(r,c,f):Sr(r,c,"")}}else if(o){if(t!==n){const c=r[fv];c&&(n+=";"+c),r.cssText=n,i=pv.test(n)}}else t&&e.removeAttribute("style");Su in e&&((!o||t!==n)&&(e[Su]=i?r.display:""),e[ad]&&(r.display="none"))}const Po=/\s*!important$/;function Sr(e,t,n){if(He(n))n.forEach(r=>Sr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))Po.test(n)?e.setProperty(t,n.replace(Po,""),"important"):e.setProperty(t,n);else{const r=mv(e,t);Po.test(n)?e.setProperty(ms(r),n.replace(Po,""),"important"):e[r]=n}}const Eu=["Webkit","Moz","ms"],mi={};function mv(e,t){const n=mi[t];if(n)return n;let r=gn(t);if(r!=="filter"&&r in e)return mi[t]=r;r=Yu(r);for(let o=0;ohi||(kv.then(()=>hi=0),hi=Date.now());function Cv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const o=n.value;if(He(o)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const c=o.slice(),f=[r];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,$v=(e,t,n,r,o,i)=>{const c=o==="svg";t==="class"?dv(e,r,c):t==="style"?vv(e,n,r):ca(t)?da(t)||gv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Sv(e,t,r,c))?(Pu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Au(e,t,r,c,i,t!=="value")):e._isVueCE&&(Ev(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$t(r)))?Pu(e,gn(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Au(e,t,r,c))};function Sv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mu(t)&&Ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Mu(t)&&$t(n)?!1:t in e}function Ev(e,t){const n=e._def.props;if(!n)return!1;const r=gn(t);return Array.isArray(n)?n.some(o=>gn(o)===r):Object.keys(n).some(o=>gn(o)===r)}const id=new WeakMap,ld=new WeakMap,Qo=Symbol("_moveCb"),Iu=Symbol("_enterCb"),Li=new WeakMap,Tv=e=>(delete e.props.mode,e),Av=Tv({name:"TransitionGroup",props:Pt({},sd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=dl(),r=$c();let o,i,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Kv(o[0].el,n.vnode.el,ju(e))),f);return Oc(()=>{if(Li.delete(n),!v()){o=[],c=void 0;return}const b=ju(e);o.forEach(Ov);const y=c&&Lv(c,n.vnode.el);c=void 0,o.forEach(E=>Mv(E,y));const _=o.filter(Iv);Di(n.vnode.el),_.forEach(E=>{const C=E.el,I=C.style;Cn(C,b),I.transform=I.webkitTransform=I.transitionDuration="";const Y=C[Qo]=le=>{le&&le.target!==C||(!le||le.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",Y),C[Qo]=null,rs(C,b))};C.addEventListener("transitionend",Y)}),o=[]}),()=>{const b=ut(e),y=rd(b);let _=b.tag||je;if(o=[],f=void 0,i)for(let E=0;Er.willMove()&&r.item.contains(t));return n&&xa(n.item,n)}function Kv(e,t,n){const r=e.cloneNode(),o=e[sr];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&r.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&r.classList.add(f)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:c}=od(r);return i.removeChild(r),c}const Zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?n=>Io(t,n):t};function Rv(e){e.target.composing=!0}function Du(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Oo=Symbol("_initialValue");function yi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e.parentNode&&(e.type==="text"?e[Oo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Oo]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Is]=Zo(o);const i=r||o.props&&o.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](yi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=yi(e.value,n,i)}),t||(Os(e,"compositionstart",Rv),Os(e,"compositionend",Du),Os(e,"change",Du))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const o=t??"",i=e[Oo];delete e[Oo],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](yi(e.value,n,r)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},c){if(e[Is]=Zo(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?pa(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"&&(r&&t===n||o&&e.value.trim()===v)||(e.value=v)}},ps={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Os(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?pa(ea(v)):ea(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[i,i?He(c)?o.slice():o:c];try{e[Is](c)}finally{ur(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Zo(r)},mounted(e,{value:t}){Lu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Is]=Zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Fv(t,n[1],n[0]))&&Lu(e,t)}};function Fv(e,t,n){if(!n||He(e))return us(e,t);if(Ls(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function Lu(e,t){const n=e.multiple,r=He(t);if(!(n&&!r&&!Ls(t))){for(let o=0,i=e.options.length;oString(b)===String(f)):c.selected=kf(t,f)>-1}else c.selected=t.has(f);else if(us(ea(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ea(e){return"_value"in e?e._value:e.value}const Nv=["ctrl","shift","alt","meta"],Vv={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))},Nt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=ms(o.key);if(t.some(c=>c===i||Bv[c]===i))return e(o)})},Uv=Pt({patchProp:$v},iv);let Ku;function qv(){return Ku||(Ku=Np(Uv))}const Hv=(...e)=>{const t=qv().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Wv(r);if(!o)return;const i=t._component;!Ye(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,zv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function zv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wv(e){return $t(e)?document.querySelector(e):e}function Et(e){return''+e+""}const Gv={calendar:Et(''),clock:Et(''),"check-circle":Et(''),edit:Et(''),tag:Et(''),star:Et(''),close:Et(''),flag:Et(''),chart:Et(''),export:Et(''),"chevron-left":Et(''),"chevron-right":Et(''),"chevron-down":Et(''),plus:Et(''),search:Et(''),settings:Et(''),memo:Et(''),lock:Et(''),wallet:Et(''),more:Et(''),shield:Et(''),plan:Et('')},Yv=["innerHTML"],qe=jt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=st(()=>Gv[t.name]||"");return(r,o)=>($(),O("span",{class:"icon",style:qn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Yv))}}),Jv=["aria-label"],Xv={class:"dialog-title"},Qv={class:"dialog-msg"},Zv={class:"dialog-btns"},em=jt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,r=t;function o(i){n.open&&i.key==="Escape"&&r("cancel")}return pt(()=>n.open,i=>{i?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Ln(()=>window.removeEventListener("keydown",o)),(i,c)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),O("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Nt(f=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Xv,W(e.title),1),l("div",Qv,W(e.message),1),l("div",Zv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>r("cancel"))},W(e.cancelText),1),l("button",{class:Xe(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>r("confirm"))},W(e.confirmText),3)])],8,Jv)])):he("",!0)]),_:1})]))}}),Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Dn=Kt(em,[["__scopeId","data-v-2e4b0ab5"]]);var Ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ud={exports:{}};(function(e,t){((n,r)=>{e.exports=r()})(Ru,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(s,a)},r=function(){return(r=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,y={}.hasOwnProperty;function _(s,a){return y.call(s,a)}function E(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){I(s,u,a[u])})}var C=Object.defineProperty;function I(s,a,u,d){C(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 Y(s){return{from:function(a){return s.prototype=Object.create(a.prototype),I(s.prototype,"constructor",s),{extend:E.bind(null,s.prototype)}}}}var le=Object.getOwnPropertyDescriptor,ue=[].slice;function ce(s,a,u){return ue.call(s,a,u)}function G(s,a){return a(s)}function T(s){if(!s)throw new Error("Assertion Failed")}function q(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Z(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"?[]:(Ze=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(Qe),Ze]:[Ze,b(Ze),Ze]),Ze=Qe[0],Ws=Qe[1],Ws=Ws&&Ws.then,tt=Ze&&Ze.constructor,kt=!!Qe[2],St=function(s,a){Yn.push([s,a]),Yt&&(queueMicrotask(Rd),Yt=!1)},tn=!0,Yt=!0,nn=[],hs=[],Rt=x,Ot={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:m,pgp:!1,env:{},finalize:m},Be=Ot,Yn=[],ys=0,eo=[];function Oe(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Be;if(typeof s!="function"){if(s!==Le)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Aa(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(h){if(d._state===null){if(h===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Vs();h&&typeof h.then=="function"?u(d,function(k,K){h instanceof Oe?h._then(k,K):h.then(k,K)}):(d._state=!0,d._value=h,wl(d)),w&&Bs()}},Aa.bind(null,d))}catch(h){Aa(d,h)}}(this,s)}var Ta={get:function(){var s=Be,a=ro;function u(d,p){var h=this,w=!s.global&&(s!==Be||a!==ro),k=w&&!Xn(),K=new Oe(function(J,F){Pa(h,new bl(kl(d,s,w,k),kl(p,s,w,k),J,F,s))});return this._consoleTask&&(K._consoleTask=this._consoleTask),K}return u.prototype=Le,u},set:function(s){I(this,"then",s&&s.prototype===Le?Ta:{get:function(){return s},set:Ta.set})}};function bl(s,a,u,d,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=p}function Aa(s,a){var u,d;hs.push(a),s._state===null&&(u=s._lib&&Vs(),a=Rt(a),s._state=!1,s._value=a,d=s,nn.some(function(p){return p._value===d._value})||nn.push(d),wl(s),u)&&Bs()}function wl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=nn.length;w;)if(nn[--w]._value===h._value)return nn.splice(w,1)})(a),u.resolve(d)}catch(h){u.reject(h)}finally{--ys==0&&Oa(),--u.psd.ref||u.psd.finalize()}}function Rd(){gs(Ot,function(){Vs()&&Bs()})}function Vs(){var s=tn;return Yt=tn=!1,s}function Bs(){var s,a,u;do for(;0.",xl="String expected.",ao="__dbnames",Ia="readonly",ja="readwrite";function ws(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 io(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Pe(a))[s],a}}function $l(){throw Ne.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function rt(s,a){try{var u=Sl(s),d=Sl(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=F,K=w;if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function J(){this.constructor=k}function F(){return w!==null&&w.apply(this,arguments)||this}return n(k,K),k.prototype=K===null?Object.create(K):(J.prototype=K.prototype,new J),Object.defineProperty(F.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),F.prototype.table=function(){return u},F})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function h(w){if(!w)return w;var k,K=Object.create(s.prototype);for(k in w)if(!d.has(k))try{K[k]=w[k]}catch{}return K}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=h,this.hook("reading",h),s},yt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},yt.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(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?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{N(s,h,k)}catch{}return k})},yt.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(h){var w=h??{};return Al(w,a),d&&N(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?Oe.reject(k.failures[0]):!!h})})})},yt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Z(s,this.schema.primKey.keyPath))===void 0?Tt(new Ne.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},yt.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(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?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{N(s,h,k)}catch{}return k})},yt.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 lo(a,[s],d)}).then(function(d){return d.numFailures?Oe.reject(d.failures[0]):void 0})})},yt.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 lo(s,null,u)})}).then(function(a){return a.numFailures?Oe.reject(a.failures[0]):void 0})},yt.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)})})})},yt.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(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 Ne.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ne.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,J=k&&J?s.map(io(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:J,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new _t("".concat(d.name,".bulkAdd(): ").concat(L," of ").concat(K," operations failed"),R)})})},yt.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(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 Ne.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ne.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,J=k&&J?s.map(io(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:J,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new _t("".concat(d.name,".bulkPut(): ").concat(L," of ").concat(K," operations failed"),R)})})},yt.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}),h=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(k){var K=[],J=[],F=(s.forEach(function(L,R){var H=L.key,B=L.changes,V=k[R];if(V){for(var U=0,re=Object.keys(B);UQ+ie&&U(Q+J)})})}var re=qs(u)&&u.limit===1/0&&(typeof s!="function"||B)&&{index:u.index,range:u.range};return U(0).then(function(){if(0{for(var We=Math.min(ge.length,Ve.length),Je=-1,nt=0;nt=R})).length===0?Oe.resolve():(U.forEach(function(Q){V.push(function(){var ie,pe,me,xe=re,ge=Q._cfg.dbschema,Ke=(go(L,xe,B),go(L,ge,B),re=L._dbSchema=ge,Ba(xe,ge)),_e=(Ke.add.forEach(function(Ve){Ua(B,Ve[0],Ve[1].primKey,Ve[1].indexes)}),Ke.change.forEach(function(Ve){if(Ve.recreate)throw new Ne.Upgrade("Not yet support for changing primary key");var ve=B.objectStore(Ve.name);Ve.add.forEach(function(ze){return ho(ve,ze)}),Ve.change.forEach(function(ze){ve.deleteIndex(ze.name),ho(ve,ze)}),Ve.del.forEach(function(ze){return ve.deleteIndex(ze)})}),Q._cfg.contentUpgrade);if(_e&&Q._cfg.version>R)return vo(L,B),H._memoizedTables={},ie=se(ge),Ke.del.forEach(function(Ve){ie[Ve]=xe[Ve]}),Va(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],c(ie),ie),H.schema=ie,(pe=De(_e))&&Us(),ge=Oe.follow(function(){var Ve;(me=_e(H))&&pe&&(Ve=Xn.bind(null,null),me.then(Ve,Ve))}),me&&typeof me.then=="function"?Oe.resolve(me):ge.then(function(){return me})}),V.push(function(ie){var pe,me,xe=Q._cfg.dbschema;pe=xe,me=ie,[].slice.call(me.db.objectStoreNames).forEach(function(ge){return pe[ge]==null&&me.db.deleteObjectStore(ge)}),Va(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),H.schema=L._dbSchema}),V.push(function(ie){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===Q._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(pe){return pe!=="$meta"})):ie.objectStore("$meta").put(Q._cfg.version,"version"))})}),function Q(){return V.length?Oe.resolve(V.shift()(H.idbtrans)).then(Q):Oe.resolve()}().then(function(){Rl(re,B)}))}).catch(w);var K,J;c(p).forEach(function(F){Ua(u,F,p[F].primKey,p[F].indexes)}),vo(s,u),Oe.follow(function(){return s.on.populate.fire(h)}).catch(w)})}function Xd(s,a){Rl(s._dbSchema,a),a.db.version%10!=0||a.objectStoreNames.contains("$meta")||a.db.createObjectStore("$meta").add(Math.ceil(a.db.version/10-1),"version");var u=yo(0,s.idbdb,a);go(s,s._dbSchema,a);for(var d=0,p=Ba(u,s._dbSchema).change;d{if(w.change.length||w.recreate)return console.warn("Unable to patch indexes of table ".concat(w.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=a.objectStore(w.name);w.add.forEach(function(K){Ce&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(K.src)),ho(k,K)})})(p[d]);if(typeof h=="object")return h.value}}function Ba(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var p=s[u],h=a[u];if(p){var w={name:u,def:h,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(h.primKey.keyPath||"")||p.primKey.auto!==h.primKey.auto)w.recreate=!0,d.change.push(w);else{var k=p.idxByName,K=h.idxByName,J=void 0;for(J in k)K[J]||w.del.push(J);for(J in K){var F=k[J],L=K[J];F?F.src!==L.src&&w.change.push(L):w.add.push(L)}(0{var s,a,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(s=new Set,a=new FinalizationRegistry(function(d){s.delete(d)}),{toArray:function(){return Array.from(s).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);s.add(p),a.register(d._novip,p,p),s.size>d._options.maxConnections&&(p=s.values().next().value,s.delete(p),a.unregister(p))},remove:function(d){if(d)for(var p=s.values(),h=p.next();!h.done;){var w=h.value;if(w.deref()===d._novip)return s.delete(w),void a.unregister(w);h=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function qa(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Rn(ao,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ha(s){return s&&typeof s.databases=="function"}function za(s){return Jn(function(){return Be.letThrough=!0,s()})}function Wa(s){return!("from"in s)}var Ut=function(s,a){var u;if(!this)return u=new Ut,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:U.oldVersion,L=re<1,s.idbdb=V.result,h&&Xd(s,F),Jd(s,re/10,F,H))},H),V.onsuccess=xt(function(){F=null;var U,re,Q,ie,pe,me,xe=s.idbdb=V.result,ge=ce(xe.objectStoreNames);if(0"u"?Oe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(R){function H(){return indexedDB.databases().finally(R)}K=setInterval(H,100),H()}).finally(function(){return clearInterval(K)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Oe.resolve(za(function(){return s.on.ready.fire(s.vip)})).then(function R(){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=rt(u,d))===0){if(p&&h)return 0;if(p)return 1;if(h)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,h)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=rt(u,d))===0){if(p&&h)return 0;if(p)return-1;if(h)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,h;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,h=a,setTimeout(function(){p.subscribers.size===0&&de(h,p)},3e3))})}var af={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return r(r({},s),{transaction:function(u,d,p){var h,w,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(h=new AbortController).signal,k.addEventListener("abort",(w=function(K){return function(){if(h.abort(),d==="readwrite"){for(var J=new Set,F=0,L=u;F{var re=_s["idb://".concat(H,"/").concat(B)];if(!re)return[];if(!(H=re.queries[V]))return[null,!1,re,null];var Q=H[(U.query?U.query.index.name:null)||""];if(!Q)return[null,!1,re,null];switch(V){case"query":var ie=(pe=U.direction)!=null?pe:"next",pe=Q.find(function(me){var xe;return me.req.limit===U.limit&&me.req.values===U.values&&((xe=me.req.direction)!=null?xe:"next")===ie&&Yl(me.req.query.range,U.query.range)});return pe?[pe,!0,re,Q]:[Q.find(function(me){var xe;return("limit"in me.req?me.req.limit:1/0)>=U.limit&&((xe=me.req.direction)!=null?xe:"next")===ie&&(!U.values||me.req.values)&&rf(me.req.query.range,U.query.range)}),!1,re,Q];case"count":return pe=Q.find(function(me){return Yl(me.req.query.range,U.query.range)}),[pe,!!pe,re,Q]}})(a,u,"query",h),R=L[0],J=L[2],F=L[3],R&&L[1]?R.obsSet=h.obsSet:(L=d.query(h).then(function(H){var B=H.result;if(R&&(R.res=B),w){for(var V=0,U=B.length;V{var pe=Vs();try{h&&Us();var me=Jn(s,ie);return me=h?me.finally(Xn):me}finally{pe&&Bs()}})(re={subscr:U,signal:w.signal,requery:R,querier:s,trans:null}),L||(es.storagemutated.subscribe(B),L=!0),Promise.resolve(Q).then(function(ie){u=!0,a=ie,k||re.signal.aborted||(H()||(J=U,H())?R():(K={},Ma(function(){return!k&&p.next&&p.next(ie)})))},function(ie){u=!1,["DatabaseClosedError","AbortError"].includes(ie==null?void 0:ie.name)||k||Ma(function(){k||p.error&&p.error(ie)})}))};return setTimeout(R,0),F});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var ks=Rn;function si(s){var a=ts;try{ts=!0,es.storagemutated.fire(s),Xa(s,!0)}finally{ts=a}}E(ks,r(r({},$e),{delete:function(s){return new ks(s,{addons:[]}).delete()},exists:function(s){return new ks(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=ks.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(Ha(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ao})}):qa(u,a).toCollection().primaryKeys()).then(s)}catch{return Tt(new Ne.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return Be.trans?gs(Be.transless||Ot,s):s()},vip:za,async:function(s){return function(){try{var a=Qa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Oe.resolve(a)}catch(u){return Tt(u)}}},spawn:function(s,a,u){try{var d=Qa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Oe.resolve(d)}catch(p){return Tt(p)}},currentTransaction:{get:function(){return Be.trans||null}},waitFor:function(s,a){return s=Oe.resolve(typeof s=="function"?ks.ignoreTransaction(s):s).timeout(a||6e4),Be.trans?Be.trans.waitFor(s):s},Promise:Oe,debug:{get:function(){return Ce},set:function(s){be(s)}},derive:Y,extend:v,props:E,override:G,Events:pr,on:es,liveQuery:Jl,extendObservabilitySet:wo,getByKeyPath:Z,setByKeyPath:N,delByKeyPath:function(s,a){typeof a=="string"?N(s,a,void 0):"length"in a&&[].map.call(a,function(u){N(s,u,void 0)})},shallowClone:se,deepClone:Pe,getObjectDiff:Za,cmp:rt,asap:q,minKey:-1/0,addons:[],connections:{get:gr.toArray},errnames:Bt,dependencies:Co,cache:_s,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)})})),ks.maxKey=hr(ks.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(es(po,function(s){ts||(s=new CustomEvent(Ka,{detail:s}),ts=!0,dispatchEvent(s),ts=!1)}),addEventListener(Ka,function(s){s=s.detail,ts||si(s)}));var Gs,ts=!1,Xl=function(){};return typeof BroadcastChannel<"u"&&((Xl=function(){(Gs=new BroadcastChannel(Ka)).onmessage=function(s){return s.data&&si(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),es(po,function(s){ts||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Rn.disableBfCache&&s.persisted){Ce&&console.debug("Dexie: handling persisted pagehide"),Gs!=null&&Gs.close();for(var a=0,u=gr.toArray();a{const r={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(o=>{o.category&&r[o.category]&&(o.category=r[o.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let oe;function om(e){oe=e}function fl(){oe&&oe.close(),oe=void 0}const am=6,Nu=["公司","客户现场","出差","居家办公"],im={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function qr(e){return im[e]||e}function Ir(e){return e<10?"0"+e:String(e)}function Hn(e){return e.getFullYear()+"-"+Ir(e.getMonth()+1)+"-"+Ir(e.getDate())}function ot(){return Hn(new Date)}function at(){const e=new Date;return Hn(e)+"T"+Ir(e.getHours())+":"+Ir(e.getMinutes())+":"+Ir(e.getSeconds())}function wn(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 Vt(e,t){const n=Fs(e);return n.setDate(n.getDate()+t),Hn(n)}function na(e,t){const n=Fs(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),Hn(n)}function Zs(e){const t=Fs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Hn(t)}function lm(e){const t=Fs(e).getDay();return t===0||t===6}function um(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function cd(e){const t=Fs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const cm=15e4;function Ri(e){const t=new Uint8Array(e);let n="";for(let r=0;r({}));if(!o.ok){const c=i&&i.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function hl(e,t,n){const r=await Am(n,e,t);ia(r.userId);const o={userId:r.userId,username:r.username};return Em(o),hd(r.username,t),o}async function Pm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return hl(n,t,"login")}async function Om(e,t,n){const r=(e||"").trim();if(r.length<2||r.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return hl(r,t,"register")}async function Mm(){const e=pn();if(!e)return null;try{return await hl(e.username,e.password,"login")}catch{return null}}async function Im(){oa(),fl(),aa=null,md()}function jm(){oa(),fl(),aa=null,md(),Tm()}async function Dm(e,t){if(!zr())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const r=pn();if(!r||r.password!==e)throw new Error("旧密码不正确");const o=await Ns();let i;try{i=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+yd()},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)}hd(r.username,t)}async function Lm(){if(!zr())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+yd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r&&r.error||"删除失败 "+n.status)}jm()}function yd(){return $a()}const Vi=M(null),Bi=M(null),cr=M(0);function as(){cr.value++}const gd=M(0);function Km(){gd.value++}const er=M(""),or=["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 Ko(e){return JSON.stringify(e)}async function Rm(e){return oe.table(e).toArray()}function Ro(e,t){return e==="setting"?t.key:t.id}async function Fm(){for(const e of or){const t=oe.table(e),n=await t.toArray();for(const r of n){if(e==="setting"&&Xs.has(r.key))continue;const o={};r.uuid||(o.uuid=Nm()),!r.updated_at&&r.created_at&&(o.updated_at=r.created_at),Object.keys(o).length&&await t.update(Ro(e,r),o)}}}function Nm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Vm(){return pn()!=null}async function Bm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Um(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function bd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const r=await n.json();if(!r||!r.token)throw new Error("云端登录异常");return String(r.token)}async function qm(e,t){let n=$a();return n||(n=await bd(e,t),Hr(n),n)}async function wd(){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 Ui(){const e=pn();if(!e)throw new Error("未登录,无法同步");return Cd({baseUrl:await Ns(),username:e.username,password:e.password})}async function _d(){try{await Ui()}catch(e){er.value=e instanceof Error?e.message:String(e);try{await Ui()}catch{}}}function kd(e,t,n){const r={};for(const o of Object.keys(t))o!=="id"&&(r[o]=t[o]);if(e==="log_item"){delete r.work_log_id,delete r.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(r.wuuid=o.uuid);const i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(r.puuid=i.uuid)}if(e==="plan"){delete r.goal_id;const o=t.goal_id?n.goal.get(t.goal_id):null;o&&o.uuid&&(r.guuid=o.uuid)}return r}async function xd(){const e=await oe.work_log.toArray(),t=await oe.project.toArray(),n=await oe.goal.toArray();return{workLog:new Map(e.map(r=>[r.id,r])),project:new Map(t.map(r=>[r.id,r])),goal:new Map(n.map(r=>[r.id,r]))}}let jr=!1,Fo=!1,qi=!1,tr=null,$n=null,Hi="",zi=!1,No=null;async function nr(){if(jr){Fo=!0;return}try{if(!await Vm())return;await Cd(await Hm()),er.value=""}catch(e){er.value=e instanceof Error?e.message:String(e)}}async function Hm(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function zm(){if(zi)return;zi=!0,No=sm(async()=>{const t={};for(const n of or)t[n]=await oe.table(n).count();return t}).subscribe({next:()=>{qi||jr||(tr&&globalThis.clearTimeout(tr),tr=globalThis.setTimeout(()=>{nr()},3e3))},error:()=>{}})}function Wm(){No&&(No.unsubscribe(),No=null),$n&&($n.close(),$n=null,Hi=""),tr&&(globalThis.clearTimeout(tr),tr=null),zi=!1}function Gm(e,t){const n=e+"|"+t;if(!($n&&Hi===n)){$n&&($n.close(),$n=null);try{$n=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Hi=n,$n.onmessage=()=>{nr()}}catch{$n=null}}}async function Cd(e){if(jr)return Fo=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};jr=!0,qi=!0;try{const t=await Wi(e);return Fo&&(Fo=!1,globalThis.setTimeout(()=>{nr()},800)),t}finally{jr=!1,qi=!1}}async function Wi(e,t=!1){var Z;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Fm();const r=await xd(),o=await oe.sync_mirror.toArray(),i=new Map;for(const N of o)i.set(N.table+"|"+N.uuid,N);const c={},f=[];let v=0;for(const N of or){let se=await Rm(N);N==="setting"&&(se=se.filter(S=>!Xs.has(S.key)));const j=new Map;for(const S of se)j.set(S.uuid,S);for(const[S,P]of j){const te=kd(N,P,r),Pe=Ko(te),Se=i.get(N+"|"+S);(!Se||Se.hash!==Pe)&&(c[N]=c[N]||[],c[N].push(te),v++)}for(const[S,P]of i)S.startsWith(N+"|")&&!j.has(P.uuid)&&f.push({table:N,uuid:P.uuid,deleted_at:at()});c[N]=c[N]||[]}f.push(...Zm());const b=await qm(n,e),y=N=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+N},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let _=await y(b);if(_.status===401){Hr("");const N=await bd(n,e);Hr(N),_=await y(N)}if(!_.ok)throw new Error("同步服务返回 "+_.status);const E=await _.json(),C=String(E.dataEpoch||""),I="dsh_sync_epoch_"+(((Z=pn())==null?void 0:Z.username)||"anon"),Y=C?localStorage.getItem(I):null;if(!t&&Y&&C&&Y!==C)return await oe.sync_mirror.clear(),localStorage.setItem(I,C),Wi(e,!0);const le=E.tables||{},ue=E.tombstones||[],ce=or.reduce((N,se)=>N+(le[se]||[]).length,0),G=o.length-f.length;if(!t&&ce0||T.removed>0||v>0)&&as(),{pushed:v,pulled:T.changed,removed:T.removed,errors:0,at:q}}function $d(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function Ym(){try{const e=localStorage.getItem($d());if(e)return JSON.parse(e)}catch{}return{}}function Jm(e){try{localStorage.setItem($d(),JSON.stringify(e))}catch{}}async function Xm(e,t){const n=Ym(),r=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await oe.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const i=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,f=0;const v={},b={},y={};for(const C of or){const I=oe.table(C),Y=await I.toArray(),le=new Map(Y.map(S=>[Ro(C,S),S])),ue=new Map(Y.filter(S=>S.uuid).map(S=>[S.uuid,S])),ce=(e[C]||[]).filter(S=>S&&typeof S=="object"&&S.uuid).filter(S=>!r.has(C+"|"+S.uuid)),G=ce.filter(S=>!(C==="setting"&&Xs.has(S.key))),T=ce.filter(S=>C==="setting"&&Xs.has(S.key));for(const S of T)Qm(C,S.uuid);const q=C==="setting"?[]:Y.filter(S=>S.uuid&&!i.has(S.uuid)&&!r.has(C+"|"+S.uuid)),Z={v:Math.max(0,...Y.map(S=>Number(S.id)||0))};G.length;const N=[];for(const S of G){const P={...S};if(C==="log_item"){const Se=P.wuuid?v[P.wuuid]:void 0;if(!Se)continue;P.work_log_id=Se,delete P.wuuid,P.project_id=P.puuid?b[P.puuid]??null:null,delete P.puuid}if(C==="plan")if(P.guuid){const Se=y[P.guuid];P.goal_id=Se??null,delete P.guuid}else P.goal_id=null;let te=Ro(C,S);if(C==="setting")te=S.key;else{const Se=n[C]&&n[C][S.uuid],ye=ue.get(S.uuid);ye&&ye.id!=null?te=ye.id:typeof Se=="number"?te=Se:te=++Z.v}const Pe={...P,id:te};C==="setting"&&Xs.has(Pe.key)||(N.push(Pe),C==="work_log"&&(v[S.uuid]=te),C==="project"&&(b[S.uuid]=te),C==="goal"&&(y[S.uuid]=te))}const se=N.concat(q);for(const S of se){const P=le.get(Ro(C,S));(!P||Ko(P)!==Ko(S))&&c++}f+=Y.filter(S=>S.uuid&&!N.some(P=>P.uuid===S.uuid)&&!r.has(C+"|"+S.uuid)).length,await I.clear(),se.length&&await I.bulkPut(se);const j={};for(const S of se)S.uuid&&(j[S.uuid]=S.id);n[C]=j}Jm(n);const _=await xd(),E=[];for(const C of or){const I=await oe.table(C).toArray();for(const Y of I)C==="setting"&&Xs.has(Y.key)||Y.uuid&&E.push({table:C,uuid:Y.uuid,hash:Ko(kd(C,Y,_))})}return await oe.sync_mirror.clear(),E.length&&await oe.sync_mirror.bulkAdd(E.map(C=>({...C}))),await oe.tombstone.clear(),{changed:c,removed:f+la.length}}const la=[];function Qm(e,t){la.some(n=>n.table===e&&n.uuid===t)||la.push({table:e,uuid:t,deleted_at:at()})}function Zm(){return la.splice(0)}const eh=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function it(){await _d()}async function Ct(e,t){const n=await oe.setting.get(e);return n?n.value:t}async function It(e,t){await oe.setting.put({key:e,value:t}),eh.has(e)||await it()}async function vs(){const e=await Promise.all([Ct("work_start","09:00"),Ct("work_end","18:00"),Ct("grace_minutes","10"),Ct("lunch_minutes","60"),Ct("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function th(){return Ct("last_location","")}async function nh(e,t){const n=t.trim();await It("last_location",n),n&&await ua(n);let r=!1;const o=await _n(e);o&&o.id?(o.location||"")!==n&&(await oe.attendance.update(o.id,{location:n||null}),r=!0):n&&(await oe.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:at()}),r=!0),r&&await it()}async function yl(){const e=await Ct("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 Sd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await It("location_presets",JSON.stringify(t))}async function ua(e){const t=e.trim();if(!t)return;const n=await yl();n.includes(t)||await Sd([...n,t])}async function ar(e=!1){const t=await oe.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function sh(e){await oe.project.add({name:e.trim(),archived:0,created_at:at()}),await it()}async function rh(e,t){await oe.project.update(e,{name:t.trim()}),await it()}async function oh(e,t){await oe.project.update(e,{archived:t?1:0}),await it()}async function _n(e){return oe.attendance.where("date").equals(e).first()}async function Ed(e,t){const n=((t===void 0?await Ct("last_location",""):t)||"").trim();let r=!1;const o=await _n(e);if(o&&o.id){if(!o.clock_in_at){const i={clock_in_at:at()};n&&(i.location=n),await oe.attendance.update(o.id,i),r=!0}n&&(await Ct("last_location","")!==n&&await It("last_location",n),await ua(n)),r&&await it();return}await oe.attendance.add({date:e,clock_in_at:at(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:at()}),n&&(await It("last_location",n),await ua(n)),await it()}async function ah(e){const t=await _n(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await oe.attendance.update(t.id,{clock_out_at:at()}),await it())}async function ih(){const e=new Date,t=Hn(e);let n="";if(e.getHours()<4){const r=await _n(Vt(t,-1));r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await oe.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n){const r=await _n(t);r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await oe.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n)throw new Error("没有进行中的打卡");return await it(),n}async function lh(e,t,n,r,o){(o||"").trim()&&await ua(o);const i=await _n(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:r||null,location:(o||"").trim()||null,created_at:at()};i&&i.id?await oe.attendance.update(i.id,c):await oe.attendance.add(c),await it()}async function uh(e,t,n){const r=(n||"").trim();if(!r)return;const o=await _n(e);o&&o.id&&(await oe.attendance.update(o.id,{[t]:e+"T"+r+":00"}),await it())}async function Xr(e,t){return oe.attendance.where("date").between(e,t,!0,!0).toArray()}async function ch(e,t){const n=await _n(e);if(t){const r={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:at()};n&&n.id?await oe.attendance.update(n.id,r):await oe.attendance.add({...r,note:null,location:null})}else n&&n.id&&await oe.attendance.update(n.id,{kind:"normal"});await it()}async function dh(e){const t=await oe.work_log.where("date").equals(e).first();return t||{id:await oe.work_log.add({date:e,created_at:at()}),date:e,created_at:at()}}async function fh(e){return oe.work_log.where("date").equals(e).first()}async function ph(e){const t=await fh(e);return!t||!t.id?[]:(await oe.log_item.where("work_log_id").equals(t.id).toArray()).sort((r,o)=>o.id-r.id)}async function vh(e,t){const n=await oe.work_log.where("date").equals(e).first();let r;n&&n.id?r=n:r=await dh(e),await oe.table("log_item").add({work_log_id:r.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:at()});const o=t.project_id?String(t.project_id):"";await Ct("last_project","")!==o&&await It("last_project",o),await Ct("last_category","")!==t.category&&await It("last_category",t.category),await it()}async function bi(e,t){await oe.table("log_item").update(e,t),await it()}async function mh(e){await oe.table("log_item").delete(e),await it()}async function Qr(e,t){const n=await oe.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const r=new Map(n.map(i=>[i.id,i.date]));return(await oe.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:r.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function wh(e){const t=at();await oe.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 it()}async function _h(e,t){await oe.plan.update(e,{...t,updated_at:at()}),await it()}async function kh(e){await oe.plan.delete(e),await it()}async function xh(e,t){const n=await oe.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await Sa(e),await oe.plan.update(e,{status:t,updated_at:at()}),await it())}async function Ch(e){const t=await oe.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await Sa(n.id);await oe.plan.update(e,{timer_started_at:at(),updated_at:at()}),await it()}async function Sa(e){const t=await oe.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 oe.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:at()}),await it()}const $h=366;function Sh(e,t){const n=[];let r=e,o=0;for(;r<=t&&o<$h;)n.push(r),r=Vt(r,1),o++;return n}async function Eh(){const e=await oe.goal.toArray(),t=[];for(const n of e){const r=await oe.plan.where("goal_id").equals(n.id).toArray();t.push({goalId:n.id,done:r.filter(o=>o.status==="done").length,total:r.length})}return t}async function Th(){return(await oe.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await oe.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Kh(e,t=4){const n=e.trim().toLowerCase();return n?(await oe.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,i)=>o.updated_at{await Promise.all([oe.project.clear(),oe.work_log.clear(),r.clear(),oe.attendance.clear(),oe.weekly_note.clear(),oe.setting.clear(),oe.memo.clear(),oe.credential.clear(),o.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await oe.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await oe.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await r.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await oe.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await oe.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await oe.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await oe.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await oe.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await i.bulkAdd(n.plan)}),await it()}const Hh=["制度学习","产品学习","打杂","项目实操","售后服务"],zh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Wh=["工资","报销","其他"],Td="log_categories",Ad="ledger_expense_categories",Pd="ledger_income_categories";function Od(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const r=n.filter(o=>typeof o=="string"&&o.trim()).map(o=>o.trim());if(r.length)return Array.from(new Set(r))}}catch{}return t.slice()}async function Zr(){return Od(await Ct(Td,""),Hh)}async function wi(e){await It(Td,JSON.stringify(e))}async function Wr(e){return Od(await Ct(e==="expense"?Ad:Pd,""),e==="expense"?zh:Wh)}async function Ts(e,t){await It(e==="expense"?Ad:Pd,JSON.stringify(t))}const Gh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Yh={class:"dialog-head"},Jh={class:"dialog-title"},Xh={key:0,class:"muted dialog-sub"},Qh={class:"dialog-body"},Zh={class:"form-grid"},ey={class:"field span2"},ty={key:0,class:"form-error"},ny={class:"field"},sy=["value"],ry={class:"field"},oy=["value"],ay={class:"field"},iy={class:"field"},ly={class:"field span2"},uy={class:"field"},cy={class:"field"},dy={class:"dialog-btns"},fy=jt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=M([]);Zr().then(ce=>{n.value=ce});const r=e,o=t,i=M(""),c=M(null),f=M("dev"),v=M(null),b=M(""),y=M(""),_=M(0),E=M(0),C=M(""),I=M(null),Y=st(()=>{var T;const ce=r.projects.filter(q=>q.archived!==1),G=(T=r.item)==null?void 0:T.project_id;if(G&&!ce.some(q=>q.id===G)){const q=r.projects.find(N=>N.id===G),Z=ce.slice();return q&&Z.unshift({...q,name:q.name+"(已归档)"}),Z}return ce});function le(ce){r.open&&ce.key==="Escape"&&o("cancel")}pt(()=>r.open,async ce=>{var G;if(ce){const T=r.item;i.value=(T==null?void 0:T.content)??"",c.value=(T==null?void 0:T.project_id)??null,f.value=(T==null?void 0:T.category)??"dev",v.value=(T==null?void 0:T.minutes)??null,b.value=(T==null?void 0:T.takeaway)??"",y.value=(T==null?void 0:T.remark)??"",_.value=(T==null?void 0:T.is_milestone)??0,E.value=(T==null?void 0:T.needs_followup)??0,C.value="",window.addEventListener("keydown",le),await ur(),(G=I.value)==null||G.focus()}else window.removeEventListener("keydown",le)}),Ln(()=>window.removeEventListener("keydown",le)),pt(i,()=>{C.value&&(C.value="")});function ue(){const ce=i.value.trim();if(!ce){C.value="请填写工作内容";return}if(!r.item||!r.item.id){o("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:y.value.trim()||null,is_milestone:_.value,needs_followup:E.value});return}o("save",{id:r.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:y.value.trim()||null,is_milestone:_.value?1:0,needs_followup:E.value?1:0})}return(ce,G)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),O("div",{key:0,class:"mask",onClick:G[10]||(G[10]=Nt(T=>o("cancel"),["self"]))},[l("div",Gh,[l("div",Yh,[l("div",null,[l("div",Jh,W(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),O("div",Xh,W(e.date),1)):he("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:G[0]||(G[0]=T=>o("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",Qh,[l("div",Zh,[l("div",ey,[G[11]||(G[11]=l("label",null,"工作内容(必填)",-1)),Me(l("input",{ref_key:"contentInput",ref:I,class:Xe(["input",{invalid:C.value}]),"onUpdate:modelValue":G[1]||(G[1]=T=>i.value=T),onKeydown:Mt(ue,["enter"])},null,34),[[Re,i.value]]),C.value?($(),O("div",ty,W(C.value),1)):he("",!0)]),l("div",ny,[G[13]||(G[13]=l("label",null,"所属项目",-1)),Me(l("select",{class:"select","onUpdate:modelValue":G[2]||(G[2]=T=>c.value=T)},[G[12]||(G[12]=l("option",{value:null},"无项目",-1)),($(!0),O(je,null,et(Y.value,T=>($(),O("option",{key:T.id,value:T.id},W(T.name),9,sy))),128))],512),[[ps,c.value]])]),l("div",ry,[G[14]||(G[14]=l("label",null,"工作分类",-1)),Me(l("select",{class:"select","onUpdate:modelValue":G[3]||(G[3]=T=>f.value=T)},[($(!0),O(je,null,et(n.value,T=>($(),O("option",{key:T,value:T},W(T),9,oy))),128))],512),[[ps,f.value]])]),l("div",ay,[G[15]||(G[15]=l("label",null,"耗时(分钟)",-1)),Me(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":G[4]||(G[4]=T=>v.value=T),placeholder:"选填"},null,512),[[Re,v.value,void 0,{number:!0}]])]),l("div",iy,[G[16]||(G[16]=l("label",null,"主要收获",-1)),Me(l("input",{class:"input","onUpdate:modelValue":G[5]||(G[5]=T=>b.value=T),placeholder:"一句话:学到了什么"},null,512),[[Re,b.value]])]),l("div",ly,[G[17]||(G[17]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":G[6]||(G[6]=T=>y.value=T),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),l("div",uy,[G[18]||(G[18]=l("label",null,"成果标记",-1)),l("button",{class:Xe(["toggle-btn",{on:_.value===1}]),onClick:G[7]||(G[7]=T=>_.value=_.value===1?0:1)},W(_.value===1?"已标记为成果":"未标记"),3)]),l("div",cy,[G[19]||(G[19]=l("label",null,"待跟进",-1)),l("button",{class:Xe(["toggle-btn",{onwarn:E.value===1}]),onClick:G[8]||(G[8]=T=>E.value=E.value===1?0:1)},W(E.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",dy,[l("button",{class:"btn btn-sm",onClick:G[9]||(G[9]=T=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ue},W(e.item?"保存修改":"添加"),1)])])])):he("",!0)]),_:1})]))}}),py=Kt(fy,[["__scopeId","data-v-f3b19176"]]);function Mo(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function dr(e,t,n,r){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(lm(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return r?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:r?"进行中":"未完成",makeup:o,workedMinutes:null};const i=Mo(wn(e.clock_in_at)),c=Mo(wn(e.clock_out_at)),f=Mo(n.work_start),v=Mo(n.work_end);let b="normal";!o&&i>f+n.grace_minutes?b="late":!o&&c{Vo.value=Vo.value.filter(n=>n.id!==t)},2e3)}function my(){return Vo}const hy={class:"day-panel"},yy={class:"dp-head"},gy={class:"dp-date"},by={class:"card sec"},wy={class:"att-grid"},_y={class:"att-cell"},ky={key:0,class:"edit-row"},xy={key:1,class:"att-val"},Cy={class:"att-cell"},$y={key:0,class:"edit-row"},Sy={key:1,class:"att-val"},Ey={class:"att-cell"},Ty=["list"],Ay=["id"],Py=["value"],Oy={class:"att-cell"},My={class:"att-val status-val"},Iy={key:0,class:"tag"},jy={key:1,class:"muted"},Dy={key:0,class:"att-note muted"},Ly={class:"att-actions"},Ky=["disabled"],Ry=["disabled"],Fy=["disabled"],Ny=["disabled"],Vy={key:0,class:"card sec makeup"},By={class:"form-grid"},Uy={class:"field"},qy={class:"field"},Hy={class:"field span2"},zy=["list"],Wy={class:"field span2"},Gy={key:0,class:"form-error"},Yy={class:"form-footer"},Jy={class:"list-sec"},Xy={class:"sec-head"},Qy={class:"sec-title"},Zy={key:0,class:"empty muted"},eg={class:"item-main"},tg={class:"tag"},ng=["onClick"],sg={key:0,class:"muted item-meta"},rg={key:1,class:"muted num item-meta"},og=["onClick"],ag=["onClick"],ig=["onClick"],lg=["onClick"],ug={key:0,class:"item-sub"},cg={key:0,class:"muted2"},dg={key:1,class:"muted"},fg={key:1,class:"dp-foot muted num"},pg=jt({__name:"DayPanel",props:{date:{}},setup(e){const t=M([]);Zr().then(g=>{t.value=g});const n=e,r=M(!0),o=M(null),i=M(void 0),c=M([]),f=M([]),v=M(""),b=M([]),y=st(()=>"loc-list-"+n.date),_=st(()=>n.date===ot());async function E(){r.value=!0,o.value=await vs(),i.value=await _n(n.date),c.value=await ph(n.date),f.value=await ar(!0),b.value=await yl(),v.value=i.value&&i.value.location||await th(),r.value=!1}ln(E),pt(()=>n.date,E),pt(cr,()=>{E()});function C(g){if(!g)return"";const m=f.value.find(x=>x.id===g);return m?m.name:"已删除项目"}const I=st(()=>o.value?dr(i.value,n.date,o.value,_.value):null),Y=st(()=>c.value.reduce((g,m)=>g+(m.minutes||0),0)),le=M(!1);async function ue(){le.value||(le.value=!0,await Ed(n.date,v.value),await E(),as(),Fe("上班打卡成功"),le.value=!1)}async function ce(){le.value||(le.value=!0,await ah(n.date),await E(),as(),Fe("下班打卡成功"),le.value=!1)}async function G(){await nh(n.date,v.value),as(),Fe("地点已更新")}const T=M(!1),q=st(()=>{var g;return((g=i.value)==null?void 0:g.kind)==="leave"});function Z(){if(i.value&&i.value.clock_in_at){T.value=!0;return}N(!0)}async function N(g){T.value=!1,await ch(n.date,g),await E(),as(),Fe(g?"已标记为休假":"已取消休假")}const se=M(null),j=M(""),S=M(null);pt(se,async g=>{var m;g&&(await ur(),(m=S.value)==null||m.focus())});function P(g){var x,D;const m=g==="in"?(x=i.value)==null?void 0:x.clock_in_at:(D=i.value)==null?void 0:D.clock_out_at;se.value=g,j.value=m?wn(m):g==="in"?"09:00":"18:00"}function te(){se.value=null}async function Pe(){const g=se.value;g&&(se.value=null,j.value&&(await uh(n.date,g==="in"?"clock_in_at":"clock_out_at",j.value),await E(),as(),Fe("打卡时间已修改")))}const Se=M(!1),ye=M("09:00"),Ae=M("18:00"),Ue=M(""),de=M(""),ke=M("");function Ee(){de.value=v.value,ke.value="",Se.value=!Se.value}async function De(){if(!ye.value||!Ae.value){ke.value="请填写上班与下班时间";return}await lh(n.date,n.date+"T"+ye.value+":00",n.date+"T"+Ae.value+":00",Ue.value.trim(),de.value),Se.value=!1,Ue.value="",ke.value="",await E(),as(),Fe("补卡已保存")}const $e=M(null),fe=M(!1);function Ie(g){$e.value=g,fe.value=!0}function ct(){$e.value=null,fe.value=!0}async function bt(g){g.id?(await bi(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}),Fe("记录已更新")):(await vh(n.date,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark}),Fe("记录已添加")),$e.value=null,fe.value=!1,await E()}async function _t(g){await bi(g.id,{is_milestone:g.is_milestone?0:1}),await E()}async function Bt(g){await bi(g.id,{needs_followup:g.needs_followup?0:1}),await E()}const vt=M(null);async function Ne(){vt.value&&vt.value.id&&await mh(vt.value.id),vt.value=null,await E(),Fe("记录已删除")}return(g,m)=>($(),O("div",hy,[l("div",yy,[l("div",gy,W(on(cd)(e.date)),1)]),l("div",by,[m[19]||(m[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",wy,[l("div",_y,[m[15]||(m[15]=l("label",null,"上班时间",-1)),se.value==="in"?($(),O("div",ky,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[0]||(m[0]=x=>j.value=x),onKeydown:[Mt(Pe,["enter"]),Mt(te,["esc"])]},null,544),[[Re,j.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:te},"取消")])):($(),O("div",xy,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},W(i.value&&i.value.clock_in_at?on(wn)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),O("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:m[1]||(m[1]=x=>P("in"))},[we(qe,{name:"edit",size:13})])):he("",!0)]))]),l("div",Cy,[m[16]||(m[16]=l("label",null,"下班时间",-1)),se.value==="out"?($(),O("div",$y,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[2]||(m[2]=x=>j.value=x),onKeydown:[Mt(Pe,["enter"]),Mt(te,["esc"])]},null,544),[[Re,j.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:te},"取消")])):($(),O("div",Sy,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},W(i.value&&i.value.clock_out_at?on(wn)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),O("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:m[3]||(m[3]=x=>P("out"))},[we(qe,{name:"edit",size:13})])):he("",!0)]))]),l("div",Ey,[m[17]||(m[17]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[4]||(m[4]=x=>v.value=x),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:G},null,40,Ty),[[Re,v.value]]),l("datalist",{id:y.value},[($(!0),O(je,null,et(b.value,x=>($(),O("option",{key:x,value:x},null,8,Py))),128))],8,Ay)]),l("div",Oy,[m[18]||(m[18]=l("label",null,"考勤状态",-1)),l("div",My,[I.value?($(),O(je,{key:0},[l("span",{class:Xe(["dot",I.value.status])},null,2),l("span",null,W(I.value.label),1),i.value&&i.value.kind==="makeup"?($(),O("span",Iy,"补卡")):he("",!0)],64)):($(),O("span",jy,"--"))])])]),i.value&&i.value.note?($(),O("div",Dy,"补卡说明:"+W(i.value.note),1)):he("",!0),l("div",Ly,[_.value&&(!i.value||!i.value.clock_in_at)?($(),O("button",{key:0,class:"btn btn-primary btn-sm",disabled:le.value,onClick:ue},"上班打卡",8,Ky)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),O("button",{key:1,class:"btn btn-primary btn-sm",disabled:le.value,onClick:ce},"下班打卡",8,Ry)):he("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),O("button",{key:2,class:"btn btn-sm",onClick:Ee},"补卡")):he("",!0),q.value?($(),O("button",{key:4,class:"btn btn-sm",disabled:le.value,onClick:m[5]||(m[5]=x=>N(!1))},"取消休假",8,Ny)):($(),O("button",{key:3,class:"btn btn-sm",disabled:le.value,onClick:Z},"标记休假",8,Fy))])]),Se.value?($(),O("div",Vy,[m[24]||(m[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",By,[l("div",Uy,[m[20]||(m[20]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[6]||(m[6]=x=>ye.value=x)},null,512),[[Re,ye.value]])]),l("div",qy,[m[21]||(m[21]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[7]||(m[7]=x=>Ae.value=x)},null,512),[[Re,Ae.value]])]),l("div",Hy,[m[22]||(m[22]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input",list:y.value,"onUpdate:modelValue":m[8]||(m[8]=x=>de.value=x),placeholder:"可直接输入"},null,8,zy),[[Re,de.value]])]),l("div",Wy,[m[23]||(m[23]=l("label",null,"补卡原因",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=x=>Ue.value=x),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,Ue.value]])])]),ke.value?($(),O("div",Gy,W(ke.value),1)):he("",!0),l("div",Yy,[l("button",{class:"btn btn-sm",onClick:m[10]||(m[10]=x=>Se.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):he("",!0),l("div",Jy,[l("div",Xy,[l("span",Qy,"工作记录("+W(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:ct},[we(qe,{name:"plus",size:14}),m[25]||(m[25]=ht(" 添加记录",-1))])]),!c.value.length&&!r.value?($(),O("div",Zy,"暂无记录")):he("",!0),($(!0),O(je,null,et(c.value,x=>($(),O("div",{key:x.id,class:"item"},[l("div",eg,[l("span",tg,W(on(qr)(x.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:D=>Ie(x)},W(x.content),9,ng),x.project_id?($(),O("span",sg,W(C(x.project_id)),1)):he("",!0),x.minutes?($(),O("span",rg,W(x.minutes)+" 分钟",1)):he("",!0),m[26]||(m[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:D=>Ie(x)},[we(qe,{name:"edit",size:14})],8,og),l("button",{class:Xe(["icon-btn",{active:x.is_milestone===1}]),title:"成果标记",onClick:D=>_t(x)},[we(qe,{name:"star",size:14})],10,ag),l("button",{class:Xe(["icon-btn",{"active-warn":x.needs_followup===1}]),title:"待跟进",onClick:D=>Bt(x)},[we(qe,{name:"flag",size:14})],10,ig),l("button",{class:"icon-btn",title:"删除",onClick:D=>vt.value=x},[we(qe,{name:"close",size:14})],8,lg)]),x.takeaway||x.remark?($(),O("div",ug,[x.takeaway?($(),O("div",cg,"收获:"+W(x.takeaway),1)):he("",!0),x.remark?($(),O("div",dg,"备注:"+W(x.remark),1)):he("",!0)])):he("",!0)]))),128)),c.value.length?($(),O("div",fg,[ht(" 共 "+W(c.value.length)+" 条事项 ",1),Y.value?($(),O(je,{key:0},[ht(" · "+W((Y.value/60).toFixed(1))+" 小时",1)],64)):he("",!0)])):he("",!0)]),we(Dn,{open:!!vt.value,title:"删除确认",message:vt.value?"将删除工作记录「"+vt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:m[11]||(m[11]=x=>vt.value=null),onConfirm:Ne},null,8,["open","message"]),we(Dn,{open:T.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:m[12]||(m[12]=x=>T.value=!1),onConfirm:m[13]||(m[13]=x=>N(!0))},null,8,["open"]),we(py,{open:fe.value,item:$e.value,projects:f.value,date:e.date,onCancel:m[14]||(m[14]=x=>fe.value=!1),onSave:bt},null,8,["open","item","projects","date"])]))}}),Md=Kt(pg,[["__scopeId","data-v-5c65c1f9"]]),vg={class:"cal-page"},mg={class:"cal-toolbar"},hg={class:"cal-title num"},yg=["disabled"],gg={class:"card cal-card"},bg={class:"cal-head"},wg={class:"cal-grid"},_g=["title","onClick"],kg={class:"cal-marks"},xg={key:0,class:"drawer"},Cg={class:"drawer-head"},$g={class:"drawer-body"},Sg=jt({__name:"CalendarView",setup(e){const t=M(ot()),n=st(()=>Number(t.value.slice(0,4))),r=st(()=>Number(t.value.slice(5,7))-1),o=st(()=>n.value+" 年 "+(r.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=st(()=>{const T=(new Date(n.value,r.value,1).getDay()+6)%7,q=new Date(n.value,r.value+1,0).getDate(),Z=[];for(let N=0;N[P.date,P])),se=q[2],j=new Map;for(const P of c.value){if(!P.inMonth)continue;const te=dr(N.get(P.date),P.date,Z,P.date===v),Pe=se.filter(Se=>Se.date===P.date);j.set(P.date,{status:te.status,label:te.label,location:((S=N.get(P.date))==null?void 0:S.location)||"",hasLog:Pe.length>0,hasMilestone:Pe.some(Se=>Se.is_milestone===1)})}f.value=j}pt([n,r],b,{immediate:!0}),pt(cr,()=>{b()});function y(G){var T;return((T=f.value.get(G))==null?void 0:T.status)??""}function _(G){const T=f.value.get(G);return T?G+" · "+T.label+(T.location?" · "+T.location:""):G}function E(G){var T;return!!((T=f.value.get(G))!=null&&T.hasLog)}function C(G){var T;return!!((T=f.value.get(G))!=null&&T.hasMilestone)}function I(){t.value=na(t.value,-1)}function Y(){t.value=na(t.value,1)}function le(){t.value=ot()}const ue=M(null);function ce(G,T){T&&(ue.value=G)}return pt(Vi,G=>{G&&(t.value=G,ue.value=G,Vi.value=null)},{immediate:!0}),(G,T)=>($(),O("div",vg,[l("div",mg,[l("button",{class:"icon-btn",title:"上一月",onClick:I},[we(qe,{name:"chevron-left",size:16})]),l("span",hg,W(o.value),1),l("button",{class:"icon-btn",title:"下一月",onClick:Y},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",disabled:t.value===on(v),onClick:le},"回到本月",8,yg)]),l("div",gg,[l("div",bg,[($(),O(je,null,et(i,q=>l("span",{key:q,class:"cal-week"},W(q),1)),64))]),l("div",wg,[($(!0),O(je,null,et(c.value,(q,Z)=>($(),O("button",{key:Z,class:Xe(["cal-cell",{blank:!q.inMonth,weekend:q.weekend,selected:ue.value===q.date}]),title:q.inMonth?_(q.date):void 0,onClick:N=>ce(q.date,q.inMonth)},[q.inMonth?($(),O(je,{key:0},[l("span",{class:Xe(["daynum num",{today:q.date===on(v)}])},W(Number(q.date.slice(8,10))),3),l("span",kg,[y(q.date)?($(),O("span",{key:0,class:Xe(["dot",y(q.date)])},null,2)):he("",!0),E(q.date)?($(),wt(qe,{key:1,name:"check-circle",size:12,class:"mark-log"})):he("",!0),C(q.date)?($(),wt(qe,{key:2,name:"star",size:12,class:"mark-star"})):he("",!0)])],64)):he("",!0)],10,_g))),128))])]),we(Rs,{name:"drawer"},{default:Wn(()=>[ue.value?($(),O("aside",xg,[l("div",Cg,[T[1]||(T[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:T[0]||(T[0]=q=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",$g,[we(Md,{date:ue.value},null,8,["date"])])])):he("",!0)]),_:1})]))}}),Eg=Kt(Sg,[["__scopeId","data-v-335328a3"]]),Tg="modulepreload",Ag=function(e,t){return new URL(e,t).href},Vu={},Id=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(b=>{if(b=Ag(b,r),b in Vu)return;Vu[b]=!0;const y=b.endsWith(".css"),_=y?'[rel="stylesheet"]':"";if(!!r)for(let I=c.length-1;I>=0;I--){const Y=c[I];if(Y.href===b&&(!y||Y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":Tg,y||(C.as="script"),C.crossOrigin="",C.href=b,v&&C.setAttribute("nonce",v),document.head.appendChild(C),y)return new Promise((I,Y)=>{C.addEventListener("load",I),C.addEventListener("error",()=>Y(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 o.then(c=>{for(const f of c||[])f.status==="rejected"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const Pg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},r=(i,c)=>{n.platforms.set(i,c)},o=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=r,n.setPlatform=o,n},Og=e=>e.CapacitorPlatforms=Pg(e),jd=Og(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});jd.addPlatform;jd.setPlatform;var ir;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ir||(ir={}));class _i extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const Mg=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"},Ig=e=>{var t,n,r,o,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,y=()=>c!==null?c.name:Mg(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||y,E=()=>_()!=="web",C=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||E,I=N=>{const se=T.get(N);return!!(se!=null&&se.platforms.has(_())||ue(N))},Y=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||I,le=N=>{var se;return(se=f.PluginHeaders)===null||se===void 0?void 0:se.find(j=>j.name===N)},ue=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||le,ce=N=>e.console.error(N),G=(N,se,j)=>Promise.reject(`${j} does not have an implementation of "${se}".`),T=new Map,q=(N,se={})=>{const j=T.get(N);if(j)return console.warn(`Capacitor plugin "${N}" already registered. Cannot register plugins twice.`),j.proxy;const S=_(),P=ue(N);let te;const Pe=async()=>(!te&&S in se?te=typeof se[S]=="function"?te=await se[S]():te=se[S]:c!==null&&!te&&"web"in se&&(te=typeof se.web=="function"?te=await se.web():te=se.web),te),Se=(Ee,De)=>{var $e,fe;if(P){const Ie=P==null?void 0:P.methods.find(ct=>De===ct.name);if(Ie)return Ie.rtype==="promise"?ct=>f.nativePromise(N,De.toString(),ct):(ct,bt)=>f.nativeCallback(N,De.toString(),ct,bt);if(Ee)return($e=Ee[De])===null||$e===void 0?void 0:$e.bind(Ee)}else{if(Ee)return(fe=Ee[De])===null||fe===void 0?void 0:fe.bind(Ee);throw new _i(`"${N}" plugin is not implemented on ${S}`,ir.Unimplemented)}},ye=Ee=>{let De;const $e=(...fe)=>{const Ie=Pe().then(ct=>{const bt=Se(ct,Ee);if(bt){const _t=bt(...fe);return De=_t==null?void 0:_t.remove,_t}else throw new _i(`"${N}.${Ee}()" is not implemented on ${S}`,ir.Unimplemented)});return Ee==="addListener"&&(Ie.remove=async()=>De()),Ie};return $e.toString=()=>`${Ee.toString()}() { [capacitor code] }`,Object.defineProperty($e,"name",{value:Ee,writable:!1,configurable:!1}),$e},Ae=ye("addListener"),Ue=ye("removeListener"),de=(Ee,De)=>{const $e=Ae({eventName:Ee},De),fe=async()=>{const ct=await $e;Ue({eventName:Ee,callbackId:ct},De)},Ie=new Promise(ct=>$e.then(()=>ct({remove:fe})));return Ie.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await fe()},Ie},ke=new Proxy({},{get(Ee,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return P?de:Ae;case"removeListener":return Ue;default:return ye(De)}}});return v[N]=ke,T.set(N,{name:N,proxy:ke,platforms:new Set([...Object.keys(se),...P?[S]:[]])}),ke},Z=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||q;return f.convertFileSrc||(f.convertFileSrc=N=>N),f.getPlatform=_,f.handleError=ce,f.isNativePlatform=C,f.isPluginAvailable=Y,f.pluginMethodNoop=G,f.registerPlugin=Z,f.Exception=_i,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},jg=e=>e.Capacitor=Ig(e),lr=jg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Dd=lr.registerPlugin;lr.Plugins;class Ld{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const o=this.listeners[t];if(!o){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}o.forEach(i=>i(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new lr.Exception(t,ir.Unimplemented)}unavailable(t="not available"){return new lr.Exception(t,ir.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const Bu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Uu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Dg extends Ld{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Uu(o).trim(),i=Uu(i).trim(),n[o]=i}),n}async setCookie(t){try{const n=Bu(t.key),r=Bu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${o}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Dd("CapacitorCookies",{web:()=>new Dg});const Lg=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),Kg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,i,c)=>(o[i]=e[t[c]],o),{})},Rg=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[i,c]=o;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}`),`${r}&${v}`},"").substr(1):null,Fg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=Kg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class Ng extends Ld{async request(t){const n=Fg(t,t.webFetchExtra),r=Rg(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,i=await fetch(o,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Lg(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const y={};return i.headers.forEach((_,E)=>{y[E]=_}),{data:v,headers:y,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"}))}}Dd("CapacitorHttp",{web:()=>new Ng});async function Ea(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(lr.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Id(async()=>{const{Filesystem:b,Directory:y,Encoding:_}=await import("./index-B69AvT0j.js");return{Filesystem:b,Directory:y,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 r=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");return i.href=o,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Vg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Ea},Symbol.toStringTag,{value:"Module"})),Bg={class:"detail-page"},Ug={class:"card toolbar"},qg={class:"nav-row"},Hg=["value"],zg=["disabled"],Wg={class:"exp-row"},Gg={class:"seg"},Yg=["disabled"],Jg=jt({__name:"TodayView",setup(e){const t=M(ot()),n=st(()=>t.value===ot());function r(){t.value=Vt(t.value,-1)}function o(){t.value=Vt(t.value,1)}function i(){t.value=ot()}const c=M("day"),f=M(ot()),v=M(ot()),b=M(!1);function y(){if(c.value==="day")return{start:t.value,end:t.value,label:t.value};if(c.value==="week"){const C=Zs(f.value);return{start:C,end:Vt(C,6),label:C+"_"+Vt(C,6)}}if(c.value==="month"){const C=f.value.slice(0,4),I=f.value.slice(5,7),Y=new Date(Number(C),Number(I),0).getDate();return{start:C+"-"+I+"-01",end:C+"-"+I+"-"+Y,label:C+"-"+I}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:C,end:I,label:Y}=y(),[le,ue,ce,G]=await Promise.all([vs(),Xr(C,I),Qr(C,I),ar(!0)]),T=new Map(G.map(j=>[j.id,j.name])),q=["# 工作详情 "+Y,""],Z=["周日","周一","周二","周三","周四","周五","周六"];let N=C,se=0;for(;N<=I&&se<400;){const j=ce.filter(P=>P.date===N),S=ue.find(P=>P.date===N);if(S||j.length){if(q.push("## "+N+" "+Z[new Date(N+"T00:00:00").getDay()],""),S&&(S.clock_in_at||S.kind==="makeup")){const P=dr(S,N,le,N===ot()),te=[wn(S.clock_in_at),"–",wn(S.clock_out_at),"·",P.label];S.location&&te.push("· 地点:"+S.location),q.push("考勤:"+te.join(" "),"")}for(const P of j){const te=P.project_id&&T.get(P.project_id)||"",Pe="- 【"+qr(P.category)+"】"+P.content+(P.minutes?"("+P.minutes+" 分钟)":"")+(te?" @"+te:"");q.push(Pe),P.takeaway&&q.push(" - 收获:"+P.takeaway),P.needs_followup===1&&P.remark?q.push(" - 待跟进:"+P.remark):P.remark&&q.push(" - 备注:"+P.remark)}q.push("")}N=Vt(N,1),se++}await Ea("工作详情_"+Y+".md",q.join(` -`)),Fe("已导出 Markdown")}finally{b.value=!1}}}function E(C){const I=C.target.value;I&&(t.value=I)}return pt(t,C=>{f.value=C,c.value==="custom"&&(v.value=C)}),(C,I)=>($(),O("div",Bg,[l("div",Ug,[l("div",qg,[l("button",{class:"icon-btn",title:"前一天",onClick:r},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-title num",{"is-today":n.value}])},W(on(cd)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[we(qe,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:E},null,40,Hg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,zg)]),I[7]||(I[7]=l("div",{class:"tool-sep"},null,-1)),l("div",Wg,[I[6]||(I[6]=l("span",{class:"muted exp-label"},"导出",-1)),l("div",Gg,[l("button",{class:Xe(["seg-btn",{active:c.value==="day"}]),onClick:I[0]||(I[0]=Y=>c.value="day")},"指定日",2),l("button",{class:Xe(["seg-btn",{active:c.value==="week"}]),onClick:I[1]||(I[1]=Y=>c.value="week")},"当周",2),l("button",{class:Xe(["seg-btn",{active:c.value==="month"}]),onClick:I[2]||(I[2]=Y=>c.value="month")},"当月",2),l("button",{class:Xe(["seg-btn",{active:c.value==="custom"}]),onClick:I[3]||(I[3]=Y=>c.value="custom")},"自定义",2)]),c.value!=="day"?Me(($(),O("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":I[4]||(I[4]=Y=>f.value=Y)},null,512)),[[Re,f.value]]):he("",!0),c.value==="custom"?Me(($(),O("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":I[5]||(I[5]=Y=>v.value=Y)},null,512)),[[Re,v.value]]):he("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,Yg)])]),we(Md,{date:t.value},null,8,["date"])]))}}),Xg=Kt(Jg,[["__scopeId","data-v-2bb84c76"]]),Qg={class:"plan-page"},Zg={class:"blk-head"},eb={key:0,class:"card empty muted"},tb={class:"goal-main"},nb={class:"goal-line"},sb={class:"tag"},rb={class:"goal-name"},ob={class:"muted num goal-range"},ab={class:"goal-bar"},ib={class:"muted num goal-meta"},lb={class:"goal-ops"},ub=["onClick"],cb=["onClick"],db={class:"blk-head day-head"},fb={class:"blk-head-text"},pb={class:"muted blk-sub num"},vb={class:"day-ops"},mb={class:"card list-card"},hb={key:0,class:"empty muted"},yb={class:"pi-time num"},gb={class:"muted"},bb={class:"pi-main"},wb={class:"pi-title"},_b={class:"tag"},kb={key:0,class:"tag tag-goal"},xb={key:1,class:"state-done"},Cb={key:2,class:"state-skip"},$b={key:0,class:"muted pi-note"},Sb={class:"muted pi-meta num"},Eb={key:0,class:"timer-live"},Tb={class:"pi-ops"},Ab=["onClick"],Pb=["onClick"],Ob=["onClick"],Mb=["onClick"],Ib=["onClick"],jb=["onClick"],Db={class:"dialog",role:"dialog","aria-label":"计划"},Lb={class:"dialog-head"},Kb={class:"dialog-title"},Rb={class:"dialog-body"},Fb={class:"form-row"},Nb={class:"form-row"},Vb=["value"],Bb={class:"form-row two"},Ub={class:"form-row"},qb={key:0,class:"form-error"},Hb={class:"dialog-btns"},zb={class:"dialog",role:"dialog","aria-label":"长期计划"},Wb={class:"dialog-head"},Gb={class:"dialog-title"},Yb={class:"dialog-body"},Jb={class:"form-row"},Xb={class:"form-row"},Qb=["value"],Zb={class:"form-row two"},ew={class:"form-row"},tw={key:0,class:"form-error"},nw={class:"dialog-btns"},sw=jt({__name:"PlanView",setup(e){const t=M([]),n=M({}),r=M(!1),o=M(null),i=M(""),c=M("学习"),f=M(ot()),v=M(Vt(ot(),6)),b=M(""),y=M(""),_=M(null);function E(){o.value=null,i.value="",c.value="学习",f.value=ot(),v.value=Vt(ot(),6),b.value="",y.value="",r.value=!0}function C(m){o.value=m,i.value=m.title,c.value=m.kind,f.value=m.start_date,v.value=m.end_date,b.value=m.note||"",y.value="",r.value=!0}async function I(){if(!i.value.trim()){y.value="请填写计划名称";return}if(v.valuele.value===ot());async function Z(){ce.value=!0;const[m,x,D]=await Promise.all([gh(le.value),Th(),Eh()]);ue.value=m,t.value=x;const ae={};for(const z of D)ae[String(z.goalId)]={done:z.done,total:z.total};n.value=ae,ce.value=!1}pt(le,Z),pt(cr,Z),ln(()=>{Z(),T=window.setInterval(()=>{G.value=Date.now()},3e4)}),Ln(()=>{T&&window.clearInterval(T)});function N(){le.value=Vt(le.value,-1)}function se(){le.value=Vt(le.value,1)}function j(){le.value=ot()}const S=st(()=>{const m=ue.value.length,x=ue.value.filter(A=>A.status==="done").length,D=ue.value.reduce((A,X)=>A+P(X),0),ae=ue.value.reduce((A,X)=>A+(X.actual_minutes||0),0);let z=0;const ee=Pe.value;if(ee){const A=ue.value.find(X=>X.id===ee);A&&(z=Se(A))}return{total:m,done:x,plannedMin:D,actualMin:ae+z}});function P(m){const[x,D]=m.start_time.split(":").map(Number),[ae,z]=m.end_time.split(":").map(Number);return Math.max(0,ae*60+z-(x*60+D))}function te(m){return m<60?m+" 分钟":Math.floor(m/60)+" 小时 "+m%60+" 分"}const Pe=st(()=>{const m=ue.value.find(x=>!!x.timer_started_at);return m?m.id:null});function Se(m){if(!m.timer_started_at)return m.actual_minutes||0;const x=Math.max(0,Math.round((G.value-new Date(m.timer_started_at).getTime())/6e4));return(m.actual_minutes||0)+x}async function ye(m){m.timer_started_at?(await Sa(m.id),Fe("已停止计时:"+m.title)):(await Ch(m.id),Fe("开始计时:"+m.title)),Km(),await Z()}async function Ae(m,x){await xh(m.id,x),await Z()}const Ue=M(!1),de=M(null),ke=M(""),Ee=M("学习"),De=M("09:00"),$e=M("10:00"),fe=M(""),Ie=M(""),ct=["学习","健身","自律","工作","阅读","其他"];function bt(){de.value=null,ke.value="",Ee.value="学习",De.value="09:00",$e.value="10:00",fe.value="",Ie.value="",Ue.value=!0}function _t(m){de.value=m.id,ke.value=m.title,Ee.value=m.kind,De.value=m.start_time,$e.value=m.end_time,fe.value=m.note||"",Ie.value="",Ue.value=!0}async function Bt(){if(!ke.value.trim()){Ie.value="请填写计划内容";return}if($e.value<=De.value){Ie.value="结束时间需晚于开始时间";return}de.value?(await _h(de.value,{title:ke.value.trim(),kind:Ee.value,start_time:De.value,end_time:$e.value,note:fe.value}),Fe("计划已更新")):(await wh({date:le.value,start_time:De.value,end_time:$e.value,title:ke.value,kind:Ee.value,note:fe.value}),Fe("计划已添加")),Ue.value=!1,await Z()}async function vt(m){await kh(m.id),Fe("已删除"),await Z()}const Ne=["周日","周一","周二","周三","周四","周五","周六"];function g(m){return Ne[Fs(m).getDay()]}return(m,x)=>($(),O("div",Qg,[l("div",Zg,[x[18]||(x[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:E},[we(qe,{name:"plus",size:14}),x[17]||(x[17]=ht(" 新建长期计划",-1))])]),t.value.length?he("",!0):($(),O("div",eb," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),O(je,null,et(t.value,D=>($(),O("div",{key:D.id,class:"card goal-card"},[l("div",tb,[l("div",nb,[l("span",sb,W(D.kind),1),l("span",rb,W(D.title),1),l("span",ob,W(D.start_date.slice(5))+" ~ "+W(D.end_date.slice(5)),1)]),l("div",ab,[l("span",{class:"goal-bar-fill",style:qn({width:(n.value[String(D.id)]?Math.round(n.value[String(D.id)].done/Math.max(1,n.value[String(D.id)].total)*100):0)+"%"})},null,4)]),l("div",ib,[ht(W(n.value[String(D.id)]?n.value[String(D.id)].done+"/"+n.value[String(D.id)].total+" 天已完成":"0/"+(n.value[String(D.id)]?n.value[String(D.id)].total:0)+" 天")+" ",1),D.note?($(),O(je,{key:0},[ht(" · "+W(D.note),1)],64)):he("",!0)])]),l("div",lb,[l("button",{class:"icon-btn",title:"编辑",onClick:ae=>C(D)},[we(qe,{name:"edit",size:14})],8,ub),l("button",{class:"icon-btn",title:"删除",onClick:ae=>_.value=D},[we(qe,{name:"close",size:14})],8,cb)])]))),128)),l("div",db,[l("div",fb,[x[21]||(x[21]=l("div",{class:"blk-title"},"每日安排",-1)),l("div",pb,[ht(" 共 "+W(S.value.total)+" 项 · 完成 "+W(S.value.done)+" 项 · 计划 "+W(te(S.value.plannedMin))+" · 实际投入 "+W(te(S.value.actualMin))+" ",1),Pe.value?($(),O(je,{key:0},[x[19]||(x[19]=ht(" · ",-1)),x[20]||(x[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):he("",!0)])]),l("div",vb,[l("button",{class:"icon-btn",title:"前一天",onClick:N},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-chip num",{today:q.value}])},W(le.value.slice(5))+" "+W(g(le.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:se},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:Xe(["btn btn-sm",{"btn-primary":!q.value}]),onClick:j},"今天",2),l("button",{class:"btn btn-primary btn-sm",onClick:bt},[we(qe,{name:"plus",size:14}),x[22]||(x[22]=ht(" 添加计划",-1))])])]),l("div",mb,[!ce.value&&!ue.value.length?($(),O("div",hb,"今天还没有计划,点「添加计划」开始规划。")):he("",!0),($(!0),O(je,null,et(ue.value,D=>($(),O("div",{key:D.id,class:Xe(["plan-item",{done:D.status==="done",skip:D.status==="skip",running:!!D.timer_started_at}])},[l("div",yb,[ht(W(D.start_time),1),l("span",gb," - "+W(D.end_time),1)]),l("div",bb,[l("div",wb,[l("span",_b,W(D.kind),1),D.goal_id?($(),O("span",kb,"长期")):he("",!0),l("span",{class:Xe(["pi-text",{strike:D.status==="done"}])},W(D.title),3),D.status==="done"?($(),O("span",xb,"已完成")):D.status==="skip"?($(),O("span",Cb,"已跳过")):he("",!0)]),D.note?($(),O("div",$b,W(D.note),1)):he("",!0),l("div",Sb,[D.timer_started_at?($(),O("span",Eb,"计时中 · 已 "+W(Se(D))+" 分钟",1)):D.actual_minutes>0?($(),O(je,{key:1},[ht("实际投入 "+W(D.actual_minutes)+" 分钟",1)],64)):he("",!0)])]),l("div",Tb,[D.status!=="done"?($(),O("button",{key:0,class:Xe(["btn btn-xs",{"timer-on":!!D.timer_started_at}]),onClick:ae=>ye(D)},W(D.timer_started_at?"停止计时":"计时"),11,Ab)):he("",!0),D.status!=="done"?($(),O("button",{key:1,class:"btn btn-xs",onClick:ae=>Ae(D,"done")},"完成",8,Pb)):he("",!0),D.status==="todo"?($(),O("button",{key:2,class:"btn btn-xs",onClick:ae=>Ae(D,"skip")},"跳过",8,Ob)):he("",!0),D.status!=="todo"?($(),O("button",{key:3,class:"btn btn-xs",onClick:ae=>Ae(D,"todo")},"恢复",8,Mb)):he("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:ae=>_t(D)},[we(qe,{name:"edit",size:14})],8,Ib),l("button",{class:"icon-btn",title:"删除",onClick:ae=>vt(D)},[we(qe,{name:"close",size:14})],8,jb)])],2))),128))]),($(),wt(zn,{to:"body"},[Ue.value?($(),O("div",{key:0,class:"mask",onClick:x[7]||(x[7]=Nt(D=>Ue.value=!1,["self"]))},[l("div",Db,[l("div",Lb,[l("span",Kb,W(de.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:x[0]||(x[0]=D=>Ue.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",Rb,[l("div",Fb,[x[23]||(x[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[1]||(x[1]=D=>ke.value=D),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(Bt,["enter"])},null,544),[[Re,ke.value]])]),l("div",Nb,[x[24]||(x[24]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":x[2]||(x[2]=D=>Ee.value=D)},[($(),O(je,null,et(ct,D=>l("option",{key:D,value:D},W(D),9,Vb)),64))],512),[[ps,Ee.value]])]),l("div",Bb,[l("div",null,[x[25]||(x[25]=l("label",null,"开始时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":x[3]||(x[3]=D=>De.value=D)},null,512),[[Re,De.value]])]),l("div",null,[x[26]||(x[26]=l("label",null,"结束时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":x[4]||(x[4]=D=>$e.value=D)},null,512),[[Re,$e.value]])])]),l("div",Ub,[x[27]||(x[27]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[5]||(x[5]=D=>fe.value=D),placeholder:"目标、资料、提醒等",onKeydown:Mt(Bt,["enter"])},null,544),[[Re,fe.value]])]),Ie.value?($(),O("div",qb,W(Ie.value),1)):he("",!0)]),l("div",Hb,[l("button",{class:"btn btn-sm",onClick:x[6]||(x[6]=D=>Ue.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Bt},W(de.value?"保存":"添加"),1)])])])):he("",!0)])),($(),wt(zn,{to:"body"},[r.value?($(),O("div",{key:0,class:"mask",onClick:x[15]||(x[15]=Nt(D=>r.value=!1,["self"]))},[l("div",zb,[l("div",Wb,[l("span",Gb,W(o.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:x[8]||(x[8]=D=>r.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",Yb,[l("div",Jb,[x[28]||(x[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[9]||(x[9]=D=>i.value=D),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Re,i.value]])]),l("div",Xb,[x[29]||(x[29]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":x[10]||(x[10]=D=>c.value=D)},[($(),O(je,null,et(ct,D=>l("option",{key:D,value:D},W(D),9,Qb)),64))],512),[[ps,c.value]])]),l("div",Zb,[l("div",null,[x[30]||(x[30]=l("label",null,"开始日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":x[11]||(x[11]=D=>f.value=D)},null,512),[[Re,f.value]])]),l("div",null,[x[31]||(x[31]=l("label",null,"结束日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":x[12]||(x[12]=D=>v.value=D)},null,512),[[Re,v.value]])])]),l("div",ew,[x[32]||(x[32]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[13]||(x[13]=D=>b.value=D)},null,512),[[Re,b.value]])]),y.value?($(),O("div",tw,W(y.value),1)):he("",!0),x[33]||(x[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",nw,[l("button",{class:"btn btn-sm",onClick:x[14]||(x[14]=D=>r.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:I},W(o.value?"保存":"创建"),1)])])])):he("",!0)])),we(Dn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:x[16]||(x[16]=D=>_.value=null),onConfirm:Y},null,8,["open","message"])]))}}),rw=Kt(sw,[["__scopeId","data-v-eee1e1ed"]]),ow={class:"stats"},aw={class:"cards"},iw={class:"card stat-card"},lw={class:"stat-num num"},uw={class:"card stat-card"},cw={class:"stat-num num"},dw={class:"card stat-card"},fw={class:"stat-num num"},pw={class:"card stat-card"},vw={class:"stat-num num"},mw={class:"card section"},hw={class:"heat"},yw=["title"],gw={class:"two-col"},bw={class:"card section"},ww={class:"bar-label"},_w={class:"bar-track"},kw={class:"muted num bar-num"},xw={key:0,class:"muted"},Cw={class:"card section"},$w={class:"bar-label"},Sw={class:"bar-track"},Ew={class:"muted num bar-num"},Tw={key:0,class:"muted"},Aw={class:"card section"},Pw={class:"bar-label loc-label"},Ow={class:"bar-track"},Mw={class:"muted num bar-num"},Iw={key:0,class:"muted"},jw=jt({__name:"StatsView",setup(e){const t=M({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=M([]),r=M([]),o=M([]),i=M([]);async function c(){const b=ot(),y="2000-01-01",_=await Promise.all([vs(),Xr(y,b),Qr(y,b),ar(!0)]),E=_[0],C=_[1],I=_[2],Y=_[3],le=C.filter(ye=>ye.clock_in_at||ye.kind==="makeup");let ue=0;for(const ye of le){const Ae=dr(ye,ye.date,E,ye.date===b);ue+=Ae.workedMinutes??0}const ce=new Set(I.map(ye=>ye.date));let G=0,T=b;for(ce.has(T)||(T=Vt(b,-1));ce.has(T);)G++,T=Vt(T,-1);t.value={attendDays:le.length,totalHours:(ue/60).toFixed(1),itemCount:I.length,streak:G};const q=new Map;for(const ye of le){const Ae=ye.location||"未记录";q.set(Ae,(q.get(Ae)||0)+1)}i.value=Array.from(q.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/(le.length||1)*100)})).sort((ye,Ae)=>Ae.count-ye.count);const Z=I.length||1,N=await Zr(),se=new Map;for(const ye of I)se.set(ye.category,(se.get(ye.category)||0)+1);const j=new Set(N);for(const ye of se.keys())j.has(ye)||N.push(ye);r.value=N.map(ye=>{const Ae=se.get(ye)||0;return{key:ye,label:ye,count:Ae,percent:Math.round(Ae/Z*100)}}).filter(ye=>ye.count>0).sort((ye,Ae)=>Ae.count-ye.count);const S=new Map(Y.map(ye=>[ye.id,ye.name])),P=new Map;for(const ye of I){const Ae=ye.project_id?S.get(ye.project_id)||"已删除项目":"无项目";P.set(Ae,(P.get(Ae)||0)+1)}o.value=Array.from(P.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/Z*100)})).sort((ye,Ae)=>Ae.count-ye.count);const te=new Map;for(const ye of I)te.set(ye.date,(te.get(ye.date)||0)+1);const Pe=Zs(b),Se=[];for(let ye=11;ye>=0;ye--){const Ae=Vt(Pe,-7*ye),Ue=[];for(let de=0;de<7;de++){const ke=Vt(Ae,de);Ue.push({date:ke,count:te.get(ke)||0})}Se.push(Ue)}n.value=Se}ln(async()=>{await c()}),pt(cr,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,y){return b+" · "+(y?y+" 条":"无记录")}return(b,y)=>($(),O("div",ow,[l("div",aw,[l("div",iw,[y[0]||(y[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",lw,W(t.value.attendDays),1)]),l("div",uw,[y[1]||(y[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",cw,W(t.value.totalHours),1)]),l("div",dw,[y[2]||(y[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",fw,W(t.value.itemCount),1)]),l("div",pw,[y[3]||(y[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",vw,W(t.value.streak),1)])]),l("div",mw,[y[4]||(y[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",hw,[($(!0),O(je,null,et(n.value,(_,E)=>($(),O("div",{key:E,class:"heat-col"},[($(!0),O(je,null,et(_,C=>($(),O("span",{key:C.date,class:Xe(["heat-cell","lv"+f(C.count)]),title:v(C.date,C.count)},null,10,yw))),128))]))),128))]),y[5]||(y[5]=Wp('
少多
',1))]),l("div",gw,[l("div",bw,[y[6]||(y[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),O(je,null,et(r.value,_=>($(),O("div",{key:_.key,class:"bar-row"},[l("span",ww,W(_.label),1),l("span",_w,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",kw,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),r.value.length?he("",!0):($(),O("div",xw,"暂无数据"))]),l("div",Cw,[y[7]||(y[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),O(je,null,et(o.value,_=>($(),O("div",{key:_.name,class:"bar-row"},[l("span",$w,W(_.name),1),l("span",Sw,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",Ew,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),o.value.length?he("",!0):($(),O("div",Tw,"暂无数据"))])]),l("div",Aw,[y[8]||(y[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),O(je,null,et(i.value,_=>($(),O("div",{key:_.name,class:"bar-row"},[l("span",Pw,W(_.name),1),l("span",Ow,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",Mw,W(_.count)+" 天 · "+W(_.percent)+"%",1)]))),128)),i.value.length?he("",!0):($(),O("div",Iw,"暂无数据"))])]))}}),Dw=Kt(jw,[["__scopeId","data-v-5469ae68"]]);async function Lw(e,t,n){const r=ot(),o=await Promise.all([vs(),Xr(e,t),Qr(e,t),ar(!0),yh(e,t),Zr()]),i=o[0],c=o[1],f=o[2],v=o[3],b=o[4],y=o[5];let _=0,E=0,C=0;for(const P of c){(P.clock_in_at||P.kind==="makeup")&&_++,P.kind==="makeup"&&C++;const te=dr(P,P.date,i,P.date===r);E+=te.workedMinutes??0}const I=new Map;for(const P of c){if(!(P.clock_in_at||P.kind==="makeup"))continue;const te=P.location||"未记录";I.set(te,(I.get(te)||0)+1)}const Y=Array.from(I.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,te)=>te.count-P.count),le=f.length||1,ue=new Map;for(const P of f)ue.set(P.category,(ue.get(P.category)||0)+1);const ce=new Set(y);for(const P of ue.keys())ce.has(P)||y.push(P);const G=y.map(P=>{const te=ue.get(P)||0;return{key:P,label:P,count:te,percent:Math.round(te/le*100)}}).filter(P=>P.count>0).sort((P,te)=>te.count-P.count),T=new Map(v.map(P=>[P.id,P.name])),q=new Map;for(const P of f){const te=P.project_id?T.get(P.project_id)||"已删除项目":"无项目";q.set(te,(q.get(te)||0)+1)}const Z=Array.from(q.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,te)=>te.count-P.count),N=f.filter(P=>P.is_milestone===1).map(P=>({date:P.date,content:P.content})),se=f.filter(P=>P.needs_followup===1).map(P=>({date:P.date,content:P.content,remark:P.remark||""})),j=f.filter(P=>!!P.takeaway).map(P=>({date:P.date,text:P.takeaway})),S=b.map(P=>({weekStart:P.week_start,highlights:P.highlights||"",challenges:P.challenges||"",plan_next:P.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(E/60).toFixed(1),makeupCount:C,leaveCount:c.filter(P=>P.kind==="leave").length,itemCount:f.length,categoryStats:G,projectStats:Z,locationStats:Y,milestones:N,followups:se,takeaways:j,weekNotes:S}}function Kw(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(r=>r.name!=="未记录");n.length&&t.push("其中:"+n.map(r=>r.name+" "+r.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(r=>r.label+" "+r.percent+"%("+r.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(r=>r.name+" "+r.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((r,o)=>t.push(o+1+". 【成果】"+r.content+"("+r.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(r=>t.push("- 【待跟进】"+r.content+(r.remark?"("+r.date+" 备注:"+r.remark+")":"("+r.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(r=>t.push("- "+r.text+"("+r.date+")")):t.push("(无)");for(const r of e.weekNotes)t.push(""),t.push("### 周记("+r.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(r.highlights||"(无)")),t.push("- 踩的坑:"+(r.challenges||"(无)")),t.push("- 下周计划:"+(r.plan_next||"(无)"));return t.push(""),t.join(` -`)}async function Gi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Rw(e){const t=await Promise.all([Ct("ai_base_url",""),Ct("ai_api_key",""),Ct("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),r=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};r&&(c.Authorization="Bearer "+r);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let E="接口返回 "+b.status;try{const C=await b.json();C&&C.error&&C.error.message&&(E+=":"+C.error.message)}catch{}throw new Error(E)}const y=await b.json(),_=y&&y.choices&&y.choices[0]&&y.choices[0].message&&y.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Fw={class:"report"},Nw={class:"report-toolbar"},Vw={class:"seg"},Bw=["onClick"],Uw=["disabled"],qw=["disabled"],Hw={key:0,class:"ai-error"},zw={class:"report-grid"},Ww={class:"report-left"},Gw={class:"card section"},Yw={class:"section-title"},Jw={class:"muted note-saved"},Xw={class:"card section"},Qw={class:"report-right"},Zw={key:0,class:"card section"},e_={class:"sum-row"},t_={class:"num"},n_={class:"sum-row"},s_={class:"num"},r_={class:"sum-row"},o_={class:"num"},a_={class:"sum-row"},i_={class:"num"},l_={class:"sum-row"},u_={class:"num"},c_={class:"muted"},d_={class:"num"},f_={key:0,class:"muted sum-empty"},p_={class:"muted"},v_={key:1,class:"muted sum-empty"},m_={class:"muted"},h_={key:2,class:"muted sum-empty"},y_={class:"muted"},g_={key:3,class:"muted sum-empty"},b_=jt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=M("week"),r=M(Zs(ot())),o=M(ot()),i=M(null),c=M(""),f=M(!1),v=M(!1),b=M(null),y=M(""),_=M(Zs(ot())),E=M(""),C=M(""),I=M(""),Y=M(!1);async function le(){const se=await gl(_.value);E.value=(se==null?void 0:se.highlights)||"",C.value=(se==null?void 0:se.challenges)||"",I.value=(se==null?void 0:se.plan_next)||"",Y.value=!1}async function ue(){await hh(_.value,{highlights:E.value.trim()||null,challenges:C.value.trim()||null,plan_next:I.value.trim()||null}),Y.value=!0,await G()}function ce(se){const j=ot();if(se==="week"){const S=Zs(j);return{start:S,end:Vt(S,6),label:"本周"}}if(se==="month"){const S=j.slice(0,7);return{start:S+"-01",end:j,label:S+" 本月"}}return se==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:r.value,end:o.value,label:r.value+" ~ "+o.value}}async function G(){f.value=!0;const se=ce(n.value),j=await Lw(se.start,se.end,se.label);i.value=j,c.value=Kw(j),f.value=!1}pt(n,G),pt([r,o],()=>{n.value==="custom"&&G()}),ln(async()=>{await le(),await G()});async function T(){const se=ot().replace(/-/g,""),j=await Ea("实习工作总结_"+se+".md",c.value);Fe(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function q(){await Gi(c.value),Fe("总结已复制到剪贴板")}async function Z(){if(v.value)return;y.value="";const se=c.value.trim();if(!se){y.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await Rw(se),Fe("AI 润色完成")}catch(j){b.value=null,y.value=j instanceof Error?j.message:"润色失败"}v.value=!1}function N(){b.value!==null&&(c.value=b.value),b.value=null}return(se,j)=>($(),O("div",Fw,[l("div",Nw,[l("div",Vw,[($(),O(je,null,et(t,S=>l("button",{key:S.key,class:Xe(["seg-btn",{active:n.value===S.key}]),onClick:P=>n.value=S.key},W(S.label),11,Bw)),64))]),n.value==="custom"?($(),O(je,{key:0},[Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=S=>r.value=S)},null,512),[[Re,r.value]]),j[6]||(j[6]=l("span",{class:"muted"},"至",-1)),Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=S=>o.value=S)},null,512),[[Re,o.value]])],64)):he("",!0),j[10]||(j[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Z},[we(qe,{name:"edit",size:14}),j[7]||(j[7]=ht("AI 润色 ",-1))],8,Uw),b.value!==null?($(),O("button",{key:1,class:"btn btn-sm",onClick:N},"还原润色前")):he("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:G},[we(qe,{name:"edit",size:14}),j[8]||(j[8]=ht("重新生成 ",-1))],8,qw),l("button",{class:"btn btn-sm",onClick:q},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:T},[we(qe,{name:"export",size:14}),j[9]||(j[9]=ht("导出 Markdown ",-1))])]),y.value?($(),O("div",Hw,W(y.value),1)):he("",!0),l("div",zw,[l("div",Ww,[l("div",Gw,[l("div",Yw,"本周周记("+W(_.value)+" 起)",1),j[11]||(j[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=S=>E.value=S),placeholder:"本周最有价值的一件事",onBlur:ue},null,544),[[Re,E.value]]),j[12]||(j[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=S=>C.value=S),placeholder:"遇到的问题与教训",onBlur:ue},null,544),[[Re,C.value]]),j[13]||(j[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=S=>I.value=S),placeholder:"下周准备做什么",onBlur:ue},null,544),[[Re,I.value]]),l("div",Jw,W(Y.value?"已保存":"失焦自动保存"),1)]),l("div",Xw,[j[14]||(j[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Me(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=S=>c.value=S),spellcheck:"false"},null,512),[[Re,c.value]])])]),l("div",Qw,[i.value?($(),O("div",Zw,[j[20]||(j[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",e_,[j[15]||(j[15]=l("span",{class:"muted"},"出勤",-1)),l("span",t_,W(i.value.attendDays)+" 天",1)]),l("div",n_,[j[16]||(j[16]=l("span",{class:"muted"},"工时",-1)),l("span",s_,W(i.value.totalHours)+" 小时",1)]),l("div",r_,[j[17]||(j[17]=l("span",{class:"muted"},"补卡",-1)),l("span",o_,W(i.value.makeupCount)+" 次",1)]),l("div",a_,[j[18]||(j[18]=l("span",{class:"muted"},"请假",-1)),l("span",i_,W(i.value.leaveCount)+" 天",1)]),l("div",l_,[j[19]||(j[19]=l("span",{class:"muted"},"记录",-1)),l("span",u_,W(i.value.itemCount)+" 条",1)]),j[21]||(j[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),O(je,null,et(i.value.categoryStats,S=>($(),O("div",{key:S.key,class:"sum-row"},[l("span",c_,W(S.label),1),l("span",d_,W(S.count)+" 条 · "+W(S.percent)+"%",1)]))),128)),i.value.categoryStats.length?he("",!0):($(),O("div",f_,"(无)")),j[22]||(j[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),O(je,null,et(i.value.milestones,(S,P)=>($(),O("div",{key:"m"+P,class:"sum-item"},[ht(W(S.content),1),l("span",p_,"("+W(S.date)+")",1)]))),128)),i.value.milestones.length?he("",!0):($(),O("div",v_,"(无)")),j[23]||(j[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),O(je,null,et(i.value.followups,(S,P)=>($(),O("div",{key:"f"+P,class:"sum-item"},[ht(W(S.content),1),l("span",m_,"("+W(S.date)+")",1)]))),128)),i.value.followups.length?he("",!0):($(),O("div",h_,"(无)")),j[24]||(j[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),O(je,null,et(i.value.takeaways,(S,P)=>($(),O("div",{key:"t"+P,class:"sum-item"},[ht(W(S.text),1),l("span",y_,"("+W(S.date)+")",1)]))),128)),i.value.takeaways.length?he("",!0):($(),O("div",g_,"(无)"))])):he("",!0)])])]))}}),w_=Kt(b_,[["__scopeId","data-v-7a4275e6"]]),__=["aria-label"],k_={class:"dialog-head"},x_={class:"dialog-title"},C_={class:"dialog-body"},$_={class:"form-grid"},S_={class:"field span2"},E_={class:"seg"},T_={class:"field"},A_={class:"field"},P_={class:"field"},O_=["value"],M_={class:"add-cat"},I_=["onKeydown"],j_={key:0,class:"field"},D_={class:"seg"},L_={class:"field span2"},K_={key:0,class:"form-error"},R_={class:"dialog-btns"},F_=jt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=M("expense"),i=M(""),c=M(""),f=M(""),v=M(""),b=M(!1),y=M(!1),_=M(""),E=M(null);function C(T){n.open&&T.key==="Escape"&&r("cancel")}pt(()=>n.open,async T=>{var q;T?(await Y(),o.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,y.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",C),await ur(),(q=E.value)==null||q.focus()):window.removeEventListener("keydown",C)}),Ln(()=>window.removeEventListener("keydown",C)),pt(o,async()=>{await Y(),i.value=I.value[0]||""});const I=M([]);async function Y(){I.value=await Wr(o.value)}const le=M("");async function ue(){const T=le.value.trim();if(T){if(I.value.includes(T)){le.value="";return}I.value.push(T),await Ts(o.value,I.value),i.value=T,le.value=""}}function ce(){return i.value&&I.value.includes(i.value)?i.value:I.value[0]}function G(){const T=String(c.value??"").trim(),q=Number(T);if(!T||!isFinite(q)||q<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Z=o.value==="expense"&&b.value?1:0;r("save",{type:o.value,category:ce(),amount:Math.round(q*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Z,reimbursed:Z&&y.value?1:0})}return(T,q)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),O("div",{key:0,class:"mask",onClick:q[12]||(q[12]=Nt(Z=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",k_,[l("span",x_,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:q[0]||(q[0]=Z=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",C_,[l("div",$_,[l("div",S_,[q[13]||(q[13]=l("label",null,"类型",-1)),l("div",E_,[l("button",{class:Xe(["seg-btn",{active:o.value==="expense"}]),onClick:q[1]||(q[1]=Z=>o.value="expense")},"支出",2),l("button",{class:Xe(["seg-btn",{active:o.value==="income"}]),onClick:q[2]||(q[2]=Z=>o.value="income")},"收入",2)])]),l("div",T_,[q[14]||(q[14]=l("label",null,"金额(元,必填)",-1)),Me(l("input",{ref_key:"amountInput",ref:E,class:Xe(["input",{invalid:_.value}]),"onUpdate:modelValue":q[3]||(q[3]=Z=>c.value=Z),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,c.value]])]),l("div",A_,[q[15]||(q[15]=l("label",null,"日期(必填)",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":q[4]||(q[4]=Z=>f.value=Z)},null,512),[[Re,f.value]])]),l("div",P_,[q[16]||(q[16]=l("label",null,"分类(可直接新增)",-1)),Me(l("select",{class:"select","onUpdate:modelValue":q[5]||(q[5]=Z=>i.value=Z)},[($(!0),O(je,null,et(I.value,Z=>($(),O("option",{key:Z,value:Z},W(Z),9,O_))),128))],512),[[ps,i.value]]),l("div",M_,[Me(l("input",{class:"input add-cat-input","onUpdate:modelValue":q[6]||(q[6]=Z=>le.value=Z),placeholder:"新增分类名",onKeydown:Mt(Nt(ue,["prevent"]),["enter"])},null,40,I_),[[Re,le.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ue},"添加")])]),o.value==="expense"?($(),O("div",j_,[q[17]||(q[17]=l("label",null,"报销状态",-1)),l("div",D_,[l("button",{class:Xe(["seg-btn",{active:!b.value}]),onClick:q[7]||(q[7]=Z=>{b.value=!1,y.value=!1})},"无需报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&!y.value}]),onClick:q[8]||(q[8]=Z=>{b.value=!0,y.value=!1})},"待报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&y.value}]),onClick:q[9]||(q[9]=Z=>{b.value=!0,y.value=!0})},"已报销",2)])])):he("",!0),l("div",L_,[q[18]||(q[18]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":q[10]||(q[10]=Z=>v.value=Z),placeholder:"选填"},null,512),[[Re,v.value]])])]),_.value?($(),O("div",K_,W(_.value),1)):he("",!0)]),l("div",R_,[l("button",{class:"btn btn-sm",onClick:q[11]||(q[11]=Z=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:G},"保存")])],8,__)])):he("",!0)]),_:1})]))}}),N_=Kt(F_,[["__scopeId","data-v-1b57c1af"]]),V_={class:"ledger-page"},B_={class:"ledger-toolbar"},U_={class:"month-title num"},q_={class:"cards"},H_={class:"card stat-card"},z_={class:"stat-num num amt-income"},W_={class:"card stat-card"},G_={class:"stat-num num"},Y_={class:"card stat-card"},J_={class:"card stat-card"},X_={class:"stat-num num amt-warn"},Q_={key:0,class:"card sec"},Z_={class:"bar-label"},e1={class:"bar-track"},t1={class:"muted num bar-num"},n1={key:1,class:"card section"},s1={class:"form-error"},r1={class:"card table-card"},o1={class:"tx-table"},a1={class:"num","data-label":"日期"},i1={"data-label":"分类"},l1={class:"tag"},u1={class:"td-note","data-label":"备注"},c1={"data-label":"报销"},d1={key:0,class:"muted"},f1={key:1,class:"tx-done"},p1={key:2,class:"tx-pending"},v1={class:"ops-cell"},m1={class:"ops"},h1=["onClick"],y1=["onClick"],g1=["onClick"],b1={key:0},w1={class:"muted table-note num"},_1=jt({__name:"LedgerView",setup(e){const t=M(ot()),n=M([]),r=M(!0),o=M("");ot();const i=M(""),c=M(""),f=M(!1),v=M(null),b=M({type:"expense",category:"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0}),y=M(null),_=st(()=>t.value.slice(0,7)+"-01"),E=st(()=>{const de=Number(t.value.slice(0,4)),ke=Number(t.value.slice(5,7))-1,Ee=new Date(de,ke+1,0).getDate();return t.value.slice(0,7)+"-"+(Ee<10?"0"+Ee:String(Ee))}),C=st(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function I(){r.value=!0;try{n.value=await Rh(_.value,E.value),c.value=""}catch(de){c.value="账目加载失败:"+(de instanceof Error?de.stack||de.message:String(de)),Fe("账目加载失败")}r.value=!1}ln(I),pt(t,I);const Y=M([]),le=M([]);async function ue(){Y.value=await Wr("expense"),le.value=await Wr("income")}ue();const ce=st(()=>n.value.slice().sort((de,ke)=>de.date===ke.date?ke.id-de.id:de.date{let de=0,ke=0,Ee=0;for(const De of n.value)De.type==="income"?de+=De.amount:(ke+=De.amount,De.reimbursable===1&&De.reimbursed!==1&&(Ee+=De.amount));return{income:de,expense:ke,pending:Ee,balance:de-ke}}),T=M("all"),q=M("all"),Z=st(()=>ce.value.filter(de=>!(T.value!=="all"&&de.type!==T.value||q.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||q.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),N=st(()=>{const de=new Map;let ke=0;for(const De of n.value)De.type==="expense"&&(de.set(De.category,(de.get(De.category)||0)+De.amount),ke+=De.amount);const Ee=ke||1;return Array.from(de.entries()).map(De=>({name:De[0],amount:De[1],percent:Math.round(De[1]/Ee*100)})).sort((De,$e)=>$e.amount-De.amount)});function se(de){return(de/100).toFixed(2)}function j(de){return(de.type==="income"?"+":"-")+se(de.amount)}function S(){t.value=na(t.value,-1)}function P(){t.value=na(t.value,1)}function te(){t.value=ot()}pt(o,()=>{i.value&&(i.value="")});async function Pe(de){await Bh(de.id),await I(),Fe("已标记为已报销")}function Se(de){v.value=de.id,b.value={type:de.type,category:de.category,amountYuan:se(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:Y.value[0]||"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function Ae(de){if(v.value){await Nh(v.value,de),f.value=!1,await I(),Fe("账目已更新");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 I(),Fe("已记一笔")}async function Ue(){y.value&&y.value.id&&await Vh(y.value.id),y.value=null,await I(),Fe("账目已删除")}return(de,ke)=>($(),O("div",V_,[l("div",B_,[l("button",{class:"icon-btn",onClick:S},[we(qe,{name:"chevron-left",size:16})]),l("span",U_,W(C.value),1),l("button",{class:"icon-btn",onClick:P},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:te},"回到本月"),ke[7]||(ke[7]=l("span",{class:"flex1"},null,-1)),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[0]||(ke[0]=Ee=>T.value=Ee)},[...ke[4]||(ke[4]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[ps,T.value]]),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[1]||(ke[1]=Ee=>q.value=Ee)},[...ke[5]||(ke[5]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[ps,q.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ye},[we(qe,{name:"plus",size:14}),ke[6]||(ke[6]=ht(" 记一笔",-1))])]),l("div",q_,[l("div",H_,[ke[8]||(ke[8]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",z_,W(se(G.value.income)),1)]),l("div",W_,[ke[9]||(ke[9]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",G_,W(se(G.value.expense)),1)]),l("div",Y_,[ke[10]||(ke[10]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Xe(["stat-num num",{"amt-income":G.value.balance>=0,"amt-expense":G.value.balance<0}])},W(se(G.value.balance)),3)]),l("div",J_,[ke[11]||(ke[11]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",X_,W(se(G.value.pending)),1)])]),N.value.length?($(),O("div",Q_,[ke[12]||(ke[12]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),O(je,null,et(N.value,Ee=>($(),O("div",{key:Ee.name,class:"bar-row"},[l("span",Z_,W(Ee.name),1),l("span",e1,[l("span",{class:"bar-fill",style:qn({width:Ee.percent+"%"})},null,4)]),l("span",t1,W(se(Ee.amount))+" 元 · "+W(Ee.percent)+"%",1)]))),128))])):he("",!0),c.value?($(),O("div",n1,[l("div",s1,W(c.value),1),ke[13]||(ke[13]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):he("",!0),l("div",r1,[l("table",o1,[ke[15]||(ke[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),O(je,null,et(Z.value,Ee=>($(),O("tr",{key:Ee.id},[l("td",a1,W(Ee.date),1),l("td",i1,[l("span",l1,W(Ee.category),1)]),l("td",{class:Xe(["num",Ee.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},W(j(Ee)),3),l("td",u1,W(Ee.note||"--"),1),l("td",c1,[Ee.type!=="expense"||Ee.reimbursable!==1?($(),O("span",d1,"--")):Ee.reimbursed===1?($(),O("span",f1,"已报销")):($(),O("span",p1,"待报销"))]),l("td",v1,[l("div",m1,[Ee.type==="expense"&&Ee.reimbursable===1&&Ee.reimbursed!==1?($(),O("button",{key:0,class:"btn btn-xs",onClick:De=>Pe(Ee)},"标记已报销",8,h1)):he("",!0),l("button",{class:"btn btn-xs",onClick:De=>Se(Ee)},"编辑",8,y1),l("button",{class:"btn btn-xs",onClick:De=>y.value=Ee},"删除",8,g1)])])]))),128)),!Z.value.length&&!r.value?($(),O("tr",b1,[...ke[14]||(ke[14]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):he("",!0)])])]),l("div",w1,"本月 "+W(n.value.length)+" 条 · 当前筛选 "+W(Z.value.length)+" 条",1),we(N_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:ke[2]||(ke[2]=Ee=>f.value=!1),onSave:Ae},null,8,["open","title","initial"]),we(Dn,{open:!!y.value,title:"删除确认",message:y.value?"将删除 "+y.value.date+" 的账目("+y.value.category+" "+se(y.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ke[3]||(ke[3]=Ee=>y.value=null),onConfirm:Ue},null,8,["open","message"])]))}}),k1=Kt(_1,[["__scopeId","data-v-da2504e7"]]),x1={class:"memo-page"},C1={class:"card memo-list"},$1={class:"pane-head"},S1={class:"pane-title"},E1={class:"memo-scroll"},T1=["onClick"],A1={class:"memo-item-title"},P1={class:"muted memo-item-sub"},O1={class:"muted num memo-item-time"},M1={key:0,class:"muted empty"},I1={class:"card memo-editor"},j1={class:"editor-foot"},D1={class:"muted foot-info"},L1=["disabled"],K1=["disabled"],R1={key:1,class:"empty muted editor-empty"},F1=jt({__name:"MemoView",setup(e){const t=M([]),n=M(null),r=M(!1),o=M(""),i=M(""),c=M(null),f=M(null);async function v(){if(t.value=await Mh(),n.value&&n.value.id){const Z=t.value.find(N=>N.id===n.value.id);Z&&(n.value=Z)}}ln(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Ln(()=>window.removeEventListener("keydown",b)),pt(Bi,async Z=>{if(!Z)return;t.value.length||await v();const N=t.value.find(se=>se.id===Z);Bi.value=null,N&&E(N)},{immediate:!0});function b(Z){(Z.ctrlKey||Z.metaKey)&&Z.key.toLowerCase()==="s"&&r.value&&y.value&&(Z.preventDefault(),le())}const y=st(()=>{if(!r.value)return!1;const Z=n.value?n.value.title:"",N=n.value?n.value.content:"";return o.value!==Z||i.value!==N});function _(Z){n.value=Z,r.value=!0,o.value=Z.title,i.value=Z.content}function E(Z){if(!(r.value&&n.value&&n.value.id===Z.id)){if(y.value){f.value={type:"select",memo:Z};return}_(Z)}}function C(){if(y.value){f.value={type:"new"};return}I()}function I(){n.value=null,r.value=!0,o.value="",i.value=""}function Y(){n.value?_(n.value):I()}async function le(){if(!o.value.trim()&&!i.value.trim()){Fe("标题与内容不能都为空");return}if(n.value&&n.value.id)await jh(n.value.id,o.value,i.value),Fe("备忘已保存");else{const Z=await Ih(o.value,i.value);n.value=Z,o.value=Z.title,i.value=Z.content,Fe("备忘已创建")}await v()}function ue(){n.value&&n.value.id&&(c.value=n.value)}async function ce(){c.value&&c.value.id&&(await Dh(c.value.id),Fe("备忘已删除")),c.value=null,await v(),I()}function G(){const Z=f.value;f.value=null,Z&&(Z.type==="select"?_(Z.memo):I())}function T(Z){return(Z.content||"").replace(/\s+/g," ").slice(0,30)}function q(Z){return Z.replace("T"," ").slice(0,16)}return(Z,N)=>($(),O("div",x1,[l("aside",C1,[l("div",$1,[l("span",S1,"备忘录("+W(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),l("div",E1,[($(!0),O(je,null,et(t.value,se=>($(),O("div",{key:se.id,class:Xe(["memo-item",{active:r.value&&n.value&&n.value.id===se.id}]),onClick:j=>E(se)},[l("div",A1,W(se.title||"无标题"),1),l("div",P1,W(T(se)||"空"),1),l("div",O1,W(q(se.updated_at)),1)],10,T1))),128)),t.value.length?he("",!0):($(),O("div",M1,"暂无备忘"))])]),l("section",I1,[r.value?($(),O(je,{key:0},[Me(l("input",{class:"input title-input","onUpdate:modelValue":N[0]||(N[0]=se=>o.value=se),placeholder:"标题"},null,512),[[Re,o.value]]),Me(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":N[1]||(N[1]=se=>i.value=se),placeholder:"内容"},null,512),[[Re,i.value]]),l("div",j1,[l("span",D1,[y.value?($(),O(je,{key:0},[ht("有未保存修改")],64)):n.value&&n.value.id?($(),O(je,{key:1},[ht("更新于 "+W(q(n.value.updated_at)),1)],64)):($(),O(je,{key:2},[ht("新备忘")],64))]),N[4]||(N[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),O("button",{key:0,class:"btn btn-sm",onClick:ue},"删除")):he("",!0),l("button",{class:"btn btn-sm",disabled:!y.value,onClick:Y},"放弃修改",8,L1),l("button",{class:"btn btn-primary btn-sm",disabled:!y.value,onClick:le},"保存",8,K1)])],64)):($(),O("div",R1,"选择左侧备忘,或点击右上角新建"))]),we(Dn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:N[2]||(N[2]=se=>c.value=null),onConfirm:ce},null,8,["open","message"]),we(Dn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:N[3]||(N[3]=se=>f.value=null),onConfirm:G},null,8,["open"])]))}}),N1=Kt(F1,[["__scopeId","data-v-a0931fc7"]]),V1=["aria-label"],B1={class:"dialog-head"},U1={class:"dialog-title"},q1={class:"dialog-body"},H1={class:"form-grid"},z1={class:"field span2"},W1={class:"field span2"},G1={class:"field span2"},Y1={class:"pwd-row"},J1={class:"field span2"},X1={key:0,class:"form-error"},Q1={class:"dialog-btns"},Z1=jt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M(null);function y(C){n.open&&C.key==="Escape"&&r("cancel")}pt(()=>n.open,async C=>{var I;C?(o.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",y),await ur(),(I=b.value)==null||I.focus()):window.removeEventListener("keydown",y)}),Ln(()=>window.removeEventListener("keydown",y));function _(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",I="!@#$%^&*",Y=crypto.getRandomValues(new Uint8Array(14));let le="";for(let ue=0;ue($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),O("div",{key:0,class:"mask",onClick:I[6]||(I[6]=Nt(Y=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",B1,[l("span",U1,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:I[0]||(I[0]=Y=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",q1,[l("div",H1,[l("div",z1,[I[7]||(I[7]=l("label",null,"系统名称(必填)",-1)),Me(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":I[1]||(I[1]=Y=>o.value=Y),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),l("div",W1,[I[8]||(I[8]=l("label",null,"账号(必填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":I[2]||(I[2]=Y=>i.value=Y),placeholder:"用户名、工号或邮箱"},null,512),[[Re,i.value]])]),l("div",G1,[I[9]||(I[9]=l("label",null,"密码(必填)",-1)),l("div",Y1,[Me(l("input",{class:"input","onUpdate:modelValue":I[3]||(I[3]=Y=>c.value=Y),placeholder:"输入或点击生成"},null,512),[[Re,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",J1,[I[10]||(I[10]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=Y=>f.value=Y),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),v.value?($(),O("div",X1,W(v.value),1)):he("",!0)]),l("div",Q1,[l("button",{class:"btn btn-sm",onClick:I[5]||(I[5]=Y=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:E},"保存")])],8,V1)])):he("",!0)]),_:1})]))}}),e0=Kt(Z1,[["__scopeId","data-v-2eafe20e"]]),t0={class:"vault-page"},n0={key:0,class:"empty muted"},s0={key:1,class:"card lock-card"},r0={class:"lock-badge"},o0={key:0,class:"form-error"},a0=["disabled"],i0={key:0,class:"form-error"},l0=["disabled"],u0={class:"vault-toolbar"},c0={class:"search-wrap"},d0={class:"card table-card"},f0={class:"cred-table"},p0={class:"td-system"},v0=["onClick"],m0={class:"pwd-cell"},h0={class:"num pwd-text"},y0=["onClick"],g0=["onClick"],b0={class:"td-remark"},w0={class:"td-ops"},_0={class:"ops"},k0=["onClick"],x0=["onClick"],C0={key:0},$0={class:"muted table-note num"},S0={class:"dialog pwd-dialog"},E0={class:"dialog-head"},T0={class:"dialog-body"},A0={class:"vp-field"},P0={class:"vp-field"},O0={class:"vp-field"},M0={key:0,class:"form-error"},I0={class:"dialog-btns"},j0=5*60*1e3,D0=jt({__name:"VaultView",setup(e){const t=M(null),n=M(fm()),r=M(!1),o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M([]),y=M(""),_=M({}),E=M(!1),C=M(null),I=M({system:"",account:"",password:"",remark:""}),Y=M(null),le=M(!1),ue=M(""),ce=M(""),G=M(""),T=M("");async function q(){b.value=await ym(),_.value={}}let Z=null;function N(){Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Fe("长时间未操作,密码库已自动锁定"))},j0)}function se(){n.value&&N()}ln(async()=>{t.value=await fd(),window.addEventListener("click",se),window.addEventListener("keydown",se),n.value&&N()}),Ln(()=>{window.removeEventListener("click",se),window.removeEventListener("keydown",se),Z!==null&&window.clearTimeout(Z)});const j=st(()=>{const $e=y.value.trim().toLowerCase();return $e?b.value.filter(fe=>(fe.system+" "+fe.account+" "+(fe.remark||"")).toLowerCase().includes($e)):b.value});async function S(){if(!r.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==i.value){c.value="两次输入的主密码不一致";return}r.value=!0;try{await pm(o.value),o.value="",i.value="",n.value=!0,N(),await q(),Fe("主密码已设置,密码库已解锁")}catch($e){c.value=$e instanceof Error?$e.message:"设置失败"}r.value=!1}}async function P(){if(!r.value){if(v.value="",!f.value){v.value="请输入主密码";return}r.value=!0;try{await vm(f.value),f.value="",n.value=!0,N(),await q()}catch($e){v.value=$e instanceof Error?$e.message:"解锁失败"}r.value=!1}}function te(){oa(),n.value=!1,b.value=[],_.value={},Z!==null&&window.clearTimeout(Z),Fe("密码库已锁定")}async function Pe($e){const fe=$e.id;if(_.value[fe]){_.value[fe]=!1;return}try{$e.passwordPlain=await gi(fe),_.value[fe]=!0}catch(Ie){Fe(Ie instanceof Error?Ie.message:"解密失败")}}async function Se($e){try{const fe=await gi($e.id);await Gi(fe),Fe("密码已复制")}catch(fe){Fe(fe instanceof Error?fe.message:"复制失败")}}async function ye($e){await Gi($e.account),Fe("账号已复制")}function Ae(){C.value=null,I.value={system:"",account:"",password:"",remark:""},E.value=!0}async function Ue($e){try{const fe=await gi($e.id);C.value=$e.id,I.value={system:$e.system,account:$e.account,password:fe,remark:$e.remark||""},E.value=!0}catch(fe){Fe(fe instanceof Error?fe.message:"解密失败")}}async function de($e){const fe=C.value??void 0;await gm($e,fe),E.value=!1,await q(),Fe(fe?"账号已更新":"账号已添加")}async function ke(){Y.value&&Y.value.id&&(await bm(Y.value.id),Fe("账号已删除")),Y.value=null,await q()}function Ee(){ue.value="",ce.value="",G.value="",T.value="",le.value=!0}async function De(){T.value="";try{const $e=await wm(ue.value,ce.value);le.value=!1,ue.value="",ce.value="",G.value="",Fe("主密码已修改,"+$e+" 条账号密码已重新加密")}catch($e){T.value=$e instanceof Error?$e.message:"修改失败"}}return($e,fe)=>($(),O("div",t0,[t.value===null?($(),O("div",n0,"加载中")):n.value?($(),O(je,{key:2},[l("div",u0,[l("div",c0,[we(qe,{name:"search",size:14,class:"search-icon"}),Me(l("input",{class:"input","onUpdate:modelValue":fe[3]||(fe[3]=Ie=>y.value=Ie),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,y.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:te},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Ae},"新增账号")]),l("div",d0,[l("table",f0,[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),O(je,null,et(j.value,Ie=>($(),O("tr",{key:Ie.id},[l("td",p0,W(Ie.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ct=>ye(Ie)},W(Ie.account),9,v0)]),l("td",null,[l("div",m0,[l("span",h0,W(_.value[Ie.id]?Ie.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ct=>Pe(Ie)},W(_.value[Ie.id]?"隐藏":"显示"),9,y0),l("button",{class:"btn btn-xs",onClick:ct=>Se(Ie)},"复制",8,g0)])]),l("td",b0,W(Ie.remark||"--"),1),l("td",w0,[l("div",_0,[l("button",{class:"btn btn-xs",onClick:ct=>Ue(Ie)},"编辑",8,k0),l("button",{class:"btn btn-xs",onClick:ct=>Y.value=Ie},"删除",8,x0)])])]))),128)),j.value.length?he("",!0):($(),O("tr",C0,[...fe[17]||(fe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",$0,"共 "+W(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),O("div",s0,[l("div",r0,[we(qe,{name:"lock",size:26})]),t.value===!1?($(),O(je,{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]=Ie=>o.value=Ie),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(S,["enter"])},null,544),[[Re,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[1]||(fe[1]=Ie=>i.value=Ie),placeholder:"再次输入主密码",onKeydown:Mt(S,["enter"])},null,544),[[Re,i.value]]),c.value?($(),O("div",o0,W(c.value),1)):he("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:S},"完成设置并解锁",8,a0)],64)):($(),O(je,{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]=Ie=>f.value=Ie),placeholder:"主密码",onKeydown:Mt(P,["enter"])},null,544),[[Re,f.value]]),v.value?($(),O("div",i0,W(v.value),1)):he("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:P},"解锁",8,l0)],64))])),we(e0,{open:E.value,title:C.value?"编辑账号":"新增账号",initial:I.value,onCancel:fe[4]||(fe[4]=Ie=>E.value=!1),onSave:de},null,8,["open","title","initial"]),we(Dn,{open:!!Y.value,title:"删除确认",message:Y.value?"将删除系统「"+Y.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[5]||(fe[5]=Ie=>Y.value=null),onConfirm:ke},null,8,["open","message"]),($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[le.value?($(),O("div",{key:0,class:"mask",onClick:fe[11]||(fe[11]=Nt(Ie=>le.value=!1,["self"]))},[l("div",S0,[l("div",E0,[fe[19]||(fe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:fe[6]||(fe[6]=Ie=>le.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",T0,[l("div",A0,[fe[20]||(fe[20]=l("label",null,"旧主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[7]||(fe[7]=Ie=>ue.value=Ie)},null,512),[[Re,ue.value]])]),l("div",P0,[fe[21]||(fe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[8]||(fe[8]=Ie=>ce.value=Ie)},null,512),[[Re,ce.value]])]),l("div",O0,[fe[22]||(fe[22]=l("label",null,"确认新主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[9]||(fe[9]=Ie=>G.value=Ie)},null,512),[[Re,G.value]])]),T.value?($(),O("div",M0,W(T.value),1)):he("",!0),fe[23]||(fe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",I0,[l("button",{class:"btn btn-sm",onClick:fe[10]||(fe[10]=Ie=>le.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):he("",!0)]),_:1})]))]))}}),L0=Kt(D0,[["__scopeId","data-v-a96af9e5"]]);function K0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function qu(e,t){const r="\uFEFF"+t.map(f=>f.map(K0).join(",")).join(`\r -`);if(lr.isNativePlatform()){const{downloadText:f}=await Id(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Vg);return{downloadText:v}},void 0,import.meta.url);return f(e,r)}const o=new Blob([r],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(o),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const R0={class:"settings"},F0={class:"card section"},N0={class:"muted acc-line"},V0={class:"ai-grid"},B0={class:"rule-item"},U0={class:"rule-item"},q0={class:"rule-item"},H0={key:0,class:"form-error"},z0={class:"rule-save"},W0={class:"card section"},G0={class:"rule-grid"},Y0={class:"rule-item"},J0={class:"rule-item"},X0={class:"rule-item"},Q0={class:"rule-item"},Z0={class:"rule-item"},ek={class:"card section"},tk={class:"proj-add"},nk={key:0,class:"muted proj-tip"},sk=["onKeydown"],rk=["onClick"],ok=["onClick"],ak=["onClick"],ik={key:1,class:"muted"},lk={class:"card section"},uk={class:"card section"},ck={class:"muted acc-line"},dk={class:"rule-save"},fk=["disabled"],pk={key:0,class:"muted acc-line"},vk={key:1,class:"form-error"},mk={key:2,class:"form-error"},hk={class:"card section"},yk={class:"ai-grid"},gk={class:"rule-item"},bk={class:"rule-item"},wk={class:"rule-item"},_k={class:"card section"},kk={class:"cat-block"},xk={class:"cat-head"},Ck={class:"cat-chips"},$k=["onClick"],Sk=["onClick"],Ek={class:"cat-block"},Tk={class:"cat-head"},Ak={class:"cat-chips"},Pk=["onClick"],Ok=["onClick"],Mk={class:"cat-block"},Ik={class:"cat-head"},jk={class:"cat-chips"},Dk=["onClick"],Lk=["onClick"],Kk={class:"card section"},Rk={class:"backup-row"},Fk={key:0,class:"import-error"},Nk=jt({__name:"SettingsView",setup(e){var z;const t=M({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=M([]),r=M(""),o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M(null),y=M(""),_=M([]),E=M([]),C=M([]);async function I(){_.value=await Zr(),E.value=await Wr("expense"),C.value=await Wr("income")}async function Y(ee){const A=window.prompt("新分类名称");if(!A||!A.trim())return;const X=ee==="log"?_.value:ee==="expense"?E.value:C.value,ne=A.trim();if(X.includes(ne)){Fe("分类已存在");return}const Ce=[...X,ne];ee==="log"?(_.value=Ce,await wi(Ce)):ee==="expense"?(E.value=Ce,await Ts("expense",Ce)):(C.value=Ce,await Ts("income",Ce)),Fe("分类已添加")}async function le(ee,A,X){const ne=window.prompt("修改分类名称",X);if(!ne||!ne.trim()||ne.trim()===X)return;const be=(ee==="log"?_.value:ee==="expense"?E.value:C.value).map((Le,Te)=>Te===A?ne.trim():Le);ee==="log"?(_.value=be,await wi(be)):ee==="expense"?(E.value=be,await Ts("expense",be)):(C.value=be,await Ts("income",be)),Fe("分类已更新(历史记录自动跟随显示)")}async function ue(ee,A){const X=ee==="log"?_.value:ee==="expense"?E.value:C.value;if(X.length<=1){Fe("至少保留一个分类");return}if(!window.confirm("删除分类「"+X[A]+"」?历史记录不受影响。"))return;const ne=X.filter((Ce,be)=>be!==A);ee==="log"?(_.value=ne,await wi(ne)):ee==="expense"?(E.value=ne,await Ts("expense",ne)):(C.value=ne,await Ts("income",ne)),Fe("分类已删除")}const ce=M(null),G=M(null),T=M(""),q=M(((z=zr())==null?void 0:z.username)||""),Z=M(""),N=M(""),se=M(""),j=M(""),S=M(!1),P="0.6.6",te=M(""),Pe=M(""),Se=M(""),ye=M(""),Ae=M(!1),Ue=M("");async function de(){var ee;te.value=((ee=pn())==null?void 0:ee.username)||"",Ue.value=await Bm(),ye.value=er.value}pt(er,ee=>{ye.value=ee});async function ke(){Se.value="";try{await wd(),Fe("云端绑定已重建")}catch(ee){Se.value=ee instanceof Error?ee.message:"绑定失败"}}async function Ee(){if(!Ae.value){Se.value="",ye.value=er.value,Ae.value=!0;try{const ee=await Ui();Ue.value=ee.at,Pe.value="推送 "+ee.pushed+" 条 · 拉取 "+ee.pulled+" 条 · 删除 "+ee.removed+" 条",ye.value="",Fe("同步完成")}catch(ee){Se.value=ee instanceof Error?ee.message:"同步失败"}Ae.value=!1}}async function De(){if(j.value="",N.value!==se.value){j.value="两次输入的新密码不一致";return}try{await Dm(Z.value,N.value),Z.value="",N.value="",se.value="",Fe("登录密码已修改")}catch(ee){j.value=ee instanceof Error?ee.message:"修改失败"}}async function $e(){await Lm(),window.location.reload()}async function fe(){t.value=await vs(),n.value=await ar(!0),i.value=(await yl()).join(` -`),c.value=await Ct("ai_base_url",""),f.value=await Ct("ai_api_key",""),v.value=await Ct("ai_model",""),await de(),await I()}async function Ie(){await It("ai_base_url",c.value.trim()),await It("ai_api_key",f.value.trim()),await It("ai_model",v.value.trim()),Fe("AI 配置已保存")}async function ct(){const ee=ot(),A=await Promise.all([Qr("2000-01-01",ee),ar(!0)]),X=A[0],ne=A[1],Ce=new Map(ne.map(Te=>[Te.id,Te.name])),be=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Te of X)be.push([Te.date,qr(Te.category),Te.project_id&&Ce.get(Te.project_id)||"",Te.content,Te.minutes==null?"":Te.minutes,Te.is_milestone?"是":"",Te.needs_followup?"是":"",Te.takeaway||"",Te.remark||""]);const Le=await qu("工作记录_"+ee.replace(/-/g,"")+".csv",be);Fe(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}async function bt(){const ee=ot(),A=await Promise.all([vs(),Xr("2000-01-01",ee)]),X=A[0],ne=A[1],Ce=["周日","周一","周二","周三","周四","周五","周六"],be=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Te of ne){const Qe=dr(Te,Te.date,X,Te.date===ee);be.push([Te.date,Ce[Fs(Te.date).getDay()],Qe.label,Te.clock_in_at?wn(Te.clock_in_at):"",Te.clock_out_at?wn(Te.clock_out_at):"",Te.location||"",Te.kind==="makeup"?"补卡":Te.kind==="leave"?"休假":"正常",Te.note||""])}const Le=await qu("考勤记录_"+ee.replace(/-/g,"")+".csv",be);Fe(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}ln(fe);async function _t(){await It("work_start",t.value.work_start),await It("work_end",t.value.work_end),await It("grace_minutes",String(t.value.grace_minutes)),await It("lunch_minutes",String(t.value.lunch_minutes)),await It("remind_weekly",t.value.remind_weekly),Fe("打卡规则已保存")}async function Bt(){await Sd(i.value.split(` -`)),Fe("常用地点已保存")}async function vt(){const ee=r.value.trim();if(ee){try{await sh(ee),o.value="",r.value=""}catch{o.value="项目名已存在"}await fe()}}function Ne(ee){b.value=ee.id,y.value=ee.name}async function g(ee){const A=y.value.trim();if(A)try{await rh(ee.id,A),o.value=""}catch{o.value="项目名已存在"}b.value=null,await fe()}async function m(ee){await oh(ee.id,ee.archived!==1),await fe()}async function x(){try{const ee=await Uh(),A=await Ea("实习日志备份_"+ot().replace(/-/g,"")+".json",ee);Fe(A?"备份已导出到:"+A:"备份已导出到系统下载目录")}catch(ee){Fe("导出失败:"+(ee instanceof Error?ee.message:String(ee)))}}function D(ee){const A=ee.target,X=A.files&&A.files[0];if(T.value="",!X)return;const ne=X.name;X.text().then(Ce=>{G.value={name:ne,text:Ce}}),A.value=""}async function ae(){if(G.value)try{await qh(G.value.text),G.value=null,T.value="",await fe(),Fe("数据导入完成")}catch(ee){G.value=null,T.value=ee instanceof Error?ee.message:"导入失败"}}return(ee,A)=>($(),O("div",R0,[l("div",F0,[A[25]||(A[25]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",N0,"v"+W(on(P))+" · 当前账号 "+W(q.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",V0,[l("div",B0,[A[22]||(A[22]=l("label",null,"旧登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[0]||(A[0]=X=>Z.value=X)},null,512),[[Re,Z.value]])]),l("div",U0,[A[23]||(A[23]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[1]||(A[1]=X=>N.value=X)},null,512),[[Re,N.value]])]),l("div",q0,[A[24]||(A[24]=l("label",null,"确认新登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[2]||(A[2]=X=>se.value=X)},null,512),[[Re,se.value]])])]),j.value?($(),O("div",H0,W(j.value),1)):he("",!0),l("div",z0,[l("button",{class:"btn btn-primary btn-sm",onClick:De},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:A[3]||(A[3]=X=>S.value=!0)},"删除此用户及全部数据")])]),l("div",W0,[A[32]||(A[32]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",G0,[l("div",Y0,[A[26]||(A[26]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":A[4]||(A[4]=X=>t.value.work_start=X)},null,512),[[Re,t.value.work_start]])]),l("div",J0,[A[27]||(A[27]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":A[5]||(A[5]=X=>t.value.work_end=X)},null,512),[[Re,t.value.work_end]])]),l("div",X0,[A[28]||(A[28]=l("label",null,"迟到宽限(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[6]||(A[6]=X=>t.value.grace_minutes=X)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",Q0,[A[29]||(A[29]=l("label",null,"午休扣除(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[7]||(A[7]=X=>t.value.lunch_minutes=X)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",Z0,[A[31]||(A[31]=l("label",null,"周记提醒",-1)),Me(l("select",{class:"select","onUpdate:modelValue":A[8]||(A[8]=X=>t.value.remind_weekly=X)},[...A[30]||(A[30]=[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:_t},"保存规则")])]),l("div",ek,[A[33]||(A[33]=l("div",{class:"section-title"},"项目管理",-1)),l("div",tk,[Me(l("input",{class:"input","onUpdate:modelValue":A[9]||(A[9]=X=>r.value=X),placeholder:"新项目名称",onKeydown:Mt(vt,["enter"])},null,544),[[Re,r.value]]),l("button",{class:"btn btn-sm",onClick:vt},"添加")]),o.value?($(),O("div",nk,W(o.value),1)):he("",!0),($(!0),O(je,null,et(n.value,X=>($(),O("div",{key:X.id,class:"proj-row"},[b.value===X.id?($(),O(je,{key:0},[Me(l("input",{class:"input","onUpdate:modelValue":A[10]||(A[10]=ne=>y.value=ne),onKeydown:Mt(ne=>g(X),["enter"])},null,40,sk),[[Re,y.value]]),l("button",{class:"btn btn-sm",onClick:ne=>g(X)},"保存",8,rk),l("button",{class:"btn btn-sm",onClick:A[11]||(A[11]=ne=>b.value=null)},"取消")],64)):($(),O(je,{key:1},[l("span",{class:Xe(["proj-name",{archived:X.archived===1}])},W(X.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:ne=>Ne(X)},[we(qe,{name:"edit",size:14})],8,ok),l("button",{class:"btn btn-sm",onClick:ne=>m(X)},W(X.archived===1?"恢复":"归档"),9,ak)],64))]))),128)),n.value.length?he("",!0):($(),O("div",ik,"暂无项目,先添加一个"))]),l("div",lk,[A[35]||(A[35]=l("div",{class:"section-title"},"常用地点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":A[12]||(A[12]=X=>i.value=X),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Bt},"保存地点"),A[34]||(A[34]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",uk,[A[36]||(A[36]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",ck,"云端账号:"+W(te.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",dk,[l("button",{class:"btn btn-primary btn-sm",disabled:Ae.value,onClick:Ee},W(Ae.value?"同步中":"立即同步"),9,fk),l("button",{class:"btn btn-sm",onClick:ke},"重新校验连接")]),Pe.value?($(),O("div",pk,"上次同步:"+W(Ue.value||"--")+" · "+W(Pe.value),1)):he("",!0),Se.value?($(),O("div",vk,W(Se.value),1)):he("",!0),ye.value?($(),O("div",mk,"最近自动同步失败:"+W(ye.value)+"(可点「立即同步」重试)",1)):he("",!0)]),l("div",hk,[A[41]||(A[41]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",yk,[l("div",gk,[A[37]||(A[37]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[13]||(A[13]=X=>c.value=X),placeholder:"https://api.example.com/v1"},null,512),[[Re,c.value]])]),l("div",bk,[A[38]||(A[38]=l("label",null,"API Key",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[14]||(A[14]=X=>f.value=X),placeholder:"sk-..."},null,512),[[Re,f.value]])]),l("div",wk,[A[39]||(A[39]=l("label",null,"模型名称",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[15]||(A[15]=X=>v.value=X),placeholder:"如:deepseek-chat"},null,512),[[Re,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Ie},"保存 AI 配置"),A[40]||(A[40]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",_k,[A[45]||(A[45]=l("div",{class:"section-title"},"工作分类",-1)),l("div",kk,[l("div",xk,[A[42]||(A[42]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:A[16]||(A[16]=X=>Y("log"))},"添加")]),l("div",Ck,[($(!0),O(je,null,et(_.value,(X,ne)=>($(),O("span",{key:X+ne,class:"cat-chip"},[ht(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("log",ne,X)},"改",8,$k),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("log",ne)},"删",8,Sk)]))),128))])]),l("div",Ek,[l("div",Tk,[A[43]||(A[43]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:A[17]||(A[17]=X=>Y("expense"))},"添加")]),l("div",Ak,[($(!0),O(je,null,et(E.value,(X,ne)=>($(),O("span",{key:X+ne,class:"cat-chip"},[ht(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("expense",ne,X)},"改",8,Pk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("expense",ne)},"删",8,Ok)]))),128))])]),l("div",Mk,[l("div",Ik,[A[44]||(A[44]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:A[18]||(A[18]=X=>Y("income"))},"添加")]),l("div",jk,[($(!0),O(je,null,et(C.value,(X,ne)=>($(),O("span",{key:X+ne,class:"cat-chip"},[ht(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("income",ne,X)},"改",8,Dk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("income",ne)},"删",8,Lk)]))),128))])])]),l("div",Kk,[A[46]||(A[46]=l("div",{class:"section-title"},"数据备份",-1)),l("div",Rk,[l("button",{class:"btn btn-sm",onClick:x},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:A[19]||(A[19]=X=>{var ne;return(ne=ce.value)==null?void 0:ne.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:ct},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:bt},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:ce,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:D},null,544)]),T.value?($(),O("div",Fk,W(T.value),1)):he("",!0),A[47]||(A[47]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),we(Dn,{open:!!G.value,title:"导入确认",message:G.value?"将从文件「"+G.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:A[20]||(A[20]=X=>G.value=null),onConfirm:ae},null,8,["open","message"]),we(Dn,{open:S.value,title:"删除用户确认",message:"将永久删除云端账号「"+q.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:A[21]||(A[21]=X=>S.value=!1),onConfirm:$e},null,8,["open","message"])]))}}),Vk=Kt(Nk,[["__scopeId","data-v-aad752b5"]]),Bk={class:"tp-main"},Uk={class:"tp-title"},qk={class:"tp-meta"},Hk={class:"tp-time num"},zk=jt({__name:"TimerPanel",setup(e){const t=M(null),n=M(Date.now());let r=null,o=null;async function i(){try{t.value=await bh()}catch{}}const c=st(()=>{const y=t.value;if(!y||!y.timer_started_at)return 0;const _=(y.actual_minutes||0)*60,E=Math.max(0,Math.floor((n.value-new Date(y.timer_started_at).getTime())/1e3));return _+E}),f=st(()=>{const y=c.value,_=Math.floor(y/3600),E=Math.floor(y%3600/60),C=y%60,I=Y=>String(Y).padStart(2,"0");return _>0?_+":"+I(E)+":"+I(C):E+":"+I(C)});async function v(){const y=t.value;y&&(await Sa(y.id),Fe("已停止计时:"+y.title),await i())}function b(){location.hash="#/plan"}return pt(gd,()=>{i()}),ln(()=>{i(),r=window.setInterval(()=>{i()},15e3),o=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",i)}),Ln(()=>{r!==null&&window.clearInterval(r),o!==null&&window.clearInterval(o),window.removeEventListener("focus",i)}),(y,_)=>($(),wt(Rs,{name:"tp"},{default:Wn(()=>[t.value&&t.value.timer_started_at?($(),O("div",{key:0,class:"tp",onClick:b,title:"点击查看计划页"},[_[0]||(_[0]=l("span",{class:"tp-pulse"},null,-1)),l("span",Bk,[l("span",Uk,W(t.value.title),1),l("span",qk,W(t.value.kind)+" · 计时中",1)]),l("span",Hk,W(f.value),1),l("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Nt(v,["stop"])},"停止")])):he("",!0)]),_:1}))}}),Wk=Kt(zk,[["__scopeId","data-v-a8f9ed22"]]),Gk={class:"admin-page"},Yk={class:"card table-card"},Jk={class:"toolbar"},Xk={key:0,class:"form-error tb-error"},Qk={class:"admin-table"},Zk={class:"td-name","data-label":"用户名"},ex={"data-label":"角色"},tx={key:0,class:"role-badge"},nx={key:1,class:"muted"},sx={class:"muted num","data-label":"创建时间"},rx={class:"muted num","data-label":"数据量"},ox={class:"td-ops"},ax={class:"ops"},ix=["onClick"],lx=["disabled","onClick"],ux={key:0},cx={key:1,class:"muted load-line"},dx={class:"dialog",role:"dialog","aria-label":"新增用户"},fx={class:"dialog-head"},px={class:"dialog-body"},vx={class:"form-row"},mx={class:"form-row"},hx={class:"form-row"},yx={key:0,class:"form-error"},gx={class:"dialog-btns"},bx=["disabled"],wx={class:"dialog",role:"dialog","aria-label":"重置密码"},_x={class:"dialog-head"},kx={class:"dialog-title"},xx={class:"dialog-body"},Cx={class:"form-row"},$x={key:0,class:"form-error"},Sx={class:"dialog-btns"},Ex=["disabled"],Tx=jt({__name:"UserAdminView",setup(e){const t=M([]),n=M(""),r=M(!0),o=M("");async function i(j,S){const P=await Ns();let te=$a();if(!te){const Se=pn(),ye=await fetch(P+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ye.ok){const Ae=await ye.json();te=String(Ae.token||""),Hr(te)}}const Pe=await fetch(P+j,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+te},body:S?JSON.stringify(S):void 0});if(Pe.status===401&&pn()){const Se=pn(),ye=await fetch(P+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ye.ok){const Ae=await ye.json();te=String(Ae.token||""),Hr(te);const Ue=await fetch(P+j,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+te},body:S?JSON.stringify(S):void 0});return{ok:Ue.ok,status:Ue.status,data:await Ue.json().catch(()=>({}))}}}return{ok:Pe.ok,status:Pe.status,data:await Pe.json().catch(()=>({}))}}async function c(){r.value=!0,o.value="";const j=await i("/api/admin/users");if(!j.ok){r.value=!1,o.value=j.data&&j.data.error||"加载失败 "+j.status;return}t.value=j.data.users||[],n.value=j.data.me||"",r.value=!1}function f(j){return j<=0?"--":j<1024?j+" B":j<1024*1024?(j/1024).toFixed(1)+" KB":(j/1024/1024).toFixed(2)+" MB"}function v(j){return(j||"").slice(0,10)}const b=M(!1),y=M(""),_=M(""),E=M(""),C=M(""),I=M(!1);function Y(){b.value=!0,C.value="",y.value="",_.value="",E.value=""}async function le(){const j=y.value.trim();if(_.value!==E.value){C.value="两次输入的密码不一致";return}if(_.value.length<6){C.value="密码至少 6 位";return}I.value=!0;const S=await i("/api/admin/users/create",{username:j,password:_.value});if(I.value=!1,!S.ok){C.value=S.data&&S.data.error||"创建失败 "+S.status;return}Fe("用户「"+j+"」已创建"),b.value=!1,await c()}const ue=M(null),ce=M(""),G=M(""),T=M(!1);function q(j){ue.value=j,ce.value="",G.value=""}async function Z(){if(!ue.value)return;if(ce.value.length<6){G.value="密码至少 6 位";return}T.value=!0;const j=await i("/api/admin/users/password",{userId:ue.value.id,newPassword:ce.value});if(T.value=!1,!j.ok){G.value=j.data&&j.data.error||"重置失败 "+j.status;return}Fe("已重置「"+ue.value.username+"」的登录密码"),ue.value=null}const N=M(null);async function se(){if(!N.value)return;const j=await i("/api/admin/users/delete",{userId:N.value.id});if(!j.ok){N.value=null,Fe(j.data&&j.data.error||"删除失败");return}Fe("已删除账号「"+N.value.username+"」及其全部云端数据"),N.value=null,await c()}return ln(c),(j,S)=>($(),O("div",Gk,[l("div",Yk,[l("div",Jk,[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:Y},[we(qe,{name:"plus",size:14}),S[11]||(S[11]=ht(" 新增用户 ",-1))])]),o.value?($(),O("div",Xk,W(o.value),1)):he("",!0),l("table",Qk,[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),O(je,null,et(t.value,P=>($(),O("tr",{key:P.id},[l("td",Zk,W(P.username),1),l("td",ex,[P.role==="admin"?($(),O("span",tx,"管理员")):($(),O("span",nx,"普通用户"))]),l("td",sx,W(v(P.created_at)),1),l("td",rx,W(f(P.data_bytes)),1),l("td",ox,[l("div",ax,[l("button",{class:"btn btn-xs",onClick:te=>q(P)},"重置密码",8,ix),l("button",{class:"btn btn-xs btn-danger",disabled:P.id===n.value,onClick:te=>N.value=P},"删除",8,lx)])])]))),128)),!r.value&&!t.value.length?($(),O("tr",ux,[...S[13]||(S[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):he("",!0)])]),r.value?($(),O("div",cx,"加载中")):he("",!0)]),S[20]||(S[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),wt(zn,{to:"body"},[b.value?($(),O("div",{key:0,class:"mask",onClick:S[5]||(S[5]=Nt(P=>b.value=!1,["self"]))},[l("div",dx,[l("div",fx,[S[15]||(S[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:S[0]||(S[0]=P=>b.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",px,[l("div",vx,[S[16]||(S[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":S[1]||(S[1]=P=>y.value=P),placeholder:"如:xiaowang"},null,512),[[Re,y.value]])]),l("div",mx,[S[17]||(S[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[2]||(S[2]=P=>_.value=P),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Re,_.value]])]),l("div",hx,[S[18]||(S[18]=l("label",null,"确认密码",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[3]||(S[3]=P=>E.value=P),onKeydown:Mt(le,["enter"])},null,544),[[Re,E.value]])]),C.value?($(),O("div",yx,W(C.value),1)):he("",!0)]),l("div",gx,[l("button",{class:"btn btn-sm",onClick:S[4]||(S[4]=P=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:I.value||!y.value.trim(),onClick:le},W(I.value?"创建中":"创建"),9,bx)])])])):he("",!0)])),($(),wt(zn,{to:"body"},[ue.value?($(),O("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Nt(P=>ue.value=null,["self"]))},[l("div",wx,[l("div",_x,[l("span",kx,"重置「"+W(ue.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:S[6]||(S[6]=P=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",xx,[l("div",Cx,[S[19]||(S[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[7]||(S[7]=P=>ce.value=P),onKeydown:Mt(Z,["enter"])},null,544),[[Re,ce.value]])]),G.value?($(),O("div",$x,W(G.value),1)):he("",!0)]),l("div",Sx,[l("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=P=>ue.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:T.value,onClick:Z},W(T.value?"提交中":"重置"),9,Ex)])])])):he("",!0)])),we(Dn,{open:!!N.value,title:"删除用户确认",message:N.value?"将永久删除云端账号「"+N.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:S[10]||(S[10]=P=>N.value=null),onConfirm:se},null,8,["open","message"])]))}}),Ax=Kt(Tx,[["__scopeId","data-v-2d48d2c9"]]),Px={class:"login-page"},Ox={class:"card login-card"},Mx={class:"login-brand"},Ix={class:"brand-icon"},jx={class:"seg"},Dx=["placeholder"],Lx={key:1,class:"form-error"},Kx=["disabled"],Rx=jt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,r=M("login"),o=M(""),i=M(""),c=M(""),f=M(""),v=M(!1);function b(_){r.value=_,f.value="",c.value=""}async function y(){if(!v.value){f.value="",v.value=!0;try{let _;if(r.value==="login")_=await Pm(o.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Om(o.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,E)=>($(),O("div",Px,[l("div",Ox,[l("div",Mx,[l("div",Ix,[we(qe,{name:"calendar",size:22})]),E[5]||(E[5]=l("div",{class:"login-title"},"实习工作日志",-1)),E[6]||(E[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),E[7]||(E[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",jx,[l("button",{class:Xe(["seg-btn",{active:r.value==="login"}]),onClick:E[0]||(E[0]=C=>b("login"))},"登录",2),l("button",{class:Xe(["seg-btn",{active:r.value==="create"}]),onClick:E[1]||(E[1]=C=>b("create"))},"创建用户",2)]),Me(l("input",{class:"input","onUpdate:modelValue":E[2]||(E[2]=C=>o.value=C),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(y,["enter"])},null,544),[[Re,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":E[3]||(E[3]=C=>i.value=C),placeholder:r.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(y,["enter"])},null,40,Dx),[[Re,i.value]]),r.value==="create"?Me(($(),O("input",{key:0,type:"password",class:"input","onUpdate:modelValue":E[4]||(E[4]=C=>c.value=C),placeholder:"再次输入密码",onKeydown:Mt(y,["enter"])},null,544)),[[Re,c.value]]):he("",!0),f.value?($(),O("div",Lx,W(f.value),1)):he("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:y},W(r.value==="login"?"登录":"创建并进入"),9,Kx),E[8]||(E[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Fx=Kt(Rx,[["__scopeId","data-v-089817d7"]]),Nx={key:1,class:"app"},Vx={class:"side"},Bx={class:"brand-mark"},Ux={class:"side-nav"},qx={key:0,class:"nav-group"},Hx=["data-tip","onClick"],zx={class:"nav-label"},Wx={class:"side-foot"},Gx={class:"avatar"},Yx={class:"foot-name"},Jx={class:"main"},Xx={class:"topbar"},Qx={class:"title"},Zx={class:"gsearch"},eC={key:0,class:"gs-panel"},tC={key:0,class:"gs-group muted"},nC=["onMousedown"],sC={class:"tag"},rC={class:"gs-text"},oC={class:"muted num gs-date"},aC={key:1,class:"gs-group muted"},iC=["onMousedown"],lC={class:"gs-text"},uC={class:"muted gs-sub"},cC={key:1,class:"gs-empty muted"},dC={class:"topbar-actions"},fC=["disabled"],pC={class:"num"},vC={class:"content"},mC={class:"content-inner"},hC={class:"tabbar"},yC=["onClick"],gC={class:"sheet-user num"},bC=["onClick"],wC={class:"sheet-name"},_C={class:"msw"},kC={class:"msw-bar"},xC={class:"msw-results"},CC={key:0,class:"gs-group muted"},$C=["onMousedown"],SC={class:"tag"},EC={class:"gs-text"},TC={class:"muted num gs-date"},AC={key:1,class:"gs-group muted"},PC=["onMousedown"],OC={class:"gs-text"},MC={class:"muted gs-sub"},IC={key:1,class:"gs-empty muted"},jC={class:"toast-wrap"},DC=jt({__name:"App",setup(e){const t=my(),n=M(zr());async function r(g){n.value=g,ia(g.userId),location.hash="#/calendar",q.value="calendar",await Ie(),await Ne(),c();try{await wd(),await nr()}catch{}Fe("欢迎,"+g.username);const m=sessionStorage.getItem("dsh_migrate_toast");m&&(sessionStorage.removeItem("dsh_migrate_toast"),Fe("已迁移原有数据 "+m+" 条"))}async function o(){Ae.value=!1,Se.value=!1,Wm(),i!==null&&(window.clearInterval(i),i=null),await Im(),n.value=null,q.value="calendar",location.hash="#/calendar",Fe("已退出登录")}let i=null;function c(){zm(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{nr()},60*1e3),nr()}const f=M(null),v=M(""),b=M(!1),y=M({logs:[],memos:[]});let _=null;const E=st(()=>!!(y.value.logs.length||y.value.memos.length));function C(){_&&window.clearTimeout(_);const g=v.value;_=window.setTimeout(async()=>{const m=g.trim();if(!m){y.value={logs:[],memos:[]};return}const x=await Promise.all([Lh(m,8),Kh(m,4)]);y.value={logs:x[0],memos:x[1]}},200)}function I(){v.value="",y.value={logs:[],memos:[]},b.value=!1}function Y(g){Vi.value=g.date,Z("calendar"),I()}function le(g){Bi.value=g.id,Z("memo"),I()}function ue(){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 G=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"plan",name:"计划",icon:"plan",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function T(){var m;const g=(location.hash||"").replace("#/","");return!G.some(x=>x.key===g)||g==="admin"&&(((m=zr())==null?void 0:m.username)||"")!=="xionglin"?"calendar":g}const q=M(T());window.addEventListener("hashchange",()=>{q.value=T()});function Z(g){location.hash="#/"+g}const N=st(()=>G.find(g=>g.key===q.value)||G[0]),se=st(()=>{var g;return(((g=n.value)==null?void 0:g.username)||"")==="xionglin"}),j=st(()=>se.value?G:G.filter(g=>g.key!=="admin")),S=st(()=>{const g=G.filter(m=>!te.includes(m.key));return se.value?g:g.filter(m=>m.key!=="admin")}),P=st(()=>S.value.some(g=>g.key===q.value));pt([se,q],()=>{q.value==="admin"&&!se.value&&Z("calendar")},{immediate:!0});const te=["calendar","today","plan","ledger"],Pe=G.filter(g=>te.includes(g.key)),Se=M(!1);function ye(g){Se.value=!1,Z(g)}const Ae=M(!1),Ue=M(null);function de(){Ae.value=!0,window.setTimeout(()=>{var g;return(g=Ue.value)==null?void 0:g.focus()},60)}function ke(g){Y(g),Ae.value=!1}function Ee(g){le(g),Ae.value=!1}const De=M(ot()),$e=M(void 0),fe=M(!1);async function Ie(){if($e.value=await _n(De.value),fe.value=!1,new Date().getHours()<4){const m=await _n(Vt(De.value,-1));fe.value=!!(m&&m.clock_in_at&&!m.clock_out_at)}}const ct=st(()=>{const g=$e.value;return g&&g.clock_in_at&&!g.clock_out_at?!0:fe.value&&!(g&&g.clock_in_at)}),bt=st(()=>{const g=$e.value;return!!(g&&g.clock_in_at&&g.clock_out_at)}),_t=st(()=>{const g=$e.value;return ct.value?"下班打卡":bt.value?"已打卡 "+wn(g==null?void 0:g.clock_in_at)+" - "+wn(g==null?void 0:g.clock_out_at):"上班打卡"});async function Bt(){if(ct.value)try{await ih()}catch{}else await Ed(De.value);await Ie(),as()}pt(cr,()=>{n.value&&Ie()});const vt=M(!1);async function Ne(){if((await vs()).remind_weekly==="off"){vt.value=!1;return}const m=new Date().getDay();if(m===5||m===6||m===0){const x=await gl(Zs(De.value));vt.value=!x||!x.highlights&&!x.challenges&&!x.plan_next}else vt.value=!1}return ln(async()=>{window.addEventListener("keydown",ce),n.value&&(ia(n.value.userId),await Ie(),await Ne(),c())}),(g,m)=>{var x,D,ae;return n.value?($(),O("div",Nx,[l("nav",Vx,[l("div",{class:"brand",onClick:m[0]||(m[0]=z=>Z("calendar"))},[l("span",Bx,[we(qe,{name:"calendar",size:15})]),m[12]||(m[12]=l("span",{class:"brand-name"},"实习工作日志",-1))]),l("div",Ux,[($(!0),O(je,null,et(j.value,(z,ee)=>($(),O(je,{key:z.key},[ee===0||z.group!==j.value[ee-1].group?($(),O("div",qx,W(z.group),1)):he("",!0),l("button",{class:Xe(["nav-btn",{active:q.value===z.key}]),"data-tip":z.name,onClick:A=>Z(z.key)},[we(qe,{name:z.icon,size:17},null,8,["name"]),l("span",zx,W(z.name),1)],10,Hx)],64))),128))]),l("div",Wx,[l("span",Gx,W((((x=n.value)==null?void 0:x.username)||"用户").slice(0,1).toUpperCase()),1),l("span",Yx,W((D=n.value)==null?void 0:D.username),1),l("button",{class:"icon-btn",title:"退出登录",onClick:o},[we(qe,{name:"export",size:15})])])]),l("div",Jx,[l("header",Xx,[l("span",Qx,W(N.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:de},[we(qe,{name:"search",size:16})]),l("div",Zx,[we(qe,{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]=z=>v.value=z),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:C,onFocus:m[2]||(m[2]=z=>b.value=!0),onBlur:ue,onKeydown:Mt(I,["esc"])},null,544),[[Re,v.value]]),b.value&&v.value.trim()?($(),O("div",eC,[E.value?($(),O(je,{key:0},[y.value.logs.length?($(),O("div",tC,"工作记录")):he("",!0),($(!0),O(je,null,et(y.value.logs,z=>($(),O("div",{key:"l"+z.id,class:"gs-item",onMousedown:Nt(ee=>Y(z),["prevent"])},[l("span",sC,W(on(qr)(z.category)),1),l("span",rC,W(z.content),1),l("span",oC,W(z.date),1)],40,nC))),128)),y.value.memos.length?($(),O("div",aC,"备忘录")):he("",!0),($(!0),O(je,null,et(y.value.memos,z=>($(),O("div",{key:"m"+z.id,class:"gs-item",onMousedown:Nt(ee=>le(z),["prevent"])},[l("span",lC,W(z.title||"无标题"),1),l("span",uC,W(z.content),1)],40,iC))),128))],64)):($(),O("div",cC,"无匹配结果"))])):he("",!0)]),m[14]||(m[14]=l("span",{class:"flex1"},null,-1)),l("div",dC,[vt.value?($(),O("button",{key:0,class:"week-tip",onClick:m[3]||(m[3]=z=>Z("report"))},[...m[13]||(m[13]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),ht(" 填写本周周记 ",-1)])])):he("",!0),l("button",{class:"btn btn-primary",disabled:bt.value,onClick:Bt},[we(qe,{name:bt.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",pC,W(_t.value),1)],8,fC)])]),l("main",vC,[l("div",mC,[q.value==="calendar"?($(),wt(Eg,{key:0})):q.value==="today"?($(),wt(Xg,{key:1})):q.value==="plan"?($(),wt(rw,{key:2})):q.value==="stats"?($(),wt(Dw,{key:3})):q.value==="report"?($(),wt(w_,{key:4})):q.value==="ledger"?($(),wt(k1,{key:5})):q.value==="memo"?($(),wt(N1,{key:6})):q.value==="vault"?($(),wt(L0,{key:7})):q.value==="admin"?($(),wt(Ax,{key:8})):($(),wt(Vk,{key:9}))])]),l("nav",hC,[($(!0),O(je,null,et(on(Pe),z=>($(),O("button",{key:z.key,class:Xe(["tab-btn",{active:q.value===z.key}]),onClick:ee=>Z(z.key)},[we(qe,{name:z.icon,size:20},null,8,["name"]),l("span",null,W(z.name),1)],10,yC))),128)),l("button",{class:Xe(["tab-btn",{active:P.value}]),onClick:m[4]||(m[4]=z=>Se.value=!0)},[we(qe,{name:"more",size:20}),m[15]||(m[15]=l("span",null,"更多",-1))],2)]),Se.value?($(),O("div",{key:0,class:"sheet-mask",onClick:m[7]||(m[7]=z=>Se.value=!1)},[l("div",{class:"more-sheet",onClick:m[6]||(m[6]=Nt(()=>{},["stop"]))},[l("div",gC,W((ae=n.value)==null?void 0:ae.username),1),($(!0),O(je,null,et(S.value,z=>($(),O("button",{key:z.key,class:"sheet-row",onClick:ee=>ye(z.key)},[we(qe,{name:z.icon,size:18},null,8,["name"]),l("span",wC,W(z.name),1),we(qe,{name:"chevron-right",size:14,class:"sheet-go"})],8,bC))),128)),m[17]||(m[17]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:m[5]||(m[5]=z=>{Se.value=!1,o()})},[we(qe,{name:"close",size:18}),m[16]||(m[16]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):he("",!0),Ae.value?($(),O("div",{key:1,class:"msw-mask",onClick:m[11]||(m[11]=Nt(z=>Ae.value=!1,["self"]))},[l("div",_C,[l("div",kC,[we(qe,{name:"search",size:16,class:"msw-icon"}),Me(l("input",{ref_key:"msInput",ref:Ue,class:"msw-input","onUpdate:modelValue":m[8]||(m[8]=z=>v.value=z),placeholder:"搜索工作记录与备忘录",onInput:C,onKeydown:m[9]||(m[9]=Mt(z=>Ae.value=!1,["esc"]))},null,544),[[Re,v.value]]),l("button",{class:"icon-btn",onClick:m[10]||(m[10]=z=>{I(),Ae.value=!1})},[we(qe,{name:"close",size:16})])]),l("div",xC,[E.value?($(),O(je,{key:0},[y.value.logs.length?($(),O("div",CC,"工作记录")):he("",!0),($(!0),O(je,null,et(y.value.logs,z=>($(),O("div",{key:"l"+z.id,class:"msw-item",onMousedown:Nt(ee=>ke(z),["prevent"])},[l("span",SC,W(on(qr)(z.category)),1),l("span",EC,W(z.content),1),l("span",TC,W(z.date),1)],40,$C))),128)),y.value.memos.length?($(),O("div",AC,"备忘录")):he("",!0),($(!0),O(je,null,et(y.value.memos,z=>($(),O("div",{key:"m"+z.id,class:"msw-item",onMousedown:Nt(ee=>Ee(z),["prevent"])},[l("span",OC,W(z.title||"无标题"),1),l("span",MC,W(z.content),1)],40,PC))),128))],64)):v.value.trim()?($(),O("div",IC,"无匹配结果")):he("",!0)])])])):he("",!0)]),n.value?($(),wt(Wk,{key:0})):he("",!0),l("div",jC,[we(Pv,{name:"toast"},{default:Wn(()=>[($(!0),O(je,null,et(on(t),z=>($(),O("div",{key:z.id,class:"toast"},W(z.text),1))),128))]),_:1})])])):($(),wt(Fx,{key:0,onLogin:r}))}}}),LC=Kt(DC,[["__scopeId","data-v-21234495"]]);function Bo(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",i=>{i.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const r=document.createElement("div");r.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",r.textContent=e+` -`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(r),n.appendChild(o)}catch{}}async function KC(){const e=await Mm();e&&ia(e.userId);const t=Hv(LC);t.config.errorHandler=(n,r,o)=>{const i=n;Bo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.message)||String(n)+` -触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const r=n.reason;Bo("未处理的异步错误(点击空白处关闭)",r&&(r.stack||r.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Bo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}KC().catch(e=>{Bo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Ld as W,Id as _,Fg as b,Dd as r}; +**/let ji;const bu=typeof window<"u"&&window.trustedTypes;if(bu)try{ji=bu.createPolicy("vue",{createHTML:e=>e})}catch{}const td=ji?e=>ji.createHTML(e):e=>e,ov="http://www.w3.org/2000/svg",av="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,wu=Nn&&Nn.createElement("template"),iv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(ov,e):t==="mathml"?Nn.createElementNS(av,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const c=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{wu.innerHTML=td(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const f=wu.content;if(r==="svg"||r==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ns="transition",xr="animation",sr=Symbol("_vtc"),nd={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},sd=Pt({},Sc,nd),lv=e=>(e.displayName="Transition",e.props=sd,e),Rs=lv((e,{slots:t})=>sv(lp,rd(e),t)),Ss=(e,t=[])=>{He(e)?e.forEach(n=>n(...t)):e&&e(...t)},_u=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function rd(e){const t={};for(const te in e)te in nd||(t[te]=e[te]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:y=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:E=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,I=uv(o),Y=I&&I[0],le=I&&I[1],{onBeforeEnter:ue,onEnter:ce,onEnterCancelled:G,onLeave:T,onLeaveCancelled:q,onBeforeAppear:Z=ue,onAppear:N=ce,onAppearCancelled:se=G}=t,j=(te,Pe,Se,ye)=>{te._enterCancelled=ye,rs(te,Pe?y:f),rs(te,Pe?b:c),Se&&Se()},S=(te,Pe)=>{te._isLeaving=!1,rs(te,_),rs(te,C),rs(te,E),Pe&&Pe()},O=te=>(Pe,Se)=>{const ye=te?N:ce,Ae=()=>j(Pe,te,Se);Ss(ye,[Pe,Ae]),ku(()=>{rs(Pe,te?v:i),Cn(Pe,te?y:f),_u(ye)||xu(Pe,r,Y,Ae)})};return Pt(t,{onBeforeEnter(te){Ss(ue,[te]),Cn(te,i),Cn(te,c)},onBeforeAppear(te){Ss(Z,[te]),Cn(te,v),Cn(te,b)},onEnter:O(!1),onAppear:O(!0),onLeave(te,Pe){te._isLeaving=!0;const Se=()=>S(te,Pe);Cn(te,_),te._enterCancelled?(Cn(te,E),Di(te)):(Di(te),Cn(te,E)),ku(()=>{te._isLeaving&&(rs(te,_),Cn(te,C),_u(T)||xu(te,r,le,Se))}),Ss(T,[te,Se])},onEnterCancelled(te){j(te,!1,void 0,!0),Ss(G,[te])},onAppearCancelled(te){j(te,!0,void 0,!0),Ss(se,[te])},onLeaveCancelled(te){S(te),Ss(q,[te])}})}function uv(e){if(e==null)return null;if(ft(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return pf(e)}function Cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[sr]||(e[sr]=new Set)).add(t)}function rs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[sr];n&&(n.delete(t),n.size||(e[sr]=void 0))}function ku(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let cv=0;function xu(e,t,n,r){const o=e._endId=++cv,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=od(e,t);if(!c)return r();const b=c+"end";let y=0;const _=()=>{e.removeEventListener(b,E),i()},E=C=>{C.target===e&&++y>=v&&_()};setTimeout(()=>{y(n[I]||"").split(", "),o=r(`${ns}Delay`),i=r(`${ns}Duration`),c=Cu(o,i),f=r(`${xr}Delay`),v=r(`${xr}Duration`),b=Cu(f,v);let y=null,_=0,E=0;t===ns?c>0&&(y=ns,_=c,E=i.length):t===xr?b>0&&(y=xr,_=b,E=v.length):(_=Math.max(c,b),y=_>0?c>b?ns:xr:null,E=y?y===ns?i.length:v.length:0);const C=y===ns&&/\b(?:transform|all)(?:,|$)/.test(r(`${ns}Property`).toString());return{type:y,timeout:_,propCount:E,hasTransform:C}}function Cu(e,t){for(;e.length$u(n)+$u(e[r])))}function $u(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Di(e){return(e?e.ownerDocument:document).body.offsetHeight}function dv(e,t,n){const r=e[sr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Su=Symbol("_vod"),ad=Symbol("_vsh"),fv=Symbol(""),pv=/(?:^|;)\s*display\s*:/;function vv(e,t,n){const r=e.style,o=$t(n);let i=!1;if(n&&!o){if(t)if($t(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&Sr(r,f,"")}else for(const c in t)n[c]==null&&Sr(r,c,"");for(const c in n){c==="display"&&(i=!0);const f=n[c];f!=null?hv(e,c,!$t(t)&&t?t[c]:void 0,f)||Sr(r,c,f):Sr(r,c,"")}}else if(o){if(t!==n){const c=r[fv];c&&(n+=";"+c),r.cssText=n,i=pv.test(n)}}else t&&e.removeAttribute("style");Su in e&&((!o||t!==n)&&(e[Su]=i?r.display:""),e[ad]&&(r.display="none"))}const Po=/\s*!important$/;function Sr(e,t,n){if(He(n))n.forEach(r=>Sr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))Po.test(n)?e.setProperty(t,n.replace(Po,""),"important"):e.setProperty(t,n);else{const r=mv(e,t);Po.test(n)?e.setProperty(ms(r),n.replace(Po,""),"important"):e[r]=n}}const Eu=["Webkit","Moz","ms"],mi={};function mv(e,t){const n=mi[t];if(n)return n;let r=gn(t);if(r!=="filter"&&r in e)return mi[t]=r;r=Yu(r);for(let o=0;ohi||(kv.then(()=>hi=0),hi=Date.now());function Cv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const o=n.value;if(He(o)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const c=o.slice(),f=[r];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,$v=(e,t,n,r,o,i)=>{const c=o==="svg";t==="class"?dv(e,r,c):t==="style"?vv(e,n,r):ca(t)?da(t)||gv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Sv(e,t,r,c))?(Pu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Au(e,t,r,c,i,t!=="value")):e._isVueCE&&(Ev(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$t(r)))?Pu(e,gn(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Au(e,t,r,c))};function Sv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mu(t)&&Je(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Mu(t)&&$t(n)?!1:t in e}function Ev(e,t){const n=e._def.props;if(!n)return!1;const r=gn(t);return Array.isArray(n)?n.some(o=>gn(o)===r):Object.keys(n).some(o=>gn(o)===r)}const id=new WeakMap,ld=new WeakMap,Qo=Symbol("_moveCb"),Iu=Symbol("_enterCb"),Li=new WeakMap,Tv=e=>(delete e.props.mode,e),Av=Tv({name:"TransitionGroup",props:Pt({},sd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=dl(),r=$c();let o,i,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Kv(o[0].el,n.vnode.el,ju(e))),f);return Oc(()=>{if(Li.delete(n),!v()){o=[],c=void 0;return}const b=ju(e);o.forEach(Ov);const y=c&&Lv(c,n.vnode.el);c=void 0,o.forEach(E=>Mv(E,y));const _=o.filter(Iv);Di(n.vnode.el),_.forEach(E=>{const C=E.el,I=C.style;Cn(C,b),I.transform=I.webkitTransform=I.transitionDuration="";const Y=C[Qo]=le=>{le&&le.target!==C||(!le||le.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",Y),C[Qo]=null,rs(C,b))};C.addEventListener("transitionend",Y)}),o=[]}),()=>{const b=ut(e),y=rd(b);let _=b.tag||Ie;if(o=[],f=void 0,i)for(let E=0;Er.willMove()&&r.item.contains(t));return n&&xa(n.item,n)}function Kv(e,t,n){const r=e.cloneNode(),o=e[sr];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&r.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&r.classList.add(f)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:c}=od(r);return i.removeChild(r),c}const Zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?n=>Io(t,n):t};function Rv(e){e.target.composing=!0}function Du(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Oo=Symbol("_initialValue");function yi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e.parentNode&&(e.type==="text"?e[Oo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Oo]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Is]=Zo(o);const i=r||o.props&&o.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](yi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=yi(e.value,n,i)}),t||(Os(e,"compositionstart",Rv),Os(e,"compositionend",Du),Os(e,"change",Du))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const o=t??"",i=e[Oo];delete e[Oo],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](yi(e.value,n,r)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},c){if(e[Is]=Zo(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?pa(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"&&(r&&t===n||o&&e.value.trim()===v)||(e.value=v)}},ps={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Os(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?pa(ea(v)):ea(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[i,i?He(c)?o.slice():o:c];try{e[Is](c)}finally{ur(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Zo(r)},mounted(e,{value:t}){Lu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Is]=Zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Fv(t,n[1],n[0]))&&Lu(e,t)}};function Fv(e,t,n){if(!n||He(e))return us(e,t);if(Ls(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function Lu(e,t){const n=e.multiple,r=He(t);if(!(n&&!r&&!Ls(t))){for(let o=0,i=e.options.length;oString(b)===String(f)):c.selected=kf(t,f)>-1}else c.selected=t.has(f);else if(us(ea(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ea(e){return"_value"in e?e._value:e.value}const Nv=["ctrl","shift","alt","meta"],Vv={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))},Nt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=ms(o.key);if(t.some(c=>c===i||Bv[c]===i))return e(o)})},Uv=Pt({patchProp:$v},iv);let Ku;function qv(){return Ku||(Ku=Np(Uv))}const Hv=(...e)=>{const t=qv().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Wv(r);if(!o)return;const i=t._component;!Je(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,zv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function zv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wv(e){return $t(e)?document.querySelector(e):e}function Et(e){return''+e+""}const Gv={calendar:Et(''),clock:Et(''),"check-circle":Et(''),edit:Et(''),tag:Et(''),star:Et(''),close:Et(''),flag:Et(''),chart:Et(''),export:Et(''),"chevron-left":Et(''),"chevron-right":Et(''),"chevron-down":Et(''),plus:Et(''),search:Et(''),settings:Et(''),memo:Et(''),lock:Et(''),wallet:Et(''),more:Et(''),shield:Et(''),plan:Et('')},Yv=["innerHTML"],qe=jt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=st(()=>Gv[t.name]||"");return(r,o)=>($(),P("span",{class:"icon",style:qn({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Yv))}}),Jv=["aria-label"],Xv={class:"dialog-msg"},Qv={class:"dialog-btns"},Zv=jt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,r=t;function o(i){n.open&&i.key==="Escape"&&r("cancel")}return pt(()=>n.open,i=>{i?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Ln(()=>window.removeEventListener("keydown",o)),(i,c)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Nt(f=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",{class:Ge(["dialog-title",{"is-danger":e.danger}])},z(e.title),3),l("div",Xv,z(e.message),1),l("div",Qv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>r("cancel"))},z(e.cancelText),1),l("button",{class:Ge(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>r("confirm"))},z(e.confirmText),3)])],8,Jv)])):he("",!0)]),_:1})]))}}),Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Dn=Kt(Zv,[["__scopeId","data-v-40c3d6b5"]]);var Ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ud={exports:{}};(function(e,t){((n,r)=>{e.exports=r()})(Ru,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(s,a)},r=function(){return(r=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,y={}.hasOwnProperty;function _(s,a){return y.call(s,a)}function E(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){I(s,u,a[u])})}var C=Object.defineProperty;function I(s,a,u,d){C(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 Y(s){return{from:function(a){return s.prototype=Object.create(a.prototype),I(s.prototype,"constructor",s),{extend:E.bind(null,s.prototype)}}}}var le=Object.getOwnPropertyDescriptor,ue=[].slice;function ce(s,a,u){return ue.call(s,a,u)}function G(s,a){return a(s)}function T(s){if(!s)throw new Error("Assertion Failed")}function q(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Z(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"?[]:(Ze=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(Qe),Ze]:[Ze,b(Ze),Ze]),Ze=Qe[0],Ws=Qe[1],Ws=Ws&&Ws.then,tt=Ze&&Ze.constructor,kt=!!Qe[2],St=function(s,a){Yn.push([s,a]),Yt&&(queueMicrotask(Rd),Yt=!1)},tn=!0,Yt=!0,sn=[],hs=[],Rt=x,Ot={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:m,pgp:!1,env:{},finalize:m},Be=Ot,Yn=[],ys=0,eo=[];function Oe(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Be;if(typeof s!="function"){if(s!==Le)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Aa(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(h){if(d._state===null){if(h===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Vs();h&&typeof h.then=="function"?u(d,function(k,K){h instanceof Oe?h._then(k,K):h.then(k,K)}):(d._state=!0,d._value=h,wl(d)),w&&Bs()}},Aa.bind(null,d))}catch(h){Aa(d,h)}}(this,s)}var Ta={get:function(){var s=Be,a=ro;function u(d,p){var h=this,w=!s.global&&(s!==Be||a!==ro),k=w&&!Xn(),K=new Oe(function(J,F){Pa(h,new bl(kl(d,s,w,k),kl(p,s,w,k),J,F,s))});return this._consoleTask&&(K._consoleTask=this._consoleTask),K}return u.prototype=Le,u},set:function(s){I(this,"then",s&&s.prototype===Le?Ta:{get:function(){return s},set:Ta.set})}};function bl(s,a,u,d,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=p}function Aa(s,a){var u,d;hs.push(a),s._state===null&&(u=s._lib&&Vs(),a=Rt(a),s._state=!1,s._value=a,d=s,sn.some(function(p){return p._value===d._value})||sn.push(d),wl(s),u)&&Bs()}function wl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=sn.length;w;)if(sn[--w]._value===h._value)return sn.splice(w,1)})(a),u.resolve(d)}catch(h){u.reject(h)}finally{--ys==0&&Oa(),--u.psd.ref||u.psd.finalize()}}function Rd(){gs(Ot,function(){Vs()&&Bs()})}function Vs(){var s=tn;return Yt=tn=!1,s}function Bs(){var s,a,u;do for(;0.",xl="String expected.",ao="__dbnames",Ia="readonly",ja="readwrite";function ws(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 io(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Pe(a))[s],a}}function $l(){throw Ne.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function rt(s,a){try{var u=Sl(s),d=Sl(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=F,K=w;if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function J(){this.constructor=k}function F(){return w!==null&&w.apply(this,arguments)||this}return n(k,K),k.prototype=K===null?Object.create(K):(J.prototype=K.prototype,new J),Object.defineProperty(F.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),F.prototype.table=function(){return u},F})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function h(w){if(!w)return w;var k,K=Object.create(s.prototype);for(k in w)if(!d.has(k))try{K[k]=w[k]}catch{}return K}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=h,this.hook("reading",h),s},yt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},yt.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(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?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{N(s,h,k)}catch{}return k})},yt.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(h){var w=h??{};return Al(w,a),d&&N(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?Oe.reject(k.failures[0]):!!h})})})},yt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Z(s,this.schema.primKey.keyPath))===void 0?Tt(new Ne.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},yt.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(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?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{N(s,h,k)}catch{}return k})},yt.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 lo(a,[s],d)}).then(function(d){return d.numFailures?Oe.reject(d.failures[0]):void 0})})},yt.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 lo(s,null,u)})}).then(function(a){return a.numFailures?Oe.reject(a.failures[0]):void 0})},yt.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)})})})},yt.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(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 Ne.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ne.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,J=k&&J?s.map(io(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:J,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new _t("".concat(d.name,".bulkAdd(): ").concat(L," of ").concat(K," operations failed"),R)})})},yt.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(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 Ne.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Ne.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,J=k&&J?s.map(io(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:J,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new _t("".concat(d.name,".bulkPut(): ").concat(L," of ").concat(K," operations failed"),R)})})},yt.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}),h=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(k){var K=[],J=[],F=(s.forEach(function(L,R){var H=L.key,B=L.changes,V=k[R];if(V){for(var U=0,re=Object.keys(B);UQ+ie&&U(Q+J)})})}var re=qs(u)&&u.limit===1/0&&(typeof s!="function"||B)&&{index:u.index,range:u.range};return U(0).then(function(){if(0{for(var We=Math.min(ge.length,Ve.length),Xe=-1,nt=0;nt=R})).length===0?Oe.resolve():(U.forEach(function(Q){V.push(function(){var ie,pe,me,xe=re,ge=Q._cfg.dbschema,Ke=(go(L,xe,B),go(L,ge,B),re=L._dbSchema=ge,Ba(xe,ge)),_e=(Ke.add.forEach(function(Ve){Ua(B,Ve[0],Ve[1].primKey,Ve[1].indexes)}),Ke.change.forEach(function(Ve){if(Ve.recreate)throw new Ne.Upgrade("Not yet support for changing primary key");var ve=B.objectStore(Ve.name);Ve.add.forEach(function(ze){return ho(ve,ze)}),Ve.change.forEach(function(ze){ve.deleteIndex(ze.name),ho(ve,ze)}),Ve.del.forEach(function(ze){return ve.deleteIndex(ze)})}),Q._cfg.contentUpgrade);if(_e&&Q._cfg.version>R)return vo(L,B),H._memoizedTables={},ie=se(ge),Ke.del.forEach(function(Ve){ie[Ve]=xe[Ve]}),Va(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],c(ie),ie),H.schema=ie,(pe=De(_e))&&Us(),ge=Oe.follow(function(){var Ve;(me=_e(H))&&pe&&(Ve=Xn.bind(null,null),me.then(Ve,Ve))}),me&&typeof me.then=="function"?Oe.resolve(me):ge.then(function(){return me})}),V.push(function(ie){var pe,me,xe=Q._cfg.dbschema;pe=xe,me=ie,[].slice.call(me.db.objectStoreNames).forEach(function(ge){return pe[ge]==null&&me.db.deleteObjectStore(ge)}),Va(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),H.schema=L._dbSchema}),V.push(function(ie){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===Q._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(pe){return pe!=="$meta"})):ie.objectStore("$meta").put(Q._cfg.version,"version"))})}),function Q(){return V.length?Oe.resolve(V.shift()(H.idbtrans)).then(Q):Oe.resolve()}().then(function(){Rl(re,B)}))}).catch(w);var K,J;c(p).forEach(function(F){Ua(u,F,p[F].primKey,p[F].indexes)}),vo(s,u),Oe.follow(function(){return s.on.populate.fire(h)}).catch(w)})}function Xd(s,a){Rl(s._dbSchema,a),a.db.version%10!=0||a.objectStoreNames.contains("$meta")||a.db.createObjectStore("$meta").add(Math.ceil(a.db.version/10-1),"version");var u=yo(0,s.idbdb,a);go(s,s._dbSchema,a);for(var d=0,p=Ba(u,s._dbSchema).change;d{if(w.change.length||w.recreate)return console.warn("Unable to patch indexes of table ".concat(w.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=a.objectStore(w.name);w.add.forEach(function(K){Ce&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(K.src)),ho(k,K)})})(p[d]);if(typeof h=="object")return h.value}}function Ba(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var p=s[u],h=a[u];if(p){var w={name:u,def:h,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(h.primKey.keyPath||"")||p.primKey.auto!==h.primKey.auto)w.recreate=!0,d.change.push(w);else{var k=p.idxByName,K=h.idxByName,J=void 0;for(J in k)K[J]||w.del.push(J);for(J in K){var F=k[J],L=K[J];F?F.src!==L.src&&w.change.push(L):w.add.push(L)}(0{var s,a,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(s=new Set,a=new FinalizationRegistry(function(d){s.delete(d)}),{toArray:function(){return Array.from(s).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);s.add(p),a.register(d._novip,p,p),s.size>d._options.maxConnections&&(p=s.values().next().value,s.delete(p),a.unregister(p))},remove:function(d){if(d)for(var p=s.values(),h=p.next();!h.done;){var w=h.value;if(w.deref()===d._novip)return s.delete(w),void a.unregister(w);h=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function qa(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Rn(ao,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ha(s){return s&&typeof s.databases=="function"}function za(s){return Jn(function(){return Be.letThrough=!0,s()})}function Wa(s){return!("from"in s)}var Ut=function(s,a){var u;if(!this)return u=new Ut,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:U.oldVersion,L=re<1,s.idbdb=V.result,h&&Xd(s,F),Jd(s,re/10,F,H))},H),V.onsuccess=xt(function(){F=null;var U,re,Q,ie,pe,me,xe=s.idbdb=V.result,ge=ce(xe.objectStoreNames);if(0"u"?Oe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(R){function H(){return indexedDB.databases().finally(R)}K=setInterval(H,100),H()}).finally(function(){return clearInterval(K)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Oe.resolve(za(function(){return s.on.ready.fire(s.vip)})).then(function R(){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=rt(u,d))===0){if(p&&h)return 0;if(p)return 1;if(h)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,h)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=rt(u,d))===0){if(p&&h)return 0;if(p)return-1;if(h)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,h;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,h=a,setTimeout(function(){p.subscribers.size===0&&de(h,p)},3e3))})}var af={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return r(r({},s),{transaction:function(u,d,p){var h,w,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(h=new AbortController).signal,k.addEventListener("abort",(w=function(K){return function(){if(h.abort(),d==="readwrite"){for(var J=new Set,F=0,L=u;F{var re=_s["idb://".concat(H,"/").concat(B)];if(!re)return[];if(!(H=re.queries[V]))return[null,!1,re,null];var Q=H[(U.query?U.query.index.name:null)||""];if(!Q)return[null,!1,re,null];switch(V){case"query":var ie=(pe=U.direction)!=null?pe:"next",pe=Q.find(function(me){var xe;return me.req.limit===U.limit&&me.req.values===U.values&&((xe=me.req.direction)!=null?xe:"next")===ie&&Yl(me.req.query.range,U.query.range)});return pe?[pe,!0,re,Q]:[Q.find(function(me){var xe;return("limit"in me.req?me.req.limit:1/0)>=U.limit&&((xe=me.req.direction)!=null?xe:"next")===ie&&(!U.values||me.req.values)&&rf(me.req.query.range,U.query.range)}),!1,re,Q];case"count":return pe=Q.find(function(me){return Yl(me.req.query.range,U.query.range)}),[pe,!!pe,re,Q]}})(a,u,"query",h),R=L[0],J=L[2],F=L[3],R&&L[1]?R.obsSet=h.obsSet:(L=d.query(h).then(function(H){var B=H.result;if(R&&(R.res=B),w){for(var V=0,U=B.length;V{var pe=Vs();try{h&&Us();var me=Jn(s,ie);return me=h?me.finally(Xn):me}finally{pe&&Bs()}})(re={subscr:U,signal:w.signal,requery:R,querier:s,trans:null}),L||(es.storagemutated.subscribe(B),L=!0),Promise.resolve(Q).then(function(ie){u=!0,a=ie,k||re.signal.aborted||(H()||(J=U,H())?R():(K={},Ma(function(){return!k&&p.next&&p.next(ie)})))},function(ie){u=!1,["DatabaseClosedError","AbortError"].includes(ie==null?void 0:ie.name)||k||Ma(function(){k||p.error&&p.error(ie)})}))};return setTimeout(R,0),F});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var ks=Rn;function si(s){var a=ts;try{ts=!0,es.storagemutated.fire(s),Xa(s,!0)}finally{ts=a}}E(ks,r(r({},$e),{delete:function(s){return new ks(s,{addons:[]}).delete()},exists:function(s){return new ks(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=ks.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(Ha(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ao})}):qa(u,a).toCollection().primaryKeys()).then(s)}catch{return Tt(new Ne.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return Be.trans?gs(Be.transless||Ot,s):s()},vip:za,async:function(s){return function(){try{var a=Qa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Oe.resolve(a)}catch(u){return Tt(u)}}},spawn:function(s,a,u){try{var d=Qa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Oe.resolve(d)}catch(p){return Tt(p)}},currentTransaction:{get:function(){return Be.trans||null}},waitFor:function(s,a){return s=Oe.resolve(typeof s=="function"?ks.ignoreTransaction(s):s).timeout(a||6e4),Be.trans?Be.trans.waitFor(s):s},Promise:Oe,debug:{get:function(){return Ce},set:function(s){be(s)}},derive:Y,extend:v,props:E,override:G,Events:pr,on:es,liveQuery:Jl,extendObservabilitySet:wo,getByKeyPath:Z,setByKeyPath:N,delByKeyPath:function(s,a){typeof a=="string"?N(s,a,void 0):"length"in a&&[].map.call(a,function(u){N(s,u,void 0)})},shallowClone:se,deepClone:Pe,getObjectDiff:Za,cmp:rt,asap:q,minKey:-1/0,addons:[],connections:{get:gr.toArray},errnames:Bt,dependencies:Co,cache:_s,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)})})),ks.maxKey=hr(ks.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(es(po,function(s){ts||(s=new CustomEvent(Ka,{detail:s}),ts=!0,dispatchEvent(s),ts=!1)}),addEventListener(Ka,function(s){s=s.detail,ts||si(s)}));var Gs,ts=!1,Xl=function(){};return typeof BroadcastChannel<"u"&&((Xl=function(){(Gs=new BroadcastChannel(Ka)).onmessage=function(s){return s.data&&si(s.data)}})(),typeof Gs.unref=="function"&&Gs.unref(),es(po,function(s){ts||Gs.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Rn.disableBfCache&&s.persisted){Ce&&console.debug("Dexie: handling persisted pagehide"),Gs!=null&&Gs.close();for(var a=0,u=gr.toArray();a{const r={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(o=>{o.category&&r[o.category]&&(o.category=r[o.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let oe;function rm(e){oe=e}function fl(){oe&&oe.close(),oe=void 0}const om=6,Nu=["公司","客户现场","出差","居家办公"],am={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function qr(e){return am[e]||e}function Ir(e){return e<10?"0"+e:String(e)}function Hn(e){return e.getFullYear()+"-"+Ir(e.getMonth()+1)+"-"+Ir(e.getDate())}function ot(){return Hn(new Date)}function at(){const e=new Date;return Hn(e)+"T"+Ir(e.getHours())+":"+Ir(e.getMinutes())+":"+Ir(e.getSeconds())}function wn(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 Vt(e,t){const n=Fs(e);return n.setDate(n.getDate()+t),Hn(n)}function na(e,t){const n=Fs(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),Hn(n)}function Zs(e){const t=Fs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Hn(t)}function im(e){const t=Fs(e).getDay();return t===0||t===6}function lm(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function cd(e){const t=Fs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const um=15e4;function Ri(e){const t=new Uint8Array(e);let n="";for(let r=0;r({}));if(!o.ok){const c=i&&i.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function hl(e,t,n){const r=await Tm(n,e,t);ia(r.userId);const o={userId:r.userId,username:r.username};return Sm(o),hd(r.username,t),o}async function Am(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return hl(n,t,"login")}async function Pm(e,t,n){const r=(e||"").trim();if(r.length<2||r.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return hl(r,t,"register")}async function Om(){const e=pn();if(!e)return null;try{return await hl(e.username,e.password,"login")}catch{return null}}async function Mm(){oa(),fl(),aa=null,md()}function Im(){oa(),fl(),aa=null,md(),Em()}async function jm(e,t){if(!zr())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const r=pn();if(!r||r.password!==e)throw new Error("旧密码不正确");const o=await Ns();let i;try{i=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+yd()},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)}hd(r.username,t)}async function Dm(){if(!zr())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+yd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r&&r.error||"删除失败 "+n.status)}Im()}function yd(){return $a()}const Vi=M(null),Bi=M(null),cr=M(0);function as(){cr.value++}const gd=M(0);function Lm(){gd.value++}const er=M(""),or=["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 Ko(e){return JSON.stringify(e)}async function Km(e){return oe.table(e).toArray()}function Ro(e,t){return e==="setting"?t.key:t.id}async function Rm(){for(const e of or){const t=oe.table(e),n=await t.toArray();for(const r of n){if(e==="setting"&&Xs.has(r.key))continue;const o={};r.uuid||(o.uuid=Fm()),!r.updated_at&&r.created_at&&(o.updated_at=r.created_at),Object.keys(o).length&&await t.update(Ro(e,r),o)}}}function Fm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Nm(){return pn()!=null}async function Vm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Bm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function bd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const r=await n.json();if(!r||!r.token)throw new Error("云端登录异常");return String(r.token)}async function Um(e,t){let n=$a();return n||(n=await bd(e,t),Hr(n),n)}async function wd(){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 Ui(){const e=pn();if(!e)throw new Error("未登录,无法同步");return Cd({baseUrl:await Ns(),username:e.username,password:e.password})}async function _d(){try{await Ui()}catch(e){er.value=e instanceof Error?e.message:String(e);try{await Ui()}catch{}}}function kd(e,t,n){const r={};for(const o of Object.keys(t))o!=="id"&&(r[o]=t[o]);if(e==="log_item"){delete r.work_log_id,delete r.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(r.wuuid=o.uuid);const i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(r.puuid=i.uuid)}if(e==="plan"){delete r.goal_id;const o=t.goal_id?n.goal.get(t.goal_id):null;o&&o.uuid&&(r.guuid=o.uuid)}return r}async function xd(){const e=await oe.work_log.toArray(),t=await oe.project.toArray(),n=await oe.goal.toArray();return{workLog:new Map(e.map(r=>[r.id,r])),project:new Map(t.map(r=>[r.id,r])),goal:new Map(n.map(r=>[r.id,r]))}}let jr=!1,Fo=!1,qi=!1,tr=null,$n=null,Hi="",zi=!1,No=null;async function nr(){if(jr){Fo=!0;return}try{if(!await Nm())return;await Cd(await qm()),er.value=""}catch(e){er.value=e instanceof Error?e.message:String(e)}}async function qm(){const e=pn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function Hm(){if(zi)return;zi=!0,No=nm(async()=>{const t={};for(const n of or)t[n]=await oe.table(n).count();return t}).subscribe({next:()=>{qi||jr||(tr&&globalThis.clearTimeout(tr),tr=globalThis.setTimeout(()=>{nr()},3e3))},error:()=>{}})}function zm(){No&&(No.unsubscribe(),No=null),$n&&($n.close(),$n=null,Hi=""),tr&&(globalThis.clearTimeout(tr),tr=null),zi=!1}function Wm(e,t){const n=e+"|"+t;if(!($n&&Hi===n)){$n&&($n.close(),$n=null);try{$n=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Hi=n,$n.onmessage=()=>{nr()}}catch{$n=null}}}async function Cd(e){if(jr)return Fo=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};jr=!0,qi=!0;try{const t=await Wi(e);return Fo&&(Fo=!1,globalThis.setTimeout(()=>{nr()},800)),t}finally{jr=!1,qi=!1}}async function Wi(e,t=!1){var Z;const n=e.baseUrl.trim().replace(/\/+$/,"");if(!n)throw new Error("请先配置同步服务地址");await Rm();const r=await xd(),o=await oe.sync_mirror.toArray(),i=new Map;for(const N of o)i.set(N.table+"|"+N.uuid,N);const c={},f=[];let v=0;for(const N of or){let se=await Km(N);N==="setting"&&(se=se.filter(S=>!Xs.has(S.key)));const j=new Map;for(const S of se)j.set(S.uuid,S);for(const[S,O]of j){const te=kd(N,O,r),Pe=Ko(te),Se=i.get(N+"|"+S);(!Se||Se.hash!==Pe)&&(c[N]=c[N]||[],c[N].push(te),v++)}for(const[S,O]of i)S.startsWith(N+"|")&&!j.has(O.uuid)&&f.push({table:N,uuid:O.uuid,deleted_at:at()});c[N]=c[N]||[]}f.push(...Qm());const b=await Um(n,e),y=N=>fetch(n+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+N},body:JSON.stringify({device:"client",tables:c,tombstones:f})});let _=await y(b);if(_.status===401){Hr("");const N=await bd(n,e);Hr(N),_=await y(N)}if(!_.ok)throw new Error("同步服务返回 "+_.status);const E=await _.json(),C=String(E.dataEpoch||""),I="dsh_sync_epoch_"+(((Z=pn())==null?void 0:Z.username)||"anon"),Y=C?localStorage.getItem(I):null;if(!t&&Y&&C&&Y!==C)return await oe.sync_mirror.clear(),localStorage.setItem(I,C),Wi(e,!0);const le=E.tables||{},ue=E.tombstones||[],ce=or.reduce((N,se)=>N+(le[se]||[]).length,0),G=o.length-f.length;if(!t&&ce0||T.removed>0||v>0)&&as(),{pushed:v,pulled:T.changed,removed:T.removed,errors:0,at:q}}function $d(){var t;return"dsh_idmap_"+(((t=pn())==null?void 0:t.username)||"anon")}function Gm(){try{const e=localStorage.getItem($d());if(e)return JSON.parse(e)}catch{}return{}}function Ym(e){try{localStorage.setItem($d(),JSON.stringify(e))}catch{}}async function Jm(e,t){const n=Gm(),r=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await oe.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const i=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,f=0;const v={},b={},y={};for(const C of or){const I=oe.table(C),Y=await I.toArray(),le=new Map(Y.map(S=>[Ro(C,S),S])),ue=new Map(Y.filter(S=>S.uuid).map(S=>[S.uuid,S])),ce=(e[C]||[]).filter(S=>S&&typeof S=="object"&&S.uuid).filter(S=>!r.has(C+"|"+S.uuid)),G=ce.filter(S=>!(C==="setting"&&Xs.has(S.key))),T=ce.filter(S=>C==="setting"&&Xs.has(S.key));for(const S of T)Xm(C,S.uuid);const q=C==="setting"?[]:Y.filter(S=>S.uuid&&!i.has(S.uuid)&&!r.has(C+"|"+S.uuid)),Z={v:Math.max(0,...Y.map(S=>Number(S.id)||0))};G.length;const N=[];for(const S of G){const O={...S};if(C==="log_item"){const Se=O.wuuid?v[O.wuuid]:void 0;if(!Se)continue;O.work_log_id=Se,delete O.wuuid,O.project_id=O.puuid?b[O.puuid]??null:null,delete O.puuid}if(C==="plan")if(O.guuid){const Se=y[O.guuid];O.goal_id=Se??null,delete O.guuid}else O.goal_id=null;let te=Ro(C,S);if(C==="setting")te=S.key;else{const Se=n[C]&&n[C][S.uuid],ye=ue.get(S.uuid);ye&&ye.id!=null?te=ye.id:typeof Se=="number"?te=Se:te=++Z.v}const Pe={...O,id:te};C==="setting"&&Xs.has(Pe.key)||(N.push(Pe),C==="work_log"&&(v[S.uuid]=te),C==="project"&&(b[S.uuid]=te),C==="goal"&&(y[S.uuid]=te))}const se=N.concat(q);for(const S of se){const O=le.get(Ro(C,S));(!O||Ko(O)!==Ko(S))&&c++}f+=Y.filter(S=>S.uuid&&!N.some(O=>O.uuid===S.uuid)&&!r.has(C+"|"+S.uuid)).length,await I.clear(),se.length&&await I.bulkPut(se);const j={};for(const S of se)S.uuid&&(j[S.uuid]=S.id);n[C]=j}Ym(n);const _=await xd(),E=[];for(const C of or){const I=await oe.table(C).toArray();for(const Y of I)C==="setting"&&Xs.has(Y.key)||Y.uuid&&E.push({table:C,uuid:Y.uuid,hash:Ko(kd(C,Y,_))})}return await oe.sync_mirror.clear(),E.length&&await oe.sync_mirror.bulkAdd(E.map(C=>({...C}))),await oe.tombstone.clear(),{changed:c,removed:f+la.length}}const la=[];function Xm(e,t){la.some(n=>n.table===e&&n.uuid===t)||la.push({table:e,uuid:t,deleted_at:at()})}function Qm(){return la.splice(0)}const Zm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function it(){await _d()}async function Ct(e,t){const n=await oe.setting.get(e);return n?n.value:t}async function It(e,t){await oe.setting.put({key:e,value:t}),Zm.has(e)||await it()}async function vs(){const e=await Promise.all([Ct("work_start","09:00"),Ct("work_end","18:00"),Ct("grace_minutes","10"),Ct("lunch_minutes","60"),Ct("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function eh(){return Ct("last_location","")}async function th(e,t){const n=t.trim();await It("last_location",n),n&&await ua(n);let r=!1;const o=await _n(e);o&&o.id?(o.location||"")!==n&&(await oe.attendance.update(o.id,{location:n||null}),r=!0):n&&(await oe.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:at()}),r=!0),r&&await it()}async function yl(){const e=await Ct("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 Sd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await It("location_presets",JSON.stringify(t))}async function ua(e){const t=e.trim();if(!t)return;const n=await yl();n.includes(t)||await Sd([...n,t])}async function ar(e=!1){const t=await oe.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function nh(e){await oe.project.add({name:e.trim(),archived:0,created_at:at()}),await it()}async function sh(e,t){await oe.project.update(e,{name:t.trim()}),await it()}async function rh(e,t){await oe.project.update(e,{archived:t?1:0}),await it()}async function _n(e){return oe.attendance.where("date").equals(e).first()}async function Ed(e,t){const n=((t===void 0?await Ct("last_location",""):t)||"").trim();let r=!1;const o=await _n(e);if(o&&o.id){if(!o.clock_in_at){const i={clock_in_at:at()};n&&(i.location=n),await oe.attendance.update(o.id,i),r=!0}n&&(await Ct("last_location","")!==n&&await It("last_location",n),await ua(n)),r&&await it();return}await oe.attendance.add({date:e,clock_in_at:at(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:at()}),n&&(await It("last_location",n),await ua(n)),await it()}async function oh(e){const t=await _n(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await oe.attendance.update(t.id,{clock_out_at:at()}),await it())}async function ah(){const e=new Date,t=Hn(e);let n="";if(e.getHours()<4){const r=await _n(Vt(t,-1));r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await oe.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n){const r=await _n(t);r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await oe.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n)throw new Error("没有进行中的打卡");return await it(),n}async function ih(e,t,n,r,o){(o||"").trim()&&await ua(o);const i=await _n(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:r||null,location:(o||"").trim()||null,created_at:at()};i&&i.id?await oe.attendance.update(i.id,c):await oe.attendance.add(c),await it()}async function lh(e,t,n){const r=(n||"").trim();if(!r)return;const o=await _n(e);o&&o.id&&(await oe.attendance.update(o.id,{[t]:e+"T"+r+":00"}),await it())}async function Xr(e,t){return oe.attendance.where("date").between(e,t,!0,!0).toArray()}async function uh(e,t){const n=await _n(e);if(t){const r={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:at()};n&&n.id?await oe.attendance.update(n.id,r):await oe.attendance.add({...r,note:null,location:null})}else n&&n.id&&await oe.attendance.update(n.id,{kind:"normal"});await it()}async function ch(e){const t=await oe.work_log.where("date").equals(e).first();return t||{id:await oe.work_log.add({date:e,created_at:at()}),date:e,created_at:at()}}async function dh(e){return oe.work_log.where("date").equals(e).first()}async function fh(e){const t=await dh(e);return!t||!t.id?[]:(await oe.log_item.where("work_log_id").equals(t.id).toArray()).sort((r,o)=>o.id-r.id)}async function ph(e,t){const n=await oe.work_log.where("date").equals(e).first();let r;n&&n.id?r=n:r=await ch(e),await oe.table("log_item").add({work_log_id:r.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:at()});const o=t.project_id?String(t.project_id):"";await Ct("last_project","")!==o&&await It("last_project",o),await Ct("last_category","")!==t.category&&await It("last_category",t.category),await it()}async function bi(e,t){await oe.table("log_item").update(e,t),await it()}async function vh(e){await oe.table("log_item").delete(e),await it()}async function Qr(e,t){const n=await oe.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const r=new Map(n.map(i=>[i.id,i.date]));return(await oe.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:r.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!t.timer_started_at).toArray();return e.length?e[0]:null}async function bh(e){const t=at();await oe.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 it()}async function wh(e,t){await oe.plan.update(e,{...t,updated_at:at()}),await it()}async function _h(e){await oe.plan.delete(e),await it()}async function kh(e,t){const n=await oe.plan.get(e);n&&(t!=="todo"&&n.timer_started_at&&await Sa(e),await oe.plan.update(e,{status:t,updated_at:at()}),await it())}async function xh(e){const t=await oe.plan.filter(n=>!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await Sa(n.id);await oe.plan.update(e,{timer_started_at:at(),updated_at:at()}),await it()}async function Sa(e){const t=await oe.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 oe.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:at()}),await it()}const Ch=366;function $h(e,t){const n=[];let r=e,o=0;for(;r<=t&&oo.status==="done").length,total:r.length})}return t}async function Eh(){return(await oe.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await oe.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Lh(e,t=4){const n=e.trim().toLowerCase();return n?(await oe.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,i)=>o.updated_at{await Promise.all([oe.project.clear(),oe.work_log.clear(),r.clear(),oe.attendance.clear(),oe.weekly_note.clear(),oe.setting.clear(),oe.memo.clear(),oe.credential.clear(),o.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await oe.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await oe.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await r.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await oe.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await oe.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await oe.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await oe.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await oe.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await i.bulkAdd(n.plan)}),await it()}const qh=["制度学习","产品学习","打杂","项目实操","售后服务"],Hh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],zh=["工资","报销","其他"],Td="log_categories",Ad="ledger_expense_categories",Pd="ledger_income_categories";function Od(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const r=n.filter(o=>typeof o=="string"&&o.trim()).map(o=>o.trim());if(r.length)return Array.from(new Set(r))}}catch{}return t.slice()}async function Zr(){return Od(await Ct(Td,""),qh)}async function wi(e){await It(Td,JSON.stringify(e))}async function Wr(e){return Od(await Ct(e==="expense"?Ad:Pd,""),e==="expense"?Hh:zh)}async function Ts(e,t){await It(e==="expense"?Ad:Pd,JSON.stringify(t))}const Wh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Gh={class:"dialog-head"},Yh={class:"dialog-title"},Jh={key:0,class:"muted dialog-sub"},Xh={class:"dialog-body"},Qh={class:"form-grid"},Zh={class:"field span2"},ey={key:0,class:"form-error"},ty={class:"field"},ny=["value"],sy={class:"field"},ry=["value"],oy={class:"field"},ay={class:"min-chips"},iy=["onClick"],ly={class:"field"},uy={class:"field span2"},cy={class:"field"},dy={class:"field"},fy={class:"dialog-btns"},py=jt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=M([]);Zr().then(ce=>{n.value=ce});const r=e,o=t,i=M(""),c=M(null),f=M("dev"),v=M(null),b=M(""),y=M(""),_=M(0),E=M(0),C=M(""),I=M(null),Y=st(()=>{var T;const ce=r.projects.filter(q=>q.archived!==1),G=(T=r.item)==null?void 0:T.project_id;if(G&&!ce.some(q=>q.id===G)){const q=r.projects.find(N=>N.id===G),Z=ce.slice();return q&&Z.unshift({...q,name:q.name+"(已归档)"}),Z}return ce});function le(ce){r.open&&ce.key==="Escape"&&o("cancel")}pt(()=>r.open,async ce=>{var G;if(ce){const T=r.item;i.value=(T==null?void 0:T.content)??"",c.value=(T==null?void 0:T.project_id)??null,f.value=(T==null?void 0:T.category)??"dev",v.value=(T==null?void 0:T.minutes)??null,b.value=(T==null?void 0:T.takeaway)??"",y.value=(T==null?void 0:T.remark)??"",_.value=(T==null?void 0:T.is_milestone)??0,E.value=(T==null?void 0:T.needs_followup)??0,C.value="",window.addEventListener("keydown",le),await ur(),(G=I.value)==null||G.focus()}else window.removeEventListener("keydown",le)}),Ln(()=>window.removeEventListener("keydown",le)),pt(i,()=>{C.value&&(C.value="")});function ue(){const ce=i.value.trim();if(!ce){C.value="请填写工作内容";return}if(!r.item||!r.item.id){o("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:y.value.trim()||null,is_milestone:_.value,needs_followup:E.value});return}o("save",{id:r.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:y.value.trim()||null,is_milestone:_.value?1:0,needs_followup:E.value?1:0})}return(ce,G)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:G[10]||(G[10]=Nt(T=>o("cancel"),["self"]))},[l("div",Wh,[l("div",Gh,[l("div",null,[l("div",Yh,z(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),P("div",Jh,z(e.date),1)):he("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:G[0]||(G[0]=T=>o("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",Xh,[l("div",Qh,[l("div",Zh,[G[11]||(G[11]=l("label",null,"工作内容(必填)",-1)),Me(l("input",{ref_key:"contentInput",ref:I,class:Ge(["input",{invalid:C.value}]),"onUpdate:modelValue":G[1]||(G[1]=T=>i.value=T),onKeydown:Mt(ue,["enter"])},null,34),[[Re,i.value]]),C.value?($(),P("div",ey,z(C.value),1)):he("",!0)]),l("div",ty,[G[13]||(G[13]=l("label",null,"所属项目",-1)),Me(l("select",{class:"select","onUpdate:modelValue":G[2]||(G[2]=T=>c.value=T)},[G[12]||(G[12]=l("option",{value:null},"无项目",-1)),($(!0),P(Ie,null,et(Y.value,T=>($(),P("option",{key:T.id,value:T.id},z(T.name),9,ny))),128))],512),[[ps,c.value]])]),l("div",sy,[G[14]||(G[14]=l("label",null,"工作分类",-1)),Me(l("select",{class:"select","onUpdate:modelValue":G[3]||(G[3]=T=>f.value=T)},[($(!0),P(Ie,null,et(n.value,T=>($(),P("option",{key:T,value:T},z(T),9,ry))),128))],512),[[ps,f.value]])]),l("div",oy,[G[15]||(G[15]=l("label",null,"耗时(分钟)",-1)),Me(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":G[4]||(G[4]=T=>v.value=T),placeholder:"选填"},null,512),[[Re,v.value,void 0,{number:!0}]]),l("div",ay,[($(),P(Ie,null,et([15,30,60,90,120],T=>l("button",{key:T,type:"button",class:Ge(["min-chip",{on:v.value===T}]),onClick:q=>v.value=v.value===T?null:T},z(T)+"分",11,iy)),64))])]),l("div",ly,[G[16]||(G[16]=l("label",null,"主要收获",-1)),Me(l("input",{class:"input","onUpdate:modelValue":G[5]||(G[5]=T=>b.value=T),placeholder:"一句话:学到了什么"},null,512),[[Re,b.value]])]),l("div",uy,[G[17]||(G[17]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":G[6]||(G[6]=T=>y.value=T),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),l("div",cy,[G[18]||(G[18]=l("label",null,"成果标记",-1)),l("button",{class:Ge(["toggle-btn",{on:_.value===1}]),onClick:G[7]||(G[7]=T=>_.value=_.value===1?0:1)},z(_.value===1?"已标记为成果":"未标记"),3)]),l("div",dy,[G[19]||(G[19]=l("label",null,"待跟进",-1)),l("button",{class:Ge(["toggle-btn",{onwarn:E.value===1}]),onClick:G[8]||(G[8]=T=>E.value=E.value===1?0:1)},z(E.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",fy,[l("button",{class:"btn btn-sm",onClick:G[9]||(G[9]=T=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ue},z(e.item?"保存修改":"添加"),1)])])])):he("",!0)]),_:1})]))}}),vy=Kt(py,[["__scopeId","data-v-91c30038"]]);function Mo(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function dr(e,t,n,r){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(im(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return r?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:r?"进行中":"未完成",makeup:o,workedMinutes:null};const i=Mo(wn(e.clock_in_at)),c=Mo(wn(e.clock_out_at)),f=Mo(n.work_start),v=Mo(n.work_end);let b="normal";!o&&i>f+n.grace_minutes?b="late":!o&&c{Vo.value=Vo.value.filter(n=>n.id!==t)},2e3)}function hy(){return Vo}const yy={class:"day-panel"},gy={class:"dp-head"},by={class:"dp-date"},wy={class:"card sec"},_y={class:"att-grid"},ky={class:"att-cell"},xy={key:0,class:"edit-row"},Cy={key:1,class:"att-val"},$y={class:"att-cell"},Sy={key:0,class:"edit-row"},Ey={key:1,class:"att-val"},Ty={class:"att-cell"},Ay=["list"],Py=["id"],Oy=["value"],My={class:"att-cell"},Iy={class:"att-val status-val"},jy={key:0,class:"tag"},Dy={key:1,class:"muted"},Ly={key:0,class:"att-note muted"},Ky={class:"att-actions"},Ry=["disabled"],Fy=["disabled"],Ny=["disabled"],Vy=["disabled"],By={key:0,class:"card sec makeup"},Uy={class:"form-grid"},qy={class:"field"},Hy={class:"field"},zy={class:"field span2"},Wy=["list"],Gy={class:"field span2"},Yy={key:0,class:"form-error"},Jy={class:"form-footer"},Xy={class:"list-sec"},Qy={class:"sec-head"},Zy={class:"sec-title"},eg={key:0,class:"empty muted"},tg={class:"item-main"},ng={class:"tag"},sg=["onClick"],rg={key:0,class:"muted item-meta"},og={key:1,class:"muted num item-meta"},ag=["onClick"],ig=["onClick"],lg=["onClick"],ug=["onClick"],cg={key:0,class:"item-sub"},dg={key:0,class:"muted2"},fg={key:1,class:"muted"},pg={key:1,class:"dp-foot muted num"},vg=jt({__name:"DayPanel",props:{date:{}},setup(e){const t=M([]);Zr().then(g=>{t.value=g});const n=e,r=M(!0),o=M(null),i=M(void 0),c=M([]),f=M([]),v=M(""),b=M([]),y=st(()=>"loc-list-"+n.date),_=st(()=>n.date===ot());async function E(){r.value=!0,o.value=await vs(),i.value=await _n(n.date),c.value=await fh(n.date),f.value=await ar(!0),b.value=await yl(),v.value=i.value&&i.value.location||await eh(),r.value=!1}ln(E),pt(()=>n.date,E),pt(cr,()=>{E()});function C(g){if(!g)return"";const m=f.value.find(x=>x.id===g);return m?m.name:"已删除项目"}const I=st(()=>o.value?dr(i.value,n.date,o.value,_.value):null),Y=st(()=>c.value.reduce((g,m)=>g+(m.minutes||0),0)),le=M(!1);async function ue(){le.value||(le.value=!0,await Ed(n.date,v.value),await E(),as(),Fe("上班打卡成功"),le.value=!1)}async function ce(){le.value||(le.value=!0,await oh(n.date),await E(),as(),Fe("下班打卡成功"),le.value=!1)}async function G(){await th(n.date,v.value),as(),Fe("地点已更新")}const T=M(!1),q=st(()=>{var g;return((g=i.value)==null?void 0:g.kind)==="leave"});function Z(){if(i.value&&i.value.clock_in_at){T.value=!0;return}N(!0)}async function N(g){T.value=!1,await uh(n.date,g),await E(),as(),Fe(g?"已标记为休假":"已取消休假")}const se=M(null),j=M(""),S=M(null);pt(se,async g=>{var m;g&&(await ur(),(m=S.value)==null||m.focus())});function O(g){var x,D;const m=g==="in"?(x=i.value)==null?void 0:x.clock_in_at:(D=i.value)==null?void 0:D.clock_out_at;se.value=g,j.value=m?wn(m):g==="in"?"09:00":"18:00"}function te(){se.value=null}async function Pe(){const g=se.value;g&&(se.value=null,j.value&&(await lh(n.date,g==="in"?"clock_in_at":"clock_out_at",j.value),await E(),as(),Fe("打卡时间已修改")))}const Se=M(!1),ye=M("09:00"),Ae=M("18:00"),Ue=M(""),de=M(""),ke=M("");function Ee(){de.value=v.value,ke.value="",Se.value=!Se.value}async function De(){if(!ye.value||!Ae.value){ke.value="请填写上班与下班时间";return}await ih(n.date,n.date+"T"+ye.value+":00",n.date+"T"+Ae.value+":00",Ue.value.trim(),de.value),Se.value=!1,Ue.value="",ke.value="",await E(),as(),Fe("补卡已保存")}const $e=M(null),fe=M(!1);function je(g){$e.value=g,fe.value=!0}function ct(){$e.value=null,fe.value=!0}async function bt(g){g.id?(await bi(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}),Fe("记录已更新")):(await ph(n.date,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark}),Fe("记录已添加")),$e.value=null,fe.value=!1,await E()}async function _t(g){await bi(g.id,{is_milestone:g.is_milestone?0:1}),await E()}async function Bt(g){await bi(g.id,{needs_followup:g.needs_followup?0:1}),await E()}const vt=M(null);async function Ne(){vt.value&&vt.value.id&&await vh(vt.value.id),vt.value=null,await E(),Fe("记录已删除")}return(g,m)=>($(),P("div",yy,[l("div",gy,[l("div",by,z(nn(cd)(e.date)),1)]),l("div",wy,[m[19]||(m[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",_y,[l("div",ky,[m[15]||(m[15]=l("label",null,"上班时间",-1)),se.value==="in"?($(),P("div",xy,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[0]||(m[0]=x=>j.value=x),onKeydown:[Mt(Pe,["enter"]),Mt(te,["esc"])]},null,544),[[Re,j.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:te},"取消")])):($(),P("div",Cy,[l("span",{class:Ge(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},z(i.value&&i.value.clock_in_at?nn(wn)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:m[1]||(m[1]=x=>O("in"))},[we(qe,{name:"edit",size:13})])):he("",!0)]))]),l("div",$y,[m[16]||(m[16]=l("label",null,"下班时间",-1)),se.value==="out"?($(),P("div",Sy,[Me(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[2]||(m[2]=x=>j.value=x),onKeydown:[Mt(Pe,["enter"]),Mt(te,["esc"])]},null,544),[[Re,j.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"确认"),l("button",{class:"btn btn-sm",onClick:te},"取消")])):($(),P("div",Ey,[l("span",{class:Ge(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},z(i.value&&i.value.clock_out_at?nn(wn)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:m[3]||(m[3]=x=>O("out"))},[we(qe,{name:"edit",size:13})])):he("",!0)]))]),l("div",Ty,[m[17]||(m[17]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[4]||(m[4]=x=>v.value=x),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:G},null,40,Ay),[[Re,v.value]]),l("datalist",{id:y.value},[($(!0),P(Ie,null,et(b.value,x=>($(),P("option",{key:x,value:x},null,8,Oy))),128))],8,Py)]),l("div",My,[m[18]||(m[18]=l("label",null,"考勤状态",-1)),l("div",Iy,[I.value?($(),P(Ie,{key:0},[l("span",{class:Ge(["dot",I.value.status])},null,2),l("span",null,z(I.value.label),1),i.value&&i.value.kind==="makeup"?($(),P("span",jy,"补卡")):he("",!0)],64)):($(),P("span",Dy,"--"))])])]),i.value&&i.value.note?($(),P("div",Ly,"补卡说明:"+z(i.value.note),1)):he("",!0),l("div",Ky,[_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:0,class:"btn btn-primary btn-sm",disabled:le.value,onClick:ue},"上班打卡",8,Ry)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),P("button",{key:1,class:"btn btn-primary btn-sm",disabled:le.value,onClick:ce},"下班打卡",8,Fy)):he("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:2,class:"btn btn-sm",onClick:Ee},"补卡")):he("",!0),q.value?($(),P("button",{key:4,class:"btn btn-sm",disabled:le.value,onClick:m[5]||(m[5]=x=>N(!1))},"取消休假",8,Vy)):($(),P("button",{key:3,class:"btn btn-sm",disabled:le.value,onClick:Z},"标记休假",8,Ny))])]),Se.value?($(),P("div",By,[m[24]||(m[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",Uy,[l("div",qy,[m[20]||(m[20]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[6]||(m[6]=x=>ye.value=x)},null,512),[[Re,ye.value]])]),l("div",Hy,[m[21]||(m[21]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":m[7]||(m[7]=x=>Ae.value=x)},null,512),[[Re,Ae.value]])]),l("div",zy,[m[22]||(m[22]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input",list:y.value,"onUpdate:modelValue":m[8]||(m[8]=x=>de.value=x),placeholder:"可直接输入"},null,8,Wy),[[Re,de.value]])]),l("div",Gy,[m[23]||(m[23]=l("label",null,"补卡原因",-1)),Me(l("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=x=>Ue.value=x),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,Ue.value]])])]),ke.value?($(),P("div",Yy,z(ke.value),1)):he("",!0),l("div",Jy,[l("button",{class:"btn btn-sm",onClick:m[10]||(m[10]=x=>Se.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):he("",!0),l("div",Xy,[l("div",Qy,[l("span",Zy,"工作记录("+z(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:ct},[we(qe,{name:"plus",size:14}),m[25]||(m[25]=ht(" 添加记录",-1))])]),!c.value.length&&!r.value?($(),P("div",eg,"暂无记录")):he("",!0),($(!0),P(Ie,null,et(c.value,x=>($(),P("div",{key:x.id,class:"item"},[l("div",tg,[l("span",ng,z(nn(qr)(x.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:D=>je(x)},z(x.content),9,sg),x.project_id?($(),P("span",rg,z(C(x.project_id)),1)):he("",!0),x.minutes?($(),P("span",og,z(x.minutes)+" 分钟",1)):he("",!0),m[26]||(m[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:D=>je(x)},[we(qe,{name:"edit",size:14})],8,ag),l("button",{class:Ge(["icon-btn",{active:x.is_milestone===1}]),title:"成果标记",onClick:D=>_t(x)},[we(qe,{name:"star",size:14})],10,ig),l("button",{class:Ge(["icon-btn",{"active-warn":x.needs_followup===1}]),title:"待跟进",onClick:D=>Bt(x)},[we(qe,{name:"flag",size:14})],10,lg),l("button",{class:"icon-btn",title:"删除",onClick:D=>vt.value=x},[we(qe,{name:"close",size:14})],8,ug)]),x.takeaway||x.remark?($(),P("div",cg,[x.takeaway?($(),P("div",dg,"收获:"+z(x.takeaway),1)):he("",!0),x.remark?($(),P("div",fg,"备注:"+z(x.remark),1)):he("",!0)])):he("",!0)]))),128)),c.value.length?($(),P("div",pg,[ht(" 共 "+z(c.value.length)+" 条事项 ",1),Y.value?($(),P(Ie,{key:0},[ht(" · "+z((Y.value/60).toFixed(1))+" 小时",1)],64)):he("",!0)])):he("",!0)]),we(Dn,{open:!!vt.value,title:"删除确认",message:vt.value?"将删除工作记录「"+vt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:m[11]||(m[11]=x=>vt.value=null),onConfirm:Ne},null,8,["open","message"]),we(Dn,{open:T.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:m[12]||(m[12]=x=>T.value=!1),onConfirm:m[13]||(m[13]=x=>N(!0))},null,8,["open"]),we(vy,{open:fe.value,item:$e.value,projects:f.value,date:e.date,onCancel:m[14]||(m[14]=x=>fe.value=!1),onSave:bt},null,8,["open","item","projects","date"])]))}}),Md=Kt(vg,[["__scopeId","data-v-81276f4c"]]),mg={class:"cal-page"},hg={class:"cal-toolbar"},yg={class:"cal-title num"},gg=["disabled"],bg={class:"card cal-card"},wg={class:"cal-head"},_g={class:"cal-grid"},kg=["title","onClick"],xg={class:"cal-marks"},Cg={key:0,class:"drawer"},$g={class:"drawer-head"},Sg={class:"drawer-body"},Eg=jt({__name:"CalendarView",setup(e){const t=M(ot()),n=st(()=>Number(t.value.slice(0,4))),r=st(()=>Number(t.value.slice(5,7))-1),o=st(()=>n.value+" 年 "+(r.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=st(()=>{const T=(new Date(n.value,r.value,1).getDay()+6)%7,q=new Date(n.value,r.value+1,0).getDate(),Z=[];for(let N=0;N[O.date,O])),se=q[2],j=new Map;for(const O of c.value){if(!O.inMonth)continue;const te=dr(N.get(O.date),O.date,Z,O.date===v),Pe=se.filter(Se=>Se.date===O.date);j.set(O.date,{status:te.status,label:te.label,location:((S=N.get(O.date))==null?void 0:S.location)||"",hasLog:Pe.length>0,hasMilestone:Pe.some(Se=>Se.is_milestone===1)})}f.value=j}pt([n,r],b,{immediate:!0}),pt(cr,()=>{b()});function y(G){var T;return((T=f.value.get(G))==null?void 0:T.status)??""}function _(G){const T=f.value.get(G);return T?G+" · "+T.label+(T.location?" · "+T.location:""):G}function E(G){var T;return!!((T=f.value.get(G))!=null&&T.hasLog)}function C(G){var T;return!!((T=f.value.get(G))!=null&&T.hasMilestone)}function I(){t.value=na(t.value,-1)}function Y(){t.value=na(t.value,1)}function le(){t.value=ot()}const ue=M(null);function ce(G,T){T&&(ue.value=G)}return pt(Vi,G=>{G&&(t.value=G,ue.value=G,Vi.value=null)},{immediate:!0}),(G,T)=>($(),P("div",mg,[l("div",hg,[l("button",{class:"icon-btn",title:"上一月",onClick:I},[we(qe,{name:"chevron-left",size:16})]),l("span",yg,z(o.value),1),l("button",{class:"icon-btn",title:"下一月",onClick:Y},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",disabled:t.value===nn(v),onClick:le},"回到本月",8,gg)]),l("div",bg,[l("div",wg,[($(),P(Ie,null,et(i,q=>l("span",{key:q,class:"cal-week"},z(q),1)),64))]),l("div",_g,[($(!0),P(Ie,null,et(c.value,(q,Z)=>($(),P("button",{key:Z,class:Ge(["cal-cell",{blank:!q.inMonth,weekend:q.weekend,selected:ue.value===q.date,"is-today":q.date===nn(v)}]),title:q.inMonth?_(q.date):void 0,onClick:N=>ce(q.date,q.inMonth)},[q.inMonth?($(),P(Ie,{key:0},[l("span",{class:Ge(["daynum num",{today:q.date===nn(v)}])},z(Number(q.date.slice(8,10))),3),l("span",xg,[y(q.date)?($(),P("span",{key:0,class:Ge(["dot",y(q.date)])},null,2)):he("",!0),E(q.date)?($(),wt(qe,{key:1,name:"check-circle",size:12,class:"mark-log"})):he("",!0),C(q.date)?($(),wt(qe,{key:2,name:"star",size:12,class:"mark-star"})):he("",!0)])],64)):he("",!0)],10,kg))),128))])]),we(Rs,{name:"drawer"},{default:Wn(()=>[ue.value?($(),P("aside",Cg,[l("div",$g,[T[1]||(T[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:T[0]||(T[0]=q=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",Sg,[we(Md,{date:ue.value},null,8,["date"])])])):he("",!0)]),_:1})]))}}),Tg=Kt(Eg,[["__scopeId","data-v-abd71a5b"]]),Ag="modulepreload",Pg=function(e,t){return new URL(e,t).href},Vu={},Id=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(b=>{if(b=Pg(b,r),b in Vu)return;Vu[b]=!0;const y=b.endsWith(".css"),_=y?'[rel="stylesheet"]':"";if(!!r)for(let I=c.length-1;I>=0;I--){const Y=c[I];if(Y.href===b&&(!y||Y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":Ag,y||(C.as="script"),C.crossOrigin="",C.href=b,v&&C.setAttribute("nonce",v),document.head.appendChild(C),y)return new Promise((I,Y)=>{C.addEventListener("load",I),C.addEventListener("error",()=>Y(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 o.then(c=>{for(const f of c||[])f.status==="rejected"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const Og=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},r=(i,c)=>{n.platforms.set(i,c)},o=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=r,n.setPlatform=o,n},Mg=e=>e.CapacitorPlatforms=Og(e),jd=Mg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});jd.addPlatform;jd.setPlatform;var ir;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ir||(ir={}));class _i extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const Ig=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"},jg=e=>{var t,n,r,o,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,y=()=>c!==null?c.name:Ig(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||y,E=()=>_()!=="web",C=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||E,I=N=>{const se=T.get(N);return!!(se!=null&&se.platforms.has(_())||ue(N))},Y=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||I,le=N=>{var se;return(se=f.PluginHeaders)===null||se===void 0?void 0:se.find(j=>j.name===N)},ue=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||le,ce=N=>e.console.error(N),G=(N,se,j)=>Promise.reject(`${j} does not have an implementation of "${se}".`),T=new Map,q=(N,se={})=>{const j=T.get(N);if(j)return console.warn(`Capacitor plugin "${N}" already registered. Cannot register plugins twice.`),j.proxy;const S=_(),O=ue(N);let te;const Pe=async()=>(!te&&S in se?te=typeof se[S]=="function"?te=await se[S]():te=se[S]:c!==null&&!te&&"web"in se&&(te=typeof se.web=="function"?te=await se.web():te=se.web),te),Se=(Ee,De)=>{var $e,fe;if(O){const je=O==null?void 0:O.methods.find(ct=>De===ct.name);if(je)return je.rtype==="promise"?ct=>f.nativePromise(N,De.toString(),ct):(ct,bt)=>f.nativeCallback(N,De.toString(),ct,bt);if(Ee)return($e=Ee[De])===null||$e===void 0?void 0:$e.bind(Ee)}else{if(Ee)return(fe=Ee[De])===null||fe===void 0?void 0:fe.bind(Ee);throw new _i(`"${N}" plugin is not implemented on ${S}`,ir.Unimplemented)}},ye=Ee=>{let De;const $e=(...fe)=>{const je=Pe().then(ct=>{const bt=Se(ct,Ee);if(bt){const _t=bt(...fe);return De=_t==null?void 0:_t.remove,_t}else throw new _i(`"${N}.${Ee}()" is not implemented on ${S}`,ir.Unimplemented)});return Ee==="addListener"&&(je.remove=async()=>De()),je};return $e.toString=()=>`${Ee.toString()}() { [capacitor code] }`,Object.defineProperty($e,"name",{value:Ee,writable:!1,configurable:!1}),$e},Ae=ye("addListener"),Ue=ye("removeListener"),de=(Ee,De)=>{const $e=Ae({eventName:Ee},De),fe=async()=>{const ct=await $e;Ue({eventName:Ee,callbackId:ct},De)},je=new Promise(ct=>$e.then(()=>ct({remove:fe})));return je.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await fe()},je},ke=new Proxy({},{get(Ee,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return O?de:Ae;case"removeListener":return Ue;default:return ye(De)}}});return v[N]=ke,T.set(N,{name:N,proxy:ke,platforms:new Set([...Object.keys(se),...O?[S]:[]])}),ke},Z=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||q;return f.convertFileSrc||(f.convertFileSrc=N=>N),f.getPlatform=_,f.handleError=ce,f.isNativePlatform=C,f.isPluginAvailable=Y,f.pluginMethodNoop=G,f.registerPlugin=Z,f.Exception=_i,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Dg=e=>e.Capacitor=jg(e),lr=Dg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Dd=lr.registerPlugin;lr.Plugins;class Ld{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const o=this.listeners[t];if(!o){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}o.forEach(i=>i(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new lr.Exception(t,ir.Unimplemented)}unavailable(t="not available"){return new lr.Exception(t,ir.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const Bu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Uu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Lg extends Ld{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Uu(o).trim(),i=Uu(i).trim(),n[o]=i}),n}async setCookie(t){try{const n=Bu(t.key),r=Bu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${o}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Dd("CapacitorCookies",{web:()=>new Lg});const Kg=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),Rg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,i,c)=>(o[i]=e[t[c]],o),{})},Fg=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[i,c]=o;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}`),`${r}&${v}`},"").substr(1):null,Ng=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=Rg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class Vg extends Ld{async request(t){const n=Ng(t,t.webFetchExtra),r=Fg(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,i=await fetch(o,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Kg(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const y={};return i.headers.forEach((_,E)=>{y[E]=_}),{data:v,headers:y,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"}))}}Dd("CapacitorHttp",{web:()=>new Vg});async function Ea(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(lr.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Id(async()=>{const{Filesystem:b,Directory:y,Encoding:_}=await import("./index-_jYZgWOD.js");return{Filesystem:b,Directory:y,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 r=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");return i.href=o,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Bg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Ea},Symbol.toStringTag,{value:"Module"})),Ug={class:"detail-page"},qg={class:"card toolbar"},Hg={class:"nav-row"},zg=["value"],Wg=["disabled"],Gg={class:"exp-row"},Yg={class:"seg"},Jg=["disabled"],Xg=jt({__name:"TodayView",setup(e){const t=M(ot()),n=st(()=>t.value===ot());function r(){t.value=Vt(t.value,-1)}function o(){t.value=Vt(t.value,1)}function i(){t.value=ot()}const c=M("day"),f=M(ot()),v=M(ot()),b=M(!1);function y(){if(c.value==="day")return{start:t.value,end:t.value,label:t.value};if(c.value==="week"){const C=Zs(f.value);return{start:C,end:Vt(C,6),label:C+"_"+Vt(C,6)}}if(c.value==="month"){const C=f.value.slice(0,4),I=f.value.slice(5,7),Y=new Date(Number(C),Number(I),0).getDate();return{start:C+"-"+I+"-01",end:C+"-"+I+"-"+Y,label:C+"-"+I}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:C,end:I,label:Y}=y(),[le,ue,ce,G]=await Promise.all([vs(),Xr(C,I),Qr(C,I),ar(!0)]),T=new Map(G.map(j=>[j.id,j.name])),q=["# 工作详情 "+Y,""],Z=["周日","周一","周二","周三","周四","周五","周六"];let N=C,se=0;for(;N<=I&&se<400;){const j=ce.filter(O=>O.date===N),S=ue.find(O=>O.date===N);if(S||j.length){if(q.push("## "+N+" "+Z[new Date(N+"T00:00:00").getDay()],""),S&&(S.clock_in_at||S.kind==="makeup")){const O=dr(S,N,le,N===ot()),te=[wn(S.clock_in_at),"–",wn(S.clock_out_at),"·",O.label];S.location&&te.push("· 地点:"+S.location),q.push("考勤:"+te.join(" "),"")}for(const O of j){const te=O.project_id&&T.get(O.project_id)||"",Pe="- 【"+qr(O.category)+"】"+O.content+(O.minutes?"("+O.minutes+" 分钟)":"")+(te?" @"+te:"");q.push(Pe),O.takeaway&&q.push(" - 收获:"+O.takeaway),O.needs_followup===1&&O.remark?q.push(" - 待跟进:"+O.remark):O.remark&&q.push(" - 备注:"+O.remark)}q.push("")}N=Vt(N,1),se++}await Ea("工作详情_"+Y+".md",q.join(` +`)),Fe("已导出 Markdown")}finally{b.value=!1}}}function E(C){const I=C.target.value;I&&(t.value=I)}return pt(t,C=>{f.value=C,c.value==="custom"&&(v.value=C)}),(C,I)=>($(),P("div",Ug,[l("div",qg,[l("div",Hg,[l("button",{class:"icon-btn",title:"前一天",onClick:r},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Ge(["date-title num",{"is-today":n.value}])},z(nn(cd)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[we(qe,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:E},null,40,zg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Wg)]),I[7]||(I[7]=l("div",{class:"tool-sep"},null,-1)),l("div",Gg,[I[6]||(I[6]=l("span",{class:"muted exp-label"},"导出",-1)),l("div",Yg,[l("button",{class:Ge(["seg-btn",{active:c.value==="day"}]),onClick:I[0]||(I[0]=Y=>c.value="day")},"指定日",2),l("button",{class:Ge(["seg-btn",{active:c.value==="week"}]),onClick:I[1]||(I[1]=Y=>c.value="week")},"当周",2),l("button",{class:Ge(["seg-btn",{active:c.value==="month"}]),onClick:I[2]||(I[2]=Y=>c.value="month")},"当月",2),l("button",{class:Ge(["seg-btn",{active:c.value==="custom"}]),onClick:I[3]||(I[3]=Y=>c.value="custom")},"自定义",2)]),c.value!=="day"?Me(($(),P("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":I[4]||(I[4]=Y=>f.value=Y)},null,512)),[[Re,f.value]]):he("",!0),c.value==="custom"?Me(($(),P("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":I[5]||(I[5]=Y=>v.value=Y)},null,512)),[[Re,v.value]]):he("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,Jg)])]),we(Md,{date:t.value},null,8,["date"])]))}}),Qg=Kt(Xg,[["__scopeId","data-v-2bb84c76"]]),Zg={class:"plan-page"},eb={class:"blk-head"},tb={key:0,class:"card empty muted"},nb={class:"goal-main"},sb={class:"goal-line"},rb={class:"tag"},ob={class:"goal-name"},ab={class:"muted num goal-range"},ib={class:"goal-bar"},lb={class:"muted num goal-meta"},ub={class:"goal-ops"},cb=["onClick"],db=["onClick"],fb={class:"blk-head day-head"},pb={class:"blk-head-text"},vb={class:"muted blk-sub num"},mb={class:"day-ops"},hb={class:"card list-card"},yb={key:0,class:"empty muted"},gb={class:"pi-time num"},bb={class:"muted"},wb={class:"pi-main"},_b={class:"pi-title"},kb={class:"tag"},xb={key:0,class:"tag tag-goal"},Cb={key:1,class:"state-done"},$b={key:2,class:"state-skip"},Sb={key:0,class:"muted pi-note"},Eb={class:"muted pi-meta num"},Tb={key:0,class:"timer-live"},Ab={class:"pi-ops"},Pb=["onClick"],Ob=["onClick"],Mb=["onClick"],Ib=["onClick"],jb=["onClick"],Db=["onClick"],Lb={class:"dialog",role:"dialog","aria-label":"计划"},Kb={class:"dialog-head"},Rb={class:"dialog-title"},Fb={class:"dialog-body"},Nb={class:"form-row"},Vb={class:"form-row"},Bb=["value"],Ub={class:"form-row two"},qb={class:"form-row"},Hb={key:0,class:"form-error"},zb={class:"dialog-btns"},Wb={class:"dialog",role:"dialog","aria-label":"长期计划"},Gb={class:"dialog-head"},Yb={class:"dialog-title"},Jb={class:"dialog-body"},Xb={class:"form-row"},Qb={class:"form-row"},Zb=["value"],ew={class:"form-row two"},tw={class:"form-row"},nw={key:0,class:"form-error"},sw={class:"dialog-btns"},rw=jt({__name:"PlanView",setup(e){const t=M([]),n=M({}),r=M(!1),o=M(null),i=M(""),c=M("学习"),f=M(ot()),v=M(Vt(ot(),6)),b=M(""),y=M(""),_=M(null);function E(){o.value=null,i.value="",c.value="学习",f.value=ot(),v.value=Vt(ot(),6),b.value="",y.value="",r.value=!0}function C(m){o.value=m,i.value=m.title,c.value=m.kind,f.value=m.start_date,v.value=m.end_date,b.value=m.note||"",y.value="",r.value=!0}async function I(){if(!i.value.trim()){y.value="请填写计划名称";return}if(v.valuele.value===ot());async function Z(){ce.value=!0;const[m,x,D]=await Promise.all([yh(le.value),Eh(),Sh()]);ue.value=m,t.value=x;const ae={};for(const W of D)ae[String(W.goalId)]={done:W.done,total:W.total};n.value=ae,ce.value=!1}pt(le,Z),pt(cr,Z),ln(()=>{Z(),T=window.setInterval(()=>{G.value=Date.now()},3e4)}),Ln(()=>{T&&window.clearInterval(T)});function N(){le.value=Vt(le.value,-1)}function se(){le.value=Vt(le.value,1)}function j(){le.value=ot()}const S=st(()=>{const m=ue.value.length,x=ue.value.filter(A=>A.status==="done").length,D=ue.value.reduce((A,X)=>A+O(X),0),ae=ue.value.reduce((A,X)=>A+(X.actual_minutes||0),0);let W=0;const ee=Pe.value;if(ee){const A=ue.value.find(X=>X.id===ee);A&&(W=Se(A))}return{total:m,done:x,plannedMin:D,actualMin:ae+W}});function O(m){const[x,D]=m.start_time.split(":").map(Number),[ae,W]=m.end_time.split(":").map(Number);return Math.max(0,ae*60+W-(x*60+D))}function te(m){return m<60?m+" 分钟":Math.floor(m/60)+" 小时 "+m%60+" 分"}const Pe=st(()=>{const m=ue.value.find(x=>!!x.timer_started_at);return m?m.id:null});function Se(m){if(!m.timer_started_at)return m.actual_minutes||0;const x=Math.max(0,Math.round((G.value-new Date(m.timer_started_at).getTime())/6e4));return(m.actual_minutes||0)+x}async function ye(m){m.timer_started_at?(await Sa(m.id),Fe("已停止计时:"+m.title)):(await xh(m.id),Fe("开始计时:"+m.title)),Lm(),await Z()}async function Ae(m,x){await kh(m.id,x),await Z()}const Ue=M(!1),de=M(null),ke=M(""),Ee=M("学习"),De=M("09:00"),$e=M("10:00"),fe=M(""),je=M(""),ct=["学习","健身","自律","工作","阅读","其他"];function bt(){de.value=null,ke.value="",Ee.value="学习",De.value="09:00",$e.value="10:00",fe.value="",je.value="",Ue.value=!0}function _t(m){de.value=m.id,ke.value=m.title,Ee.value=m.kind,De.value=m.start_time,$e.value=m.end_time,fe.value=m.note||"",je.value="",Ue.value=!0}async function Bt(){if(!ke.value.trim()){je.value="请填写计划内容";return}if($e.value<=De.value){je.value="结束时间需晚于开始时间";return}de.value?(await wh(de.value,{title:ke.value.trim(),kind:Ee.value,start_time:De.value,end_time:$e.value,note:fe.value}),Fe("计划已更新")):(await bh({date:le.value,start_time:De.value,end_time:$e.value,title:ke.value,kind:Ee.value,note:fe.value}),Fe("计划已添加")),Ue.value=!1,await Z()}async function vt(m){await _h(m.id),Fe("已删除"),await Z()}const Ne=["周日","周一","周二","周三","周四","周五","周六"];function g(m){return Ne[Fs(m).getDay()]}return(m,x)=>($(),P("div",Zg,[l("div",eb,[x[18]||(x[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:E},[we(qe,{name:"plus",size:14}),x[17]||(x[17]=ht(" 新建长期计划",-1))])]),t.value.length?he("",!0):($(),P("div",tb," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),P(Ie,null,et(t.value,D=>($(),P("div",{key:D.id,class:"card goal-card"},[l("div",nb,[l("div",sb,[l("span",rb,z(D.kind),1),l("span",ob,z(D.title),1),l("span",ab,z(D.start_date.slice(5))+" ~ "+z(D.end_date.slice(5)),1)]),l("div",ib,[l("span",{class:"goal-bar-fill",style:qn({width:(n.value[String(D.id)]?Math.round(n.value[String(D.id)].done/Math.max(1,n.value[String(D.id)].total)*100):0)+"%",background:n.value[String(D.id)]&&n.value[String(D.id)].done>=n.value[String(D.id)].total&&n.value[String(D.id)].total>0?"var(--ok)":"var(--accent)"})},null,4)]),l("div",lb,[ht(z(n.value[String(D.id)]?n.value[String(D.id)].done+"/"+n.value[String(D.id)].total+" 天已完成":"0/"+(n.value[String(D.id)]?n.value[String(D.id)].total:0)+" 天")+" ",1),D.note?($(),P(Ie,{key:0},[ht(" · "+z(D.note),1)],64)):he("",!0)])]),l("div",ub,[l("button",{class:"icon-btn",title:"编辑",onClick:ae=>C(D)},[we(qe,{name:"edit",size:14})],8,cb),l("button",{class:"icon-btn",title:"删除",onClick:ae=>_.value=D},[we(qe,{name:"close",size:14})],8,db)])]))),128)),l("div",fb,[l("div",pb,[x[21]||(x[21]=l("div",{class:"blk-title"},"每日安排",-1)),l("div",vb,[ht(" 共 "+z(S.value.total)+" 项 · 完成 "+z(S.value.done)+" 项 · 计划 "+z(te(S.value.plannedMin))+" · 实际投入 "+z(te(S.value.actualMin))+" ",1),Pe.value?($(),P(Ie,{key:0},[x[19]||(x[19]=ht(" · ",-1)),x[20]||(x[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):he("",!0)])]),l("div",mb,[l("button",{class:"icon-btn",title:"前一天",onClick:N},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Ge(["date-chip num",{today:q.value}])},z(le.value.slice(5))+" "+z(g(le.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:se},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:Ge(["btn btn-sm",{"btn-primary":!q.value}]),onClick:j},"今天",2),l("button",{class:"btn btn-primary btn-sm",onClick:bt},[we(qe,{name:"plus",size:14}),x[22]||(x[22]=ht(" 添加计划",-1))])])]),l("div",hb,[!ce.value&&!ue.value.length?($(),P("div",yb,"今天还没有计划,点「添加计划」开始规划。")):he("",!0),($(!0),P(Ie,null,et(ue.value,D=>($(),P("div",{key:D.id,class:Ge(["plan-item",{done:D.status==="done",skip:D.status==="skip",running:!!D.timer_started_at}])},[l("div",gb,[ht(z(D.start_time),1),l("span",bb," - "+z(D.end_time),1)]),l("div",wb,[l("div",_b,[l("span",kb,z(D.kind),1),D.goal_id?($(),P("span",xb,"长期")):he("",!0),l("span",{class:Ge(["pi-text",{strike:D.status==="done"}])},z(D.title),3),D.status==="done"?($(),P("span",Cb,"已完成")):D.status==="skip"?($(),P("span",$b,"已跳过")):he("",!0)]),D.note?($(),P("div",Sb,z(D.note),1)):he("",!0),l("div",Eb,[D.timer_started_at?($(),P("span",Tb,"计时中 · 已 "+z(Se(D))+" 分钟",1)):D.actual_minutes>0?($(),P(Ie,{key:1},[ht("实际投入 "+z(D.actual_minutes)+" 分钟",1)],64)):he("",!0)])]),l("div",Ab,[D.status!=="done"?($(),P("button",{key:0,class:Ge(["btn btn-xs",{"timer-on":!!D.timer_started_at}]),onClick:ae=>ye(D)},z(D.timer_started_at?"停止计时":"计时"),11,Pb)):he("",!0),D.status!=="done"?($(),P("button",{key:1,class:"btn btn-xs",onClick:ae=>Ae(D,"done")},"完成",8,Ob)):he("",!0),D.status==="todo"?($(),P("button",{key:2,class:"btn btn-xs",onClick:ae=>Ae(D,"skip")},"跳过",8,Mb)):he("",!0),D.status!=="todo"?($(),P("button",{key:3,class:"btn btn-xs",onClick:ae=>Ae(D,"todo")},"恢复",8,Ib)):he("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:ae=>_t(D)},[we(qe,{name:"edit",size:14})],8,jb),l("button",{class:"icon-btn",title:"删除",onClick:ae=>vt(D)},[we(qe,{name:"close",size:14})],8,Db)])],2))),128))]),($(),wt(zn,{to:"body"},[Ue.value?($(),P("div",{key:0,class:"mask",onClick:x[7]||(x[7]=Nt(D=>Ue.value=!1,["self"]))},[l("div",Lb,[l("div",Kb,[l("span",Rb,z(de.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:x[0]||(x[0]=D=>Ue.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",Fb,[l("div",Nb,[x[23]||(x[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[1]||(x[1]=D=>ke.value=D),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(Bt,["enter"])},null,544),[[Re,ke.value]])]),l("div",Vb,[x[24]||(x[24]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":x[2]||(x[2]=D=>Ee.value=D)},[($(),P(Ie,null,et(ct,D=>l("option",{key:D,value:D},z(D),9,Bb)),64))],512),[[ps,Ee.value]])]),l("div",Ub,[l("div",null,[x[25]||(x[25]=l("label",null,"开始时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":x[3]||(x[3]=D=>De.value=D)},null,512),[[Re,De.value]])]),l("div",null,[x[26]||(x[26]=l("label",null,"结束时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":x[4]||(x[4]=D=>$e.value=D)},null,512),[[Re,$e.value]])])]),l("div",qb,[x[27]||(x[27]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[5]||(x[5]=D=>fe.value=D),placeholder:"目标、资料、提醒等",onKeydown:Mt(Bt,["enter"])},null,544),[[Re,fe.value]])]),je.value?($(),P("div",Hb,z(je.value),1)):he("",!0)]),l("div",zb,[l("button",{class:"btn btn-sm",onClick:x[6]||(x[6]=D=>Ue.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Bt},z(de.value?"保存":"添加"),1)])])])):he("",!0)])),($(),wt(zn,{to:"body"},[r.value?($(),P("div",{key:0,class:"mask",onClick:x[15]||(x[15]=Nt(D=>r.value=!1,["self"]))},[l("div",Wb,[l("div",Gb,[l("span",Yb,z(o.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:x[8]||(x[8]=D=>r.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",Jb,[l("div",Xb,[x[28]||(x[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[9]||(x[9]=D=>i.value=D),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Re,i.value]])]),l("div",Qb,[x[29]||(x[29]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":x[10]||(x[10]=D=>c.value=D)},[($(),P(Ie,null,et(ct,D=>l("option",{key:D,value:D},z(D),9,Zb)),64))],512),[[ps,c.value]])]),l("div",ew,[l("div",null,[x[30]||(x[30]=l("label",null,"开始日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":x[11]||(x[11]=D=>f.value=D)},null,512),[[Re,f.value]])]),l("div",null,[x[31]||(x[31]=l("label",null,"结束日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":x[12]||(x[12]=D=>v.value=D)},null,512),[[Re,v.value]])])]),l("div",tw,[x[32]||(x[32]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":x[13]||(x[13]=D=>b.value=D)},null,512),[[Re,b.value]])]),y.value?($(),P("div",nw,z(y.value),1)):he("",!0),x[33]||(x[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",sw,[l("button",{class:"btn btn-sm",onClick:x[14]||(x[14]=D=>r.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:I},z(o.value?"保存":"创建"),1)])])])):he("",!0)])),we(Dn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:x[16]||(x[16]=D=>_.value=null),onConfirm:Y},null,8,["open","message"])]))}}),ow=Kt(rw,[["__scopeId","data-v-ffd19b28"]]),aw={class:"stats"},iw={class:"cards"},lw={class:"card stat-card"},uw={class:"stat-num num"},cw={class:"card stat-card"},dw={class:"stat-num num"},fw={class:"card stat-card"},pw={class:"stat-num num"},vw={class:"card stat-card"},mw={class:"stat-num num"},hw={class:"card section"},yw={class:"heat"},gw=["title"],bw={class:"two-col"},ww={class:"card section"},_w={class:"bar-label"},kw={class:"bar-track"},xw={class:"muted num bar-num"},Cw={key:0,class:"muted"},$w={class:"card section"},Sw={class:"bar-label"},Ew={class:"bar-track"},Tw={class:"muted num bar-num"},Aw={key:0,class:"muted"},Pw={class:"card section"},Ow={class:"bar-label loc-label"},Mw={class:"bar-track"},Iw={class:"muted num bar-num"},jw={key:0,class:"muted"},Dw=jt({__name:"StatsView",setup(e){const t=M({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=M([]),r=M([]),o=M([]),i=M([]);async function c(){const b=ot(),y="2000-01-01",_=await Promise.all([vs(),Xr(y,b),Qr(y,b),ar(!0)]),E=_[0],C=_[1],I=_[2],Y=_[3],le=C.filter(ye=>ye.clock_in_at||ye.kind==="makeup");let ue=0;for(const ye of le){const Ae=dr(ye,ye.date,E,ye.date===b);ue+=Ae.workedMinutes??0}const ce=new Set(I.map(ye=>ye.date));let G=0,T=b;for(ce.has(T)||(T=Vt(b,-1));ce.has(T);)G++,T=Vt(T,-1);t.value={attendDays:le.length,totalHours:(ue/60).toFixed(1),itemCount:I.length,streak:G};const q=new Map;for(const ye of le){const Ae=ye.location||"未记录";q.set(Ae,(q.get(Ae)||0)+1)}i.value=Array.from(q.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/(le.length||1)*100)})).sort((ye,Ae)=>Ae.count-ye.count);const Z=I.length||1,N=await Zr(),se=new Map;for(const ye of I)se.set(ye.category,(se.get(ye.category)||0)+1);const j=new Set(N);for(const ye of se.keys())j.has(ye)||N.push(ye);r.value=N.map(ye=>{const Ae=se.get(ye)||0;return{key:ye,label:ye,count:Ae,percent:Math.round(Ae/Z*100)}}).filter(ye=>ye.count>0).sort((ye,Ae)=>Ae.count-ye.count);const S=new Map(Y.map(ye=>[ye.id,ye.name])),O=new Map;for(const ye of I){const Ae=ye.project_id?S.get(ye.project_id)||"已删除项目":"无项目";O.set(Ae,(O.get(Ae)||0)+1)}o.value=Array.from(O.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/Z*100)})).sort((ye,Ae)=>Ae.count-ye.count);const te=new Map;for(const ye of I)te.set(ye.date,(te.get(ye.date)||0)+1);const Pe=Zs(b),Se=[];for(let ye=11;ye>=0;ye--){const Ae=Vt(Pe,-7*ye),Ue=[];for(let de=0;de<7;de++){const ke=Vt(Ae,de);Ue.push({date:ke,count:te.get(ke)||0})}Se.push(Ue)}n.value=Se}ln(async()=>{await c()}),pt(cr,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,y){return b+" · "+(y?y+" 条":"无记录")}return(b,y)=>($(),P("div",aw,[l("div",iw,[l("div",lw,[y[0]||(y[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",uw,z(t.value.attendDays),1)]),l("div",cw,[y[1]||(y[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",dw,z(t.value.totalHours),1)]),l("div",fw,[y[2]||(y[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",pw,z(t.value.itemCount),1)]),l("div",vw,[y[3]||(y[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",mw,z(t.value.streak),1)])]),l("div",hw,[y[4]||(y[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",yw,[($(!0),P(Ie,null,et(n.value,(_,E)=>($(),P("div",{key:E,class:"heat-col"},[($(!0),P(Ie,null,et(_,C=>($(),P("span",{key:C.date,class:Ge(["heat-cell","lv"+f(C.count)]),title:v(C.date,C.count)},null,10,gw))),128))]))),128))]),y[5]||(y[5]=Wp('
少多
',1))]),l("div",bw,[l("div",ww,[y[6]||(y[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),P(Ie,null,et(r.value,_=>($(),P("div",{key:_.key,class:"bar-row"},[l("span",_w,z(_.label),1),l("span",kw,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",xw,z(_.count)+" 条 · "+z(_.percent)+"%",1)]))),128)),r.value.length?he("",!0):($(),P("div",Cw,"暂无数据"))]),l("div",$w,[y[7]||(y[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),P(Ie,null,et(o.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",Sw,z(_.name),1),l("span",Ew,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",Tw,z(_.count)+" 条 · "+z(_.percent)+"%",1)]))),128)),o.value.length?he("",!0):($(),P("div",Aw,"暂无数据"))])]),l("div",Pw,[y[8]||(y[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),P(Ie,null,et(i.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",Ow,z(_.name),1),l("span",Mw,[l("span",{class:"bar-fill",style:qn({width:_.percent+"%"})},null,4)]),l("span",Iw,z(_.count)+" 天 · "+z(_.percent)+"%",1)]))),128)),i.value.length?he("",!0):($(),P("div",jw,"暂无数据"))])]))}}),Lw=Kt(Dw,[["__scopeId","data-v-5469ae68"]]);async function Kw(e,t,n){const r=ot(),o=await Promise.all([vs(),Xr(e,t),Qr(e,t),ar(!0),hh(e,t),Zr()]),i=o[0],c=o[1],f=o[2],v=o[3],b=o[4],y=o[5];let _=0,E=0,C=0;for(const O of c){(O.clock_in_at||O.kind==="makeup")&&_++,O.kind==="makeup"&&C++;const te=dr(O,O.date,i,O.date===r);E+=te.workedMinutes??0}const I=new Map;for(const O of c){if(!(O.clock_in_at||O.kind==="makeup"))continue;const te=O.location||"未记录";I.set(te,(I.get(te)||0)+1)}const Y=Array.from(I.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,te)=>te.count-O.count),le=f.length||1,ue=new Map;for(const O of f)ue.set(O.category,(ue.get(O.category)||0)+1);const ce=new Set(y);for(const O of ue.keys())ce.has(O)||y.push(O);const G=y.map(O=>{const te=ue.get(O)||0;return{key:O,label:O,count:te,percent:Math.round(te/le*100)}}).filter(O=>O.count>0).sort((O,te)=>te.count-O.count),T=new Map(v.map(O=>[O.id,O.name])),q=new Map;for(const O of f){const te=O.project_id?T.get(O.project_id)||"已删除项目":"无项目";q.set(te,(q.get(te)||0)+1)}const Z=Array.from(q.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,te)=>te.count-O.count),N=f.filter(O=>O.is_milestone===1).map(O=>({date:O.date,content:O.content})),se=f.filter(O=>O.needs_followup===1).map(O=>({date:O.date,content:O.content,remark:O.remark||""})),j=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:(E/60).toFixed(1),makeupCount:C,leaveCount:c.filter(O=>O.kind==="leave").length,itemCount:f.length,categoryStats:G,projectStats:Z,locationStats:Y,milestones:N,followups:se,takeaways:j,weekNotes:S}}function Rw(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(r=>r.name!=="未记录");n.length&&t.push("其中:"+n.map(r=>r.name+" "+r.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(r=>r.label+" "+r.percent+"%("+r.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(r=>r.name+" "+r.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((r,o)=>t.push(o+1+". 【成果】"+r.content+"("+r.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(r=>t.push("- 【待跟进】"+r.content+(r.remark?"("+r.date+" 备注:"+r.remark+")":"("+r.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(r=>t.push("- "+r.text+"("+r.date+")")):t.push("(无)");for(const r of e.weekNotes)t.push(""),t.push("### 周记("+r.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(r.highlights||"(无)")),t.push("- 踩的坑:"+(r.challenges||"(无)")),t.push("- 下周计划:"+(r.plan_next||"(无)"));return t.push(""),t.join(` +`)}async function Gi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Fw(e){const t=await Promise.all([Ct("ai_base_url",""),Ct("ai_api_key",""),Ct("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),r=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};r&&(c.Authorization="Bearer "+r);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let E="接口返回 "+b.status;try{const C=await b.json();C&&C.error&&C.error.message&&(E+=":"+C.error.message)}catch{}throw new Error(E)}const y=await b.json(),_=y&&y.choices&&y.choices[0]&&y.choices[0].message&&y.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Nw={class:"report"},Vw={class:"report-toolbar"},Bw={class:"seg"},Uw=["onClick"],qw=["disabled"],Hw=["disabled"],zw={key:0,class:"ai-error"},Ww={class:"report-grid"},Gw={class:"report-left"},Yw={class:"card section"},Jw={class:"section-title"},Xw={class:"muted note-saved"},Qw={class:"card section"},Zw={class:"report-right"},e_={key:0,class:"card section"},t_={class:"sum-row"},n_={class:"num"},s_={class:"sum-row"},r_={class:"num"},o_={class:"sum-row"},a_={class:"num"},i_={class:"sum-row"},l_={class:"num"},u_={class:"sum-row"},c_={class:"num"},d_={class:"muted"},f_={class:"num"},p_={key:0,class:"muted sum-empty"},v_={class:"muted"},m_={key:1,class:"muted sum-empty"},h_={class:"muted"},y_={key:2,class:"muted sum-empty"},g_={class:"muted"},b_={key:3,class:"muted sum-empty"},w_=jt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=M("week"),r=M(Zs(ot())),o=M(ot()),i=M(null),c=M(""),f=M(!1),v=M(!1),b=M(null),y=M(""),_=M(Zs(ot())),E=M(""),C=M(""),I=M(""),Y=M(!1);async function le(){const se=await gl(_.value);E.value=(se==null?void 0:se.highlights)||"",C.value=(se==null?void 0:se.challenges)||"",I.value=(se==null?void 0:se.plan_next)||"",Y.value=!1}async function ue(){await mh(_.value,{highlights:E.value.trim()||null,challenges:C.value.trim()||null,plan_next:I.value.trim()||null}),Y.value=!0,await G()}function ce(se){const j=ot();if(se==="week"){const S=Zs(j);return{start:S,end:Vt(S,6),label:"本周"}}if(se==="month"){const S=j.slice(0,7);return{start:S+"-01",end:j,label:S+" 本月"}}return se==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:r.value,end:o.value,label:r.value+" ~ "+o.value}}async function G(){f.value=!0;const se=ce(n.value),j=await Kw(se.start,se.end,se.label);i.value=j,c.value=Rw(j),f.value=!1}pt(n,G),pt([r,o],()=>{n.value==="custom"&&G()}),ln(async()=>{await le(),await G()});async function T(){const se=ot().replace(/-/g,""),j=await Ea("实习工作总结_"+se+".md",c.value);Fe(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function q(){await Gi(c.value),Fe("总结已复制到剪贴板")}async function Z(){if(v.value)return;y.value="";const se=c.value.trim();if(!se){y.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await Fw(se),Fe("AI 润色完成")}catch(j){b.value=null,y.value=j instanceof Error?j.message:"润色失败"}v.value=!1}function N(){b.value!==null&&(c.value=b.value),b.value=null}return(se,j)=>($(),P("div",Nw,[l("div",Vw,[l("div",Bw,[($(),P(Ie,null,et(t,S=>l("button",{key:S.key,class:Ge(["seg-btn",{active:n.value===S.key}]),onClick:O=>n.value=S.key},z(S.label),11,Uw)),64))]),n.value==="custom"?($(),P(Ie,{key:0},[Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=S=>r.value=S)},null,512),[[Re,r.value]]),j[6]||(j[6]=l("span",{class:"muted"},"至",-1)),Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=S=>o.value=S)},null,512),[[Re,o.value]])],64)):he("",!0),j[10]||(j[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Z},[we(qe,{name:"edit",size:14}),j[7]||(j[7]=ht("AI 润色 ",-1))],8,qw),b.value!==null?($(),P("button",{key:1,class:"btn btn-sm",onClick:N},"还原润色前")):he("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:G},[we(qe,{name:"edit",size:14}),j[8]||(j[8]=ht("重新生成 ",-1))],8,Hw),l("button",{class:"btn btn-sm",onClick:q},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:T},[we(qe,{name:"export",size:14}),j[9]||(j[9]=ht("导出 Markdown ",-1))])]),y.value?($(),P("div",zw,z(y.value),1)):he("",!0),l("div",Ww,[l("div",Gw,[l("div",Yw,[l("div",Jw,"本周周记("+z(_.value)+" 起)",1),j[11]||(j[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=S=>E.value=S),placeholder:"本周最有价值的一件事",onBlur:ue},null,544),[[Re,E.value]]),j[12]||(j[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=S=>C.value=S),placeholder:"遇到的问题与教训",onBlur:ue},null,544),[[Re,C.value]]),j[13]||(j[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=S=>I.value=S),placeholder:"下周准备做什么",onBlur:ue},null,544),[[Re,I.value]]),l("div",Xw,z(Y.value?"已保存":"失焦自动保存"),1)]),l("div",Qw,[j[14]||(j[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Me(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=S=>c.value=S),spellcheck:"false"},null,512),[[Re,c.value]])])]),l("div",Zw,[i.value?($(),P("div",e_,[j[20]||(j[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",t_,[j[15]||(j[15]=l("span",{class:"muted"},"出勤",-1)),l("span",n_,z(i.value.attendDays)+" 天",1)]),l("div",s_,[j[16]||(j[16]=l("span",{class:"muted"},"工时",-1)),l("span",r_,z(i.value.totalHours)+" 小时",1)]),l("div",o_,[j[17]||(j[17]=l("span",{class:"muted"},"补卡",-1)),l("span",a_,z(i.value.makeupCount)+" 次",1)]),l("div",i_,[j[18]||(j[18]=l("span",{class:"muted"},"请假",-1)),l("span",l_,z(i.value.leaveCount)+" 天",1)]),l("div",u_,[j[19]||(j[19]=l("span",{class:"muted"},"记录",-1)),l("span",c_,z(i.value.itemCount)+" 条",1)]),j[21]||(j[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),P(Ie,null,et(i.value.categoryStats,S=>($(),P("div",{key:S.key,class:"sum-row"},[l("span",d_,z(S.label),1),l("span",f_,z(S.count)+" 条 · "+z(S.percent)+"%",1)]))),128)),i.value.categoryStats.length?he("",!0):($(),P("div",p_,"(无)")),j[22]||(j[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),P(Ie,null,et(i.value.milestones,(S,O)=>($(),P("div",{key:"m"+O,class:"sum-item"},[ht(z(S.content),1),l("span",v_,"("+z(S.date)+")",1)]))),128)),i.value.milestones.length?he("",!0):($(),P("div",m_,"(无)")),j[23]||(j[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),P(Ie,null,et(i.value.followups,(S,O)=>($(),P("div",{key:"f"+O,class:"sum-item"},[ht(z(S.content),1),l("span",h_,"("+z(S.date)+")",1)]))),128)),i.value.followups.length?he("",!0):($(),P("div",y_,"(无)")),j[24]||(j[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),P(Ie,null,et(i.value.takeaways,(S,O)=>($(),P("div",{key:"t"+O,class:"sum-item"},[ht(z(S.text),1),l("span",g_,"("+z(S.date)+")",1)]))),128)),i.value.takeaways.length?he("",!0):($(),P("div",b_,"(无)"))])):he("",!0)])])]))}}),__=Kt(w_,[["__scopeId","data-v-7e1b08ed"]]),k_=["aria-label"],x_={class:"dialog-head"},C_={class:"dialog-title"},$_={class:"dialog-body"},S_={class:"form-grid"},E_={class:"field span2"},T_={class:"seg"},A_={class:"field"},P_={class:"field"},O_={class:"field"},M_=["value"],I_={class:"add-cat"},j_=["onKeydown"],D_={key:0,class:"field"},L_={class:"seg"},K_={class:"field span2"},R_={key:0,class:"form-error"},F_={class:"dialog-btns"},N_=jt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=M("expense"),i=M(""),c=M(""),f=M(""),v=M(""),b=M(!1),y=M(!1),_=M(""),E=M(null);function C(T){n.open&&T.key==="Escape"&&r("cancel")}pt(()=>n.open,async T=>{var q;T?(await Y(),o.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,y.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",C),await ur(),(q=E.value)==null||q.focus()):window.removeEventListener("keydown",C)}),Ln(()=>window.removeEventListener("keydown",C)),pt(o,async()=>{await Y(),i.value=I.value[0]||""});const I=M([]);async function Y(){I.value=await Wr(o.value)}const le=M("");async function ue(){const T=le.value.trim();if(T){if(I.value.includes(T)){le.value="";return}I.value.push(T),await Ts(o.value,I.value),i.value=T,le.value=""}}function ce(){return i.value&&I.value.includes(i.value)?i.value:I.value[0]}function G(){const T=String(c.value??"").trim(),q=Number(T);if(!T||!isFinite(q)||q<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Z=o.value==="expense"&&b.value?1:0;r("save",{type:o.value,category:ce(),amount:Math.round(q*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Z,reimbursed:Z&&y.value?1:0})}return(T,q)=>($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:q[12]||(q[12]=Nt(Z=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",x_,[l("span",C_,z(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:q[0]||(q[0]=Z=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",$_,[l("div",S_,[l("div",E_,[q[13]||(q[13]=l("label",null,"类型",-1)),l("div",T_,[l("button",{class:Ge(["seg-btn",{active:o.value==="expense"}]),onClick:q[1]||(q[1]=Z=>o.value="expense")},"支出",2),l("button",{class:Ge(["seg-btn",{active:o.value==="income"}]),onClick:q[2]||(q[2]=Z=>o.value="income")},"收入",2)])]),l("div",A_,[q[14]||(q[14]=l("label",null,"金额(元,必填)",-1)),Me(l("input",{ref_key:"amountInput",ref:E,class:Ge(["input",{invalid:_.value}]),"onUpdate:modelValue":q[3]||(q[3]=Z=>c.value=Z),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,c.value]])]),l("div",P_,[q[15]||(q[15]=l("label",null,"日期(必填)",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":q[4]||(q[4]=Z=>f.value=Z)},null,512),[[Re,f.value]])]),l("div",O_,[q[16]||(q[16]=l("label",null,"分类(可直接新增)",-1)),Me(l("select",{class:"select","onUpdate:modelValue":q[5]||(q[5]=Z=>i.value=Z)},[($(!0),P(Ie,null,et(I.value,Z=>($(),P("option",{key:Z,value:Z},z(Z),9,M_))),128))],512),[[ps,i.value]]),l("div",I_,[Me(l("input",{class:"input add-cat-input","onUpdate:modelValue":q[6]||(q[6]=Z=>le.value=Z),placeholder:"新增分类名",onKeydown:Mt(Nt(ue,["prevent"]),["enter"])},null,40,j_),[[Re,le.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ue},"添加")])]),o.value==="expense"?($(),P("div",D_,[q[17]||(q[17]=l("label",null,"报销状态",-1)),l("div",L_,[l("button",{class:Ge(["seg-btn",{active:!b.value}]),onClick:q[7]||(q[7]=Z=>{b.value=!1,y.value=!1})},"无需报销",2),l("button",{class:Ge(["seg-btn",{active:b.value&&!y.value}]),onClick:q[8]||(q[8]=Z=>{b.value=!0,y.value=!1})},"待报销",2),l("button",{class:Ge(["seg-btn",{active:b.value&&y.value}]),onClick:q[9]||(q[9]=Z=>{b.value=!0,y.value=!0})},"已报销",2)])])):he("",!0),l("div",K_,[q[18]||(q[18]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":q[10]||(q[10]=Z=>v.value=Z),placeholder:"选填"},null,512),[[Re,v.value]])])]),_.value?($(),P("div",R_,z(_.value),1)):he("",!0)]),l("div",F_,[l("button",{class:"btn btn-sm",onClick:q[11]||(q[11]=Z=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:G},"保存")])],8,k_)])):he("",!0)]),_:1})]))}}),V_=Kt(N_,[["__scopeId","data-v-1b57c1af"]]),B_={class:"ledger-page"},U_={class:"ledger-toolbar"},q_={class:"month-title num"},H_={class:"cards"},z_={class:"card stat-card stat-income"},W_={class:"stat-num num amt-income"},G_={class:"card stat-card stat-expense"},Y_={class:"stat-num num"},J_={class:"card stat-card stat-balance"},X_={class:"card stat-card stat-pending"},Q_={class:"stat-num num amt-warn"},Z_={key:0,class:"card sec"},e1={class:"bar-label"},t1={class:"bar-track"},n1={class:"muted num bar-num"},s1={key:1,class:"card section"},r1={class:"form-error"},o1={class:"card table-card"},a1={class:"tx-table"},i1={class:"num","data-label":"日期"},l1={"data-label":"分类"},u1={class:"tag"},c1={class:"td-note","data-label":"备注"},d1={"data-label":"报销"},f1={key:0,class:"muted"},p1={key:1,class:"tx-done"},v1={key:2,class:"tx-pending"},m1={class:"ops-cell"},h1={class:"ops"},y1=["onClick"],g1=["onClick"],b1=["onClick"],w1={key:0},_1={class:"muted table-note num"},k1=jt({__name:"LedgerView",setup(e){const t=M(ot()),n=M([]),r=M(!0),o=M("");ot();const i=M(""),c=M(""),f=M(!1),v=M(null),b=M({type:"expense",category:"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0}),y=M(null),_=st(()=>t.value.slice(0,7)+"-01"),E=st(()=>{const de=Number(t.value.slice(0,4)),ke=Number(t.value.slice(5,7))-1,Ee=new Date(de,ke+1,0).getDate();return t.value.slice(0,7)+"-"+(Ee<10?"0"+Ee:String(Ee))}),C=st(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function I(){r.value=!0;try{n.value=await Kh(_.value,E.value),c.value=""}catch(de){c.value="账目加载失败:"+(de instanceof Error?de.stack||de.message:String(de)),Fe("账目加载失败")}r.value=!1}ln(I),pt(t,I);const Y=M([]),le=M([]);async function ue(){Y.value=await Wr("expense"),le.value=await Wr("income")}ue();const ce=st(()=>n.value.slice().sort((de,ke)=>de.date===ke.date?ke.id-de.id:de.date{let de=0,ke=0,Ee=0;for(const De of n.value)De.type==="income"?de+=De.amount:(ke+=De.amount,De.reimbursable===1&&De.reimbursed!==1&&(Ee+=De.amount));return{income:de,expense:ke,pending:Ee,balance:de-ke}}),T=M("all"),q=M("all"),Z=st(()=>ce.value.filter(de=>!(T.value!=="all"&&de.type!==T.value||q.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||q.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),N=st(()=>{const de=new Map;let ke=0;for(const De of n.value)De.type==="expense"&&(de.set(De.category,(de.get(De.category)||0)+De.amount),ke+=De.amount);const Ee=ke||1;return Array.from(de.entries()).map(De=>({name:De[0],amount:De[1],percent:Math.round(De[1]/Ee*100)})).sort((De,$e)=>$e.amount-De.amount)});function se(de){return(de/100).toFixed(2)}function j(de){return(de.type==="income"?"+":"-")+se(de.amount)}function S(){t.value=na(t.value,-1)}function O(){t.value=na(t.value,1)}function te(){t.value=ot()}pt(o,()=>{i.value&&(i.value="")});async function Pe(de){await Vh(de.id),await I(),Fe("已标记为已报销")}function Se(de){v.value=de.id,b.value={type:de.type,category:de.category,amountYuan:se(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:Y.value[0]||"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function Ae(de){if(v.value){await Fh(v.value,de),f.value=!1,await I(),Fe("账目已更新");return}await Rh({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 I(),Fe("已记一笔")}async function Ue(){y.value&&y.value.id&&await Nh(y.value.id),y.value=null,await I(),Fe("账目已删除")}return(de,ke)=>($(),P("div",B_,[l("div",U_,[l("button",{class:"icon-btn",onClick:S},[we(qe,{name:"chevron-left",size:16})]),l("span",q_,z(C.value),1),l("button",{class:"icon-btn",onClick:O},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:te},"回到本月"),ke[7]||(ke[7]=l("span",{class:"flex1"},null,-1)),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[0]||(ke[0]=Ee=>T.value=Ee)},[...ke[4]||(ke[4]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[ps,T.value]]),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[1]||(ke[1]=Ee=>q.value=Ee)},[...ke[5]||(ke[5]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[ps,q.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ye},[we(qe,{name:"plus",size:14}),ke[6]||(ke[6]=ht(" 记一笔",-1))])]),l("div",H_,[l("div",z_,[ke[8]||(ke[8]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",W_,z(se(G.value.income)),1)]),l("div",G_,[ke[9]||(ke[9]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",Y_,z(se(G.value.expense)),1)]),l("div",J_,[ke[10]||(ke[10]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Ge(["stat-num num",{"amt-income":G.value.balance>=0,"amt-expense":G.value.balance<0}])},z(se(G.value.balance)),3)]),l("div",X_,[ke[11]||(ke[11]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",Q_,z(se(G.value.pending)),1)])]),N.value.length?($(),P("div",Z_,[ke[12]||(ke[12]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),P(Ie,null,et(N.value,Ee=>($(),P("div",{key:Ee.name,class:"bar-row"},[l("span",e1,z(Ee.name),1),l("span",t1,[l("span",{class:"bar-fill",style:qn({width:Ee.percent+"%"})},null,4)]),l("span",n1,z(se(Ee.amount))+" 元 · "+z(Ee.percent)+"%",1)]))),128))])):he("",!0),c.value?($(),P("div",s1,[l("div",r1,z(c.value),1),ke[13]||(ke[13]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):he("",!0),l("div",o1,[l("table",a1,[ke[15]||(ke[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(Ie,null,et(Z.value,Ee=>($(),P("tr",{key:Ee.id},[l("td",i1,z(Ee.date),1),l("td",l1,[l("span",u1,z(Ee.category),1)]),l("td",{class:Ge(["num",Ee.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},z(j(Ee)),3),l("td",c1,z(Ee.note||"--"),1),l("td",d1,[Ee.type!=="expense"||Ee.reimbursable!==1?($(),P("span",f1,"--")):Ee.reimbursed===1?($(),P("span",p1,"已报销")):($(),P("span",v1,"待报销"))]),l("td",m1,[l("div",h1,[Ee.type==="expense"&&Ee.reimbursable===1&&Ee.reimbursed!==1?($(),P("button",{key:0,class:"btn btn-xs",onClick:De=>Pe(Ee)},"标记已报销",8,y1)):he("",!0),l("button",{class:"btn btn-xs",onClick:De=>Se(Ee)},"编辑",8,g1),l("button",{class:"btn btn-xs",onClick:De=>y.value=Ee},"删除",8,b1)])])]))),128)),!Z.value.length&&!r.value?($(),P("tr",w1,[...ke[14]||(ke[14]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):he("",!0)])])]),l("div",_1,"本月 "+z(n.value.length)+" 条 · 当前筛选 "+z(Z.value.length)+" 条",1),we(V_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:ke[2]||(ke[2]=Ee=>f.value=!1),onSave:Ae},null,8,["open","title","initial"]),we(Dn,{open:!!y.value,title:"删除确认",message:y.value?"将删除 "+y.value.date+" 的账目("+y.value.category+" "+se(y.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ke[3]||(ke[3]=Ee=>y.value=null),onConfirm:Ue},null,8,["open","message"])]))}}),x1=Kt(k1,[["__scopeId","data-v-c38f4109"]]),C1={class:"memo-page"},$1={class:"card memo-list"},S1={class:"pane-head"},E1={class:"pane-title"},T1={class:"memo-scroll"},A1=["onClick"],P1={class:"memo-item-title"},O1={class:"muted memo-item-sub"},M1={class:"muted num memo-item-time"},I1={key:0,class:"muted empty"},j1={class:"card memo-editor"},D1={class:"editor-foot"},L1={class:"muted foot-info"},K1=["disabled"],R1=["disabled"],F1={key:1,class:"empty muted editor-empty"},N1=jt({__name:"MemoView",setup(e){const t=M([]),n=M(null),r=M(!1),o=M(""),i=M(""),c=M(null),f=M(null);async function v(){if(t.value=await Oh(),n.value&&n.value.id){const Z=t.value.find(N=>N.id===n.value.id);Z&&(n.value=Z)}}ln(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Ln(()=>window.removeEventListener("keydown",b)),pt(Bi,async Z=>{if(!Z)return;t.value.length||await v();const N=t.value.find(se=>se.id===Z);Bi.value=null,N&&E(N)},{immediate:!0});function b(Z){(Z.ctrlKey||Z.metaKey)&&Z.key.toLowerCase()==="s"&&r.value&&y.value&&(Z.preventDefault(),le())}const y=st(()=>{if(!r.value)return!1;const Z=n.value?n.value.title:"",N=n.value?n.value.content:"";return o.value!==Z||i.value!==N});function _(Z){n.value=Z,r.value=!0,o.value=Z.title,i.value=Z.content}function E(Z){if(!(r.value&&n.value&&n.value.id===Z.id)){if(y.value){f.value={type:"select",memo:Z};return}_(Z)}}function C(){if(y.value){f.value={type:"new"};return}I()}function I(){n.value=null,r.value=!0,o.value="",i.value=""}function Y(){n.value?_(n.value):I()}async function le(){if(!o.value.trim()&&!i.value.trim()){Fe("标题与内容不能都为空");return}if(n.value&&n.value.id)await Ih(n.value.id,o.value,i.value),Fe("备忘已保存");else{const Z=await Mh(o.value,i.value);n.value=Z,o.value=Z.title,i.value=Z.content,Fe("备忘已创建")}await v()}function ue(){n.value&&n.value.id&&(c.value=n.value)}async function ce(){c.value&&c.value.id&&(await jh(c.value.id),Fe("备忘已删除")),c.value=null,await v(),I()}function G(){const Z=f.value;f.value=null,Z&&(Z.type==="select"?_(Z.memo):I())}function T(Z){return(Z.content||"").replace(/\s+/g," ").slice(0,30)}function q(Z){return Z.replace("T"," ").slice(0,16)}return(Z,N)=>($(),P("div",C1,[l("aside",$1,[l("div",S1,[l("span",E1,"备忘录("+z(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),l("div",T1,[($(!0),P(Ie,null,et(t.value,se=>($(),P("div",{key:se.id,class:Ge(["memo-item",{active:r.value&&n.value&&n.value.id===se.id}]),onClick:j=>E(se)},[l("div",P1,z(se.title||"无标题"),1),l("div",O1,z(T(se)||"空"),1),l("div",M1,z(q(se.updated_at)),1)],10,A1))),128)),t.value.length?he("",!0):($(),P("div",I1,"暂无备忘"))])]),l("section",j1,[r.value?($(),P(Ie,{key:0},[Me(l("input",{class:"input title-input","onUpdate:modelValue":N[0]||(N[0]=se=>o.value=se),placeholder:"标题"},null,512),[[Re,o.value]]),Me(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":N[1]||(N[1]=se=>i.value=se),placeholder:"内容"},null,512),[[Re,i.value]]),l("div",D1,[l("span",L1,[y.value?($(),P(Ie,{key:0},[ht("有未保存修改")],64)):n.value&&n.value.id?($(),P(Ie,{key:1},[ht("更新于 "+z(q(n.value.updated_at)),1)],64)):($(),P(Ie,{key:2},[ht("新备忘")],64))]),N[4]||(N[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),P("button",{key:0,class:"btn btn-sm",onClick:ue},"删除")):he("",!0),l("button",{class:"btn btn-sm",disabled:!y.value,onClick:Y},"放弃修改",8,K1),l("button",{class:"btn btn-primary btn-sm",disabled:!y.value,onClick:le},"保存",8,R1)])],64)):($(),P("div",F1,"选择左侧备忘,或点击右上角新建"))]),we(Dn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:N[2]||(N[2]=se=>c.value=null),onConfirm:ce},null,8,["open","message"]),we(Dn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:N[3]||(N[3]=se=>f.value=null),onConfirm:G},null,8,["open"])]))}}),V1=Kt(N1,[["__scopeId","data-v-a0931fc7"]]),B1=["aria-label"],U1={class:"dialog-head"},q1={class:"dialog-title"},H1={class:"dialog-body"},z1={class:"form-grid"},W1={class:"field span2"},G1={class:"field span2"},Y1={class:"field span2"},J1={class:"pwd-row"},X1={class:"field span2"},Q1={key:0,class:"form-error"},Z1={class:"dialog-btns"},e0=jt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M(null);function y(C){n.open&&C.key==="Escape"&&r("cancel")}pt(()=>n.open,async C=>{var I;C?(o.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",y),await ur(),(I=b.value)==null||I.focus()):window.removeEventListener("keydown",y)}),Ln(()=>window.removeEventListener("keydown",y));function _(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",I="!@#$%^&*",Y=crypto.getRandomValues(new Uint8Array(14));let le="";for(let ue=0;ue($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:I[6]||(I[6]=Nt(Y=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",U1,[l("span",q1,z(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:I[0]||(I[0]=Y=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",H1,[l("div",z1,[l("div",W1,[I[7]||(I[7]=l("label",null,"系统名称(必填)",-1)),Me(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":I[1]||(I[1]=Y=>o.value=Y),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),l("div",G1,[I[8]||(I[8]=l("label",null,"账号(必填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":I[2]||(I[2]=Y=>i.value=Y),placeholder:"用户名、工号或邮箱"},null,512),[[Re,i.value]])]),l("div",Y1,[I[9]||(I[9]=l("label",null,"密码(必填)",-1)),l("div",J1,[Me(l("input",{class:"input","onUpdate:modelValue":I[3]||(I[3]=Y=>c.value=Y),placeholder:"输入或点击生成"},null,512),[[Re,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",X1,[I[10]||(I[10]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=Y=>f.value=Y),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),v.value?($(),P("div",Q1,z(v.value),1)):he("",!0)]),l("div",Z1,[l("button",{class:"btn btn-sm",onClick:I[5]||(I[5]=Y=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:E},"保存")])],8,B1)])):he("",!0)]),_:1})]))}}),t0=Kt(e0,[["__scopeId","data-v-2eafe20e"]]),n0={class:"vault-page"},s0={key:0,class:"empty muted"},r0={key:1,class:"card lock-card"},o0={class:"lock-badge"},a0={key:0,class:"form-error"},i0=["disabled"],l0={key:0,class:"form-error"},u0=["disabled"],c0={class:"vault-toolbar"},d0={class:"search-wrap"},f0={class:"card table-card"},p0={class:"cred-table"},v0={class:"td-system"},m0=["onClick"],h0={class:"pwd-cell"},y0={class:"num pwd-text"},g0=["onClick"],b0=["onClick"],w0={class:"td-remark"},_0={class:"td-ops"},k0={class:"ops"},x0=["onClick"],C0=["onClick"],$0={key:0},S0={class:"muted table-note num"},E0={class:"dialog pwd-dialog"},T0={class:"dialog-head"},A0={class:"dialog-body"},P0={class:"vp-field"},O0={class:"vp-field"},M0={class:"vp-field"},I0={key:0,class:"form-error"},j0={class:"dialog-btns"},D0=5*60*1e3,L0=jt({__name:"VaultView",setup(e){const t=M(null),n=M(dm()),r=M(!1),o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M([]),y=M(""),_=M({}),E=M(!1),C=M(null),I=M({system:"",account:"",password:"",remark:""}),Y=M(null),le=M(!1),ue=M(""),ce=M(""),G=M(""),T=M("");async function q(){b.value=await hm(),_.value={}}let Z=null;function N(){Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Fe("长时间未操作,密码库已自动锁定"))},D0)}function se(){n.value&&N()}ln(async()=>{t.value=await fd(),window.addEventListener("click",se),window.addEventListener("keydown",se),n.value&&N()}),Ln(()=>{window.removeEventListener("click",se),window.removeEventListener("keydown",se),Z!==null&&window.clearTimeout(Z)});const j=st(()=>{const $e=y.value.trim().toLowerCase();return $e?b.value.filter(fe=>(fe.system+" "+fe.account+" "+(fe.remark||"")).toLowerCase().includes($e)):b.value});async function S(){if(!r.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==i.value){c.value="两次输入的主密码不一致";return}r.value=!0;try{await fm(o.value),o.value="",i.value="",n.value=!0,N(),await q(),Fe("主密码已设置,密码库已解锁")}catch($e){c.value=$e instanceof Error?$e.message:"设置失败"}r.value=!1}}async function O(){if(!r.value){if(v.value="",!f.value){v.value="请输入主密码";return}r.value=!0;try{await pm(f.value),f.value="",n.value=!0,N(),await q()}catch($e){v.value=$e instanceof Error?$e.message:"解锁失败"}r.value=!1}}function te(){oa(),n.value=!1,b.value=[],_.value={},Z!==null&&window.clearTimeout(Z),Fe("密码库已锁定")}async function Pe($e){const fe=$e.id;if(_.value[fe]){_.value[fe]=!1;return}try{$e.passwordPlain=await gi(fe),_.value[fe]=!0}catch(je){Fe(je instanceof Error?je.message:"解密失败")}}async function Se($e){try{const fe=await gi($e.id);await Gi(fe),Fe("密码已复制")}catch(fe){Fe(fe instanceof Error?fe.message:"复制失败")}}async function ye($e){await Gi($e.account),Fe("账号已复制")}function Ae(){C.value=null,I.value={system:"",account:"",password:"",remark:""},E.value=!0}async function Ue($e){try{const fe=await gi($e.id);C.value=$e.id,I.value={system:$e.system,account:$e.account,password:fe,remark:$e.remark||""},E.value=!0}catch(fe){Fe(fe instanceof Error?fe.message:"解密失败")}}async function de($e){const fe=C.value??void 0;await ym($e,fe),E.value=!1,await q(),Fe(fe?"账号已更新":"账号已添加")}async function ke(){Y.value&&Y.value.id&&(await gm(Y.value.id),Fe("账号已删除")),Y.value=null,await q()}function Ee(){ue.value="",ce.value="",G.value="",T.value="",le.value=!0}async function De(){T.value="";try{const $e=await bm(ue.value,ce.value);le.value=!1,ue.value="",ce.value="",G.value="",Fe("主密码已修改,"+$e+" 条账号密码已重新加密")}catch($e){T.value=$e instanceof Error?$e.message:"修改失败"}}return($e,fe)=>($(),P("div",n0,[t.value===null?($(),P("div",s0,"加载中")):n.value?($(),P(Ie,{key:2},[l("div",c0,[l("div",d0,[we(qe,{name:"search",size:14,class:"search-icon"}),Me(l("input",{class:"input","onUpdate:modelValue":fe[3]||(fe[3]=je=>y.value=je),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,y.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:te},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Ae},"新增账号")]),l("div",f0,[l("table",p0,[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(Ie,null,et(j.value,je=>($(),P("tr",{key:je.id},[l("td",v0,z(je.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ct=>ye(je)},z(je.account),9,m0)]),l("td",null,[l("div",h0,[l("span",y0,z(_.value[je.id]?je.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ct=>Pe(je)},z(_.value[je.id]?"隐藏":"显示"),9,g0),l("button",{class:"btn btn-xs",onClick:ct=>Se(je)},"复制",8,b0)])]),l("td",w0,z(je.remark||"--"),1),l("td",_0,[l("div",k0,[l("button",{class:"btn btn-xs",onClick:ct=>Ue(je)},"编辑",8,x0),l("button",{class:"btn btn-xs",onClick:ct=>Y.value=je},"删除",8,C0)])])]))),128)),j.value.length?he("",!0):($(),P("tr",$0,[...fe[17]||(fe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",S0,"共 "+z(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),P("div",r0,[l("div",o0,[we(qe,{name:"lock",size:26})]),t.value===!1?($(),P(Ie,{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]=je=>o.value=je),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(S,["enter"])},null,544),[[Re,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[1]||(fe[1]=je=>i.value=je),placeholder:"再次输入主密码",onKeydown:Mt(S,["enter"])},null,544),[[Re,i.value]]),c.value?($(),P("div",a0,z(c.value),1)):he("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:S},"完成设置并解锁",8,i0)],64)):($(),P(Ie,{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]=je=>f.value=je),placeholder:"主密码",onKeydown:Mt(O,["enter"])},null,544),[[Re,f.value]]),v.value?($(),P("div",l0,z(v.value),1)):he("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:O},"解锁",8,u0)],64))])),we(t0,{open:E.value,title:C.value?"编辑账号":"新增账号",initial:I.value,onCancel:fe[4]||(fe[4]=je=>E.value=!1),onSave:de},null,8,["open","title","initial"]),we(Dn,{open:!!Y.value,title:"删除确认",message:Y.value?"将删除系统「"+Y.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[5]||(fe[5]=je=>Y.value=null),onConfirm:ke},null,8,["open","message"]),($(),wt(zn,{to:"body"},[we(Rs,{name:"modal"},{default:Wn(()=>[le.value?($(),P("div",{key:0,class:"mask",onClick:fe[11]||(fe[11]=Nt(je=>le.value=!1,["self"]))},[l("div",E0,[l("div",T0,[fe[19]||(fe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:fe[6]||(fe[6]=je=>le.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",A0,[l("div",P0,[fe[20]||(fe[20]=l("label",null,"旧主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[7]||(fe[7]=je=>ue.value=je)},null,512),[[Re,ue.value]])]),l("div",O0,[fe[21]||(fe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[8]||(fe[8]=je=>ce.value=je)},null,512),[[Re,ce.value]])]),l("div",M0,[fe[22]||(fe[22]=l("label",null,"确认新主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[9]||(fe[9]=je=>G.value=je)},null,512),[[Re,G.value]])]),T.value?($(),P("div",I0,z(T.value),1)):he("",!0),fe[23]||(fe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",j0,[l("button",{class:"btn btn-sm",onClick:fe[10]||(fe[10]=je=>le.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):he("",!0)]),_:1})]))]))}}),K0=Kt(L0,[["__scopeId","data-v-6d2745bc"]]);function R0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function qu(e,t){const r="\uFEFF"+t.map(f=>f.map(R0).join(",")).join(`\r +`);if(lr.isNativePlatform()){const{downloadText:f}=await Id(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Bg);return{downloadText:v}},void 0,import.meta.url);return f(e,r)}const o=new Blob([r],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(o),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const F0={class:"settings"},N0={class:"card section"},V0={class:"muted acc-line"},B0={class:"ai-grid"},U0={class:"rule-item"},q0={class:"rule-item"},H0={class:"rule-item"},z0={key:0,class:"form-error"},W0={class:"rule-save"},G0={class:"card section"},Y0={class:"rule-grid"},J0={class:"rule-item"},X0={class:"rule-item"},Q0={class:"rule-item"},Z0={class:"rule-item"},ek={class:"rule-item"},tk={class:"card section"},nk={class:"proj-add"},sk={key:0,class:"muted proj-tip"},rk=["onKeydown"],ok=["onClick"],ak=["onClick"],ik=["onClick"],lk={key:1,class:"muted"},uk={class:"card section"},ck={class:"card section"},dk={class:"muted acc-line"},fk={class:"rule-save"},pk=["disabled"],vk={key:0,class:"muted acc-line"},mk={key:1,class:"form-error"},hk={key:2,class:"form-error"},yk={class:"card section"},gk={class:"ai-grid"},bk={class:"rule-item"},wk={class:"rule-item"},_k={class:"rule-item"},kk={class:"card section"},xk={class:"cat-block"},Ck={class:"cat-head"},$k={class:"cat-chips"},Sk=["onClick"],Ek=["onClick"],Tk={class:"cat-block"},Ak={class:"cat-head"},Pk={class:"cat-chips"},Ok=["onClick"],Mk=["onClick"],Ik={class:"cat-block"},jk={class:"cat-head"},Dk={class:"cat-chips"},Lk=["onClick"],Kk=["onClick"],Rk={class:"card section"},Fk={class:"backup-row"},Nk={key:0,class:"import-error"},Vk=jt({__name:"SettingsView",setup(e){var W;const t=M({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=M([]),r=M(""),o=M(""),i=M(""),c=M(""),f=M(""),v=M(""),b=M(null),y=M(""),_=M([]),E=M([]),C=M([]);async function I(){_.value=await Zr(),E.value=await Wr("expense"),C.value=await Wr("income")}async function Y(ee){const A=window.prompt("新分类名称");if(!A||!A.trim())return;const X=ee==="log"?_.value:ee==="expense"?E.value:C.value,ne=A.trim();if(X.includes(ne)){Fe("分类已存在");return}const Ce=[...X,ne];ee==="log"?(_.value=Ce,await wi(Ce)):ee==="expense"?(E.value=Ce,await Ts("expense",Ce)):(C.value=Ce,await Ts("income",Ce)),Fe("分类已添加")}async function le(ee,A,X){const ne=window.prompt("修改分类名称",X);if(!ne||!ne.trim()||ne.trim()===X)return;const be=(ee==="log"?_.value:ee==="expense"?E.value:C.value).map((Le,Te)=>Te===A?ne.trim():Le);ee==="log"?(_.value=be,await wi(be)):ee==="expense"?(E.value=be,await Ts("expense",be)):(C.value=be,await Ts("income",be)),Fe("分类已更新(历史记录自动跟随显示)")}async function ue(ee,A){const X=ee==="log"?_.value:ee==="expense"?E.value:C.value;if(X.length<=1){Fe("至少保留一个分类");return}if(!window.confirm("删除分类「"+X[A]+"」?历史记录不受影响。"))return;const ne=X.filter((Ce,be)=>be!==A);ee==="log"?(_.value=ne,await wi(ne)):ee==="expense"?(E.value=ne,await Ts("expense",ne)):(C.value=ne,await Ts("income",ne)),Fe("分类已删除")}const ce=M(null),G=M(null),T=M(""),q=M(((W=zr())==null?void 0:W.username)||""),Z=M(""),N=M(""),se=M(""),j=M(""),S=M(!1),O="0.6.7",te=M(""),Pe=M(""),Se=M(""),ye=M(""),Ae=M(!1),Ue=M("");async function de(){var ee;te.value=((ee=pn())==null?void 0:ee.username)||"",Ue.value=await Vm(),ye.value=er.value}pt(er,ee=>{ye.value=ee});async function ke(){Se.value="";try{await wd(),Fe("云端绑定已重建")}catch(ee){Se.value=ee instanceof Error?ee.message:"绑定失败"}}async function Ee(){if(!Ae.value){Se.value="",ye.value=er.value,Ae.value=!0;try{const ee=await Ui();Ue.value=ee.at,Pe.value="推送 "+ee.pushed+" 条 · 拉取 "+ee.pulled+" 条 · 删除 "+ee.removed+" 条",ye.value="",Fe("同步完成")}catch(ee){Se.value=ee instanceof Error?ee.message:"同步失败"}Ae.value=!1}}async function De(){if(j.value="",N.value!==se.value){j.value="两次输入的新密码不一致";return}try{await jm(Z.value,N.value),Z.value="",N.value="",se.value="",Fe("登录密码已修改")}catch(ee){j.value=ee instanceof Error?ee.message:"修改失败"}}async function $e(){await Dm(),window.location.reload()}async function fe(){t.value=await vs(),n.value=await ar(!0),i.value=(await yl()).join(` +`),c.value=await Ct("ai_base_url",""),f.value=await Ct("ai_api_key",""),v.value=await Ct("ai_model",""),await de(),await I()}async function je(){await It("ai_base_url",c.value.trim()),await It("ai_api_key",f.value.trim()),await It("ai_model",v.value.trim()),Fe("AI 配置已保存")}async function ct(){const ee=ot(),A=await Promise.all([Qr("2000-01-01",ee),ar(!0)]),X=A[0],ne=A[1],Ce=new Map(ne.map(Te=>[Te.id,Te.name])),be=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Te of X)be.push([Te.date,qr(Te.category),Te.project_id&&Ce.get(Te.project_id)||"",Te.content,Te.minutes==null?"":Te.minutes,Te.is_milestone?"是":"",Te.needs_followup?"是":"",Te.takeaway||"",Te.remark||""]);const Le=await qu("工作记录_"+ee.replace(/-/g,"")+".csv",be);Fe(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}async function bt(){const ee=ot(),A=await Promise.all([vs(),Xr("2000-01-01",ee)]),X=A[0],ne=A[1],Ce=["周日","周一","周二","周三","周四","周五","周六"],be=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Te of ne){const Qe=dr(Te,Te.date,X,Te.date===ee);be.push([Te.date,Ce[Fs(Te.date).getDay()],Qe.label,Te.clock_in_at?wn(Te.clock_in_at):"",Te.clock_out_at?wn(Te.clock_out_at):"",Te.location||"",Te.kind==="makeup"?"补卡":Te.kind==="leave"?"休假":"正常",Te.note||""])}const Le=await qu("考勤记录_"+ee.replace(/-/g,"")+".csv",be);Fe(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}ln(fe);async function _t(){await It("work_start",t.value.work_start),await It("work_end",t.value.work_end),await It("grace_minutes",String(t.value.grace_minutes)),await It("lunch_minutes",String(t.value.lunch_minutes)),await It("remind_weekly",t.value.remind_weekly),Fe("打卡规则已保存")}async function Bt(){await Sd(i.value.split(` +`)),Fe("常用地点已保存")}async function vt(){const ee=r.value.trim();if(ee){try{await nh(ee),o.value="",r.value=""}catch{o.value="项目名已存在"}await fe()}}function Ne(ee){b.value=ee.id,y.value=ee.name}async function g(ee){const A=y.value.trim();if(A)try{await sh(ee.id,A),o.value=""}catch{o.value="项目名已存在"}b.value=null,await fe()}async function m(ee){await rh(ee.id,ee.archived!==1),await fe()}async function x(){try{const ee=await Bh(),A=await Ea("实习日志备份_"+ot().replace(/-/g,"")+".json",ee);Fe(A?"备份已导出到:"+A:"备份已导出到系统下载目录")}catch(ee){Fe("导出失败:"+(ee instanceof Error?ee.message:String(ee)))}}function D(ee){const A=ee.target,X=A.files&&A.files[0];if(T.value="",!X)return;const ne=X.name;X.text().then(Ce=>{G.value={name:ne,text:Ce}}),A.value=""}async function ae(){if(G.value)try{await Uh(G.value.text),G.value=null,T.value="",await fe(),Fe("数据导入完成")}catch(ee){G.value=null,T.value=ee instanceof Error?ee.message:"导入失败"}}return(ee,A)=>($(),P("div",F0,[l("div",N0,[A[25]||(A[25]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",V0,"v"+z(nn(O))+" · 当前账号 "+z(q.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",B0,[l("div",U0,[A[22]||(A[22]=l("label",null,"旧登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[0]||(A[0]=X=>Z.value=X)},null,512),[[Re,Z.value]])]),l("div",q0,[A[23]||(A[23]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[1]||(A[1]=X=>N.value=X)},null,512),[[Re,N.value]])]),l("div",H0,[A[24]||(A[24]=l("label",null,"确认新登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":A[2]||(A[2]=X=>se.value=X)},null,512),[[Re,se.value]])])]),j.value?($(),P("div",z0,z(j.value),1)):he("",!0),l("div",W0,[l("button",{class:"btn btn-primary btn-sm",onClick:De},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:A[3]||(A[3]=X=>S.value=!0)},"删除此用户及全部数据")])]),l("div",G0,[A[32]||(A[32]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",Y0,[l("div",J0,[A[26]||(A[26]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":A[4]||(A[4]=X=>t.value.work_start=X)},null,512),[[Re,t.value.work_start]])]),l("div",X0,[A[27]||(A[27]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":A[5]||(A[5]=X=>t.value.work_end=X)},null,512),[[Re,t.value.work_end]])]),l("div",Q0,[A[28]||(A[28]=l("label",null,"迟到宽限(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[6]||(A[6]=X=>t.value.grace_minutes=X)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",Z0,[A[29]||(A[29]=l("label",null,"午休扣除(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[7]||(A[7]=X=>t.value.lunch_minutes=X)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",ek,[A[31]||(A[31]=l("label",null,"周记提醒",-1)),Me(l("select",{class:"select","onUpdate:modelValue":A[8]||(A[8]=X=>t.value.remind_weekly=X)},[...A[30]||(A[30]=[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:_t},"保存规则")])]),l("div",tk,[A[33]||(A[33]=l("div",{class:"section-title"},"项目管理",-1)),l("div",nk,[Me(l("input",{class:"input","onUpdate:modelValue":A[9]||(A[9]=X=>r.value=X),placeholder:"新项目名称",onKeydown:Mt(vt,["enter"])},null,544),[[Re,r.value]]),l("button",{class:"btn btn-sm",onClick:vt},"添加")]),o.value?($(),P("div",sk,z(o.value),1)):he("",!0),($(!0),P(Ie,null,et(n.value,X=>($(),P("div",{key:X.id,class:"proj-row"},[b.value===X.id?($(),P(Ie,{key:0},[Me(l("input",{class:"input","onUpdate:modelValue":A[10]||(A[10]=ne=>y.value=ne),onKeydown:Mt(ne=>g(X),["enter"])},null,40,rk),[[Re,y.value]]),l("button",{class:"btn btn-sm",onClick:ne=>g(X)},"保存",8,ok),l("button",{class:"btn btn-sm",onClick:A[11]||(A[11]=ne=>b.value=null)},"取消")],64)):($(),P(Ie,{key:1},[l("span",{class:Ge(["proj-name",{archived:X.archived===1}])},z(X.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:ne=>Ne(X)},[we(qe,{name:"edit",size:14})],8,ak),l("button",{class:"btn btn-sm",onClick:ne=>m(X)},z(X.archived===1?"恢复":"归档"),9,ik)],64))]))),128)),n.value.length?he("",!0):($(),P("div",lk,"暂无项目,先添加一个"))]),l("div",uk,[A[35]||(A[35]=l("div",{class:"section-title"},"常用地点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":A[12]||(A[12]=X=>i.value=X),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Bt},"保存地点"),A[34]||(A[34]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",ck,[A[36]||(A[36]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",dk,"云端账号:"+z(te.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",fk,[l("button",{class:"btn btn-primary btn-sm",disabled:Ae.value,onClick:Ee},z(Ae.value?"同步中":"立即同步"),9,pk),l("button",{class:"btn btn-sm",onClick:ke},"重新校验连接")]),Pe.value?($(),P("div",vk,"上次同步:"+z(Ue.value||"--")+" · "+z(Pe.value),1)):he("",!0),Se.value?($(),P("div",mk,z(Se.value),1)):he("",!0),ye.value?($(),P("div",hk,"最近自动同步失败:"+z(ye.value)+"(可点「立即同步」重试)",1)):he("",!0)]),l("div",yk,[A[41]||(A[41]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",gk,[l("div",bk,[A[37]||(A[37]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[13]||(A[13]=X=>c.value=X),placeholder:"https://api.example.com/v1"},null,512),[[Re,c.value]])]),l("div",wk,[A[38]||(A[38]=l("label",null,"API Key",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[14]||(A[14]=X=>f.value=X),placeholder:"sk-..."},null,512),[[Re,f.value]])]),l("div",_k,[A[39]||(A[39]=l("label",null,"模型名称",-1)),Me(l("input",{class:"input","onUpdate:modelValue":A[15]||(A[15]=X=>v.value=X),placeholder:"如:deepseek-chat"},null,512),[[Re,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:je},"保存 AI 配置"),A[40]||(A[40]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",kk,[A[45]||(A[45]=l("div",{class:"section-title"},"工作分类",-1)),l("div",xk,[l("div",Ck,[A[42]||(A[42]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:A[16]||(A[16]=X=>Y("log"))},"添加")]),l("div",$k,[($(!0),P(Ie,null,et(_.value,(X,ne)=>($(),P("span",{key:X+ne,class:"cat-chip"},[ht(z(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("log",ne,X)},"改",8,Sk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("log",ne)},"删",8,Ek)]))),128))])]),l("div",Tk,[l("div",Ak,[A[43]||(A[43]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:A[17]||(A[17]=X=>Y("expense"))},"添加")]),l("div",Pk,[($(!0),P(Ie,null,et(E.value,(X,ne)=>($(),P("span",{key:X+ne,class:"cat-chip"},[ht(z(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("expense",ne,X)},"改",8,Ok),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("expense",ne)},"删",8,Mk)]))),128))])]),l("div",Ik,[l("div",jk,[A[44]||(A[44]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:A[18]||(A[18]=X=>Y("income"))},"添加")]),l("div",Dk,[($(!0),P(Ie,null,et(C.value,(X,ne)=>($(),P("span",{key:X+ne,class:"cat-chip"},[ht(z(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>le("income",ne,X)},"改",8,Lk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("income",ne)},"删",8,Kk)]))),128))])])]),l("div",Rk,[A[46]||(A[46]=l("div",{class:"section-title"},"数据备份",-1)),l("div",Fk,[l("button",{class:"btn btn-sm",onClick:x},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:A[19]||(A[19]=X=>{var ne;return(ne=ce.value)==null?void 0:ne.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:ct},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:bt},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:ce,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:D},null,544)]),T.value?($(),P("div",Nk,z(T.value),1)):he("",!0),A[47]||(A[47]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),we(Dn,{open:!!G.value,title:"导入确认",message:G.value?"将从文件「"+G.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:A[20]||(A[20]=X=>G.value=null),onConfirm:ae},null,8,["open","message"]),we(Dn,{open:S.value,title:"删除用户确认",message:"将永久删除云端账号「"+q.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:A[21]||(A[21]=X=>S.value=!1),onConfirm:$e},null,8,["open","message"])]))}}),Bk=Kt(Vk,[["__scopeId","data-v-aad752b5"]]),Uk={class:"tp-main"},qk={class:"tp-title"},Hk={class:"tp-meta"},zk={class:"tp-time num"},Wk=jt({__name:"TimerPanel",setup(e){const t=M(null),n=M(Date.now());let r=null,o=null;async function i(){try{t.value=await gh()}catch{}}const c=st(()=>{const y=t.value;if(!y||!y.timer_started_at)return 0;const _=(y.actual_minutes||0)*60,E=Math.max(0,Math.floor((n.value-new Date(y.timer_started_at).getTime())/1e3));return _+E}),f=st(()=>{const y=c.value,_=Math.floor(y/3600),E=Math.floor(y%3600/60),C=y%60,I=Y=>String(Y).padStart(2,"0");return _>0?_+":"+I(E)+":"+I(C):E+":"+I(C)});async function v(){const y=t.value;y&&(await Sa(y.id),Fe("已停止计时:"+y.title),await i())}function b(){location.hash="#/plan"}return pt(gd,()=>{i()}),ln(()=>{i(),r=window.setInterval(()=>{i()},15e3),o=window.setInterval(()=>{n.value=Date.now()},1e3),window.addEventListener("focus",i)}),Ln(()=>{r!==null&&window.clearInterval(r),o!==null&&window.clearInterval(o),window.removeEventListener("focus",i)}),(y,_)=>($(),wt(Rs,{name:"tp"},{default:Wn(()=>[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",Uk,[l("span",qk,z(t.value.title),1),l("span",Hk,z(t.value.kind)+" · 计时中",1)]),l("span",zk,z(f.value),1),l("span",{class:"tp-stop",role:"button",title:"停止计时",onClick:Nt(v,["stop"])},"停止")])):he("",!0)]),_:1}))}}),Gk=Kt(Wk,[["__scopeId","data-v-a8f9ed22"]]),Yk={class:"admin-page"},Jk={class:"card table-card"},Xk={class:"toolbar"},Qk={key:0,class:"form-error tb-error"},Zk={class:"admin-table"},ex={class:"td-name","data-label":"用户名"},tx={"data-label":"角色"},nx={key:0,class:"role-badge"},sx={key:1,class:"muted"},rx={class:"muted num","data-label":"创建时间"},ox={class:"muted num","data-label":"数据量"},ax={class:"td-ops"},ix={class:"ops"},lx=["onClick"],ux=["disabled","onClick"],cx={key:0},dx={key:1,class:"muted load-line"},fx={class:"dialog",role:"dialog","aria-label":"新增用户"},px={class:"dialog-head"},vx={class:"dialog-body"},mx={class:"form-row"},hx={class:"form-row"},yx={class:"form-row"},gx={key:0,class:"form-error"},bx={class:"dialog-btns"},wx=["disabled"],_x={class:"dialog",role:"dialog","aria-label":"重置密码"},kx={class:"dialog-head"},xx={class:"dialog-title"},Cx={class:"dialog-body"},$x={class:"form-row"},Sx={key:0,class:"form-error"},Ex={class:"dialog-btns"},Tx=["disabled"],Ax=jt({__name:"UserAdminView",setup(e){const t=M([]),n=M(""),r=M(!0),o=M("");async function i(j,S){const O=await Ns();let te=$a();if(!te){const Se=pn(),ye=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ye.ok){const Ae=await ye.json();te=String(Ae.token||""),Hr(te)}}const Pe=await fetch(O+j,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+te},body:S?JSON.stringify(S):void 0});if(Pe.status===401&&pn()){const Se=pn(),ye=await fetch(O+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Se==null?void 0:Se.username,password:Se==null?void 0:Se.password})});if(ye.ok){const Ae=await ye.json();te=String(Ae.token||""),Hr(te);const Ue=await fetch(O+j,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+te},body:S?JSON.stringify(S):void 0});return{ok:Ue.ok,status:Ue.status,data:await Ue.json().catch(()=>({}))}}}return{ok:Pe.ok,status:Pe.status,data:await Pe.json().catch(()=>({}))}}async function c(){r.value=!0,o.value="";const j=await i("/api/admin/users");if(!j.ok){r.value=!1,o.value=j.data&&j.data.error||"加载失败 "+j.status;return}t.value=j.data.users||[],n.value=j.data.me||"",r.value=!1}function f(j){return j<=0?"--":j<1024?j+" B":j<1024*1024?(j/1024).toFixed(1)+" KB":(j/1024/1024).toFixed(2)+" MB"}function v(j){return(j||"").slice(0,10)}const b=M(!1),y=M(""),_=M(""),E=M(""),C=M(""),I=M(!1);function Y(){b.value=!0,C.value="",y.value="",_.value="",E.value=""}async function le(){const j=y.value.trim();if(_.value!==E.value){C.value="两次输入的密码不一致";return}if(_.value.length<6){C.value="密码至少 6 位";return}I.value=!0;const S=await i("/api/admin/users/create",{username:j,password:_.value});if(I.value=!1,!S.ok){C.value=S.data&&S.data.error||"创建失败 "+S.status;return}Fe("用户「"+j+"」已创建"),b.value=!1,await c()}const ue=M(null),ce=M(""),G=M(""),T=M(!1);function q(j){ue.value=j,ce.value="",G.value=""}async function Z(){if(!ue.value)return;if(ce.value.length<6){G.value="密码至少 6 位";return}T.value=!0;const j=await i("/api/admin/users/password",{userId:ue.value.id,newPassword:ce.value});if(T.value=!1,!j.ok){G.value=j.data&&j.data.error||"重置失败 "+j.status;return}Fe("已重置「"+ue.value.username+"」的登录密码"),ue.value=null}const N=M(null);async function se(){if(!N.value)return;const j=await i("/api/admin/users/delete",{userId:N.value.id});if(!j.ok){N.value=null,Fe(j.data&&j.data.error||"删除失败");return}Fe("已删除账号「"+N.value.username+"」及其全部云端数据"),N.value=null,await c()}return ln(c),(j,S)=>($(),P("div",Yk,[l("div",Jk,[l("div",Xk,[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:Y},[we(qe,{name:"plus",size:14}),S[11]||(S[11]=ht(" 新增用户 ",-1))])]),o.value?($(),P("div",Qk,z(o.value),1)):he("",!0),l("table",Zk,[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(Ie,null,et(t.value,O=>($(),P("tr",{key:O.id},[l("td",ex,z(O.username),1),l("td",tx,[O.role==="admin"?($(),P("span",nx,"管理员")):($(),P("span",sx,"普通用户"))]),l("td",rx,z(v(O.created_at)),1),l("td",ox,z(f(O.data_bytes)),1),l("td",ax,[l("div",ix,[l("button",{class:"btn btn-xs",onClick:te=>q(O)},"重置密码",8,lx),l("button",{class:"btn btn-xs btn-danger",disabled:O.id===n.value,onClick:te=>N.value=O},"删除",8,ux)])])]))),128)),!r.value&&!t.value.length?($(),P("tr",cx,[...S[13]||(S[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):he("",!0)])]),r.value?($(),P("div",dx,"加载中")):he("",!0)]),S[20]||(S[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),wt(zn,{to:"body"},[b.value?($(),P("div",{key:0,class:"mask",onClick:S[5]||(S[5]=Nt(O=>b.value=!1,["self"]))},[l("div",fx,[l("div",px,[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(qe,{name:"close",size:16})])]),l("div",vx,[l("div",mx,[S[16]||(S[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":S[1]||(S[1]=O=>y.value=O),placeholder:"如:xiaowang"},null,512),[[Re,y.value]])]),l("div",hx,[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),[[Re,_.value]])]),l("div",yx,[S[18]||(S[18]=l("label",null,"确认密码",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[3]||(S[3]=O=>E.value=O),onKeydown:Mt(le,["enter"])},null,544),[[Re,E.value]])]),C.value?($(),P("div",gx,z(C.value),1)):he("",!0)]),l("div",bx,[l("button",{class:"btn btn-sm",onClick:S[4]||(S[4]=O=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:I.value||!y.value.trim(),onClick:le},z(I.value?"创建中":"创建"),9,wx)])])])):he("",!0)])),($(),wt(zn,{to:"body"},[ue.value?($(),P("div",{key:0,class:"mask",onClick:S[9]||(S[9]=Nt(O=>ue.value=null,["self"]))},[l("div",_x,[l("div",kx,[l("span",xx,"重置「"+z(ue.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:S[6]||(S[6]=O=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",Cx,[l("div",$x,[S[19]||(S[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":S[7]||(S[7]=O=>ce.value=O),onKeydown:Mt(Z,["enter"])},null,544),[[Re,ce.value]])]),G.value?($(),P("div",Sx,z(G.value),1)):he("",!0)]),l("div",Ex,[l("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=O=>ue.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:T.value,onClick:Z},z(T.value?"提交中":"重置"),9,Tx)])])])):he("",!0)])),we(Dn,{open:!!N.value,title:"删除用户确认",message:N.value?"将永久删除云端账号「"+N.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:S[10]||(S[10]=O=>N.value=null),onConfirm:se},null,8,["open","message"])]))}}),Px=Kt(Ax,[["__scopeId","data-v-2d48d2c9"]]),Ox={class:"login-page"},Mx={class:"card login-card"},Ix={class:"login-brand"},jx={class:"brand-icon"},Dx={class:"seg"},Lx=["placeholder"],Kx={key:1,class:"form-error"},Rx=["disabled"],Fx=jt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,r=M("login"),o=M(""),i=M(""),c=M(""),f=M(""),v=M(!1);function b(_){r.value=_,f.value="",c.value=""}async function y(){if(!v.value){f.value="",v.value=!0;try{let _;if(r.value==="login")_=await Am(o.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Pm(o.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,E)=>($(),P("div",Ox,[l("div",Mx,[l("div",Ix,[l("div",jx,[we(qe,{name:"calendar",size:22})]),E[5]||(E[5]=l("div",{class:"login-title"},"实习工作日志",-1)),E[6]||(E[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),E[7]||(E[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",Dx,[l("button",{class:Ge(["seg-btn",{active:r.value==="login"}]),onClick:E[0]||(E[0]=C=>b("login"))},"登录",2),l("button",{class:Ge(["seg-btn",{active:r.value==="create"}]),onClick:E[1]||(E[1]=C=>b("create"))},"创建用户",2)]),Me(l("input",{class:"input","onUpdate:modelValue":E[2]||(E[2]=C=>o.value=C),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(y,["enter"])},null,544),[[Re,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":E[3]||(E[3]=C=>i.value=C),placeholder:r.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(y,["enter"])},null,40,Lx),[[Re,i.value]]),r.value==="create"?Me(($(),P("input",{key:0,type:"password",class:"input","onUpdate:modelValue":E[4]||(E[4]=C=>c.value=C),placeholder:"再次输入密码",onKeydown:Mt(y,["enter"])},null,544)),[[Re,c.value]]):he("",!0),f.value?($(),P("div",Kx,z(f.value),1)):he("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:y},z(r.value==="login"?"登录":"创建并进入"),9,Rx),E[8]||(E[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Nx=Kt(Fx,[["__scopeId","data-v-e9c1c40d"]]),Vx={key:1,class:"app"},Bx={class:"side"},Ux={class:"brand-mark"},qx={class:"side-nav"},Hx={key:0,class:"nav-group"},zx=["data-tip","onClick"],Wx={class:"nav-label"},Gx={class:"side-foot"},Yx={class:"avatar"},Jx={class:"foot-name"},Xx={class:"main"},Qx={class:"topbar"},Zx={class:"title"},eC={class:"gsearch"},tC={key:0,class:"gs-panel"},nC={key:0,class:"gs-group muted"},sC=["onMousedown"],rC={class:"tag"},oC={class:"gs-text"},aC={class:"muted num gs-date"},iC={key:1,class:"gs-group muted"},lC=["onMousedown"],uC={class:"gs-text"},cC={class:"muted gs-sub"},dC={key:1,class:"gs-empty muted"},fC={class:"topbar-actions"},pC=["disabled"],vC={class:"num"},mC={class:"content"},hC={class:"content-inner"},yC={class:"tabbar"},gC=["onClick"],bC={class:"sheet-user num"},wC=["onClick"],_C={class:"sheet-name"},kC={class:"msw"},xC={class:"msw-bar"},CC={class:"msw-results"},$C={key:0,class:"gs-group muted"},SC=["onMousedown"],EC={class:"tag"},TC={class:"gs-text"},AC={class:"muted num gs-date"},PC={key:1,class:"gs-group muted"},OC=["onMousedown"],MC={class:"gs-text"},IC={class:"muted gs-sub"},jC={key:1,class:"gs-empty muted"},DC={class:"toast-wrap"},LC=jt({__name:"App",setup(e){const t=hy(),n=M(zr());async function r(g){n.value=g,ia(g.userId),location.hash="#/calendar",q.value="calendar",await je(),await Ne(),c();try{await wd(),await nr()}catch{}Fe("欢迎,"+g.username);const m=sessionStorage.getItem("dsh_migrate_toast");m&&(sessionStorage.removeItem("dsh_migrate_toast"),Fe("已迁移原有数据 "+m+" 条"))}async function o(){Ae.value=!1,Se.value=!1,zm(),i!==null&&(window.clearInterval(i),i=null),await Mm(),n.value=null,q.value="calendar",location.hash="#/calendar",Fe("已退出登录")}let i=null;function c(){Hm(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{nr()},60*1e3),nr()}const f=M(null),v=M(""),b=M(!1),y=M({logs:[],memos:[]});let _=null;const E=st(()=>!!(y.value.logs.length||y.value.memos.length));function C(){_&&window.clearTimeout(_);const g=v.value;_=window.setTimeout(async()=>{const m=g.trim();if(!m){y.value={logs:[],memos:[]};return}const x=await Promise.all([Dh(m,8),Lh(m,4)]);y.value={logs:x[0],memos:x[1]}},200)}function I(){v.value="",y.value={logs:[],memos:[]},b.value=!1}function Y(g){Vi.value=g.date,Z("calendar"),I()}function le(g){Bi.value=g.id,Z("memo"),I()}function ue(){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 G=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"plan",name:"计划",icon:"plan",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function T(){var m;const g=(location.hash||"").replace("#/","");return!G.some(x=>x.key===g)||g==="admin"&&(((m=zr())==null?void 0:m.username)||"")!=="xionglin"?"calendar":g}const q=M(T());window.addEventListener("hashchange",()=>{q.value=T()});function Z(g){location.hash="#/"+g}const N=st(()=>G.find(g=>g.key===q.value)||G[0]),se=st(()=>{var g;return(((g=n.value)==null?void 0:g.username)||"")==="xionglin"}),j=st(()=>se.value?G:G.filter(g=>g.key!=="admin")),S=st(()=>{const g=G.filter(m=>!te.includes(m.key));return se.value?g:g.filter(m=>m.key!=="admin")}),O=st(()=>S.value.some(g=>g.key===q.value));pt([se,q],()=>{q.value==="admin"&&!se.value&&Z("calendar")},{immediate:!0});const te=["calendar","today","plan","ledger"],Pe=G.filter(g=>te.includes(g.key)),Se=M(!1);function ye(g){Se.value=!1,Z(g)}const Ae=M(!1),Ue=M(null);function de(){Ae.value=!0,window.setTimeout(()=>{var g;return(g=Ue.value)==null?void 0:g.focus()},60)}function ke(g){Y(g),Ae.value=!1}function Ee(g){le(g),Ae.value=!1}const De=M(ot()),$e=M(void 0),fe=M(!1);async function je(){if($e.value=await _n(De.value),fe.value=!1,new Date().getHours()<4){const m=await _n(Vt(De.value,-1));fe.value=!!(m&&m.clock_in_at&&!m.clock_out_at)}}const ct=st(()=>{const g=$e.value;return g&&g.clock_in_at&&!g.clock_out_at?!0:fe.value&&!(g&&g.clock_in_at)}),bt=st(()=>{const g=$e.value;return!!(g&&g.clock_in_at&&g.clock_out_at)}),_t=st(()=>{const g=$e.value;return ct.value?"下班打卡":bt.value?"已打卡 "+wn(g==null?void 0:g.clock_in_at)+" - "+wn(g==null?void 0:g.clock_out_at):"上班打卡"});async function Bt(){if(ct.value)try{await ah()}catch{}else await Ed(De.value);await je(),as()}pt(cr,()=>{n.value&&je()});const vt=M(!1);async function Ne(){if((await vs()).remind_weekly==="off"){vt.value=!1;return}const m=new Date().getDay();if(m===5||m===6||m===0){const x=await gl(Zs(De.value));vt.value=!x||!x.highlights&&!x.challenges&&!x.plan_next}else vt.value=!1}return ln(async()=>{window.addEventListener("keydown",ce),n.value&&(ia(n.value.userId),await je(),await Ne(),c())}),(g,m)=>{var x,D,ae;return n.value?($(),P("div",Vx,[l("nav",Bx,[l("div",{class:"brand",onClick:m[0]||(m[0]=W=>Z("calendar"))},[l("span",Ux,[we(qe,{name:"calendar",size:15})]),m[12]||(m[12]=l("span",{class:"brand-name"},"实习工作日志",-1))]),l("div",qx,[($(!0),P(Ie,null,et(j.value,(W,ee)=>($(),P(Ie,{key:W.key},[ee===0||W.group!==j.value[ee-1].group?($(),P("div",Hx,z(W.group),1)):he("",!0),l("button",{class:Ge(["nav-btn",{active:q.value===W.key}]),"data-tip":W.name,onClick:A=>Z(W.key)},[we(qe,{name:W.icon,size:17},null,8,["name"]),l("span",Wx,z(W.name),1)],10,zx)],64))),128))]),l("div",Gx,[l("span",Yx,z((((x=n.value)==null?void 0:x.username)||"用户").slice(0,1).toUpperCase()),1),l("span",Jx,z((D=n.value)==null?void 0:D.username),1),l("button",{class:"icon-btn",title:"退出登录",onClick:o},[we(qe,{name:"export",size:15})])])]),l("div",Xx,[l("header",Qx,[l("span",Zx,z(N.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:de},[we(qe,{name:"search",size:16})]),l("div",eC,[we(qe,{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:C,onFocus:m[2]||(m[2]=W=>b.value=!0),onBlur:ue,onKeydown:Mt(I,["esc"])},null,544),[[Re,v.value]]),b.value&&v.value.trim()?($(),P("div",tC,[E.value?($(),P(Ie,{key:0},[y.value.logs.length?($(),P("div",nC,"工作记录")):he("",!0),($(!0),P(Ie,null,et(y.value.logs,W=>($(),P("div",{key:"l"+W.id,class:"gs-item",onMousedown:Nt(ee=>Y(W),["prevent"])},[l("span",rC,z(nn(qr)(W.category)),1),l("span",oC,z(W.content),1),l("span",aC,z(W.date),1)],40,sC))),128)),y.value.memos.length?($(),P("div",iC,"备忘录")):he("",!0),($(!0),P(Ie,null,et(y.value.memos,W=>($(),P("div",{key:"m"+W.id,class:"gs-item",onMousedown:Nt(ee=>le(W),["prevent"])},[l("span",uC,z(W.title||"无标题"),1),l("span",cC,z(W.content),1)],40,lC))),128))],64)):($(),P("div",dC,"无匹配结果"))])):he("",!0)]),m[14]||(m[14]=l("span",{class:"flex1"},null,-1)),l("div",fC,[vt.value?($(),P("button",{key:0,class:"week-tip",onClick:m[3]||(m[3]=W=>Z("report"))},[...m[13]||(m[13]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),ht(" 填写本周周记 ",-1)])])):he("",!0),l("button",{class:"btn btn-primary",disabled:bt.value,onClick:Bt},[we(qe,{name:bt.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",vC,z(_t.value),1)],8,pC)])]),l("main",mC,[l("div",hC,[q.value==="calendar"?($(),wt(Tg,{key:0})):q.value==="today"?($(),wt(Qg,{key:1})):q.value==="plan"?($(),wt(ow,{key:2})):q.value==="stats"?($(),wt(Lw,{key:3})):q.value==="report"?($(),wt(__,{key:4})):q.value==="ledger"?($(),wt(x1,{key:5})):q.value==="memo"?($(),wt(V1,{key:6})):q.value==="vault"?($(),wt(K0,{key:7})):q.value==="admin"?($(),wt(Px,{key:8})):($(),wt(Bk,{key:9}))])]),l("nav",yC,[($(!0),P(Ie,null,et(nn(Pe),W=>($(),P("button",{key:W.key,class:Ge(["tab-btn",{active:q.value===W.key}]),onClick:ee=>Z(W.key)},[we(qe,{name:W.icon,size:20},null,8,["name"]),l("span",null,z(W.name),1)],10,gC))),128)),l("button",{class:Ge(["tab-btn",{active:O.value}]),onClick:m[4]||(m[4]=W=>Se.value=!0)},[we(qe,{name:"more",size:20}),m[15]||(m[15]=l("span",null,"更多",-1))],2)]),Se.value?($(),P("div",{key:0,class:"sheet-mask",onClick:m[7]||(m[7]=W=>Se.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",bC,z((ae=n.value)==null?void 0:ae.username),1),($(!0),P(Ie,null,et(S.value,W=>($(),P("button",{key:W.key,class:"sheet-row",onClick:ee=>ye(W.key)},[we(qe,{name:W.icon,size:18},null,8,["name"]),l("span",_C,z(W.name),1),we(qe,{name:"chevron-right",size:14,class:"sheet-go"})],8,wC))),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=>{Se.value=!1,o()})},[we(qe,{name:"close",size:18}),m[16]||(m[16]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):he("",!0),Ae.value?($(),P("div",{key:1,class:"msw-mask",onClick:m[11]||(m[11]=Nt(W=>Ae.value=!1,["self"]))},[l("div",kC,[l("div",xC,[we(qe,{name:"search",size:16,class:"msw-icon"}),Me(l("input",{ref_key:"msInput",ref:Ue,class:"msw-input","onUpdate:modelValue":m[8]||(m[8]=W=>v.value=W),placeholder:"搜索工作记录与备忘录",onInput:C,onKeydown:m[9]||(m[9]=Mt(W=>Ae.value=!1,["esc"]))},null,544),[[Re,v.value]]),l("button",{class:"icon-btn",onClick:m[10]||(m[10]=W=>{I(),Ae.value=!1})},[we(qe,{name:"close",size:16})])]),l("div",CC,[E.value?($(),P(Ie,{key:0},[y.value.logs.length?($(),P("div",$C,"工作记录")):he("",!0),($(!0),P(Ie,null,et(y.value.logs,W=>($(),P("div",{key:"l"+W.id,class:"msw-item",onMousedown:Nt(ee=>ke(W),["prevent"])},[l("span",EC,z(nn(qr)(W.category)),1),l("span",TC,z(W.content),1),l("span",AC,z(W.date),1)],40,SC))),128)),y.value.memos.length?($(),P("div",PC,"备忘录")):he("",!0),($(!0),P(Ie,null,et(y.value.memos,W=>($(),P("div",{key:"m"+W.id,class:"msw-item",onMousedown:Nt(ee=>Ee(W),["prevent"])},[l("span",MC,z(W.title||"无标题"),1),l("span",IC,z(W.content),1)],40,OC))),128))],64)):v.value.trim()?($(),P("div",jC,"无匹配结果")):he("",!0)])])])):he("",!0)]),n.value?($(),wt(Gk,{key:0})):he("",!0),l("div",DC,[we(Pv,{name:"toast"},{default:Wn(()=>[($(!0),P(Ie,null,et(nn(t),W=>($(),P("div",{key:W.id,class:"toast"},z(W.text),1))),128))]),_:1})])])):($(),wt(Nx,{key:0,onLogin:r}))}}}),KC=Kt(LC,[["__scopeId","data-v-7d26fba6"]]);function Bo(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",i=>{i.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const r=document.createElement("div");r.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",r.textContent=e+` +`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(r),n.appendChild(o)}catch{}}async function RC(){const e=await Om();e&&ia(e.userId);const t=Hv(KC);t.config.errorHandler=(n,r,o)=>{const i=n;Bo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.message)||String(n)+` +触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const r=n.reason;Bo("未处理的异步错误(点击空白处关闭)",r&&(r.stack||r.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Bo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}RC().catch(e=>{Bo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Ld as W,Id as _,Ng as b,Dd as r}; diff --git a/intern-log/dist/assets/web-B4MkFHMk.js b/intern-log/dist/assets/web-CEj0vlG8.js similarity index 98% rename from intern-log/dist/assets/web-B4MkFHMk.js rename to intern-log/dist/assets/web-CEj0vlG8.js index 6352ac4..ec2ad1f 100644 --- a/intern-log/dist/assets/web-B4MkFHMk.js +++ b/intern-log/dist/assets/web-CEj0vlG8.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-DP7vL7H5.js";import{Encoding as E}from"./index-B69AvT0j.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-o_Kd7ZbB.js";import{Encoding as E}from"./index-_jYZgWOD.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 418b1f2..b18eaf5 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 b8e9569..c5accb0 100644 --- a/intern-log/package.json +++ b/intern-log/package.json @@ -1,7 +1,7 @@ { "name": "intern-log", "private": true, - "version": "0.6.6", + "version": "0.6.7", "type": "module", "scripts": { "dev": "vite", diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue index 18eb325..e90313e 100644 --- a/intern-log/src/App.vue +++ b/intern-log/src/App.vue @@ -333,6 +333,7 @@ onMounted(async () => {
+
{{ session?.username }}
@@ -42,6 +42,7 @@ onUnmounted(() => window.removeEventListener('keydown', onKey)) diff --git a/intern-log/src/components/log/DayPanel.vue b/intern-log/src/components/log/DayPanel.vue index 1d9f80d..28482ae 100644 --- a/intern-log/src/components/log/DayPanel.vue +++ b/intern-log/src/components/log/DayPanel.vue @@ -420,6 +420,7 @@ async function confirmDelete() { .att-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } .att-cell label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; } .att-val { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; } +.att-val > .num { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; } .val-empty { color: var(--text-3); } .edit-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .time-input { width: 104px; } @@ -444,7 +445,7 @@ async function confirmDelete() { } .item:hover { border-color: var(--border-strong); background: var(--bg-page); } .item-main { display: flex; align-items: center; gap: 8px; min-height: 26px; flex-wrap: wrap; } -.item-content { cursor: text; word-break: break-all; } +.item-content { cursor: text; word-break: break-all; font-weight: 500; } .item-meta { font-size: 12px; } .item-sub { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); diff --git a/intern-log/src/components/log/EditLogDialog.vue b/intern-log/src/components/log/EditLogDialog.vue index f020e36..32bb60c 100644 --- a/intern-log/src/components/log/EditLogDialog.vue +++ b/intern-log/src/components/log/EditLogDialog.vue @@ -146,6 +146,13 @@ function save() {
+
+ +
@@ -183,4 +190,18 @@ function save() { diff --git a/intern-log/src/styles/tokens.css b/intern-log/src/styles/tokens.css index 7c77488..0922145 100644 --- a/intern-log/src/styles/tokens.css +++ b/intern-log/src/styles/tokens.css @@ -78,9 +78,11 @@ button, input, select, textarea { font: inherit; color: inherit; } transition: background 0.12s, border-color 0.12s, color 0.12s; } .btn:hover { background: var(--bg-hover); border-color: var(--border-strong); } +.btn:active { transform: translateY(1px); } .btn:disabled { opacity: 0.45; cursor: not-allowed; } -.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; } +.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; box-shadow: 0 1px 2px rgba(51, 112, 255, 0.28); } .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: #FFFFFF; } @@ -279,6 +281,16 @@ button, input, select, textarea { font: inherit; color: inherit; } .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; } diff --git a/intern-log/src/views/CalendarView.vue b/intern-log/src/views/CalendarView.vue index 25f7b3c..76a6061 100644 --- a/intern-log/src/views/CalendarView.vue +++ b/intern-log/src/views/CalendarView.vue @@ -104,7 +104,7 @@ watch(focusDate, d => {
-
本月收入(元)
{{ yuan(summary.income) }}
-
本月支出(元)
{{ yuan(summary.expense) }}
-
本月结余(元)
{{ yuan(summary.balance) }}
-
待报销(元)
{{ yuan(summary.pending) }}
+
本月收入(元)
{{ yuan(summary.income) }}
+
本月支出(元)
{{ yuan(summary.expense) }}
+
本月结余(元)
{{ yuan(summary.balance) }}
+
待报销(元)
{{ yuan(summary.pending) }}
@@ -319,6 +319,11 @@ async function confirmDelete() { .w-filter { width: 110px; flex: none; } .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } +.stat-card { border-left: 3px solid var(--border); } +.stat-income { border-left-color: var(--ok); } +.stat-expense { border-left-color: var(--text-3); } +.stat-balance { border-left-color: var(--accent); } +.stat-pending { border-left-color: var(--warn); } .card.sec, .card.section { margin-top: 12px; } .bar-label { width: 56px; } diff --git a/intern-log/src/views/LoginView.vue b/intern-log/src/views/LoginView.vue index b609855..ad4cc5e 100644 --- a/intern-log/src/views/LoginView.vue +++ b/intern-log/src/views/LoginView.vue @@ -78,12 +78,13 @@ async function submit() { .login-page { min-height: 100vh; min-height: 100dvh; - background: var(--bg-app); + background: linear-gradient(180deg, #EBF0F8 0%, var(--bg-app) 46%); display: flex; align-items: center; justify-content: center; padding: 20px; } +.login-card .input { height: 38px; } .login-card { width: 400px; max-width: 100%; diff --git a/intern-log/src/views/PlanView.vue b/intern-log/src/views/PlanView.vue index 3679015..431f282 100644 --- a/intern-log/src/views/PlanView.vue +++ b/intern-log/src/views/PlanView.vue @@ -236,7 +236,10 @@ function weekday(s: string): string {
diff --git a/intern-log/src/views/ReportView.vue b/intern-log/src/views/ReportView.vue index af7d638..6768be3 100644 --- a/intern-log/src/views/ReportView.vue +++ b/intern-log/src/views/ReportView.vue @@ -221,6 +221,7 @@ function undoPolish() { .md-editor { min-height: 420px; line-height: 1.7; } .sum-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; } +.sum-row span:last-child { font-weight: 500; } .section-sub { font-weight: 600; margin: 12px 0 4px; font-size: 12px; color: var(--text-2); } .sum-item { font-size: 12px; padding: 2px 0; word-break: break-all; } .sum-empty { font-size: 12px; } diff --git a/intern-log/src/views/VaultView.vue b/intern-log/src/views/VaultView.vue index aaac98b..66c4f26 100644 --- a/intern-log/src/views/VaultView.vue +++ b/intern-log/src/views/VaultView.vue @@ -375,7 +375,7 @@ async function doChangePwd() { .td-system { font-weight: 500; } .th-ops { width: 150px; } .pwd-cell { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } -.pwd-text { letter-spacing: 1px; } +.pwd-text { letter-spacing: 1px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; } .copyable { cursor: pointer; } .copyable:hover { color: var(--accent); } .ops { display: flex; gap: 4px; flex-wrap: wrap; }