diff --git a/intern-log/dist/assets/index-_AL8y0Nb.css b/intern-log/dist/assets/index-8NYf16v1.css similarity index 96% rename from intern-log/dist/assets/index-_AL8y0Nb.css rename to intern-log/dist/assets/index-8NYf16v1.css index 2cb9bf9..cf05ef1 100644 --- a/intern-log/dist/assets/index-_AL8y0Nb.css +++ b/intern-log/dist/assets/index-8NYf16v1.css @@ -1 +1 @@ -.mask[data-v-f27041d4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:100}.dialog[data-v-f27041d4]{width:380px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);padding:20px}.dialog-title[data-v-f27041d4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-msg[data-v-f27041d4]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-f27041d4]{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.btn-danger-solid[data-v-f27041d4]{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid[data-v-f27041d4]:hover{background:#d13a3f}.modal-enter-active[data-v-f27041d4],.modal-leave-active[data-v-f27041d4]{transition:opacity .15s ease}.modal-enter-from[data-v-f27041d4],.modal-leave-to[data-v-f27041d4]{opacity:0}.mask[data-v-63bc0b48]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-63bc0b48]{width:560px;max-width:calc(100vw - 32px);max-height:85vh;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head[data-v-63bc0b48]{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title[data-v-63bc0b48]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-63bc0b48]{font-size:12px;margin-top:2px}.dialog-body[data-v-63bc0b48]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-63bc0b48]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-63bc0b48]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-63bc0b48]{grid-column:span 2}.field label[data-v-63bc0b48]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-63bc0b48]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-63bc0b48],.input.invalid[data-v-63bc0b48]:focus{border-color:var(--danger)}.toggle-btn[data-v-63bc0b48]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-63bc0b48]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-63bc0b48]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-63bc0b48]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-63bc0b48],.modal-leave-active[data-v-63bc0b48]{transition:opacity .15s ease}.modal-enter-from[data-v-63bc0b48],.modal-leave-to[data-v-63bc0b48]{opacity:0}.dp-head[data-v-2e90c9d8]{margin-bottom:12px}.dp-date[data-v-2e90c9d8]{font-size:14px;font-weight:600}.sec[data-v-2e90c9d8]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-2e90c9d8]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-2e90c9d8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2e90c9d8]{margin-bottom:0}.form-hint[data-v-2e90c9d8]{font-size:12px}.att-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-2e90c9d8],.field label[data-v-2e90c9d8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-2e90c9d8]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-2e90c9d8]{min-height:32px}.val-empty[data-v-2e90c9d8]{color:var(--text-3)}.edit-row[data-v-2e90c9d8]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-2e90c9d8]{width:104px}.att-note[data-v-2e90c9d8]{margin-top:10px;font-size:12px}.att-actions[data-v-2e90c9d8]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2e90c9d8]{grid-column:span 2}.form-footer[data-v-2e90c9d8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-2e90c9d8]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-2e90c9d8]{border-color:var(--danger)}.input.invalid[data-v-2e90c9d8]:focus{border-color:var(--danger)}.list-sec[data-v-2e90c9d8]{margin-bottom:4px}.item[data-v-2e90c9d8]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-2e90c9d8]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-2e90c9d8]{cursor:text;word-break:break-all}.item-meta[data-v-2e90c9d8]{font-size:12px}.item-sub[data-v-2e90c9d8]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.empty[data-v-2e90c9d8]{text-align:center;padding:24px 0}.dp-foot[data-v-2e90c9d8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-2e90c9d8],.form-grid[data-v-2e90c9d8]{grid-template-columns:1fr}.field.span2[data-v-2e90c9d8]{grid-column:auto}}.cal-toolbar[data-v-2404dfbe]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-2404dfbe]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-head[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-week[data-v-2404dfbe]{text-align:center;padding:6px 0;font-size:12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}.cal-grid[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-cell[data-v-2404dfbe]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border);cursor:pointer;display:block;font-size:13px}.cal-cell[data-v-2404dfbe]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-2404dfbe]{cursor:default}.cal-cell.blank[data-v-2404dfbe]:hover{background:var(--bg-page)}.cal-cell.selected[data-v-2404dfbe]{background:var(--accent-bg)}.daynum.today[data-v-2404dfbe]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-2404dfbe]{color:var(--text-3)}.cal-marks[data-v-2404dfbe]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-2404dfbe]{color:var(--text-3)}.mark-star[data-v-2404dfbe]{color:var(--accent)}.drawer[data-v-2404dfbe]{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-2404dfbe]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-2404dfbe]{font-weight:600}.drawer-body[data-v-2404dfbe]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-2404dfbe],.drawer-leave-active[data-v-2404dfbe]{transition:opacity .15s ease}.drawer-enter-from[data-v-2404dfbe],.drawer-leave-to[data-v-2404dfbe]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-2404dfbe]{min-height:60px;padding:4px 5px}.cal-title[data-v-2404dfbe]{min-width:76px;font-size:13px}.cal-marks[data-v-2404dfbe]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-2404dfbe]{width:100%}}.detail-toolbar[data-v-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.cards[data-v-73e5ba49]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-73e5ba49]{padding:14px 16px}.stat-num[data-v-73e5ba49]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-73e5ba49]{padding:14px 16px;margin-top:12px}.section-title[data-v-73e5ba49]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-73e5ba49]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-73e5ba49]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-73e5ba49]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-73e5ba49]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-73e5ba49]{background:#d8ecdf}.lv2[data-v-73e5ba49]{background:#a9d8bc}.lv3[data-v-73e5ba49]{background:#6fbf92}.lv4[data-v-73e5ba49]{background:var(--ok)}.heat-legend[data-v-73e5ba49]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-73e5ba49]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-73e5ba49]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-73e5ba49]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-73e5ba49]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-73e5ba49]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-73e5ba49]{font-size:12px;width:92px;flex:none}.loc-label[data-v-73e5ba49]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-73e5ba49]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-73e5ba49]{grid-template-columns:1fr}}.report-toolbar[data-v-43f9c59b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-43f9c59b]{color:var(--danger);font-size:12px;margin:0 0 8px}.seg[data-v-43f9c59b]{display:inline-flex;border:1px solid var(--border-strong);border-radius:6px;overflow:hidden}.seg-btn[data-v-43f9c59b]{height:28px;padding:0 12px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;border-right:1px solid var(--border)}.seg-btn[data-v-43f9c59b]:last-child{border-right:none}.seg-btn[data-v-43f9c59b]:hover{background:var(--bg-hover)}.seg-btn.active[data-v-43f9c59b]{background:var(--accent-bg);color:var(--accent)}.w-date[data-v-43f9c59b]{width:140px}.report-grid[data-v-43f9c59b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section[data-v-43f9c59b]{padding:14px 16px}.section-title[data-v-43f9c59b]{font-weight:600;margin-bottom:8px;font-size:13px}.section+.section[data-v-43f9c59b]{margin-top:12px}.note-label[data-v-43f9c59b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-43f9c59b]{font-size:12px;margin-top:6px}.md-editor[data-v-43f9c59b]{min-height:420px;line-height:1.7}.sum-row[data-v-43f9c59b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-43f9c59b]{font-weight:600;margin:10px 0 4px;font-size:12px}.sum-item[data-v-43f9c59b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-43f9c59b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-43f9c59b]{grid-template-columns:1fr}}.mask[data-v-edca3327]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-edca3327]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-edca3327]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-edca3327]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-edca3327]{padding:16px 20px}.dialog-btns[data-v-edca3327]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-edca3327]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-edca3327]{grid-column:span 2}.field label[data-v-edca3327]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-edca3327]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-edca3327]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-edca3327]{border-left:1px solid var(--border)}.seg-btn.active[data-v-edca3327]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-edca3327]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-edca3327],.input.invalid[data-v-edca3327]:focus{border-color:var(--danger)}.modal-enter-active[data-v-edca3327],.modal-leave-active[data-v-edca3327]{transition:opacity .15s ease}.modal-enter-from[data-v-edca3327],.modal-leave-to[data-v-edca3327]{opacity:0}.ledger-toolbar[data-v-0f950d19]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-0f950d19]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-0f950d19]{width:110px;flex:none}.cards[data-v-0f950d19]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-0f950d19]{padding:14px 16px}.stat-num[data-v-0f950d19]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-0f950d19]{color:var(--ok)}.amt-expense[data-v-0f950d19]{color:var(--text-1)}.amt-warn[data-v-0f950d19]{color:var(--warn)}.sec[data-v-0f950d19]{padding:14px 16px;margin-top:12px}.sec-title[data-v-0f950d19]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-0f950d19]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-0f950d19]{margin-bottom:0}.form-hint[data-v-0f950d19]{font-size:12px}.form-grid[data-v-0f950d19]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-0f950d19]{grid-column:span 2}.field label[data-v-0f950d19]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-0f950d19]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-0f950d19]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-0f950d19]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-0f950d19]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-0f950d19]{border-left:1px solid var(--border)}.seg-btn.active[data-v-0f950d19]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-0f950d19]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-0f950d19]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-0f950d19]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-0f950d19]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-0f950d19]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-0f950d19]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-0f950d19]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-0f950d19]{font-size:12px;width:110px;flex:none}.table-card[data-v-0f950d19]{overflow-x:auto}.tx-table[data-v-0f950d19]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-0f950d19]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td[data-v-0f950d19]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-0f950d19]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-0f950d19]{border-bottom:none}.td-note[data-v-0f950d19]{color:var(--text-2)}.tx-pending[data-v-0f950d19]{color:var(--warn);font-size:12px}.tx-done[data-v-0f950d19]{color:var(--ok);font-size:12px}.th-ops[data-v-0f950d19]{width:220px}.ops[data-v-0f950d19]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-0f950d19]{text-align:center;padding:24px 0}.vault-note[data-v-0f950d19]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-0f950d19]{grid-template-columns:1fr}.field.span2[data-v-0f950d19]{grid-column:auto}.ledger-toolbar .w-filter[data-v-0f950d19]{flex:1;min-width:0;width:auto}}.memo-page[data-v-74d60dba]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-74d60dba]{display:flex;flex-direction:column;max-height:calc(100vh - 140px)}.pane-head[data-v-74d60dba]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-74d60dba]{font-size:13px;font-weight:600}.memo-scroll[data-v-74d60dba]{overflow:auto;padding:6px}.memo-item[data-v-74d60dba]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-74d60dba]:hover{background:var(--bg-hover)}.memo-item.active[data-v-74d60dba]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-74d60dba]{color:var(--accent)}.memo-item-title[data-v-74d60dba]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-74d60dba]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-74d60dba]{font-size:11px;margin-top:2px}.memo-editor[data-v-74d60dba]{padding:16px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-74d60dba]{font-size:14px;font-weight:500;margin-bottom:10px}.content-textarea[data-v-74d60dba]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-74d60dba]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-74d60dba]{font-size:12px}.editor-empty[data-v-74d60dba]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-74d60dba]{grid-template-columns:1fr}.memo-list[data-v-74d60dba]{max-height:240px}.content-textarea[data-v-74d60dba]{min-height:240px}}.mask[data-v-f383b0a6]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-f383b0a6]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-f383b0a6]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-f383b0a6]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-f383b0a6]{padding:16px 20px}.dialog-btns[data-v-f383b0a6]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-f383b0a6]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-f383b0a6]{grid-column:span 2}.field label[data-v-f383b0a6]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.pwd-row[data-v-f383b0a6]{display:flex;gap:8px}.pwd-row .input[data-v-f383b0a6]{flex:1}.form-error[data-v-f383b0a6]{color:var(--danger);font-size:12px;margin-top:8px}.modal-enter-active[data-v-f383b0a6],.modal-leave-active[data-v-f383b0a6]{transition:opacity .15s ease}.modal-enter-from[data-v-f383b0a6],.modal-leave-to[data-v-f383b0a6]{opacity:0}.lock-card[data-v-6820bc9c]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6820bc9c]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--bg-subtle);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.lock-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.lock-tip[data-v-6820bc9c]{font-size:12px;line-height:1.7}.lock-btn[data-v-6820bc9c]{margin-top:4px}.form-error[data-v-6820bc9c]{color:var(--danger);font-size:12px}.empty[data-v-6820bc9c]{text-align:center;padding:24px 0}.vault-toolbar[data-v-6820bc9c]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6820bc9c]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6820bc9c]{padding-left:30px}.search-icon[data-v-6820bc9c]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6820bc9c]{overflow-x:auto}.cred-table[data-v-6820bc9c]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-6820bc9c]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.cred-table td[data-v-6820bc9c]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-6820bc9c]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-6820bc9c]{border-bottom:none}.td-system[data-v-6820bc9c]{font-weight:500}.th-ops[data-v-6820bc9c]{width:150px}.pwd-cell[data-v-6820bc9c]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6820bc9c]{letter-spacing:1px}.copyable[data-v-6820bc9c]{cursor:pointer}.copyable[data-v-6820bc9c]:hover{color:var(--accent)}.ops[data-v-6820bc9c]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-6820bc9c]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-6820bc9c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-6820bc9c]{width:440px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-6820bc9c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.dialog-body[data-v-6820bc9c]{padding:16px 20px}.dialog-btns[data-v-6820bc9c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-6820bc9c]{margin-bottom:10px}.vp-field label[data-v-6820bc9c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-6820bc9c]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-6820bc9c],.modal-leave-active[data-v-6820bc9c]{transition:opacity .15s ease}.modal-enter-from[data-v-6820bc9c],.modal-leave-to[data-v-6820bc9c]{opacity:0}.settings[data-v-81598f02]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-81598f02]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-81598f02]{padding:14px 16px}.section-title[data-v-81598f02]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-81598f02]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-81598f02]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-81598f02]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-81598f02]{display:flex;gap:8px}.proj-tip[data-v-81598f02]{font-size:12px;margin-top:6px}.proj-row[data-v-81598f02]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-81598f02]:last-child{border-bottom:none}.proj-name[data-v-81598f02]{flex:1;word-break:break-all}.proj-name.archived[data-v-81598f02]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-81598f02]{font-size:12px}.ai-grid[data-v-81598f02]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-81598f02]{display:flex;gap:8px}.import-error[data-v-81598f02]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-81598f02]{font-size:12px;margin-top:10px}.login-page[data-v-d3d6c8cb]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-d3d6c8cb]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-d3d6c8cb]{text-align:center;margin-bottom:6px}.brand-icon[data-v-d3d6c8cb]{width:46px;height:46px;margin:0 auto 10px;border-radius:var(--radius-md);background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.login-title[data-v-d3d6c8cb]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-d3d6c8cb]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-d3d6c8cb]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-d3d6c8cb]{flex:1;height:30px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-d3d6c8cb]{border-left:1px solid var(--border)}.seg-btn.active[data-v-d3d6c8cb]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-d3d6c8cb]{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-2);cursor:pointer;line-height:1.6}.mig-row input[data-v-d3d6c8cb]{margin-top:3px}.form-error[data-v-d3d6c8cb]{color:var(--danger);font-size:12px}.login-btn[data-v-d3d6c8cb]{margin-top:2px}.login-note[data-v-d3d6c8cb]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-0d619789]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-0d619789]{width:56px;flex:none;border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:10px;gap:4px;background:var(--bg-page)}.nav-btn[data-v-0d619789]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-3);cursor:pointer;border:none;background:transparent;position:relative}.nav-btn[data-v-0d619789]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-0d619789]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-0d619789]:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}.nav-btn[data-v-0d619789]:hover:after{opacity:1}.main[data-v-0d619789]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-0d619789]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-0d619789]{font-size:14px;font-weight:600}.topbar-actions[data-v-0d619789]{display:flex;align-items:center;gap:8px}.gsearch[data-v-0d619789]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-0d619789]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-0d619789]{height:30px;padding-left:30px}.gs-panel[data-v-0d619789]{position:absolute;top:36px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-0d619789]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-0d619789]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-0d619789]:hover{background:var(--bg-hover)}.gs-text[data-v-0d619789],.gs-sub[data-v-0d619789]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-0d619789]{font-size:13px}.gs-sub[data-v-0d619789]{font-size:12px}.gs-date[data-v-0d619789]{font-size:12px;flex:none}.gs-empty[data-v-0d619789]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-0d619789]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-0d619789]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:26px;padding:0 10px;font-size:12px;cursor:pointer}.week-tip[data-v-0d619789]:hover{background:var(--bg-subtle)}.content[data-v-0d619789]{flex:1;overflow:auto}.content-inner[data-v-0d619789]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-0d619789]{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-0d619789]{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-0d619789],.toast-leave-to[data-v-0d619789]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-0d619789],.toast-leave-active[data-v-0d619789]{transition:all .15s ease}@media (max-width: 720px){.app[data-v-0d619789]{flex-direction:column;height:100dvh}.side[data-v-0d619789]{order:2;width:100%;height:calc(54px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);flex-direction:row;justify-content:space-around;border-right:none;border-top:1px solid var(--border);padding-top:0}.main[data-v-0d619789]{order:1;flex:1;min-height:0}.nav-btn[data-v-0d619789]{width:44px;height:42px}.nav-btn[data-v-0d619789]:after{display:none}.topbar[data-v-0d619789]{flex-wrap:wrap;height:auto;min-height:52px;padding:8px 12px;row-gap:8px}.topbar>.flex1[data-v-0d619789]{display:none}.gsearch[data-v-0d619789]{order:10;width:100%;max-width:100%}.gs-input[data-v-0d619789]{height:34px}.gs-panel[data-v-0d619789]{top:100%}.topbar-actions[data-v-0d619789]{margin-left:auto}.user-chip[data-v-0d619789]{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-inner[data-v-0d619789]{padding:12px}.toast-wrap[data-v-0d619789]{top:8px;right:12px;left:12px;align-items:flex-end}}:root{--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--border: #EBEDF0;--border-strong: #DCDEE3;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--accent: #3370FF;--accent-bg: #F0F5FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--shadow-float: 0 4px 16px rgba(29, 33, 41, .08)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-page);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap}.btn:hover{background:var(--bg-hover)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#2b5fd9}.btn-danger{color:var(--danger);border-color:var(--danger)}.btn-sm{height:26px;padding:0 10px;font-size:12px}.btn-xs{height:22px;padding:0 8px;font-size:12px}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%}.textarea{height:auto;min-height:56px;padding:8px 10px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}.dot.rest{background:var(--border)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block} +.mask[data-v-f27041d4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:100}.dialog[data-v-f27041d4]{width:380px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);padding:20px}.dialog-title[data-v-f27041d4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-msg[data-v-f27041d4]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-f27041d4]{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.btn-danger-solid[data-v-f27041d4]{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid[data-v-f27041d4]:hover{background:#d13a3f}.modal-enter-active[data-v-f27041d4],.modal-leave-active[data-v-f27041d4]{transition:opacity .15s ease}.modal-enter-from[data-v-f27041d4],.modal-leave-to[data-v-f27041d4]{opacity:0}.mask[data-v-63bc0b48]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-63bc0b48]{width:560px;max-width:calc(100vw - 32px);max-height:85vh;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head[data-v-63bc0b48]{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title[data-v-63bc0b48]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-63bc0b48]{font-size:12px;margin-top:2px}.dialog-body[data-v-63bc0b48]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-63bc0b48]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-63bc0b48]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-63bc0b48]{grid-column:span 2}.field label[data-v-63bc0b48]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-63bc0b48]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-63bc0b48],.input.invalid[data-v-63bc0b48]:focus{border-color:var(--danger)}.toggle-btn[data-v-63bc0b48]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-63bc0b48]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-63bc0b48]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-63bc0b48]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-63bc0b48],.modal-leave-active[data-v-63bc0b48]{transition:opacity .15s ease}.modal-enter-from[data-v-63bc0b48],.modal-leave-to[data-v-63bc0b48]{opacity:0}.dp-head[data-v-2e90c9d8]{margin-bottom:12px}.dp-date[data-v-2e90c9d8]{font-size:14px;font-weight:600}.sec[data-v-2e90c9d8]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-2e90c9d8]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-2e90c9d8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2e90c9d8]{margin-bottom:0}.form-hint[data-v-2e90c9d8]{font-size:12px}.att-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-2e90c9d8],.field label[data-v-2e90c9d8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-2e90c9d8]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-2e90c9d8]{min-height:32px}.val-empty[data-v-2e90c9d8]{color:var(--text-3)}.edit-row[data-v-2e90c9d8]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-2e90c9d8]{width:104px}.att-note[data-v-2e90c9d8]{margin-top:10px;font-size:12px}.att-actions[data-v-2e90c9d8]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2e90c9d8]{grid-column:span 2}.form-footer[data-v-2e90c9d8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-2e90c9d8]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-2e90c9d8]{border-color:var(--danger)}.input.invalid[data-v-2e90c9d8]:focus{border-color:var(--danger)}.list-sec[data-v-2e90c9d8]{margin-bottom:4px}.item[data-v-2e90c9d8]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-2e90c9d8]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-2e90c9d8]{cursor:text;word-break:break-all}.item-meta[data-v-2e90c9d8]{font-size:12px}.item-sub[data-v-2e90c9d8]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.empty[data-v-2e90c9d8]{text-align:center;padding:24px 0}.dp-foot[data-v-2e90c9d8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-2e90c9d8],.form-grid[data-v-2e90c9d8]{grid-template-columns:1fr}.field.span2[data-v-2e90c9d8]{grid-column:auto}}.cal-toolbar[data-v-2404dfbe]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-2404dfbe]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-head[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-week[data-v-2404dfbe]{text-align:center;padding:6px 0;font-size:12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}.cal-grid[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-cell[data-v-2404dfbe]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border);cursor:pointer;display:block;font-size:13px}.cal-cell[data-v-2404dfbe]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-2404dfbe]{cursor:default}.cal-cell.blank[data-v-2404dfbe]:hover{background:var(--bg-page)}.cal-cell.selected[data-v-2404dfbe]{background:var(--accent-bg)}.daynum.today[data-v-2404dfbe]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-2404dfbe]{color:var(--text-3)}.cal-marks[data-v-2404dfbe]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-2404dfbe]{color:var(--text-3)}.mark-star[data-v-2404dfbe]{color:var(--accent)}.drawer[data-v-2404dfbe]{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-2404dfbe]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-2404dfbe]{font-weight:600}.drawer-body[data-v-2404dfbe]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-2404dfbe],.drawer-leave-active[data-v-2404dfbe]{transition:opacity .15s ease}.drawer-enter-from[data-v-2404dfbe],.drawer-leave-to[data-v-2404dfbe]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-2404dfbe]{min-height:60px;padding:4px 5px}.cal-title[data-v-2404dfbe]{min-width:76px;font-size:13px}.cal-marks[data-v-2404dfbe]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-2404dfbe]{width:100%}}.detail-toolbar[data-v-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.cards[data-v-73e5ba49]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-73e5ba49]{padding:14px 16px}.stat-num[data-v-73e5ba49]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-73e5ba49]{padding:14px 16px;margin-top:12px}.section-title[data-v-73e5ba49]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-73e5ba49]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-73e5ba49]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-73e5ba49]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-73e5ba49]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-73e5ba49]{background:#d8ecdf}.lv2[data-v-73e5ba49]{background:#a9d8bc}.lv3[data-v-73e5ba49]{background:#6fbf92}.lv4[data-v-73e5ba49]{background:var(--ok)}.heat-legend[data-v-73e5ba49]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-73e5ba49]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-73e5ba49]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-73e5ba49]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-73e5ba49]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-73e5ba49]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-73e5ba49]{font-size:12px;width:92px;flex:none}.loc-label[data-v-73e5ba49]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-73e5ba49]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-73e5ba49]{grid-template-columns:1fr}}.report-toolbar[data-v-43f9c59b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-43f9c59b]{color:var(--danger);font-size:12px;margin:0 0 8px}.seg[data-v-43f9c59b]{display:inline-flex;border:1px solid var(--border-strong);border-radius:6px;overflow:hidden}.seg-btn[data-v-43f9c59b]{height:28px;padding:0 12px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;border-right:1px solid var(--border)}.seg-btn[data-v-43f9c59b]:last-child{border-right:none}.seg-btn[data-v-43f9c59b]:hover{background:var(--bg-hover)}.seg-btn.active[data-v-43f9c59b]{background:var(--accent-bg);color:var(--accent)}.w-date[data-v-43f9c59b]{width:140px}.report-grid[data-v-43f9c59b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section[data-v-43f9c59b]{padding:14px 16px}.section-title[data-v-43f9c59b]{font-weight:600;margin-bottom:8px;font-size:13px}.section+.section[data-v-43f9c59b]{margin-top:12px}.note-label[data-v-43f9c59b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-43f9c59b]{font-size:12px;margin-top:6px}.md-editor[data-v-43f9c59b]{min-height:420px;line-height:1.7}.sum-row[data-v-43f9c59b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-43f9c59b]{font-weight:600;margin:10px 0 4px;font-size:12px}.sum-item[data-v-43f9c59b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-43f9c59b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-43f9c59b]{grid-template-columns:1fr}}.mask[data-v-edca3327]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-edca3327]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-edca3327]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-edca3327]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-edca3327]{padding:16px 20px}.dialog-btns[data-v-edca3327]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-edca3327]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-edca3327]{grid-column:span 2}.field label[data-v-edca3327]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-edca3327]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-edca3327]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-edca3327]{border-left:1px solid var(--border)}.seg-btn.active[data-v-edca3327]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-edca3327]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-edca3327],.input.invalid[data-v-edca3327]:focus{border-color:var(--danger)}.modal-enter-active[data-v-edca3327],.modal-leave-active[data-v-edca3327]{transition:opacity .15s ease}.modal-enter-from[data-v-edca3327],.modal-leave-to[data-v-edca3327]{opacity:0}.ledger-toolbar[data-v-0f950d19]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-0f950d19]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-0f950d19]{width:110px;flex:none}.cards[data-v-0f950d19]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-0f950d19]{padding:14px 16px}.stat-num[data-v-0f950d19]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-0f950d19]{color:var(--ok)}.amt-expense[data-v-0f950d19]{color:var(--text-1)}.amt-warn[data-v-0f950d19]{color:var(--warn)}.sec[data-v-0f950d19]{padding:14px 16px;margin-top:12px}.sec-title[data-v-0f950d19]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-0f950d19]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-0f950d19]{margin-bottom:0}.form-hint[data-v-0f950d19]{font-size:12px}.form-grid[data-v-0f950d19]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-0f950d19]{grid-column:span 2}.field label[data-v-0f950d19]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-0f950d19]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-0f950d19]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-0f950d19]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-0f950d19]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-0f950d19]{border-left:1px solid var(--border)}.seg-btn.active[data-v-0f950d19]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-0f950d19]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-0f950d19]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-0f950d19]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-0f950d19]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-0f950d19]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-0f950d19]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-0f950d19]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-0f950d19]{font-size:12px;width:110px;flex:none}.table-card[data-v-0f950d19]{overflow-x:auto}.tx-table[data-v-0f950d19]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-0f950d19]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td[data-v-0f950d19]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-0f950d19]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-0f950d19]{border-bottom:none}.td-note[data-v-0f950d19]{color:var(--text-2)}.tx-pending[data-v-0f950d19]{color:var(--warn);font-size:12px}.tx-done[data-v-0f950d19]{color:var(--ok);font-size:12px}.th-ops[data-v-0f950d19]{width:220px}.ops[data-v-0f950d19]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-0f950d19]{text-align:center;padding:24px 0}.vault-note[data-v-0f950d19]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-0f950d19]{grid-template-columns:1fr}.field.span2[data-v-0f950d19]{grid-column:auto}.ledger-toolbar .w-filter[data-v-0f950d19]{flex:1;min-width:0;width:auto}}.memo-page[data-v-74d60dba]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-74d60dba]{display:flex;flex-direction:column;max-height:calc(100vh - 140px)}.pane-head[data-v-74d60dba]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-74d60dba]{font-size:13px;font-weight:600}.memo-scroll[data-v-74d60dba]{overflow:auto;padding:6px}.memo-item[data-v-74d60dba]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-74d60dba]:hover{background:var(--bg-hover)}.memo-item.active[data-v-74d60dba]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-74d60dba]{color:var(--accent)}.memo-item-title[data-v-74d60dba]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-74d60dba]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-74d60dba]{font-size:11px;margin-top:2px}.memo-editor[data-v-74d60dba]{padding:16px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-74d60dba]{font-size:14px;font-weight:500;margin-bottom:10px}.content-textarea[data-v-74d60dba]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-74d60dba]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-74d60dba]{font-size:12px}.editor-empty[data-v-74d60dba]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-74d60dba]{grid-template-columns:1fr}.memo-list[data-v-74d60dba]{max-height:240px}.content-textarea[data-v-74d60dba]{min-height:240px}}.mask[data-v-f383b0a6]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-f383b0a6]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-f383b0a6]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-f383b0a6]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-f383b0a6]{padding:16px 20px}.dialog-btns[data-v-f383b0a6]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-f383b0a6]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-f383b0a6]{grid-column:span 2}.field label[data-v-f383b0a6]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.pwd-row[data-v-f383b0a6]{display:flex;gap:8px}.pwd-row .input[data-v-f383b0a6]{flex:1}.form-error[data-v-f383b0a6]{color:var(--danger);font-size:12px;margin-top:8px}.modal-enter-active[data-v-f383b0a6],.modal-leave-active[data-v-f383b0a6]{transition:opacity .15s ease}.modal-enter-from[data-v-f383b0a6],.modal-leave-to[data-v-f383b0a6]{opacity:0}.lock-card[data-v-6820bc9c]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6820bc9c]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--bg-subtle);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.lock-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.lock-tip[data-v-6820bc9c]{font-size:12px;line-height:1.7}.lock-btn[data-v-6820bc9c]{margin-top:4px}.form-error[data-v-6820bc9c]{color:var(--danger);font-size:12px}.empty[data-v-6820bc9c]{text-align:center;padding:24px 0}.vault-toolbar[data-v-6820bc9c]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6820bc9c]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6820bc9c]{padding-left:30px}.search-icon[data-v-6820bc9c]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6820bc9c]{overflow-x:auto}.cred-table[data-v-6820bc9c]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-6820bc9c]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.cred-table td[data-v-6820bc9c]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-6820bc9c]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-6820bc9c]{border-bottom:none}.td-system[data-v-6820bc9c]{font-weight:500}.th-ops[data-v-6820bc9c]{width:150px}.pwd-cell[data-v-6820bc9c]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6820bc9c]{letter-spacing:1px}.copyable[data-v-6820bc9c]{cursor:pointer}.copyable[data-v-6820bc9c]:hover{color:var(--accent)}.ops[data-v-6820bc9c]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-6820bc9c]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-6820bc9c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-6820bc9c]{width:440px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-6820bc9c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.dialog-body[data-v-6820bc9c]{padding:16px 20px}.dialog-btns[data-v-6820bc9c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-6820bc9c]{margin-bottom:10px}.vp-field label[data-v-6820bc9c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-6820bc9c]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-6820bc9c],.modal-leave-active[data-v-6820bc9c]{transition:opacity .15s ease}.modal-enter-from[data-v-6820bc9c],.modal-leave-to[data-v-6820bc9c]{opacity:0}.settings[data-v-b01d0105]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-b01d0105]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-b01d0105]{padding:14px 16px}.section-title[data-v-b01d0105]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-b01d0105]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-b01d0105]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-b01d0105]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-b01d0105]{display:flex;gap:8px}.proj-tip[data-v-b01d0105]{font-size:12px;margin-top:6px}.proj-row[data-v-b01d0105]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-b01d0105]:last-child{border-bottom:none}.proj-name[data-v-b01d0105]{flex:1;word-break:break-all}.proj-name.archived[data-v-b01d0105]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-b01d0105]{font-size:12px}.ai-grid[data-v-b01d0105]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-b01d0105]{display:flex;gap:8px}.import-error[data-v-b01d0105]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-b01d0105]{font-size:12px;margin-top:10px}.login-page[data-v-d3d6c8cb]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-d3d6c8cb]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-d3d6c8cb]{text-align:center;margin-bottom:6px}.brand-icon[data-v-d3d6c8cb]{width:46px;height:46px;margin:0 auto 10px;border-radius:var(--radius-md);background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.login-title[data-v-d3d6c8cb]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-d3d6c8cb]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-d3d6c8cb]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-d3d6c8cb]{flex:1;height:30px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-d3d6c8cb]{border-left:1px solid var(--border)}.seg-btn.active[data-v-d3d6c8cb]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-d3d6c8cb]{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-2);cursor:pointer;line-height:1.6}.mig-row input[data-v-d3d6c8cb]{margin-top:3px}.form-error[data-v-d3d6c8cb]{color:var(--danger);font-size:12px}.login-btn[data-v-d3d6c8cb]{margin-top:2px}.login-note[data-v-d3d6c8cb]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-0d619789]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-0d619789]{width:56px;flex:none;border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:10px;gap:4px;background:var(--bg-page)}.nav-btn[data-v-0d619789]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-3);cursor:pointer;border:none;background:transparent;position:relative}.nav-btn[data-v-0d619789]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-0d619789]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-0d619789]:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}.nav-btn[data-v-0d619789]:hover:after{opacity:1}.main[data-v-0d619789]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-0d619789]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-0d619789]{font-size:14px;font-weight:600}.topbar-actions[data-v-0d619789]{display:flex;align-items:center;gap:8px}.gsearch[data-v-0d619789]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-0d619789]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-0d619789]{height:30px;padding-left:30px}.gs-panel[data-v-0d619789]{position:absolute;top:36px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-0d619789]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-0d619789]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-0d619789]:hover{background:var(--bg-hover)}.gs-text[data-v-0d619789],.gs-sub[data-v-0d619789]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-0d619789]{font-size:13px}.gs-sub[data-v-0d619789]{font-size:12px}.gs-date[data-v-0d619789]{font-size:12px;flex:none}.gs-empty[data-v-0d619789]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-0d619789]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-0d619789]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:26px;padding:0 10px;font-size:12px;cursor:pointer}.week-tip[data-v-0d619789]:hover{background:var(--bg-subtle)}.content[data-v-0d619789]{flex:1;overflow:auto}.content-inner[data-v-0d619789]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-0d619789]{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-0d619789]{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-0d619789],.toast-leave-to[data-v-0d619789]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-0d619789],.toast-leave-active[data-v-0d619789]{transition:all .15s ease}@media (max-width: 720px){.app[data-v-0d619789]{flex-direction:column;height:100dvh}.side[data-v-0d619789]{order:2;width:100%;height:calc(54px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);flex-direction:row;justify-content:space-around;border-right:none;border-top:1px solid var(--border);padding-top:0}.main[data-v-0d619789]{order:1;flex:1;min-height:0}.nav-btn[data-v-0d619789]{width:44px;height:42px}.nav-btn[data-v-0d619789]:after{display:none}.topbar[data-v-0d619789]{flex-wrap:wrap;height:auto;min-height:52px;padding:8px 12px;row-gap:8px}.topbar>.flex1[data-v-0d619789]{display:none}.gsearch[data-v-0d619789]{order:10;width:100%;max-width:100%}.gs-input[data-v-0d619789]{height:34px}.gs-panel[data-v-0d619789]{top:100%}.topbar-actions[data-v-0d619789]{margin-left:auto}.user-chip[data-v-0d619789]{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-inner[data-v-0d619789]{padding:12px}.toast-wrap[data-v-0d619789]{top:8px;right:12px;left:12px;align-items:flex-end}}:root{--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--border: #EBEDF0;--border-strong: #DCDEE3;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--accent: #3370FF;--accent-bg: #F0F5FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--shadow-float: 0 4px 16px rgba(29, 33, 41, .08)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-page);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap}.btn:hover{background:var(--bg-hover)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#2b5fd9}.btn-danger{color:var(--danger);border-color:var(--danger)}.btn-sm{height:26px;padding:0 10px;font-size:12px}.btn-xs{height:22px;padding:0 8px;font-size:12px}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%}.textarea{height:auto;min-height:56px;padding:8px 10px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}.dot.rest{background:var(--border)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block} diff --git a/intern-log/dist/assets/index-BGM1Hwum.js b/intern-log/dist/assets/index-BGM1Hwum.js new file mode 100644 index 0000000..3c09c52 --- /dev/null +++ b/intern-log/dist/assets/index-BGM1Hwum.js @@ -0,0 +1,26 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** +* @vue/shared v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Na(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const dt={},Ar=[],En=()=>{},Wu=()=>!1,ri=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),si=e=>e.startsWith("onUpdate:"),Et=Object.assign,Va=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},af=Object.prototype.hasOwnProperty,it=(e,t)=>af.call(e,t),Ke=Array.isArray,sr=e=>Vs(e)==="[object Map]",Bn=e=>Vs(e)==="[object Set]",zl=e=>Vs(e)==="[object Date]",Ge=e=>typeof e=="function",wt=e=>typeof e=="string",$n=e=>typeof e=="symbol",lt=e=>e!==null&&typeof e=="object",zu=e=>(lt(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch),Gu=Object.prototype.toString,Vs=e=>Gu.call(e),lf=e=>Vs(e).slice(8,-1),Yu=e=>Vs(e)==="[object Object]",Ba=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Na(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),oi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},uf=/-\w/g,hn=oi(e=>e.replace(uf,t=>t.slice(1).toUpperCase())),cf=/\B([A-Z])/g,dr=oi(e=>e.replace(cf,"-$1").toLowerCase()),Ju=oi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zi=oi(e=>e?`on${Ju(e)}`:""),Cn=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t},df=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let Gl;const ai=()=>Gl||(Gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Ke(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(ff).forEach(n=>{if(n){const s=n.split(pf);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tt(e){let t="";if(wt(e))t=e;else if(Ke(e))for(let n=0;nUn(n,t))}const Zu=e=>!!(e&&e.__v_isRef===!0),se=e=>wt(e)?e:e==null?"":Ke(e)||lt(e)&&(e.toString===Gu||!Ge(e.toString))?Zu(e)?se(e.value):JSON.stringify(e,ec,2):String(e),ec=(e,t)=>Zu(t)?ec(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[ea(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ea(n))}:$n(t)?ea(t):lt(t)&&!Ke(t)&&!Yu(t)?String(t):t,ea=(e,t="")=>{var n;return $n(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 Mt;class wf{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&&Mt&&(Mt.active?(this.parent=Mt,this.index=(Mt.scopes||(Mt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Mt===this)Mt=this.prevScope;else{let t=Mt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(_s){let t=_s;for(_s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function sc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function oc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Wa(s),kf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ya(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ic(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ic(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===As)||(e.globalVersion=As,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ya(e))))return;e.flags|=2;const t=e.dep,n=ht,s=vn;ht=e,vn=!0;try{sc(e);const o=e.fn(e._value);(t.version===0||Cn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ht=n,vn=s,oc(e),e.flags&=-3}}function Wa(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)Wa(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function kf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let vn=!0;const ac=[];function An(){ac.push(vn),vn=!1}function Tn(){const e=ac.pop();vn=e===void 0?!0:e}function Xl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ht;ht=void 0;try{t()}finally{ht=n}}}let As=0;class xf{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 za{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(!ht||!vn||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new xf(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,lc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){qa();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ha()}}}function lc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)lc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ga=new WeakMap,Tr=Symbol(""),ba=Symbol(""),Ts=Symbol("");function Kt(e,t,n){if(vn&&ht){let s=ga.get(e);s||ga.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new za),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const u=ga.get(e);if(!u){As++;return}const f=h=>{h&&h.trigger()};if(qa(),t==="clear")u.forEach(f);else{const h=Ke(e),y=h&&Ba(n);if(h&&n==="length"){const m=Number(s);u.forEach((w,C)=>{(C==="length"||C===Ts||!$n(C)&&C>=m)&&f(w)})}else switch((n!==void 0||u.has(void 0))&&f(u.get(n)),y&&f(u.get(Ts)),t){case"add":h?y&&f(u.get("length")):(f(u.get(Tr)),sr(e)&&f(u.get(ba)));break;case"delete":h||(f(u.get(Tr)),sr(e)&&f(u.get(ba)));break;case"set":sr(e)&&f(u.get(Tr));break}}Ha()}function qr(e){const t=ot(e);return t===e||(Kt(t,"iterate",Ts),ln(e))?t:Pn(e)?ir(e)?t.map(n=>ar(un(n))):t.map(ar):t.map(un)}function li(e){return Kt(e=ot(e),"iterate",Ts),e}function _n(e,t){return Pn(e)?ar(ir(e)?un(t):t):un(t)}const Cf={__proto__:null,[Symbol.iterator](){return na(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Ke(t)?qr(t):t))},entries(){return na(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return In(this,"every",e,t,void 0,arguments)},filter(e,t){return In(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return In(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return In(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return In(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return In(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return In(this,"forEach",e,t,void 0,arguments)},includes(...e){return ra(this,"includes",e)},indexOf(...e){return ra(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return ra(this,"lastIndexOf",e)},map(e,t){return In(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return Zl(this,"reduce",e,t)},reduceRight(e,...t){return Zl(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return In(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return qr(this).toReversed()},toSorted(e){return qr(this).toSorted(e)},toSpliced(...e){return qr(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return na(this,"values",e=>_n(this,e))}};function na(e,t,n){const s=li(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const u=Object.create(Object.getPrototypeOf(a));return u.next=()=>Ql(a.next(),n),o!==uc[t]&&Object.defineProperties(u,{return:{get(){const f=a.return;return typeof f=="function"?f.bind(a):f}},throw:{get(){const f=a.throw;return typeof f=="function"?f.bind(a):f}}}),u}a._next=a.next,a.next=()=>Ql(a._next(),n)}return a}function Ql(e,t){return e.done||(e.value=t(e.value)),e}const uc=Array.prototype;function In(e,t,n,s,o,a){const u=li(e),f=u!==e&&!ln(e),h=u[t];if(h!==uc[t]){const w=h.apply(e,a);return f?un(w):w}let y=n;u!==e&&(f?y=function(w,C){return n.call(this,_n(e,w),C,e)}:n.length>2&&(y=function(w,C){return n.call(this,w,C,e)}));const m=h.call(u,y,s);return f&&o?o(m):m}function Zl(e,t,n,s){const o=li(e),a=o!==e&&!ln(e);let u=n,f=!1;o!==e&&(a?(f=s.length===0,u=function(y,m,w){return f&&(f=!1,y=_n(e,y)),n.call(this,y,_n(e,m),w,e)}):n.length>3&&(u=function(y,m,w){return n.call(this,y,m,w,e)}));const h=o[t](u,...s);return f?_n(e,h):h}function ra(e,t,n){const s=ot(e);Kt(s,"iterate",Ts);const o=s[t](...n);return(o===-1||o===!1)&&Xa(n[0])?(n[0]=ot(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),qa();const s=ot(e)[t].apply(e,n);return Ha(),Tn(),s}const Sf=Na("__proto__,__v_isRef,__isVue"),cc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function Ef(e){$n(e)||(e=String(e));const t=ot(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class dc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Rf:vc:a?hc:pc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const u=Ke(t);if(!o){let h;if(u&&(h=Cf[n]))return h;if(n==="hasOwnProperty")return Ef}const f=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?cc.has(n):Sf(n))||(o||Kt(t,"get",n),a))return f;if(Nt(f)){const h=u&&Ba(n)?f:f.value;return o&<(h)?_a(h):h}return lt(f)?o?_a(f):Ya(f):f}}class fc extends dc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const u=Ke(t)&&Ba(n);if(!this._isShallow){const y=Pn(a);if(!ln(s)&&!Pn(s)&&(a=ot(a),s=ot(s)),!u&&Nt(a)&&!Nt(s))return y||(a.value=s),!0}const f=u?Number(n)e,_o=e=>Reflect.getPrototypeOf(e);function Of(e,t,n){return function(...s){const o=this.__v_raw,a=ot(o),u=sr(a),f=e==="entries"||e===Symbol.iterator&&u,h=e==="keys"&&u,y=o[e](...s),m=n?wa:t?ar:un;return!t&&Kt(a,"iterate",h?ba:Tr),Et(Object.create(y),{next(){const{value:w,done:C}=y.next();return C?{value:w,done:C}:{value:f?[m(w[0]),m(w[1])]:m(w),done:C}}})}}function ko(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Mf(e,t){const n={get(o){const a=this.__v_raw,u=ot(a),f=ot(o);e||(Cn(o,f)&&Kt(u,"get",o),Kt(u,"get",f));const{has:h}=_o(u),y=t?wa:e?ar:un;if(h.call(u,o))return y(a.get(o));if(h.call(u,f))return y(a.get(f));a!==u&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(ot(o),"iterate",Tr),o.size},has(o){const a=this.__v_raw,u=ot(a),f=ot(o);return e||(Cn(o,f)&&Kt(u,"has",o),Kt(u,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const u=this,f=u.__v_raw,h=ot(f),y=t?wa:e?ar:un;return!e&&Kt(h,"iterate",Tr),f.forEach((m,w)=>o.call(a,y(m),y(w),u))}};return Et(n,e?{add:ko("add"),set:ko("set"),delete:ko("delete"),clear:ko("clear")}:{add(o){const a=ot(this),u=_o(a),f=ot(o),h=!t&&!ln(o)&&!Pn(o)?f:o;return u.has.call(a,h)||Cn(o,h)&&u.has.call(a,o)||Cn(f,h)&&u.has.call(a,f)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Pn(a)&&(a=ot(a));const u=ot(this),{has:f,get:h}=_o(u);let y=f.call(u,o);y||(o=ot(o),y=f.call(u,o));const m=h.call(u,o);return u.set(o,a),y?Cn(a,m)&&Rn(u,"set",o,a):Rn(u,"add",o,a),this},delete(o){const a=ot(this),{has:u,get:f}=_o(a);let h=u.call(a,o);h||(o=ot(o),h=u.call(a,o)),f&&f.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=ot(this),a=o.size!==0,u=o.clear();return a&&Rn(o,"clear",void 0,void 0),u}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Of(o,e,t)}),n}function Ga(e,t){const n=Mf(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(it(n,o)&&o in s?n:s,o,a)}const If={get:Ga(!1,!1)},jf={get:Ga(!1,!0)},Df={get:Ga(!0,!1)};const pc=new WeakMap,hc=new WeakMap,vc=new WeakMap,Rf=new WeakMap;function Lf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ya(e){return Pn(e)?e:Ja(e,!1,Af,If,pc)}function Kf(e){return Ja(e,!1,Pf,jf,hc)}function _a(e){return Ja(e,!0,Tf,Df,vc)}function Ja(e,t,n,s,o){if(!lt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const u=Lf(lf(e));if(u===0)return e;const f=new Proxy(e,u===2?s:n);return o.set(e,f),f}function ir(e){return Pn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Pn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function Xa(e){return e?!!e.__v_raw:!1}function ot(e){const t=e&&e.__v_raw;return t?ot(t):e}function Ff(e){return!it(e,"__v_skip")&&Object.isExtensible(e)&&Xu(e,"__v_skip",!0),e}const un=e=>lt(e)?Ya(e):e,ar=e=>lt(e)?_a(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function N(e){return Nf(e,!1)}function Nf(e,t){return Nt(e)?e:new Vf(e,t)}class Vf{constructor(t,n){this.dep=new za,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ot(t),this._value=n?t:un(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ln(t)||Pn(t);t=s?t:ot(t),Cn(t,n)&&(this._rawValue=t,this._value=s?t:un(t),this.dep.trigger())}}function Qt(e){return Nt(e)?e.value:e}const Bf={get:(e,t,n)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Nt(o)&&!Nt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function mc(e){return ir(e)?e:new Proxy(e,Bf)}class Uf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new za(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=As-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return rc(this,!0),!0}get value(){const t=this.dep.track();return ic(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function qf(e,t,n=!1){let s,o;return Ge(e)?s=e:(s=e.get,o=e.set),new Uf(s,o,n)}const xo={},Ro=new WeakMap;let Sr;function Hf(e,t=!1,n=Sr){if(n){let s=Ro.get(n);s||Ro.set(n,s=[]),s.push(e)}}function Wf(e,t,n=dt){const{immediate:s,deep:o,once:a,scheduler:u,augmentJob:f,call:h}=n,y=X=>o?X:ln(X)||o===!1||o===0?Ln(X,1):Ln(X);let m,w,C,S,M=!1,B=!1;if(Nt(e)?(w=()=>e.value,M=ln(e)):ir(e)?(w=()=>y(e),M=!0):Ke(e)?(B=!0,M=e.some(X=>ir(X)||ln(X)),w=()=>e.map(X=>{if(Nt(X))return X.value;if(ir(X))return y(X);if(Ge(X))return h?h(X,2):X()})):Ge(e)?t?w=h?()=>h(e,2):e:w=()=>{if(C){An();try{C()}finally{Tn()}}const X=Sr;Sr=m;try{return h?h(e,3,[S]):e(S)}finally{Sr=X}}:w=En,t&&o){const X=w,de=o===!0?1/0:o;w=()=>Ln(X(),de)}const oe=_f(),ae=()=>{m.stop(),oe&&oe.active&&Va(oe.effects,m)};if(a&&t){const X=t;t=(...de)=>{try{return X(...de)}finally{ae()}}}let P=B?new Array(e.length).fill(xo):xo;const E=X=>{if(!(!(m.flags&1)||!m.dirty&&!X))if(t){const de=m.run();if(X||o||M||(B?de.some((ie,te)=>Cn(ie,P[te])):Cn(de,P))){const ie=Sr;An();try{C&&C(),Sr=m;const te=[de,P===xo?void 0:B&&P[0]===xo?[]:P,S];P=de,h?h(t,3,te):t(...te)}finally{Sr=ie,Tn()}}}else m.run()};return f&&f(E),m=new tc(w),m.scheduler=u?()=>u(E,!1):E,S=X=>Hf(X,!1,m),C=m.onStop=()=>{const X=Ro.get(m);if(X){if(h)h(X,4);else for(const de of X)de();Ro.delete(m)}},t?s?E(!0):P=m.run():u?u(E.bind(null,!0),!0):m.run(),ae.pause=m.pause.bind(m),ae.resume=m.resume.bind(m),ae.stop=ae,ae}function Ln(e,t=1/0,n){if(t<=0||!lt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Nt(e))Ln(e.value,t,n);else if(Ke(e))for(let s=0;s{Ln(s,t,n)});else if(Yu(e)){for(const s in e)Ln(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ln(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Bs(e,t,n,s){try{return s?e(...s):e()}catch(o){ui(o,t,n)}}function cn(e,t,n,s){if(Ge(e)){const o=Bs(e,t,n,s);return o&&zu(o)&&o.catch(a=>{ui(a,t,n)}),o}if(Ke(e)){const o=[];for(let a=0;a>>1,o=Wt[s],a=Ps(o);a=Ps(n)?Wt.push(e):Wt.splice(Gf(t),0,e),e.flags|=1,gc()}}function gc(){Lo||(Lo=yc.then(_c))}function Yf(e){if(!Ke(e))tr&&e.id===-1?tr.splice(Hr+1,0,e):e.flags&1||(kn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Wt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function wc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let u=0;uPs(u)-Ps(f));if(kn.length=o,tr){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function _c(e){try{for(pn=0;pn{s._d&&Bo(-1);const a=Ko(t),u=Pr.length;let f;try{f=e(...o)}finally{for(let h=Pr.length;h>u;h--)Jc();Ko(a),s._d&&Bo(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function $e(e,t){if(an===null)return e;const n=vi(an),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ge(t)?t.call(s&&s.proxy):t}}const Qf=Symbol.for("v-scx"),Zf=()=>To(Qf);function bt(e,t,n){return xc(e,t,n)}function xc(e,t,n=dt){const{immediate:s,deep:o,flush:a,once:u}=n,f=Et({},n),h=t&&s||!t&&a!=="post";let y;if(Rs){if(a==="sync"){const S=Zf();y=S.__watcherHandles||(S.__watcherHandles=[])}else if(!h){const S=()=>{};return S.stop=En,S.resume=En,S.pause=En,S}}const m=zt;f.call=(S,M,B)=>cn(S,m,M,B);let w=!1;a==="post"?f.scheduler=S=>{S.i=m,Ht(S,m&&m.suspense)}:a!=="sync"&&(w=!0,f.scheduler=(S,M)=>{M?S():Qa(S)}),f.augmentJob=S=>{t&&(S.flags|=4),w&&(S.flags|=2,m&&(S.id=m.uid,S.i=m))};const C=Wf(e,t,f);return Rs&&(y?y.push(C):h&&C()),C}function ep(e,t,n){const s=this.proxy,o=wt(e)?e.includes(".")?Cc(s,e):()=>s[e]:e.bind(s,s);let a;Ge(t)?a=t:(a=t.handler,n=t);const u=qs(this),f=xc(o,a.bind(s),n);return u(),f}function Cc(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),tp=e=>e&&(e.defer||e.defer===""),eu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,tu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ka=(e,t)=>{const n=e&&e.to;return wt(n)?t?t(n):null:n},np={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,u,f,h,y){const{mc:m,pc:w,pbc:C,o:{insert:S,querySelector:M,createText:B,createComment:oe,parentNode:ae}}=y,P=Er(t.props);let{dynamicChildren:E}=t;const X=(te,O,j)=>{te.shapeFlag&16&&m(te.children,O,j,o,a,u,f,h)},de=(te=t)=>{const O=Er(te.props),j=te.target=ka(te.props,M),ce=xa(j,te,B,S);j&&(u!=="svg"&&eu(j)?u="svg":u!=="mathml"&&tu(j)&&(u="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),O||(X(te,j,ce),ms(te,!1)))},ie=te=>{const O=()=>{if(Zn.get(te)===O){if(Zn.delete(te),Er(te.props)){const j=ae(te.el)||n;X(te,j,te.anchor),ms(te,!0)}de(te)}};Zn.set(te,O),Ht(O,a)};if(e==null){const te=t.el=B(""),O=t.anchor=B("");if(S(te,n,s),S(O,n,s),tp(t.props)||a&&a.pendingBranch){ie(t);return}P&&(X(t,n,O),ms(t,!0)),de()}else{t.el=e.el;const te=t.anchor=e.anchor,O=Zn.get(e);if(O){O.flags|=8,Zn.delete(e),ie(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,ce=t.targetAnchor=e.targetAnchor,ke=Er(e.props),J=ke?n:j,xe=ke?te:ce;if(u==="svg"||eu(j)?u="svg":(u==="mathml"||tu(j))&&(u="mathml"),E?(C(e.dynamicChildren,E,J,o,a,u,f),nl(e,t,!0)):h||w(e,t,J,xe,o,a,u,f,!1),P)ke?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Co(t,n,te,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Be=ka(t.props,M);Be&&(t.target=Be,Co(t,Be,null,y,0))}else ke&&Co(t,j,ce,y,1);ms(t,P)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:u,children:f,anchor:h,targetStart:y,targetAnchor:m,target:w,props:C}=e,S=Er(C),M=a||!S,B=Zn.get(e);if(B&&(B.flags|=8,Zn.delete(e)),w&&(o(y),o(m)),a&&o(h),!B&&(S||w)&&u&16)for(let oe=0;oe{e.isMounted=!0}),Ic(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],$c={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sn,onEnter:sn,onAfterEnter:sn,onEnterCancelled:sn,onBeforeLeave:sn,onLeave:sn,onAfterLeave:sn,onLeaveCancelled:sn,onBeforeAppear:sn,onAppear:sn,onAfterAppear:sn,onAppearCancelled:sn},sp={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=rl(),s=Ec();return()=>{const o=t.default&&Za(t.default(),!0),a=o&&o.length?Ac(o):n.subTree?Ee():void 0;if(!a)return;const u=ot(e),{mode:f}=u;if(s.isLeaving)return oa(a);const h=Fo(a);if(!h)return oa(a);let y=Os(h,u,s,n,w=>y=w);h.type!==Ft&&lr(h,y);let m=n.subTree&&Fo(n.subTree);if(m&&m.type!==Ft&&!$r(m,h)&&Ms(n.subTree)){let w=Os(m,u,s,n);if(lr(m,w),f==="out-in"&&h.type!==Ft)return s.isLeaving=!0,w.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete w.afterLeave,m=void 0},oa(a);f==="in-out"&&h.type!==Ft?w.delayLeave=(C,S,M)=>{const B=Tc(s,m);B[String(m.key)]=m,C[on]=()=>{S(),C[on]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{M(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function Ac(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const op=sp;function Tc(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Os(e,t,n,s,o){const{appear:a,mode:u,persisted:f=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:w,onBeforeLeave:C,onLeave:S,onAfterLeave:M,onLeaveCancelled:B,onBeforeAppear:oe,onAppear:ae,onAfterAppear:P,onAppearCancelled:E}=t,X=String(e.key),de=Tc(n,e),ie=(j,ce)=>{j&&cn(j,s,9,ce)},te=(j,ce)=>{const ke=ce[1];ie(j,ce),Ke(j)?j.every(J=>J.length<=1)&&ke():j.length<=1&&ke()},O={mode:u,persisted:f,beforeEnter(j){let ce=h;if(!n.isMounted)if(a)ce=oe||h;else return;j[on]&&j[on](!0);const ke=de[X];if(ke&&$r(e,ke)){let J=ke.el[on];if(!J){const xe=Ms(ke);J=xe&&xe.el[on]}J&&J()}ie(ce,[j])},enter(j){if(de[X]===e)return;let ce=y,ke=m,J=w;if(!n.isMounted)if(a)ce=ae||y,ke=P||m,J=E||w;else return;let xe=!1;j[hs]=rt=>{xe||(xe=!0,rt?ie(J,[j]):ie(ke,[j]),O.delayedLeave&&O.delayedLeave(),j[hs]=void 0)};const Be=j[hs].bind(null,!1);ce?te(ce,[j,Be]):Be()},leave(j,ce){const ke=String(e.key);if(j[hs]&&j[hs](!0),n.isUnmounting)return ce();ie(C,[j]);let J=!1;j[on]=Be=>{J||(J=!0,ce(),Be?ie(B,[j]):ie(M,[j]),j[on]=void 0,de[ke]===e&&delete de[ke])};const xe=j[on].bind(null,!1);de[ke]=e,S?te(S,[j,xe]):xe()},clone(j){const ce=Os(j,t,n,s,o);return o&&o(ce),ce}};return O}function oa(e){if(di(e))return e=ur(e),e.children=null,e}function Fo(e){if(!di(e))return ci(e.type)&&e.children?Ac(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&&Ge(n.default))return n.default()}}function lr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;lr(ci(n.type)&&Fo(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===Le&&Ke(e.children)){const n=Kc(e.children,!1);n&&lr(n,t)}}function Za(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aks(B,t&&(Ke(t)?t[oe]:t),n,s,o));return}if(xs(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?vi(s.component):s.el,u=o?null:a,{i:f,r:h}=e,y=t&&t.r,m=f.refs===dt?f.refs={}:f.refs,w=f.setupState,C=ot(w),S=w===dt?Wu:B=>nu(m,B)?!1:it(C,B),M=(B,oe)=>!(oe&&nu(m,oe));if(y!=null&&y!==h){if(ru(t),wt(y))m[y]=null,S(y)&&(w[y]=null);else if(Nt(y)){const B=t;M(y,B.k)&&(y.value=null),B.k&&(m[B.k]=null)}}if(Ge(h))Bs(h,f,12,[u,m]);else{const B=wt(h),oe=Nt(h);if(B||oe){const ae=()=>{if(e.f){const P=B?S(h)?w[h]:m[h]:M()||!e.k?h.value:m[e.k];if(o)Ke(P)&&Va(P,a);else if(Ke(P))P.includes(a)||P.push(a);else if(B)m[h]=[a],S(h)&&(w[h]=m[h]);else{const E=[a];M(h,e.k)&&(h.value=E),e.k&&(m[e.k]=E)}}else B?(m[h]=u,S(h)&&(w[h]=u)):oe&&(M(h,e.k)&&(h.value=u),e.k&&(m[e.k]=u))};if(u){const P=()=>{ae(),No.delete(e)};P.id=-1,No.set(e,P),Ht(P,n)}else ru(e),ae()}}}function ru(e){const t=No.get(e);t&&(t.flags|=8,No.delete(e))}ai().requestIdleCallback;ai().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,di=e=>e.type.__isKeepAlive;function ip(e,t){Oc(e,"a",t)}function ap(e,t){Oc(e,"da",t)}function Oc(e,t,n=zt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(fi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)di(o.parent.vnode)&&lp(s,t,n,o),o=o.parent}}function lp(e,t,n,s){const o=fi(t,e,s,!0);pr(()=>{Va(s[t],o)},n)}function fi(e,t,n=zt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...u)=>{An();const f=qs(n),h=cn(t,n,e,u);return f(),Tn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=zt)=>{(!Rs||e==="sp")&&fi(e,(...s)=>t(...s),n)},up=qn("bm"),dn=qn("m"),cp=qn("bu"),Mc=qn("u"),Ic=qn("bum"),pr=qn("um"),dp=qn("sp"),fp=qn("rtg"),pp=qn("rtc");function hp(e,t=zt){fi("ec",e,t)}const vp=Symbol.for("v-ndc");function ct(e,t,n,s){let o;const a=n,u=Ke(e);if(u||wt(e)){const f=u&&ir(e);let h=!1,y=!1;f&&(h=!ln(e),y=Pn(e),e=li(e)),o=new Array(e.length);for(let m=0,w=e.length;mt(f,h,void 0,a));else{const f=Object.keys(e);o=new Array(f.length);for(let h=0,y=f.length;he?ed(e)?vi(e):Ca(e.parent):null,Cs=Et(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=>Ca(e.parent),$root:e=>Ca(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Dc(e),$forceUpdate:e=>e.f||(e.f=()=>{Qa(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>ep.bind(e)}),ia=(e,t)=>e!==dt&&!e.__isScriptSetup&&it(e,t),mp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:u,type:f,appContext:h}=e;if(t[0]!=="$"){const C=u[t];if(C!==void 0)switch(C){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ia(s,t))return u[t]=1,s[t];if(o!==dt&&it(o,t))return u[t]=2,o[t];if(it(a,t))return u[t]=3,a[t];if(n!==dt&&it(n,t))return u[t]=4,n[t];Sa&&(u[t]=0)}}const y=Cs[t];let m,w;if(y)return t==="$attrs"&&Kt(e.attrs,"get",""),y(e);if((m=f.__cssModules)&&(m=m[t]))return m;if(n!==dt&&it(n,t))return u[t]=4,n[t];if(w=h.config.globalProperties,it(w,t))return w[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return ia(o,t)?(o[t]=n,!0):s!==dt&&it(s,t)?(s[t]=n,!0):it(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:u}},f){let h;return!!(n[f]||e!==dt&&f[0]!=="$"&&it(e,f)||ia(t,f)||it(a,f)||it(s,f)||it(Cs,f)||it(o.config.globalProperties,f)||(h=u.__cssModules)&&h[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function su(e){return Ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Sa=!0;function yp(e){const t=Dc(e),n=e.proxy,s=e.ctx;Sa=!1,t.beforeCreate&&ou(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:u,watch:f,provide:h,inject:y,created:m,beforeMount:w,mounted:C,beforeUpdate:S,updated:M,activated:B,deactivated:oe,beforeDestroy:ae,beforeUnmount:P,destroyed:E,unmounted:X,render:de,renderTracked:ie,renderTriggered:te,errorCaptured:O,serverPrefetch:j,expose:ce,inheritAttrs:ke,components:J,directives:xe,filters:Be}=t;if(y&&gp(y,s,null),u)for(const Ye in u){const me=u[Ye];Ge(me)&&(s[Ye]=me.bind(n))}if(o){const Ye=o.call(n,n);lt(Ye)&&(e.data=Ya(Ye))}if(Sa=!0,a)for(const Ye in a){const me=a[Ye],Me=Ge(me)?me.bind(n,n):Ge(me.get)?me.get.bind(n,n):En,Fe=!Ge(me)&&Ge(me.set)?me.set.bind(n):En,De=at({get:Me,set:Fe});Object.defineProperty(s,Ye,{enumerable:!0,configurable:!0,get:()=>De.value,set:Ce=>De.value=Ce})}if(f)for(const Ye in f)jc(f[Ye],s,n,Ye);if(h){const Ye=Ge(h)?h.call(n):h;Reflect.ownKeys(Ye).forEach(me=>{Xf(me,Ye[me])})}m&&ou(m,e,"c");function He(Ye,me){Ke(me)?me.forEach(Me=>Ye(Me.bind(n))):me&&Ye(me.bind(n))}if(He(up,w),He(dn,C),He(cp,S),He(Mc,M),He(ip,B),He(ap,oe),He(hp,O),He(pp,ie),He(fp,te),He(Ic,P),He(pr,X),He(dp,j),Ke(ce))if(ce.length){const Ye=e.exposed||(e.exposed={});ce.forEach(me=>{Object.defineProperty(Ye,me,{get:()=>n[me],set:Me=>n[me]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});de&&e.render===En&&(e.render=de),ke!=null&&(e.inheritAttrs=ke),J&&(e.components=J),xe&&(e.directives=xe),j&&Pc(e)}function gp(e,t,n=En){Ke(e)&&(e=Ea(e));for(const s in e){const o=e[s];let a;lt(o)?"default"in o?a=To(o.from||s,o.default,!0):a=To(o.from||s):a=To(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:u=>a.value=u}):t[s]=a}}function ou(e,t,n){cn(Ke(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function jc(e,t,n,s){let o=s.includes(".")?Cc(n,s):()=>n[s];if(wt(e)){const a=t[e];Ge(a)&&bt(o,a)}else if(Ge(e))bt(o,e.bind(n));else if(lt(e))if(Ke(e))e.forEach(a=>jc(a,t,n,s));else{const a=Ge(e.handler)?e.handler.bind(n):t[e.handler];Ge(a)&&bt(o,a,e)}}function Dc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:u}}=e.appContext,f=a.get(t);let h;return f?h=f:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Vo(h,y,u,!0)),Vo(h,t,u)),lt(t)&&a.set(t,h),h}function Vo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Vo(e,a,n,!0),o&&o.forEach(u=>Vo(e,u,n,!0));for(const u in t)if(!(s&&u==="expose")){const f=bp[u]||n&&n[u];e[u]=f?f(e[u],t[u]):t[u]}return e}const bp={data:iu,props:au,emits:au,methods:ys,computed:ys,beforeCreate:qt,created:qt,beforeMount:qt,mounted:qt,beforeUpdate:qt,updated:qt,beforeDestroy:qt,beforeUnmount:qt,destroyed:qt,unmounted:qt,activated:qt,deactivated:qt,errorCaptured:qt,serverPrefetch:qt,components:ys,directives:ys,watch:_p,provide:iu,inject:wp};function iu(e,t){return t?e?function(){return Et(Ge(e)?e.call(this,this):e,Ge(t)?t.call(this,this):t)}:t:e}function wp(e,t){return ys(Ea(e),Ea(t))}function Ea(e){if(Ke(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function Sp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||dt;let o=n;const a=t.startsWith("update:"),u=a&&Cp(s,t.slice(7));u&&(u.trim&&(o=n.map(m=>wt(m)?m.trim():m)),u.number&&(o=o.map(ii)));let f,h=s[f=Zi(t)]||s[f=Zi(hn(t))];!h&&a&&(h=s[f=Zi(dr(t))]),h&&cn(h,e,6,o);const y=s[f+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,cn(y,e,6,o)}}const Ep=new WeakMap;function Lc(e,t,n=!1){const s=n?Ep:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let u={},f=!1;if(!Ge(e)){const h=y=>{const m=Lc(y,t,!0);m&&(f=!0,Et(u,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!f?(lt(e)&&s.set(e,null),null):(Ke(a)?a.forEach(h=>u[h]=null):Et(u,a),lt(e)&&s.set(e,u),u)}function pi(e,t){return!e||!ri(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,dr(t))||it(e,t))}function lu(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:u,attrs:f,emit:h,render:y,renderCache:m,props:w,data:C,setupState:S,ctx:M,inheritAttrs:B}=e,oe=Ko(e);let ae,P;try{if(n.shapeFlag&4){const X=o||s,de=X;ae=xn(y.call(de,X,m,w,S,C,M)),P=f}else{const X=t;ae=xn(X.length>1?X(w,{attrs:f,slots:u,emit:h}):X(w,null)),P=t.props?f:$p(f)}}catch(X){Pr.length=0,ui(X,e,1),ae=Oe(Ft)}let E=ae;if(P&&B!==!1){const X=Object.keys(P),{shapeFlag:de}=E;X.length&&de&7&&(a&&X.some(si)&&(P=Ap(P,a)),E=ur(E,P,!1,!0))}if(n.dirs&&(E=ur(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition){const X=ci(E.type)&&Fo(E)||E;lr(X,n.transition)}return ae=E,Ko(oe),ae}function Kc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||ri(n))&&((t||(t={}))[n]=e[n]);return t},Ap=(e,t)=>{const n={};for(const s in e)(!si(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Tp(e,t,n){const{props:s,children:o,component:a}=e,{props:u,children:f,patchFlag:h}=t,y=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?uu(s,u,y):!!u;if(h&8){const m=t.dynamicProps;for(let w=0;wObject.create(Nc),Bc=e=>Object.getPrototypeOf(e)===Nc;function Op(e,t,n,s=!1){const o={},a=Vc();e.propsDefaults=Object.create(null),Uc(e,t,o,a);for(const u in e.propsOptions[0])u in o||(o[u]=void 0);n?e.props=s?o:Kf(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Mp(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:u}}=e,f=ot(o),[h]=e.propsOptions;let y=!1;if((s||u>0)&&!(u&16)){if(u&8){const m=e.vnode.dynamicProps;for(let w=0;w{h=!0;const[C,S]=qc(w,t,!0);Et(u,C),S&&f.push(...S)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!h)return lt(e)&&s.set(e,Ar),Ar;if(Ke(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",tl=e=>Ke(e)?e.map(xn):[xn(e)],jp=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>tl(t(...o)),n);return s._c=!1,s},Hc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(el(o))continue;const a=e[o];if(Ge(a))t[o]=jp(o,a,s);else if(a!=null){const u=tl(a);t[o]=()=>u}}},Wc=(e,t)=>{const n=tl(t);e.slots.default=()=>n},zc=(e,t,n)=>{for(const s in t)(n||!el(s))&&(e[s]=t[s])},Dp=(e,t,n)=>{const s=e.slots=Vc();if(e.vnode.shapeFlag&32){const o=t._;o?(zc(s,t,n),n&&Xu(s,"_",o,!0)):Hc(t,s)}else t&&Wc(e,t)},Rp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,u=dt;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:zc(o,t,n):(a=!t.$stable,Hc(t,o)),u=t}else t&&(Wc(e,t),u={default:1});if(a)for(const f in o)!el(f)&&u[f]==null&&delete o[f]},Ht=Vp;function Lp(e){return Kp(e)}function Kp(e,t){const n=ai();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:u,createText:f,createComment:h,setText:y,setElementText:m,parentNode:w,nextSibling:C,setScopeId:S=En,insertStaticContent:M}=e,B=(k,_,x,G=null,ne=null,ue=null,ge=void 0,ve=null,le=!!_.dynamicChildren)=>{if(k===_)return;k&&!$r(k,_)&&(G=ft(k),Ce(k,ne,ue,!0),k=null),_.patchFlag===-2&&(le=!1,_.dynamicChildren=null),_.dynamicChildren&&k&&k.dynamicChildren&&k.dynamicChildren.hasOnce&&(_.dynamicChildren===Ar&&(_.dynamicChildren=[]),_.dynamicChildren.hasOnce=!0);const{type:H,ref:W,shapeFlag:Y}=_;switch(H){case hi:oe(k,_,x,G);break;case Ft:ae(k,_,x,G);break;case Po:k==null&&P(_,x,G,ge);break;case Le:J(k,_,x,G,ne,ue,ge,ve,le);break;default:Y&1?de(k,_,x,G,ne,ue,ge,ve,le):Y&6?xe(k,_,x,G,ne,ue,ge,ve,le):(Y&64||Y&128)&&H.process(k,_,x,G,ne,ue,ge,ve,le,Jt)}W!=null&&ne?ks(W,k&&k.ref,ue,_||k,!_):W==null&&k&&k.ref!=null&&ks(k.ref,null,ue,k,!0)},oe=(k,_,x,G)=>{if(k==null)s(_.el=f(_.children),x,G);else{const ne=_.el=k.el;_.children!==k.children&&y(ne,_.children)}},ae=(k,_,x,G)=>{k==null?s(_.el=h(_.children||""),x,G):_.el=k.el},P=(k,_,x,G)=>{[k.el,k.anchor]=M(k.children,_,x,G,k.el,k.anchor)},E=({el:k,anchor:_},x,G)=>{let ne;for(;k&&k!==_;)ne=C(k),s(k,x,G),k=ne;s(_,x,G)},X=({el:k,anchor:_})=>{let x;for(;k&&k!==_;)x=C(k),o(k),k=x;o(_)},de=(k,_,x,G,ne,ue,ge,ve,le)=>{if(_.type==="svg"?ge="svg":_.type==="math"&&(ge="mathml"),k==null)ie(_,x,G,ne,ue,ge,ve,le);else{const H=k.el&&k.el._isVueCE?k.el:null;try{H&&H._beginPatch(),j(k,_,ne,ue,ge,ve,le)}finally{H&&H._endPatch()}}},ie=(k,_,x,G,ne,ue,ge,ve)=>{let le,H;const{props:W,shapeFlag:Y,transition:Ae,dirs:Ne}=k;if(le=k.el=u(k.type,ue,W&&W.is,W),Y&8?m(le,k.children):Y&16&&O(k.children,le,null,G,ne,aa(k,ue),ge,ve),Ne&&kr(k,null,G,"created"),te(le,k,k.scopeId,ge,G),W){for(const Xe in W)Xe!=="value"&&!bs(Xe)&&a(le,Xe,null,W[Xe],ue,G);"value"in W&&a(le,"value",null,W.value,ue),(H=W.onVnodeBeforeMount)&&gn(H,G,k)}Ne&&kr(k,null,G,"beforeMount");const Qe=Fp(ne,Ae);Qe&&Ae.beforeEnter(le),s(le,_,x),((H=W&&W.onVnodeMounted)||Qe||Ne)&&Ht(()=>{try{H&&gn(H,G,k),Qe&&Ae.enter(le),Ne&&kr(k,null,G,"mounted")}finally{}},ne)},te=(k,_,x,G,ne)=>{if(x&&S(k,x),G)for(let ue=0;ue{for(let H=le;H{const ve=_.el=k.el;let{patchFlag:le,dynamicChildren:H,dirs:W}=_;le|=k.patchFlag&16;const Y=k.props||dt,Ae=_.props||dt;let Ne;if(x&&xr(x,!1),(Ne=Ae.onVnodeBeforeUpdate)&&gn(Ne,x,_,k),W&&kr(_,k,x,"beforeUpdate"),x&&xr(x,!0),H&&(!k.dynamicChildren||k.dynamicChildren.length!==H.length)&&(le=0,ge=!1,H=null),(Y.innerHTML&&Ae.innerHTML==null||Y.textContent&&Ae.textContent==null)&&m(ve,""),H?ce(k.dynamicChildren,H,ve,x,G,aa(_,ne),ue):ge||me(k,_,ve,null,x,G,aa(_,ne),ue,!1),le>0){if(le&16)ke(ve,Y,Ae,x,ne);else if(le&2&&Y.class!==Ae.class&&a(ve,"class",null,Ae.class,ne),le&4&&a(ve,"style",Y.style,Ae.style,ne),le&8){const Qe=_.dynamicProps;for(let Xe=0;Xe{Ne&&gn(Ne,x,_,k),W&&kr(_,k,x,"updated")},G)},ce=(k,_,x,G,ne,ue,ge)=>{for(let ve=0;ve<_.length;ve++){const le=k[ve],H=_[ve],W=le.el||Aa(le),Y=W&&(le.type===Le||!$r(le,H)||le.shapeFlag&198)?w(W):x;B(le,H,Y,null,G,ne,ue,ge,!0)}},ke=(k,_,x,G,ne)=>{if(_!==x){if(_!==dt)for(const ue in _)!bs(ue)&&!(ue in x)&&a(k,ue,_[ue],null,ne,G);for(const ue in x){if(bs(ue))continue;const ge=x[ue],ve=_[ue];ge!==ve&&ue!=="value"&&a(k,ue,ve,ge,ne,G)}"value"in x&&a(k,"value",_.value,x.value,ne)}},J=(k,_,x,G,ne,ue,ge,ve,le)=>{const H=_.el=k?k.el:f(""),W=_.anchor=k?k.anchor:f("");let{patchFlag:Y,dynamicChildren:Ae,slotScopeIds:Ne}=_;Ne&&(ve=ve?ve.concat(Ne):Ne),k==null?(s(H,x,G),s(W,x,G),O(_.children||[],x,W,ne,ue,ge,ve,le)):Y>0&&Y&64&&Ae&&k.dynamicChildren&&k.dynamicChildren.length===Ae.length?(ce(k.dynamicChildren,Ae,x,ne,ue,ge,ve),(_.key!=null||ne&&_===ne.subTree)&&nl(k,_,!0)):me(k,_,x,W,ne,ue,ge,ve,le)},xe=(k,_,x,G,ne,ue,ge,ve,le)=>{_.slotScopeIds=ve,k==null?_.shapeFlag&512?ne.ctx.activate(_,x,G,ge,le):Be(_,x,G,ne,ue,ge,le):rt(k,_,le)},Be=(k,_,x,G,ne,ue,ge)=>{const ve=k.component=Gp(k,G,ne);if(di(k)&&(ve.ctx.renderer=Jt),Yp(ve,!1,ge),ve.asyncDep){if(ne&&ne.registerDep(ve,He,ge,ue),!k.el){const le=ve.subTree=Oe(Ft);ae(null,le,_,x),k.placeholder=le.el}}else He(ve,k,_,x,ne,ue,ge)},rt=(k,_,x)=>{const G=_.component=k.component;if(Tp(k,_,x))if(G.asyncDep&&!G.asyncResolved){_.el=k.el,_.placeholder=k.placeholder,Ye(G,_,x);return}else G.next=_,G.update();else _.el=k.el,_.placeholder=k.placeholder,G.vnode=_},He=(k,_,x,G,ne,ue,ge)=>{const ve=()=>{if(k.isMounted){let{next:Y,bu:Ae,u:Ne,parent:Qe,vnode:Xe}=k;{const Bt=Gc(k);if(Bt){Y&&(Y.el=Xe.el,Ye(k,Y,ge)),Bt.asyncDep.then(()=>{Ht(()=>{k.isUnmounted||H()},ne)});return}}let Ze=Y,mt;xr(k,!1),Y?(Y.el=Xe.el,Ye(k,Y,ge)):Y=Xe,Ae&&Ao(Ae),(mt=Y.props&&Y.props.onVnodeBeforeUpdate)&&gn(mt,Qe,Y,Xe),xr(k,!0);const _t=lu(k),Xt=k.subTree;k.subTree=_t,B(Xt,_t,w(Xt.el),ft(Xt),k,ne,ue),Y.el=_t.el,Ze===null&&Pp(k,_t.el),Ne&&Ht(Ne,ne),(mt=Y.props&&Y.props.onVnodeUpdated)&&Ht(()=>gn(mt,Qe,Y,Xe),ne)}else{let Y;const{el:Ae,props:Ne}=_,{bm:Qe,m:Xe,parent:Ze,root:mt,type:_t}=k,Xt=xs(_);xr(k,!1),Qe&&Ao(Qe),!Xt&&(Y=Ne&&Ne.onVnodeBeforeMount)&&gn(Y,Ze,_),xr(k,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(_t,k.parent?k.parent.type:void 0);const Bt=k.subTree=lu(k);B(null,Bt,x,G,k,ne,ue),_.el=Bt.el}if(Xe&&Ht(Xe,ne),!Xt&&(Y=Ne&&Ne.onVnodeMounted)){const Bt=_;Ht(()=>gn(Y,Ze,Bt),ne)}(_.shapeFlag&256||Ze&&xs(Ze.vnode)&&Ze.vnode.shapeFlag&256)&&k.a&&Ht(k.a,ne),k.isMounted=!0,_=x=G=null}};k.scope.on();const le=k.effect=new tc(ve);k.scope.off();const H=k.update=le.run.bind(le),W=k.job=le.runIfDirty.bind(le);W.i=k,W.id=k.uid,le.scheduler=()=>Qa(W),xr(k,!0),H()},Ye=(k,_,x)=>{_.component=k;const G=k.vnode.props;k.vnode=_,k.next=null,Mp(k,_.props,G,x),Rp(k,_.children,x),An(),bc(k),Tn()},me=(k,_,x,G,ne,ue,ge,ve,le=!1)=>{const H=k&&k.children,W=k?k.shapeFlag:0,Y=_.children,{patchFlag:Ae,shapeFlag:Ne}=_;if(Ae>0){if(Ae&128){Fe(H,Y,x,G,ne,ue,ge,ve,le);return}else if(Ae&256){Me(H,Y,x,G,ne,ue,ge,ve,le);return}}Ne&8?(W&16&&Ve(H,ne,ue),Y!==H&&m(x,Y)):W&16?Ne&16?Fe(H,Y,x,G,ne,ue,ge,ve,le):Ve(H,ne,ue,!0):(W&8&&m(x,""),Ne&16&&O(Y,x,G,ne,ue,ge,ve,le))},Me=(k,_,x,G,ne,ue,ge,ve,le)=>{k=k||Ar,_=_||Ar;const H=k.length,W=_.length,Y=Math.min(H,W);let Ae;for(Ae=0;AeW?Ve(k,ne,ue,!0,!1,Y):O(_,x,G,ne,ue,ge,ve,le,Y)},Fe=(k,_,x,G,ne,ue,ge,ve,le)=>{let H=0;const W=_.length;let Y=k.length-1,Ae=W-1;for(;H<=Y&&H<=Ae;){const Ne=k[H],Qe=_[H]=le?Dn(_[H]):xn(_[H]);if($r(Ne,Qe))B(Ne,Qe,x,null,ne,ue,ge,ve,le);else break;H++}for(;H<=Y&&H<=Ae;){const Ne=k[Y],Qe=_[Ae]=le?Dn(_[Ae]):xn(_[Ae]);if($r(Ne,Qe))B(Ne,Qe,x,null,ne,ue,ge,ve,le);else break;Y--,Ae--}if(H>Y){if(H<=Ae){const Ne=Ae+1,Qe=NeAe)for(;H<=Y;)Ce(k[H],ne,ue,!0),H++;else{const Ne=H,Qe=H,Xe=new Map;for(H=Qe;H<=Ae;H++){const Ot=_[H]=le?Dn(_[H]):xn(_[H]);Ot.key!=null&&Xe.set(Ot.key,H)}let Ze,mt=0;const _t=Ae-Qe+1;let Xt=!1,Bt=0;const Zt=new Array(_t);for(H=0;H<_t;H++)Zt[H]=0;for(H=Ne;H<=Y;H++){const Ot=k[H];if(mt>=_t){Ce(Ot,ne,ue,!0);continue}let $t;if(Ot.key!=null)$t=Xe.get(Ot.key);else for(Ze=Qe;Ze<=Ae;Ze++)if(Zt[Ze-Qe]===0&&$r(Ot,_[Ze])){$t=Ze;break}$t===void 0?Ce(Ot,ne,ue,!0):(Zt[$t-Qe]=H+1,$t>=Bt?Bt=$t:Xt=!0,B(Ot,_[$t],x,null,ne,ue,ge,ve,le),mt++)}const hr=Xt?Np(Zt):Ar;for(Ze=hr.length-1,H=_t-1;H>=0;H--){const Ot=Qe+H,$t=_[Ot],Ie=_[Ot+1],Hn=Ot+1{const{el:ue,type:ge,transition:ve,children:le,shapeFlag:H}=k;if(H&6){De(k.component.subTree,_,x,G);return}if(H&128){k.suspense.move(_,x,G);return}if(H&64){ge.move(k,_,x,Jt);return}if(ge===Le){s(ue,_,x);for(let Y=0;Yve.enter(ue),ne));else{const{leave:Y,delayLeave:Ae,afterLeave:Ne}=ve,Qe=()=>{k.ctx.isUnmounted?o(ue):s(ue,_,x)},Xe=()=>{const Ze=ue._isLeaving||!!ue[on];ue._isLeaving&&ue[on](!0),ve.persisted&&!Ze?Qe():Y(ue,()=>{Qe(),Ne&&Ne()})};Ae?Ae(ue,Qe,Xe):Xe()}else s(ue,_,x)},Ce=(k,_,x,G=!1,ne=!1)=>{const{type:ue,props:ge,ref:ve,children:le,dynamicChildren:H,shapeFlag:W,patchFlag:Y,dirs:Ae,cacheIndex:Ne,memo:Qe}=k;if((Y===-2||H&&H.hasOnce)&&(ne=!1),ve!=null&&(An(),ks(ve,null,x,k,!0),Tn()),Ne!=null&&(!k.ctx||k.ctx===_)&&(_.renderCache[Ne]=void 0),W&256){_.ctx.deactivate(k);return}const Xe=W&1&&Ae,Ze=!xs(k);let mt;if(Ze&&(mt=ge&&ge.onVnodeBeforeUnmount)&&gn(mt,_,k),W&6)_e(k.component,x,G);else{if(W&128){k.suspense.unmount(x,G);return}Xe&&kr(k,null,_,"beforeUnmount"),W&64?k.type.remove(k,_,x,Jt,G):H&&!H.hasOnce&&(ue!==Le||Y>0&&Y&64)?Ve(H,_,x,!1,!0):(ue===Le&&Y&384||!ne&&W&16)&&Ve(le,_,x),G&&Q(k)}const _t=Qe!=null&&Ne==null;(Ze&&(mt=ge&&ge.onVnodeUnmounted)||Xe||_t)&&Ht(()=>{mt&&gn(mt,_,k),Xe&&kr(k,null,_,"unmounted"),_t&&(k.el=null)},x)},Q=k=>{const{type:_,el:x,anchor:G,transition:ne}=k,ue=_===Le;if(ue&&!ne){Z(x,G);return}if(_===Po){X(k),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave();return}const ge=ue?Ms(k):k,ve=()=>{ue?w(x)&&Z(x,G):o(x),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(ge&&ge.shapeFlag&1&&ne&&!ne.persisted){const{leave:le,delayLeave:H}=ne,W=ge.el,Y=()=>le(W,ve);H?H(W,ve,Y):Y()}else ve()},Z=(k,_)=>{let x;for(;k!==_;)x=C(k),o(k),k=x;o(_)},_e=(k,_,x)=>{const{bum:G,scope:ne,job:ue,subTree:ge,um:ve,m:le,a:H}=k;du(le),du(H),G&&Ao(G),ne.stop(),ue?(ue.flags|=8,Ce(ge,k,_,x)):k.vnode.el&&ge&&(ge.transition=k.vnode.transition,Ce(ge,k,_,x)),ve&&Ht(ve,_),Ht(()=>{k.isUnmounted=!0},_)},Ve=(k,_,x,G=!1,ne=!1,ue=0)=>{for(let ge=ue;ge{if(k.shapeFlag&6)return ft(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const _=C(k.anchor||k.el),x=_&&_[Sc];return x?C(x):_},Yt=(k,_,x)=>{const G=k&&_._vnode?void 0:k&&k.component?k.component.uid:zp();Jf(()=>{k==null?_._vnode&&Ce(_._vnode,null,null,!0):B(_._vnode||null,k,_,null,null,null,x),_._vnode=k},G)},Jt={p:B,um:Ce,m:De,r:Q,mt:Be,mc:O,pc:me,pbc:ce,n:ft,o:e};return{render:Yt,hydrate:void 0,createApp:xp(Yt)}}function aa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function xr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function nl(e,t,n=!1){const s=e.children,o=t.children;if(Ke(s)&&Ke(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,u=n[a-1];a-- >0;)n[a]=u,u=t[u];return n}function Gc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gc(t)}function du(e){if(e)for(let t=0;te.__isSuspense;function Vp(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):Yf(e)}const Le=Symbol.for("v-fgt"),hi=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Po=Symbol.for("v-stc"),Pr=[];let rn=null;function F(e=!1){Pr.push(rn=e?null:[])}function Jc(){Pr.pop(),rn=Pr[Pr.length-1]||null}let Is=1;function Bo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Xc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Jc(),Is>0&&rn&&rn.push(e),e}function U(e,t,n,s,o,a){return Xc(c(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Xc(Oe(e,t,n,s,o,!0))}function js(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Qc=({key:e})=>e??null,Oo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||Nt(e)||Ge(e)?{i:an,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,a=e===Le?0:1,u=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qc(t),ref:t&&Oo(t),scopeId:kc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:an};return f?(Uo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=wt(n)?8:16),Is>0&&!u&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Oe=Bp;function Bp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===vp)&&(e=Ft),js(e)){const f=ur(e,t,!0);return n&&Uo(f,n),Is>0&&!a&&rn&&(f.shapeFlag&6?rn[rn.indexOf(e)]=f:rn.push(f)),f.patchFlag=-2,f}if(Zp(e)&&(e=e.__vccOpts),t){t=Up(t);let{class:f,style:h}=t;f&&!wt(f)&&(t.class=tt(f)),lt(h)&&(Xa(h)&&!Ke(h)&&(h=Et({},h)),t.style=or(h))}const u=wt(e)?1:Yc(e)?128:ci(e)?64:lt(e)?4:Ge(e)?2:0;return c(e,t,n,s,o,u,a,!0)}function Up(e){return e?Xa(e)||Bc(e)?Et({},e):e:null}function ur(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:u,children:f,transition:h}=e,y=t?Hp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Qc(y),ref:t&&t.ref?n&&a?Ke(a)?a.concat(Oo(t)):[a,Oo(t)]:Oo(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ur(e.ssContent),ssFallback:e.ssFallback&&ur(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&lr(m,h.clone(m)),m}function nn(e=" ",t=0){return Oe(hi,null,e,t)}function qp(e,t){const n=Oe(Po,null,e);return n.staticCount=t,n}function Ee(e="",t=!1){return t?(F(),It(Ft,null,e)):Oe(Ft,null,e)}function xn(e){return e==null||typeof e=="boolean"?Oe(Ft):Ke(e)?Oe(Le,null,e.slice()):js(e)?Dn(e):Oe(hi,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ur(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ke(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Bc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ge(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:an},n=32}else t=String(t),s&64?(n=16,t=[nn(t)]):n=8;e.children=t,e.shapeFlag|=n}function Hp(...e){const t={};for(let n=0;nzt||an;let qo,Ds;{const e=ai(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(u=>u(a)):o[0](a)}};qo=t("__VUE_INSTANCE_SETTERS__",n=>zt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const qs=e=>{const t=zt;return qo(e),e.scope.on(),()=>{e.scope.off(),qo(t)}},fu=()=>{zt&&zt.scope.off(),qo(null)};function ed(e){return e.vnode.shapeFlag&4}let Rs=!1;function Yp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=ed(e);Op(e,s,a,t),Dp(e,o,n||t);const u=a?Jp(e,t):void 0;return t&&Ds(!1),u}function Jp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,mp);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Qp(e):null,a=qs(e),u=Bs(s,e,0,[e.props,o]),f=zu(u);if(Tn(),a(),(f||e.sp)&&!xs(e)&&Pc(e),f){if(u.then(fu,fu),t)return u.then(h=>{Ds(!0);try{pu(e,h,t)}finally{Ds(!1)}}).catch(h=>{ui(h,e,0)});e.asyncDep=u}else pu(e,u)}else td(e)}function pu(e,t,n){Ge(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:lt(t)&&(e.setupState=mc(t)),td(e)}function td(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=qs(e);An();try{yp(e)}finally{Tn(),o()}}}const Xp={get(e,t){return Kt(e,"get",""),e[t]}};function Qp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Xp),slots:e.slots,emit:e.emit,expose:t}}function vi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(mc(Ff(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Zp(e){return Ge(e)&&"__vccOpts"in e}const at=(e,t)=>qf(e,t,Rs);function eh(e,t,n){try{Bo(-1);const s=arguments.length;return s===2?lt(t)&&!Ke(t)?js(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&js(n)&&(n=[n]),Oe(e,t,n))}finally{Bo(1)}}const th="3.5.44";/** +* @vue/runtime-dom v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ta;const hu=typeof window<"u"&&window.trustedTypes;if(hu)try{Ta=hu.createPolicy("vue",{createHTML:e=>e})}catch{}const nd=Ta?e=>Ta.createHTML(e):e=>e,nh="http://www.w3.org/2000/svg",rh="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,vu=jn&&jn.createElement("template"),sh={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?jn.createElementNS(nh,e):t==="mathml"?jn.createElementNS(rh,e):n?jn.createElement(e,{is:n}):jn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>jn.createTextNode(e),createComment:e=>jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const u=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{vu.innerHTML=nd(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=vu.content;if(s==="svg"||s==="mathml"){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[u?u.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=Symbol("_vtc"),rd={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=Et({},$c,rd),oh=e=>(e.displayName="Transition",e.props=sd,e),ns=oh((e,{slots:t})=>eh(op,od(e),t)),Cr=(e,t=[])=>{Ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},mu=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function od(e){const t={};for(const J in e)J in rd||(t[J]=e[J]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:u=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=u,appearToClass:m=f,leaveFromClass:w=`${n}-leave-from`,leaveActiveClass:C=`${n}-leave-active`,leaveToClass:S=`${n}-leave-to`}=e,M=ih(o),B=M&&M[0],oe=M&&M[1],{onBeforeEnter:ae,onEnter:P,onEnterCancelled:E,onLeave:X,onLeaveCancelled:de,onBeforeAppear:ie=ae,onAppear:te=P,onAppearCancelled:O=E}=t,j=(J,xe,Be,rt)=>{J._enterCancelled=rt,er(J,xe?m:f),er(J,xe?y:u),Be&&Be()},ce=(J,xe)=>{J._isLeaving=!1,er(J,w),er(J,S),er(J,C),xe&&xe()},ke=J=>(xe,Be)=>{const rt=J?te:P,He=()=>j(xe,J,Be);Cr(rt,[xe,He]),yu(()=>{er(xe,J?h:a),bn(xe,J?m:f),mu(rt)||gu(xe,s,B,He)})};return Et(t,{onBeforeEnter(J){Cr(ae,[J]),bn(J,a),bn(J,u)},onBeforeAppear(J){Cr(ie,[J]),bn(J,h),bn(J,y)},onEnter:ke(!1),onAppear:ke(!0),onLeave(J,xe){J._isLeaving=!0;const Be=()=>ce(J,xe);bn(J,w),J._enterCancelled?(bn(J,C),Pa(J)):(Pa(J),bn(J,C)),yu(()=>{J._isLeaving&&(er(J,w),bn(J,S),mu(X)||gu(J,s,oe,Be))}),Cr(X,[J,Be])},onEnterCancelled(J){j(J,!1,void 0,!0),Cr(E,[J])},onAppearCancelled(J){j(J,!0,void 0,!0),Cr(O,[J])},onLeaveCancelled(J){ce(J),Cr(de,[J])}})}function ih(e){if(e==null)return null;if(lt(e))return[la(e.enter),la(e.leave)];{const t=la(e);return[t,t]}}function la(e){return df(e)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jr]||(e[Jr]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jr];n&&(n.delete(t),n.size||(e[Jr]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ah=0;function gu(e,t,n,s){const o=e._endId=++ah,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:u,timeout:f,propCount:h}=id(e,t);if(!u)return s();const y=u+"end";let m=0;const w=()=>{e.removeEventListener(y,C),a()},C=S=>{S.target===e&&++m>=h&&w()};setTimeout(()=>{m(n[M]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),u=bu(o,a),f=s(`${vs}Delay`),h=s(`${vs}Duration`),y=bu(f,h);let m=null,w=0,C=0;t===Qn?u>0&&(m=Qn,w=u,C=a.length):t===vs?y>0&&(m=vs,w=y,C=h.length):(w=Math.max(u,y),m=w>0?u>y?Qn:vs:null,C=m?m===Qn?a.length:h.length:0);const S=m===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:m,timeout:w,propCount:C,hasTransform:S}}function bu(e,t){for(;e.lengthwu(n)+wu(e[s])))}function wu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Pa(e){return(e?e.ownerDocument:document).body.offsetHeight}function lh(e,t,n){const s=e[Jr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _u=Symbol("_vod"),ad=Symbol("_vsh"),uh=Symbol(""),ch=/(?:^|;)\s*display\s*:/;function dh(e,t,n){const s=e.style,o=wt(n);let a=!1;if(n&&!o){if(t)if(wt(t))for(const u of t.split(";")){const f=u.slice(0,u.indexOf(":")).trim();n[f]==null&&gs(s,f,"")}else for(const u in t)n[u]==null&&gs(s,u,"");for(const u in n){u==="display"&&(a=!0);const f=n[u];f!=null?ph(e,u,!wt(t)&&t?t[u]:void 0,f)||gs(s,u,f):gs(s,u,"")}}else if(o){if(t!==n){const u=s[uh];u&&(n+=";"+u),s.cssText=n,a=ch.test(n)}}else t&&e.removeAttribute("style");_u in e&&((!o||t!==n)&&(e[_u]=a?s.display:""),e[ad]&&(s.display="none"))}const So=/\s*!important$/;function gs(e,t,n){if(Ke(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))So.test(n)?e.setProperty(t,n.replace(So,""),"important"):e.setProperty(t,n);else{const s=fh(e,t);So.test(n)?e.setProperty(dr(s),n.replace(So,""),"important"):e[s]=n}}const ku=["Webkit","Moz","ms"],ua={};function fh(e,t){const n=ua[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return ua[t]=s;s=Ju(s);for(let o=0;oca||(bh.then(()=>ca=0),ca=Date.now());function _h(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Ke(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const u=o.slice(),f=[s];for(let h=0;he.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,kh=(e,t,n,s,o,a)=>{const u=o==="svg";t==="class"?lh(e,s,u):t==="style"?dh(e,n,s):ri(t)?si(t)||vh(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xh(e,t,s,u))?(Su(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Cu(e,t,s,u,a,t!=="value")):e._isVueCE&&(Ch(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wt(s)))?Su(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Cu(e,t,s,u))};function xh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$u(t)&&Ge(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 $u(t)&&wt(n)?!1:t in e}function Ch(e,t){const n=e._def.props;if(!n)return!1;const s=hn(t);return Array.isArray(n)?n.some(o=>hn(o)===s):Object.keys(n).some(o=>hn(o)===s)}const ld=new WeakMap,ud=new WeakMap,Ho=Symbol("_moveCb"),Au=Symbol("_enterCb"),Oa=new WeakMap,Sh=e=>(delete e.props.mode,e),Eh=Sh({name:"TransitionGroup",props:Et({},sd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=rl(),s=Ec();let o,a,u,f;const h=()=>(f===void 0&&(f=o.length>0&&jh(o[0].el,n.vnode.el,Tu(e))),f);return Mc(()=>{if(Oa.delete(n),!h()){o=[],u=void 0;return}const y=Tu(e);o.forEach(Ah);const m=u&&Ih(u,n.vnode.el);u=void 0,o.forEach(C=>Th(C,m));const w=o.filter(Ph);Pa(n.vnode.el),w.forEach(C=>{const S=C.el,M=S.style;bn(S,y),M.transform=M.webkitTransform=M.transitionDuration="";const B=S[Ho]=oe=>{oe&&oe.target!==S||(!oe||oe.propertyName.endsWith("transform"))&&(S.removeEventListener("transitionend",B),S[Ho]=null,er(S,y))};S.addEventListener("transitionend",B)}),o=[]}),()=>{const y=ot(e),m=od(y);let w=y.tag||Le;if(o=[],f=void 0,a)for(let C=0;Cs.willMove()&&s.item.contains(t));return n&&mi(n.item,n)}function jh(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(f=>{f.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(f=>f&&s.classList.add(f)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:u}=id(s);return a.removeChild(s),u}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?n=>Ao(t,n):t};function Dh(e){e.target.composing=!0}function Pu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),Eo=Symbol("_initialValue");function da(e,t,n){return t&&(e=e.trim()),n&&(e=ii(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Eo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Eo]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";rr(e,t?"change":"input",u=>{u.target.composing||e[Sn](da(e.value,n,a))}),(n||a)&&rr(e,"change",()=>{e.value=da(e.value,n,a)}),t||(rr(e,"compositionstart",Dh),rr(e,"compositionend",Pu),rr(e,"change",Pu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[Eo];delete e[Eo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](da(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},u){if(e[Sn]=Xr(u),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?ii(e.value):e.value,h=t??"";if(f===h)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Rh={deep:!0,created(e,t,n){e[Sn]=Xr(n),rr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,u=e[Sn];if(Ke(s)){const f=Ua(s,o),h=f!==-1;if(a&&!h)u(s.concat(o));else if(!a&&h){const y=[...s];y.splice(f,1),u(y)}}else if(Bn(s)){const f=new Set(s);a?f.add(o):f.delete(o),u(f)}else u(cd(e,a))})},mounted:Ou,beforeUpdate(e,t,n){e[Sn]=Xr(n),Ou(e,t,n)}};function Ou(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Ke(t))o=Ua(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,cd(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,rr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?ii(Ls(h)):Ls(h)),a=e.multiple,u=a?Bn(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Ke(u)?o.slice():o:u];try{e[Sn](u)}finally{ts(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){Mu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sn]=Xr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Lh(t,n[1],n[0]))&&Mu(e,t)}};function Lh(e,t,n){if(!n||Ke(e))return Un(e,t);if(Bn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Mu(e,t){const n=e.multiple,s=Ke(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;oString(y)===String(f)):u.selected=Ua(t,f)>-1}else u.selected=t.has(f);else if(Un(Ls(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function cd(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Kh=["ctrl","shift","alt","meta"],Fh={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)=>Kh.some(n=>e[`${n}Key`]&&!t.includes(n))},Mr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let u=0;u{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=dr(o.key);if(t.some(u=>u===a||Nh[u]===a))return e(o)})},Vh=Et({patchProp:kh},sh);let Iu;function Bh(){return Iu||(Iu=Lp(Vh))}const Uh=(...e)=>{const t=Bh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Hh(s);if(!o)return;const a=t._component;!Ge(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const u=n(o,!1,qh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t};function qh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hh(e){return wt(e)?document.querySelector(e):e}function At(e){return''+e+""}const Wh={calendar:At(''),clock:At(''),"check-circle":At(''),edit:At(''),tag:At(''),star:At(''),close:At(''),flag:At(''),chart:At(''),export:At(''),"chevron-left":At(''),"chevron-right":At(''),"chevron-down":At(''),plus:At(''),search:At(''),settings:At(''),memo:At(''),lock:At(''),wallet:At('')},zh=["innerHTML"],ut=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=at(()=>Wh[t.name]||"");return(s,o)=>(F(),U("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,zh))}}),Gh=["aria-label"],Yh={class:"dialog-title"},Jh={class:"dialog-msg"},Xh={class:"dialog-btns"},Qh=Vt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return bt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,u)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),U("div",{key:0,class:"mask",onClick:u[2]||(u[2]=Mr(f=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Yh,se(e.title),1),c("div",Jh,se(e.message),1),c("div",Xh,[c("button",{class:"btn btn-sm",onClick:u[0]||(u[0]=f=>s("cancel"))},se(e.cancelText),1),c("button",{class:tt(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:u[1]||(u[1]=f=>s("confirm"))},se(e.confirmText),3)])],8,Gh)])):Ee("",!0)]),_:1})]))}}),Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},cr=Gt(Qh,[["__scopeId","data-v-f27041d4"]]);var ju=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dd={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(ju,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,d){l.__proto__=d}:function(l,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(l[p]=d[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,d=arguments.length;l"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function w(r,i){return m.call(r,i)}function C(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?u:Reflect.ownKeys)(i).forEach(function(l){M(r,l,i[l])})}var S=Object.defineProperty;function M(r,i,l,d){S(r,i,h(l&&w(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},d))}function B(r){return{from:function(i){return r.prototype=Object.create(i.prototype),M(r.prototype,"constructor",r),{extend:C.bind(null,r.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,ae=[].slice;function P(r,i,l){return ae.call(r,i,l)}function E(r,i){return i(r)}function X(r){if(!r)throw new Error("Assertion Failed")}function de(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&w(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],d=0,p=i.length;d"u"?[]:(Xe=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Qe),Xe]:[Xe,y(Xe),Xe]),Xe=Qe[0],Br=Qe[1],Br=Br&&Br.then,Ze=Xe&&Xe.constructor,mt=!!Qe[2],_t=function(r,i){Hn.push([r,i]),Bt&&(queueMicrotask(Rd),Bt=!1)},Xt=!0,Bt=!0,Zt=[],hr=[],Ot=x,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:_,pgp:!1,env:{},finalize:_},Ie=$t,Hn=[],vr=0,Ys=[];function Se(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=Ie;if(typeof r!="function"){if(r!==Ae)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&xi(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(d,p){try{p(function(v){if(d._state===null){if(v===d)throw new TypeError("A promise cannot be resolved with itself.");var g=d._lib&&Rr();v&&typeof v.then=="function"?l(d,function(b,A){v instanceof Se?v._then(b,A):v.then(b,A)}):(d._state=!0,d._value=v,vl(d)),g&&Lr()}},xi.bind(null,d))}catch(v){xi(d,v)}}(this,r)}var ki={get:function(){var r=Ie,i=Zs;function l(d,p){var v=this,g=!r.global&&(r!==Ie||i!==Zs),b=g&&!zn(),A=new Se(function(V,I){Ci(v,new hl(yl(d,r,g,b),yl(p,r,g,b),V,I,r))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return l.prototype=Ae,l},set:function(r){M(this,"then",r&&r.prototype===Ae?ki:{get:function(){return r},set:ki.set})}};function hl(r,i,l,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=d,this.psd=p}function xi(r,i){var l,d;hr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,d=r,Zt.some(function(p){return p._value===d._value})||Zt.push(d),vl(r),l)&&Lr()}function vl(r){var i=r._listeners;r._listeners=[];for(var l=0,d=i.length;l{for(var g=Zt.length;g;)if(Zt[--g]._value===v._value)return Zt.splice(g,1)})(i),l.resolve(d)}catch(v){l.reject(v)}finally{--vr==0&&Si(),--l.psd.ref||l.psd.finalize()}}function Rd(){mr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Bt=Xt=!1,r}function Lr(){var r,i,l;do for(;0.",gl="String expected.",to="__dbnames",$i="readonly",Ai="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var bl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function no(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=xe(i))[r],i}}function wl(){throw je.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function nt(r,i){try{var l=_l(r),d=_l(i);if(l!==d)return l==="Array"?1:d==="Array"?-1:l==="binary"?1:d==="binary"?-1:l==="string"?1:d==="string"?-1:l==="Date"?1:d!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i{var b=I,A=g;if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function V(){this.constructor=b}function I(){return g!==null&&g.apply(this,arguments)||this}return n(b,A),b.prototype=A===null?Object.create(A):(V.prototype=A.prototype,new V),Object.defineProperty(I.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),I.prototype.table=function(){return l},I})(r)),new Set),p=r.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(g){return d.add(g)});function v(g){if(!g)return g;var b,A=Object.create(r.prototype);for(b in g)if(!d.has(b))try{A[b]=g[b]}catch{}return A}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},pt.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},pt.prototype.add=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,g=r;return v&&p&&(g=no(v)(r)),this._trans("readwrite",function(b){return l.core.mutate({trans:b,type:"add",keys:i!=null?[i]:null,values:[g]})}).then(function(b){return b.numFailures?Se.reject(b.failures[0]):b.lastResult}).then(function(b){if(v)try{te(r,v,b)}catch{}return b})},pt.prototype.upsert=function(r,i){var l=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var g=v??{};return Cl(g,i),d&&te(g,d,r),l.core.mutate({trans:p,type:"put",values:[g],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(b){return b.numFailures?Se.reject(b.failures[0]):!!v})})})},pt.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?Ct(new je.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},pt.prototype.put=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,g=r;return v&&p&&(g=no(v)(r)),this._trans("readwrite",function(b){return l.core.mutate({trans:b,type:"put",values:[g],keys:i!=null?[i]:null})}).then(function(b){return b.numFailures?Se.reject(b.failures[0]):b.lastResult}).then(function(b){if(v)try{te(r,v,b)}catch{}return b})},pt.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(l){return i.core.mutate({trans:l,type:"delete",keys:[r]}).then(function(d){return ro(i,[r],d)}).then(function(d){return d.numFailures?Se.reject(d.failures[0]):void 0})})},pt.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:bl}).then(function(l){return ro(r,null,l)})}).then(function(i){return i.numFailures?Se.reject(i.failures[0]):void 0})},pt.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(l){return i.core.getMany({keys:r,trans:l}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},pt.prototype.bulkAdd=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(g){var b=d.schema.primKey,V=b.auto,b=b.keyPath;if(b&&p)throw new je.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var A=r.length,V=b&&V?r.map(no(b)):r;return d.core.mutate({trans:g,type:"add",keys:p,values:V,wantResults:v}).then(function(I){var $=I.numFailures,T=I.failures;if($===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkAdd(): ").concat($," of ").concat(A," operations failed"),T)})})},pt.prototype.bulkPut=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(g){var b=d.schema.primKey,V=b.auto,b=b.keyPath;if(b&&p)throw new je.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var A=r.length,V=b&&V?r.map(no(b)):r;return d.core.mutate({trans:g,type:"put",keys:p,values:V,wantResults:v}).then(function(I){var $=I.numFailures,T=I.failures;if($===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkPut(): ").concat($," of ").concat(A," operations failed"),T)})})},pt.prototype.bulkUpdate=function(r){var i=this,l=this.core,d=r.map(function(g){return g.key}),p=r.map(function(g){return g.changes}),v=[];return this._trans("readwrite",function(g){return l.getMany({trans:g,keys:d,cache:"clone"}).then(function(b){var A=[],V=[],I=(r.forEach(function($,T){var K=$.key,R=$.changes,D=b[T];if(D){for(var L=0,z=Object.keys(R);Lq+re&&L(q+V)})})}var z=Fr(l)&&l.limit===1/0&&(typeof r!="function"||R)&&{index:l.index,range:l.range};return L(0).then(function(){if(0<$.length)throw new Ve("Error modifying one or more objects",$,T,K);return D.length})})})},st.prototype.delete=function(){var r=this._ctx,i=r.range;return!Fr(r)||r.table.schema.yProps||!r.isPrimKey&&i.type!==3?this.modify(Al):this._write(function(l){var d=r.table.core.schema.primaryKey,p=i;return r.table.core.count({trans:l,query:{index:d,range:p}}).then(function(v){return r.table.core.mutate({trans:l,type:"deleteRange",range:p}).then(function(A){var b=A.failures,A=A.numFailures;if(A)throw new Ve("Could not delete some values",Object.keys(b).map(function(V){return b[V]}),v-A);return v-A})})})};var Nd=st;function st(){}var Al=function(r,i){return i.value=null};function Vd(r,i){return r{for(var qe=Math.min(ye.length,Pe.length),Je=-1,et=0;et=T})).length===0?Se.resolve():(L.forEach(function(q){D.push(function(){var re,fe,he,we=z,ye=q._cfg.dbschema,Te=(po($,we,R),po($,ye,R),z=$._dbSchema=ye,Ri(we,ye)),be=(Te.add.forEach(function(Pe){Li(R,Pe[0],Pe[1].primKey,Pe[1].indexes)}),Te.change.forEach(function(Pe){if(Pe.recreate)throw new je.Upgrade("Not yet support for changing primary key");var pe=R.objectStore(Pe.name);Pe.add.forEach(function(Ue){return co(pe,Ue)}),Pe.change.forEach(function(Ue){pe.deleteIndex(Ue.name),co(pe,Ue)}),Pe.del.forEach(function(Ue){return pe.deleteIndex(Ue)})}),q._cfg.contentUpgrade);if(be&&q._cfg.version>T)return lo($,R),K._memoizedTables={},re=O(ye),Te.del.forEach(function(Pe){re[Pe]=we[Pe]}),Di($,[$.Transaction.prototype]),uo($,[$.Transaction.prototype],u(re),re),K.schema=re,(fe=De(be))&&Kr(),ye=Se.follow(function(){var Pe;(he=be(K))&&fe&&(Pe=zn.bind(null,null),he.then(Pe,Pe))}),he&&typeof he.then=="function"?Se.resolve(he):ye.then(function(){return he})}),D.push(function(re){var fe,he,we=q._cfg.dbschema;fe=we,he=re,[].slice.call(he.db.objectStoreNames).forEach(function(ye){return fe[ye]==null&&he.db.deleteObjectStore(ye)}),Di($,[$.Transaction.prototype]),uo($,[$.Transaction.prototype],$._storeNames,$._dbSchema),K.schema=$._dbSchema}),D.push(function(re){$.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil($.idbdb.version/10)===q._cfg.version?($.idbdb.deleteObjectStore("$meta"),delete $._dbSchema.$meta,$._storeNames=$._storeNames.filter(function(fe){return fe!=="$meta"})):re.objectStore("$meta").put(q._cfg.version,"version"))})}),function q(){return D.length?Se.resolve(D.shift()(K.idbtrans)).then(q):Se.resolve()}().then(function(){Il(z,R)}))}).catch(g);var A,V;u(p).forEach(function(I){Li(l,I,p[I].primKey,p[I].indexes)}),lo(r,l),Se.follow(function(){return r.on.populate.fire(v)}).catch(g)})}function Yd(r,i){Il(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var l=fo(0,r.idbdb,i);po(r,r._dbSchema,i);for(var d=0,p=Ri(l,r._dbSchema).change;d{if(g.change.length||g.recreate)return console.warn("Unable to patch indexes of table ".concat(g.name," because it has changes on the type of index or primary key.")),{value:void 0};var b=i.objectStore(g.name);g.add.forEach(function(A){W&&console.debug("Dexie upgrade patch: Creating missing index ".concat(g.name,".").concat(A.src)),co(b,A)})})(p[d]);if(typeof v=="object")return v.value}}function Ri(r,i){var l,d={del:[],add:[],change:[]};for(l in r)i[l]||d.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var g={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)g.recreate=!0,d.change.push(g);else{var b=p.idxByName,A=v.idxByName,V=void 0;for(V in b)A[V]||g.del.push(V);for(V in A){var I=b[V],$=A[V];I?I.src!==$.src&&g.change.push($):g.add.push($)}(0{var r,i,l;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(d){r.delete(d)}),{toArray:function(){return Array.from(r).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);r.add(p),i.register(d._novip,p,p),r.size>d._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(d){if(d)for(var p=r.values(),v=p.next();!v.done;){var g=v.value;if(g.deref()===d._novip)return r.delete(g),void i.unregister(g);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(d){l.push(d._novip)},remove:function(d){d&&(d=l.indexOf(d._novip))!==-1&&l.splice(d,1)}})})();function Ki(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(to,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Fi(r){return r&&typeof r.databases=="function"}function Ni(r){return Wn(function(){return Ie.letThrough=!0,r()})}function Vi(r){return!("from"in r)}var Dt=function(r,i){var l;if(!this)return l=new Dt,r&&"d"in r&&h(l,r),l;h(this,arguments.length?{d:1,from:r,to:1Math.pow(2,62)?0:L.oldVersion,$=z<1,r.idbdb=D.result,v&&Yd(r,I),Gd(r,z/10,I,K))},K),D.onsuccess=yt(function(){I=null;var L,z,q,re,fe,he,we=r.idbdb=D.result,ye=P(we.objectStoreNames);if(0"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(T){function K(){return indexedDB.databases().finally(T)}A=setInterval(K,100),K()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(b)]).then(function(){return g(),i.onReadyBeingFired=[],Se.resolve(Ni(function(){return r.on.ready.fire(r.vip)})).then(function T(){var K;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(l===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((l=nt(l,d))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return l})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((l,d,p,v)=>{if(l===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((l=nt(l,d))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return l})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function rf(r,i,l,d){r.subscribers.add(l),d.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&me(v,p)},3e3))})}var sf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,d,p){var v,g,b=r.transaction(l,d,p);return d==="readwrite"&&(p=(v=new AbortController).signal,b.addEventListener("abort",(g=function(A){return function(){if(v.abort(),d==="readwrite"){for(var V=new Set,I=0,$=l;I<$.length;I++){var T=$[I],K=br["idb://".concat(i,"/").concat(T)];if(K){var R=r.table(T),D=K.optimisticOps.filter(function(pe){return pe.trans===b});if(b._explicit&&A&&b.mutatedParts)for(var L=0,z=Object.values(K.queries.query);L{var z=br["idb://".concat(K,"/").concat(R)];if(!z)return[];if(!(K=z.queries[D]))return[null,!1,z,null];var q=K[(L.query?L.query.index.name:null)||""];if(!q)return[null,!1,z,null];switch(D){case"query":var re=(fe=L.direction)!=null?fe:"next",fe=q.find(function(he){var we;return he.req.limit===L.limit&&he.req.values===L.values&&((we=he.req.direction)!=null?we:"next")===re&&ql(he.req.query.range,L.query.range)});return fe?[fe,!0,z,q]:[q.find(function(he){var we;return("limit"in he.req?he.req.limit:1/0)>=L.limit&&((we=he.req.direction)!=null?we:"next")===re&&(!L.values||he.req.values)&&nf(he.req.query.range,L.query.range)}),!1,z,q];case"count":return fe=q.find(function(he){return ql(he.req.query.range,L.query.range)}),[fe,!!fe,z,q]}})(i,l,"query",v),T=$[0],V=$[2],I=$[3],T&&$[1]?T.obsSet=v.obsSet:($=d.query(v).then(function(K){var R=K.result;if(T&&(T.res=R),g){for(var D=0,L=R.length;D{var fe=Rr();try{v&&Kr();var he=Wn(r,re);return he=v?he.finally(zn):he}finally{fe&&Lr()}})(z={subscr:L,signal:g.signal,requery:T,querier:r,trans:null}),$||(Jn.storagemutated.subscribe(R),$=!0),Promise.resolve(q).then(function(re){l=!0,i=re,b||z.signal.aborted||(K()||(V=L,K())?T():(A={},Ei(function(){return!b&&p.next&&p.next(re)})))},function(re){l=!1,["DatabaseClosedError","AbortError"].includes(re==null?void 0:re.name)||b||Ei(function(){b||p.error&&p.error(re)})}))};return setTimeout(T,0),I});return d.hasValue=function(){return l},d.getValue=function(){return i},d}var wr=Mn;function Xi(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),Hi(r,!0)}finally{Xn=i}}C(wr,s(s({},Ce),{delete:function(r){return new wr(r,{addons:[]}).delete()},exists:function(r){return new wr(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=wr.dependencies,l=i.indexedDB,i=i.IDBKeyRange,(Fi(l)?Promise.resolve(l.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==to})}):Ki(l,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new je.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return Ie.trans?mr(Ie.transless||$t,r):r()},vip:Ni,async:function(r){return function(){try{var i=Wi(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Se.resolve(i)}catch(l){return Ct(l)}}},spawn:function(r,i,l){try{var d=Wi(r.apply(l,i||[]));return d&&typeof d.then=="function"?d:Se.resolve(d)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return Ie.trans||null}},waitFor:function(r,i){return r=Se.resolve(typeof r=="function"?wr.ignoreTransaction(r):r).timeout(i||6e4),Ie.trans?Ie.trans.waitFor(r):r},Promise:Se,debug:{get:function(){return W},set:function(r){Y(r)}},derive:B,extend:h,props:C,override:E,Events:os,on:Jn,liveQuery:Hl,extendObservabilitySet:vo,getByKeyPath:ie,setByKeyPath:te,delByKeyPath:function(r,i){typeof i=="string"?te(r,i,void 0):"length"in i&&[].map.call(i,function(l){te(r,l,void 0)})},shallowClone:O,deepClone:xe,getObjectDiff:zi,cmp:nt,asap:de,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Yt,dependencies:bo,cache:br,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,l){return r+i/Math.pow(10,2*l)})})),wr.maxKey=ls(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(ao,function(r){Xn||(r=new CustomEvent(Oi,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Oi,function(r){r=r.detail,Xn||Xi(r)}));var Ur,Xn=!1,Wl=function(){};return typeof BroadcastChannel<"u"&&((Wl=function(){(Ur=new BroadcastChannel(Oi)).onmessage=function(r){return r.data&&Xi(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(ao,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){W&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.toArray();in.key===e);return t?t.label:"其他"}const sv={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},ov={class:"dialog-head"},iv={key:0,class:"muted dialog-sub"},av={class:"dialog-body"},lv={class:"form-grid"},uv={class:"field span2"},cv={key:0,class:"form-error"},dv={class:"field"},fv=["value"],pv={class:"field"},hv=["value"],vv={class:"field"},mv={class:"field"},yv={class:"field span2"},gv={class:"field"},bv={class:"field"},wv={class:"dialog-btns"},_v=Vt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(null),u=N("dev"),f=N(null),h=N(""),y=N(""),m=N(0),w=N(0),C=N(""),S=N(null),M=at(()=>{var E;const ae=n.projects.filter(X=>X.archived!==1),P=(E=n.item)==null?void 0:E.project_id;if(P&&!ae.some(X=>X.id===P)){const X=n.projects.find(ie=>ie.id===P),de=ae.slice();return X&&de.unshift({...X,name:X.name+"(已归档)"}),de}return ae});function B(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var P;if(ae){const E=n.item;o.value=(E==null?void 0:E.content)??"",a.value=(E==null?void 0:E.project_id)??null,u.value=(E==null?void 0:E.category)??"dev",f.value=(E==null?void 0:E.minutes)??null,h.value=(E==null?void 0:E.takeaway)??"",y.value=(E==null?void 0:E.remark)??"",m.value=(E==null?void 0:E.is_milestone)??0,w.value=(E==null?void 0:E.needs_followup)??0,C.value="",window.addEventListener("keydown",B),await ts(),(P=S.value)==null||P.focus()}else window.removeEventListener("keydown",B)}),pr(()=>window.removeEventListener("keydown",B)),bt(o,()=>{C.value&&(C.value="")});function oe(){const ae=o.value.trim();if(!ae){C.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ae,project_id:a.value,category:u.value,minutes:f.value&&f.value>0?f.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:w.value?1:0})}return(ae,P)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),U("div",{key:0,class:"mask",onClick:P[10]||(P[10]=Mr(E=>s("cancel"),["self"]))},[c("div",sv,[c("div",ov,[c("div",null,[P[11]||(P[11]=c("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(F(),U("div",iv,se(e.date),1)):Ee("",!0)]),c("button",{class:"icon-btn",title:"关闭",onClick:P[0]||(P[0]=E=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",av,[c("div",lv,[c("div",uv,[P[12]||(P[12]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{ref_key:"contentInput",ref:S,class:tt(["input",{invalid:C.value}]),"onUpdate:modelValue":P[1]||(P[1]=E=>o.value=E),onKeydown:jt(oe,["enter"])},null,34),[[Re,o.value]]),C.value?(F(),U("div",cv,se(C.value),1)):Ee("",!0)]),c("div",dv,[P[14]||(P[14]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":P[2]||(P[2]=E=>a.value=E)},[P[13]||(P[13]=c("option",{value:null},"无项目",-1)),(F(!0),U(Le,null,ct(M.value,E=>(F(),U("option",{key:E.id,value:E.id},se(E.name),9,fv))),128))],512),[[Fn,a.value]])]),c("div",pv,[P[15]||(P[15]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":P[3]||(P[3]=E=>u.value=E)},[(F(!0),U(Le,null,ct(Qt(Hs),E=>(F(),U("option",{key:E.key,value:E.key},se(E.label),9,hv))),128))],512),[[Fn,u.value]])]),c("div",vv,[P[16]||(P[16]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":P[4]||(P[4]=E=>f.value=E),placeholder:"选填"},null,512),[[Re,f.value,void 0,{number:!0}]])]),c("div",mv,[P[17]||(P[17]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":P[5]||(P[5]=E=>h.value=E),placeholder:"一句话:学到了什么"},null,512),[[Re,h.value]])]),c("div",yv,[P[18]||(P[18]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":P[6]||(P[6]=E=>y.value=E),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),c("div",gv,[P[19]||(P[19]=c("label",null,"成果标记",-1)),c("button",{class:tt(["toggle-btn",{on:m.value===1}]),onClick:P[7]||(P[7]=E=>m.value=m.value===1?0:1)},se(m.value===1?"已标记为成果":"未标记"),3)]),c("div",bv,[P[20]||(P[20]=c("label",null,"待跟进",-1)),c("button",{class:tt(["toggle-btn",{onwarn:w.value===1}]),onClick:P[8]||(P[8]=E=>w.value=w.value===1?0:1)},se(w.value===1?"需要跟进":"无需跟进"),3)])])]),c("div",wv,[c("button",{class:"btn btn-sm",onClick:P[9]||(P[9]=E=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:oe},"保存修改")])])])):Ee("",!0)]),_:1})]))}}),kv=Gt(_v,[["__scopeId","data-v-63bc0b48"]]);function Ss(e){return e<10?"0"+e:String(e)}function Nn(e){return e.getFullYear()+"-"+Ss(e.getMonth()+1)+"-"+Ss(e.getDate())}function xt(){return Nn(new Date)}function vt(){const e=new Date;return Nn(e)+"T"+Ss(e.getHours())+":"+Ss(e.getMinutes())+":"+Ss(e.getSeconds())}function Vn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Kn(e,t){const n=rs(e);return n.setDate(n.getDate()+t),Nn(n)}function zo(e,t){const n=rs(e),s=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(s,o)),Nn(n)}function Es(e){const t=rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Nn(t)}function xv(e){const t=rs(e).getDay();return t===0||t===6}function Cv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function pd(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function gt(e,t){const n=await ee.setting.get(e);return n?n.value:t}async function kt(e,t){await ee.setting.put({key:e,value:t})}async function jr(){const e=await Promise.all([gt("work_start","09:00"),gt("work_end","18:00"),gt("grace_minutes","10"),gt("lunch_minutes","60"),gt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function Sv(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function Ev(){return gt("last_location","")}async function $v(e,t){const n=t.trim();await kt("last_location",n),n&&await Go(n);const s=await mn(e);s&&s.id?await ee.attendance.update(s.id,{location:n||null}):n&&await ee.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:vt()})}async function il(){const e=await gt("location_presets","");if(!e)return Ru.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Ru.slice()}async function hd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Go(e){const t=e.trim();if(!t)return;const n=await il();n.includes(t)||await hd([...n,t])}async function Ks(e=!1){const t=await ee.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function Av(e){await ee.project.add({name:e.trim(),archived:0,created_at:vt()})}async function Tv(e,t){await ee.project.update(e,{name:t.trim()})}async function Pv(e,t){await ee.project.update(e,{archived:t?1:0})}async function mn(e){return ee.attendance.where("date").equals(e).first()}async function vd(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:vt()};n&&(o.location=n),await ee.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Go(n));return}await ee.attendance.add({date:e,clock_in_at:vt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:vt()}),n&&(await kt("last_location",n),await Go(n))}async function Ov(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await ee.attendance.update(t.id,{clock_out_at:vt()})}async function Mv(){const e=new Date,t=Nn(e);if(e.getHours()<4){const s=await mn(Kn(t,-1));if(s&&s.id&&s.clock_in_at&&!s.clock_out_at)return await ee.attendance.update(s.id,{clock_out_at:vt()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await ee.attendance.update(n.id,{clock_out_at:vt()}),n.date;throw new Error("没有进行中的打卡")}async function Iv(e,t,n,s,o){(o||"").trim()&&await Go(o);const a=await mn(e),u={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:vt()};a&&a.id?await ee.attendance.update(a.id,u):await ee.attendance.add(u)}async function jv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await ee.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function yi(e,t){return ee.attendance.where("date").between(e,t,!0,!0).toArray()}async function Dv(e,t){const n=await mn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:vt()};n&&n.id?await ee.attendance.update(n.id,s):await ee.attendance.add({...s,note:null,location:null})}else n&&n.id&&await ee.attendance.update(n.id,{kind:"normal"})}async function Rv(e){const t=await ee.work_log.where("date").equals(e).first();return t||{id:await ee.work_log.add({date:e,created_at:vt()}),date:e,created_at:vt()}}async function Lv(e){return ee.work_log.where("date").equals(e).first()}async function Kv(e){const t=await Lv(e);return!t||!t.id?[]:(await ee.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Fv(e,t){const n=await Rv(e);await ee.log_item.add({work_log_id:n.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:vt()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function fa(e,t){await ee.log_item.update(e,t)}async function Nv(e){await ee.log_item.delete(e)}async function gi(e,t){const n=await ee.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await ee.log_item.where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,u)=>a.date===u.date?a.id-u.id:a.datet.updated_at[u.id,u.date]));return(await ee.log_item.toArray()).filter(u=>((u.content||"")+" "+(u.takeaway||"")+" "+(u.remark||"")).toLowerCase().includes(n)).sort((u,f)=>f.id-u.id).slice(0,t).map(u=>({...u,date:o.get(u.work_log_id)||""}))}async function Gv(e,t=4){const n=e.trim().toLowerCase();return n?(await ee.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([ee.project.clear(),ee.work_log.clear(),ee.log_item.clear(),ee.attendance.clear(),ee.weekly_note.clear(),ee.setting.clear(),ee.memo.clear(),ee.credential.clear(),ee.table("transaction").clear()]),n.project&&n.project.length&&await ee.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ee.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await ee.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ee.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ee.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ee.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ee.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ee.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await ee.table("transaction").bulkAdd(n.transaction)})}function $o(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ws(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(xv(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=$o(Vn(e.clock_in_at)),u=$o(Vn(e.clock_out_at)),f=$o(n.work_start),h=$o(n.work_end);let y="normal";!o&&a>f+n.grace_minutes?y="late":!o&&u{Mo.value=Mo.value.filter(n=>n.id!==t)},2e3)}function rm(){return Mo}const Ia=N(null),ja=N(null),zs=N(0);function nr(){zs.value++}const sm={class:"day-panel"},om={class:"dp-head"},im={class:"dp-date"},am={class:"card sec"},lm={class:"att-grid"},um={class:"att-cell"},cm={key:0,class:"edit-row"},dm={key:1,class:"att-val"},fm={class:"att-cell"},pm={key:0,class:"edit-row"},hm={key:1,class:"att-val"},vm={class:"att-cell"},mm=["list"],ym=["id"],gm=["value"],bm={class:"att-cell"},wm={class:"att-val status-val"},_m={key:0,class:"tag"},km={key:1,class:"muted"},xm={key:0,class:"att-note muted"},Cm={class:"att-actions"},Sm=["disabled"],Em=["disabled"],$m=["disabled"],Am=["disabled"],Tm={key:0,class:"card sec makeup"},Pm={class:"form-grid"},Om={class:"field"},Mm={class:"field"},Im={class:"field span2"},jm=["list"],Dm={class:"field span2"},Rm={key:0,class:"form-error"},Lm={class:"form-footer"},Km={class:"card sec"},Fm={class:"form-grid"},Nm={class:"field span2"},Vm={key:0,class:"form-error"},Bm={class:"field"},Um=["value"],qm={class:"field"},Hm=["value"],Wm={class:"field"},zm={class:"field"},Gm={class:"field span2"},Ym={class:"form-footer"},Jm=["disabled"],Xm=["disabled"],Qm={class:"list-sec"},Zm={class:"sec-title"},ey={key:0,class:"empty muted"},ty={class:"item-main"},ny={class:"tag"},ry=["onClick"],sy={key:0,class:"muted item-meta"},oy={key:1,class:"muted num item-meta"},iy=["onClick"],ay=["onClick"],ly=["onClick"],uy=["onClick"],cy={key:0,class:"item-sub"},dy={key:0,class:"muted2"},fy={key:1,class:"muted"},py={key:1,class:"dp-foot muted num"},hy=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=N(!0),s=N(null),o=N(void 0),a=N([]),u=N([]),f=N(""),h=N([]),y=at(()=>"loc-list-"+t.date),m=at(()=>t.date===xt());async function w(){n.value=!0,s.value=await jr(),o.value=await mn(t.date),a.value=await Kv(t.date),u.value=await Ks(!0),h.value=await il(),f.value=o.value&&o.value.location||await Ev(),n.value=!1}dn(w),bt(()=>t.date,w),bt(zs,()=>{w()});const C=at(()=>u.value.filter(H=>H.archived!==1));function S(H){if(!H)return"";const W=u.value.find(Y=>Y.id===H);return W?W.name:"已删除项目"}const M=at(()=>s.value?Ws(o.value,t.date,s.value,m.value):null),B=at(()=>a.value.reduce((H,W)=>H+(W.minutes||0),0)),oe=N(!1);async function ae(){oe.value||(oe.value=!0,await vd(t.date,f.value),await w(),nr(),We("上班打卡成功"),oe.value=!1)}async function P(){oe.value||(oe.value=!0,await Ov(t.date),await w(),nr(),We("下班打卡成功"),oe.value=!1)}async function E(){await $v(t.date,f.value),nr(),We("地点已更新")}const X=N(!1),de=at(()=>{var H;return((H=o.value)==null?void 0:H.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){X.value=!0;return}te(!0)}async function te(H){X.value=!1,await Dv(t.date,H),await w(),nr(),We(H?"已标记为休假":"已取消休假")}const O=N(null),j=N(""),ce=N(null);bt(O,async H=>{var W;H&&(await ts(),(W=ce.value)==null||W.focus())});function ke(H){var Y,Ae;const W=H==="in"?(Y=o.value)==null?void 0:Y.clock_in_at:(Ae=o.value)==null?void 0:Ae.clock_out_at;O.value=H,j.value=W?Vn(W):H==="in"?"09:00":"18:00"}function J(){O.value=null}async function xe(){const H=O.value;H&&(O.value=null,j.value&&(await jv(t.date,H==="in"?"clock_in_at":"clock_out_at",j.value),await w(),nr(),We("打卡时间已修改")))}const Be=N(!1),rt=N("09:00"),He=N("18:00"),Ye=N(""),me=N(""),Me=N("");function Fe(){me.value=f.value,Me.value="",Be.value=!Be.value}async function De(){if(!rt.value||!He.value){Me.value="请填写上班与下班时间";return}await Iv(t.date,t.date+"T"+rt.value+":00",t.date+"T"+He.value+":00",Ye.value.trim(),me.value),Be.value=!1,Ye.value="",Me.value="",await w(),nr(),We("补卡已保存")}const Ce=N(""),Q=N("");bt(Ce,()=>{Q.value&&(Q.value="")});const Z=N(null),_e=N("dev"),Ve=N(null),ft=N(""),Yt=N(""),Jt=N(!1),je=at(()=>!!(Ce.value.trim()||Ve.value||ft.value.trim()||Yt.value.trim()));dn(async()=>{const H=await Sv();Z.value=H.project_id,_e.value=H.category});function k(){Ce.value="",Ve.value=null,ft.value="",Yt.value="",Q.value=""}async function _(){const H=Ce.value.trim();if(!H){Q.value="请填写工作内容";return}Jt.value||(Jt.value=!0,await Fv(t.date,{content:H,project_id:Z.value,category:_e.value,minutes:Ve.value&&Ve.value>0?Ve.value:null,takeaway:ft.value.trim()||null,remark:Yt.value.trim()||null}),k(),await w(),We("记录已添加"),Jt.value=!1)}const x=N(null);function G(H){x.value=H}async function ne(H){const W=H.id,Y={content:H.content,project_id:H.project_id,category:H.category,minutes:H.minutes,takeaway:H.takeaway,remark:H.remark,is_milestone:H.is_milestone,needs_followup:H.needs_followup};await fa(W,Y),x.value=null,await w(),We("修改已保存")}async function ue(H){await fa(H.id,{is_milestone:H.is_milestone?0:1}),await w()}async function ge(H){await fa(H.id,{needs_followup:H.needs_followup?0:1}),await w()}const ve=N(null);async function le(){ve.value&&ve.value.id&&await Nv(ve.value.id),ve.value=null,await w(),We("记录已删除")}return(H,W)=>(F(),U("div",sm,[c("div",om,[c("div",im,se(Qt(pd)(e.date)),1)]),c("div",am,[W[25]||(W[25]=c("div",{class:"sec-title"},"出勤信息",-1)),c("div",lm,[c("div",um,[W[21]||(W[21]=c("label",null,"上班时间",-1)),O.value==="in"?(F(),U("div",cm,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":W[0]||(W[0]=Y=>j.value=Y),onKeydown:[jt(xe,["enter"]),jt(J,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),U("div",dm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},se(o.value&&o.value.clock_in_at?Qt(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(F(),U("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:W[1]||(W[1]=Y=>ke("in"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",fm,[W[22]||(W[22]=c("label",null,"下班时间",-1)),O.value==="out"?(F(),U("div",pm,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":W[2]||(W[2]=Y=>j.value=Y),onKeydown:[jt(xe,["enter"]),jt(J,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),U("div",hm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},se(o.value&&o.value.clock_out_at?Qt(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(F(),U("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:W[3]||(W[3]=Y=>ke("out"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",vm,[W[23]||(W[23]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input","onUpdate:modelValue":W[4]||(W[4]=Y=>f.value=Y),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:E},null,40,mm),[[Re,f.value]]),c("datalist",{id:y.value},[(F(!0),U(Le,null,ct(h.value,Y=>(F(),U("option",{key:Y,value:Y},null,8,gm))),128))],8,ym)]),c("div",bm,[W[24]||(W[24]=c("label",null,"考勤状态",-1)),c("div",wm,[M.value?(F(),U(Le,{key:0},[c("span",{class:tt(["dot",M.value.status])},null,2),c("span",null,se(M.value.label),1),o.value&&o.value.kind==="makeup"?(F(),U("span",_m,"补卡")):Ee("",!0)],64)):(F(),U("span",km,"--"))])])]),o.value&&o.value.note?(F(),U("div",xm,"补卡说明:"+se(o.value.note),1)):Ee("",!0),c("div",Cm,[m.value&&(!o.value||!o.value.clock_in_at)?(F(),U("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ae},"上班打卡",8,Sm)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(F(),U("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:P},"下班打卡",8,Em)):Ee("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(F(),U("button",{key:2,class:"btn btn-sm",onClick:Fe},"补卡")):Ee("",!0),de.value?(F(),U("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:W[5]||(W[5]=Y=>te(!1))},"取消休假",8,Am)):(F(),U("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:ie},"标记休假",8,$m))])]),Be.value?(F(),U("div",Tm,[W[30]||(W[30]=c("div",{class:"sec-title"},"补卡登记",-1)),c("div",Pm,[c("div",Om,[W[26]||(W[26]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":W[6]||(W[6]=Y=>rt.value=Y)},null,512),[[Re,rt.value]])]),c("div",Mm,[W[27]||(W[27]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":W[7]||(W[7]=Y=>He.value=Y)},null,512),[[Re,He.value]])]),c("div",Im,[W[28]||(W[28]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input",list:y.value,"onUpdate:modelValue":W[8]||(W[8]=Y=>me.value=Y),placeholder:"可直接输入"},null,8,jm),[[Re,me.value]])]),c("div",Dm,[W[29]||(W[29]=c("label",null,"补卡原因",-1)),$e(c("input",{class:"input","onUpdate:modelValue":W[9]||(W[9]=Y=>Ye.value=Y),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,Ye.value]])])]),Me.value?(F(),U("div",Rm,se(Me.value),1)):Ee("",!0),c("div",Lm,[c("button",{class:"btn btn-sm",onClick:W[10]||(W[10]=Y=>Be.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):Ee("",!0),c("div",Km,[W[38]||(W[38]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增工作记录"),c("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),c("div",Fm,[c("div",Nm,[W[31]||(W[31]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{class:tt(["input",{invalid:Q.value}]),"onUpdate:modelValue":W[11]||(W[11]=Y=>Ce.value=Y),placeholder:"做了什么,一句话一条",onKeydown:jt(_,["enter"])},null,34),[[Re,Ce.value]]),Q.value?(F(),U("div",Vm,se(Q.value),1)):Ee("",!0)]),c("div",Bm,[W[33]||(W[33]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":W[12]||(W[12]=Y=>Z.value=Y)},[W[32]||(W[32]=c("option",{value:null},"无项目",-1)),(F(!0),U(Le,null,ct(C.value,Y=>(F(),U("option",{key:Y.id,value:Y.id},se(Y.name),9,Um))),128))],512),[[Fn,Z.value]])]),c("div",qm,[W[34]||(W[34]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":W[13]||(W[13]=Y=>_e.value=Y)},[(F(!0),U(Le,null,ct(Qt(Hs),Y=>(F(),U("option",{key:Y.key,value:Y.key},se(Y.label),9,Hm))),128))],512),[[Fn,_e.value]])]),c("div",Wm,[W[35]||(W[35]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":W[14]||(W[14]=Y=>Ve.value=Y),placeholder:"选填"},null,512),[[Re,Ve.value,void 0,{number:!0}]])]),c("div",zm,[W[36]||(W[36]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":W[15]||(W[15]=Y=>ft.value=Y),placeholder:"一句话:学到了什么"},null,512),[[Re,ft.value]])]),c("div",Gm,[W[37]||(W[37]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":W[16]||(W[16]=Y=>Yt.value=Y),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,Yt.value]])])]),c("div",Ym,[c("button",{class:"btn btn-sm",disabled:!je.value,onClick:k},"重置",8,Jm),c("button",{class:"btn btn-primary btn-sm",disabled:Jt.value,onClick:_},"添加记录",8,Xm)])]),c("div",Qm,[c("div",Zm,"工作记录("+se(a.value.length)+")",1),!a.value.length&&!n.value?(F(),U("div",ey,"暂无记录")):Ee("",!0),(F(!0),U(Le,null,ct(a.value,Y=>(F(),U("div",{key:Y.id,class:"item"},[c("div",ty,[c("span",ny,se(Qt(ol)(Y.category)),1),c("span",{class:"item-content",title:"点击编辑",onClick:Ae=>G(Y)},se(Y.content),9,ry),Y.project_id?(F(),U("span",sy,se(S(Y.project_id)),1)):Ee("",!0),Y.minutes?(F(),U("span",oy,se(Y.minutes)+" 分钟",1)):Ee("",!0),W[39]||(W[39]=c("span",{class:"flex1"},null,-1)),c("button",{class:"icon-btn",title:"编辑完整信息",onClick:Ae=>G(Y)},[Oe(ut,{name:"edit",size:14})],8,iy),c("button",{class:tt(["icon-btn",{active:Y.is_milestone===1}]),title:"成果标记",onClick:Ae=>ue(Y)},[Oe(ut,{name:"star",size:14})],10,ay),c("button",{class:tt(["icon-btn",{"active-warn":Y.needs_followup===1}]),title:"待跟进",onClick:Ae=>ge(Y)},[Oe(ut,{name:"flag",size:14})],10,ly),c("button",{class:"icon-btn",title:"删除",onClick:Ae=>ve.value=Y},[Oe(ut,{name:"close",size:14})],8,uy)]),Y.takeaway||Y.remark?(F(),U("div",cy,[Y.takeaway?(F(),U("div",dy,"收获:"+se(Y.takeaway),1)):Ee("",!0),Y.remark?(F(),U("div",fy,"备注:"+se(Y.remark),1)):Ee("",!0)])):Ee("",!0)]))),128)),a.value.length?(F(),U("div",py,[nn(" 共 "+se(a.value.length)+" 条事项 ",1),B.value?(F(),U(Le,{key:0},[nn(" · "+se((B.value/60).toFixed(1))+" 小时",1)],64)):Ee("",!0)])):Ee("",!0)]),Oe(cr,{open:!!ve.value,title:"删除确认",message:ve.value?"将删除工作记录「"+ve.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:W[17]||(W[17]=Y=>ve.value=null),onConfirm:le},null,8,["open","message"]),Oe(cr,{open:X.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:W[18]||(W[18]=Y=>X.value=!1),onConfirm:W[19]||(W[19]=Y=>te(!0))},null,8,["open"]),Oe(kv,{open:!!x.value,item:x.value,projects:u.value,date:e.date,onCancel:W[20]||(W[20]=Y=>x.value=null),onSave:ne},null,8,["open","item","projects","date"])]))}}),md=Gt(hy,[["__scopeId","data-v-2e90c9d8"]]),vy={class:"cal-page"},my={class:"cal-toolbar"},yy={class:"cal-title num"},gy={class:"cal-head"},by={class:"cal-grid"},wy=["title","onClick"],_y={class:"cal-marks"},ky={key:0,class:"drawer"},xy={class:"drawer-head"},Cy={class:"drawer-body"},Sy=Vt({__name:"CalendarView",setup(e){const t=N(xt()),n=at(()=>Number(t.value.slice(0,4))),s=at(()=>Number(t.value.slice(5,7))-1),o=at(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],u=at(()=>{const X=(new Date(n.value,s.value,1).getDay()+6)%7,de=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let te=0;te[ke.date,ke])),O=de[2],j=new Map;for(const ke of u.value){if(!ke.inMonth)continue;const J=Ws(te.get(ke.date),ke.date,ie,ke.date===h),xe=O.filter(Be=>Be.date===ke.date);j.set(ke.date,{status:J.status,label:J.label,location:((ce=te.get(ke.date))==null?void 0:ce.location)||"",hasLog:xe.length>0,hasMilestone:xe.some(Be=>Be.is_milestone===1)})}f.value=j}bt([n,s],y,{immediate:!0}),bt(zs,()=>{y()});function m(E){var X;return((X=f.value.get(E))==null?void 0:X.status)??""}function w(E){const X=f.value.get(E);return X?E+" · "+X.label+(X.location?" · "+X.location:""):E}function C(E){var X;return!!((X=f.value.get(E))!=null&&X.hasLog)}function S(E){var X;return!!((X=f.value.get(E))!=null&&X.hasMilestone)}function M(){t.value=zo(t.value,-1)}function B(){t.value=zo(t.value,1)}function oe(){t.value=xt()}const ae=N(null);function P(E,X){X&&(ae.value=E)}return bt(Ia,E=>{E&&(t.value=E,ae.value=E,Ia.value=null)},{immediate:!0}),(E,X)=>(F(),U("div",vy,[c("div",my,[c("button",{class:"icon-btn",onClick:M},[Oe(ut,{name:"chevron-left",size:16})]),c("span",yy,se(o.value),1),c("button",{class:"icon-btn",onClick:B},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:oe},"回到今天")]),c("div",gy,[(F(),U(Le,null,ct(a,de=>c("span",{key:de,class:"cal-week muted"},se(de),1)),64))]),c("div",by,[(F(!0),U(Le,null,ct(u.value,(de,ie)=>(F(),U("button",{key:ie,class:tt(["cal-cell",{blank:!de.inMonth,weekend:de.weekend,selected:ae.value===de.date}]),title:de.inMonth?w(de.date):void 0,onClick:te=>P(de.date,de.inMonth)},[de.inMonth?(F(),U(Le,{key:0},[c("span",{class:tt(["daynum num",{today:de.date===Qt(h)}])},se(Number(de.date.slice(8,10))),3),c("span",_y,[m(de.date)?(F(),U("span",{key:0,class:tt(["dot",m(de.date)])},null,2)):Ee("",!0),C(de.date)?(F(),It(ut,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ee("",!0),S(de.date)?(F(),It(ut,{key:2,name:"star",size:12,class:"mark-star"})):Ee("",!0)])],64)):Ee("",!0)],10,wy))),128))]),Oe(ns,{name:"drawer"},{default:fr(()=>[ae.value?(F(),U("aside",ky,[c("div",xy,[X[1]||(X[1]=c("span",{class:"drawer-title"},"当日详情",-1)),c("button",{class:"icon-btn",onClick:X[0]||(X[0]=de=>ae.value=null)},[Oe(ut,{name:"close",size:16})])]),c("div",Cy,[Oe(md,{date:ae.value},null,8,["date"])])])):Ee("",!0)]),_:1})]))}}),Ey=Gt(Sy,[["__scopeId","data-v-2404dfbe"]]),$y={class:"detail-page"},Ay={class:"detail-toolbar"},Ty=["value"],Py=["disabled"],Oy=Vt({__name:"TodayView",setup(e){const t=N(xt()),n=at(()=>t.value===xt());function s(){t.value=Kn(t.value,-1)}function o(){t.value=Kn(t.value,1)}function a(){t.value=xt()}function u(f){const h=f.target.value;h&&(t.value=h)}return(f,h)=>(F(),U("div",$y,[c("div",Ay,[c("button",{class:"icon-btn",title:"前一天",onClick:s},[Oe(ut,{name:"chevron-left",size:16})]),c("span",{class:tt(["date-title num",{"is-today":n.value}])},se(Qt(pd)(t.value)),3),c("button",{class:"icon-btn",title:"后一天",onClick:o},[Oe(ut,{name:"chevron-right",size:16})]),c("input",{type:"date",class:"input w-date",value:t.value,onChange:u},null,40,Ty),c("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,Py)]),Oe(md,{date:t.value},null,8,["date"])]))}}),My=Gt(Oy,[["__scopeId","data-v-76243d98"]]),Iy={class:"stats"},jy={class:"cards"},Dy={class:"card stat-card"},Ry={class:"stat-num num"},Ly={class:"card stat-card"},Ky={class:"stat-num num"},Fy={class:"card stat-card"},Ny={class:"stat-num num"},Vy={class:"card stat-card"},By={class:"stat-num num"},Uy={class:"card section"},qy={class:"heat"},Hy=["title"],Wy={class:"two-col"},zy={class:"card section"},Gy={class:"bar-label"},Yy={class:"bar-track"},Jy={class:"muted num bar-num"},Xy={key:0,class:"muted"},Qy={class:"card section"},Zy={class:"bar-label"},eg={class:"bar-track"},tg={class:"muted num bar-num"},ng={key:0,class:"muted"},rg={class:"card section"},sg={class:"bar-label loc-label"},og={class:"bar-track"},ig={class:"muted num bar-num"},ag={key:0,class:"muted"},lg=Vt({__name:"StatsView",setup(e){const t=N({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=N([]),s=N([]),o=N([]),a=N([]);async function u(){const y=xt(),m="2000-01-01",w=await Promise.all([jr(),yi(m,y),gi(m,y),Ks(!0)]),C=w[0],S=w[1],M=w[2],B=w[3],oe=S.filter(J=>J.clock_in_at||J.kind==="makeup");let ae=0;for(const J of oe){const xe=Ws(J,J.date,C,J.date===y);ae+=xe.workedMinutes??0}const P=new Set(M.map(J=>J.date));let E=0,X=y;for(P.has(X)||(X=Kn(y,-1));P.has(X);)E++,X=Kn(X,-1);t.value={attendDays:oe.length,totalHours:(ae/60).toFixed(1),itemCount:M.length,streak:E};const de=new Map;for(const J of oe){const xe=J.location||"未记录";de.set(xe,(de.get(xe)||0)+1)}a.value=Array.from(de.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/(oe.length||1)*100)})).sort((J,xe)=>xe.count-J.count);const ie=M.length||1;s.value=Hs.map(J=>{const xe=M.filter(Be=>Be.category===J.key).length;return{key:J.key,label:J.label,count:xe,percent:Math.round(xe/ie*100)}}).filter(J=>J.count>0).sort((J,xe)=>xe.count-J.count);const te=new Map(B.map(J=>[J.id,J.name])),O=new Map;for(const J of M){const xe=J.project_id?te.get(J.project_id)||"已删除项目":"无项目";O.set(xe,(O.get(xe)||0)+1)}o.value=Array.from(O.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/ie*100)})).sort((J,xe)=>xe.count-J.count);const j=new Map;for(const J of M)j.set(J.date,(j.get(J.date)||0)+1);const ce=Es(y),ke=[];for(let J=11;J>=0;J--){const xe=Kn(ce,-7*J),Be=[];for(let rt=0;rt<7;rt++){const He=Kn(xe,rt);Be.push({date:He,count:j.get(He)||0})}ke.push(Be)}n.value=ke}dn(async()=>{await u()}),bt(zs,()=>{u()});function f(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function h(y,m){return y+" · "+(m?m+" 条":"无记录")}return(y,m)=>(F(),U("div",Iy,[c("div",jy,[c("div",Dy,[m[0]||(m[0]=c("div",{class:"muted"},"出勤天数",-1)),c("div",Ry,se(t.value.attendDays),1)]),c("div",Ly,[m[1]||(m[1]=c("div",{class:"muted"},"累计工时(小时)",-1)),c("div",Ky,se(t.value.totalHours),1)]),c("div",Fy,[m[2]||(m[2]=c("div",{class:"muted"},"记录条数",-1)),c("div",Ny,se(t.value.itemCount),1)]),c("div",Vy,[m[3]||(m[3]=c("div",{class:"muted"},"连续记录(天)",-1)),c("div",By,se(t.value.streak),1)])]),c("div",Uy,[m[4]||(m[4]=c("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),c("div",qy,[(F(!0),U(Le,null,ct(n.value,(w,C)=>(F(),U("div",{key:C,class:"heat-col"},[(F(!0),U(Le,null,ct(w,S=>(F(),U("span",{key:S.date,class:tt(["heat-cell","lv"+f(S.count)]),title:h(S.date,S.count)},null,10,Hy))),128))]))),128))]),m[5]||(m[5]=qp('
少多
',1))]),c("div",Wy,[c("div",zy,[m[6]||(m[6]=c("div",{class:"section-title"},"分类分布",-1)),(F(!0),U(Le,null,ct(s.value,w=>(F(),U("div",{key:w.key,class:"bar-row"},[c("span",Gy,se(w.label),1),c("span",Yy,[c("span",{class:"bar-fill",style:or({width:w.percent+"%"})},null,4)]),c("span",Jy,se(w.count)+" 条 · "+se(w.percent)+"%",1)]))),128)),s.value.length?Ee("",!0):(F(),U("div",Xy,"暂无数据"))]),c("div",Qy,[m[7]||(m[7]=c("div",{class:"section-title"},"项目投入",-1)),(F(!0),U(Le,null,ct(o.value,w=>(F(),U("div",{key:w.name,class:"bar-row"},[c("span",Zy,se(w.name),1),c("span",eg,[c("span",{class:"bar-fill",style:or({width:w.percent+"%"})},null,4)]),c("span",tg,se(w.count)+" 条 · "+se(w.percent)+"%",1)]))),128)),o.value.length?Ee("",!0):(F(),U("div",ng,"暂无数据"))])]),c("div",rg,[m[8]||(m[8]=c("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(F(!0),U(Le,null,ct(a.value,w=>(F(),U("div",{key:w.name,class:"bar-row"},[c("span",sg,se(w.name),1),c("span",og,[c("span",{class:"bar-fill",style:or({width:w.percent+"%"})},null,4)]),c("span",ig,se(w.count)+" 天 · "+se(w.percent)+"%",1)]))),128)),a.value.length?Ee("",!0):(F(),U("div",ag,"暂无数据"))])]))}}),ug=Gt(lg,[["__scopeId","data-v-73e5ba49"]]);async function cg(e,t,n){const s=xt(),o=await Promise.all([jr(),yi(e,t),gi(e,t),Ks(!0),Bv(e,t)]),a=o[0],u=o[1],f=o[2],h=o[3],y=o[4];let m=0,w=0,C=0;for(const O of u){(O.clock_in_at||O.kind==="makeup")&&m++,O.kind==="makeup"&&C++;const j=Ws(O,O.date,a,O.date===s);w+=j.workedMinutes??0}const S=new Map;for(const O of u){if(!(O.clock_in_at||O.kind==="makeup"))continue;const j=O.location||"未记录";S.set(j,(S.get(j)||0)+1)}const M=Array.from(S.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,j)=>j.count-O.count),B=f.length||1,oe=Hs.map(O=>{const j=f.filter(ce=>ce.category===O.key).length;return{key:O.key,label:O.label,count:j,percent:Math.round(j/B*100)}}).filter(O=>O.count>0).sort((O,j)=>j.count-O.count),ae=new Map(h.map(O=>[O.id,O.name])),P=new Map;for(const O of f){const j=O.project_id?ae.get(O.project_id)||"已删除项目":"无项目";P.set(j,(P.get(j)||0)+1)}const E=Array.from(P.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,j)=>j.count-O.count),X=f.filter(O=>O.is_milestone===1).map(O=>({date:O.date,content:O.content})),de=f.filter(O=>O.needs_followup===1).map(O=>({date:O.date,content:O.content,remark:O.remark||""})),ie=f.filter(O=>!!O.takeaway).map(O=>({date:O.date,text:O.takeaway})),te=y.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:m,totalHours:(w/60).toFixed(1),makeupCount:C,leaveCount:u.filter(O=>O.kind==="leave").length,itemCount:f.length,categoryStats:oe,projectStats:E,locationStats:M,milestones:X,followups:de,takeaways:ie,weekNotes:te}}function dg(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(` +`)}const fg="modulepreload",pg=function(e,t){return new URL(e,t).href},Lu={},yd=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=pg(y,s),y in Lu)return;Lu[y]=!0;const m=y.endsWith(".css"),w=m?'[rel="stylesheet"]':"";if(!!s)for(let M=u.length-1;M>=0;M--){const B=u[M];if(B.href===y&&(!m||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${w}`))return;const S=document.createElement("link");if(S.rel=m?"stylesheet":fg,m||(S.as="script"),S.crossOrigin="",S.href=y,h&&S.setAttribute("nonce",h),document.head.appendChild(S),m)return new Promise((M,B)=>{S.addEventListener("load",M),S.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&a(f.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const hg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,u)=>{n.platforms.set(a,u)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},vg=e=>e.CapacitorPlatforms=hg(e),gd=vg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});gd.addPlatform;gd.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class pa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}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"},yg=e=>{var t,n,s,o,a;const u=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},h=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,m=()=>u!==null?u.name:mg(e),w=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,C=()=>w()!=="web",S=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||C,M=te=>{const O=X.get(te);return!!(O!=null&&O.platforms.has(w())||ae(te))},B=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||M,oe=te=>{var O;return(O=f.PluginHeaders)===null||O===void 0?void 0:O.find(j=>j.name===te)},ae=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||oe,P=te=>e.console.error(te),E=(te,O,j)=>Promise.reject(`${j} does not have an implementation of "${O}".`),X=new Map,de=(te,O={})=>{const j=X.get(te);if(j)return console.warn(`Capacitor plugin "${te}" already registered. Cannot register plugins twice.`),j.proxy;const ce=w(),ke=ae(te);let J;const xe=async()=>(!J&&ce in O?J=typeof O[ce]=="function"?J=await O[ce]():J=O[ce]:u!==null&&!J&&"web"in O&&(J=typeof O.web=="function"?J=await O.web():J=O.web),J),Be=(Fe,De)=>{var Ce,Q;if(ke){const Z=ke==null?void 0:ke.methods.find(_e=>De===_e.name);if(Z)return Z.rtype==="promise"?_e=>f.nativePromise(te,De.toString(),_e):(_e,Ve)=>f.nativeCallback(te,De.toString(),_e,Ve);if(Fe)return(Ce=Fe[De])===null||Ce===void 0?void 0:Ce.bind(Fe)}else{if(Fe)return(Q=Fe[De])===null||Q===void 0?void 0:Q.bind(Fe);throw new pa(`"${te}" plugin is not implemented on ${ce}`,Qr.Unimplemented)}},rt=Fe=>{let De;const Ce=(...Q)=>{const Z=xe().then(_e=>{const Ve=Be(_e,Fe);if(Ve){const ft=Ve(...Q);return De=ft==null?void 0:ft.remove,ft}else throw new pa(`"${te}.${Fe}()" is not implemented on ${ce}`,Qr.Unimplemented)});return Fe==="addListener"&&(Z.remove=async()=>De()),Z};return Ce.toString=()=>`${Fe.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:Fe,writable:!1,configurable:!1}),Ce},He=rt("addListener"),Ye=rt("removeListener"),me=(Fe,De)=>{const Ce=He({eventName:Fe},De),Q=async()=>{const _e=await Ce;Ye({eventName:Fe,callbackId:_e},De)},Z=new Promise(_e=>Ce.then(()=>_e({remove:Q})));return Z.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await Q()},Z},Me=new Proxy({},{get(Fe,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ke?me:He;case"removeListener":return Ye;default:return rt(De)}}});return h[te]=Me,X.set(te,{name:te,proxy:Me,platforms:new Set([...Object.keys(O),...ke?[ce]:[]])}),Me},ie=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||de;return f.convertFileSrc||(f.convertFileSrc=te=>te),f.getPlatform=w,f.handleError=P,f.isNativePlatform=S,f.isPluginAvailable=B,f.pluginMethodNoop=E,f.registerPlugin=ie,f.Exception=pa,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},gg=e=>e.Capacitor=yg(e),Zr=gg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),bd=Zr.registerPlugin;Zr.Plugins;class wd{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&this.sendRetainedArgumentsForEvent(t);const u=async()=>this.removeListener(t,n);return Promise.resolve({remove:u})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new Zr.Exception(t,Qr.Unimplemented)}unavailable(t="not available"){return new Zr.Exception(t,Qr.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(s=>{this.notifyListeners(t,s)}))}}const Ku=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Fu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class bg extends wd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Fu(o).trim(),a=Fu(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Ku(t.key),s=Ku(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),u=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${u};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}bd("CapacitorCookies",{web:()=>new bg});const wg=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),_g=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,u)=>(o[a]=e[t[u]],o),{})},kg=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,u]=o;let f,h;return Array.isArray(u)?(h="",u.forEach(y=>{f=t?encodeURIComponent(y):y,h+=`${a}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(u):u,h=`${a}=${f}`),`${s}&${h}`},"").substr(1):null,xg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=_g(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[u,f]of Object.entries(e.data||{}))a.set(u,f);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((f,h)=>{a.append(h,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;const u=new Headers(n.headers);u.delete("content-type"),n.headers=u}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class Cg extends wd{async request(t){const n=xg(t,t.webFetchExtra),s=kg(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),u=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};u.includes("application/json")&&(f="json");let h,y;switch(f){case"arraybuffer":case"blob":y=await a.blob(),h=await wg(y);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const m={};return a.headers.forEach((w,C)=>{m[C]=w}),{data:h,headers:m,status:a.status,url:a.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}bd("CapacitorHttp",{web:()=>new Cg});async function ll(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const u=await n.electronAPI.saveFile(e,t);return u&&u.saved?u.path:""}if(Zr.isNativePlatform()){const{Filesystem:u,Directory:f,Encoding:h}=await yd(async()=>{const{Filesystem:y,Directory:m,Encoding:w}=await import("./index-CA4kYWMg.js");return{Filesystem:y,Directory:m,Encoding:w}},[],import.meta.url);try{return(await u.writeFile({path:e,data:t,directory:f.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await u.writeFile({path:e,data:t,directory:f.Cache,encoding:h.UTF8,recursive:!0})).uri}}const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Sg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:ll},Symbol.toStringTag,{value:"Module"}));async function Da(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 Eg(e){const t=await Promise.all([gt("ai_base_url",""),gt("ai_api_key",""),gt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",u={"Content-Type":"application/json"};s&&(u.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(a,{method:"POST",headers:u,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let C="接口返回 "+y.status;try{const S=await y.json();S&&S.error&&S.error.message&&(C+=":"+S.error.message)}catch{}throw new Error(C)}const m=await y.json(),w=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!w)throw new Error("接口未返回内容");return String(w)}const $g={class:"report"},Ag={class:"report-toolbar"},Tg={class:"seg"},Pg=["onClick"],Og=["disabled"],Mg=["disabled"],Ig={key:0,class:"ai-error"},jg={class:"report-grid"},Dg={class:"report-left"},Rg={class:"card section"},Lg={class:"section-title"},Kg={class:"muted note-saved"},Fg={class:"card section"},Ng={class:"report-right"},Vg={key:0,class:"card section"},Bg={class:"sum-row"},Ug={class:"num"},qg={class:"sum-row"},Hg={class:"num"},Wg={class:"sum-row"},zg={class:"num"},Gg={class:"sum-row"},Yg={class:"num"},Jg={class:"sum-row"},Xg={class:"num"},Qg={class:"muted"},Zg={class:"num"},eb={key:0,class:"muted sum-empty"},tb={class:"muted"},nb={key:1,class:"muted sum-empty"},rb={class:"muted"},sb={key:2,class:"muted sum-empty"},ob={class:"muted"},ib={key:3,class:"muted sum-empty"},ab=Vt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=N("week"),s=N(Es(xt())),o=N(xt()),a=N(null),u=N(""),f=N(!1),h=N(!1),y=N(null),m=N(""),w=N(Es(xt())),C=N(""),S=N(""),M=N(""),B=N(!1);async function oe(){const O=await al(w.value);C.value=(O==null?void 0:O.highlights)||"",S.value=(O==null?void 0:O.challenges)||"",M.value=(O==null?void 0:O.plan_next)||"",B.value=!1}async function ae(){await Vv(w.value,{highlights:C.value.trim()||null,challenges:S.value.trim()||null,plan_next:M.value.trim()||null}),B.value=!0,await E()}function P(O){const j=xt();if(O==="week"){const ce=Es(j);return{start:ce,end:Kn(ce,6),label:"本周"}}if(O==="month"){const ce=j.slice(0,7);return{start:ce+"-01",end:j,label:ce+" 本月"}}return O==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function E(){f.value=!0;const O=P(n.value),j=await cg(O.start,O.end,O.label);a.value=j,u.value=dg(j),f.value=!1}bt(n,E),bt([s,o],()=>{n.value==="custom"&&E()}),dn(async()=>{await oe(),await E()});async function X(){const O=xt().replace(/-/g,""),j=await ll("实习工作总结_"+O+".md",u.value);We(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function de(){await Da(u.value),We("总结已复制到剪贴板")}async function ie(){if(h.value)return;m.value="";const O=u.value.trim();if(!O){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=u.value,u.value=await Eg(O),We("AI 润色完成")}catch(j){y.value=null,m.value=j instanceof Error?j.message:"润色失败"}h.value=!1}function te(){y.value!==null&&(u.value=y.value),y.value=null}return(O,j)=>(F(),U("div",$g,[c("div",Ag,[c("div",Tg,[(F(),U(Le,null,ct(t,ce=>c("button",{key:ce.key,class:tt(["seg-btn",{active:n.value===ce.key}]),onClick:ke=>n.value=ce.key},se(ce.label),11,Pg)),64))]),n.value==="custom"?(F(),U(Le,{key:0},[$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=ce=>s.value=ce)},null,512),[[Re,s.value]]),j[6]||(j[6]=c("span",{class:"muted"},"至",-1)),$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=ce=>o.value=ce)},null,512),[[Re,o.value]])],64)):Ee("",!0),j[10]||(j[10]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Oe(ut,{name:"edit",size:14}),j[7]||(j[7]=nn("AI 润色 ",-1))],8,Og),y.value!==null?(F(),U("button",{key:1,class:"btn btn-sm",onClick:te},"还原润色前")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:f.value,onClick:E},[Oe(ut,{name:"edit",size:14}),j[8]||(j[8]=nn("重新生成 ",-1))],8,Mg),c("button",{class:"btn btn-sm",onClick:de},"复制"),c("button",{class:"btn btn-primary btn-sm",onClick:X},[Oe(ut,{name:"export",size:14}),j[9]||(j[9]=nn("导出 Markdown ",-1))])]),m.value?(F(),U("div",Ig,se(m.value),1)):Ee("",!0),c("div",jg,[c("div",Dg,[c("div",Rg,[c("div",Lg,"本周周记("+se(w.value)+" 起)",1),j[11]||(j[11]=c("label",{class:"note-label muted"},"本周亮点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=ce=>C.value=ce),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[Re,C.value]]),j[12]||(j[12]=c("label",{class:"note-label muted"},"踩的坑",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=ce=>S.value=ce),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[Re,S.value]]),j[13]||(j[13]=c("label",{class:"note-label muted"},"下周计划",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=ce=>M.value=ce),placeholder:"下周准备做什么",onBlur:ae},null,544),[[Re,M.value]]),c("div",Kg,se(B.value?"已保存":"失焦自动保存"),1)]),c("div",Fg,[j[14]||(j[14]=c("div",{class:"section-title"},"总结草稿(可编辑)",-1)),$e(c("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=ce=>u.value=ce),spellcheck:"false"},null,512),[[Re,u.value]])])]),c("div",Ng,[a.value?(F(),U("div",Vg,[j[20]||(j[20]=c("div",{class:"section-title"},"数据摘要",-1)),c("div",Bg,[j[15]||(j[15]=c("span",{class:"muted"},"出勤",-1)),c("span",Ug,se(a.value.attendDays)+" 天",1)]),c("div",qg,[j[16]||(j[16]=c("span",{class:"muted"},"工时",-1)),c("span",Hg,se(a.value.totalHours)+" 小时",1)]),c("div",Wg,[j[17]||(j[17]=c("span",{class:"muted"},"补卡",-1)),c("span",zg,se(a.value.makeupCount)+" 次",1)]),c("div",Gg,[j[18]||(j[18]=c("span",{class:"muted"},"请假",-1)),c("span",Yg,se(a.value.leaveCount)+" 天",1)]),c("div",Jg,[j[19]||(j[19]=c("span",{class:"muted"},"记录",-1)),c("span",Xg,se(a.value.itemCount)+" 条",1)]),j[21]||(j[21]=c("div",{class:"section-sub"},"分类分布",-1)),(F(!0),U(Le,null,ct(a.value.categoryStats,ce=>(F(),U("div",{key:ce.key,class:"sum-row"},[c("span",Qg,se(ce.label),1),c("span",Zg,se(ce.count)+" 条 · "+se(ce.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ee("",!0):(F(),U("div",eb,"(无)")),j[22]||(j[22]=c("div",{class:"section-sub"},"主要成果",-1)),(F(!0),U(Le,null,ct(a.value.milestones,(ce,ke)=>(F(),U("div",{key:"m"+ke,class:"sum-item"},[nn(se(ce.content),1),c("span",tb,"("+se(ce.date)+")",1)]))),128)),a.value.milestones.length?Ee("",!0):(F(),U("div",nb,"(无)")),j[23]||(j[23]=c("div",{class:"section-sub"},"待跟进",-1)),(F(!0),U(Le,null,ct(a.value.followups,(ce,ke)=>(F(),U("div",{key:"f"+ke,class:"sum-item"},[nn(se(ce.content),1),c("span",rb,"("+se(ce.date)+")",1)]))),128)),a.value.followups.length?Ee("",!0):(F(),U("div",sb,"(无)")),j[24]||(j[24]=c("div",{class:"section-sub"},"学习与成长",-1)),(F(!0),U(Le,null,ct(a.value.takeaways,(ce,ke)=>(F(),U("div",{key:"t"+ke,class:"sum-item"},[nn(se(ce.text),1),c("span",ob,"("+se(ce.date)+")",1)]))),128)),a.value.takeaways.length?Ee("",!0):(F(),U("div",ib,"(无)"))])):Ee("",!0)])])]))}}),lb=Gt(ab,[["__scopeId","data-v-43f9c59b"]]),ub=["aria-label"],cb={class:"dialog-head"},db={class:"dialog-title"},fb={class:"dialog-body"},pb={class:"form-grid"},hb={class:"field span2"},vb={class:"seg"},mb={class:"field"},yb={class:"field"},gb={class:"field"},bb=["value"],wb={key:0,class:"field"},_b={class:"seg"},kb={class:"field span2"},xb={key:0,class:"form-error"},Cb={class:"dialog-btns"},Sb=Vt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N("expense"),a=N("餐饮"),u=N(""),f=N(""),h=N(""),y=N(!1),m=N(!1),w=N(""),C=N(null);function S(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var P;ae?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,u.value=n.initial.amountYuan,f.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,w.value="",window.addEventListener("keydown",S),await ts(),(P=C.value)==null||P.focus()):window.removeEventListener("keydown",S)}),pr(()=>window.removeEventListener("keydown",S)),bt(o,ae=>{a.value=ae==="expense"?Wr[0]:Wo[0]});const M=at(()=>o.value==="expense"?Wr:Wo);function B(){return a.value&&M.value.includes(a.value)?a.value:M.value[0]}function oe(){const ae=String(u.value??"").trim(),P=Number(ae);if(!ae||!isFinite(P)||P<=0){w.value="请填写大于 0 的金额";return}if(!f.value){w.value="请选择日期";return}const E=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:B(),amount:Math.round(P*100),date:f.value,note:String(h.value??"").trim(),reimbursable:E,reimbursed:E&&m.value?1:0})}return(ae,P)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),U("div",{key:0,class:"mask",onClick:P[11]||(P[11]=Mr(E=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",cb,[c("span",db,se(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:P[0]||(P[0]=E=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",fb,[c("div",pb,[c("div",hb,[P[12]||(P[12]=c("label",null,"类型",-1)),c("div",vb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:P[1]||(P[1]=E=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:P[2]||(P[2]=E=>o.value="income")},"收入",2)])]),c("div",mb,[P[13]||(P[13]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{ref_key:"amountInput",ref:C,class:tt(["input",{invalid:w.value}]),"onUpdate:modelValue":P[3]||(P[3]=E=>u.value=E),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,u.value]])]),c("div",yb,[P[14]||(P[14]=c("label",null,"日期(必填)",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":P[4]||(P[4]=E=>f.value=E)},null,512),[[Re,f.value]])]),c("div",gb,[P[15]||(P[15]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":P[5]||(P[5]=E=>a.value=E)},[(F(!0),U(Le,null,ct(M.value,E=>(F(),U("option",{key:E,value:E},se(E),9,bb))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(F(),U("div",wb,[P[16]||(P[16]=c("label",null,"报销状态",-1)),c("div",_b,[c("button",{class:tt(["seg-btn",{active:!y.value}]),onClick:P[6]||(P[6]=E=>{y.value=!1,m.value=!1})},"无需报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&!m.value}]),onClick:P[7]||(P[7]=E=>{y.value=!0,m.value=!1})},"待报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&m.value}]),onClick:P[8]||(P[8]=E=>{y.value=!0,m.value=!0})},"已报销",2)])])):Ee("",!0),c("div",kb,[P[17]||(P[17]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":P[9]||(P[9]=E=>h.value=E),placeholder:"选填"},null,512),[[Re,h.value]])])]),w.value?(F(),U("div",xb,se(w.value),1)):Ee("",!0)]),c("div",Cb,[c("button",{class:"btn btn-sm",onClick:P[10]||(P[10]=E=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:oe},"保存")])],8,ub)])):Ee("",!0)]),_:1})]))}}),Eb=Gt(Sb,[["__scopeId","data-v-edca3327"]]),$b={class:"ledger-page"},Ab={class:"ledger-toolbar"},Tb={class:"month-title num"},Pb={class:"cards"},Ob={class:"card stat-card"},Mb={class:"stat-num num amt-income"},Ib={class:"card stat-card"},jb={class:"stat-num num"},Db={class:"card stat-card"},Rb={class:"card stat-card"},Lb={class:"stat-num num amt-warn"},Kb={class:"card sec"},Fb={class:"form-grid"},Nb={class:"field span2"},Vb={class:"seg"},Bb={class:"field"},Ub={class:"field"},qb={class:"field"},Hb=["value"],Wb={key:0,class:"field"},zb={class:"field span2"},Gb={key:0,class:"form-error"},Yb={class:"form-footer"},Jb=["disabled"],Xb=["disabled"],Qb={key:0,class:"card sec"},Zb={class:"bar-label"},ew={class:"bar-track"},tw={class:"muted num bar-num"},nw={key:1,class:"card section"},rw={class:"form-error"},sw={class:"card table-card"},ow={class:"tx-table"},iw={class:"num"},aw={class:"tag"},lw={class:"td-note"},uw={key:0,class:"muted"},cw={key:1,class:"tx-done"},dw={key:2,class:"tx-pending"},fw={class:"ops"},pw=["onClick"],hw=["onClick"],vw=["onClick"],mw={key:0},yw={class:"muted vault-note num"},gw=Vt({__name:"LedgerView",setup(e){const t=N(xt()),n=N([]),s=N(!0),o=N("expense"),a=N(""),u=N(Wr[0]),f=N(xt()),h=N(""),y=N(!1),m=N(""),w=N(""),C=N(!1),S=N(!1),M=N(null),B=N({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),oe=N(null),ae=at(()=>t.value.slice(0,7)+"-01"),P=at(()=>{const Q=Number(t.value.slice(0,4)),Z=Number(t.value.slice(5,7))-1,_e=new Date(Q,Z+1,0).getDate();return t.value.slice(0,7)+"-"+(_e<10?"0"+_e:String(_e))}),E=at(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function X(){s.value=!0;try{n.value=await Yv(ae.value,P.value),w.value=""}catch(Q){w.value="账目加载失败:"+(Q instanceof Error?Q.stack||Q.message:String(Q)),We("账目加载失败")}s.value=!1}dn(X),bt(t,X),bt(o,Q=>{u.value=Q==="expense"?Wr[0]:Wo[0]});const de=at(()=>n.value.slice().sort((Q,Z)=>Q.date===Z.date?Z.id-Q.id:Q.date{let Q=0,Z=0,_e=0;for(const Ve of n.value)Ve.type==="income"?Q+=Ve.amount:(Z+=Ve.amount,Ve.reimbursable===1&&Ve.reimbursed!==1&&(_e+=Ve.amount));return{income:Q,expense:Z,pending:_e,balance:Q-Z}}),te=N("all"),O=N("all"),j=at(()=>de.value.filter(Q=>!(te.value!=="all"&&Q.type!==te.value||O.value==="pending"&&!(Q.type==="expense"&&Q.reimbursable===1&&Q.reimbursed!==1)||O.value==="done"&&!(Q.reimbursable===1&&Q.reimbursed===1)))),ce=at(()=>{const Q=new Map;let Z=0;for(const Ve of n.value)Ve.type==="expense"&&(Q.set(Ve.category,(Q.get(Ve.category)||0)+Ve.amount),Z+=Ve.amount);const _e=Z||1;return Array.from(Q.entries()).map(Ve=>({name:Ve[0],amount:Ve[1],percent:Math.round(Ve[1]/_e*100)})).sort((Ve,ft)=>ft.amount-Ve.amount)});function ke(Q){return(Q/100).toFixed(2)}function J(Q){return(Q.type==="income"?"+":"-")+ke(Q.amount)}function xe(){t.value=zo(t.value,-1)}function Be(){t.value=zo(t.value,1)}function rt(){t.value=xt()}bt(a,()=>{m.value&&(m.value="")});async function He(){const Q=String(a.value??"").trim(),Z=Number(Q);if(!Q||!isFinite(Z)||Z<=0){m.value="请填写大于 0 的金额";return}if(!f.value){m.value="请选择日期";return}if(!C.value){C.value=!0;try{await Jv({type:o.value,category:u.value,amount:Math.round(Z*100),date:f.value,note:String(h.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(_e){We("添加失败:"+(_e instanceof Error?_e.message:String(_e))),C.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await X(),We("记账已添加"),C.value=!1}}const Ye=at(()=>String(a.value??"").trim()!==""||String(h.value??"").trim()!=="");function me(){a.value="",h.value="",y.value=!1,m.value=""}async function Me(Q){await Zv(Q.id),await X(),We("已标记为已报销")}function Fe(Q){M.value=Q.id,B.value={type:Q.type,category:Q.category,amountYuan:ke(Q.amount),date:Q.date,note:Q.note||"",reimbursable:Q.reimbursable,reimbursed:Q.reimbursed},S.value=!0}async function De(Q){const Z=M.value;await Xv(Z,Q),S.value=!1,await X(),We("账目已更新")}async function Ce(){oe.value&&oe.value.id&&await Qv(oe.value.id),oe.value=null,await X(),We("账目已删除")}return(Q,Z)=>(F(),U("div",$b,[c("div",Ab,[c("button",{class:"icon-btn",onClick:xe},[Oe(ut,{name:"chevron-left",size:16})]),c("span",Tb,se(E.value),1),c("button",{class:"icon-btn",onClick:Be},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:rt},"回到本月"),Z[13]||(Z[13]=c("span",{class:"flex1"},null,-1)),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[0]||(Z[0]=_e=>te.value=_e)},[...Z[11]||(Z[11]=[c("option",{value:"all"},"全部类型",-1),c("option",{value:"expense"},"仅支出",-1),c("option",{value:"income"},"仅收入",-1)])],512),[[Fn,te.value]]),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[1]||(Z[1]=_e=>O.value=_e)},[...Z[12]||(Z[12]=[c("option",{value:"all"},"全部报销",-1),c("option",{value:"pending"},"待报销",-1),c("option",{value:"done"},"已报销",-1)])],512),[[Fn,O.value]])]),c("div",Pb,[c("div",Ob,[Z[14]||(Z[14]=c("div",{class:"muted"},"本月收入(元)",-1)),c("div",Mb,se(ke(ie.value.income)),1)]),c("div",Ib,[Z[15]||(Z[15]=c("div",{class:"muted"},"本月支出(元)",-1)),c("div",jb,se(ke(ie.value.expense)),1)]),c("div",Db,[Z[16]||(Z[16]=c("div",{class:"muted"},"本月结余(元)",-1)),c("div",{class:tt(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},se(ke(ie.value.balance)),3)]),c("div",Rb,[Z[17]||(Z[17]=c("div",{class:"muted"},"待报销(元)",-1)),c("div",Lb,se(ke(ie.value.pending)),1)])]),c("div",Kb,[Z[24]||(Z[24]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增一笔"),c("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),c("div",Fb,[c("div",Nb,[Z[18]||(Z[18]=c("label",null,"类型",-1)),c("div",Vb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:Z[2]||(Z[2]=_e=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:Z[3]||(Z[3]=_e=>o.value="income")},"收入",2)])]),c("div",Bb,[Z[19]||(Z[19]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{class:tt(["input",{invalid:m.value}]),"onUpdate:modelValue":Z[4]||(Z[4]=_e=>a.value=_e),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(He,["enter"])},null,34),[[Re,a.value]])]),c("div",Ub,[Z[20]||(Z[20]=c("label",null,"日期",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":Z[5]||(Z[5]=_e=>f.value=_e)},null,512),[[Re,f.value]])]),c("div",qb,[Z[21]||(Z[21]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":Z[6]||(Z[6]=_e=>u.value=_e)},[(F(!0),U(Le,null,ct(o.value==="expense"?Qt(Wr):Qt(Wo),_e=>(F(),U("option",{key:_e,value:_e},se(_e),9,Hb))),128))],512),[[Fn,u.value]])]),o.value==="expense"?(F(),U("div",Wb,[Z[22]||(Z[22]=c("label",null,"报销",-1)),c("button",{class:tt(["toggle-btn",{on:y.value}]),onClick:Z[7]||(Z[7]=_e=>y.value=!y.value)},se(y.value?"需要报销":"无需报销"),3)])):Ee("",!0),c("div",zb,[Z[23]||(Z[23]=c("label",null,"备注",-1)),$e(c("input",{class:"input","onUpdate:modelValue":Z[8]||(Z[8]=_e=>h.value=_e),placeholder:"选填,如:客户现场午餐",onKeydown:jt(He,["enter"])},null,544),[[Re,h.value]])])]),m.value?(F(),U("div",Gb,se(m.value),1)):Ee("",!0),c("div",Yb,[c("button",{class:"btn btn-sm",disabled:!Ye.value,onClick:me},"重置",8,Jb),c("button",{class:"btn btn-primary btn-sm",disabled:C.value,onClick:He},"添加记录",8,Xb)])]),ce.value.length?(F(),U("div",Qb,[Z[25]||(Z[25]=c("div",{class:"sec-title"},"本月支出分类",-1)),(F(!0),U(Le,null,ct(ce.value,_e=>(F(),U("div",{key:_e.name,class:"bar-row"},[c("span",Zb,se(_e.name),1),c("span",ew,[c("span",{class:"bar-fill",style:or({width:_e.percent+"%"})},null,4)]),c("span",tw,se(ke(_e.amount))+" 元 · "+se(_e.percent)+"%",1)]))),128))])):Ee("",!0),w.value?(F(),U("div",nw,[c("div",rw,se(w.value),1),Z[26]||(Z[26]=c("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Ee("",!0),c("div",sw,[c("table",ow,[Z[28]||(Z[28]=c("thead",null,[c("tr",null,[c("th",null,"日期"),c("th",null,"分类"),c("th",null,"金额(元)"),c("th",null,"备注"),c("th",null,"报销"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),U(Le,null,ct(j.value,_e=>(F(),U("tr",{key:_e.id},[c("td",iw,se(_e.date),1),c("td",null,[c("span",aw,se(_e.category),1)]),c("td",{class:tt(["num",_e.type==="income"?"amt-income":"amt-expense"])},se(J(_e)),3),c("td",lw,se(_e.note||"--"),1),c("td",null,[_e.type!=="expense"||_e.reimbursable!==1?(F(),U("span",uw,"--")):_e.reimbursed===1?(F(),U("span",cw,"已报销")):(F(),U("span",dw,"待报销"))]),c("td",null,[c("div",fw,[_e.type==="expense"&&_e.reimbursable===1&&_e.reimbursed!==1?(F(),U("button",{key:0,class:"btn btn-xs",onClick:Ve=>Me(_e)},"标记已报销",8,pw)):Ee("",!0),c("button",{class:"btn btn-xs",onClick:Ve=>Fe(_e)},"编辑",8,hw),c("button",{class:"btn btn-xs",onClick:Ve=>oe.value=_e},"删除",8,vw)])])]))),128)),!j.value.length&&!s.value?(F(),U("tr",mw,[...Z[27]||(Z[27]=[c("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ee("",!0)])])]),c("div",yw,"筛选结果 "+se(j.value.length)+" 条 / 本月共 "+se(n.value.length)+" 条",1),Oe(Eb,{open:S.value,title:(M.value,"编辑账目"),initial:B.value,onCancel:Z[9]||(Z[9]=_e=>S.value=!1),onSave:De},null,8,["open","title","initial"]),Oe(cr,{open:!!oe.value,title:"删除确认",message:oe.value?"将删除 "+oe.value.date+" 的账目("+oe.value.category+" "+ke(oe.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[10]||(Z[10]=_e=>oe.value=null),onConfirm:Ce},null,8,["open","message"])]))}}),bw=Gt(gw,[["__scopeId","data-v-0f950d19"]]),ww={class:"memo-page"},_w={class:"card memo-list"},kw={class:"pane-head"},xw={class:"pane-title"},Cw={class:"memo-scroll"},Sw=["onClick"],Ew={class:"memo-item-title"},$w={class:"muted memo-item-sub"},Aw={class:"muted num memo-item-time"},Tw={key:0,class:"muted empty"},Pw={class:"card memo-editor"},Ow={class:"editor-foot"},Mw={class:"muted foot-info"},Iw=["disabled"],jw=["disabled"],Dw={key:1,class:"empty muted editor-empty"},Rw=Vt({__name:"MemoView",setup(e){const t=N([]),n=N(null),s=N(!1),o=N(""),a=N(""),u=N(null),f=N(null);async function h(){if(t.value=await Uv(),n.value&&n.value.id){const ie=t.value.find(te=>te.id===n.value.id);ie&&(n.value=ie)}}dn(async()=>{await h(),t.value.length&&w(t.value[0]),window.addEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y)),bt(ja,async ie=>{if(!ie)return;t.value.length||await h();const te=t.value.find(O=>O.id===ie);ja.value=null,te&&C(te)},{immediate:!0});function y(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&m.value&&(ie.preventDefault(),oe())}const m=at(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",te=n.value?n.value.content:"";return o.value!==ie||a.value!==te});function w(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function C(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(m.value){f.value={type:"select",memo:ie};return}w(ie)}}function S(){if(m.value){f.value={type:"new"};return}M()}function M(){n.value=null,s.value=!0,o.value="",a.value=""}function B(){n.value?w(n.value):M()}async function oe(){if(!o.value.trim()&&!a.value.trim()){We("标题与内容不能都为空");return}if(n.value&&n.value.id)await Hv(n.value.id,o.value,a.value),We("备忘已保存");else{const ie=await qv(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,We("备忘已创建")}await h()}function ae(){n.value&&n.value.id&&(u.value=n.value)}async function P(){u.value&&u.value.id&&(await Wv(u.value.id),We("备忘已删除")),u.value=null,await h(),M()}function E(){const ie=f.value;f.value=null,ie&&(ie.type==="select"?w(ie.memo):M())}function X(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function de(ie){return ie.replace("T"," ").slice(0,16)}return(ie,te)=>(F(),U("div",ww,[c("aside",_w,[c("div",kw,[c("span",xw,"备忘录("+se(t.value.length)+")",1),c("button",{class:"btn btn-primary btn-sm",onClick:S},"新建")]),c("div",Cw,[(F(!0),U(Le,null,ct(t.value,O=>(F(),U("div",{key:O.id,class:tt(["memo-item",{active:s.value&&n.value&&n.value.id===O.id}]),onClick:j=>C(O)},[c("div",Ew,se(O.title||"无标题"),1),c("div",$w,se(X(O)||"空"),1),c("div",Aw,se(de(O.updated_at)),1)],10,Sw))),128)),t.value.length?Ee("",!0):(F(),U("div",Tw,"暂无备忘"))])]),c("section",Pw,[s.value?(F(),U(Le,{key:0},[$e(c("input",{class:"input title-input","onUpdate:modelValue":te[0]||(te[0]=O=>o.value=O),placeholder:"标题"},null,512),[[Re,o.value]]),$e(c("textarea",{class:"textarea content-textarea","onUpdate:modelValue":te[1]||(te[1]=O=>a.value=O),placeholder:"内容"},null,512),[[Re,a.value]]),c("div",Ow,[c("span",Mw,[m.value?(F(),U(Le,{key:0},[nn("有未保存修改")],64)):n.value&&n.value.id?(F(),U(Le,{key:1},[nn("更新于 "+se(de(n.value.updated_at)),1)],64)):(F(),U(Le,{key:2},[nn("新备忘")],64))]),te[4]||(te[4]=c("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(F(),U("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:!m.value,onClick:B},"放弃修改",8,Iw),c("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:oe},"保存",8,jw)])],64)):(F(),U("div",Dw,"选择左侧备忘,或点击右上角新建"))]),Oe(cr,{open:!!u.value,title:"删除确认",message:u.value?"将删除备忘「"+(u.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:te[2]||(te[2]=O=>u.value=null),onConfirm:P},null,8,["open","message"]),Oe(cr,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:te[3]||(te[3]=O=>f.value=null),onConfirm:E},null,8,["open"])]))}}),Lw=Gt(Rw,[["__scopeId","data-v-74d60dba"]]),Kw=["aria-label"],Fw={class:"dialog-head"},Nw={class:"dialog-title"},Vw={class:"dialog-body"},Bw={class:"form-grid"},Uw={class:"field span2"},qw={class:"field span2"},Hw={class:"field span2"},Ww={class:"pwd-row"},zw={class:"field span2"},Gw={key:0,class:"form-error"},Yw={class:"dialog-btns"},Jw=Vt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(""),u=N(""),f=N(""),h=N(""),y=N(null);function m(S){n.open&&S.key==="Escape"&&s("cancel")}bt(()=>n.open,async S=>{var M;S?(o.value=n.initial.system,a.value=n.initial.account,u.value=n.initial.password,f.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await ts(),(M=y.value)==null||M.focus()):window.removeEventListener("keydown",m)}),pr(()=>window.removeEventListener("keydown",m));function w(){const S="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",B=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let ae=0;ae(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),U("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Mr(B=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Fw,[c("span",Nw,se(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=B=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",Vw,[c("div",Bw,[c("div",Uw,[M[7]||(M[7]=c("label",null,"系统名称(必填)",-1)),$e(c("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":M[1]||(M[1]=B=>o.value=B),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),c("div",qw,[M[8]||(M[8]=c("label",null,"账号(必填)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>a.value=B),placeholder:"用户名、工号或邮箱"},null,512),[[Re,a.value]])]),c("div",Hw,[M[9]||(M[9]=c("label",null,"密码(必填)",-1)),c("div",Ww,[$e(c("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>u.value=B),placeholder:"输入或点击生成"},null,512),[[Re,u.value]]),c("button",{class:"btn btn-sm",onClick:w},"生成")])]),c("div",zw,[M[10]||(M[10]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=B=>f.value=B),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),h.value?(F(),U("div",Gw,se(h.value),1)):Ee("",!0)]),c("div",Yw,[c("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=B=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:C},"保存")])],8,Kw)])):Ee("",!0)]),_:1})]))}}),Xw=Gt(Jw,[["__scopeId","data-v-f383b0a6"]]),_d=15e4;function Yo(e){const t=new Uint8Array(e);let n="";for(let s=0;s{n.value&&(ei(),n.value=!1,y.value=[],w.value={},We("长时间未操作,密码库已自动锁定"))},N_)}function O(){n.value&&te()}dn(async()=>{t.value=await xd(),window.addEventListener("click",O),window.addEventListener("keydown",O),n.value&&te()}),pr(()=>{window.removeEventListener("click",O),window.removeEventListener("keydown",O),ie!==null&&window.clearTimeout(ie)});const j=at(()=>{const Ce=m.value.trim().toLowerCase();return Ce?y.value.filter(Q=>(Q.system+" "+Q.account+" "+(Q.remark||"")).toLowerCase().includes(Ce)):y.value});async function ce(){if(!s.value){if(u.value="",!o.value){u.value="请输入主密码";return}if(o.value.length<6){u.value="主密码至少 6 位";return}if(o.value!==a.value){u.value="两次输入的主密码不一致";return}s.value=!0;try{await Zw(o.value),o.value="",a.value="",n.value=!0,te(),await de(),We("主密码已设置,密码库已解锁")}catch(Ce){u.value=Ce instanceof Error?Ce.message:"设置失败"}s.value=!1}}async function ke(){if(!s.value){if(h.value="",!f.value){h.value="请输入主密码";return}s.value=!0;try{await e_(f.value),f.value="",n.value=!0,te(),await de()}catch(Ce){h.value=Ce instanceof Error?Ce.message:"解锁失败"}s.value=!1}}function J(){ei(),n.value=!1,y.value=[],w.value={},ie!==null&&window.clearTimeout(ie),We("密码库已锁定")}async function xe(Ce){const Q=Ce.id;if(w.value[Q]){w.value[Q]=!1;return}try{Ce.passwordPlain=await ha(Q),w.value[Q]=!0}catch(Z){We(Z instanceof Error?Z.message:"解密失败")}}async function Be(Ce){try{const Q=await ha(Ce.id);await Da(Q),We("密码已复制")}catch(Q){We(Q instanceof Error?Q.message:"复制失败")}}async function rt(Ce){await Da(Ce.account),We("账号已复制")}function He(){S.value=null,M.value={system:"",account:"",password:"",remark:""},C.value=!0}async function Ye(Ce){try{const Q=await ha(Ce.id);S.value=Ce.id,M.value={system:Ce.system,account:Ce.account,password:Q,remark:Ce.remark||""},C.value=!0}catch(Q){We(Q instanceof Error?Q.message:"解密失败")}}async function me(Ce){const Q=S.value??void 0;await s_(Ce,Q),C.value=!1,await de(),We(Q?"账号已更新":"账号已添加")}async function Me(){B.value&&B.value.id&&(await o_(B.value.id),We("账号已删除")),B.value=null,await de()}function Fe(){ae.value="",P.value="",E.value="",X.value="",oe.value=!0}async function De(){X.value="";try{const Ce=await i_(ae.value,P.value);oe.value=!1,ae.value="",P.value="",E.value="",We("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){X.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,Q)=>(F(),U("div",l_,[t.value===null?(F(),U("div",u_,"加载中")):n.value?(F(),U(Le,{key:2},[c("div",m_,[c("div",y_,[Oe(ut,{name:"search",size:14,class:"search-icon"}),$e(c("input",{class:"input","onUpdate:modelValue":Q[3]||(Q[3]=Z=>m.value=Z),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,m.value]])]),Q[16]||(Q[16]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",onClick:Fe},"修改主密码"),c("button",{class:"btn btn-sm",onClick:J},"锁定"),c("button",{class:"btn btn-primary btn-sm",onClick:He},"新增账号")]),c("div",g_,[c("table",b_,[Q[18]||(Q[18]=c("thead",null,[c("tr",null,[c("th",null,"系统名称"),c("th",null,"账号"),c("th",null,"密码"),c("th",null,"备注"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),U(Le,null,ct(j.value,Z=>(F(),U("tr",{key:Z.id},[c("td",w_,se(Z.system),1),c("td",null,[c("span",{class:"copyable",title:"点击复制账号",onClick:_e=>rt(Z)},se(Z.account),9,__)]),c("td",null,[c("div",k_,[c("span",x_,se(w.value[Z.id]?Z.passwordPlain:"........"),1),c("button",{class:"btn btn-xs",onClick:_e=>xe(Z)},se(w.value[Z.id]?"隐藏":"显示"),9,C_),c("button",{class:"btn btn-xs",onClick:_e=>Be(Z)},"复制",8,S_)])]),c("td",E_,se(Z.remark||"--"),1),c("td",null,[c("div",$_,[c("button",{class:"btn btn-xs",onClick:_e=>Ye(Z)},"编辑",8,A_),c("button",{class:"btn btn-xs",onClick:_e=>B.value=Z},"删除",8,T_)])])]))),128)),j.value.length?Ee("",!0):(F(),U("tr",P_,[...Q[17]||(Q[17]=[c("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),c("div",O_,"共 "+se(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(F(),U("div",c_,[c("div",d_,[Oe(ut,{name:"lock",size:26})]),t.value===!1?(F(),U(Le,{key:0},[Q[12]||(Q[12]=c("div",{class:"lock-title"},"设置主密码",-1)),Q[13]||(Q[13]=c("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[0]||(Q[0]=Z=>o.value=Z),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(ce,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[1]||(Q[1]=Z=>a.value=Z),placeholder:"再次输入主密码",onKeydown:jt(ce,["enter"])},null,544),[[Re,a.value]]),u.value?(F(),U("div",f_,se(u.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ce},"完成设置并解锁",8,p_)],64)):(F(),U(Le,{key:1},[Q[14]||(Q[14]=c("div",{class:"lock-title"},"密码库已锁定",-1)),Q[15]||(Q[15]=c("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[2]||(Q[2]=Z=>f.value=Z),placeholder:"主密码",onKeydown:jt(ke,["enter"])},null,544),[[Re,f.value]]),h.value?(F(),U("div",h_,se(h.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ke},"解锁",8,v_)],64))])),Oe(Xw,{open:C.value,title:S.value?"编辑账号":"新增账号",initial:M.value,onCancel:Q[4]||(Q[4]=Z=>C.value=!1),onSave:me},null,8,["open","title","initial"]),Oe(cr,{open:!!B.value,title:"删除确认",message:B.value?"将删除系统「"+B.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Q[5]||(Q[5]=Z=>B.value=null),onConfirm:Me},null,8,["open","message"]),(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[oe.value?(F(),U("div",{key:0,class:"mask",onClick:Q[11]||(Q[11]=Mr(Z=>oe.value=!1,["self"]))},[c("div",M_,[c("div",I_,[Q[19]||(Q[19]=c("span",{class:"dialog-title"},"修改主密码",-1)),c("button",{class:"icon-btn",title:"关闭",onClick:Q[6]||(Q[6]=Z=>oe.value=!1)},[Oe(ut,{name:"close",size:16})])]),c("div",j_,[c("div",D_,[Q[20]||(Q[20]=c("label",null,"旧主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[7]||(Q[7]=Z=>ae.value=Z)},null,512),[[Re,ae.value]])]),c("div",R_,[Q[21]||(Q[21]=c("label",null,"新主密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[8]||(Q[8]=Z=>P.value=Z)},null,512),[[Re,P.value]])]),c("div",L_,[Q[22]||(Q[22]=c("label",null,"确认新主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":Q[9]||(Q[9]=Z=>E.value=Z)},null,512),[[Re,E.value]])]),X.value?(F(),U("div",K_,se(X.value),1)):Ee("",!0),Q[23]||(Q[23]=c("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),c("div",F_,[c("button",{class:"btn btn-sm",onClick:Q[10]||(Q[10]=Z=>oe.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):Ee("",!0)]),_:1})]))]))}}),B_=Gt(V_,[["__scopeId","data-v-6820bc9c"]]);function U_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Nu(e,t){const s="\uFEFF"+t.map(f=>f.map(U_).join(",")).join(`\r +`);if(Zr.isNativePlatform()){const{downloadText:f}=await yd(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>Sg);return{downloadText:h}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),u=document.createElement("a");return u.href=a,u.download=e,u.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class q_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new q_,wi="intern_worklog",cl="dsh_session_user";function Gs(){try{const e=localStorage.getItem(cl);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function Sd(e){localStorage.setItem(cl,JSON.stringify(e))}function Ed(){localStorage.removeItem(cl)}const dl="dsh_cloud_creds";function $d(e,t){localStorage.setItem(dl,JSON.stringify({username:e,password:t}))}function _i(){try{const e=localStorage.getItem(dl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function Ad(){localStorage.removeItem(dl)}let ti=null;function Fs(e){ti===e&&ee||(ee&&sl(),nv(new fd(wi+"_"+e)),ti=e)}async function H_(e,t,n){const s=e.trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");if(await Or.user.where("username").equals(s).first())throw new Error("用户名已存在");const a=ul(),u=await Xo(t,a),f="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:f,username:s,pwd_hash:u,pwd_salt:a,created_at:new Date().toISOString()}),Fs(f);let h=0;n&&await Td()&&(h=await J_(),await Or.user.update(f,{legacy_imported_at:new Date().toISOString()}));const y={userId:f,username:s};return Sd(y),$d(y.username,t),h&&X_(h),y}async function W_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Xo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");Fs(s.id);const a={userId:s.id,username:s.username};return Sd(a),$d(a.username,t),a}async function z_(){ei(),sl(),ti=null,Ed(),Ad()}async function G_(e,t){const n=Gs();if(!n)throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=await Or.user.get(n.userId);if(!s)throw new Error("用户不存在");if(await Xo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=ul(),u=await Xo(t,a);await Or.user.update(s.id,{pwd_hash:u,pwd_salt:a})}async function Y_(){const e=Gs();if(!e)throw new Error("未登录");ei(),sl(),ti=null,await Ir.delete(wi+"_"+e.userId),await Or.user.delete(e.userId),Ed(),Ad()}async function Td(){return Ir.exists(wi)}async function J_(){if(!ee)throw new Error("用户数据库未就绪");const e=new fd(wi),t=await Promise.all([e.project.toArray(),e.work_log.toArray(),e.log_item.toArray(),e.attendance.toArray(),e.weekly_note.toArray(),e.setting.toArray(),e.memo.toArray(),e.credential.toArray()]);await ee.transaction("rw",[ee.project,ee.work_log,ee.log_item,ee.attendance,ee.weekly_note,ee.setting,ee.memo,ee.credential],async()=>{await Promise.all([ee.project.clear(),ee.work_log.clear(),ee.log_item.clear(),ee.attendance.clear(),ee.weekly_note.clear(),ee.setting.clear(),ee.memo.clear(),ee.credential.clear()]),t[0].length&&await ee.project.bulkAdd(t[0]),t[1].length&&await ee.work_log.bulkAdd(t[1]),t[2].length&&await ee.log_item.bulkAdd(t[2]),t[3].length&&await ee.attendance.bulkAdd(t[3]),t[4].length&&await ee.weekly_note.bulkAdd(t[4]),t[5].length&&await ee.setting.bulkAdd(t[5]),t[6].length&&await ee.memo.bulkAdd(t[6]),t[7].length&&await ee.credential.bulkAdd(t[7])});const n=t[0].length+t[1].length+t[2].length+t[3].length+t[4].length+t[6].length+t[7].length;return e.close(),n}function X_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const ni=N(""),Ns=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Ra=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),Q_={project:"name",work_log:"date",attendance:"date",weekly_note:"week_start",setting:"key"};function Z_(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Vu(e){return JSON.stringify(e)}async function e1(e){return ee.table(e).toArray()}function La(e,t){return e==="setting"?t.key:t.id}async function t1(){for(const e of Ns){const t=ee.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Ra.has(s.key))continue;const o={};s.uuid||(o.uuid=Z_()),s.updated_at||(o.updated_at=s.created_at||vt()),Object.keys(o).length&&await t.update(La(e,s),o)}}}async function n1(){return _i()!=null}async function r1(){return gt("sync_last_time","")}async function Pd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function s1(e,t){let n=await gt("sync_token","");return n||(n=await Pd(e,t),await kt("sync_token",n),n)}let $s=!1,Io=!1,Ka=!1,Gr=null,wn=null,Fa="",Bu=!1,jo=null;async function Yr(){if($s){Io=!0;return}try{if(!await n1())return;await Id(await Od()),ni.value=""}catch(e){ni.value=e instanceof Error?e.message:String(e)}}function o1(){if(Bu)return;Bu=!0,jo=tv(async()=>{const t={};for(const n of Ns)t[n]=await ee.table(n).count();return t}).subscribe({next:()=>{Ka||$s||(Gr&&globalThis.clearTimeout(Gr),Gr=globalThis.setTimeout(()=>{Yr()},3e3))},error:()=>{}})}function i1(){jo&&(jo.unsubscribe(),jo=null),wn&&(wn.close(),wn=null,Fa=""),Gr&&(globalThis.clearTimeout(Gr),Gr=null)}function a1(e,t){const n=e+"|"+t;if(!(wn&&Fa===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Fa=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function fl(){return await gt("sync_base_url","")||l1}const l1="https://daywk.linyux.cn";async function Od(){const e=_i();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await fl(),username:e.username,password:e.password}}async function Md(){const e=_i();if(!e)throw new Error("未登录");const t=await fl(),n={"Content-Type":"application/json"},s=JSON.stringify({username:e.username,password:e.password});let o=await fetch(t+"/api/auth/register",{method:"POST",headers:n,body:s});if(o.status===409){if(o=await fetch(t+"/api/auth/login",{method:"POST",headers:n,body:s}),!o.ok)throw new Error("云端已存在同名账号且密码不一致,请检查")}else if(!o.ok)throw new Error("云端绑定失败:"+o.status)}async function u1(){return Id(await Od())}function Uu(e,t,n){const s={};for(const o of Object.keys(t))o!=="id"&&(s[o]=t[o]);if(e==="log_item"){delete s.work_log_id,delete s.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(s.wuuid=o.uuid);const a=t.project_id?n.project.get(t.project_id):null;a&&a.uuid&&(s.puuid=a.uuid)}return s}async function qu(){const e=await ee.work_log.toArray(),t=await ee.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let Do=0;async function Id(e){if($s)return Io=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};$s=!0,Ka=!0,Do=0;try{const t=await c1(e);return Io&&(Io=!1,globalThis.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,Ka=!1}}async function c1(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await t1();const n=await qu(),s=await ee.sync_mirror.toArray(),o=new Map;for(const E of s)o.set(E.table+"|"+E.uuid,E);const a={},u=[];let f=0;for(const E of Ns){let X=await e1(E);E==="setting"&&(X=X.filter(ie=>!Ra.has(ie.key)));const de=new Map;for(const ie of X)de.set(ie.uuid,ie);for(const[ie,te]of de){const O=Uu(E,te,n),j=Vu(O),ce=o.get(E+"|"+ie);(!ce||ce.hash!==j)&&(a[E]=a[E]||[],a[E].push(O),f++)}for(const[ie,te]of o)ie.startsWith(E+"|")&&!de.has(te.uuid)&&u.push({table:E,uuid:te.uuid,deleted_at:vt()});a[E]=a[E]||[]}const h=await ee.tombstone.toArray();for(const E of h)u.push({table:E.table,uuid:E.uuid,deleted_at:E.deleted_at});const y=await s1(t,e),m=E=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+E},body:JSON.stringify({device:"client",tables:a,tombstones:u})});let w=await m(y);if(w.status===401){await kt("sync_token","");const E=await Pd(t,e);await kt("sync_token",E),w=await m(E)}if(!w.ok)throw new Error("同步服务返回 "+w.status);const C=await w.json(),S=C.tables||{},M=C.tombstones||[],B=await f1(S,M),oe=await qu(),ae=[];for(const E of Ns){const X=await ee.table(E).toArray();for(const de of X)E==="setting"&&Ra.has(de.key)||ae.push({table:E,uuid:de.uuid,hash:Vu(Uu(E,de,oe))})}await ee.sync_mirror.clear(),ae.length&&await ee.sync_mirror.bulkAdd(ae.map(E=>({...E}))),a1(t,y);const P=vt();if(await kt("sync_last_time",P),(B.pulled>0||B.removed>0)&&nr(),h.length){const E=new Set(h.map(X=>X.id));await ee.tombstone.where("id").anyOf(Array.from(E)).delete()}return{pushed:f,pulled:B.pulled,removed:B.removed,errors:B.errors,at:P}}let va=new Map,ma=new Map,d1=0;async function f1(e,t){let n=0,s=0;for(const o of Ns){const a=ee.table(o),u=await a.toArray(),f=new Map;for(const C of u)f.set(C.uuid,C);const h=Q_[o]||null,y=new Map;if(h)for(const C of u){const S=C[h];S!=null&&S!==""&&y.set(String(S),C)}const m=new Set(t.filter(C=>C.table===o).map(C=>C.uuid)),w=e[o]||[];for(const C of w)try{if(m.has(C.uuid))continue;const S=f.get(C.uuid);if(S){const M=String(S.updated_at||"");if(String(C.updated_at||"")>M){const oe={...C};if(o==="setting"&&delete oe.key,o==="log_item"){const ae=C.wuuid?va.get(C.wuuid):null;if(!ae)continue;oe.work_log_id=ae,delete oe.wuuid,oe.project_id=C.puuid?ma.get(C.puuid)??null:S.project_id??null,delete oe.puuid}await a.update(S.id,oe),n++}}else{const M=h&&C[h]!=null&&C[h]!==""?String(C[h]):null,B=M?y.get(M):void 0;if(B&&B.uuid!==C.uuid){const oe=String(B.updated_at||"");if(String(C.updated_at||"")>=oe){o==="work_log"&&await ee.log_item.where("work_log_id").equals(B.id).modify({work_log_id:-1}),await a.delete(La(o,B)),await ee.tombstone.add({table:o,uuid:B.uuid,deleted_at:vt()});const P=await a.add({...C});o==="work_log"&&await ee.log_item.where("work_log_id").equals(-1).modify({work_log_id:P}),f.set(C.uuid,{...C,id:P}),h&&M&&y.set(M,{...C,id:P}),n++}else await ee.tombstone.add({table:o,uuid:C.uuid,deleted_at:vt()}),d1++}else{if(o==="log_item"){const ae=C.wuuid?va.get(C.wuuid):null;if(!ae)continue;C.work_log_id=ae,delete C.wuuid,C.project_id=C.puuid?ma.get(C.puuid)??null:null,delete C.puuid}const oe=await a.add({...C});f.set(C.uuid,{...C,id:oe}),h&&M&&y.set(M,{...C,id:oe}),n++}}}catch(S){Do++,S instanceof Error?S.message:String(S)}for(const C of u)if(m.has(C.uuid))try{if(o==="work_log"){const M=(await a.toArray()).find(B=>B.date===C.date&&!m.has(B.uuid)&&B.uuid!==C.uuid);M&&C.id&&await ee.log_item.where("work_log_id").equals(C.id).modify({work_log_id:M.id})}await a.delete(La(o,C)),s++}catch{Do++}if(o==="work_log"){const C=await a.toArray();va=new Map(C.map(S=>[S.uuid,S.id]))}if(o==="project"){const C=await a.toArray();ma=new Map(C.map(S=>[S.uuid,S.id]))}}return{pulled:n,removed:s,errors:Do}}const p1={class:"settings"},h1={class:"card section"},v1={class:"muted acc-line"},m1={class:"ai-grid"},y1={class:"rule-item"},g1={class:"rule-item"},b1={class:"rule-item"},w1={key:0,class:"form-error"},_1={class:"rule-save"},k1={class:"card section"},x1={class:"rule-grid"},C1={class:"rule-item"},S1={class:"rule-item"},E1={class:"rule-item"},$1={class:"rule-item"},A1={class:"rule-item"},T1={class:"card section"},P1={class:"proj-add"},O1={key:0,class:"muted proj-tip"},M1=["onKeydown"],I1=["onClick"],j1=["onClick"],D1=["onClick"],R1={key:1,class:"muted"},L1={class:"card section"},K1={class:"card section"},F1={class:"muted acc-line"},N1={class:"rule-item"},V1={class:"rule-save"},B1=["disabled"],U1={key:0,class:"muted acc-line"},q1={key:1,class:"form-error"},H1={key:2,class:"form-error"},W1={key:3,class:"form-error"},z1={class:"card section"},G1={class:"ai-grid"},Y1={class:"rule-item"},J1={class:"rule-item"},X1={class:"rule-item"},Q1={class:"card section"},Z1={class:"backup-row"},e0={key:0,class:"import-error"},t0=Vt({__name:"SettingsView",setup(e){var k;const t=N({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=N([]),s=N(""),o=N(""),a=N(""),u=N(""),f=N(""),h=N(""),y=N(null),m=N(""),w=N(null),C=N(null),S=N(""),M=N(((k=Gs())==null?void 0:k.username)||""),B=N(""),oe=N(""),ae=N(""),P=N(""),E=N(!1),X="0.2.0",de=N(""),ie=N(""),te=N(""),O=N(""),j=N(""),ce=N(!1),ke=N("");async function J(){var x;de.value=await fl(),ie.value=((x=_i())==null?void 0:x.username)||"",ke.value=await r1(),loadError.value=ni.value;const _=await isSyncConfigured();autoOn.value=_}async function xe(){await kt("sync_base_url",de.value.trim()),We("同步地址已保存")}async function Be(){O.value="";try{await Md(),We("云端绑定已重建")}catch(_){O.value=_ instanceof Error?_.message:"绑定失败"}}async function rt(){if(!ce.value){O.value="",j.value=ni.value,ce.value=!0;try{await xe();const _=await u1();ke.value=_.at,te.value="推送 "+_.pushed+" 条 · 拉取 "+_.pulled+" 条 · 删除 "+_.removed+" 条",j.value="",We("同步完成")}catch(_){O.value=_ instanceof Error?_.message:"同步失败"}ce.value=!1}}async function He(){if(P.value="",oe.value!==ae.value){P.value="两次输入的新密码不一致";return}try{await G_(B.value,oe.value),B.value="",oe.value="",ae.value="",We("登录密码已修改")}catch(_){P.value=_ instanceof Error?_.message:"修改失败"}}async function Ye(){await Y_(),window.location.reload()}async function me(){t.value=await jr(),n.value=await Ks(!0),a.value=(await il()).join(` +`),u.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),h.value=await gt("ai_model",""),await J()}async function Me(){await kt("ai_base_url",u.value.trim()),await kt("ai_api_key",f.value.trim()),await kt("ai_model",h.value.trim()),We("AI 配置已保存")}async function Fe(){const _=xt(),x=await Promise.all([gi("2000-01-01",_),Ks(!0)]),G=x[0],ne=x[1],ue=new Map(ne.map(le=>[le.id,le.name])),ge=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const le of G)ge.push([le.date,ol(le.category),le.project_id&&ue.get(le.project_id)||"",le.content,le.minutes==null?"":le.minutes,le.is_milestone?"是":"",le.needs_followup?"是":"",le.takeaway||"",le.remark||""]);const ve=await Nu("工作记录_"+_.replace(/-/g,"")+".csv",ge);We(ve?"CSV 已导出到:"+ve:"CSV 已导出到系统下载目录")}async function De(){const _=xt(),x=await Promise.all([jr(),yi("2000-01-01",_)]),G=x[0],ne=x[1],ue=["周日","周一","周二","周三","周四","周五","周六"],ge=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const le of ne){const H=Ws(le,le.date,G,le.date===_);ge.push([le.date,ue[rs(le.date).getDay()],H.label,le.clock_in_at?Vn(le.clock_in_at):"",le.clock_out_at?Vn(le.clock_out_at):"",le.location||"",le.kind==="makeup"?"补卡":le.kind==="leave"?"休假":"正常",le.note||""])}const ve=await Nu("考勤记录_"+_.replace(/-/g,"")+".csv",ge);We(ve?"CSV 已导出到:"+ve:"CSV 已导出到系统下载目录")}dn(me);async function Ce(){await kt("work_start",t.value.work_start),await kt("work_end",t.value.work_end),await kt("grace_minutes",String(t.value.grace_minutes)),await kt("lunch_minutes",String(t.value.lunch_minutes)),await kt("remind_weekly",t.value.remind_weekly),We("打卡规则已保存")}async function Q(){await hd(a.value.split(` +`)),We("常用地点已保存")}async function Z(){const _=s.value.trim();if(_){try{await Av(_),o.value="",s.value=""}catch{o.value="项目名已存在"}await me()}}function _e(_){y.value=_.id,m.value=_.name}async function Ve(_){const x=m.value.trim();if(x)try{await Tv(_.id,x),o.value=""}catch{o.value="项目名已存在"}y.value=null,await me()}async function ft(_){await Pv(_.id,_.archived!==1),await me()}async function Yt(){try{const _=await em(),x=await ll("实习日志备份_"+xt().replace(/-/g,"")+".json",_);We(x?"备份已导出到:"+x:"备份已导出到系统下载目录")}catch(_){We("导出失败:"+(_ instanceof Error?_.message:String(_)))}}function Jt(_){const x=_.target,G=x.files&&x.files[0];if(S.value="",!G)return;const ne=G.name;G.text().then(ue=>{C.value={name:ne,text:ue}}),x.value=""}async function je(){if(C.value)try{await tm(C.value.text),C.value=null,S.value="",await me(),We("数据导入完成")}catch(_){C.value=null,S.value=_ instanceof Error?_.message:"导入失败"}}return(_,x)=>(F(),U("div",p1,[c("div",h1,[x[23]||(x[23]=c("div",{class:"section-title"},"账号与隐私",-1)),c("div",v1,"版本 v"+se(Qt(X))+" · 当前用户:"+se(M.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),c("div",m1,[c("div",y1,[x[20]||(x[20]=c("label",null,"旧登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":x[0]||(x[0]=G=>B.value=G)},null,512),[[Re,B.value]])]),c("div",g1,[x[21]||(x[21]=c("label",null,"新登录密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":x[1]||(x[1]=G=>oe.value=G)},null,512),[[Re,oe.value]])]),c("div",b1,[x[22]||(x[22]=c("label",null,"确认新登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":x[2]||(x[2]=G=>ae.value=G)},null,512),[[Re,ae.value]])])]),P.value?(F(),U("div",w1,se(P.value),1)):Ee("",!0),c("div",_1,[c("button",{class:"btn btn-primary btn-sm",onClick:He},"修改登录密码"),c("button",{class:"btn btn-sm btn-danger",onClick:x[3]||(x[3]=G=>E.value=!0)},"删除此用户及全部数据")])]),c("div",k1,[x[30]||(x[30]=c("div",{class:"section-title"},"打卡规则",-1)),c("div",x1,[c("div",C1,[x[24]||(x[24]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":x[4]||(x[4]=G=>t.value.work_start=G)},null,512),[[Re,t.value.work_start]])]),c("div",S1,[x[25]||(x[25]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":x[5]||(x[5]=G=>t.value.work_end=G)},null,512),[[Re,t.value.work_end]])]),c("div",E1,[x[26]||(x[26]=c("label",null,"迟到宽限(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":x[6]||(x[6]=G=>t.value.grace_minutes=G)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),c("div",$1,[x[27]||(x[27]=c("label",null,"午休扣除(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":x[7]||(x[7]=G=>t.value.lunch_minutes=G)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),c("div",A1,[x[29]||(x[29]=c("label",null,"周记提醒",-1)),$e(c("select",{class:"select","onUpdate:modelValue":x[8]||(x[8]=G=>t.value.remind_weekly=G)},[...x[28]||(x[28]=[c("option",{value:"friday"},"每周五提醒",-1),c("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:Ce},"保存规则")])]),c("div",T1,[x[31]||(x[31]=c("div",{class:"section-title"},"项目管理",-1)),c("div",P1,[$e(c("input",{class:"input","onUpdate:modelValue":x[9]||(x[9]=G=>s.value=G),placeholder:"新项目名称",onKeydown:jt(Z,["enter"])},null,544),[[Re,s.value]]),c("button",{class:"btn btn-sm",onClick:Z},"添加")]),o.value?(F(),U("div",O1,se(o.value),1)):Ee("",!0),(F(!0),U(Le,null,ct(n.value,G=>(F(),U("div",{key:G.id,class:"proj-row"},[y.value===G.id?(F(),U(Le,{key:0},[$e(c("input",{class:"input","onUpdate:modelValue":x[10]||(x[10]=ne=>m.value=ne),onKeydown:jt(ne=>Ve(G),["enter"])},null,40,M1),[[Re,m.value]]),c("button",{class:"btn btn-sm",onClick:ne=>Ve(G)},"保存",8,I1),c("button",{class:"btn btn-sm",onClick:x[11]||(x[11]=ne=>y.value=null)},"取消")],64)):(F(),U(Le,{key:1},[c("span",{class:tt(["proj-name",{archived:G.archived===1}])},se(G.name),3),c("button",{class:"icon-btn",title:"重命名",onClick:ne=>_e(G)},[Oe(ut,{name:"edit",size:14})],8,j1),c("button",{class:"btn btn-sm",onClick:ne=>ft(G)},se(G.archived===1?"恢复":"归档"),9,D1)],64))]))),128)),n.value.length?Ee("",!0):(F(),U("div",R1,"暂无项目,先添加一个"))]),c("div",L1,[x[33]||(x[33]=c("div",{class:"section-title"},"常用地点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":x[12]||(x[12]=G=>a.value=G),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,a.value]]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:Q},"保存地点"),x[32]||(x[32]=c("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),c("div",K1,[x[35]||(x[35]=c("div",{class:"section-title"},"多端数据同步",-1)),c("div",F1,"云端账号:"+se(ie.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),c("div",N1,[x[34]||(x[34]=c("label",null,"同步服务地址(默认即可)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":x[13]||(x[13]=G=>de.value=G),placeholder:"https://daywk.linyux.cn"},null,512),[[Re,de.value]])]),c("div",V1,[c("button",{class:"btn btn-sm",onClick:xe},"保存地址"),c("button",{class:"btn btn-primary btn-sm",disabled:ce.value,onClick:rt},se(ce.value?"同步中":"立即同步"),9,B1),c("button",{class:"btn btn-sm",onClick:Be},"重建云端绑定")]),te.value?(F(),U("div",U1,"上次同步:"+se(ke.value||"--")+" · "+se(te.value),1)):Ee("",!0),O.value?(F(),U("div",q1,se(O.value),1)):Ee("",!0),j.value?(F(),U("div",H1,"最近自动同步失败:"+se(j.value),1)):Ee("",!0),j.value?(F(),U("div",W1,"最近自动同步失败:"+se(j.value)+"(可点「立即同步」重试)",1)):Ee("",!0)]),c("div",z1,[x[40]||(x[40]=c("div",{class:"section-title"},"AI 润色配置(可选)",-1)),c("div",G1,[c("div",Y1,[x[36]||(x[36]=c("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":x[14]||(x[14]=G=>u.value=G),placeholder:"https://api.example.com/v1"},null,512),[[Re,u.value]])]),c("div",J1,[x[37]||(x[37]=c("label",null,"API Key",-1)),$e(c("input",{class:"input","onUpdate:modelValue":x[15]||(x[15]=G=>f.value=G),placeholder:"sk-..."},null,512),[[Re,f.value]])]),c("div",X1,[x[38]||(x[38]=c("label",null,"模型名称",-1)),$e(c("input",{class:"input","onUpdate:modelValue":x[16]||(x[16]=G=>h.value=G),placeholder:"如:deepseek-chat"},null,512),[[Re,h.value]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:Me},"保存 AI 配置"),x[39]||(x[39]=c("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),c("div",Q1,[x[41]||(x[41]=c("div",{class:"section-title"},"数据备份",-1)),c("div",Z1,[c("button",{class:"btn btn-sm",onClick:Yt},"导出 JSON 备份"),c("button",{class:"btn btn-sm",onClick:x[17]||(x[17]=G=>{var ne;return(ne=w.value)==null?void 0:ne.click()})},"导入 JSON 备份"),c("button",{class:"btn btn-sm",onClick:Fe},"导出工作记录 CSV"),c("button",{class:"btn btn-sm",onClick:De},"导出考勤 CSV"),c("input",{ref_key:"fileInput",ref:w,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Jt},null,544)]),S.value?(F(),U("div",e0,se(S.value),1)):Ee("",!0),x[42]||(x[42]=c("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Oe(cr,{open:!!C.value,title:"导入确认",message:C.value?"将从文件「"+C.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:x[18]||(x[18]=G=>C.value=null),onConfirm:je},null,8,["open","message"]),Oe(cr,{open:E.value,title:"删除用户确认",message:"将永久删除用户「"+M.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:x[19]||(x[19]=G=>E.value=!1),onConfirm:Ye},null,8,["open","message"])]))}}),n0=Gt(t0,[["__scopeId","data-v-b01d0105"]]),r0={class:"login-page"},s0={class:"card login-card"},o0={class:"login-brand"},i0={class:"brand-icon"},a0={class:"seg"},l0=["placeholder"],u0={key:1,class:"mig-row"},c0={key:2,class:"form-error"},d0=["disabled"],f0=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=N("login"),o=N(""),a=N(""),u=N(""),f=N(!0),h=N(!1),y=N(""),m=N(!1);dn(async()=>{h.value=await Td()});function w(S){s.value=S,y.value="",u.value=""}async function C(){if(!m.value){y.value="",m.value=!0;try{let S;if(s.value==="login")S=await W_(o.value,a.value);else{if(a.value.length<6){y.value="登录密码至少 6 位",m.value=!1;return}if(a.value!==u.value){y.value="两次输入的密码不一致",m.value=!1;return}S=await H_(o.value,a.value,f.value)}n("login",S)}catch(S){y.value=S instanceof Error?S.message:"操作失败"}m.value=!1}}return(S,M)=>(F(),U("div",r0,[c("div",s0,[c("div",o0,[c("div",i0,[Oe(ut,{name:"calendar",size:22})]),M[6]||(M[6]=c("div",{class:"login-title"},"实习工作日志",-1)),M[7]||(M[7]=c("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),M[8]||(M[8]=c("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),c("div",a0,[c("button",{class:tt(["seg-btn",{active:s.value==="login"}]),onClick:M[0]||(M[0]=B=>w("login"))},"登录",2),c("button",{class:tt(["seg-btn",{active:s.value==="create"}]),onClick:M[1]||(M[1]=B=>w("create"))},"创建用户",2)]),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>o.value=B),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(C,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>a.value=B),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(C,["enter"])},null,40,l0),[[Re,a.value]]),s.value==="create"?$e((F(),U("input",{key:0,type:"password",class:"input","onUpdate:modelValue":M[4]||(M[4]=B=>u.value=B),placeholder:"再次输入密码",onKeydown:jt(C,["enter"])},null,544)),[[Re,u.value]]):Ee("",!0),s.value==="create"&&h.value?(F(),U("label",u0,[$e(c("input",{type:"checkbox","onUpdate:modelValue":M[5]||(M[5]=B=>f.value=B)},null,512),[[Rh,f.value]]),M[9]||(M[9]=c("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):Ee("",!0),y.value?(F(),U("div",c0,se(y.value),1)):Ee("",!0),c("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:C},se(s.value==="login"?"登录":"创建并进入"),9,d0),M[10]||(M[10]=c("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),p0=Gt(f0,[["__scopeId","data-v-d3d6c8cb"]]),h0={key:1,class:"app"},v0={class:"side"},m0=["data-tip","onClick"],y0={class:"main"},g0={class:"topbar"},b0={class:"title"},w0={class:"gsearch"},_0={key:0,class:"gs-panel"},k0={key:0,class:"gs-group muted"},x0=["onMousedown"],C0={class:"tag"},S0={class:"gs-text"},E0={class:"muted num gs-date"},$0={key:1,class:"gs-group muted"},A0=["onMousedown"],T0={class:"gs-text"},P0={class:"muted gs-sub"},O0={key:1,class:"gs-empty muted"},M0={class:"topbar-actions"},I0={class:"user-chip num"},j0=["disabled"],D0={class:"num"},R0={class:"content"},L0={class:"content-inner"},K0={class:"toast-wrap"},F0=Vt({__name:"App",setup(e){const t=rm(),n=N(Gs());async function s(me){n.value=me,Fs(me.userId),location.hash="#/calendar",de.value="calendar",await ke(),await Ye(),u();try{await Md(),await Yr()}catch{}showToast("欢迎,"+me.username);const Me=sessionStorage.getItem("dsh_migrate_toast");Me&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Me+" 条"))}async function o(){i1(),a!==null&&(window.clearInterval(a),a=null),await z_(),n.value=null,de.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function u(){o1(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const f=N(null),h=N(""),y=N(!1),m=N({logs:[],memos:[]});let w=null;const C=at(()=>!!(m.value.logs.length||m.value.memos.length));function S(){w&&window.clearTimeout(w);const me=h.value;w=window.setTimeout(async()=>{const Me=me.trim();if(!Me){m.value={logs:[],memos:[]};return}const Fe=await Promise.all([zv(Me,8),Gv(Me,4)]);m.value={logs:Fe[0],memos:Fe[1]}},200)}function M(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function B(me){Ia.value=me.date,ie("calendar"),M()}function oe(me){ja.value=me.id,ie("memo"),M()}function ae(){window.setTimeout(()=>{y.value=!1},150)}function P(me){var Me;(me.ctrlKey||me.metaKey)&&me.key.toLowerCase()==="k"&&(me.preventDefault(),(Me=f.value)==null||Me.focus())}const E=[{key:"calendar",name:"日历",icon:"calendar"},{key:"today",name:"详情",icon:"edit"},{key:"stats",name:"统计",icon:"chart"},{key:"report",name:"总结",icon:"export"},{key:"ledger",name:"记账",icon:"wallet"},{key:"memo",name:"备忘录",icon:"memo"},{key:"vault",name:"密码库",icon:"lock"},{key:"settings",name:"设置",icon:"settings"}];function X(){const me=(location.hash||"").replace("#/","");return E.some(Me=>Me.key===me)?me:"calendar"}const de=N(X());window.addEventListener("hashchange",()=>{de.value=X()});function ie(me){location.hash="#/"+me}const te=at(()=>E.find(me=>me.key===de.value)||E[0]),O=N(xt()),j=N(void 0),ce=N(!1);async function ke(){if(j.value=await mn(O.value),ce.value=!1,new Date().getHours()<4){const Me=await mn(Kn(O.value,-1));ce.value=!!(Me&&Me.clock_in_at&&!Me.clock_out_at)}}const J=at(()=>{const me=j.value;return me&&me.clock_in_at&&!me.clock_out_at?!0:ce.value&&!(me&&me.clock_in_at)}),xe=at(()=>{const me=j.value;return!!(me&&me.clock_in_at&&me.clock_out_at)}),Be=at(()=>{const me=j.value;return J.value?"下班打卡":xe.value?"已打卡 "+Vn(me==null?void 0:me.clock_in_at)+" - "+Vn(me==null?void 0:me.clock_out_at):"上班打卡"});async function rt(){if(J.value)try{await Mv()}catch{}else await vd(O.value);await ke(),nr()}bt(zs,()=>{n.value&&ke()});const He=N(!1);async function Ye(){if((await jr()).remind_weekly==="off"){He.value=!1;return}const Me=new Date().getDay();if(Me===5||Me===6||Me===0){const Fe=await al(Es(O.value));He.value=!Fe||!Fe.highlights&&!Fe.challenges&&!Fe.plan_next}else He.value=!1}return dn(async()=>{window.addEventListener("keydown",P),n.value&&(Fs(n.value.userId),await ke(),await Ye(),u())}),(me,Me)=>{var Fe;return n.value?(F(),U("div",h0,[c("nav",v0,[(F(),U(Le,null,ct(E,De=>c("button",{key:De.key,class:tt(["nav-btn",{active:de.value===De.key}]),"data-tip":De.name,onClick:Ce=>ie(De.key)},[Oe(ut,{name:De.icon,size:18},null,8,["name"])],10,m0)),64))]),c("div",y0,[c("header",g0,[c("span",b0,se(te.value.name),1),c("div",w0,[Oe(ut,{name:"search",size:14,class:"gs-icon"}),$e(c("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":Me[0]||(Me[0]=De=>h.value=De),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:S,onFocus:Me[1]||(Me[1]=De=>y.value=!0),onBlur:ae,onKeydown:jt(M,["esc"])},null,544),[[Re,h.value]]),y.value&&h.value.trim()?(F(),U("div",_0,[C.value?(F(),U(Le,{key:0},[m.value.logs.length?(F(),U("div",k0,"工作记录")):Ee("",!0),(F(!0),U(Le,null,ct(m.value.logs,De=>(F(),U("div",{key:"l"+De.id,class:"gs-item",onMousedown:Mr(Ce=>B(De),["prevent"])},[c("span",C0,se(Qt(ol)(De.category)),1),c("span",S0,se(De.content),1),c("span",E0,se(De.date),1)],40,x0))),128)),m.value.memos.length?(F(),U("div",$0,"备忘录")):Ee("",!0),(F(!0),U(Le,null,ct(m.value.memos,De=>(F(),U("div",{key:"m"+De.id,class:"gs-item",onMousedown:Mr(Ce=>oe(De),["prevent"])},[c("span",T0,se(De.title||"无标题"),1),c("span",P0,se(De.content),1)],40,A0))),128))],64)):(F(),U("div",O0,"无匹配结果"))])):Ee("",!0)]),Me[4]||(Me[4]=c("span",{class:"flex1"},null,-1)),c("div",M0,[He.value?(F(),U("button",{key:0,class:"week-tip",onClick:Me[2]||(Me[2]=De=>ie("report"))},[...Me[3]||(Me[3]=[c("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),nn(" 填写本周周记 ",-1)])])):Ee("",!0),c("span",I0,se((Fe=n.value)==null?void 0:Fe.username),1),c("button",{class:"btn btn-sm",onClick:o},"退出"),c("button",{class:"btn btn-primary btn-sm",disabled:xe.value,onClick:rt},[Oe(ut,{name:xe.value?"check-circle":"clock",size:14},null,8,["name"]),c("span",D0,se(Be.value),1)],8,j0)])]),c("main",R0,[c("div",L0,[de.value==="calendar"?(F(),It(Ey,{key:0})):de.value==="today"?(F(),It(My,{key:1})):de.value==="stats"?(F(),It(ug,{key:2})):de.value==="report"?(F(),It(lb,{key:3})):de.value==="ledger"?(F(),It(bw,{key:4})):de.value==="memo"?(F(),It(Lw,{key:5})):de.value==="vault"?(F(),It(B_,{key:6})):(F(),It(n0,{key:7}))])])]),c("div",K0,[Oe($h,{name:"toast"},{default:fr(()=>[(F(!0),U(Le,null,ct(Qt(t),De=>(F(),U("div",{key:De.id,class:"toast"},se(De.text),1))),128))]),_:1})])])):(F(),It(p0,{key:0,onLogin:s}))}}}),N0=Gt(F0,[["__scopeId","data-v-0d619789"]]);function pl(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",o=>{o.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const s=document.createElement("div");s.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",s.textContent=e+` +`+t,n.appendChild(s)}catch{}}const Hu=Gs();Hu&&Fs(Hu.userId);const jd=Uh(N0);jd.config.errorHandler=(e,t,n)=>{const s=e;pl("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",s&&(s.stack||s.message)||String(e)+` +触发位置: `+n)};window.addEventListener("unhandledrejection",e=>{const t=e.reason;pl("未处理的异步错误(点击空白处关闭)",t&&(t.stack||t.message)||String(e.reason))});window.addEventListener("error",e=>{e.message&&e.message!=="ResizeObserver loop limit exceeded"&&pl("运行错误(点击空白处关闭)",e.message)});jd.mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{wd as W,yd as _,xg as b,bd as r}; diff --git a/intern-log/dist/assets/index-BzA9f9V8.js b/intern-log/dist/assets/index-CA4kYWMg.js similarity index 69% rename from intern-log/dist/assets/index-BzA9f9V8.js rename to intern-log/dist/assets/index-CA4kYWMg.js index 9bb8625..b4abf39 100644 --- a/intern-log/dist/assets/index-BzA9f9V8.js +++ b/intern-log/dist/assets/index-CA4kYWMg.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-B9VoRh8-.js","./index-WHahwity.js","./index-_AL8y0Nb.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-WHahwity.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-B9VoRh8-.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-B_APDX-X.js","./index-BGM1Hwum.js","./index-8NYf16v1.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-BGM1Hwum.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-B_APDX-X.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-WHahwity.js b/intern-log/dist/assets/index-WHahwity.js deleted file mode 100644 index 6eecaae..0000000 --- a/intern-log/dist/assets/index-WHahwity.js +++ /dev/null @@ -1,26 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** -* @vue/shared v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Fa(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const dt={},Ar=[],En=()=>{},Hu=()=>!1,ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ri=e=>e.startsWith("onUpdate:"),Et=Object.assign,Na=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},of=Object.prototype.hasOwnProperty,it=(e,t)=>of.call(e,t),Ke=Array.isArray,sr=e=>Vs(e)==="[object Map]",Bn=e=>Vs(e)==="[object Set]",Wl=e=>Vs(e)==="[object Date]",Ye=e=>typeof e=="function",wt=e=>typeof e=="string",$n=e=>typeof e=="symbol",lt=e=>e!==null&&typeof e=="object",Wu=e=>(lt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),zu=Object.prototype.toString,Vs=e=>zu.call(e),af=e=>Vs(e).slice(8,-1),Gu=e=>Vs(e)==="[object Object]",Va=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Fa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),si=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lf=/-\w/g,hn=si(e=>e.replace(lf,t=>t.slice(1).toUpperCase())),uf=/\B([A-Z])/g,dr=si(e=>e.replace(uf,"-$1").toLowerCase()),Yu=si(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qi=si(e=>e?`on${Yu(e)}`:""),Cn=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},oi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},cf=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let zl;const ii=()=>zl||(zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Ke(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(df).forEach(n=>{if(n){const s=n.split(ff);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tt(e){let t="";if(wt(e))t=e;else if(Ke(e))for(let n=0;nUn(n,t))}const Qu=e=>!!(e&&e.__v_isRef===!0),ne=e=>wt(e)?e:e==null?"":Ke(e)||lt(e)&&(e.toString===zu||!Ye(e.toString))?Qu(e)?ne(e.value):JSON.stringify(e,Zu,2):String(e),Zu=(e,t)=>Qu(t)?Zu(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[Zi(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Zi(n))}:$n(t)?Zi(t):lt(t)&&!Ke(t)&&!Gu(t)?String(t):t,Zi=(e,t="")=>{var n;return $n(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 Mt;class bf{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&&Mt&&(Mt.active?(this.parent=Mt,this.index=(Mt.scopes||(Mt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Mt===this)Mt=this.prevScope;else{let t=Mt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(_s){let t=_s;for(_s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function rc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ha(s),_f(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ma(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===As)||(e.globalVersion=As,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ma(e))))return;e.flags|=2;const t=e.dep,n=ht,s=vn;ht=e,vn=!0;try{rc(e);const o=e.fn(e._value);(t.version===0||Cn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ht=n,vn=s,sc(e),e.flags&=-3}}function Ha(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)Ha(a,!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 vn=!0;const ic=[];function An(){ic.push(vn),vn=!1}function Tn(){const e=ic.pop();vn=e===void 0?!0:e}function Jl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ht;ht=void 0;try{t()}finally{ht=n}}}let As=0;class kf{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 Wa{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(!ht||!vn||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new kf(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){Ua();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qa()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ac(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ya=new WeakMap,Tr=Symbol(""),ga=Symbol(""),Ts=Symbol("");function Kt(e,t,n){if(vn&&ht){let s=ya.get(e);s||ya.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Wa),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const u=ya.get(e);if(!u){As++;return}const f=h=>{h&&h.trigger()};if(Ua(),t==="clear")u.forEach(f);else{const h=Ke(e),y=h&&Va(n);if(h&&n==="length"){const m=Number(s);u.forEach((k,x)=>{(x==="length"||x===Ts||!$n(x)&&x>=m)&&f(k)})}else switch((n!==void 0||u.has(void 0))&&f(u.get(n)),y&&f(u.get(Ts)),t){case"add":h?y&&f(u.get("length")):(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"delete":h||(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"set":sr(e)&&f(u.get(Tr));break}}qa()}function qr(e){const t=ot(e);return t===e||(Kt(t,"iterate",Ts),ln(e))?t:Pn(e)?ir(e)?t.map(n=>ar(un(n))):t.map(ar):t.map(un)}function ai(e){return Kt(e=ot(e),"iterate",Ts),e}function _n(e,t){return Pn(e)?ar(ir(e)?un(t):t):un(t)}const xf={__proto__:null,[Symbol.iterator](){return ta(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Ke(t)?qr(t):t))},entries(){return ta(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return In(this,"every",e,t,void 0,arguments)},filter(e,t){return In(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return In(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return In(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return In(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return In(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return In(this,"forEach",e,t,void 0,arguments)},includes(...e){return na(this,"includes",e)},indexOf(...e){return na(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return na(this,"lastIndexOf",e)},map(e,t){return In(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return Ql(this,"reduce",e,t)},reduceRight(e,...t){return Ql(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return In(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return qr(this).toReversed()},toSorted(e){return qr(this).toSorted(e)},toSpliced(...e){return qr(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return ta(this,"values",e=>_n(this,e))}};function ta(e,t,n){const s=ai(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const u=Object.create(Object.getPrototypeOf(a));return u.next=()=>Xl(a.next(),n),o!==lc[t]&&Object.defineProperties(u,{return:{get(){const f=a.return;return typeof f=="function"?f.bind(a):f}},throw:{get(){const f=a.throw;return typeof f=="function"?f.bind(a):f}}}),u}a._next=a.next,a.next=()=>Xl(a._next(),n)}return a}function Xl(e,t){return e.done||(e.value=t(e.value)),e}const lc=Array.prototype;function In(e,t,n,s,o,a){const u=ai(e),f=u!==e&&!ln(e),h=u[t];if(h!==lc[t]){const k=h.apply(e,a);return f?un(k):k}let y=n;u!==e&&(f?y=function(k,x){return n.call(this,_n(e,k),x,e)}:n.length>2&&(y=function(k,x){return n.call(this,k,x,e)}));const m=h.call(u,y,s);return f&&o?o(m):m}function Ql(e,t,n,s){const o=ai(e),a=o!==e&&!ln(e);let u=n,f=!1;o!==e&&(a?(f=s.length===0,u=function(y,m,k){return f&&(f=!1,y=_n(e,y)),n.call(this,y,_n(e,m),k,e)}):n.length>3&&(u=function(y,m,k){return n.call(this,y,m,k,e)}));const h=o[t](u,...s);return f?_n(e,h):h}function na(e,t,n){const s=ot(e);Kt(s,"iterate",Ts);const o=s[t](...n);return(o===-1||o===!1)&&Ja(n[0])?(n[0]=ot(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),Ua();const s=ot(e)[t].apply(e,n);return qa(),Tn(),s}const Cf=Fa("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function Sf(e){$n(e)||(e=String(e));const t=ot(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class cc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Df:hc:a?pc:fc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const u=Ke(t);if(!o){let h;if(u&&(h=xf[n]))return h;if(n==="hasOwnProperty")return Sf}const f=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?uc.has(n):Cf(n))||(o||Kt(t,"get",n),a))return f;if(Nt(f)){const h=u&&Va(n)?f:f.value;return o&<(h)?wa(h):h}return lt(f)?o?wa(f):Ga(f):f}}class dc extends cc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const u=Ke(t)&&Va(n);if(!this._isShallow){const y=Pn(a);if(!ln(s)&&!Pn(s)&&(a=ot(a),s=ot(s)),!u&&Nt(a)&&!Nt(s))return y||(a.value=s),!0}const f=u?Number(n)e,_o=e=>Reflect.getPrototypeOf(e);function Pf(e,t,n){return function(...s){const o=this.__v_raw,a=ot(o),u=sr(a),f=e==="entries"||e===Symbol.iterator&&u,h=e==="keys"&&u,y=o[e](...s),m=n?ba:t?ar:un;return!t&&Kt(a,"iterate",h?ga:Tr),Et(Object.create(y),{next(){const{value:k,done:x}=y.next();return x?{value:k,done:x}:{value:f?[m(k[0]),m(k[1])]:m(k),done:x}}})}}function ko(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Of(e,t){const n={get(o){const a=this.__v_raw,u=ot(a),f=ot(o);e||(Cn(o,f)&&Kt(u,"get",o),Kt(u,"get",f));const{has:h}=_o(u),y=t?ba:e?ar:un;if(h.call(u,o))return y(a.get(o));if(h.call(u,f))return y(a.get(f));a!==u&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(ot(o),"iterate",Tr),o.size},has(o){const a=this.__v_raw,u=ot(a),f=ot(o);return e||(Cn(o,f)&&Kt(u,"has",o),Kt(u,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const u=this,f=u.__v_raw,h=ot(f),y=t?ba:e?ar:un;return!e&&Kt(h,"iterate",Tr),f.forEach((m,k)=>o.call(a,y(m),y(k),u))}};return Et(n,e?{add:ko("add"),set:ko("set"),delete:ko("delete"),clear:ko("clear")}:{add(o){const a=ot(this),u=_o(a),f=ot(o),h=!t&&!ln(o)&&!Pn(o)?f:o;return u.has.call(a,h)||Cn(o,h)&&u.has.call(a,o)||Cn(f,h)&&u.has.call(a,f)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Pn(a)&&(a=ot(a));const u=ot(this),{has:f,get:h}=_o(u);let y=f.call(u,o);y||(o=ot(o),y=f.call(u,o));const m=h.call(u,o);return u.set(o,a),y?Cn(a,m)&&Rn(u,"set",o,a):Rn(u,"add",o,a),this},delete(o){const a=ot(this),{has:u,get:f}=_o(a);let h=u.call(a,o);h||(o=ot(o),h=u.call(a,o)),f&&f.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=ot(this),a=o.size!==0,u=o.clear();return a&&Rn(o,"clear",void 0,void 0),u}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Pf(o,e,t)}),n}function za(e,t){const n=Of(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(it(n,o)&&o in s?n:s,o,a)}const Mf={get:za(!1,!1)},If={get:za(!1,!0)},jf={get:za(!0,!1)};const fc=new WeakMap,pc=new WeakMap,hc=new WeakMap,Df=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ga(e){return Pn(e)?e:Ya(e,!1,$f,Mf,fc)}function Lf(e){return Ya(e,!1,Tf,If,pc)}function wa(e){return Ya(e,!0,Af,jf,hc)}function Ya(e,t,n,s,o){if(!lt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const u=Rf(af(e));if(u===0)return e;const f=new Proxy(e,u===2?s:n);return o.set(e,f),f}function ir(e){return Pn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Pn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function Ja(e){return e?!!e.__v_raw:!1}function ot(e){const t=e&&e.__v_raw;return t?ot(t):e}function Kf(e){return!it(e,"__v_skip")&&Object.isExtensible(e)&&Ju(e,"__v_skip",!0),e}const un=e=>lt(e)?Ga(e):e,ar=e=>lt(e)?wa(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function N(e){return Ff(e,!1)}function Ff(e,t){return Nt(e)?e:new Nf(e,t)}class Nf{constructor(t,n){this.dep=new Wa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ot(t),this._value=n?t:un(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ln(t)||Pn(t);t=s?t:ot(t),Cn(t,n)&&(this._rawValue=t,this._value=s?t:un(t),this.dep.trigger())}}function Qt(e){return Nt(e)?e.value:e}const Vf={get:(e,t,n)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Nt(o)&&!Nt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function vc(e){return ir(e)?e:new Proxy(e,Vf)}class Bf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Wa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=As-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==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 Uf(e,t,n=!1){let s,o;return Ye(e)?s=e:(s=e.get,o=e.set),new Bf(s,o,n)}const xo={},Ro=new WeakMap;let Sr;function qf(e,t=!1,n=Sr){if(n){let s=Ro.get(n);s||Ro.set(n,s=[]),s.push(e)}}function Hf(e,t,n=dt){const{immediate:s,deep:o,once:a,scheduler:u,augmentJob:f,call:h}=n,y=J=>o?J:ln(J)||o===!1||o===0?Ln(J,1):Ln(J);let m,k,x,C,M=!1,B=!1;if(Nt(e)?(k=()=>e.value,M=ln(e)):ir(e)?(k=()=>y(e),M=!0):Ke(e)?(B=!0,M=e.some(J=>ir(J)||ln(J)),k=()=>e.map(J=>{if(Nt(J))return J.value;if(ir(J))return y(J);if(Ye(J))return h?h(J,2):J()})):Ye(e)?t?k=h?()=>h(e,2):e:k=()=>{if(x){An();try{x()}finally{Tn()}}const J=Sr;Sr=m;try{return h?h(e,3,[C]):e(C)}finally{Sr=J}}:k=En,t&&o){const J=k,de=o===!0?1/0:o;k=()=>Ln(J(),de)}const re=wf(),ae=()=>{m.stop(),re&&re.active&&Na(re.effects,m)};if(a&&t){const J=t;t=(...de)=>{try{return J(...de)}finally{ae()}}}let T=B?new Array(e.length).fill(xo):xo;const S=J=>{if(!(!(m.flags&1)||!m.dirty&&!J))if(t){const de=m.run();if(J||o||M||(B?de.some((ie,ee)=>Cn(ie,T[ee])):Cn(de,T))){const ie=Sr;An();try{x&&x(),Sr=m;const ee=[de,T===xo?void 0:B&&T[0]===xo?[]:T,C];T=de,h?h(t,3,ee):t(...ee)}finally{Sr=ie,Tn()}}}else m.run()};return f&&f(S),m=new ec(k),m.scheduler=u?()=>u(S,!1):S,C=J=>qf(J,!1,m),x=m.onStop=()=>{const J=Ro.get(m);if(J){if(h)h(J,4);else for(const de of J)de();Ro.delete(m)}},t?s?S(!0):T=m.run():u?u(S.bind(null,!0),!0):m.run(),ae.pause=m.pause.bind(m),ae.resume=m.resume.bind(m),ae.stop=ae,ae}function Ln(e,t=1/0,n){if(t<=0||!lt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Nt(e))Ln(e.value,t,n);else if(Ke(e))for(let s=0;s{Ln(s,t,n)});else if(Gu(e)){for(const s in e)Ln(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ln(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Bs(e,t,n,s){try{return s?e(...s):e()}catch(o){li(o,t,n)}}function cn(e,t,n,s){if(Ye(e)){const o=Bs(e,t,n,s);return o&&Wu(o)&&o.catch(a=>{li(a,t,n)}),o}if(Ke(e)){const o=[];for(let a=0;a>>1,o=Wt[s],a=Ps(o);a=Ps(n)?Wt.push(e):Wt.splice(zf(t),0,e),e.flags|=1,yc()}}function yc(){Lo||(Lo=mc.then(wc))}function Gf(e){if(!Ke(e))tr&&e.id===-1?tr.splice(Hr+1,0,e):e.flags&1||(kn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Wt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function bc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let u=0;uPs(u)-Ps(f));if(kn.length=o,tr){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function wc(e){try{for(pn=0;pn{s._d&&Bo(-1);const a=Ko(t),u=Pr.length;let f;try{f=e(...o)}finally{for(let h=Pr.length;h>u;h--)Yc();Ko(a),s._d&&Bo(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function $e(e,t){if(an===null)return e;const n=hi(an),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ye(t)?t.call(s&&s.proxy):t}}const Xf=Symbol.for("v-scx"),Qf=()=>To(Xf);function bt(e,t,n){return kc(e,t,n)}function kc(e,t,n=dt){const{immediate:s,deep:o,flush:a,once:u}=n,f=Et({},n),h=t&&s||!t&&a!=="post";let y;if(Rs){if(a==="sync"){const C=Qf();y=C.__watcherHandles||(C.__watcherHandles=[])}else if(!h){const C=()=>{};return C.stop=En,C.resume=En,C.pause=En,C}}const m=zt;f.call=(C,M,B)=>cn(C,m,M,B);let k=!1;a==="post"?f.scheduler=C=>{C.i=m,Ht(C,m&&m.suspense)}:a!=="sync"&&(k=!0,f.scheduler=(C,M)=>{M?C():Xa(C)}),f.augmentJob=C=>{t&&(C.flags|=4),k&&(C.flags|=2,m&&(C.id=m.uid,C.i=m))};const x=Hf(e,t,f);return Rs&&(y?y.push(x):h&&x()),x}function Zf(e,t,n){const s=this.proxy,o=wt(e)?e.includes(".")?xc(s,e):()=>s[e]:e.bind(s,s);let a;Ye(t)?a=t:(a=t.handler,n=t);const u=qs(this),f=kc(o,a.bind(s),n);return u(),f}function xc(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),ep=e=>e&&(e.defer||e.defer===""),Zl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,eu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_a=(e,t)=>{const n=e&&e.to;return wt(n)?t?t(n):null:n},tp={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,u,f,h,y){const{mc:m,pc:k,pbc:x,o:{insert:C,querySelector:M,createText:B,createComment:re,parentNode:ae}}=y,T=Er(t.props);let{dynamicChildren:S}=t;const J=(ee,P,j)=>{ee.shapeFlag&16&&m(ee.children,P,j,o,a,u,f,h)},de=(ee=t)=>{const P=Er(ee.props),j=ee.target=_a(ee.props,M),ce=ka(j,ee,B,C);j&&(u!=="svg"&&Zl(j)?u="svg":u!=="mathml"&&eu(j)&&(u="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),P||(J(ee,j,ce),ms(ee,!1)))},ie=ee=>{const P=()=>{if(Zn.get(ee)===P){if(Zn.delete(ee),Er(ee.props)){const j=ae(ee.el)||n;J(ee,j,ee.anchor),ms(ee,!0)}de(ee)}};Zn.set(ee,P),Ht(P,a)};if(e==null){const ee=t.el=B(""),P=t.anchor=B("");if(C(ee,n,s),C(P,n,s),ep(t.props)||a&&a.pendingBranch){ie(t);return}T&&(J(t,n,P),ms(t,!0)),de()}else{t.el=e.el;const ee=t.anchor=e.anchor,P=Zn.get(e);if(P){P.flags|=8,Zn.delete(e),ie(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,ce=t.targetAnchor=e.targetAnchor,ke=Er(e.props),Y=ke?n:j,xe=ke?ee:ce;if(u==="svg"||Zl(j)?u="svg":(u==="mathml"||eu(j))&&(u="mathml"),S?(x(e.dynamicChildren,S,Y,o,a,u,f),tl(e,t,!0)):h||k(e,t,Y,xe,o,a,u,f,!1),T)ke?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Co(t,n,ee,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ve=_a(t.props,M);Ve&&(t.target=Ve,Co(t,Ve,null,y,0))}else ke&&Co(t,j,ce,y,1);ms(t,T)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:u,children:f,anchor:h,targetStart:y,targetAnchor:m,target:k,props:x}=e,C=Er(x),M=a||!C,B=Zn.get(e);if(B&&(B.flags|=8,Zn.delete(e)),k&&(o(y),o(m)),a&&o(h),!B&&(C||k)&&u&16)for(let re=0;re{e.isMounted=!0}),Mc(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],Ec={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sn,onEnter:sn,onAfterEnter:sn,onEnterCancelled:sn,onBeforeLeave:sn,onLeave:sn,onAfterLeave:sn,onLeaveCancelled:sn,onBeforeAppear:sn,onAppear:sn,onAfterAppear:sn,onAppearCancelled:sn},rp={name:"BaseTransition",props:Ec,setup(e,{slots:t}){const n=nl(),s=Sc();return()=>{const o=t.default&&Qa(t.default(),!0),a=o&&o.length?$c(o):n.subTree?Ee():void 0;if(!a)return;const u=ot(e),{mode:f}=u;if(s.isLeaving)return sa(a);const h=Fo(a);if(!h)return sa(a);let y=Os(h,u,s,n,k=>y=k);h.type!==Ft&&lr(h,y);let m=n.subTree&&Fo(n.subTree);if(m&&m.type!==Ft&&!$r(m,h)&&Ms(n.subTree)){let k=Os(m,u,s,n);if(lr(m,k),f==="out-in"&&h.type!==Ft)return s.isLeaving=!0,k.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,m=void 0},sa(a);f==="in-out"&&h.type!==Ft?k.delayLeave=(x,C,M)=>{const B=Ac(s,m);B[String(m.key)]=m,x[on]=()=>{C(),x[on]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{M(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function $c(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const sp=rp;function Ac(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Os(e,t,n,s,o){const{appear:a,mode:u,persisted:f=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:k,onBeforeLeave:x,onLeave:C,onAfterLeave:M,onLeaveCancelled:B,onBeforeAppear:re,onAppear:ae,onAfterAppear:T,onAppearCancelled:S}=t,J=String(e.key),de=Ac(n,e),ie=(j,ce)=>{j&&cn(j,s,9,ce)},ee=(j,ce)=>{const ke=ce[1];ie(j,ce),Ke(j)?j.every(Y=>Y.length<=1)&&ke():j.length<=1&&ke()},P={mode:u,persisted:f,beforeEnter(j){let ce=h;if(!n.isMounted)if(a)ce=re||h;else return;j[on]&&j[on](!0);const ke=de[J];if(ke&&$r(e,ke)){let Y=ke.el[on];if(!Y){const xe=Ms(ke);Y=xe&&xe.el[on]}Y&&Y()}ie(ce,[j])},enter(j){if(de[J]===e)return;let ce=y,ke=m,Y=k;if(!n.isMounted)if(a)ce=ae||y,ke=T||m,Y=S||k;else return;let xe=!1;j[hs]=rt=>{xe||(xe=!0,rt?ie(Y,[j]):ie(ke,[j]),P.delayedLeave&&P.delayedLeave(),j[hs]=void 0)};const Ve=j[hs].bind(null,!1);ce?ee(ce,[j,Ve]):Ve()},leave(j,ce){const ke=String(e.key);if(j[hs]&&j[hs](!0),n.isUnmounting)return ce();ie(x,[j]);let Y=!1;j[on]=Ve=>{Y||(Y=!0,ce(),Ve?ie(B,[j]):ie(M,[j]),j[on]=void 0,de[ke]===e&&delete de[ke])};const xe=j[on].bind(null,!1);de[ke]=e,C?ee(C,[j,xe]):xe()},clone(j){const ce=Os(j,t,n,s,o);return o&&o(ce),ce}};return P}function sa(e){if(ci(e))return e=ur(e),e.children=null,e}function Fo(e){if(!ci(e))return ui(e.type)&&e.children?$c(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 lr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;lr(ui(n.type)&&Fo(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===Le&&Ke(e.children)){const n=Lc(e.children,!1);n&&lr(n,t)}}function Qa(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aks(B,t&&(Ke(t)?t[re]:t),n,s,o));return}if(xs(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?hi(s.component):s.el,u=o?null:a,{i:f,r:h}=e,y=t&&t.r,m=f.refs===dt?f.refs={}:f.refs,k=f.setupState,x=ot(k),C=k===dt?Hu:B=>tu(m,B)?!1:it(x,B),M=(B,re)=>!(re&&tu(m,re));if(y!=null&&y!==h){if(nu(t),wt(y))m[y]=null,C(y)&&(k[y]=null);else if(Nt(y)){const B=t;M(y,B.k)&&(y.value=null),B.k&&(m[B.k]=null)}}if(Ye(h))Bs(h,f,12,[u,m]);else{const B=wt(h),re=Nt(h);if(B||re){const ae=()=>{if(e.f){const T=B?C(h)?k[h]:m[h]:M()||!e.k?h.value:m[e.k];if(o)Ke(T)&&Na(T,a);else if(Ke(T))T.includes(a)||T.push(a);else if(B)m[h]=[a],C(h)&&(k[h]=m[h]);else{const S=[a];M(h,e.k)&&(h.value=S),e.k&&(m[e.k]=S)}}else B?(m[h]=u,C(h)&&(k[h]=u)):re&&(M(h,e.k)&&(h.value=u),e.k&&(m[e.k]=u))};if(u){const T=()=>{ae(),No.delete(e)};T.id=-1,No.set(e,T),Ht(T,n)}else nu(e),ae()}}}function nu(e){const t=No.get(e);t&&(t.flags|=8,No.delete(e))}ii().requestIdleCallback;ii().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function op(e,t){Pc(e,"a",t)}function ip(e,t){Pc(e,"da",t)}function Pc(e,t,n=zt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(di(t,s,n),n){let o=n.parent;for(;o&&o.parent;)ci(o.parent.vnode)&&ap(s,t,n,o),o=o.parent}}function ap(e,t,n,s){const o=di(t,e,s,!0);pr(()=>{Na(s[t],o)},n)}function di(e,t,n=zt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...u)=>{An();const f=qs(n),h=cn(t,n,e,u);return f(),Tn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=zt)=>{(!Rs||e==="sp")&&di(e,(...s)=>t(...s),n)},lp=qn("bm"),dn=qn("m"),up=qn("bu"),Oc=qn("u"),Mc=qn("bum"),pr=qn("um"),cp=qn("sp"),dp=qn("rtg"),fp=qn("rtc");function pp(e,t=zt){di("ec",e,t)}const hp=Symbol.for("v-ndc");function ct(e,t,n,s){let o;const a=n,u=Ke(e);if(u||wt(e)){const f=u&&ir(e);let h=!1,y=!1;f&&(h=!ln(e),y=Pn(e),e=ai(e)),o=new Array(e.length);for(let m=0,k=e.length;mt(f,h,void 0,a));else{const f=Object.keys(e);o=new Array(f.length);for(let h=0,y=f.length;he?Zc(e)?hi(e):xa(e.parent):null,Cs=Et(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=>xa(e.parent),$root:e=>xa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jc(e),$forceUpdate:e=>e.f||(e.f=()=>{Xa(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>Zf.bind(e)}),oa=(e,t)=>e!==dt&&!e.__isScriptSetup&&it(e,t),vp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:u,type:f,appContext:h}=e;if(t[0]!=="$"){const x=u[t];if(x!==void 0)switch(x){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(oa(s,t))return u[t]=1,s[t];if(o!==dt&&it(o,t))return u[t]=2,o[t];if(it(a,t))return u[t]=3,a[t];if(n!==dt&&it(n,t))return u[t]=4,n[t];Ca&&(u[t]=0)}}const y=Cs[t];let m,k;if(y)return t==="$attrs"&&Kt(e.attrs,"get",""),y(e);if((m=f.__cssModules)&&(m=m[t]))return m;if(n!==dt&&it(n,t))return u[t]=4,n[t];if(k=h.config.globalProperties,it(k,t))return k[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return oa(o,t)?(o[t]=n,!0):s!==dt&&it(s,t)?(s[t]=n,!0):it(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:u}},f){let h;return!!(n[f]||e!==dt&&f[0]!=="$"&&it(e,f)||oa(t,f)||it(a,f)||it(s,f)||it(Cs,f)||it(o.config.globalProperties,f)||(h=u.__cssModules)&&h[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ru(e){return Ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ca=!0;function mp(e){const t=jc(e),n=e.proxy,s=e.ctx;Ca=!1,t.beforeCreate&&su(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:u,watch:f,provide:h,inject:y,created:m,beforeMount:k,mounted:x,beforeUpdate:C,updated:M,activated:B,deactivated:re,beforeDestroy:ae,beforeUnmount:T,destroyed:S,unmounted:J,render:de,renderTracked:ie,renderTriggered:ee,errorCaptured:P,serverPrefetch:j,expose:ce,inheritAttrs:ke,components:Y,directives:xe,filters:Ve}=t;if(y&&yp(y,s,null),u)for(const We in u){const me=u[We];Ye(me)&&(s[We]=me.bind(n))}if(o){const We=o.call(n,n);lt(We)&&(e.data=Ga(We))}if(Ca=!0,a)for(const We in a){const me=a[We],Me=Ye(me)?me.bind(n,n):Ye(me.get)?me.get.bind(n,n):En,Fe=!Ye(me)&&Ye(me.set)?me.set.bind(n):En,De=at({get:Me,set:Fe});Object.defineProperty(s,We,{enumerable:!0,configurable:!0,get:()=>De.value,set:Ce=>De.value=Ce})}if(f)for(const We in f)Ic(f[We],s,n,We);if(h){const We=Ye(h)?h.call(n):h;Reflect.ownKeys(We).forEach(me=>{Jf(me,We[me])})}m&&su(m,e,"c");function He(We,me){Ke(me)?me.forEach(Me=>We(Me.bind(n))):me&&We(me.bind(n))}if(He(lp,k),He(dn,x),He(up,C),He(Oc,M),He(op,B),He(ip,re),He(pp,P),He(fp,ie),He(dp,ee),He(Mc,T),He(pr,J),He(cp,j),Ke(ce))if(ce.length){const We=e.exposed||(e.exposed={});ce.forEach(me=>{Object.defineProperty(We,me,{get:()=>n[me],set:Me=>n[me]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});de&&e.render===En&&(e.render=de),ke!=null&&(e.inheritAttrs=ke),Y&&(e.components=Y),xe&&(e.directives=xe),j&&Tc(e)}function yp(e,t,n=En){Ke(e)&&(e=Sa(e));for(const s in e){const o=e[s];let a;lt(o)?"default"in o?a=To(o.from||s,o.default,!0):a=To(o.from||s):a=To(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:u=>a.value=u}):t[s]=a}}function su(e,t,n){cn(Ke(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ic(e,t,n,s){let o=s.includes(".")?xc(n,s):()=>n[s];if(wt(e)){const a=t[e];Ye(a)&&bt(o,a)}else if(Ye(e))bt(o,e.bind(n));else if(lt(e))if(Ke(e))e.forEach(a=>Ic(a,t,n,s));else{const a=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(a)&&bt(o,a,e)}}function jc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:u}}=e.appContext,f=a.get(t);let h;return f?h=f:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Vo(h,y,u,!0)),Vo(h,t,u)),lt(t)&&a.set(t,h),h}function Vo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Vo(e,a,n,!0),o&&o.forEach(u=>Vo(e,u,n,!0));for(const u in t)if(!(s&&u==="expose")){const f=gp[u]||n&&n[u];e[u]=f?f(e[u],t[u]):t[u]}return e}const gp={data:ou,props:iu,emits:iu,methods:ys,computed:ys,beforeCreate:qt,created:qt,beforeMount:qt,mounted:qt,beforeUpdate:qt,updated:qt,beforeDestroy:qt,beforeUnmount:qt,destroyed:qt,unmounted:qt,activated:qt,deactivated:qt,errorCaptured:qt,serverPrefetch:qt,components:ys,directives:ys,watch:wp,provide:ou,inject:bp};function ou(e,t){return t?e?function(){return Et(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function bp(e,t){return ys(Sa(e),Sa(t))}function Sa(e){if(Ke(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function Cp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||dt;let o=n;const a=t.startsWith("update:"),u=a&&xp(s,t.slice(7));u&&(u.trim&&(o=n.map(m=>wt(m)?m.trim():m)),u.number&&(o=o.map(oi)));let f,h=s[f=Qi(t)]||s[f=Qi(hn(t))];!h&&a&&(h=s[f=Qi(dr(t))]),h&&cn(h,e,6,o);const y=s[f+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,cn(y,e,6,o)}}const Sp=new WeakMap;function Rc(e,t,n=!1){const s=n?Sp:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let u={},f=!1;if(!Ye(e)){const h=y=>{const m=Rc(y,t,!0);m&&(f=!0,Et(u,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!f?(lt(e)&&s.set(e,null),null):(Ke(a)?a.forEach(h=>u[h]=null):Et(u,a),lt(e)&&s.set(e,u),u)}function fi(e,t){return!e||!ni(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,dr(t))||it(e,t))}function au(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:u,attrs:f,emit:h,render:y,renderCache:m,props:k,data:x,setupState:C,ctx:M,inheritAttrs:B}=e,re=Ko(e);let ae,T;try{if(n.shapeFlag&4){const J=o||s,de=J;ae=xn(y.call(de,J,m,k,C,x,M)),T=f}else{const J=t;ae=xn(J.length>1?J(k,{attrs:f,slots:u,emit:h}):J(k,null)),T=t.props?f:Ep(f)}}catch(J){Pr.length=0,li(J,e,1),ae=Oe(Ft)}let S=ae;if(T&&B!==!1){const J=Object.keys(T),{shapeFlag:de}=S;J.length&&de&7&&(a&&J.some(ri)&&(T=$p(T,a)),S=ur(S,T,!1,!0))}if(n.dirs&&(S=ur(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition){const J=ui(S.type)&&Fo(S)||S;lr(J,n.transition)}return ae=S,Ko(re),ae}function Lc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||ni(n))&&((t||(t={}))[n]=e[n]);return t},$p=(e,t)=>{const n={};for(const s in e)(!ri(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ap(e,t,n){const{props:s,children:o,component:a}=e,{props:u,children:f,patchFlag:h}=t,y=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?lu(s,u,y):!!u;if(h&8){const m=t.dynamicProps;for(let k=0;kObject.create(Fc),Vc=e=>Object.getPrototypeOf(e)===Fc;function Pp(e,t,n,s=!1){const o={},a=Nc();e.propsDefaults=Object.create(null),Bc(e,t,o,a);for(const u in e.propsOptions[0])u in o||(o[u]=void 0);n?e.props=s?o:Lf(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Op(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:u}}=e,f=ot(o),[h]=e.propsOptions;let y=!1;if((s||u>0)&&!(u&16)){if(u&8){const m=e.vnode.dynamicProps;for(let k=0;k{h=!0;const[x,C]=Uc(k,t,!0);Et(u,x),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!h)return lt(e)&&s.set(e,Ar),Ar;if(Ke(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",el=e=>Ke(e)?e.map(xn):[xn(e)],Ip=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>el(t(...o)),n);return s._c=!1,s},qc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Za(o))continue;const a=e[o];if(Ye(a))t[o]=Ip(o,a,s);else if(a!=null){const u=el(a);t[o]=()=>u}}},Hc=(e,t)=>{const n=el(t);e.slots.default=()=>n},Wc=(e,t,n)=>{for(const s in t)(n||!Za(s))&&(e[s]=t[s])},jp=(e,t,n)=>{const s=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(Wc(s,t,n),n&&Ju(s,"_",o,!0)):qc(t,s)}else t&&Hc(e,t)},Dp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,u=dt;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:Wc(o,t,n):(a=!t.$stable,qc(t,o)),u=t}else t&&(Hc(e,t),u={default:1});if(a)for(const f in o)!Za(f)&&u[f]==null&&delete o[f]},Ht=Np;function Rp(e){return Lp(e)}function Lp(e,t){const n=ii();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:u,createText:f,createComment:h,setText:y,setElementText:m,parentNode:k,nextSibling:x,setScopeId:C=En,insertStaticContent:M}=e,B=(w,g,O,le=null,se=null,ue=null,ye=void 0,oe=null,be=!!g.dynamicChildren)=>{if(w===g)return;w&&!$r(w,g)&&(le=ft(w),Ce(w,se,ue,!0),w=null),g.patchFlag===-2&&(be=!1,g.dynamicChildren=null),g.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(g.dynamicChildren===Ar&&(g.dynamicChildren=[]),g.dynamicChildren.hasOnce=!0);const{type:W,ref:q,shapeFlag:G}=g;switch(W){case pi:re(w,g,O,le);break;case Ft:ae(w,g,O,le);break;case Po:w==null&&T(g,O,le,ye);break;case Le:Y(w,g,O,le,se,ue,ye,oe,be);break;default:G&1?de(w,g,O,le,se,ue,ye,oe,be):G&6?xe(w,g,O,le,se,ue,ye,oe,be):(G&64||G&128)&&W.process(w,g,O,le,se,ue,ye,oe,be,Jt)}q!=null&&se?ks(q,w&&w.ref,ue,g||w,!g):q==null&&w&&w.ref!=null&&ks(w.ref,null,ue,w,!0)},re=(w,g,O,le)=>{if(w==null)s(g.el=f(g.children),O,le);else{const se=g.el=w.el;g.children!==w.children&&y(se,g.children)}},ae=(w,g,O,le)=>{w==null?s(g.el=h(g.children||""),O,le):g.el=w.el},T=(w,g,O,le)=>{[w.el,w.anchor]=M(w.children,g,O,le,w.el,w.anchor)},S=({el:w,anchor:g},O,le)=>{let se;for(;w&&w!==g;)se=x(w),s(w,O,le),w=se;s(g,O,le)},J=({el:w,anchor:g})=>{let O;for(;w&&w!==g;)O=x(w),o(w),w=O;o(g)},de=(w,g,O,le,se,ue,ye,oe,be)=>{if(g.type==="svg"?ye="svg":g.type==="math"&&(ye="mathml"),w==null)ie(g,O,le,se,ue,ye,oe,be);else{const W=w.el&&w.el._isVueCE?w.el:null;try{W&&W._beginPatch(),j(w,g,se,ue,ye,oe,be)}finally{W&&W._endPatch()}}},ie=(w,g,O,le,se,ue,ye,oe)=>{let be,W;const{props:q,shapeFlag:G,transition:Ae,dirs:Ne}=w;if(be=w.el=u(w.type,ue,q&&q.is,q),G&8?m(be,w.children):G&16&&P(w.children,be,null,le,se,ia(w,ue),ye,oe),Ne&&kr(w,null,le,"created"),ee(be,w,w.scopeId,ye,le),q){for(const Xe in q)Xe!=="value"&&!bs(Xe)&&a(be,Xe,null,q[Xe],ue,le);"value"in q&&a(be,"value",null,q.value,ue),(W=q.onVnodeBeforeMount)&&gn(W,le,w)}Ne&&kr(w,null,le,"beforeMount");const Qe=Kp(se,Ae);Qe&&Ae.beforeEnter(be),s(be,g,O),((W=q&&q.onVnodeMounted)||Qe||Ne)&&Ht(()=>{try{W&&gn(W,le,w),Qe&&Ae.enter(be),Ne&&kr(w,null,le,"mounted")}finally{}},se)},ee=(w,g,O,le,se)=>{if(O&&C(w,O),le)for(let ue=0;ue{for(let W=be;W{const oe=g.el=w.el;let{patchFlag:be,dynamicChildren:W,dirs:q}=g;be|=w.patchFlag&16;const G=w.props||dt,Ae=g.props||dt;let Ne;if(O&&xr(O,!1),(Ne=Ae.onVnodeBeforeUpdate)&&gn(Ne,O,g,w),q&&kr(g,w,O,"beforeUpdate"),O&&xr(O,!0),W&&(!w.dynamicChildren||w.dynamicChildren.length!==W.length)&&(be=0,ye=!1,W=null),(G.innerHTML&&Ae.innerHTML==null||G.textContent&&Ae.textContent==null)&&m(oe,""),W?ce(w.dynamicChildren,W,oe,O,le,ia(g,se),ue):ye||me(w,g,oe,null,O,le,ia(g,se),ue,!1),be>0){if(be&16)ke(oe,G,Ae,O,se);else if(be&2&&G.class!==Ae.class&&a(oe,"class",null,Ae.class,se),be&4&&a(oe,"style",G.style,Ae.style,se),be&8){const Qe=g.dynamicProps;for(let Xe=0;Xe{Ne&&gn(Ne,O,g,w),q&&kr(g,w,O,"updated")},le)},ce=(w,g,O,le,se,ue,ye)=>{for(let oe=0;oe{if(g!==O){if(g!==dt)for(const ue in g)!bs(ue)&&!(ue in O)&&a(w,ue,g[ue],null,se,le);for(const ue in O){if(bs(ue))continue;const ye=O[ue],oe=g[ue];ye!==oe&&ue!=="value"&&a(w,ue,oe,ye,se,le)}"value"in O&&a(w,"value",g.value,O.value,se)}},Y=(w,g,O,le,se,ue,ye,oe,be)=>{const W=g.el=w?w.el:f(""),q=g.anchor=w?w.anchor:f("");let{patchFlag:G,dynamicChildren:Ae,slotScopeIds:Ne}=g;Ne&&(oe=oe?oe.concat(Ne):Ne),w==null?(s(W,O,le),s(q,O,le),P(g.children||[],O,q,se,ue,ye,oe,be)):G>0&&G&64&&Ae&&w.dynamicChildren&&w.dynamicChildren.length===Ae.length?(ce(w.dynamicChildren,Ae,O,se,ue,ye,oe),(g.key!=null||se&&g===se.subTree)&&tl(w,g,!0)):me(w,g,O,q,se,ue,ye,oe,be)},xe=(w,g,O,le,se,ue,ye,oe,be)=>{g.slotScopeIds=oe,w==null?g.shapeFlag&512?se.ctx.activate(g,O,le,ye,be):Ve(g,O,le,se,ue,ye,be):rt(w,g,be)},Ve=(w,g,O,le,se,ue,ye)=>{const oe=w.component=zp(w,le,se);if(ci(w)&&(oe.ctx.renderer=Jt),Gp(oe,!1,ye),oe.asyncDep){if(se&&se.registerDep(oe,He,ye,ue),!w.el){const be=oe.subTree=Oe(Ft);ae(null,be,g,O),w.placeholder=be.el}}else He(oe,w,g,O,se,ue,ye)},rt=(w,g,O)=>{const le=g.component=w.component;if(Ap(w,g,O))if(le.asyncDep&&!le.asyncResolved){g.el=w.el,g.placeholder=w.placeholder,We(le,g,O);return}else le.next=g,le.update();else g.el=w.el,g.placeholder=w.placeholder,le.vnode=g},He=(w,g,O,le,se,ue,ye)=>{const oe=()=>{if(w.isMounted){let{next:G,bu:Ae,u:Ne,parent:Qe,vnode:Xe}=w;{const Bt=zc(w);if(Bt){G&&(G.el=Xe.el,We(w,G,ye)),Bt.asyncDep.then(()=>{Ht(()=>{w.isUnmounted||W()},se)});return}}let Ze=G,mt;xr(w,!1),G?(G.el=Xe.el,We(w,G,ye)):G=Xe,Ae&&Ao(Ae),(mt=G.props&&G.props.onVnodeBeforeUpdate)&&gn(mt,Qe,G,Xe),xr(w,!0);const _t=au(w),Xt=w.subTree;w.subTree=_t,B(Xt,_t,k(Xt.el),ft(Xt),w,se,ue),G.el=_t.el,Ze===null&&Tp(w,_t.el),Ne&&Ht(Ne,se),(mt=G.props&&G.props.onVnodeUpdated)&&Ht(()=>gn(mt,Qe,G,Xe),se)}else{let G;const{el:Ae,props:Ne}=g,{bm:Qe,m:Xe,parent:Ze,root:mt,type:_t}=w,Xt=xs(g);xr(w,!1),Qe&&Ao(Qe),!Xt&&(G=Ne&&Ne.onVnodeBeforeMount)&&gn(G,Ze,g),xr(w,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(_t,w.parent?w.parent.type:void 0);const Bt=w.subTree=au(w);B(null,Bt,O,le,w,se,ue),g.el=Bt.el}if(Xe&&Ht(Xe,se),!Xt&&(G=Ne&&Ne.onVnodeMounted)){const Bt=g;Ht(()=>gn(G,Ze,Bt),se)}(g.shapeFlag&256||Ze&&xs(Ze.vnode)&&Ze.vnode.shapeFlag&256)&&w.a&&Ht(w.a,se),w.isMounted=!0,g=O=le=null}};w.scope.on();const be=w.effect=new ec(oe);w.scope.off();const W=w.update=be.run.bind(be),q=w.job=be.runIfDirty.bind(be);q.i=w,q.id=w.uid,be.scheduler=()=>Xa(q),xr(w,!0),W()},We=(w,g,O)=>{g.component=w;const le=w.vnode.props;w.vnode=g,w.next=null,Op(w,g.props,le,O),Dp(w,g.children,O),An(),gc(w),Tn()},me=(w,g,O,le,se,ue,ye,oe,be=!1)=>{const W=w&&w.children,q=w?w.shapeFlag:0,G=g.children,{patchFlag:Ae,shapeFlag:Ne}=g;if(Ae>0){if(Ae&128){Fe(W,G,O,le,se,ue,ye,oe,be);return}else if(Ae&256){Me(W,G,O,le,se,ue,ye,oe,be);return}}Ne&8?(q&16&&Be(W,se,ue),G!==W&&m(O,G)):q&16?Ne&16?Fe(W,G,O,le,se,ue,ye,oe,be):Be(W,se,ue,!0):(q&8&&m(O,""),Ne&16&&P(G,O,le,se,ue,ye,oe,be))},Me=(w,g,O,le,se,ue,ye,oe,be)=>{w=w||Ar,g=g||Ar;const W=w.length,q=g.length,G=Math.min(W,q);let Ae;for(Ae=0;Aeq?Be(w,se,ue,!0,!1,G):P(g,O,le,se,ue,ye,oe,be,G)},Fe=(w,g,O,le,se,ue,ye,oe,be)=>{let W=0;const q=g.length;let G=w.length-1,Ae=q-1;for(;W<=G&&W<=Ae;){const Ne=w[W],Qe=g[W]=be?Dn(g[W]):xn(g[W]);if($r(Ne,Qe))B(Ne,Qe,O,null,se,ue,ye,oe,be);else break;W++}for(;W<=G&&W<=Ae;){const Ne=w[G],Qe=g[Ae]=be?Dn(g[Ae]):xn(g[Ae]);if($r(Ne,Qe))B(Ne,Qe,O,null,se,ue,ye,oe,be);else break;G--,Ae--}if(W>G){if(W<=Ae){const Ne=Ae+1,Qe=NeAe)for(;W<=G;)Ce(w[W],se,ue,!0),W++;else{const Ne=W,Qe=W,Xe=new Map;for(W=Qe;W<=Ae;W++){const Ot=g[W]=be?Dn(g[W]):xn(g[W]);Ot.key!=null&&Xe.set(Ot.key,W)}let Ze,mt=0;const _t=Ae-Qe+1;let Xt=!1,Bt=0;const Zt=new Array(_t);for(W=0;W<_t;W++)Zt[W]=0;for(W=Ne;W<=G;W++){const Ot=w[W];if(mt>=_t){Ce(Ot,se,ue,!0);continue}let $t;if(Ot.key!=null)$t=Xe.get(Ot.key);else for(Ze=Qe;Ze<=Ae;Ze++)if(Zt[Ze-Qe]===0&&$r(Ot,g[Ze])){$t=Ze;break}$t===void 0?Ce(Ot,se,ue,!0):(Zt[$t-Qe]=W+1,$t>=Bt?Bt=$t:Xt=!0,B(Ot,g[$t],O,null,se,ue,ye,oe,be),mt++)}const hr=Xt?Fp(Zt):Ar;for(Ze=hr.length-1,W=_t-1;W>=0;W--){const Ot=Qe+W,$t=g[Ot],Ie=g[Ot+1],Hn=Ot+1{const{el:ue,type:ye,transition:oe,children:be,shapeFlag:W}=w;if(W&6){De(w.component.subTree,g,O,le);return}if(W&128){w.suspense.move(g,O,le);return}if(W&64){ye.move(w,g,O,Jt);return}if(ye===Le){s(ue,g,O);for(let G=0;Goe.enter(ue),se));else{const{leave:G,delayLeave:Ae,afterLeave:Ne}=oe,Qe=()=>{w.ctx.isUnmounted?o(ue):s(ue,g,O)},Xe=()=>{const Ze=ue._isLeaving||!!ue[on];ue._isLeaving&&ue[on](!0),oe.persisted&&!Ze?Qe():G(ue,()=>{Qe(),Ne&&Ne()})};Ae?Ae(ue,Qe,Xe):Xe()}else s(ue,g,O)},Ce=(w,g,O,le=!1,se=!1)=>{const{type:ue,props:ye,ref:oe,children:be,dynamicChildren:W,shapeFlag:q,patchFlag:G,dirs:Ae,cacheIndex:Ne,memo:Qe}=w;if((G===-2||W&&W.hasOnce)&&(se=!1),oe!=null&&(An(),ks(oe,null,O,w,!0),Tn()),Ne!=null&&(!w.ctx||w.ctx===g)&&(g.renderCache[Ne]=void 0),q&256){g.ctx.deactivate(w);return}const Xe=q&1&&Ae,Ze=!xs(w);let mt;if(Ze&&(mt=ye&&ye.onVnodeBeforeUnmount)&&gn(mt,g,w),q&6)_e(w.component,O,le);else{if(q&128){w.suspense.unmount(O,le);return}Xe&&kr(w,null,g,"beforeUnmount"),q&64?w.type.remove(w,g,O,Jt,le):W&&!W.hasOnce&&(ue!==Le||G>0&&G&64)?Be(W,g,O,!1,!0):(ue===Le&&G&384||!se&&q&16)&&Be(be,g,O),le&&X(w)}const _t=Qe!=null&&Ne==null;(Ze&&(mt=ye&&ye.onVnodeUnmounted)||Xe||_t)&&Ht(()=>{mt&&gn(mt,g,w),Xe&&kr(w,null,g,"unmounted"),_t&&(w.el=null)},O)},X=w=>{const{type:g,el:O,anchor:le,transition:se}=w,ue=g===Le;if(ue&&!se){Z(O,le);return}if(g===Po){J(w),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ye=ue?Ms(w):w,oe=()=>{ue?k(O)&&Z(O,le):o(O),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ye&&ye.shapeFlag&1&&se&&!se.persisted){const{leave:be,delayLeave:W}=se,q=ye.el,G=()=>be(q,oe);W?W(q,oe,G):G()}else oe()},Z=(w,g)=>{let O;for(;w!==g;)O=x(w),o(w),w=O;o(g)},_e=(w,g,O)=>{const{bum:le,scope:se,job:ue,subTree:ye,um:oe,m:be,a:W}=w;cu(be),cu(W),le&&Ao(le),se.stop(),ue?(ue.flags|=8,Ce(ye,w,g,O)):w.vnode.el&&ye&&(ye.transition=w.vnode.transition,Ce(ye,w,g,O)),oe&&Ht(oe,g),Ht(()=>{w.isUnmounted=!0},g)},Be=(w,g,O,le=!1,se=!1,ue=0)=>{for(let ye=ue;ye{if(w.shapeFlag&6)return ft(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const g=x(w.anchor||w.el),O=g&&g[Cc];return O?x(O):g},Yt=(w,g,O)=>{const le=w&&g._vnode?void 0:w&&w.component?w.component.uid:Wp();Yf(()=>{w==null?g._vnode&&Ce(g._vnode,null,null,!0):B(g._vnode||null,w,g,null,null,null,O),g._vnode=w},le)},Jt={p:B,um:Ce,m:De,r:X,mt:Ve,mc:P,pc:me,pbc:ce,n:ft,o:e};return{render:Yt,hydrate:void 0,createApp:kp(Yt)}}function ia({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function xr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Kp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function tl(e,t,n=!1){const s=e.children,o=t.children;if(Ke(s)&&Ke(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,u=n[a-1];a-- >0;)n[a]=u,u=t[u];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function cu(e){if(e)for(let t=0;te.__isSuspense;function Np(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):Gf(e)}const Le=Symbol.for("v-fgt"),pi=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Po=Symbol.for("v-stc"),Pr=[];let rn=null;function F(e=!1){Pr.push(rn=e?null:[])}function Yc(){Pr.pop(),rn=Pr[Pr.length-1]||null}let Is=1;function Bo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Jc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Yc(),Is>0&&rn&&rn.push(e),e}function H(e,t,n,s,o,a){return Jc(c(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Jc(Oe(e,t,n,s,o,!0))}function js(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Xc=({key:e})=>e??null,Oo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||Nt(e)||Ye(e)?{i:an,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,a=e===Le?0:1,u=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xc(t),ref:t&&Oo(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:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:an};return f?(Uo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=wt(n)?8:16),Is>0&&!u&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Oe=Vp;function Vp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===hp)&&(e=Ft),js(e)){const f=ur(e,t,!0);return n&&Uo(f,n),Is>0&&!a&&rn&&(f.shapeFlag&6?rn[rn.indexOf(e)]=f:rn.push(f)),f.patchFlag=-2,f}if(Qp(e)&&(e=e.__vccOpts),t){t=Bp(t);let{class:f,style:h}=t;f&&!wt(f)&&(t.class=tt(f)),lt(h)&&(Ja(h)&&!Ke(h)&&(h=Et({},h)),t.style=or(h))}const u=wt(e)?1:Gc(e)?128:ui(e)?64:lt(e)?4:Ye(e)?2:0;return c(e,t,n,s,o,u,a,!0)}function Bp(e){return e?Ja(e)||Vc(e)?Et({},e):e:null}function ur(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:u,children:f,transition:h}=e,y=t?qp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Xc(y),ref:t&&t.ref?n&&a?Ke(a)?a.concat(Oo(t)):[a,Oo(t)]:Oo(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ur(e.ssContent),ssFallback:e.ssFallback&&ur(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&lr(m,h.clone(m)),m}function nn(e=" ",t=0){return Oe(pi,null,e,t)}function Up(e,t){const n=Oe(Po,null,e);return n.staticCount=t,n}function Ee(e="",t=!1){return t?(F(),It(Ft,null,e)):Oe(Ft,null,e)}function xn(e){return e==null||typeof e=="boolean"?Oe(Ft):Ke(e)?Oe(Le,null,e.slice()):js(e)?Dn(e):Oe(pi,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ur(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ke(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ye(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:an},n=32}else t=String(t),s&64?(n=16,t=[nn(t)]):n=8;e.children=t,e.shapeFlag|=n}function qp(...e){const t={};for(let n=0;nzt||an;let qo,Ds;{const e=ii(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(u=>u(a)):o[0](a)}};qo=t("__VUE_INSTANCE_SETTERS__",n=>zt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const qs=e=>{const t=zt;return qo(e),e.scope.on(),()=>{e.scope.off(),qo(t)}},du=()=>{zt&&zt.scope.off(),qo(null)};function Zc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Gp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=Zc(e);Pp(e,s,a,t),jp(e,o,n||t);const u=a?Yp(e,t):void 0;return t&&Ds(!1),u}function Yp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vp);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Xp(e):null,a=qs(e),u=Bs(s,e,0,[e.props,o]),f=Wu(u);if(Tn(),a(),(f||e.sp)&&!xs(e)&&Tc(e),f){if(u.then(du,du),t)return u.then(h=>{Ds(!0);try{fu(e,h,t)}finally{Ds(!1)}}).catch(h=>{li(h,e,0)});e.asyncDep=u}else fu(e,u)}else ed(e)}function fu(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:lt(t)&&(e.setupState=vc(t)),ed(e)}function ed(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=qs(e);An();try{mp(e)}finally{Tn(),o()}}}const Jp={get(e,t){return Kt(e,"get",""),e[t]}};function Xp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Jp),slots:e.slots,emit:e.emit,expose:t}}function hi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Kf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Qp(e){return Ye(e)&&"__vccOpts"in e}const at=(e,t)=>Uf(e,t,Rs);function Zp(e,t,n){try{Bo(-1);const s=arguments.length;return s===2?lt(t)&&!Ke(t)?js(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&js(n)&&(n=[n]),Oe(e,t,n))}finally{Bo(1)}}const eh="3.5.44";/** -* @vue/runtime-dom v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Aa;const pu=typeof window<"u"&&window.trustedTypes;if(pu)try{Aa=pu.createPolicy("vue",{createHTML:e=>e})}catch{}const td=Aa?e=>Aa.createHTML(e):e=>e,th="http://www.w3.org/2000/svg",nh="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,hu=jn&&jn.createElement("template"),rh={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?jn.createElementNS(th,e):t==="mathml"?jn.createElementNS(nh,e):n?jn.createElement(e,{is:n}):jn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>jn.createTextNode(e),createComment:e=>jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const u=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{hu.innerHTML=td(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=hu.content;if(s==="svg"||s==="mathml"){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[u?u.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=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},rd=Et({},Ec,nd),sh=e=>(e.displayName="Transition",e.props=rd,e),ns=sh((e,{slots:t})=>Zp(sp,sd(e),t)),Cr=(e,t=[])=>{Ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},vu=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const Y in e)Y in nd||(t[Y]=e[Y]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:u=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=u,appearToClass:m=f,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:x=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,M=oh(o),B=M&&M[0],re=M&&M[1],{onBeforeEnter:ae,onEnter:T,onEnterCancelled:S,onLeave:J,onLeaveCancelled:de,onBeforeAppear:ie=ae,onAppear:ee=T,onAppearCancelled:P=S}=t,j=(Y,xe,Ve,rt)=>{Y._enterCancelled=rt,er(Y,xe?m:f),er(Y,xe?y:u),Ve&&Ve()},ce=(Y,xe)=>{Y._isLeaving=!1,er(Y,k),er(Y,C),er(Y,x),xe&&xe()},ke=Y=>(xe,Ve)=>{const rt=Y?ee:T,He=()=>j(xe,Y,Ve);Cr(rt,[xe,He]),mu(()=>{er(xe,Y?h:a),bn(xe,Y?m:f),vu(rt)||yu(xe,s,B,He)})};return Et(t,{onBeforeEnter(Y){Cr(ae,[Y]),bn(Y,a),bn(Y,u)},onBeforeAppear(Y){Cr(ie,[Y]),bn(Y,h),bn(Y,y)},onEnter:ke(!1),onAppear:ke(!0),onLeave(Y,xe){Y._isLeaving=!0;const Ve=()=>ce(Y,xe);bn(Y,k),Y._enterCancelled?(bn(Y,x),Ta(Y)):(Ta(Y),bn(Y,x)),mu(()=>{Y._isLeaving&&(er(Y,k),bn(Y,C),vu(J)||yu(Y,s,re,Ve))}),Cr(J,[Y,Ve])},onEnterCancelled(Y){j(Y,!1,void 0,!0),Cr(S,[Y])},onAppearCancelled(Y){j(Y,!0,void 0,!0),Cr(P,[Y])},onLeaveCancelled(Y){ce(Y),Cr(de,[Y])}})}function oh(e){if(e==null)return null;if(lt(e))return[aa(e.enter),aa(e.leave)];{const t=aa(e);return[t,t]}}function aa(e){return cf(e)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jr]||(e[Jr]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jr];n&&(n.delete(t),n.size||(e[Jr]=void 0))}function mu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ih=0;function yu(e,t,n,s){const o=e._endId=++ih,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:u,timeout:f,propCount:h}=od(e,t);if(!u)return s();const y=u+"end";let m=0;const k=()=>{e.removeEventListener(y,x),a()},x=C=>{C.target===e&&++m>=h&&k()};setTimeout(()=>{m(n[M]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),u=gu(o,a),f=s(`${vs}Delay`),h=s(`${vs}Duration`),y=gu(f,h);let m=null,k=0,x=0;t===Qn?u>0&&(m=Qn,k=u,x=a.length):t===vs?y>0&&(m=vs,k=y,x=h.length):(k=Math.max(u,y),m=k>0?u>y?Qn:vs:null,x=m?m===Qn?a.length:h.length:0);const C=m===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:m,timeout:k,propCount:x,hasTransform:C}}function gu(e,t){for(;e.lengthbu(n)+bu(e[s])))}function bu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ta(e){return(e?e.ownerDocument:document).body.offsetHeight}function ah(e,t,n){const s=e[Jr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const wu=Symbol("_vod"),id=Symbol("_vsh"),lh=Symbol(""),uh=/(?:^|;)\s*display\s*:/;function ch(e,t,n){const s=e.style,o=wt(n);let a=!1;if(n&&!o){if(t)if(wt(t))for(const u of t.split(";")){const f=u.slice(0,u.indexOf(":")).trim();n[f]==null&&gs(s,f,"")}else for(const u in t)n[u]==null&&gs(s,u,"");for(const u in n){u==="display"&&(a=!0);const f=n[u];f!=null?fh(e,u,!wt(t)&&t?t[u]:void 0,f)||gs(s,u,f):gs(s,u,"")}}else if(o){if(t!==n){const u=s[lh];u&&(n+=";"+u),s.cssText=n,a=uh.test(n)}}else t&&e.removeAttribute("style");wu in e&&((!o||t!==n)&&(e[wu]=a?s.display:""),e[id]&&(s.display="none"))}const So=/\s*!important$/;function gs(e,t,n){if(Ke(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))So.test(n)?e.setProperty(t,n.replace(So,""),"important"):e.setProperty(t,n);else{const s=dh(e,t);So.test(n)?e.setProperty(dr(s),n.replace(So,""),"important"):e[s]=n}}const _u=["Webkit","Moz","ms"],la={};function dh(e,t){const n=la[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return la[t]=s;s=Yu(s);for(let o=0;o<_u.length;o++){const a=_u[o]+s;if(a in e)return la[t]=a}return t}function fh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&wt(s)&&n===s}const ku="http://www.w3.org/1999/xlink";function xu(e,t,n,s,o,a=mf(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ku,t.slice(6,t.length)):e.setAttributeNS(ku,t,n):n==null||a&&!Xu(n)?e.removeAttribute(t):e.setAttribute(t,a?"":$n(n)?String(n):n)}function Cu(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?td(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const f=a==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(f!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let u=!1;if(n===""||n==null){const f=typeof e[t];f==="boolean"?n=Xu(n):n==null&&f==="string"?(n="",u=!0):f==="number"&&(n=0,u=!0)}try{e[t]=n}catch{}u&&e.removeAttribute(o||t)}function rr(e,t,n,s){e.addEventListener(t,n,s)}function ph(e,t,n,s){e.removeEventListener(t,n,s)}const Su=Symbol("_vei");function hh(e,t,n,s,o=null){const a=e[Su]||(e[Su]={}),u=a[t];if(s&&u)u.value=s;else{const[f,h]=yh(t);if(s){const y=a[t]=wh(s,o);rr(e,f,y,h)}else u&&(ph(e,f,u,h),a[t]=void 0)}}const vh=/(Once|Passive|Capture)$/,mh=/^on:?(?:Once|Passive|Capture)$/;function yh(e){let t,n;for(;(n=e.match(vh))&&!mh.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):dr(e.slice(2)),t]}let ua=0;const gh=Promise.resolve(),bh=()=>ua||(gh.then(()=>ua=0),ua=Date.now());function wh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Ke(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const u=o.slice(),f=[s];for(let h=0;he.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_h=(e,t,n,s,o,a)=>{const u=o==="svg";t==="class"?ah(e,s,u):t==="style"?ch(e,n,s):ni(t)?ri(t)||hh(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):kh(e,t,s,u))?(Cu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,s,u,a,t!=="value")):e._isVueCE&&(xh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wt(s)))?Cu(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),xu(e,t,s,u))};function kh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Eu(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 Eu(t)&&wt(n)?!1:t in e}function xh(e,t){const n=e._def.props;if(!n)return!1;const s=hn(t);return Array.isArray(n)?n.some(o=>hn(o)===s):Object.keys(n).some(o=>hn(o)===s)}const ad=new WeakMap,ld=new WeakMap,Ho=Symbol("_moveCb"),$u=Symbol("_enterCb"),Pa=new WeakMap,Ch=e=>(delete e.props.mode,e),Sh=Ch({name:"TransitionGroup",props:Et({},rd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=nl(),s=Sc();let o,a,u,f;const h=()=>(f===void 0&&(f=o.length>0&&Ih(o[0].el,n.vnode.el,Au(e))),f);return Oc(()=>{if(Pa.delete(n),!h()){o=[],u=void 0;return}const y=Au(e);o.forEach($h);const m=u&&Mh(u,n.vnode.el);u=void 0,o.forEach(x=>Ah(x,m));const k=o.filter(Th);Ta(n.vnode.el),k.forEach(x=>{const C=x.el,M=C.style;bn(C,y),M.transform=M.webkitTransform=M.transitionDuration="";const B=C[Ho]=re=>{re&&re.target!==C||(!re||re.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",B),C[Ho]=null,er(C,y))};C.addEventListener("transitionend",B)}),o=[]}),()=>{const y=ot(e),m=sd(y);let k=y.tag||Le;if(o=[],f=void 0,a)for(let x=0;xs.willMove()&&s.item.contains(t));return n&&vi(n.item,n)}function Ih(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(f=>{f.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(f=>f&&s.classList.add(f)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:u}=od(s);return a.removeChild(s),u}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?n=>Ao(t,n):t};function jh(e){e.target.composing=!0}function Tu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),Eo=Symbol("_initialValue");function ca(e,t,n){return t&&(e=e.trim()),n&&(e=oi(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Eo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Eo]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";rr(e,t?"change":"input",u=>{u.target.composing||e[Sn](ca(e.value,n,a))}),(n||a)&&rr(e,"change",()=>{e.value=ca(e.value,n,a)}),t||(rr(e,"compositionstart",jh),rr(e,"compositionend",Tu),rr(e,"change",Tu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[Eo];delete e[Eo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](ca(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},u){if(e[Sn]=Xr(u),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?oi(e.value):e.value,h=t??"";if(f===h)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Dh={deep:!0,created(e,t,n){e[Sn]=Xr(n),rr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,u=e[Sn];if(Ke(s)){const f=Ba(s,o),h=f!==-1;if(a&&!h)u(s.concat(o));else if(!a&&h){const y=[...s];y.splice(f,1),u(y)}}else if(Bn(s)){const f=new Set(s);a?f.add(o):f.delete(o),u(f)}else u(ud(e,a))})},mounted:Pu,beforeUpdate(e,t,n){e[Sn]=Xr(n),Pu(e,t,n)}};function Pu(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Ke(t))o=Ba(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,ud(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,rr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?oi(Ls(h)):Ls(h)),a=e.multiple,u=a?Bn(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Ke(u)?o.slice():o:u];try{e[Sn](u)}finally{ts(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){Ou(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sn]=Xr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Rh(t,n[1],n[0]))&&Ou(e,t)}};function Rh(e,t,n){if(!n||Ke(e))return Un(e,t);if(Bn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Ou(e,t){const n=e.multiple,s=Ke(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;oString(y)===String(f)):u.selected=Ba(t,f)>-1}else u.selected=t.has(f);else if(Un(Ls(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function ud(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lh=["ctrl","shift","alt","meta"],Kh={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)=>Lh.some(n=>e[`${n}Key`]&&!t.includes(n))},Mr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let u=0;u{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=dr(o.key);if(t.some(u=>u===a||Fh[u]===a))return e(o)})},Nh=Et({patchProp:_h},rh);let Mu;function Vh(){return Mu||(Mu=Rp(Nh))}const Bh=(...e)=>{const t=Vh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=qh(s);if(!o)return;const a=t._component;!Ye(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const u=n(o,!1,Uh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t};function Uh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qh(e){return wt(e)?document.querySelector(e):e}function At(e){return''+e+""}const Hh={calendar:At(''),clock:At(''),"check-circle":At(''),edit:At(''),tag:At(''),star:At(''),close:At(''),flag:At(''),chart:At(''),export:At(''),"chevron-left":At(''),"chevron-right":At(''),"chevron-down":At(''),plus:At(''),search:At(''),settings:At(''),memo:At(''),lock:At(''),wallet:At('')},Wh=["innerHTML"],ut=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=at(()=>Hh[t.name]||"");return(s,o)=>(F(),H("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Wh))}}),zh=["aria-label"],Gh={class:"dialog-title"},Yh={class:"dialog-msg"},Jh={class:"dialog-btns"},Xh=Vt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return bt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,u)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:u[2]||(u[2]=Mr(f=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Gh,ne(e.title),1),c("div",Yh,ne(e.message),1),c("div",Jh,[c("button",{class:"btn btn-sm",onClick:u[0]||(u[0]=f=>s("cancel"))},ne(e.cancelText),1),c("button",{class:tt(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:u[1]||(u[1]=f=>s("confirm"))},ne(e.confirmText),3)])],8,zh)])):Ee("",!0)]),_:1})]))}}),Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},cr=Gt(Xh,[["__scopeId","data-v-f27041d4"]]);var Iu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cd={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Iu,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,d){l.__proto__=d}:function(l,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(l[p]=d[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,d=arguments.length;l"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function k(r,i){return m.call(r,i)}function x(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?u:Reflect.ownKeys)(i).forEach(function(l){M(r,l,i[l])})}var C=Object.defineProperty;function M(r,i,l,d){C(r,i,h(l&&k(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},d))}function B(r){return{from:function(i){return r.prototype=Object.create(i.prototype),M(r.prototype,"constructor",r),{extend:x.bind(null,r.prototype)}}}}var re=Object.getOwnPropertyDescriptor,ae=[].slice;function T(r,i,l){return ae.call(r,i,l)}function S(r,i){return i(r)}function J(r){if(!r)throw new Error("Assertion Failed")}function de(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&k(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],d=0,p=i.length;d"u"?[]:(Xe=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Qe),Xe]:[Xe,y(Xe),Xe]),Xe=Qe[0],Br=Qe[1],Br=Br&&Br.then,Ze=Xe&&Xe.constructor,mt=!!Qe[2],_t=function(r,i){Hn.push([r,i]),Bt&&(queueMicrotask(Dd),Bt=!1)},Xt=!0,Bt=!0,Zt=[],hr=[],Ot=O,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:g,pgp:!1,env:{},finalize:g},Ie=$t,Hn=[],vr=0,Ys=[];function Se(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=Ie;if(typeof r!="function"){if(r!==Ae)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&ki(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(d,p){try{p(function(v){if(d._state===null){if(v===d)throw new TypeError("A promise cannot be resolved with itself.");var b=d._lib&&Rr();v&&typeof v.then=="function"?l(d,function(_,$){v instanceof Se?v._then(_,$):v.then(_,$)}):(d._state=!0,d._value=v,hl(d)),b&&Lr()}},ki.bind(null,d))}catch(v){ki(d,v)}}(this,r)}var _i={get:function(){var r=Ie,i=Zs;function l(d,p){var v=this,b=!r.global&&(r!==Ie||i!==Zs),_=b&&!zn(),$=new Se(function(V,I){xi(v,new pl(ml(d,r,b,_),ml(p,r,b,_),V,I,r))});return this._consoleTask&&($._consoleTask=this._consoleTask),$}return l.prototype=Ae,l},set:function(r){M(this,"then",r&&r.prototype===Ae?_i:{get:function(){return r},set:_i.set})}};function pl(r,i,l,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=d,this.psd=p}function ki(r,i){var l,d;hr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,d=r,Zt.some(function(p){return p._value===d._value})||Zt.push(d),hl(r),l)&&Lr()}function hl(r){var i=r._listeners;r._listeners=[];for(var l=0,d=i.length;l{for(var b=Zt.length;b;)if(Zt[--b]._value===v._value)return Zt.splice(b,1)})(i),l.resolve(d)}catch(v){l.reject(v)}finally{--vr==0&&Ci(),--l.psd.ref||l.psd.finalize()}}function Dd(){mr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Bt=Xt=!1,r}function Lr(){var r,i,l;do for(;0.",yl="String expected.",to="__dbnames",Ei="readonly",$i="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var gl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function no(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=xe(i))[r],i}}function bl(){throw je.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function nt(r,i){try{var l=wl(r),d=wl(i);if(l!==d)return l==="Array"?1:d==="Array"?-1:l==="binary"?1:d==="binary"?-1:l==="string"?1:d==="string"?-1:l==="Date"?1:d!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i{var _=I,$=b;if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");function V(){this.constructor=_}function I(){return b!==null&&b.apply(this,arguments)||this}return n(_,$),_.prototype=$===null?Object.create($):(V.prototype=$.prototype,new V),Object.defineProperty(I.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),I.prototype.table=function(){return l},I})(r)),new Set),p=r.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(b){return d.add(b)});function v(b){if(!b)return b;var _,$=Object.create(r.prototype);for(_ in b)if(!d.has(_))try{$[_]=b[_]}catch{}return $}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},pt.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},pt.prototype.add=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"add",keys:i!=null?[i]:null,values:[b]})}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{ee(r,v,_)}catch{}return _})},pt.prototype.upsert=function(r,i){var l=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var b=v??{};return xl(b,i),d&&ee(b,d,r),l.core.mutate({trans:p,type:"put",values:[b],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):!!v})})})},pt.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?Ct(new je.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},pt.prototype.put=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"put",values:[b],keys:i!=null?[i]:null})}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{ee(r,v,_)}catch{}return _})},pt.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(l){return i.core.mutate({trans:l,type:"delete",keys:[r]}).then(function(d){return ro(i,[r],d)}).then(function(d){return d.numFailures?Se.reject(d.failures[0]):void 0})})},pt.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:gl}).then(function(l){return ro(r,null,l)})}).then(function(i){return i.numFailures?Se.reject(i.failures[0]):void 0})},pt.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(l){return i.core.getMany({keys:r,trans:l}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},pt.prototype.bulkAdd=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,V=_.auto,_=_.keyPath;if(_&&p)throw new je.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,V=_&&V?r.map(no(_)):r;return d.core.mutate({trans:b,type:"add",keys:p,values:V,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkAdd(): ").concat(E," of ").concat($," operations failed"),A)})})},pt.prototype.bulkPut=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,V=_.auto,_=_.keyPath;if(_&&p)throw new je.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,V=_&&V?r.map(no(_)):r;return d.core.mutate({trans:b,type:"put",keys:p,values:V,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkPut(): ").concat(E," of ").concat($," operations failed"),A)})})},pt.prototype.bulkUpdate=function(r){var i=this,l=this.core,d=r.map(function(b){return b.key}),p=r.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return l.getMany({trans:b,keys:d,cache:"clone"}).then(function(_){var $=[],V=[],I=(r.forEach(function(E,A){var K=E.key,R=E.changes,D=_[A];if(D){for(var L=0,z=Object.keys(R);LU+te&&L(U+V)})})}var z=Fr(l)&&l.limit===1/0&&(typeof r!="function"||R)&&{index:l.index,range:l.range};return L(0).then(function(){if(0{for(var qe=Math.min(ve.length,Pe.length),Je=-1,et=0;et=A})).length===0?Se.resolve():(L.forEach(function(U){D.push(function(){var te,fe,he,we=z,ve=U._cfg.dbschema,Te=(po(E,we,R),po(E,ve,R),z=E._dbSchema=ve,Di(we,ve)),ge=(Te.add.forEach(function(Pe){Ri(R,Pe[0],Pe[1].primKey,Pe[1].indexes)}),Te.change.forEach(function(Pe){if(Pe.recreate)throw new je.Upgrade("Not yet support for changing primary key");var pe=R.objectStore(Pe.name);Pe.add.forEach(function(Ue){return co(pe,Ue)}),Pe.change.forEach(function(Ue){pe.deleteIndex(Ue.name),co(pe,Ue)}),Pe.del.forEach(function(Ue){return pe.deleteIndex(Ue)})}),U._cfg.contentUpgrade);if(ge&&U._cfg.version>A)return lo(E,R),K._memoizedTables={},te=P(ve),Te.del.forEach(function(Pe){te[Pe]=we[Pe]}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],u(te),te),K.schema=te,(fe=De(ge))&&Kr(),ve=Se.follow(function(){var Pe;(he=ge(K))&&fe&&(Pe=zn.bind(null,null),he.then(Pe,Pe))}),he&&typeof he.then=="function"?Se.resolve(he):ve.then(function(){return he})}),D.push(function(te){var fe,he,we=U._cfg.dbschema;fe=we,he=te,[].slice.call(he.db.objectStoreNames).forEach(function(ve){return fe[ve]==null&&he.db.deleteObjectStore(ve)}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],E._storeNames,E._dbSchema),K.schema=E._dbSchema}),D.push(function(te){E.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(E.idbdb.version/10)===U._cfg.version?(E.idbdb.deleteObjectStore("$meta"),delete E._dbSchema.$meta,E._storeNames=E._storeNames.filter(function(fe){return fe!=="$meta"})):te.objectStore("$meta").put(U._cfg.version,"version"))})}),function U(){return D.length?Se.resolve(D.shift()(K.idbtrans)).then(U):Se.resolve()}().then(function(){Ml(z,R)}))}).catch(b);var $,V;u(p).forEach(function(I){Ri(l,I,p[I].primKey,p[I].indexes)}),lo(r,l),Se.follow(function(){return r.on.populate.fire(v)}).catch(b)})}function Gd(r,i){Ml(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var l=fo(0,r.idbdb,i);po(r,r._dbSchema,i);for(var d=0,p=Di(l,r._dbSchema).change;d{if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var _=i.objectStore(b.name);b.add.forEach(function($){q&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat($.src)),co(_,$)})})(p[d]);if(typeof v=="object")return v.value}}function Di(r,i){var l,d={del:[],add:[],change:[]};for(l in r)i[l]||d.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var b={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,d.change.push(b);else{var _=p.idxByName,$=v.idxByName,V=void 0;for(V in _)$[V]||b.del.push(V);for(V in $){var I=_[V],E=$[V];I?I.src!==E.src&&b.change.push(E):b.add.push(E)}(0{var r,i,l;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(d){r.delete(d)}),{toArray:function(){return Array.from(r).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);r.add(p),i.register(d._novip,p,p),r.size>d._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(d){if(d)for(var p=r.values(),v=p.next();!v.done;){var b=v.value;if(b.deref()===d._novip)return r.delete(b),void i.unregister(b);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(d){l.push(d._novip)},remove:function(d){d&&(d=l.indexOf(d._novip))!==-1&&l.splice(d,1)}})})();function Li(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(to,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Ki(r){return r&&typeof r.databases=="function"}function Fi(r){return Wn(function(){return Ie.letThrough=!0,r()})}function Ni(r){return!("from"in r)}var Dt=function(r,i){var l;if(!this)return l=new Dt,r&&"d"in r&&h(l,r),l;h(this,arguments.length?{d:1,from:r,to:1Math.pow(2,62)?0:L.oldVersion,E=z<1,r.idbdb=D.result,v&&Gd(r,I),zd(r,z/10,I,K))},K),D.onsuccess=yt(function(){I=null;var L,z,U,te,fe,he,we=r.idbdb=D.result,ve=T(we.objectStoreNames);if(0"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(A){function K(){return indexedDB.databases().finally(A)}$=setInterval(K,100),K()}).finally(function(){return clearInterval($)}):Promise.resolve()).then(_)]).then(function(){return b(),i.onReadyBeingFired=[],Se.resolve(Fi(function(){return r.on.ready.fire(r.vip)})).then(function A(){var K;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(l===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((l=nt(l,d))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return l})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((l,d,p,v)=>{if(l===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((l=nt(l,d))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return l})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function nf(r,i,l,d){r.subscribers.add(l),d.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&me(v,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,d,p){var v,b,_=r.transaction(l,d,p);return d==="readwrite"&&(p=(v=new AbortController).signal,_.addEventListener("abort",(b=function($){return function(){if(v.abort(),d==="readwrite"){for(var V=new Set,I=0,E=l;I{var z=br["idb://".concat(K,"/").concat(R)];if(!z)return[];if(!(K=z.queries[D]))return[null,!1,z,null];var U=K[(L.query?L.query.index.name:null)||""];if(!U)return[null,!1,z,null];switch(D){case"query":var te=(fe=L.direction)!=null?fe:"next",fe=U.find(function(he){var we;return he.req.limit===L.limit&&he.req.values===L.values&&((we=he.req.direction)!=null?we:"next")===te&&Ul(he.req.query.range,L.query.range)});return fe?[fe,!0,z,U]:[U.find(function(he){var we;return("limit"in he.req?he.req.limit:1/0)>=L.limit&&((we=he.req.direction)!=null?we:"next")===te&&(!L.values||he.req.values)&&tf(he.req.query.range,L.query.range)}),!1,z,U];case"count":return fe=U.find(function(he){return Ul(he.req.query.range,L.query.range)}),[fe,!!fe,z,U]}})(i,l,"query",v),A=E[0],V=E[2],I=E[3],A&&E[1]?A.obsSet=v.obsSet:(E=d.query(v).then(function(K){var R=K.result;if(A&&(A.res=R),b){for(var D=0,L=R.length;D{var fe=Rr();try{v&&Kr();var he=Wn(r,te);return he=v?he.finally(zn):he}finally{fe&&Lr()}})(z={subscr:L,signal:b.signal,requery:A,querier:r,trans:null}),E||(Jn.storagemutated.subscribe(R),E=!0),Promise.resolve(U).then(function(te){l=!0,i=te,_||z.signal.aborted||(K()||(V=L,K())?A():($={},Si(function(){return!_&&p.next&&p.next(te)})))},function(te){l=!1,["DatabaseClosedError","AbortError"].includes(te==null?void 0:te.name)||_||Si(function(){_||p.error&&p.error(te)})}))};return setTimeout(A,0),I});return d.hasValue=function(){return l},d.getValue=function(){return i},d}var wr=Mn;function Ji(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),qi(r,!0)}finally{Xn=i}}x(wr,s(s({},Ce),{delete:function(r){return new wr(r,{addons:[]}).delete()},exists:function(r){return new wr(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=wr.dependencies,l=i.indexedDB,i=i.IDBKeyRange,(Ki(l)?Promise.resolve(l.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==to})}):Li(l,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new je.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return Ie.trans?mr(Ie.transless||$t,r):r()},vip:Fi,async:function(r){return function(){try{var i=Hi(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Se.resolve(i)}catch(l){return Ct(l)}}},spawn:function(r,i,l){try{var d=Hi(r.apply(l,i||[]));return d&&typeof d.then=="function"?d:Se.resolve(d)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return Ie.trans||null}},waitFor:function(r,i){return r=Se.resolve(typeof r=="function"?wr.ignoreTransaction(r):r).timeout(i||6e4),Ie.trans?Ie.trans.waitFor(r):r},Promise:Se,debug:{get:function(){return q},set:function(r){G(r)}},derive:B,extend:h,props:x,override:S,Events:os,on:Jn,liveQuery:ql,extendObservabilitySet:vo,getByKeyPath:ie,setByKeyPath:ee,delByKeyPath:function(r,i){typeof i=="string"?ee(r,i,void 0):"length"in i&&[].map.call(i,function(l){ee(r,l,void 0)})},shallowClone:P,deepClone:xe,getObjectDiff:Wi,cmp:nt,asap:de,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Yt,dependencies:bo,cache:br,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,l){return r+i/Math.pow(10,2*l)})})),wr.maxKey=ls(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(ao,function(r){Xn||(r=new CustomEvent(Pi,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Pi,function(r){r=r.detail,Xn||Ji(r)}));var Ur,Xn=!1,Hl=function(){};return typeof BroadcastChannel<"u"&&((Hl=function(){(Ur=new BroadcastChannel(Pi)).onmessage=function(r){return r.data&&Ji(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(ao,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){q&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.toArray();in.key===e);return t?t.label:"其他"}const rv={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},sv={class:"dialog-head"},ov={key:0,class:"muted dialog-sub"},iv={class:"dialog-body"},av={class:"form-grid"},lv={class:"field span2"},uv={key:0,class:"form-error"},cv={class:"field"},dv=["value"],fv={class:"field"},pv=["value"],hv={class:"field"},vv={class:"field"},mv={class:"field span2"},yv={class:"field"},gv={class:"field"},bv={class:"dialog-btns"},wv=Vt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(null),u=N("dev"),f=N(null),h=N(""),y=N(""),m=N(0),k=N(0),x=N(""),C=N(null),M=at(()=>{var S;const ae=n.projects.filter(J=>J.archived!==1),T=(S=n.item)==null?void 0:S.project_id;if(T&&!ae.some(J=>J.id===T)){const J=n.projects.find(ie=>ie.id===T),de=ae.slice();return J&&de.unshift({...J,name:J.name+"(已归档)"}),de}return ae});function B(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var T;if(ae){const S=n.item;o.value=(S==null?void 0:S.content)??"",a.value=(S==null?void 0:S.project_id)??null,u.value=(S==null?void 0:S.category)??"dev",f.value=(S==null?void 0:S.minutes)??null,h.value=(S==null?void 0:S.takeaway)??"",y.value=(S==null?void 0:S.remark)??"",m.value=(S==null?void 0:S.is_milestone)??0,k.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",B),await ts(),(T=C.value)==null||T.focus()}else window.removeEventListener("keydown",B)}),pr(()=>window.removeEventListener("keydown",B)),bt(o,()=>{x.value&&(x.value="")});function re(){const ae=o.value.trim();if(!ae){x.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ae,project_id:a.value,category:u.value,minutes:f.value&&f.value>0?f.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:k.value?1:0})}return(ae,T)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:T[10]||(T[10]=Mr(S=>s("cancel"),["self"]))},[c("div",rv,[c("div",sv,[c("div",null,[T[11]||(T[11]=c("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(F(),H("div",ov,ne(e.date),1)):Ee("",!0)]),c("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=S=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",iv,[c("div",av,[c("div",lv,[T[12]||(T[12]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{ref_key:"contentInput",ref:C,class:tt(["input",{invalid:x.value}]),"onUpdate:modelValue":T[1]||(T[1]=S=>o.value=S),onKeydown:jt(re,["enter"])},null,34),[[Re,o.value]]),x.value?(F(),H("div",uv,ne(x.value),1)):Ee("",!0)]),c("div",cv,[T[14]||(T[14]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[2]||(T[2]=S=>a.value=S)},[T[13]||(T[13]=c("option",{value:null},"无项目",-1)),(F(!0),H(Le,null,ct(M.value,S=>(F(),H("option",{key:S.id,value:S.id},ne(S.name),9,dv))),128))],512),[[Fn,a.value]])]),c("div",fv,[T[15]||(T[15]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[3]||(T[3]=S=>u.value=S)},[(F(!0),H(Le,null,ct(Qt(Hs),S=>(F(),H("option",{key:S.key,value:S.key},ne(S.label),9,pv))),128))],512),[[Fn,u.value]])]),c("div",hv,[T[16]||(T[16]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":T[4]||(T[4]=S=>f.value=S),placeholder:"选填"},null,512),[[Re,f.value,void 0,{number:!0}]])]),c("div",vv,[T[17]||(T[17]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":T[5]||(T[5]=S=>h.value=S),placeholder:"一句话:学到了什么"},null,512),[[Re,h.value]])]),c("div",mv,[T[18]||(T[18]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":T[6]||(T[6]=S=>y.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),c("div",yv,[T[19]||(T[19]=c("label",null,"成果标记",-1)),c("button",{class:tt(["toggle-btn",{on:m.value===1}]),onClick:T[7]||(T[7]=S=>m.value=m.value===1?0:1)},ne(m.value===1?"已标记为成果":"未标记"),3)]),c("div",gv,[T[20]||(T[20]=c("label",null,"待跟进",-1)),c("button",{class:tt(["toggle-btn",{onwarn:k.value===1}]),onClick:T[8]||(T[8]=S=>k.value=k.value===1?0:1)},ne(k.value===1?"需要跟进":"无需跟进"),3)])])]),c("div",bv,[c("button",{class:"btn btn-sm",onClick:T[9]||(T[9]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存修改")])])])):Ee("",!0)]),_:1})]))}}),_v=Gt(wv,[["__scopeId","data-v-63bc0b48"]]);function Ss(e){return e<10?"0"+e:String(e)}function Nn(e){return e.getFullYear()+"-"+Ss(e.getMonth()+1)+"-"+Ss(e.getDate())}function xt(){return Nn(new Date)}function vt(){const e=new Date;return Nn(e)+"T"+Ss(e.getHours())+":"+Ss(e.getMinutes())+":"+Ss(e.getSeconds())}function Vn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Kn(e,t){const n=rs(e);return n.setDate(n.getDate()+t),Nn(n)}function zo(e,t){const n=rs(e),s=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(s,o)),Nn(n)}function Es(e){const t=rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Nn(t)}function kv(e){const t=rs(e).getDay();return t===0||t===6}function xv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function fd(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function gt(e,t){const n=await Q.setting.get(e);return n?n.value:t}async function kt(e,t){await Q.setting.put({key:e,value:t})}async function jr(){const e=await Promise.all([gt("work_start","09:00"),gt("work_end","18:00"),gt("grace_minutes","10"),gt("lunch_minutes","60"),gt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function Cv(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function Sv(){return gt("last_location","")}async function Ev(e,t){const n=t.trim();await kt("last_location",n),n&&await Go(n);const s=await mn(e);s&&s.id?await Q.attendance.update(s.id,{location:n||null}):n&&await Q.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:vt()})}async function ol(){const e=await gt("location_presets","");if(!e)return Du.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 Du.slice()}async function pd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Go(e){const t=e.trim();if(!t)return;const n=await ol();n.includes(t)||await pd([...n,t])}async function Ks(e=!1){const t=await Q.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function $v(e){await Q.project.add({name:e.trim(),archived:0,created_at:vt()})}async function Av(e,t){await Q.project.update(e,{name:t.trim()})}async function Tv(e,t){await Q.project.update(e,{archived:t?1:0})}async function mn(e){return Q.attendance.where("date").equals(e).first()}async function hd(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:vt()};n&&(o.location=n),await Q.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Go(n));return}await Q.attendance.add({date:e,clock_in_at:vt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:vt()}),n&&(await kt("last_location",n),await Go(n))}async function Pv(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await Q.attendance.update(t.id,{clock_out_at:vt()})}async function Ov(){const e=new Date,t=Nn(e);if(e.getHours()<4){const s=await mn(Kn(t,-1));if(s&&s.id&&s.clock_in_at&&!s.clock_out_at)return await Q.attendance.update(s.id,{clock_out_at:vt()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await Q.attendance.update(n.id,{clock_out_at:vt()}),n.date;throw new Error("没有进行中的打卡")}async function Mv(e,t,n,s,o){(o||"").trim()&&await Go(o);const a=await mn(e),u={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:vt()};a&&a.id?await Q.attendance.update(a.id,u):await Q.attendance.add(u)}async function Iv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await Q.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function mi(e,t){return Q.attendance.where("date").between(e,t,!0,!0).toArray()}async function jv(e,t){const n=await mn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:vt()};n&&n.id?await Q.attendance.update(n.id,s):await Q.attendance.add({...s,note:null,location:null})}else n&&n.id&&await Q.attendance.update(n.id,{kind:"normal"})}async function Dv(e){const t=await Q.work_log.where("date").equals(e).first();return t||{id:await Q.work_log.add({date:e,created_at:vt()}),date:e,created_at:vt()}}async function Rv(e){return Q.work_log.where("date").equals(e).first()}async function Lv(e){const t=await Rv(e);return!t||!t.id?[]:(await Q.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Kv(e,t){const n=await Dv(e);await Q.log_item.add({work_log_id:n.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:vt()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function da(e,t){await Q.log_item.update(e,t)}async function Fv(e){await Q.log_item.delete(e)}async function yi(e,t){const n=await Q.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await Q.log_item.where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,u)=>a.date===u.date?a.id-u.id:a.datet.updated_at[u.id,u.date]));return(await Q.log_item.toArray()).filter(u=>((u.content||"")+" "+(u.takeaway||"")+" "+(u.remark||"")).toLowerCase().includes(n)).sort((u,f)=>f.id-u.id).slice(0,t).map(u=>({...u,date:o.get(u.work_log_id)||""}))}async function zv(e,t=4){const n=e.trim().toLowerCase();return n?(await Q.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear(),Q.table("transaction").clear()]),n.project&&n.project.length&&await Q.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await Q.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await Q.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await Q.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await Q.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await Q.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await Q.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await Q.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await Q.table("transaction").bulkAdd(n.transaction)})}function $o(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ws(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(kv(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=$o(Vn(e.clock_in_at)),u=$o(Vn(e.clock_out_at)),f=$o(n.work_start),h=$o(n.work_end);let y="normal";!o&&a>f+n.grace_minutes?y="late":!o&&u{Mo.value=Mo.value.filter(n=>n.id!==t)},2e3)}function nm(){return Mo}const Ma=N(null),Ia=N(null),zs=N(0);function nr(){zs.value++}const rm={class:"day-panel"},sm={class:"dp-head"},om={class:"dp-date"},im={class:"card sec"},am={class:"att-grid"},lm={class:"att-cell"},um={key:0,class:"edit-row"},cm={key:1,class:"att-val"},dm={class:"att-cell"},fm={key:0,class:"edit-row"},pm={key:1,class:"att-val"},hm={class:"att-cell"},vm=["list"],mm=["id"],ym=["value"],gm={class:"att-cell"},bm={class:"att-val status-val"},wm={key:0,class:"tag"},_m={key:1,class:"muted"},km={key:0,class:"att-note muted"},xm={class:"att-actions"},Cm=["disabled"],Sm=["disabled"],Em=["disabled"],$m=["disabled"],Am={key:0,class:"card sec makeup"},Tm={class:"form-grid"},Pm={class:"field"},Om={class:"field"},Mm={class:"field span2"},Im=["list"],jm={class:"field span2"},Dm={key:0,class:"form-error"},Rm={class:"form-footer"},Lm={class:"card sec"},Km={class:"form-grid"},Fm={class:"field span2"},Nm={key:0,class:"form-error"},Vm={class:"field"},Bm=["value"],Um={class:"field"},qm=["value"],Hm={class:"field"},Wm={class:"field"},zm={class:"field span2"},Gm={class:"form-footer"},Ym=["disabled"],Jm=["disabled"],Xm={class:"list-sec"},Qm={class:"sec-title"},Zm={key:0,class:"empty muted"},ey={class:"item-main"},ty={class:"tag"},ny=["onClick"],ry={key:0,class:"muted item-meta"},sy={key:1,class:"muted num item-meta"},oy=["onClick"],iy=["onClick"],ay=["onClick"],ly=["onClick"],uy={key:0,class:"item-sub"},cy={key:0,class:"muted2"},dy={key:1,class:"muted"},fy={key:1,class:"dp-foot muted num"},py=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=N(!0),s=N(null),o=N(void 0),a=N([]),u=N([]),f=N(""),h=N([]),y=at(()=>"loc-list-"+t.date),m=at(()=>t.date===xt());async function k(){n.value=!0,s.value=await jr(),o.value=await mn(t.date),a.value=await Lv(t.date),u.value=await Ks(!0),h.value=await ol(),f.value=o.value&&o.value.location||await Sv(),n.value=!1}dn(k),bt(()=>t.date,k),bt(zs,()=>{k()});const x=at(()=>u.value.filter(W=>W.archived!==1));function C(W){if(!W)return"";const q=u.value.find(G=>G.id===W);return q?q.name:"已删除项目"}const M=at(()=>s.value?Ws(o.value,t.date,s.value,m.value):null),B=at(()=>a.value.reduce((W,q)=>W+(q.minutes||0),0)),re=N(!1);async function ae(){re.value||(re.value=!0,await hd(t.date,f.value),await k(),nr(),ze("上班打卡成功"),re.value=!1)}async function T(){re.value||(re.value=!0,await Pv(t.date),await k(),nr(),ze("下班打卡成功"),re.value=!1)}async function S(){await Ev(t.date,f.value),nr(),ze("地点已更新")}const J=N(!1),de=at(()=>{var W;return((W=o.value)==null?void 0:W.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){J.value=!0;return}ee(!0)}async function ee(W){J.value=!1,await jv(t.date,W),await k(),nr(),ze(W?"已标记为休假":"已取消休假")}const P=N(null),j=N(""),ce=N(null);bt(P,async W=>{var q;W&&(await ts(),(q=ce.value)==null||q.focus())});function ke(W){var G,Ae;const q=W==="in"?(G=o.value)==null?void 0:G.clock_in_at:(Ae=o.value)==null?void 0:Ae.clock_out_at;P.value=W,j.value=q?Vn(q):W==="in"?"09:00":"18:00"}function Y(){P.value=null}async function xe(){const W=P.value;W&&(P.value=null,j.value&&(await Iv(t.date,W==="in"?"clock_in_at":"clock_out_at",j.value),await k(),nr(),ze("打卡时间已修改")))}const Ve=N(!1),rt=N("09:00"),He=N("18:00"),We=N(""),me=N(""),Me=N("");function Fe(){me.value=f.value,Me.value="",Ve.value=!Ve.value}async function De(){if(!rt.value||!He.value){Me.value="请填写上班与下班时间";return}await Mv(t.date,t.date+"T"+rt.value+":00",t.date+"T"+He.value+":00",We.value.trim(),me.value),Ve.value=!1,We.value="",Me.value="",await k(),nr(),ze("补卡已保存")}const Ce=N(""),X=N("");bt(Ce,()=>{X.value&&(X.value="")});const Z=N(null),_e=N("dev"),Be=N(null),ft=N(""),Yt=N(""),Jt=N(!1),je=at(()=>!!(Ce.value.trim()||Be.value||ft.value.trim()||Yt.value.trim()));dn(async()=>{const W=await Cv();Z.value=W.project_id,_e.value=W.category});function w(){Ce.value="",Be.value=null,ft.value="",Yt.value="",X.value=""}async function g(){const W=Ce.value.trim();if(!W){X.value="请填写工作内容";return}Jt.value||(Jt.value=!0,await Kv(t.date,{content:W,project_id:Z.value,category:_e.value,minutes:Be.value&&Be.value>0?Be.value:null,takeaway:ft.value.trim()||null,remark:Yt.value.trim()||null}),w(),await k(),ze("记录已添加"),Jt.value=!1)}const O=N(null);function le(W){O.value=W}async function se(W){const q=W.id,G={content:W.content,project_id:W.project_id,category:W.category,minutes:W.minutes,takeaway:W.takeaway,remark:W.remark,is_milestone:W.is_milestone,needs_followup:W.needs_followup};await da(q,G),O.value=null,await k(),ze("修改已保存")}async function ue(W){await da(W.id,{is_milestone:W.is_milestone?0:1}),await k()}async function ye(W){await da(W.id,{needs_followup:W.needs_followup?0:1}),await k()}const oe=N(null);async function be(){oe.value&&oe.value.id&&await Fv(oe.value.id),oe.value=null,await k(),ze("记录已删除")}return(W,q)=>(F(),H("div",rm,[c("div",sm,[c("div",om,ne(Qt(fd)(e.date)),1)]),c("div",im,[q[25]||(q[25]=c("div",{class:"sec-title"},"出勤信息",-1)),c("div",am,[c("div",lm,[q[21]||(q[21]=c("label",null,"上班时间",-1)),P.value==="in"?(F(),H("div",um,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":q[0]||(q[0]=G=>j.value=G),onKeydown:[jt(xe,["enter"]),jt(Y,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:Y},"取消")])):(F(),H("div",cm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},ne(o.value&&o.value.clock_in_at?Qt(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(F(),H("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:q[1]||(q[1]=G=>ke("in"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",dm,[q[22]||(q[22]=c("label",null,"下班时间",-1)),P.value==="out"?(F(),H("div",fm,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":q[2]||(q[2]=G=>j.value=G),onKeydown:[jt(xe,["enter"]),jt(Y,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:Y},"取消")])):(F(),H("div",pm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},ne(o.value&&o.value.clock_out_at?Qt(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(F(),H("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:q[3]||(q[3]=G=>ke("out"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",hm,[q[23]||(q[23]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[4]||(q[4]=G=>f.value=G),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:S},null,40,vm),[[Re,f.value]]),c("datalist",{id:y.value},[(F(!0),H(Le,null,ct(h.value,G=>(F(),H("option",{key:G,value:G},null,8,ym))),128))],8,mm)]),c("div",gm,[q[24]||(q[24]=c("label",null,"考勤状态",-1)),c("div",bm,[M.value?(F(),H(Le,{key:0},[c("span",{class:tt(["dot",M.value.status])},null,2),c("span",null,ne(M.value.label),1),o.value&&o.value.kind==="makeup"?(F(),H("span",wm,"补卡")):Ee("",!0)],64)):(F(),H("span",_m,"--"))])])]),o.value&&o.value.note?(F(),H("div",km,"补卡说明:"+ne(o.value.note),1)):Ee("",!0),c("div",xm,[m.value&&(!o.value||!o.value.clock_in_at)?(F(),H("button",{key:0,class:"btn btn-primary btn-sm",disabled:re.value,onClick:ae},"上班打卡",8,Cm)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(F(),H("button",{key:1,class:"btn btn-primary btn-sm",disabled:re.value,onClick:T},"下班打卡",8,Sm)):Ee("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(F(),H("button",{key:2,class:"btn btn-sm",onClick:Fe},"补卡")):Ee("",!0),de.value?(F(),H("button",{key:4,class:"btn btn-sm",disabled:re.value,onClick:q[5]||(q[5]=G=>ee(!1))},"取消休假",8,$m)):(F(),H("button",{key:3,class:"btn btn-sm",disabled:re.value,onClick:ie},"标记休假",8,Em))])]),Ve.value?(F(),H("div",Am,[q[30]||(q[30]=c("div",{class:"sec-title"},"补卡登记",-1)),c("div",Tm,[c("div",Pm,[q[26]||(q[26]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":q[6]||(q[6]=G=>rt.value=G)},null,512),[[Re,rt.value]])]),c("div",Om,[q[27]||(q[27]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":q[7]||(q[7]=G=>He.value=G)},null,512),[[Re,He.value]])]),c("div",Mm,[q[28]||(q[28]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input",list:y.value,"onUpdate:modelValue":q[8]||(q[8]=G=>me.value=G),placeholder:"可直接输入"},null,8,Im),[[Re,me.value]])]),c("div",jm,[q[29]||(q[29]=c("label",null,"补卡原因",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[9]||(q[9]=G=>We.value=G),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,We.value]])])]),Me.value?(F(),H("div",Dm,ne(Me.value),1)):Ee("",!0),c("div",Rm,[c("button",{class:"btn btn-sm",onClick:q[10]||(q[10]=G=>Ve.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):Ee("",!0),c("div",Lm,[q[38]||(q[38]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增工作记录"),c("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),c("div",Km,[c("div",Fm,[q[31]||(q[31]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{class:tt(["input",{invalid:X.value}]),"onUpdate:modelValue":q[11]||(q[11]=G=>Ce.value=G),placeholder:"做了什么,一句话一条",onKeydown:jt(g,["enter"])},null,34),[[Re,Ce.value]]),X.value?(F(),H("div",Nm,ne(X.value),1)):Ee("",!0)]),c("div",Vm,[q[33]||(q[33]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":q[12]||(q[12]=G=>Z.value=G)},[q[32]||(q[32]=c("option",{value:null},"无项目",-1)),(F(!0),H(Le,null,ct(x.value,G=>(F(),H("option",{key:G.id,value:G.id},ne(G.name),9,Bm))),128))],512),[[Fn,Z.value]])]),c("div",Um,[q[34]||(q[34]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":q[13]||(q[13]=G=>_e.value=G)},[(F(!0),H(Le,null,ct(Qt(Hs),G=>(F(),H("option",{key:G.key,value:G.key},ne(G.label),9,qm))),128))],512),[[Fn,_e.value]])]),c("div",Hm,[q[35]||(q[35]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":q[14]||(q[14]=G=>Be.value=G),placeholder:"选填"},null,512),[[Re,Be.value,void 0,{number:!0}]])]),c("div",Wm,[q[36]||(q[36]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[15]||(q[15]=G=>ft.value=G),placeholder:"一句话:学到了什么"},null,512),[[Re,ft.value]])]),c("div",zm,[q[37]||(q[37]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":q[16]||(q[16]=G=>Yt.value=G),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,Yt.value]])])]),c("div",Gm,[c("button",{class:"btn btn-sm",disabled:!je.value,onClick:w},"重置",8,Ym),c("button",{class:"btn btn-primary btn-sm",disabled:Jt.value,onClick:g},"添加记录",8,Jm)])]),c("div",Xm,[c("div",Qm,"工作记录("+ne(a.value.length)+")",1),!a.value.length&&!n.value?(F(),H("div",Zm,"暂无记录")):Ee("",!0),(F(!0),H(Le,null,ct(a.value,G=>(F(),H("div",{key:G.id,class:"item"},[c("div",ey,[c("span",ty,ne(Qt(sl)(G.category)),1),c("span",{class:"item-content",title:"点击编辑",onClick:Ae=>le(G)},ne(G.content),9,ny),G.project_id?(F(),H("span",ry,ne(C(G.project_id)),1)):Ee("",!0),G.minutes?(F(),H("span",sy,ne(G.minutes)+" 分钟",1)):Ee("",!0),q[39]||(q[39]=c("span",{class:"flex1"},null,-1)),c("button",{class:"icon-btn",title:"编辑完整信息",onClick:Ae=>le(G)},[Oe(ut,{name:"edit",size:14})],8,oy),c("button",{class:tt(["icon-btn",{active:G.is_milestone===1}]),title:"成果标记",onClick:Ae=>ue(G)},[Oe(ut,{name:"star",size:14})],10,iy),c("button",{class:tt(["icon-btn",{"active-warn":G.needs_followup===1}]),title:"待跟进",onClick:Ae=>ye(G)},[Oe(ut,{name:"flag",size:14})],10,ay),c("button",{class:"icon-btn",title:"删除",onClick:Ae=>oe.value=G},[Oe(ut,{name:"close",size:14})],8,ly)]),G.takeaway||G.remark?(F(),H("div",uy,[G.takeaway?(F(),H("div",cy,"收获:"+ne(G.takeaway),1)):Ee("",!0),G.remark?(F(),H("div",dy,"备注:"+ne(G.remark),1)):Ee("",!0)])):Ee("",!0)]))),128)),a.value.length?(F(),H("div",fy,[nn(" 共 "+ne(a.value.length)+" 条事项 ",1),B.value?(F(),H(Le,{key:0},[nn(" · "+ne((B.value/60).toFixed(1))+" 小时",1)],64)):Ee("",!0)])):Ee("",!0)]),Oe(cr,{open:!!oe.value,title:"删除确认",message:oe.value?"将删除工作记录「"+oe.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:q[17]||(q[17]=G=>oe.value=null),onConfirm:be},null,8,["open","message"]),Oe(cr,{open:J.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:q[18]||(q[18]=G=>J.value=!1),onConfirm:q[19]||(q[19]=G=>ee(!0))},null,8,["open"]),Oe(_v,{open:!!O.value,item:O.value,projects:u.value,date:e.date,onCancel:q[20]||(q[20]=G=>O.value=null),onSave:se},null,8,["open","item","projects","date"])]))}}),vd=Gt(py,[["__scopeId","data-v-2e90c9d8"]]),hy={class:"cal-page"},vy={class:"cal-toolbar"},my={class:"cal-title num"},yy={class:"cal-head"},gy={class:"cal-grid"},by=["title","onClick"],wy={class:"cal-marks"},_y={key:0,class:"drawer"},ky={class:"drawer-head"},xy={class:"drawer-body"},Cy=Vt({__name:"CalendarView",setup(e){const t=N(xt()),n=at(()=>Number(t.value.slice(0,4))),s=at(()=>Number(t.value.slice(5,7))-1),o=at(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],u=at(()=>{const J=(new Date(n.value,s.value,1).getDay()+6)%7,de=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let ee=0;ee[ke.date,ke])),P=de[2],j=new Map;for(const ke of u.value){if(!ke.inMonth)continue;const Y=Ws(ee.get(ke.date),ke.date,ie,ke.date===h),xe=P.filter(Ve=>Ve.date===ke.date);j.set(ke.date,{status:Y.status,label:Y.label,location:((ce=ee.get(ke.date))==null?void 0:ce.location)||"",hasLog:xe.length>0,hasMilestone:xe.some(Ve=>Ve.is_milestone===1)})}f.value=j}bt([n,s],y,{immediate:!0}),bt(zs,()=>{y()});function m(S){var J;return((J=f.value.get(S))==null?void 0:J.status)??""}function k(S){const J=f.value.get(S);return J?S+" · "+J.label+(J.location?" · "+J.location:""):S}function x(S){var J;return!!((J=f.value.get(S))!=null&&J.hasLog)}function C(S){var J;return!!((J=f.value.get(S))!=null&&J.hasMilestone)}function M(){t.value=zo(t.value,-1)}function B(){t.value=zo(t.value,1)}function re(){t.value=xt()}const ae=N(null);function T(S,J){J&&(ae.value=S)}return bt(Ma,S=>{S&&(t.value=S,ae.value=S,Ma.value=null)},{immediate:!0}),(S,J)=>(F(),H("div",hy,[c("div",vy,[c("button",{class:"icon-btn",onClick:M},[Oe(ut,{name:"chevron-left",size:16})]),c("span",my,ne(o.value),1),c("button",{class:"icon-btn",onClick:B},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:re},"回到今天")]),c("div",yy,[(F(),H(Le,null,ct(a,de=>c("span",{key:de,class:"cal-week muted"},ne(de),1)),64))]),c("div",gy,[(F(!0),H(Le,null,ct(u.value,(de,ie)=>(F(),H("button",{key:ie,class:tt(["cal-cell",{blank:!de.inMonth,weekend:de.weekend,selected:ae.value===de.date}]),title:de.inMonth?k(de.date):void 0,onClick:ee=>T(de.date,de.inMonth)},[de.inMonth?(F(),H(Le,{key:0},[c("span",{class:tt(["daynum num",{today:de.date===Qt(h)}])},ne(Number(de.date.slice(8,10))),3),c("span",wy,[m(de.date)?(F(),H("span",{key:0,class:tt(["dot",m(de.date)])},null,2)):Ee("",!0),x(de.date)?(F(),It(ut,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ee("",!0),C(de.date)?(F(),It(ut,{key:2,name:"star",size:12,class:"mark-star"})):Ee("",!0)])],64)):Ee("",!0)],10,by))),128))]),Oe(ns,{name:"drawer"},{default:fr(()=>[ae.value?(F(),H("aside",_y,[c("div",ky,[J[1]||(J[1]=c("span",{class:"drawer-title"},"当日详情",-1)),c("button",{class:"icon-btn",onClick:J[0]||(J[0]=de=>ae.value=null)},[Oe(ut,{name:"close",size:16})])]),c("div",xy,[Oe(vd,{date:ae.value},null,8,["date"])])])):Ee("",!0)]),_:1})]))}}),Sy=Gt(Cy,[["__scopeId","data-v-2404dfbe"]]),Ey={class:"detail-page"},$y={class:"detail-toolbar"},Ay=["value"],Ty=["disabled"],Py=Vt({__name:"TodayView",setup(e){const t=N(xt()),n=at(()=>t.value===xt());function s(){t.value=Kn(t.value,-1)}function o(){t.value=Kn(t.value,1)}function a(){t.value=xt()}function u(f){const h=f.target.value;h&&(t.value=h)}return(f,h)=>(F(),H("div",Ey,[c("div",$y,[c("button",{class:"icon-btn",title:"前一天",onClick:s},[Oe(ut,{name:"chevron-left",size:16})]),c("span",{class:tt(["date-title num",{"is-today":n.value}])},ne(Qt(fd)(t.value)),3),c("button",{class:"icon-btn",title:"后一天",onClick:o},[Oe(ut,{name:"chevron-right",size:16})]),c("input",{type:"date",class:"input w-date",value:t.value,onChange:u},null,40,Ay),c("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,Ty)]),Oe(vd,{date:t.value},null,8,["date"])]))}}),Oy=Gt(Py,[["__scopeId","data-v-76243d98"]]),My={class:"stats"},Iy={class:"cards"},jy={class:"card stat-card"},Dy={class:"stat-num num"},Ry={class:"card stat-card"},Ly={class:"stat-num num"},Ky={class:"card stat-card"},Fy={class:"stat-num num"},Ny={class:"card stat-card"},Vy={class:"stat-num num"},By={class:"card section"},Uy={class:"heat"},qy=["title"],Hy={class:"two-col"},Wy={class:"card section"},zy={class:"bar-label"},Gy={class:"bar-track"},Yy={class:"muted num bar-num"},Jy={key:0,class:"muted"},Xy={class:"card section"},Qy={class:"bar-label"},Zy={class:"bar-track"},eg={class:"muted num bar-num"},tg={key:0,class:"muted"},ng={class:"card section"},rg={class:"bar-label loc-label"},sg={class:"bar-track"},og={class:"muted num bar-num"},ig={key:0,class:"muted"},ag=Vt({__name:"StatsView",setup(e){const t=N({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=N([]),s=N([]),o=N([]),a=N([]);async function u(){const y=xt(),m="2000-01-01",k=await Promise.all([jr(),mi(m,y),yi(m,y),Ks(!0)]),x=k[0],C=k[1],M=k[2],B=k[3],re=C.filter(Y=>Y.clock_in_at||Y.kind==="makeup");let ae=0;for(const Y of re){const xe=Ws(Y,Y.date,x,Y.date===y);ae+=xe.workedMinutes??0}const T=new Set(M.map(Y=>Y.date));let S=0,J=y;for(T.has(J)||(J=Kn(y,-1));T.has(J);)S++,J=Kn(J,-1);t.value={attendDays:re.length,totalHours:(ae/60).toFixed(1),itemCount:M.length,streak:S};const de=new Map;for(const Y of re){const xe=Y.location||"未记录";de.set(xe,(de.get(xe)||0)+1)}a.value=Array.from(de.entries()).map(Y=>({name:Y[0],count:Y[1],percent:Math.round(Y[1]/(re.length||1)*100)})).sort((Y,xe)=>xe.count-Y.count);const ie=M.length||1;s.value=Hs.map(Y=>{const xe=M.filter(Ve=>Ve.category===Y.key).length;return{key:Y.key,label:Y.label,count:xe,percent:Math.round(xe/ie*100)}}).filter(Y=>Y.count>0).sort((Y,xe)=>xe.count-Y.count);const ee=new Map(B.map(Y=>[Y.id,Y.name])),P=new Map;for(const Y of M){const xe=Y.project_id?ee.get(Y.project_id)||"已删除项目":"无项目";P.set(xe,(P.get(xe)||0)+1)}o.value=Array.from(P.entries()).map(Y=>({name:Y[0],count:Y[1],percent:Math.round(Y[1]/ie*100)})).sort((Y,xe)=>xe.count-Y.count);const j=new Map;for(const Y of M)j.set(Y.date,(j.get(Y.date)||0)+1);const ce=Es(y),ke=[];for(let Y=11;Y>=0;Y--){const xe=Kn(ce,-7*Y),Ve=[];for(let rt=0;rt<7;rt++){const He=Kn(xe,rt);Ve.push({date:He,count:j.get(He)||0})}ke.push(Ve)}n.value=ke}dn(async()=>{await u()}),bt(zs,()=>{u()});function f(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function h(y,m){return y+" · "+(m?m+" 条":"无记录")}return(y,m)=>(F(),H("div",My,[c("div",Iy,[c("div",jy,[m[0]||(m[0]=c("div",{class:"muted"},"出勤天数",-1)),c("div",Dy,ne(t.value.attendDays),1)]),c("div",Ry,[m[1]||(m[1]=c("div",{class:"muted"},"累计工时(小时)",-1)),c("div",Ly,ne(t.value.totalHours),1)]),c("div",Ky,[m[2]||(m[2]=c("div",{class:"muted"},"记录条数",-1)),c("div",Fy,ne(t.value.itemCount),1)]),c("div",Ny,[m[3]||(m[3]=c("div",{class:"muted"},"连续记录(天)",-1)),c("div",Vy,ne(t.value.streak),1)])]),c("div",By,[m[4]||(m[4]=c("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),c("div",Uy,[(F(!0),H(Le,null,ct(n.value,(k,x)=>(F(),H("div",{key:x,class:"heat-col"},[(F(!0),H(Le,null,ct(k,C=>(F(),H("span",{key:C.date,class:tt(["heat-cell","lv"+f(C.count)]),title:h(C.date,C.count)},null,10,qy))),128))]))),128))]),m[5]||(m[5]=Up('
少多
',1))]),c("div",Hy,[c("div",Wy,[m[6]||(m[6]=c("div",{class:"section-title"},"分类分布",-1)),(F(!0),H(Le,null,ct(s.value,k=>(F(),H("div",{key:k.key,class:"bar-row"},[c("span",zy,ne(k.label),1),c("span",Gy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",Yy,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),s.value.length?Ee("",!0):(F(),H("div",Jy,"暂无数据"))]),c("div",Xy,[m[7]||(m[7]=c("div",{class:"section-title"},"项目投入",-1)),(F(!0),H(Le,null,ct(o.value,k=>(F(),H("div",{key:k.name,class:"bar-row"},[c("span",Qy,ne(k.name),1),c("span",Zy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",eg,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),o.value.length?Ee("",!0):(F(),H("div",tg,"暂无数据"))])]),c("div",ng,[m[8]||(m[8]=c("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(F(!0),H(Le,null,ct(a.value,k=>(F(),H("div",{key:k.name,class:"bar-row"},[c("span",rg,ne(k.name),1),c("span",sg,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",og,ne(k.count)+" 天 · "+ne(k.percent)+"%",1)]))),128)),a.value.length?Ee("",!0):(F(),H("div",ig,"暂无数据"))])]))}}),lg=Gt(ag,[["__scopeId","data-v-73e5ba49"]]);async function ug(e,t,n){const s=xt(),o=await Promise.all([jr(),mi(e,t),yi(e,t),Ks(!0),Vv(e,t)]),a=o[0],u=o[1],f=o[2],h=o[3],y=o[4];let m=0,k=0,x=0;for(const P of u){(P.clock_in_at||P.kind==="makeup")&&m++,P.kind==="makeup"&&x++;const j=Ws(P,P.date,a,P.date===s);k+=j.workedMinutes??0}const C=new Map;for(const P of u){if(!(P.clock_in_at||P.kind==="makeup"))continue;const j=P.location||"未记录";C.set(j,(C.get(j)||0)+1)}const M=Array.from(C.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,j)=>j.count-P.count),B=f.length||1,re=Hs.map(P=>{const j=f.filter(ce=>ce.category===P.key).length;return{key:P.key,label:P.label,count:j,percent:Math.round(j/B*100)}}).filter(P=>P.count>0).sort((P,j)=>j.count-P.count),ae=new Map(h.map(P=>[P.id,P.name])),T=new Map;for(const P of f){const j=P.project_id?ae.get(P.project_id)||"已删除项目":"无项目";T.set(j,(T.get(j)||0)+1)}const S=Array.from(T.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,j)=>j.count-P.count),J=f.filter(P=>P.is_milestone===1).map(P=>({date:P.date,content:P.content})),de=f.filter(P=>P.needs_followup===1).map(P=>({date:P.date,content:P.content,remark:P.remark||""})),ie=f.filter(P=>!!P.takeaway).map(P=>({date:P.date,text:P.takeaway})),ee=y.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:m,totalHours:(k/60).toFixed(1),makeupCount:x,leaveCount:u.filter(P=>P.kind==="leave").length,itemCount:f.length,categoryStats:re,projectStats:S,locationStats:M,milestones:J,followups:de,takeaways:ie,weekNotes:ee}}function cg(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(` -`)}const dg="modulepreload",fg=function(e,t){return new URL(e,t).href},Ru={},md=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=fg(y,s),y in Ru)return;Ru[y]=!0;const m=y.endsWith(".css"),k=m?'[rel="stylesheet"]':"";if(!!s)for(let M=u.length-1;M>=0;M--){const B=u[M];if(B.href===y&&(!m||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${k}`))return;const C=document.createElement("link");if(C.rel=m?"stylesheet":dg,m||(C.as="script"),C.crossOrigin="",C.href=y,h&&C.setAttribute("nonce",h),document.head.appendChild(C),m)return new Promise((M,B)=>{C.addEventListener("load",M),C.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&a(f.reason);return t().catch(a)})};/*! 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},s=(a,u)=>{n.platforms.set(a,u)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},hg=e=>e.CapacitorPlatforms=pg(e),yd=hg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});yd.addPlatform;yd.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class fa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const vg=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"},mg=e=>{var t,n,s,o,a;const u=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},h=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,m=()=>u!==null?u.name:vg(e),k=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,x=()=>k()!=="web",C=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||x,M=ee=>{const P=J.get(ee);return!!(P!=null&&P.platforms.has(k())||ae(ee))},B=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||M,re=ee=>{var P;return(P=f.PluginHeaders)===null||P===void 0?void 0:P.find(j=>j.name===ee)},ae=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||re,T=ee=>e.console.error(ee),S=(ee,P,j)=>Promise.reject(`${j} does not have an implementation of "${P}".`),J=new Map,de=(ee,P={})=>{const j=J.get(ee);if(j)return console.warn(`Capacitor plugin "${ee}" already registered. Cannot register plugins twice.`),j.proxy;const ce=k(),ke=ae(ee);let Y;const xe=async()=>(!Y&&ce in P?Y=typeof P[ce]=="function"?Y=await P[ce]():Y=P[ce]:u!==null&&!Y&&"web"in P&&(Y=typeof P.web=="function"?Y=await P.web():Y=P.web),Y),Ve=(Fe,De)=>{var Ce,X;if(ke){const Z=ke==null?void 0:ke.methods.find(_e=>De===_e.name);if(Z)return Z.rtype==="promise"?_e=>f.nativePromise(ee,De.toString(),_e):(_e,Be)=>f.nativeCallback(ee,De.toString(),_e,Be);if(Fe)return(Ce=Fe[De])===null||Ce===void 0?void 0:Ce.bind(Fe)}else{if(Fe)return(X=Fe[De])===null||X===void 0?void 0:X.bind(Fe);throw new fa(`"${ee}" plugin is not implemented on ${ce}`,Qr.Unimplemented)}},rt=Fe=>{let De;const Ce=(...X)=>{const Z=xe().then(_e=>{const Be=Ve(_e,Fe);if(Be){const ft=Be(...X);return De=ft==null?void 0:ft.remove,ft}else throw new fa(`"${ee}.${Fe}()" is not implemented on ${ce}`,Qr.Unimplemented)});return Fe==="addListener"&&(Z.remove=async()=>De()),Z};return Ce.toString=()=>`${Fe.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:Fe,writable:!1,configurable:!1}),Ce},He=rt("addListener"),We=rt("removeListener"),me=(Fe,De)=>{const Ce=He({eventName:Fe},De),X=async()=>{const _e=await Ce;We({eventName:Fe,callbackId:_e},De)},Z=new Promise(_e=>Ce.then(()=>_e({remove:X})));return Z.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await X()},Z},Me=new Proxy({},{get(Fe,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ke?me:He;case"removeListener":return We;default:return rt(De)}}});return h[ee]=Me,J.set(ee,{name:ee,proxy:Me,platforms:new Set([...Object.keys(P),...ke?[ce]:[]])}),Me},ie=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||de;return f.convertFileSrc||(f.convertFileSrc=ee=>ee),f.getPlatform=k,f.handleError=T,f.isNativePlatform=C,f.isPluginAvailable=B,f.pluginMethodNoop=S,f.registerPlugin=ie,f.Exception=fa,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},yg=e=>e.Capacitor=mg(e),Zr=yg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),gd=Zr.registerPlugin;Zr.Plugins;class bd{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&this.sendRetainedArgumentsForEvent(t);const u=async()=>this.removeListener(t,n);return Promise.resolve({remove:u})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new Zr.Exception(t,Qr.Unimplemented)}unavailable(t="not available"){return new Zr.Exception(t,Qr.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(s=>{this.notifyListeners(t,s)}))}}const Lu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Ku=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class gg extends bd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Ku(o).trim(),a=Ku(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Lu(t.key),s=Lu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),u=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${u};`}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)}}}gd("CapacitorCookies",{web:()=>new gg});const bg=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),wg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,u)=>(o[a]=e[t[u]],o),{})},_g=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,u]=o;let f,h;return Array.isArray(u)?(h="",u.forEach(y=>{f=t?encodeURIComponent(y):y,h+=`${a}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(u):u,h=`${a}=${f}`),`${s}&${h}`},"").substr(1):null,kg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=wg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[u,f]of Object.entries(e.data||{}))a.set(u,f);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((f,h)=>{a.append(h,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;const u=new Headers(n.headers);u.delete("content-type"),n.headers=u}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class xg extends bd{async request(t){const n=kg(t,t.webFetchExtra),s=_g(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),u=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};u.includes("application/json")&&(f="json");let h,y;switch(f){case"arraybuffer":case"blob":y=await a.blob(),h=await bg(y);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const m={};return a.headers.forEach((k,x)=>{m[x]=k}),{data:h,headers:m,status:a.status,url:a.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}gd("CapacitorHttp",{web:()=>new xg});async function al(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const u=await n.electronAPI.saveFile(e,t);return u&&u.saved?u.path:""}if(Zr.isNativePlatform()){const{Filesystem:u,Directory:f,Encoding:h}=await md(async()=>{const{Filesystem:y,Directory:m,Encoding:k}=await import("./index-BzA9f9V8.js");return{Filesystem:y,Directory:m,Encoding:k}},[],import.meta.url);try{return(await u.writeFile({path:e,data:t,directory:f.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await u.writeFile({path:e,data:t,directory:f.Cache,encoding:h.UTF8,recursive:!0})).uri}}const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Cg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:al},Symbol.toStringTag,{value:"Module"}));async function ja(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 Sg(e){const t=await Promise.all([gt("ai_base_url",""),gt("ai_api_key",""),gt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",u={"Content-Type":"application/json"};s&&(u.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(a,{method:"POST",headers:u,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let x="接口返回 "+y.status;try{const C=await y.json();C&&C.error&&C.error.message&&(x+=":"+C.error.message)}catch{}throw new Error(x)}const m=await y.json(),k=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!k)throw new Error("接口未返回内容");return String(k)}const Eg={class:"report"},$g={class:"report-toolbar"},Ag={class:"seg"},Tg=["onClick"],Pg=["disabled"],Og=["disabled"],Mg={key:0,class:"ai-error"},Ig={class:"report-grid"},jg={class:"report-left"},Dg={class:"card section"},Rg={class:"section-title"},Lg={class:"muted note-saved"},Kg={class:"card section"},Fg={class:"report-right"},Ng={key:0,class:"card section"},Vg={class:"sum-row"},Bg={class:"num"},Ug={class:"sum-row"},qg={class:"num"},Hg={class:"sum-row"},Wg={class:"num"},zg={class:"sum-row"},Gg={class:"num"},Yg={class:"sum-row"},Jg={class:"num"},Xg={class:"muted"},Qg={class:"num"},Zg={key:0,class:"muted sum-empty"},eb={class:"muted"},tb={key:1,class:"muted sum-empty"},nb={class:"muted"},rb={key:2,class:"muted sum-empty"},sb={class:"muted"},ob={key:3,class:"muted sum-empty"},ib=Vt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=N("week"),s=N(Es(xt())),o=N(xt()),a=N(null),u=N(""),f=N(!1),h=N(!1),y=N(null),m=N(""),k=N(Es(xt())),x=N(""),C=N(""),M=N(""),B=N(!1);async function re(){const P=await il(k.value);x.value=(P==null?void 0:P.highlights)||"",C.value=(P==null?void 0:P.challenges)||"",M.value=(P==null?void 0:P.plan_next)||"",B.value=!1}async function ae(){await Nv(k.value,{highlights:x.value.trim()||null,challenges:C.value.trim()||null,plan_next:M.value.trim()||null}),B.value=!0,await S()}function T(P){const j=xt();if(P==="week"){const ce=Es(j);return{start:ce,end:Kn(ce,6),label:"本周"}}if(P==="month"){const ce=j.slice(0,7);return{start:ce+"-01",end:j,label:ce+" 本月"}}return P==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function S(){f.value=!0;const P=T(n.value),j=await ug(P.start,P.end,P.label);a.value=j,u.value=cg(j),f.value=!1}bt(n,S),bt([s,o],()=>{n.value==="custom"&&S()}),dn(async()=>{await re(),await S()});async function J(){const P=xt().replace(/-/g,""),j=await al("实习工作总结_"+P+".md",u.value);ze(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function de(){await ja(u.value),ze("总结已复制到剪贴板")}async function ie(){if(h.value)return;m.value="";const P=u.value.trim();if(!P){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=u.value,u.value=await Sg(P),ze("AI 润色完成")}catch(j){y.value=null,m.value=j instanceof Error?j.message:"润色失败"}h.value=!1}function ee(){y.value!==null&&(u.value=y.value),y.value=null}return(P,j)=>(F(),H("div",Eg,[c("div",$g,[c("div",Ag,[(F(),H(Le,null,ct(t,ce=>c("button",{key:ce.key,class:tt(["seg-btn",{active:n.value===ce.key}]),onClick:ke=>n.value=ce.key},ne(ce.label),11,Tg)),64))]),n.value==="custom"?(F(),H(Le,{key:0},[$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=ce=>s.value=ce)},null,512),[[Re,s.value]]),j[6]||(j[6]=c("span",{class:"muted"},"至",-1)),$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=ce=>o.value=ce)},null,512),[[Re,o.value]])],64)):Ee("",!0),j[10]||(j[10]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Oe(ut,{name:"edit",size:14}),j[7]||(j[7]=nn("AI 润色 ",-1))],8,Pg),y.value!==null?(F(),H("button",{key:1,class:"btn btn-sm",onClick:ee},"还原润色前")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:f.value,onClick:S},[Oe(ut,{name:"edit",size:14}),j[8]||(j[8]=nn("重新生成 ",-1))],8,Og),c("button",{class:"btn btn-sm",onClick:de},"复制"),c("button",{class:"btn btn-primary btn-sm",onClick:J},[Oe(ut,{name:"export",size:14}),j[9]||(j[9]=nn("导出 Markdown ",-1))])]),m.value?(F(),H("div",Mg,ne(m.value),1)):Ee("",!0),c("div",Ig,[c("div",jg,[c("div",Dg,[c("div",Rg,"本周周记("+ne(k.value)+" 起)",1),j[11]||(j[11]=c("label",{class:"note-label muted"},"本周亮点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=ce=>x.value=ce),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[Re,x.value]]),j[12]||(j[12]=c("label",{class:"note-label muted"},"踩的坑",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=ce=>C.value=ce),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[Re,C.value]]),j[13]||(j[13]=c("label",{class:"note-label muted"},"下周计划",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=ce=>M.value=ce),placeholder:"下周准备做什么",onBlur:ae},null,544),[[Re,M.value]]),c("div",Lg,ne(B.value?"已保存":"失焦自动保存"),1)]),c("div",Kg,[j[14]||(j[14]=c("div",{class:"section-title"},"总结草稿(可编辑)",-1)),$e(c("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=ce=>u.value=ce),spellcheck:"false"},null,512),[[Re,u.value]])])]),c("div",Fg,[a.value?(F(),H("div",Ng,[j[20]||(j[20]=c("div",{class:"section-title"},"数据摘要",-1)),c("div",Vg,[j[15]||(j[15]=c("span",{class:"muted"},"出勤",-1)),c("span",Bg,ne(a.value.attendDays)+" 天",1)]),c("div",Ug,[j[16]||(j[16]=c("span",{class:"muted"},"工时",-1)),c("span",qg,ne(a.value.totalHours)+" 小时",1)]),c("div",Hg,[j[17]||(j[17]=c("span",{class:"muted"},"补卡",-1)),c("span",Wg,ne(a.value.makeupCount)+" 次",1)]),c("div",zg,[j[18]||(j[18]=c("span",{class:"muted"},"请假",-1)),c("span",Gg,ne(a.value.leaveCount)+" 天",1)]),c("div",Yg,[j[19]||(j[19]=c("span",{class:"muted"},"记录",-1)),c("span",Jg,ne(a.value.itemCount)+" 条",1)]),j[21]||(j[21]=c("div",{class:"section-sub"},"分类分布",-1)),(F(!0),H(Le,null,ct(a.value.categoryStats,ce=>(F(),H("div",{key:ce.key,class:"sum-row"},[c("span",Xg,ne(ce.label),1),c("span",Qg,ne(ce.count)+" 条 · "+ne(ce.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ee("",!0):(F(),H("div",Zg,"(无)")),j[22]||(j[22]=c("div",{class:"section-sub"},"主要成果",-1)),(F(!0),H(Le,null,ct(a.value.milestones,(ce,ke)=>(F(),H("div",{key:"m"+ke,class:"sum-item"},[nn(ne(ce.content),1),c("span",eb,"("+ne(ce.date)+")",1)]))),128)),a.value.milestones.length?Ee("",!0):(F(),H("div",tb,"(无)")),j[23]||(j[23]=c("div",{class:"section-sub"},"待跟进",-1)),(F(!0),H(Le,null,ct(a.value.followups,(ce,ke)=>(F(),H("div",{key:"f"+ke,class:"sum-item"},[nn(ne(ce.content),1),c("span",nb,"("+ne(ce.date)+")",1)]))),128)),a.value.followups.length?Ee("",!0):(F(),H("div",rb,"(无)")),j[24]||(j[24]=c("div",{class:"section-sub"},"学习与成长",-1)),(F(!0),H(Le,null,ct(a.value.takeaways,(ce,ke)=>(F(),H("div",{key:"t"+ke,class:"sum-item"},[nn(ne(ce.text),1),c("span",sb,"("+ne(ce.date)+")",1)]))),128)),a.value.takeaways.length?Ee("",!0):(F(),H("div",ob,"(无)"))])):Ee("",!0)])])]))}}),ab=Gt(ib,[["__scopeId","data-v-43f9c59b"]]),lb=["aria-label"],ub={class:"dialog-head"},cb={class:"dialog-title"},db={class:"dialog-body"},fb={class:"form-grid"},pb={class:"field span2"},hb={class:"seg"},vb={class:"field"},mb={class:"field"},yb={class:"field"},gb=["value"],bb={key:0,class:"field"},wb={class:"seg"},_b={class:"field span2"},kb={key:0,class:"form-error"},xb={class:"dialog-btns"},Cb=Vt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N("expense"),a=N("餐饮"),u=N(""),f=N(""),h=N(""),y=N(!1),m=N(!1),k=N(""),x=N(null);function C(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var T;ae?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,u.value=n.initial.amountYuan,f.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",C),await ts(),(T=x.value)==null||T.focus()):window.removeEventListener("keydown",C)}),pr(()=>window.removeEventListener("keydown",C)),bt(o,ae=>{a.value=ae==="expense"?Wr[0]:Wo[0]});const M=at(()=>o.value==="expense"?Wr:Wo);function B(){return a.value&&M.value.includes(a.value)?a.value:M.value[0]}function re(){const ae=String(u.value??"").trim(),T=Number(ae);if(!ae||!isFinite(T)||T<=0){k.value="请填写大于 0 的金额";return}if(!f.value){k.value="请选择日期";return}const S=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:B(),amount:Math.round(T*100),date:f.value,note:String(h.value??"").trim(),reimbursable:S,reimbursed:S&&m.value?1:0})}return(ae,T)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:T[11]||(T[11]=Mr(S=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",ub,[c("span",cb,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=S=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",db,[c("div",fb,[c("div",pb,[T[12]||(T[12]=c("label",null,"类型",-1)),c("div",hb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:T[1]||(T[1]=S=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:T[2]||(T[2]=S=>o.value="income")},"收入",2)])]),c("div",vb,[T[13]||(T[13]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{ref_key:"amountInput",ref:x,class:tt(["input",{invalid:k.value}]),"onUpdate:modelValue":T[3]||(T[3]=S=>u.value=S),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,u.value]])]),c("div",mb,[T[14]||(T[14]=c("label",null,"日期(必填)",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":T[4]||(T[4]=S=>f.value=S)},null,512),[[Re,f.value]])]),c("div",yb,[T[15]||(T[15]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[5]||(T[5]=S=>a.value=S)},[(F(!0),H(Le,null,ct(M.value,S=>(F(),H("option",{key:S,value:S},ne(S),9,gb))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(F(),H("div",bb,[T[16]||(T[16]=c("label",null,"报销状态",-1)),c("div",wb,[c("button",{class:tt(["seg-btn",{active:!y.value}]),onClick:T[6]||(T[6]=S=>{y.value=!1,m.value=!1})},"无需报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&!m.value}]),onClick:T[7]||(T[7]=S=>{y.value=!0,m.value=!1})},"待报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&m.value}]),onClick:T[8]||(T[8]=S=>{y.value=!0,m.value=!0})},"已报销",2)])])):Ee("",!0),c("div",_b,[T[17]||(T[17]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":T[9]||(T[9]=S=>h.value=S),placeholder:"选填"},null,512),[[Re,h.value]])])]),k.value?(F(),H("div",kb,ne(k.value),1)):Ee("",!0)]),c("div",xb,[c("button",{class:"btn btn-sm",onClick:T[10]||(T[10]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存")])],8,lb)])):Ee("",!0)]),_:1})]))}}),Sb=Gt(Cb,[["__scopeId","data-v-edca3327"]]),Eb={class:"ledger-page"},$b={class:"ledger-toolbar"},Ab={class:"month-title num"},Tb={class:"cards"},Pb={class:"card stat-card"},Ob={class:"stat-num num amt-income"},Mb={class:"card stat-card"},Ib={class:"stat-num num"},jb={class:"card stat-card"},Db={class:"card stat-card"},Rb={class:"stat-num num amt-warn"},Lb={class:"card sec"},Kb={class:"form-grid"},Fb={class:"field span2"},Nb={class:"seg"},Vb={class:"field"},Bb={class:"field"},Ub={class:"field"},qb=["value"],Hb={key:0,class:"field"},Wb={class:"field span2"},zb={key:0,class:"form-error"},Gb={class:"form-footer"},Yb=["disabled"],Jb=["disabled"],Xb={key:0,class:"card sec"},Qb={class:"bar-label"},Zb={class:"bar-track"},ew={class:"muted num bar-num"},tw={key:1,class:"card section"},nw={class:"form-error"},rw={class:"card table-card"},sw={class:"tx-table"},ow={class:"num"},iw={class:"tag"},aw={class:"td-note"},lw={key:0,class:"muted"},uw={key:1,class:"tx-done"},cw={key:2,class:"tx-pending"},dw={class:"ops"},fw=["onClick"],pw=["onClick"],hw=["onClick"],vw={key:0},mw={class:"muted vault-note num"},yw=Vt({__name:"LedgerView",setup(e){const t=N(xt()),n=N([]),s=N(!0),o=N("expense"),a=N(""),u=N(Wr[0]),f=N(xt()),h=N(""),y=N(!1),m=N(""),k=N(""),x=N(!1),C=N(!1),M=N(null),B=N({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),re=N(null),ae=at(()=>t.value.slice(0,7)+"-01"),T=at(()=>{const X=Number(t.value.slice(0,4)),Z=Number(t.value.slice(5,7))-1,_e=new Date(X,Z+1,0).getDate();return t.value.slice(0,7)+"-"+(_e<10?"0"+_e:String(_e))}),S=at(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function J(){s.value=!0;try{n.value=await Gv(ae.value,T.value),k.value=""}catch(X){k.value="账目加载失败:"+(X instanceof Error?X.stack||X.message:String(X)),ze("账目加载失败")}s.value=!1}dn(J),bt(t,J),bt(o,X=>{u.value=X==="expense"?Wr[0]:Wo[0]});const de=at(()=>n.value.slice().sort((X,Z)=>X.date===Z.date?Z.id-X.id:X.date{let X=0,Z=0,_e=0;for(const Be of n.value)Be.type==="income"?X+=Be.amount:(Z+=Be.amount,Be.reimbursable===1&&Be.reimbursed!==1&&(_e+=Be.amount));return{income:X,expense:Z,pending:_e,balance:X-Z}}),ee=N("all"),P=N("all"),j=at(()=>de.value.filter(X=>!(ee.value!=="all"&&X.type!==ee.value||P.value==="pending"&&!(X.type==="expense"&&X.reimbursable===1&&X.reimbursed!==1)||P.value==="done"&&!(X.reimbursable===1&&X.reimbursed===1)))),ce=at(()=>{const X=new Map;let Z=0;for(const Be of n.value)Be.type==="expense"&&(X.set(Be.category,(X.get(Be.category)||0)+Be.amount),Z+=Be.amount);const _e=Z||1;return Array.from(X.entries()).map(Be=>({name:Be[0],amount:Be[1],percent:Math.round(Be[1]/_e*100)})).sort((Be,ft)=>ft.amount-Be.amount)});function ke(X){return(X/100).toFixed(2)}function Y(X){return(X.type==="income"?"+":"-")+ke(X.amount)}function xe(){t.value=zo(t.value,-1)}function Ve(){t.value=zo(t.value,1)}function rt(){t.value=xt()}bt(a,()=>{m.value&&(m.value="")});async function He(){const X=String(a.value??"").trim(),Z=Number(X);if(!X||!isFinite(Z)||Z<=0){m.value="请填写大于 0 的金额";return}if(!f.value){m.value="请选择日期";return}if(!x.value){x.value=!0;try{await Yv({type:o.value,category:u.value,amount:Math.round(Z*100),date:f.value,note:String(h.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(_e){ze("添加失败:"+(_e instanceof Error?_e.message:String(_e))),x.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await J(),ze("记账已添加"),x.value=!1}}const We=at(()=>String(a.value??"").trim()!==""||String(h.value??"").trim()!=="");function me(){a.value="",h.value="",y.value=!1,m.value=""}async function Me(X){await Qv(X.id),await J(),ze("已标记为已报销")}function Fe(X){M.value=X.id,B.value={type:X.type,category:X.category,amountYuan:ke(X.amount),date:X.date,note:X.note||"",reimbursable:X.reimbursable,reimbursed:X.reimbursed},C.value=!0}async function De(X){const Z=M.value;await Jv(Z,X),C.value=!1,await J(),ze("账目已更新")}async function Ce(){re.value&&re.value.id&&await Xv(re.value.id),re.value=null,await J(),ze("账目已删除")}return(X,Z)=>(F(),H("div",Eb,[c("div",$b,[c("button",{class:"icon-btn",onClick:xe},[Oe(ut,{name:"chevron-left",size:16})]),c("span",Ab,ne(S.value),1),c("button",{class:"icon-btn",onClick:Ve},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:rt},"回到本月"),Z[13]||(Z[13]=c("span",{class:"flex1"},null,-1)),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[0]||(Z[0]=_e=>ee.value=_e)},[...Z[11]||(Z[11]=[c("option",{value:"all"},"全部类型",-1),c("option",{value:"expense"},"仅支出",-1),c("option",{value:"income"},"仅收入",-1)])],512),[[Fn,ee.value]]),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[1]||(Z[1]=_e=>P.value=_e)},[...Z[12]||(Z[12]=[c("option",{value:"all"},"全部报销",-1),c("option",{value:"pending"},"待报销",-1),c("option",{value:"done"},"已报销",-1)])],512),[[Fn,P.value]])]),c("div",Tb,[c("div",Pb,[Z[14]||(Z[14]=c("div",{class:"muted"},"本月收入(元)",-1)),c("div",Ob,ne(ke(ie.value.income)),1)]),c("div",Mb,[Z[15]||(Z[15]=c("div",{class:"muted"},"本月支出(元)",-1)),c("div",Ib,ne(ke(ie.value.expense)),1)]),c("div",jb,[Z[16]||(Z[16]=c("div",{class:"muted"},"本月结余(元)",-1)),c("div",{class:tt(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},ne(ke(ie.value.balance)),3)]),c("div",Db,[Z[17]||(Z[17]=c("div",{class:"muted"},"待报销(元)",-1)),c("div",Rb,ne(ke(ie.value.pending)),1)])]),c("div",Lb,[Z[24]||(Z[24]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增一笔"),c("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),c("div",Kb,[c("div",Fb,[Z[18]||(Z[18]=c("label",null,"类型",-1)),c("div",Nb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:Z[2]||(Z[2]=_e=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:Z[3]||(Z[3]=_e=>o.value="income")},"收入",2)])]),c("div",Vb,[Z[19]||(Z[19]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{class:tt(["input",{invalid:m.value}]),"onUpdate:modelValue":Z[4]||(Z[4]=_e=>a.value=_e),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(He,["enter"])},null,34),[[Re,a.value]])]),c("div",Bb,[Z[20]||(Z[20]=c("label",null,"日期",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":Z[5]||(Z[5]=_e=>f.value=_e)},null,512),[[Re,f.value]])]),c("div",Ub,[Z[21]||(Z[21]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":Z[6]||(Z[6]=_e=>u.value=_e)},[(F(!0),H(Le,null,ct(o.value==="expense"?Qt(Wr):Qt(Wo),_e=>(F(),H("option",{key:_e,value:_e},ne(_e),9,qb))),128))],512),[[Fn,u.value]])]),o.value==="expense"?(F(),H("div",Hb,[Z[22]||(Z[22]=c("label",null,"报销",-1)),c("button",{class:tt(["toggle-btn",{on:y.value}]),onClick:Z[7]||(Z[7]=_e=>y.value=!y.value)},ne(y.value?"需要报销":"无需报销"),3)])):Ee("",!0),c("div",Wb,[Z[23]||(Z[23]=c("label",null,"备注",-1)),$e(c("input",{class:"input","onUpdate:modelValue":Z[8]||(Z[8]=_e=>h.value=_e),placeholder:"选填,如:客户现场午餐",onKeydown:jt(He,["enter"])},null,544),[[Re,h.value]])])]),m.value?(F(),H("div",zb,ne(m.value),1)):Ee("",!0),c("div",Gb,[c("button",{class:"btn btn-sm",disabled:!We.value,onClick:me},"重置",8,Yb),c("button",{class:"btn btn-primary btn-sm",disabled:x.value,onClick:He},"添加记录",8,Jb)])]),ce.value.length?(F(),H("div",Xb,[Z[25]||(Z[25]=c("div",{class:"sec-title"},"本月支出分类",-1)),(F(!0),H(Le,null,ct(ce.value,_e=>(F(),H("div",{key:_e.name,class:"bar-row"},[c("span",Qb,ne(_e.name),1),c("span",Zb,[c("span",{class:"bar-fill",style:or({width:_e.percent+"%"})},null,4)]),c("span",ew,ne(ke(_e.amount))+" 元 · "+ne(_e.percent)+"%",1)]))),128))])):Ee("",!0),k.value?(F(),H("div",tw,[c("div",nw,ne(k.value),1),Z[26]||(Z[26]=c("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Ee("",!0),c("div",rw,[c("table",sw,[Z[28]||(Z[28]=c("thead",null,[c("tr",null,[c("th",null,"日期"),c("th",null,"分类"),c("th",null,"金额(元)"),c("th",null,"备注"),c("th",null,"报销"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),H(Le,null,ct(j.value,_e=>(F(),H("tr",{key:_e.id},[c("td",ow,ne(_e.date),1),c("td",null,[c("span",iw,ne(_e.category),1)]),c("td",{class:tt(["num",_e.type==="income"?"amt-income":"amt-expense"])},ne(Y(_e)),3),c("td",aw,ne(_e.note||"--"),1),c("td",null,[_e.type!=="expense"||_e.reimbursable!==1?(F(),H("span",lw,"--")):_e.reimbursed===1?(F(),H("span",uw,"已报销")):(F(),H("span",cw,"待报销"))]),c("td",null,[c("div",dw,[_e.type==="expense"&&_e.reimbursable===1&&_e.reimbursed!==1?(F(),H("button",{key:0,class:"btn btn-xs",onClick:Be=>Me(_e)},"标记已报销",8,fw)):Ee("",!0),c("button",{class:"btn btn-xs",onClick:Be=>Fe(_e)},"编辑",8,pw),c("button",{class:"btn btn-xs",onClick:Be=>re.value=_e},"删除",8,hw)])])]))),128)),!j.value.length&&!s.value?(F(),H("tr",vw,[...Z[27]||(Z[27]=[c("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ee("",!0)])])]),c("div",mw,"筛选结果 "+ne(j.value.length)+" 条 / 本月共 "+ne(n.value.length)+" 条",1),Oe(Sb,{open:C.value,title:(M.value,"编辑账目"),initial:B.value,onCancel:Z[9]||(Z[9]=_e=>C.value=!1),onSave:De},null,8,["open","title","initial"]),Oe(cr,{open:!!re.value,title:"删除确认",message:re.value?"将删除 "+re.value.date+" 的账目("+re.value.category+" "+ke(re.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[10]||(Z[10]=_e=>re.value=null),onConfirm:Ce},null,8,["open","message"])]))}}),gw=Gt(yw,[["__scopeId","data-v-0f950d19"]]),bw={class:"memo-page"},ww={class:"card memo-list"},_w={class:"pane-head"},kw={class:"pane-title"},xw={class:"memo-scroll"},Cw=["onClick"],Sw={class:"memo-item-title"},Ew={class:"muted memo-item-sub"},$w={class:"muted num memo-item-time"},Aw={key:0,class:"muted empty"},Tw={class:"card memo-editor"},Pw={class:"editor-foot"},Ow={class:"muted foot-info"},Mw=["disabled"],Iw=["disabled"],jw={key:1,class:"empty muted editor-empty"},Dw=Vt({__name:"MemoView",setup(e){const t=N([]),n=N(null),s=N(!1),o=N(""),a=N(""),u=N(null),f=N(null);async function h(){if(t.value=await Bv(),n.value&&n.value.id){const ie=t.value.find(ee=>ee.id===n.value.id);ie&&(n.value=ie)}}dn(async()=>{await h(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y)),bt(Ia,async ie=>{if(!ie)return;t.value.length||await h();const ee=t.value.find(P=>P.id===ie);Ia.value=null,ee&&x(ee)},{immediate:!0});function y(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&m.value&&(ie.preventDefault(),re())}const m=at(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",ee=n.value?n.value.content:"";return o.value!==ie||a.value!==ee});function k(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function x(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(m.value){f.value={type:"select",memo:ie};return}k(ie)}}function C(){if(m.value){f.value={type:"new"};return}M()}function M(){n.value=null,s.value=!0,o.value="",a.value=""}function B(){n.value?k(n.value):M()}async function re(){if(!o.value.trim()&&!a.value.trim()){ze("标题与内容不能都为空");return}if(n.value&&n.value.id)await qv(n.value.id,o.value,a.value),ze("备忘已保存");else{const ie=await Uv(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,ze("备忘已创建")}await h()}function ae(){n.value&&n.value.id&&(u.value=n.value)}async function T(){u.value&&u.value.id&&(await Hv(u.value.id),ze("备忘已删除")),u.value=null,await h(),M()}function S(){const ie=f.value;f.value=null,ie&&(ie.type==="select"?k(ie.memo):M())}function J(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function de(ie){return ie.replace("T"," ").slice(0,16)}return(ie,ee)=>(F(),H("div",bw,[c("aside",ww,[c("div",_w,[c("span",kw,"备忘录("+ne(t.value.length)+")",1),c("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),c("div",xw,[(F(!0),H(Le,null,ct(t.value,P=>(F(),H("div",{key:P.id,class:tt(["memo-item",{active:s.value&&n.value&&n.value.id===P.id}]),onClick:j=>x(P)},[c("div",Sw,ne(P.title||"无标题"),1),c("div",Ew,ne(J(P)||"空"),1),c("div",$w,ne(de(P.updated_at)),1)],10,Cw))),128)),t.value.length?Ee("",!0):(F(),H("div",Aw,"暂无备忘"))])]),c("section",Tw,[s.value?(F(),H(Le,{key:0},[$e(c("input",{class:"input title-input","onUpdate:modelValue":ee[0]||(ee[0]=P=>o.value=P),placeholder:"标题"},null,512),[[Re,o.value]]),$e(c("textarea",{class:"textarea content-textarea","onUpdate:modelValue":ee[1]||(ee[1]=P=>a.value=P),placeholder:"内容"},null,512),[[Re,a.value]]),c("div",Pw,[c("span",Ow,[m.value?(F(),H(Le,{key:0},[nn("有未保存修改")],64)):n.value&&n.value.id?(F(),H(Le,{key:1},[nn("更新于 "+ne(de(n.value.updated_at)),1)],64)):(F(),H(Le,{key:2},[nn("新备忘")],64))]),ee[4]||(ee[4]=c("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(F(),H("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:!m.value,onClick:B},"放弃修改",8,Mw),c("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:re},"保存",8,Iw)])],64)):(F(),H("div",jw,"选择左侧备忘,或点击右上角新建"))]),Oe(cr,{open:!!u.value,title:"删除确认",message:u.value?"将删除备忘「"+(u.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[2]||(ee[2]=P=>u.value=null),onConfirm:T},null,8,["open","message"]),Oe(cr,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:ee[3]||(ee[3]=P=>f.value=null),onConfirm:S},null,8,["open"])]))}}),Rw=Gt(Dw,[["__scopeId","data-v-74d60dba"]]),Lw=["aria-label"],Kw={class:"dialog-head"},Fw={class:"dialog-title"},Nw={class:"dialog-body"},Vw={class:"form-grid"},Bw={class:"field span2"},Uw={class:"field span2"},qw={class:"field span2"},Hw={class:"pwd-row"},Ww={class:"field span2"},zw={key:0,class:"form-error"},Gw={class:"dialog-btns"},Yw=Vt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(""),u=N(""),f=N(""),h=N(""),y=N(null);function m(C){n.open&&C.key==="Escape"&&s("cancel")}bt(()=>n.open,async C=>{var M;C?(o.value=n.initial.system,a.value=n.initial.account,u.value=n.initial.password,f.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await ts(),(M=y.value)==null||M.focus()):window.removeEventListener("keydown",m)}),pr(()=>window.removeEventListener("keydown",m));function k(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",B=crypto.getRandomValues(new Uint8Array(14));let re="";for(let ae=0;ae(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Mr(B=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Kw,[c("span",Fw,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=B=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",Nw,[c("div",Vw,[c("div",Bw,[M[7]||(M[7]=c("label",null,"系统名称(必填)",-1)),$e(c("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":M[1]||(M[1]=B=>o.value=B),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),c("div",Uw,[M[8]||(M[8]=c("label",null,"账号(必填)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>a.value=B),placeholder:"用户名、工号或邮箱"},null,512),[[Re,a.value]])]),c("div",qw,[M[9]||(M[9]=c("label",null,"密码(必填)",-1)),c("div",Hw,[$e(c("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>u.value=B),placeholder:"输入或点击生成"},null,512),[[Re,u.value]]),c("button",{class:"btn btn-sm",onClick:k},"生成")])]),c("div",Ww,[M[10]||(M[10]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=B=>f.value=B),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),h.value?(F(),H("div",zw,ne(h.value),1)):Ee("",!0)]),c("div",Gw,[c("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=B=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:x},"保存")])],8,Lw)])):Ee("",!0)]),_:1})]))}}),Jw=Gt(Yw,[["__scopeId","data-v-f383b0a6"]]),wd=15e4;function Yo(e){const t=new Uint8Array(e);let n="";for(let s=0;s{n.value&&(ei(),n.value=!1,y.value=[],k.value={},ze("长时间未操作,密码库已自动锁定"))},F_)}function P(){n.value&&ee()}dn(async()=>{t.value=await kd(),window.addEventListener("click",P),window.addEventListener("keydown",P),n.value&&ee()}),pr(()=>{window.removeEventListener("click",P),window.removeEventListener("keydown",P),ie!==null&&window.clearTimeout(ie)});const j=at(()=>{const Ce=m.value.trim().toLowerCase();return Ce?y.value.filter(X=>(X.system+" "+X.account+" "+(X.remark||"")).toLowerCase().includes(Ce)):y.value});async function ce(){if(!s.value){if(u.value="",!o.value){u.value="请输入主密码";return}if(o.value.length<6){u.value="主密码至少 6 位";return}if(o.value!==a.value){u.value="两次输入的主密码不一致";return}s.value=!0;try{await Qw(o.value),o.value="",a.value="",n.value=!0,ee(),await de(),ze("主密码已设置,密码库已解锁")}catch(Ce){u.value=Ce instanceof Error?Ce.message:"设置失败"}s.value=!1}}async function ke(){if(!s.value){if(h.value="",!f.value){h.value="请输入主密码";return}s.value=!0;try{await Zw(f.value),f.value="",n.value=!0,ee(),await de()}catch(Ce){h.value=Ce instanceof Error?Ce.message:"解锁失败"}s.value=!1}}function Y(){ei(),n.value=!1,y.value=[],k.value={},ie!==null&&window.clearTimeout(ie),ze("密码库已锁定")}async function xe(Ce){const X=Ce.id;if(k.value[X]){k.value[X]=!1;return}try{Ce.passwordPlain=await pa(X),k.value[X]=!0}catch(Z){ze(Z instanceof Error?Z.message:"解密失败")}}async function Ve(Ce){try{const X=await pa(Ce.id);await ja(X),ze("密码已复制")}catch(X){ze(X instanceof Error?X.message:"复制失败")}}async function rt(Ce){await ja(Ce.account),ze("账号已复制")}function He(){C.value=null,M.value={system:"",account:"",password:"",remark:""},x.value=!0}async function We(Ce){try{const X=await pa(Ce.id);C.value=Ce.id,M.value={system:Ce.system,account:Ce.account,password:X,remark:Ce.remark||""},x.value=!0}catch(X){ze(X instanceof Error?X.message:"解密失败")}}async function me(Ce){const X=C.value??void 0;await r_(Ce,X),x.value=!1,await de(),ze(X?"账号已更新":"账号已添加")}async function Me(){B.value&&B.value.id&&(await s_(B.value.id),ze("账号已删除")),B.value=null,await de()}function Fe(){ae.value="",T.value="",S.value="",J.value="",re.value=!0}async function De(){J.value="";try{const Ce=await o_(ae.value,T.value);re.value=!1,ae.value="",T.value="",S.value="",ze("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){J.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,X)=>(F(),H("div",a_,[t.value===null?(F(),H("div",l_,"加载中")):n.value?(F(),H(Le,{key:2},[c("div",v_,[c("div",m_,[Oe(ut,{name:"search",size:14,class:"search-icon"}),$e(c("input",{class:"input","onUpdate:modelValue":X[3]||(X[3]=Z=>m.value=Z),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,m.value]])]),X[16]||(X[16]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",onClick:Fe},"修改主密码"),c("button",{class:"btn btn-sm",onClick:Y},"锁定"),c("button",{class:"btn btn-primary btn-sm",onClick:He},"新增账号")]),c("div",y_,[c("table",g_,[X[18]||(X[18]=c("thead",null,[c("tr",null,[c("th",null,"系统名称"),c("th",null,"账号"),c("th",null,"密码"),c("th",null,"备注"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),H(Le,null,ct(j.value,Z=>(F(),H("tr",{key:Z.id},[c("td",b_,ne(Z.system),1),c("td",null,[c("span",{class:"copyable",title:"点击复制账号",onClick:_e=>rt(Z)},ne(Z.account),9,w_)]),c("td",null,[c("div",__,[c("span",k_,ne(k.value[Z.id]?Z.passwordPlain:"........"),1),c("button",{class:"btn btn-xs",onClick:_e=>xe(Z)},ne(k.value[Z.id]?"隐藏":"显示"),9,x_),c("button",{class:"btn btn-xs",onClick:_e=>Ve(Z)},"复制",8,C_)])]),c("td",S_,ne(Z.remark||"--"),1),c("td",null,[c("div",E_,[c("button",{class:"btn btn-xs",onClick:_e=>We(Z)},"编辑",8,$_),c("button",{class:"btn btn-xs",onClick:_e=>B.value=Z},"删除",8,A_)])])]))),128)),j.value.length?Ee("",!0):(F(),H("tr",T_,[...X[17]||(X[17]=[c("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),c("div",P_,"共 "+ne(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(F(),H("div",u_,[c("div",c_,[Oe(ut,{name:"lock",size:26})]),t.value===!1?(F(),H(Le,{key:0},[X[12]||(X[12]=c("div",{class:"lock-title"},"设置主密码",-1)),X[13]||(X[13]=c("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[0]||(X[0]=Z=>o.value=Z),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(ce,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[1]||(X[1]=Z=>a.value=Z),placeholder:"再次输入主密码",onKeydown:jt(ce,["enter"])},null,544),[[Re,a.value]]),u.value?(F(),H("div",d_,ne(u.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ce},"完成设置并解锁",8,f_)],64)):(F(),H(Le,{key:1},[X[14]||(X[14]=c("div",{class:"lock-title"},"密码库已锁定",-1)),X[15]||(X[15]=c("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[2]||(X[2]=Z=>f.value=Z),placeholder:"主密码",onKeydown:jt(ke,["enter"])},null,544),[[Re,f.value]]),h.value?(F(),H("div",p_,ne(h.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ke},"解锁",8,h_)],64))])),Oe(Jw,{open:x.value,title:C.value?"编辑账号":"新增账号",initial:M.value,onCancel:X[4]||(X[4]=Z=>x.value=!1),onSave:me},null,8,["open","title","initial"]),Oe(cr,{open:!!B.value,title:"删除确认",message:B.value?"将删除系统「"+B.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:X[5]||(X[5]=Z=>B.value=null),onConfirm:Me},null,8,["open","message"]),(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[re.value?(F(),H("div",{key:0,class:"mask",onClick:X[11]||(X[11]=Mr(Z=>re.value=!1,["self"]))},[c("div",O_,[c("div",M_,[X[19]||(X[19]=c("span",{class:"dialog-title"},"修改主密码",-1)),c("button",{class:"icon-btn",title:"关闭",onClick:X[6]||(X[6]=Z=>re.value=!1)},[Oe(ut,{name:"close",size:16})])]),c("div",I_,[c("div",j_,[X[20]||(X[20]=c("label",null,"旧主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[7]||(X[7]=Z=>ae.value=Z)},null,512),[[Re,ae.value]])]),c("div",D_,[X[21]||(X[21]=c("label",null,"新主密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[8]||(X[8]=Z=>T.value=Z)},null,512),[[Re,T.value]])]),c("div",R_,[X[22]||(X[22]=c("label",null,"确认新主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[9]||(X[9]=Z=>S.value=Z)},null,512),[[Re,S.value]])]),J.value?(F(),H("div",L_,ne(J.value),1)):Ee("",!0),X[23]||(X[23]=c("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),c("div",K_,[c("button",{class:"btn btn-sm",onClick:X[10]||(X[10]=Z=>re.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):Ee("",!0)]),_:1})]))]))}}),V_=Gt(N_,[["__scopeId","data-v-6820bc9c"]]);function B_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Fu(e,t){const s="\uFEFF"+t.map(f=>f.map(B_).join(",")).join(`\r -`);if(Zr.isNativePlatform()){const{downloadText:f}=await md(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>Cg);return{downloadText:h}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),u=document.createElement("a");return u.href=a,u.download=e,u.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class U_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new U_,bi="intern_worklog",ul="dsh_session_user";function Gs(){try{const e=localStorage.getItem(ul);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function Cd(e){localStorage.setItem(ul,JSON.stringify(e))}function Sd(){localStorage.removeItem(ul)}const cl="dsh_cloud_creds";function Ed(e,t){localStorage.setItem(cl,JSON.stringify({username:e,password:t}))}function wi(){try{const e=localStorage.getItem(cl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function $d(){localStorage.removeItem(cl)}let ti=null;function Fs(e){ti===e&&Q||(Q&&rl(),tv(new dd(bi+"_"+e)),ti=e)}async function q_(e,t,n){const s=e.trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");if(await Or.user.where("username").equals(s).first())throw new Error("用户名已存在");const a=ll(),u=await Xo(t,a),f="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:f,username:s,pwd_hash:u,pwd_salt:a,created_at:new Date().toISOString()}),Fs(f);let h=0;n&&await Ad()&&(h=await Y_(),await Or.user.update(f,{legacy_imported_at:new Date().toISOString()}));const y={userId:f,username:s};return Cd(y),Ed(y.username,t),h&&J_(h),y}async function H_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Xo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");Fs(s.id);const a={userId:s.id,username:s.username};return Cd(a),Ed(a.username,t),a}async function W_(){ei(),rl(),ti=null,Sd(),$d()}async function z_(e,t){const n=Gs();if(!n)throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=await Or.user.get(n.userId);if(!s)throw new Error("用户不存在");if(await Xo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=ll(),u=await Xo(t,a);await Or.user.update(s.id,{pwd_hash:u,pwd_salt:a})}async function G_(){const e=Gs();if(!e)throw new Error("未登录");ei(),rl(),ti=null,await Ir.delete(bi+"_"+e.userId),await Or.user.delete(e.userId),Sd(),$d()}async function Ad(){return Ir.exists(bi)}async function Y_(){if(!Q)throw new Error("用户数据库未就绪");const e=new dd(bi),t=await Promise.all([e.project.toArray(),e.work_log.toArray(),e.log_item.toArray(),e.attendance.toArray(),e.weekly_note.toArray(),e.setting.toArray(),e.memo.toArray(),e.credential.toArray()]);await Q.transaction("rw",[Q.project,Q.work_log,Q.log_item,Q.attendance,Q.weekly_note,Q.setting,Q.memo,Q.credential],async()=>{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear()]),t[0].length&&await Q.project.bulkAdd(t[0]),t[1].length&&await Q.work_log.bulkAdd(t[1]),t[2].length&&await Q.log_item.bulkAdd(t[2]),t[3].length&&await Q.attendance.bulkAdd(t[3]),t[4].length&&await Q.weekly_note.bulkAdd(t[4]),t[5].length&&await Q.setting.bulkAdd(t[5]),t[6].length&&await Q.memo.bulkAdd(t[6]),t[7].length&&await Q.credential.bulkAdd(t[7])});const n=t[0].length+t[1].length+t[2].length+t[3].length+t[4].length+t[6].length+t[7].length;return e.close(),n}function J_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const Ns=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Da=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),X_={project:"name",work_log:"date",attendance:"date",weekly_note:"week_start",setting:"key"};function Q_(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Nu(e){return JSON.stringify(e)}async function Z_(e){return Q.table(e).toArray()}function Ra(e,t){return e==="setting"?t.key:t.id}async function e1(){for(const e of Ns){const t=Q.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Da.has(s.key))continue;const o={};s.uuid||(o.uuid=Q_()),s.updated_at||(o.updated_at=s.created_at||vt()),Object.keys(o).length&&await t.update(Ra(e,s),o)}}}async function t1(){return wi()!=null}async function n1(){return gt("sync_last_time","")}async function Td(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function r1(e,t){let n=await gt("sync_token","");return n||(n=await Td(e,t),await kt("sync_token",n),n)}let $s=!1,Io=!1,La=!1,Gr=null,wn=null,Ka="",Vu=!1,jo=null;async function Yr(){if($s){Io=!0;return}try{if(!await t1())return;await Md(await Pd())}catch{}}function s1(){if(Vu)return;Vu=!0,jo=ev(async()=>{const t={};for(const n of Ns)t[n]=await Q.table(n).count();return t}).subscribe({next:()=>{La||$s||(Gr&&globalThis.clearTimeout(Gr),Gr=globalThis.setTimeout(()=>{Yr()},3e3))},error:()=>{}})}function o1(){jo&&(jo.unsubscribe(),jo=null),wn&&(wn.close(),wn=null,Ka=""),Gr&&(globalThis.clearTimeout(Gr),Gr=null)}function i1(e,t){const n=e+"|"+t;if(!(wn&&Ka===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ka=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function dl(){return await gt("sync_base_url","")||a1}const a1="https://daywk.linyux.cn";async function Pd(){const e=wi();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await dl(),username:e.username,password:e.password}}async function Od(){const e=wi();if(!e)throw new Error("未登录");const t=await dl(),n={"Content-Type":"application/json"},s=JSON.stringify({username:e.username,password:e.password});let o=await fetch(t+"/api/auth/register",{method:"POST",headers:n,body:s});if(o.status===409){if(o=await fetch(t+"/api/auth/login",{method:"POST",headers:n,body:s}),!o.ok)throw new Error("云端已存在同名账号且密码不一致,请检查")}else if(!o.ok)throw new Error("云端绑定失败:"+o.status)}async function l1(){return Md(await Pd())}function Bu(e,t,n){const s={};for(const o of Object.keys(t))o!=="id"&&(s[o]=t[o]);if(e==="log_item"){delete s.work_log_id,delete s.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(s.wuuid=o.uuid);const a=t.project_id?n.project.get(t.project_id):null;a&&a.uuid&&(s.puuid=a.uuid)}return s}async function Uu(){const e=await Q.work_log.toArray(),t=await Q.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let Do=0;async function Md(e){if($s)return Io=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};$s=!0,La=!0,Do=0;try{const t=await u1(e);return Io&&(Io=!1,globalThis.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,La=!1}}async function u1(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await e1();const n=await Uu(),s=await Q.sync_mirror.toArray(),o=new Map;for(const S of s)o.set(S.table+"|"+S.uuid,S);const a={},u=[];let f=0;for(const S of Ns){let J=await Z_(S);S==="setting"&&(J=J.filter(ie=>!Da.has(ie.key)));const de=new Map;for(const ie of J)de.set(ie.uuid,ie);for(const[ie,ee]of de){const P=Bu(S,ee,n),j=Nu(P),ce=o.get(S+"|"+ie);(!ce||ce.hash!==j)&&(a[S]=a[S]||[],a[S].push(P),f++)}for(const[ie,ee]of o)ie.startsWith(S+"|")&&!de.has(ee.uuid)&&u.push({table:S,uuid:ee.uuid,deleted_at:vt()});a[S]=a[S]||[]}const h=await Q.tombstone.toArray();for(const S of h)u.push({table:S.table,uuid:S.uuid,deleted_at:S.deleted_at});const y=await r1(t,e),m=S=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+S},body:JSON.stringify({device:"client",tables:a,tombstones:u})});let k=await m(y);if(k.status===401){await kt("sync_token","");const S=await Td(t,e);await kt("sync_token",S),k=await m(S)}if(!k.ok)throw new Error("同步服务返回 "+k.status);const x=await k.json(),C=x.tables||{},M=x.tombstones||[],B=await d1(C,M),re=await Uu(),ae=[];for(const S of Ns){const J=await Q.table(S).toArray();for(const de of J)S==="setting"&&Da.has(de.key)||ae.push({table:S,uuid:de.uuid,hash:Nu(Bu(S,de,re))})}await Q.sync_mirror.clear(),ae.length&&await Q.sync_mirror.bulkAdd(ae.map(S=>({...S}))),i1(t,y);const T=vt();if(await kt("sync_last_time",T),(B.pulled>0||B.removed>0)&&nr(),h.length){const S=new Set(h.map(J=>J.id));await Q.tombstone.where("id").anyOf(Array.from(S)).delete()}return{pushed:f,pulled:B.pulled,removed:B.removed,errors:B.errors,at:T}}let ha=new Map,va=new Map,c1=0;async function d1(e,t){let n=0,s=0;for(const o of Ns){const a=Q.table(o),u=await a.toArray(),f=new Map;for(const x of u)f.set(x.uuid,x);const h=X_[o]||null,y=new Map;if(h)for(const x of u){const C=x[h];C!=null&&C!==""&&y.set(String(C),x)}const m=new Set(t.filter(x=>x.table===o).map(x=>x.uuid)),k=e[o]||[];for(const x of k)try{if(m.has(x.uuid))continue;const C=f.get(x.uuid);if(C){const M=String(C.updated_at||"");if(String(x.updated_at||"")>M){const re={...x};if(o==="setting"&&delete re.key,o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;re.work_log_id=ae,delete re.wuuid,re.project_id=x.puuid?va.get(x.puuid)??null:C.project_id??null,delete re.puuid}await a.update(C.id,re),n++}}else{const M=h&&x[h]!=null&&x[h]!==""?String(x[h]):null,B=M?y.get(M):void 0;if(B&&B.uuid!==x.uuid){const re=String(B.updated_at||"");if(String(x.updated_at||"")>=re){o==="work_log"&&await Q.log_item.where("work_log_id").equals(B.id).modify({work_log_id:-1}),await a.delete(Ra(o,B)),await Q.tombstone.add({table:o,uuid:B.uuid,deleted_at:vt()});const T=await a.add({...x});o==="work_log"&&await Q.log_item.where("work_log_id").equals(-1).modify({work_log_id:T}),f.set(x.uuid,{...x,id:T}),h&&M&&y.set(M,{...x,id:T}),n++}else await Q.tombstone.add({table:o,uuid:x.uuid,deleted_at:vt()}),c1++}else{if(o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;x.work_log_id=ae,delete x.wuuid,x.project_id=x.puuid?va.get(x.puuid)??null:null,delete x.puuid}const re=await a.add({...x});f.set(x.uuid,{...x,id:re}),h&&M&&y.set(M,{...x,id:re}),n++}}}catch(C){Do++,C instanceof Error?C.message:String(C)}for(const x of u)if(m.has(x.uuid))try{if(o==="work_log"){const M=(await a.toArray()).find(B=>B.date===x.date&&!m.has(B.uuid)&&B.uuid!==x.uuid);M&&x.id&&await Q.log_item.where("work_log_id").equals(x.id).modify({work_log_id:M.id})}await a.delete(Ra(o,x)),s++}catch{Do++}if(o==="work_log"){const x=await a.toArray();ha=new Map(x.map(C=>[C.uuid,C.id]))}if(o==="project"){const x=await a.toArray();va=new Map(x.map(C=>[C.uuid,C.id]))}}return{pulled:n,removed:s,errors:Do}}const f1={class:"settings"},p1={class:"card section"},h1={class:"muted acc-line"},v1={class:"ai-grid"},m1={class:"rule-item"},y1={class:"rule-item"},g1={class:"rule-item"},b1={key:0,class:"form-error"},w1={class:"rule-save"},_1={class:"card section"},k1={class:"rule-grid"},x1={class:"rule-item"},C1={class:"rule-item"},S1={class:"rule-item"},E1={class:"rule-item"},$1={class:"rule-item"},A1={class:"card section"},T1={class:"proj-add"},P1={key:0,class:"muted proj-tip"},O1=["onKeydown"],M1=["onClick"],I1=["onClick"],j1=["onClick"],D1={key:1,class:"muted"},R1={class:"card section"},L1={class:"card section"},K1={class:"muted acc-line"},F1={class:"rule-item"},N1={class:"rule-save"},V1=["disabled"],B1={key:0,class:"muted acc-line"},U1={key:1,class:"form-error"},q1={class:"card section"},H1={class:"ai-grid"},W1={class:"rule-item"},z1={class:"rule-item"},G1={class:"rule-item"},Y1={class:"card section"},J1={class:"backup-row"},X1={key:0,class:"import-error"},Q1=Vt({__name:"SettingsView",setup(e){var je;const t=N({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=N([]),s=N(""),o=N(""),a=N(""),u=N(""),f=N(""),h=N(""),y=N(null),m=N(""),k=N(null),x=N(null),C=N(""),M=N(((je=Gs())==null?void 0:je.username)||""),B=N(""),re=N(""),ae=N(""),T=N(""),S=N(!1),J="0.2.0",de=N(""),ie=N(""),ee=N(""),P=N(""),j=N(!1),ce=N("");async function ke(){var w;de.value=await dl(),ie.value=((w=wi())==null?void 0:w.username)||"",ce.value=await n1()}async function Y(){await kt("sync_base_url",de.value.trim()),ze("同步地址已保存")}async function xe(){P.value="";try{await Od(),ze("云端绑定已重建")}catch(w){P.value=w instanceof Error?w.message:"绑定失败"}}async function Ve(){if(!j.value){P.value="",j.value=!0;try{await Y();const w=await l1();ce.value=w.at,ee.value="推送 "+w.pushed+" 条 · 拉取 "+w.pulled+" 条 · 删除 "+w.removed+" 条",ze("同步完成")}catch(w){P.value=w instanceof Error?w.message:"同步失败"}j.value=!1}}async function rt(){if(T.value="",re.value!==ae.value){T.value="两次输入的新密码不一致";return}try{await z_(B.value,re.value),B.value="",re.value="",ae.value="",ze("登录密码已修改")}catch(w){T.value=w instanceof Error?w.message:"修改失败"}}async function He(){await G_(),window.location.reload()}async function We(){t.value=await jr(),n.value=await Ks(!0),a.value=(await ol()).join(` -`),u.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),h.value=await gt("ai_model",""),await ke()}async function me(){await kt("ai_base_url",u.value.trim()),await kt("ai_api_key",f.value.trim()),await kt("ai_model",h.value.trim()),ze("AI 配置已保存")}async function Me(){const w=xt(),g=await Promise.all([yi("2000-01-01",w),Ks(!0)]),O=g[0],le=g[1],se=new Map(le.map(oe=>[oe.id,oe.name])),ue=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const oe of O)ue.push([oe.date,sl(oe.category),oe.project_id&&se.get(oe.project_id)||"",oe.content,oe.minutes==null?"":oe.minutes,oe.is_milestone?"是":"",oe.needs_followup?"是":"",oe.takeaway||"",oe.remark||""]);const ye=await Fu("工作记录_"+w.replace(/-/g,"")+".csv",ue);ze(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}async function Fe(){const w=xt(),g=await Promise.all([jr(),mi("2000-01-01",w)]),O=g[0],le=g[1],se=["周日","周一","周二","周三","周四","周五","周六"],ue=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const oe of le){const be=Ws(oe,oe.date,O,oe.date===w);ue.push([oe.date,se[rs(oe.date).getDay()],be.label,oe.clock_in_at?Vn(oe.clock_in_at):"",oe.clock_out_at?Vn(oe.clock_out_at):"",oe.location||"",oe.kind==="makeup"?"补卡":oe.kind==="leave"?"休假":"正常",oe.note||""])}const ye=await Fu("考勤记录_"+w.replace(/-/g,"")+".csv",ue);ze(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}dn(We);async function De(){await kt("work_start",t.value.work_start),await kt("work_end",t.value.work_end),await kt("grace_minutes",String(t.value.grace_minutes)),await kt("lunch_minutes",String(t.value.lunch_minutes)),await kt("remind_weekly",t.value.remind_weekly),ze("打卡规则已保存")}async function Ce(){await pd(a.value.split(` -`)),ze("常用地点已保存")}async function X(){const w=s.value.trim();if(w){try{await $v(w),o.value="",s.value=""}catch{o.value="项目名已存在"}await We()}}function Z(w){y.value=w.id,m.value=w.name}async function _e(w){const g=m.value.trim();if(g)try{await Av(w.id,g),o.value=""}catch{o.value="项目名已存在"}y.value=null,await We()}async function Be(w){await Tv(w.id,w.archived!==1),await We()}async function ft(){try{const w=await Zv(),g=await al("实习日志备份_"+xt().replace(/-/g,"")+".json",w);ze(g?"备份已导出到:"+g:"备份已导出到系统下载目录")}catch(w){ze("导出失败:"+(w instanceof Error?w.message:String(w)))}}function Yt(w){const g=w.target,O=g.files&&g.files[0];if(C.value="",!O)return;const le=O.name;O.text().then(se=>{x.value={name:le,text:se}}),g.value=""}async function Jt(){if(x.value)try{await em(x.value.text),x.value=null,C.value="",await We(),ze("数据导入完成")}catch(w){x.value=null,C.value=w instanceof Error?w.message:"导入失败"}}return(w,g)=>(F(),H("div",f1,[c("div",p1,[g[23]||(g[23]=c("div",{class:"section-title"},"账号与隐私",-1)),c("div",h1,"版本 v"+ne(Qt(J))+" · 当前用户:"+ne(M.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),c("div",v1,[c("div",m1,[g[20]||(g[20]=c("label",null,"旧登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[0]||(g[0]=O=>B.value=O)},null,512),[[Re,B.value]])]),c("div",y1,[g[21]||(g[21]=c("label",null,"新登录密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[1]||(g[1]=O=>re.value=O)},null,512),[[Re,re.value]])]),c("div",g1,[g[22]||(g[22]=c("label",null,"确认新登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[2]||(g[2]=O=>ae.value=O)},null,512),[[Re,ae.value]])])]),T.value?(F(),H("div",b1,ne(T.value),1)):Ee("",!0),c("div",w1,[c("button",{class:"btn btn-primary btn-sm",onClick:rt},"修改登录密码"),c("button",{class:"btn btn-sm btn-danger",onClick:g[3]||(g[3]=O=>S.value=!0)},"删除此用户及全部数据")])]),c("div",_1,[g[30]||(g[30]=c("div",{class:"section-title"},"打卡规则",-1)),c("div",k1,[c("div",x1,[g[24]||(g[24]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":g[4]||(g[4]=O=>t.value.work_start=O)},null,512),[[Re,t.value.work_start]])]),c("div",C1,[g[25]||(g[25]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":g[5]||(g[5]=O=>t.value.work_end=O)},null,512),[[Re,t.value.work_end]])]),c("div",S1,[g[26]||(g[26]=c("label",null,"迟到宽限(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[6]||(g[6]=O=>t.value.grace_minutes=O)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),c("div",E1,[g[27]||(g[27]=c("label",null,"午休扣除(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[7]||(g[7]=O=>t.value.lunch_minutes=O)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),c("div",$1,[g[29]||(g[29]=c("label",null,"周记提醒",-1)),$e(c("select",{class:"select","onUpdate:modelValue":g[8]||(g[8]=O=>t.value.remind_weekly=O)},[...g[28]||(g[28]=[c("option",{value:"friday"},"每周五提醒",-1),c("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:De},"保存规则")])]),c("div",A1,[g[31]||(g[31]=c("div",{class:"section-title"},"项目管理",-1)),c("div",T1,[$e(c("input",{class:"input","onUpdate:modelValue":g[9]||(g[9]=O=>s.value=O),placeholder:"新项目名称",onKeydown:jt(X,["enter"])},null,544),[[Re,s.value]]),c("button",{class:"btn btn-sm",onClick:X},"添加")]),o.value?(F(),H("div",P1,ne(o.value),1)):Ee("",!0),(F(!0),H(Le,null,ct(n.value,O=>(F(),H("div",{key:O.id,class:"proj-row"},[y.value===O.id?(F(),H(Le,{key:0},[$e(c("input",{class:"input","onUpdate:modelValue":g[10]||(g[10]=le=>m.value=le),onKeydown:jt(le=>_e(O),["enter"])},null,40,O1),[[Re,m.value]]),c("button",{class:"btn btn-sm",onClick:le=>_e(O)},"保存",8,M1),c("button",{class:"btn btn-sm",onClick:g[11]||(g[11]=le=>y.value=null)},"取消")],64)):(F(),H(Le,{key:1},[c("span",{class:tt(["proj-name",{archived:O.archived===1}])},ne(O.name),3),c("button",{class:"icon-btn",title:"重命名",onClick:le=>Z(O)},[Oe(ut,{name:"edit",size:14})],8,I1),c("button",{class:"btn btn-sm",onClick:le=>Be(O)},ne(O.archived===1?"恢复":"归档"),9,j1)],64))]))),128)),n.value.length?Ee("",!0):(F(),H("div",D1,"暂无项目,先添加一个"))]),c("div",R1,[g[33]||(g[33]=c("div",{class:"section-title"},"常用地点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":g[12]||(g[12]=O=>a.value=O),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,a.value]]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:Ce},"保存地点"),g[32]||(g[32]=c("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),c("div",L1,[g[35]||(g[35]=c("div",{class:"section-title"},"多端数据同步",-1)),c("div",K1,"云端账号:"+ne(ie.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),c("div",F1,[g[34]||(g[34]=c("label",null,"同步服务地址(默认即可)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[13]||(g[13]=O=>de.value=O),placeholder:"https://daywk.linyux.cn"},null,512),[[Re,de.value]])]),c("div",N1,[c("button",{class:"btn btn-sm",onClick:Y},"保存地址"),c("button",{class:"btn btn-primary btn-sm",disabled:j.value,onClick:Ve},ne(j.value?"同步中":"立即同步"),9,V1),c("button",{class:"btn btn-sm",onClick:xe},"重建云端绑定")]),ee.value?(F(),H("div",B1,"上次同步:"+ne(ce.value||"--")+" · "+ne(ee.value),1)):Ee("",!0),P.value?(F(),H("div",U1,ne(P.value),1)):Ee("",!0)]),c("div",q1,[g[40]||(g[40]=c("div",{class:"section-title"},"AI 润色配置(可选)",-1)),c("div",H1,[c("div",W1,[g[36]||(g[36]=c("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[14]||(g[14]=O=>u.value=O),placeholder:"https://api.example.com/v1"},null,512),[[Re,u.value]])]),c("div",z1,[g[37]||(g[37]=c("label",null,"API Key",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[15]||(g[15]=O=>f.value=O),placeholder:"sk-..."},null,512),[[Re,f.value]])]),c("div",G1,[g[38]||(g[38]=c("label",null,"模型名称",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[16]||(g[16]=O=>h.value=O),placeholder:"如:deepseek-chat"},null,512),[[Re,h.value]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:me},"保存 AI 配置"),g[39]||(g[39]=c("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),c("div",Y1,[g[41]||(g[41]=c("div",{class:"section-title"},"数据备份",-1)),c("div",J1,[c("button",{class:"btn btn-sm",onClick:ft},"导出 JSON 备份"),c("button",{class:"btn btn-sm",onClick:g[17]||(g[17]=O=>{var le;return(le=k.value)==null?void 0:le.click()})},"导入 JSON 备份"),c("button",{class:"btn btn-sm",onClick:Me},"导出工作记录 CSV"),c("button",{class:"btn btn-sm",onClick:Fe},"导出考勤 CSV"),c("input",{ref_key:"fileInput",ref:k,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Yt},null,544)]),C.value?(F(),H("div",X1,ne(C.value),1)):Ee("",!0),g[42]||(g[42]=c("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Oe(cr,{open:!!x.value,title:"导入确认",message:x.value?"将从文件「"+x.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:g[18]||(g[18]=O=>x.value=null),onConfirm:Jt},null,8,["open","message"]),Oe(cr,{open:S.value,title:"删除用户确认",message:"将永久删除用户「"+M.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:g[19]||(g[19]=O=>S.value=!1),onConfirm:He},null,8,["open","message"])]))}}),Z1=Gt(Q1,[["__scopeId","data-v-81598f02"]]),e0={class:"login-page"},t0={class:"card login-card"},n0={class:"login-brand"},r0={class:"brand-icon"},s0={class:"seg"},o0=["placeholder"],i0={key:1,class:"mig-row"},a0={key:2,class:"form-error"},l0=["disabled"],u0=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=N("login"),o=N(""),a=N(""),u=N(""),f=N(!0),h=N(!1),y=N(""),m=N(!1);dn(async()=>{h.value=await Ad()});function k(C){s.value=C,y.value="",u.value=""}async function x(){if(!m.value){y.value="",m.value=!0;try{let C;if(s.value==="login")C=await H_(o.value,a.value);else{if(a.value.length<6){y.value="登录密码至少 6 位",m.value=!1;return}if(a.value!==u.value){y.value="两次输入的密码不一致",m.value=!1;return}C=await q_(o.value,a.value,f.value)}n("login",C)}catch(C){y.value=C instanceof Error?C.message:"操作失败"}m.value=!1}}return(C,M)=>(F(),H("div",e0,[c("div",t0,[c("div",n0,[c("div",r0,[Oe(ut,{name:"calendar",size:22})]),M[6]||(M[6]=c("div",{class:"login-title"},"实习工作日志",-1)),M[7]||(M[7]=c("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),M[8]||(M[8]=c("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),c("div",s0,[c("button",{class:tt(["seg-btn",{active:s.value==="login"}]),onClick:M[0]||(M[0]=B=>k("login"))},"登录",2),c("button",{class:tt(["seg-btn",{active:s.value==="create"}]),onClick:M[1]||(M[1]=B=>k("create"))},"创建用户",2)]),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>o.value=B),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(x,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>a.value=B),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(x,["enter"])},null,40,o0),[[Re,a.value]]),s.value==="create"?$e((F(),H("input",{key:0,type:"password",class:"input","onUpdate:modelValue":M[4]||(M[4]=B=>u.value=B),placeholder:"再次输入密码",onKeydown:jt(x,["enter"])},null,544)),[[Re,u.value]]):Ee("",!0),s.value==="create"&&h.value?(F(),H("label",i0,[$e(c("input",{type:"checkbox","onUpdate:modelValue":M[5]||(M[5]=B=>f.value=B)},null,512),[[Dh,f.value]]),M[9]||(M[9]=c("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):Ee("",!0),y.value?(F(),H("div",a0,ne(y.value),1)):Ee("",!0),c("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:x},ne(s.value==="login"?"登录":"创建并进入"),9,l0),M[10]||(M[10]=c("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),c0=Gt(u0,[["__scopeId","data-v-d3d6c8cb"]]),d0={key:1,class:"app"},f0={class:"side"},p0=["data-tip","onClick"],h0={class:"main"},v0={class:"topbar"},m0={class:"title"},y0={class:"gsearch"},g0={key:0,class:"gs-panel"},b0={key:0,class:"gs-group muted"},w0=["onMousedown"],_0={class:"tag"},k0={class:"gs-text"},x0={class:"muted num gs-date"},C0={key:1,class:"gs-group muted"},S0=["onMousedown"],E0={class:"gs-text"},$0={class:"muted gs-sub"},A0={key:1,class:"gs-empty muted"},T0={class:"topbar-actions"},P0={class:"user-chip num"},O0=["disabled"],M0={class:"num"},I0={class:"content"},j0={class:"content-inner"},D0={class:"toast-wrap"},R0=Vt({__name:"App",setup(e){const t=nm(),n=N(Gs());async function s(me){n.value=me,Fs(me.userId),location.hash="#/calendar",de.value="calendar",await ke(),await We(),u();try{await Od(),await Yr()}catch{}showToast("欢迎,"+me.username);const Me=sessionStorage.getItem("dsh_migrate_toast");Me&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Me+" 条"))}async function o(){o1(),a!==null&&(window.clearInterval(a),a=null),await W_(),n.value=null,de.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function u(){s1(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const f=N(null),h=N(""),y=N(!1),m=N({logs:[],memos:[]});let k=null;const x=at(()=>!!(m.value.logs.length||m.value.memos.length));function C(){k&&window.clearTimeout(k);const me=h.value;k=window.setTimeout(async()=>{const Me=me.trim();if(!Me){m.value={logs:[],memos:[]};return}const Fe=await Promise.all([Wv(Me,8),zv(Me,4)]);m.value={logs:Fe[0],memos:Fe[1]}},200)}function M(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function B(me){Ma.value=me.date,ie("calendar"),M()}function re(me){Ia.value=me.id,ie("memo"),M()}function ae(){window.setTimeout(()=>{y.value=!1},150)}function T(me){var Me;(me.ctrlKey||me.metaKey)&&me.key.toLowerCase()==="k"&&(me.preventDefault(),(Me=f.value)==null||Me.focus())}const S=[{key:"calendar",name:"日历",icon:"calendar"},{key:"today",name:"详情",icon:"edit"},{key:"stats",name:"统计",icon:"chart"},{key:"report",name:"总结",icon:"export"},{key:"ledger",name:"记账",icon:"wallet"},{key:"memo",name:"备忘录",icon:"memo"},{key:"vault",name:"密码库",icon:"lock"},{key:"settings",name:"设置",icon:"settings"}];function J(){const me=(location.hash||"").replace("#/","");return S.some(Me=>Me.key===me)?me:"calendar"}const de=N(J());window.addEventListener("hashchange",()=>{de.value=J()});function ie(me){location.hash="#/"+me}const ee=at(()=>S.find(me=>me.key===de.value)||S[0]),P=N(xt()),j=N(void 0),ce=N(!1);async function ke(){if(j.value=await mn(P.value),ce.value=!1,new Date().getHours()<4){const Me=await mn(Kn(P.value,-1));ce.value=!!(Me&&Me.clock_in_at&&!Me.clock_out_at)}}const Y=at(()=>{const me=j.value;return me&&me.clock_in_at&&!me.clock_out_at?!0:ce.value&&!(me&&me.clock_in_at)}),xe=at(()=>{const me=j.value;return!!(me&&me.clock_in_at&&me.clock_out_at)}),Ve=at(()=>{const me=j.value;return Y.value?"下班打卡":xe.value?"已打卡 "+Vn(me==null?void 0:me.clock_in_at)+" - "+Vn(me==null?void 0:me.clock_out_at):"上班打卡"});async function rt(){if(Y.value)try{await Ov()}catch{}else await hd(P.value);await ke(),nr()}bt(zs,()=>{n.value&&ke()});const He=N(!1);async function We(){if((await jr()).remind_weekly==="off"){He.value=!1;return}const Me=new Date().getDay();if(Me===5||Me===6||Me===0){const Fe=await il(Es(P.value));He.value=!Fe||!Fe.highlights&&!Fe.challenges&&!Fe.plan_next}else He.value=!1}return dn(async()=>{window.addEventListener("keydown",T),n.value&&(Fs(n.value.userId),await ke(),await We(),u())}),(me,Me)=>{var Fe;return n.value?(F(),H("div",d0,[c("nav",f0,[(F(),H(Le,null,ct(S,De=>c("button",{key:De.key,class:tt(["nav-btn",{active:de.value===De.key}]),"data-tip":De.name,onClick:Ce=>ie(De.key)},[Oe(ut,{name:De.icon,size:18},null,8,["name"])],10,p0)),64))]),c("div",h0,[c("header",v0,[c("span",m0,ne(ee.value.name),1),c("div",y0,[Oe(ut,{name:"search",size:14,class:"gs-icon"}),$e(c("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":Me[0]||(Me[0]=De=>h.value=De),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:C,onFocus:Me[1]||(Me[1]=De=>y.value=!0),onBlur:ae,onKeydown:jt(M,["esc"])},null,544),[[Re,h.value]]),y.value&&h.value.trim()?(F(),H("div",g0,[x.value?(F(),H(Le,{key:0},[m.value.logs.length?(F(),H("div",b0,"工作记录")):Ee("",!0),(F(!0),H(Le,null,ct(m.value.logs,De=>(F(),H("div",{key:"l"+De.id,class:"gs-item",onMousedown:Mr(Ce=>B(De),["prevent"])},[c("span",_0,ne(Qt(sl)(De.category)),1),c("span",k0,ne(De.content),1),c("span",x0,ne(De.date),1)],40,w0))),128)),m.value.memos.length?(F(),H("div",C0,"备忘录")):Ee("",!0),(F(!0),H(Le,null,ct(m.value.memos,De=>(F(),H("div",{key:"m"+De.id,class:"gs-item",onMousedown:Mr(Ce=>re(De),["prevent"])},[c("span",E0,ne(De.title||"无标题"),1),c("span",$0,ne(De.content),1)],40,S0))),128))],64)):(F(),H("div",A0,"无匹配结果"))])):Ee("",!0)]),Me[4]||(Me[4]=c("span",{class:"flex1"},null,-1)),c("div",T0,[He.value?(F(),H("button",{key:0,class:"week-tip",onClick:Me[2]||(Me[2]=De=>ie("report"))},[...Me[3]||(Me[3]=[c("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),nn(" 填写本周周记 ",-1)])])):Ee("",!0),c("span",P0,ne((Fe=n.value)==null?void 0:Fe.username),1),c("button",{class:"btn btn-sm",onClick:o},"退出"),c("button",{class:"btn btn-primary btn-sm",disabled:xe.value,onClick:rt},[Oe(ut,{name:xe.value?"check-circle":"clock",size:14},null,8,["name"]),c("span",M0,ne(Ve.value),1)],8,O0)])]),c("main",I0,[c("div",j0,[de.value==="calendar"?(F(),It(Sy,{key:0})):de.value==="today"?(F(),It(Oy,{key:1})):de.value==="stats"?(F(),It(lg,{key:2})):de.value==="report"?(F(),It(ab,{key:3})):de.value==="ledger"?(F(),It(gw,{key:4})):de.value==="memo"?(F(),It(Rw,{key:5})):de.value==="vault"?(F(),It(V_,{key:6})):(F(),It(Z1,{key:7}))])])]),c("div",D0,[Oe(Eh,{name:"toast"},{default:fr(()=>[(F(!0),H(Le,null,ct(Qt(t),De=>(F(),H("div",{key:De.id,class:"toast"},ne(De.text),1))),128))]),_:1})])])):(F(),It(c0,{key:0,onLogin:s}))}}}),L0=Gt(R0,[["__scopeId","data-v-0d619789"]]);function fl(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",o=>{o.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const s=document.createElement("div");s.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",s.textContent=e+` -`+t,n.appendChild(s)}catch{}}const qu=Gs();qu&&Fs(qu.userId);const Id=Bh(L0);Id.config.errorHandler=(e,t,n)=>{const s=e;fl("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",s&&(s.stack||s.message)||String(e)+` -触发位置: `+n)};window.addEventListener("unhandledrejection",e=>{const t=e.reason;fl("未处理的异步错误(点击空白处关闭)",t&&(t.stack||t.message)||String(e.reason))});window.addEventListener("error",e=>{e.message&&e.message!=="ResizeObserver loop limit exceeded"&&fl("运行错误(点击空白处关闭)",e.message)});Id.mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{bd as W,md as _,kg as b,gd as r}; diff --git a/intern-log/dist/assets/web-B9VoRh8-.js b/intern-log/dist/assets/web-B_APDX-X.js similarity index 98% rename from intern-log/dist/assets/web-B9VoRh8-.js rename to intern-log/dist/assets/web-B_APDX-X.js index 86f03a1..b4925a6 100644 --- a/intern-log/dist/assets/web-B9VoRh8-.js +++ b/intern-log/dist/assets/web-B_APDX-X.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-WHahwity.js";import{Encoding as E}from"./index-BzA9f9V8.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-BGM1Hwum.js";import{Encoding as E}from"./index-CA4kYWMg.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 01e87ea..a82f3fe 100644 --- a/intern-log/dist/index.html +++ b/intern-log/dist/index.html @@ -8,8 +8,8 @@ 实习工作日志 - - + +
diff --git a/intern-log/src/sync/engine.ts b/intern-log/src/sync/engine.ts index 7608d64..de2308f 100644 --- a/intern-log/src/sync/engine.ts +++ b/intern-log/src/sync/engine.ts @@ -1,5 +1,6 @@ // 多端同步引擎:全量差异对比 + 记录级新者胜 + 自然键去重 + 外键重映射 + 软删除墓碑 // 实时性:本地变更 3 秒内推送;服务端变更通过 SSE 秒级通知其他端;60 秒轮询兜底 +import { ref } from 'vue' import Dexie, { liveQuery } from 'dexie' import { db } from '../db/schema' import { getSetting, setSetting } from '../db/repo' @@ -7,6 +8,9 @@ import { getCloudCreds } from '../db/auth' import { nowLocalISO } from '../lib/date' import { notifyAttendanceChanged } from '../lib/bus' +// 最近一次自动同步的错误(设置页展示用) +export const syncLastError = ref('') + const TABLES = ['project', 'work_log', 'log_item', 'attendance', 'weekly_note', 'setting', 'memo', 'credential', 'transaction'] // 本地敏感或临时性的设置不参与同步 @@ -150,7 +154,10 @@ export async function autoSyncNow(): Promise { try { if (!(await isSyncConfigured())) return await runSync(await loadSyncConfig()) - } catch { /* 自动同步静默失败,等待下次触发 */ } + syncLastError.value = '' + } catch (e) { + syncLastError.value = e instanceof Error ? e.message : String(e) + } } // 实时触发:本地任何数据变更 3 秒后自动推送(Dexie 4 核心 liveQuery,跨全部业务表) diff --git a/intern-log/src/views/SettingsView.vue b/intern-log/src/views/SettingsView.vue index 26c668c..ba9b427 100644 --- a/intern-log/src/views/SettingsView.vue +++ b/intern-log/src/views/SettingsView.vue @@ -13,7 +13,7 @@ import { downloadCsv } from '../lib/csv' import { hhmm, parseDateStr, todayStr } from '../lib/date' import { computeDay } from '../domain/attendance' import { changeLoginPassword, deleteCurrentUser, getSession } from '../db/auth' -import { ensureCloudBinding, getSyncBase, getSyncLastTime, syncWithStoredConfig, type SyncResult } from '../sync/engine' +import { ensureCloudBinding, getSyncBase, getSyncLastTime, syncWithStoredConfig, syncLastError, enableRealtimeSync, stopRealtime, type SyncResult } from '../sync/engine' import { getCloudCreds } from '../db/auth' import { showToast } from '../lib/toast' @@ -41,6 +41,7 @@ const syncBase = ref('') const cloudUser = ref('') const syncStatus = ref('') const syncError = ref('') +const autoSyncErr = ref('') const syncing = ref(false) const lastSync = ref('') @@ -48,8 +49,12 @@ async function loadSyncInfo() { syncBase.value = await getSyncBase() cloudUser.value = getCloudCreds()?.username || '' lastSync.value = await getSyncLastTime() + loadError.value = syncLastError.value + const conf = await isSyncConfigured() + autoOn.value = conf } + async function saveSyncConfig() { await setSetting('sync_base_url', syncBase.value.trim()) showToast('同步地址已保存') @@ -68,12 +73,14 @@ async function rebindCloud() { async function doSyncNow() { if (syncing.value) return syncError.value = '' + autoSyncErr.value = syncLastError.value syncing.value = true try { await saveSyncConfig() const result: SyncResult = await syncWithStoredConfig() lastSync.value = result.at syncStatus.value = '推送 ' + result.pushed + ' 条 · 拉取 ' + result.pulled + ' 条 · 删除 ' + result.removed + ' 条' + autoSyncErr.value = '' showToast('同步完成') } catch (e) { syncError.value = e instanceof Error ? e.message : '同步失败' @@ -357,6 +364,8 @@ async function doImport() {
上次同步:{{ lastSync || '--' }} · {{ syncStatus }}
{{ syncError }}
+
最近自动同步失败:{{ autoSyncErr }}
+
最近自动同步失败:{{ autoSyncErr }}(可点「立即同步」重试)