diff --git a/assets/404-BvsG34tD.js b/assets/404-D89xq0CT.js similarity index 94% rename from assets/404-BvsG34tD.js rename to assets/404-D89xq0CT.js index 94ab588..f18b9fe 100644 --- a/assets/404-BvsG34tD.js +++ b/assets/404-D89xq0CT.js @@ -1 +1 @@ -import{B as C,C as c,e as a,D as s}from"./index-CzpSlHRw.js";import{V as L,a as r}from"./VRow-sd4d6eNi.js";import{V as f}from"./VContainer-BIFGURze.js";import{X as n,Y as d,Z as e,j as t,k as i}from"./vendor-vue-28M5UGz3.js";import"./vendor-vuetify-95axeNJO.js";const h="data:image/svg+xml,%3csvg%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-74_1)'%3e%3cpath%20fill='%23FFFFFF'%20d='M0%20256L256%20256L256%200L0%200L0%20256Z'%3e%3c/path%3e%3crect%20x='0'%20y='0'%20width='256'%20height='128'%20fill='%23D8C4A0'%3e%3c/rect%3e%3crect%20x='0'%20y='128'%20width='256'%20height='128'%20fill='%23F5E0BB'%3e%3c/rect%3e%3cpath%20d='M28%20228L128%20128L228%20128L128%20228L28%20228Z'%20fill-rule='evenodd'%20fill='%23241A04'%3e%3c/path%3e%3cpath%20d='M28%20128L128%2028L228%2028L128%20128L28%20128Z'%20fill-rule='evenodd'%20fill='%2352452A'%3e%3c/path%3e%3cg%3e%3cpath%20fill='%23000000'%20d='M-3049.01%202467.94L-3043.48%202467.94L-3043.48%202466.99L-3045.92%202466.99C-3046.36%202466.99%20-3046.9%202467.04%20-3047.36%202467.08C-3045.29%202465.12%20-3043.9%202463.33%20-3043.9%202461.57C-3043.9%202460.01%20-3044.9%202458.99%20-3046.47%202458.99C-3047.58%202458.99%20-3048.35%202459.49%20-3049.06%202460.27L-3048.43%202460.9C-3047.93%202460.31%20-3047.32%202459.88%20-3046.6%202459.88C-3045.51%202459.88%20-3044.98%202460.61%20-3044.98%202461.62C-3044.98%202463.13%20-3046.25%202464.88%20-3049.01%202467.29L-3049.01%202467.94ZM-3039.27%202468.1C-3037.9%202468.1%20-3036.74%202466.95%20-3036.74%202465.24C-3036.74%202463.39%20-3037.7%202462.48%20-3039.19%202462.48C-3039.87%202462.48%20-3040.64%202462.88%20-3041.18%202463.54C-3041.13%202460.81%20-3040.13%202459.89%20-3038.91%202459.89C-3038.38%202459.89%20-3037.85%202460.15%20-3037.52%202460.56L-3036.89%202459.89C-3037.39%202459.36%20-3038.04%202458.99%20-3038.96%202458.99C-3040.66%202458.99%20-3042.21%202460.3%20-3042.21%202463.74C-3042.21%202466.65%20-3040.95%202468.1%20-3039.27%202468.1ZM-3041.15%202464.41C-3040.58%202463.6%20-3039.91%202463.3%20-3039.36%202463.3C-3038.3%202463.3%20-3037.78%202464.05%20-3037.78%202465.24C-3037.78%202466.44%20-3038.43%202467.23%20-3039.27%202467.23C-3040.37%202467.23%20-3041.03%202466.24%20-3041.15%202464.41ZM-3035.17%202467.94L-3030.34%202467.94L-3030.34%202467.03L-3032.1%202467.03L-3032.1%202459.15L-3032.95%202459.15C-3033.43%202459.42%20-3033.99%202459.62%20-3034.77%202459.77L-3034.77%202460.47L-3033.2%202460.47L-3033.2%202467.03L-3035.17%202467.03L-3035.17%202467.94ZM-3029.51%202467.94L-3028.4%202467.94L-3027.54%202465.25L-3024.33%202465.25L-3023.49%202467.94L-3022.31%202467.94L-3025.3%202459.15L-3026.54%202459.15L-3029.51%202467.94ZM-3027.27%202464.38L-3026.84%202463.02C-3026.52%202462.02%20-3026.24%202461.08%20-3025.96%202460.04L-3025.91%202460.04C-3025.62%202461.06%20-3025.35%202462.02%20-3025.02%202463.02L-3024.6%202464.38L-3027.27%202464.38ZM-3018.93%202468.1C-3017.26%202468.1%20-3016.19%202466.58%20-3016.19%202463.51C-3016.19%202460.47%20-3017.26%202458.99%20-3018.93%202458.99C-3020.61%202458.99%20-3021.67%202460.47%20-3021.67%202463.51C-3021.67%202466.58%20-3020.61%202468.1%20-3018.93%202468.1ZM-3018.93%202467.21C-3019.93%202467.21%20-3020.61%202466.09%20-3020.61%202463.51C-3020.61%202460.95%20-3019.93%202459.85%20-3018.93%202459.85C-3017.93%202459.85%20-3017.25%202460.95%20-3017.25%202463.51C-3017.25%202466.09%20-3017.93%202467.21%20-3018.93%202467.21ZM-3012.27%202468.1C-3010.6%202468.1%20-3009.53%202466.58%20-3009.53%202463.51C-3009.53%202460.47%20-3010.6%202458.99%20-3012.27%202458.99C-3013.95%202458.99%20-3015.01%202460.47%20-3015.01%202463.51C-3015.01%202466.58%20-3013.95%202468.1%20-3012.27%202468.1ZM-3012.27%202467.21C-3013.27%202467.21%20-3013.95%202466.09%20-3013.95%202463.51C-3013.95%202460.95%20-3013.27%202459.85%20-3012.27%202459.85C-3011.27%202459.85%20-3010.59%202460.95%20-3010.59%202463.51C-3010.59%202466.09%20-3011.27%202467.21%20-3012.27%202467.21Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-74_1'%3e%3cpath%20d='M0%20256L256%20256L256%200L0%200L0%20256Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",m={__name:"404",setup(p){return(o,l)=>(n(),d(f,{class:"fill-height"},{default:e(()=>[t(C,{class:"align-centerfill-height mx-auto","max-width":"900"},{default:e(()=>[t(c,{class:"mb-4",height:"150",src:h}),l[3]||(l[3]=i("div",{class:"text-center"},[i("div",{class:"text-body-2 font-weight-light mb-n1"}," 出现了错误 "),i("h1",{class:"text-h2 font-weight-bold"}," 404 ")],-1)),l[4]||(l[4]=i("div",{class:"py-4"},null,-1)),t(L,null,{default:e(()=>[t(r,{cols:"12"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-help",rounded:"lg",variant:"outlined"},{image:e(()=>[t(c,{position:"top right"})]),title:e(()=>[...l[1]||(l[1]=[i("h2",{class:"text-h5 font-weight-bold"}," 为什么会出现此错误? ",-1)])]),subtitle:e(()=>[...l[2]||(l[2]=[i("div",{class:"text-subtitle-1"}," 大概是页面未找到 ",-1)])]),default:e(()=>[t(s,{contained:"","model-value":"",opacity:".12",persistent:"",scrim:"primary"})]),_:1})]),_:1}),t(r,{cols:"6"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-home",rounded:"lg",title:"返回首页",to:"/",variant:"text"},{default:e(()=>[t(s,{contained:"","model-value":"",opacity:".06",persistent:"",scrim:"primary"})]),_:1})]),_:1}),t(r,{cols:"6"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-arrow-left-drop-circle",rounded:"lg",title:"返回上一页",variant:"text",onClick:l[0]||(l[0]=u=>o.$router.back())},{default:e(()=>[t(s,{contained:"","model-value":"",opacity:".06",persistent:"",scrim:"primary"})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}},Z={__name:"404",setup(p){return(o,l)=>(n(),d(m))}};export{Z as default}; +import{B as C,C as c,e as a,D as s}from"./index-DGIAsv4W.js";import{V as L,a as r}from"./VRow-Cjhiymuu.js";import{V as f}from"./VContainer-DZyPrcqa.js";import{X as n,Y as d,Z as e,j as t,k as i}from"./vendor-vue-BiQC5iF7.js";import"./vendor-vuetify-DsKlzgKp.js";const h="data:image/svg+xml,%3csvg%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-74_1)'%3e%3cpath%20fill='%23FFFFFF'%20d='M0%20256L256%20256L256%200L0%200L0%20256Z'%3e%3c/path%3e%3crect%20x='0'%20y='0'%20width='256'%20height='128'%20fill='%23D8C4A0'%3e%3c/rect%3e%3crect%20x='0'%20y='128'%20width='256'%20height='128'%20fill='%23F5E0BB'%3e%3c/rect%3e%3cpath%20d='M28%20228L128%20128L228%20128L128%20228L28%20228Z'%20fill-rule='evenodd'%20fill='%23241A04'%3e%3c/path%3e%3cpath%20d='M28%20128L128%2028L228%2028L128%20128L28%20128Z'%20fill-rule='evenodd'%20fill='%2352452A'%3e%3c/path%3e%3cg%3e%3cpath%20fill='%23000000'%20d='M-3049.01%202467.94L-3043.48%202467.94L-3043.48%202466.99L-3045.92%202466.99C-3046.36%202466.99%20-3046.9%202467.04%20-3047.36%202467.08C-3045.29%202465.12%20-3043.9%202463.33%20-3043.9%202461.57C-3043.9%202460.01%20-3044.9%202458.99%20-3046.47%202458.99C-3047.58%202458.99%20-3048.35%202459.49%20-3049.06%202460.27L-3048.43%202460.9C-3047.93%202460.31%20-3047.32%202459.88%20-3046.6%202459.88C-3045.51%202459.88%20-3044.98%202460.61%20-3044.98%202461.62C-3044.98%202463.13%20-3046.25%202464.88%20-3049.01%202467.29L-3049.01%202467.94ZM-3039.27%202468.1C-3037.9%202468.1%20-3036.74%202466.95%20-3036.74%202465.24C-3036.74%202463.39%20-3037.7%202462.48%20-3039.19%202462.48C-3039.87%202462.48%20-3040.64%202462.88%20-3041.18%202463.54C-3041.13%202460.81%20-3040.13%202459.89%20-3038.91%202459.89C-3038.38%202459.89%20-3037.85%202460.15%20-3037.52%202460.56L-3036.89%202459.89C-3037.39%202459.36%20-3038.04%202458.99%20-3038.96%202458.99C-3040.66%202458.99%20-3042.21%202460.3%20-3042.21%202463.74C-3042.21%202466.65%20-3040.95%202468.1%20-3039.27%202468.1ZM-3041.15%202464.41C-3040.58%202463.6%20-3039.91%202463.3%20-3039.36%202463.3C-3038.3%202463.3%20-3037.78%202464.05%20-3037.78%202465.24C-3037.78%202466.44%20-3038.43%202467.23%20-3039.27%202467.23C-3040.37%202467.23%20-3041.03%202466.24%20-3041.15%202464.41ZM-3035.17%202467.94L-3030.34%202467.94L-3030.34%202467.03L-3032.1%202467.03L-3032.1%202459.15L-3032.95%202459.15C-3033.43%202459.42%20-3033.99%202459.62%20-3034.77%202459.77L-3034.77%202460.47L-3033.2%202460.47L-3033.2%202467.03L-3035.17%202467.03L-3035.17%202467.94ZM-3029.51%202467.94L-3028.4%202467.94L-3027.54%202465.25L-3024.33%202465.25L-3023.49%202467.94L-3022.31%202467.94L-3025.3%202459.15L-3026.54%202459.15L-3029.51%202467.94ZM-3027.27%202464.38L-3026.84%202463.02C-3026.52%202462.02%20-3026.24%202461.08%20-3025.96%202460.04L-3025.91%202460.04C-3025.62%202461.06%20-3025.35%202462.02%20-3025.02%202463.02L-3024.6%202464.38L-3027.27%202464.38ZM-3018.93%202468.1C-3017.26%202468.1%20-3016.19%202466.58%20-3016.19%202463.51C-3016.19%202460.47%20-3017.26%202458.99%20-3018.93%202458.99C-3020.61%202458.99%20-3021.67%202460.47%20-3021.67%202463.51C-3021.67%202466.58%20-3020.61%202468.1%20-3018.93%202468.1ZM-3018.93%202467.21C-3019.93%202467.21%20-3020.61%202466.09%20-3020.61%202463.51C-3020.61%202460.95%20-3019.93%202459.85%20-3018.93%202459.85C-3017.93%202459.85%20-3017.25%202460.95%20-3017.25%202463.51C-3017.25%202466.09%20-3017.93%202467.21%20-3018.93%202467.21ZM-3012.27%202468.1C-3010.6%202468.1%20-3009.53%202466.58%20-3009.53%202463.51C-3009.53%202460.47%20-3010.6%202458.99%20-3012.27%202458.99C-3013.95%202458.99%20-3015.01%202460.47%20-3015.01%202463.51C-3015.01%202466.58%20-3013.95%202468.1%20-3012.27%202468.1ZM-3012.27%202467.21C-3013.27%202467.21%20-3013.95%202466.09%20-3013.95%202463.51C-3013.95%202460.95%20-3013.27%202459.85%20-3012.27%202459.85C-3011.27%202459.85%20-3010.59%202460.95%20-3010.59%202463.51C-3010.59%202466.09%20-3011.27%202467.21%20-3012.27%202467.21Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-74_1'%3e%3cpath%20d='M0%20256L256%20256L256%200L0%200L0%20256Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",m={__name:"404",setup(p){return(o,l)=>(n(),d(f,{class:"fill-height"},{default:e(()=>[t(C,{class:"align-centerfill-height mx-auto","max-width":"900"},{default:e(()=>[t(c,{class:"mb-4",height:"150",src:h}),l[3]||(l[3]=i("div",{class:"text-center"},[i("div",{class:"text-body-2 font-weight-light mb-n1"}," 出现了错误 "),i("h1",{class:"text-h2 font-weight-bold"}," 404 ")],-1)),l[4]||(l[4]=i("div",{class:"py-4"},null,-1)),t(L,null,{default:e(()=>[t(r,{cols:"12"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-help",rounded:"lg",variant:"outlined"},{image:e(()=>[t(c,{position:"top right"})]),title:e(()=>[...l[1]||(l[1]=[i("h2",{class:"text-h5 font-weight-bold"}," 为什么会出现此错误? ",-1)])]),subtitle:e(()=>[...l[2]||(l[2]=[i("div",{class:"text-subtitle-1"}," 大概是页面未找到 ",-1)])]),default:e(()=>[t(s,{contained:"","model-value":"",opacity:".12",persistent:"",scrim:"primary"})]),_:1})]),_:1}),t(r,{cols:"6"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-home",rounded:"lg",title:"返回首页",to:"/",variant:"text"},{default:e(()=>[t(s,{contained:"","model-value":"",opacity:".06",persistent:"",scrim:"primary"})]),_:1})]),_:1}),t(r,{cols:"6"},{default:e(()=>[t(a,{class:"py-4",color:"surface-variant","prepend-icon":"mdi-arrow-left-drop-circle",rounded:"lg",title:"返回上一页",variant:"text",onClick:l[0]||(l[0]=u=>o.$router.back())},{default:e(()=>[t(s,{contained:"","model-value":"",opacity:".06",persistent:"",scrim:"primary"})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}},Z={__name:"404",setup(p){return(o,l)=>(n(),d(m))}};export{Z as default}; diff --git a/assets/AttendanceManagementDialog-Dr2Al4zj.js b/assets/AttendanceManagementDialog-BpjEre5P.js similarity index 96% rename from assets/AttendanceManagementDialog-Dr2Al4zj.js rename to assets/AttendanceManagementDialog-BpjEre5P.js index 7935a8c..a927d4a 100644 --- a/assets/AttendanceManagementDialog-Dr2Al4zj.js +++ b/assets/AttendanceManagementDialog-BpjEre5P.js @@ -1 +1 @@ -import{_ as L,e as x,c as w,f as v,g as F,h as d,d as k,o as M,i as z,l as _,k as E,n as P}from"./index-CzpSlHRw.js";import{V as f}from"./VChip-B3whZF-S.js";import{V as b,a as C}from"./VRow-sd4d6eNi.js";import{V as D}from"./VTextField-BxdS2D7S.js";import{a0 as B}from"./vendor-vuetify-95axeNJO.js";import{X as u,Y as h,Z as a,j as l,a1 as c,S as p,$ as A,k as o,_ as V,F as S,a2 as y}from"./vendor-vue-28M5UGz3.js";const N={name:"AttendanceManagementDialog",props:{modelValue:{type:Boolean,required:!0},studentList:{type:Array,required:!0},attendance:{type:Object,required:!0},dateString:{type:String,default:""}},emits:["update:modelValue","save","change"],setup(){const{mobile:t}=B();return{mobile:t}},data(){return{attendanceSearch:"",attendanceFilter:[]}},computed:{isMobile(){return P("display.forceDesktopMode")?!1:this.mobile},filteredStudents(){let t=[...this.studentList];if(this.attendanceSearch){const e=this.attendanceSearch.toLowerCase();t=t.filter(r=>r.toLowerCase().includes(e))}return this.attendanceFilter&&this.attendanceFilter.length>0&&(t=t.filter(e=>!!(this.attendanceFilter.includes("present")&&this.isPresent(e)||this.attendanceFilter.includes("absent")&&this.isAbsent(e)||this.attendanceFilter.includes("late")&&this.isLate(e)||this.attendanceFilter.includes("exclude")&&this.isExclude(e)))),t},extractedSurnames(){if(!this.studentList||this.studentList.length===0)return[];const t=new Map;return this.studentList.forEach(e=>{if(e&&e.length>0){const r=e.charAt(0);t.set(r,(t.get(r)||0)+1)}}),Array.from(t.entries()).map(([e,r])=>({name:e,count:r})).sort((e,r)=>e.name.localeCompare(r.name,"zh-CN"))}},methods:{toggleFilter(t){const e=this.attendanceFilter.indexOf(t);e===-1?this.attendanceFilter.push(t):this.attendanceFilter.splice(e,1)},isPresent(t){const{absent:e,late:r,exclude:m}=this.attendance;return!e.includes(t)&&!r.includes(t)&&!m.includes(t)},isAbsent(t){return this.attendance.absent.includes(t)},isLate(t){return this.attendance.late.includes(t)},isExclude(t){return this.attendance.exclude.includes(t)},getStudentStatusColor(t){return this.attendance.absent.includes(t)?"error":this.attendance.late.includes(t)?"warning":this.attendance.exclude.includes(t)?"grey":"success"},getStudentStatusIcon(t){return this.attendance.absent.includes(t)?"mdi-account-off":this.attendance.late.includes(t)?"mdi-clock-alert":this.attendance.exclude.includes(t)?"mdi-account-cancel":"mdi-account-check"},removeFromAll(t){const e=this.attendance.absent.indexOf(t);e>-1&&this.attendance.absent.splice(e,1);const r=this.attendance.late.indexOf(t);r>-1&&this.attendance.late.splice(r,1);const m=this.attendance.exclude.indexOf(t);m>-1&&this.attendance.exclude.splice(m,1)},setPresent(t){this.removeFromAll(t),this.$emit("change")},setAbsent(t){this.removeFromAll(t),this.attendance.absent.push(t),this.$emit("change")},setLate(t){this.removeFromAll(t),this.attendance.late.push(t),this.$emit("change")},setExclude(t){this.removeFromAll(t),this.attendance.exclude.push(t),this.$emit("change")},setAllPresent(){this.attendance.absent.splice(0,this.attendance.absent.length),this.attendance.late.splice(0,this.attendance.late.length),this.attendance.exclude.splice(0,this.attendance.exclude.length),this.$emit("change")},setAllAbsent(){this.setAllPresent(),this.attendance.absent.push(...this.studentList),this.$emit("change")},setAllLate(){this.setAllPresent(),this.attendance.late.push(...this.studentList),this.$emit("change")},setAllExclude(){this.setAllPresent(),this.attendance.exclude.push(...this.studentList),this.$emit("change")}}},O={class:"d-flex flex-wrap mt-2 gap-1"},T={class:"d-flex flex-wrap mb-4 gap-2"},I={class:"flex-grow-1"},q={class:"d-flex align-center"},j={class:"text-subtitle-1"},U={class:"attendance-actions"},R={class:"d-flex flex-wrap gap-2"};function X(t,e,r,m,s,i){return u(),h(E,{"model-value":r.modelValue,fullscreen:i.isMobile,"fullscreen-breakpoint":"sm","max-width":"900","onUpdate:modelValue":e[7]||(e[7]=n=>t.$emit("update:modelValue",n))},{default:a(()=>[l(x,null,{default:a(()=>[l(w,{class:"d-flex align-center"},{default:a(()=>[l(v,{class:"mr-2",icon:"mdi-account-group"}),e[8]||(e[8]=c(" 考勤 ",-1)),l(F),i.isMobile?A("",!0):(u(),h(f,{key:0,class:"ml-2",color:"primary",size:"small"},{default:a(()=>[c(p(r.dateString),1)]),_:1})),i.isMobile?(u(),h(d,{key:1,icon:"mdi-close",variant:"text",onClick:e[0]||(e[0]=n=>t.$emit("update:modelValue",!1))})):A("",!0)]),_:1}),l(k,null,{default:a(()=>[l(b,{class:"mb-4"},{default:a(()=>[l(C,{cols:"12",md:"12"},{default:a(()=>[l(D,{modelValue:s.attendanceSearch,"onUpdate:modelValue":e[1]||(e[1]=n=>s.attendanceSearch=n),clearable:"",hint:"支持筛选姓氏,如输入'孙'可筛选所有姓孙的学生",label:"搜索学生","prepend-inner-icon":"mdi-magnify",variant:"outlined"},null,8,["modelValue"]),o("div",O,[(u(!0),V(S,null,y(i.extractedSurnames,n=>(u(),h(d,{key:n.name,color:s.attendanceSearch===n.name?"primary":"",variant:s.attendanceSearch===n.name?"elevated":"text",onClick:g=>s.attendanceSearch=s.attendanceSearch===n.name?"":n.name},{default:a(()=>[c(p(n.name)+" ("+p(n.count)+") ",1)]),_:2},1032,["color","variant","onClick"]))),128))])]),_:1})]),_:1}),o("div",T,[o("div",null,[l(f,{"append-icon":s.attendanceFilter.includes("present")?"mdi-check":"",color:s.attendanceFilter.includes("present")?"success":"",variant:s.attendanceFilter.includes("present")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-check",value:"present",onClick:e[2]||(e[2]=n=>i.toggleFilter("present"))},{default:a(()=>[...e[9]||(e[9]=[c(" 到课 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("absent")?"mdi-check":"",color:s.attendanceFilter.includes("absent")?"error":"",variant:s.attendanceFilter.includes("absent")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-off",value:"absent",onClick:e[3]||(e[3]=n=>i.toggleFilter("absent"))},{default:a(()=>[...e[10]||(e[10]=[c(" 请假 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("late")?"mdi-check":"",color:s.attendanceFilter.includes("late")?"warning":"",variant:s.attendanceFilter.includes("late")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-clock-alert",value:"late",onClick:e[4]||(e[4]=n=>i.toggleFilter("late"))},{default:a(()=>[...e[11]||(e[11]=[c(" 迟到 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("exclude")?"mdi-check":"",color:s.attendanceFilter.includes("exclude")?"grey":"",variant:s.attendanceFilter.includes("exclude")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-cancel",value:"exclude",onClick:e[5]||(e[5]=n=>i.toggleFilter("exclude"))},{default:a(()=>[...e[12]||(e[12]=[c(" 不参与 ",-1)])]),_:1},8,["append-icon","color","variant"])])]),l(b,null,{default:a(()=>[(u(!0),V(S,null,y(i.filteredStudents,n=>(u(),h(C,{key:n,cols:"12",lg:"4",md:"6",sm:"6"},{default:a(()=>[l(x,{border:"",class:"student-card"},{default:a(()=>[l(k,{class:"d-flex align-center pa-2"},{default:a(()=>[o("div",I,[o("div",q,[l(M,{color:i.getStudentStatusColor(n),class:"mr-2",size:"24"},{default:a(()=>[l(v,{size:"small"},{default:a(()=>[c(p(i.getStudentStatusIcon(n)),1)]),_:2},1024)]),_:2},1032,["color"]),o("div",j,p(n),1)])]),o("div",U,[l(d,{color:i.isPresent(n)?"success":"",title:"设为到课",icon:"mdi-account-check",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setPresent(n)},null,8,["color","size","onClick"]),l(d,{color:i.isAbsent(n)?"error":"",title:"设为请假",icon:"mdi-account-off",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setAbsent(n)},null,8,["color","size","onClick"]),l(d,{color:i.isLate(n)?"warning":"",title:"设为迟到",icon:"mdi-clock-alert",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setLate(n)},null,8,["color","size","onClick"]),l(d,{color:i.isExclude(n)?"grey":"",title:"设为不参与",icon:"mdi-account-cancel",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setExclude(n)},null,8,["color","size","onClick"])])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),l(b,null,{default:a(()=>[l(C,{cols:"12",md:"12"},{default:a(()=>[l(x,{class:"mb-4",color:"primary",variant:"tonal"},{default:a(()=>[l(k,null,{default:a(()=>[e[17]||(e[17]=o("div",{class:"text-subtitle-2 mb-2"}," 批量操作 ",-1)),o("div",R,[l(d,{class:"flex-grow-1",color:"success","prepend-icon":"mdi-account-check",onClick:i.setAllPresent},{default:a(()=>[...e[13]||(e[13]=[c(" 全部到齐 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"error","prepend-icon":"mdi-account-off",onClick:i.setAllAbsent},{default:a(()=>[...e[14]||(e[14]=[c(" 全部请假 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"warning","prepend-icon":"mdi-clock-alert",onClick:i.setAllLate},{default:a(()=>[...e[15]||(e[15]=[c(" 全部迟到 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"grey","prepend-icon":"mdi-account-cancel",onClick:i.setAllExclude},{default:a(()=>[...e[16]||(e[16]=[c(" 全部不参与 ",-1)])]),_:1},8,["onClick"])])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l(z),l(_,null,{default:a(()=>[l(F),l(d,{color:"primary",onClick:e[6]||(e[6]=n=>t.$emit("save"))},{default:a(()=>[l(v,{start:""},{default:a(()=>[...e[18]||(e[18]=[c(" mdi-content-save ",-1)])]),_:1}),e[19]||(e[19]=c(" 保存 ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value","fullscreen"])}const Q=L(N,[["render",X],["__scopeId","data-v-743b7bc1"]]);export{Q as default}; +import{_ as L,e as x,c as w,f as v,g as F,h as d,d as k,o as M,i as z,l as _,k as E,n as P}from"./index-DGIAsv4W.js";import{V as f}from"./VChip-mRzIPuM0.js";import{V as b,a as C}from"./VRow-Cjhiymuu.js";import{V as D}from"./VTextField-BurlcggD.js";import{a0 as B}from"./vendor-vuetify-DsKlzgKp.js";import{X as u,Y as h,Z as a,j as l,a1 as c,S as p,$ as A,k as o,_ as V,F as S,a2 as y}from"./vendor-vue-BiQC5iF7.js";const N={name:"AttendanceManagementDialog",props:{modelValue:{type:Boolean,required:!0},studentList:{type:Array,required:!0},attendance:{type:Object,required:!0},dateString:{type:String,default:""}},emits:["update:modelValue","save","change"],setup(){const{mobile:t}=B();return{mobile:t}},data(){return{attendanceSearch:"",attendanceFilter:[]}},computed:{isMobile(){return P("display.forceDesktopMode")?!1:this.mobile},filteredStudents(){let t=[...this.studentList];if(this.attendanceSearch){const e=this.attendanceSearch.toLowerCase();t=t.filter(r=>r.toLowerCase().includes(e))}return this.attendanceFilter&&this.attendanceFilter.length>0&&(t=t.filter(e=>!!(this.attendanceFilter.includes("present")&&this.isPresent(e)||this.attendanceFilter.includes("absent")&&this.isAbsent(e)||this.attendanceFilter.includes("late")&&this.isLate(e)||this.attendanceFilter.includes("exclude")&&this.isExclude(e)))),t},extractedSurnames(){if(!this.studentList||this.studentList.length===0)return[];const t=new Map;return this.studentList.forEach(e=>{if(e&&e.length>0){const r=e.charAt(0);t.set(r,(t.get(r)||0)+1)}}),Array.from(t.entries()).map(([e,r])=>({name:e,count:r})).sort((e,r)=>e.name.localeCompare(r.name,"zh-CN"))}},methods:{toggleFilter(t){const e=this.attendanceFilter.indexOf(t);e===-1?this.attendanceFilter.push(t):this.attendanceFilter.splice(e,1)},isPresent(t){const{absent:e,late:r,exclude:m}=this.attendance;return!e.includes(t)&&!r.includes(t)&&!m.includes(t)},isAbsent(t){return this.attendance.absent.includes(t)},isLate(t){return this.attendance.late.includes(t)},isExclude(t){return this.attendance.exclude.includes(t)},getStudentStatusColor(t){return this.attendance.absent.includes(t)?"error":this.attendance.late.includes(t)?"warning":this.attendance.exclude.includes(t)?"grey":"success"},getStudentStatusIcon(t){return this.attendance.absent.includes(t)?"mdi-account-off":this.attendance.late.includes(t)?"mdi-clock-alert":this.attendance.exclude.includes(t)?"mdi-account-cancel":"mdi-account-check"},removeFromAll(t){const e=this.attendance.absent.indexOf(t);e>-1&&this.attendance.absent.splice(e,1);const r=this.attendance.late.indexOf(t);r>-1&&this.attendance.late.splice(r,1);const m=this.attendance.exclude.indexOf(t);m>-1&&this.attendance.exclude.splice(m,1)},setPresent(t){this.removeFromAll(t),this.$emit("change")},setAbsent(t){this.removeFromAll(t),this.attendance.absent.push(t),this.$emit("change")},setLate(t){this.removeFromAll(t),this.attendance.late.push(t),this.$emit("change")},setExclude(t){this.removeFromAll(t),this.attendance.exclude.push(t),this.$emit("change")},setAllPresent(){this.attendance.absent.splice(0,this.attendance.absent.length),this.attendance.late.splice(0,this.attendance.late.length),this.attendance.exclude.splice(0,this.attendance.exclude.length),this.$emit("change")},setAllAbsent(){this.setAllPresent(),this.attendance.absent.push(...this.studentList),this.$emit("change")},setAllLate(){this.setAllPresent(),this.attendance.late.push(...this.studentList),this.$emit("change")},setAllExclude(){this.setAllPresent(),this.attendance.exclude.push(...this.studentList),this.$emit("change")}}},O={class:"d-flex flex-wrap mt-2 gap-1"},T={class:"d-flex flex-wrap mb-4 gap-2"},I={class:"flex-grow-1"},q={class:"d-flex align-center"},j={class:"text-subtitle-1"},U={class:"attendance-actions"},R={class:"d-flex flex-wrap gap-2"};function X(t,e,r,m,s,i){return u(),h(E,{"model-value":r.modelValue,fullscreen:i.isMobile,"fullscreen-breakpoint":"sm","max-width":"900","onUpdate:modelValue":e[7]||(e[7]=n=>t.$emit("update:modelValue",n))},{default:a(()=>[l(x,null,{default:a(()=>[l(w,{class:"d-flex align-center"},{default:a(()=>[l(v,{class:"mr-2",icon:"mdi-account-group"}),e[8]||(e[8]=c(" 考勤 ",-1)),l(F),i.isMobile?A("",!0):(u(),h(f,{key:0,class:"ml-2",color:"primary",size:"small"},{default:a(()=>[c(p(r.dateString),1)]),_:1})),i.isMobile?(u(),h(d,{key:1,icon:"mdi-close",variant:"text",onClick:e[0]||(e[0]=n=>t.$emit("update:modelValue",!1))})):A("",!0)]),_:1}),l(k,null,{default:a(()=>[l(b,{class:"mb-4"},{default:a(()=>[l(C,{cols:"12",md:"12"},{default:a(()=>[l(D,{modelValue:s.attendanceSearch,"onUpdate:modelValue":e[1]||(e[1]=n=>s.attendanceSearch=n),clearable:"",hint:"支持筛选姓氏,如输入'孙'可筛选所有姓孙的学生",label:"搜索学生","prepend-inner-icon":"mdi-magnify",variant:"outlined"},null,8,["modelValue"]),o("div",O,[(u(!0),V(S,null,y(i.extractedSurnames,n=>(u(),h(d,{key:n.name,color:s.attendanceSearch===n.name?"primary":"",variant:s.attendanceSearch===n.name?"elevated":"text",onClick:g=>s.attendanceSearch=s.attendanceSearch===n.name?"":n.name},{default:a(()=>[c(p(n.name)+" ("+p(n.count)+") ",1)]),_:2},1032,["color","variant","onClick"]))),128))])]),_:1})]),_:1}),o("div",T,[o("div",null,[l(f,{"append-icon":s.attendanceFilter.includes("present")?"mdi-check":"",color:s.attendanceFilter.includes("present")?"success":"",variant:s.attendanceFilter.includes("present")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-check",value:"present",onClick:e[2]||(e[2]=n=>i.toggleFilter("present"))},{default:a(()=>[...e[9]||(e[9]=[c(" 到课 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("absent")?"mdi-check":"",color:s.attendanceFilter.includes("absent")?"error":"",variant:s.attendanceFilter.includes("absent")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-off",value:"absent",onClick:e[3]||(e[3]=n=>i.toggleFilter("absent"))},{default:a(()=>[...e[10]||(e[10]=[c(" 请假 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("late")?"mdi-check":"",color:s.attendanceFilter.includes("late")?"warning":"",variant:s.attendanceFilter.includes("late")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-clock-alert",value:"late",onClick:e[4]||(e[4]=n=>i.toggleFilter("late"))},{default:a(()=>[...e[11]||(e[11]=[c(" 迟到 ",-1)])]),_:1},8,["append-icon","color","variant"]),l(f,{"append-icon":s.attendanceFilter.includes("exclude")?"mdi-check":"",color:s.attendanceFilter.includes("exclude")?"grey":"",variant:s.attendanceFilter.includes("exclude")?"elevated":"tonal",class:"px-2 filter-chip","prepend-icon":"mdi-account-cancel",value:"exclude",onClick:e[5]||(e[5]=n=>i.toggleFilter("exclude"))},{default:a(()=>[...e[12]||(e[12]=[c(" 不参与 ",-1)])]),_:1},8,["append-icon","color","variant"])])]),l(b,null,{default:a(()=>[(u(!0),V(S,null,y(i.filteredStudents,n=>(u(),h(C,{key:n,cols:"12",lg:"4",md:"6",sm:"6"},{default:a(()=>[l(x,{border:"",class:"student-card"},{default:a(()=>[l(k,{class:"d-flex align-center pa-2"},{default:a(()=>[o("div",I,[o("div",q,[l(M,{color:i.getStudentStatusColor(n),class:"mr-2",size:"24"},{default:a(()=>[l(v,{size:"small"},{default:a(()=>[c(p(i.getStudentStatusIcon(n)),1)]),_:2},1024)]),_:2},1032,["color"]),o("div",j,p(n),1)])]),o("div",U,[l(d,{color:i.isPresent(n)?"success":"",title:"设为到课",icon:"mdi-account-check",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setPresent(n)},null,8,["color","size","onClick"]),l(d,{color:i.isAbsent(n)?"error":"",title:"设为请假",icon:"mdi-account-off",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setAbsent(n)},null,8,["color","size","onClick"]),l(d,{color:i.isLate(n)?"warning":"",title:"设为迟到",icon:"mdi-clock-alert",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setLate(n)},null,8,["color","size","onClick"]),l(d,{color:i.isExclude(n)?"grey":"",title:"设为不参与",icon:"mdi-account-cancel",size:i.isMobile?"default":"small",variant:"text",onClick:g=>i.setExclude(n)},null,8,["color","size","onClick"])])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),l(b,null,{default:a(()=>[l(C,{cols:"12",md:"12"},{default:a(()=>[l(x,{class:"mb-4",color:"primary",variant:"tonal"},{default:a(()=>[l(k,null,{default:a(()=>[e[17]||(e[17]=o("div",{class:"text-subtitle-2 mb-2"}," 批量操作 ",-1)),o("div",R,[l(d,{class:"flex-grow-1",color:"success","prepend-icon":"mdi-account-check",onClick:i.setAllPresent},{default:a(()=>[...e[13]||(e[13]=[c(" 全部到齐 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"error","prepend-icon":"mdi-account-off",onClick:i.setAllAbsent},{default:a(()=>[...e[14]||(e[14]=[c(" 全部请假 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"warning","prepend-icon":"mdi-clock-alert",onClick:i.setAllLate},{default:a(()=>[...e[15]||(e[15]=[c(" 全部迟到 ",-1)])]),_:1},8,["onClick"]),l(d,{class:"flex-grow-1",color:"grey","prepend-icon":"mdi-account-cancel",onClick:i.setAllExclude},{default:a(()=>[...e[16]||(e[16]=[c(" 全部不参与 ",-1)])]),_:1},8,["onClick"])])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l(z),l(_,null,{default:a(()=>[l(F),l(d,{color:"primary",onClick:e[6]||(e[6]=n=>t.$emit("save"))},{default:a(()=>[l(v,{start:""},{default:a(()=>[...e[18]||(e[18]=[c(" mdi-content-save ",-1)])]),_:1}),e[19]||(e[19]=c(" 保存 ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value","fullscreen"])}const Q=L(N,[["render",X],["__scopeId","data-v-743b7bc1"]]);export{Q as default}; diff --git a/assets/AttendanceSidebar-B0h29tbH.js b/assets/AttendanceSidebar-DmtvE998.js similarity index 89% rename from assets/AttendanceSidebar-B0h29tbH.js rename to assets/AttendanceSidebar-DmtvE998.js index 2957afd..cdf3bed 100644 --- a/assets/AttendanceSidebar-B0h29tbH.js +++ b/assets/AttendanceSidebar-DmtvE998.js @@ -1 +1 @@ -import{_ as w,n as g,a0 as m}from"./index-CzpSlHRw.js";import{a as k}from"./VRow-sd4d6eNi.js";import{a0 as f}from"./vendor-vuetify-95axeNJO.js";import{R as b,X as n,Y as _,Z as x,k as t,a1 as r,S as s,_ as l,F as c,a2 as p,$ as o,n as C}from"./vendor-vue-28M5UGz3.js";const A={name:"AttendanceSidebar",props:{studentList:{type:Array,required:!0},attendance:{type:Object,required:!0},isEditingDisabled:{type:Boolean,default:!1}},emits:["click","disabled-click"],setup(){return{display:f()}},methods:{getSetting:g,handleClick(){this.isEditingDisabled?this.$emit("disabled-click"):this.$emit("click")}}},D={style:{"white-space":"nowrap"}},S={style:{"white-space":"nowrap"}},L={style:{"white-space":"nowrap"}},v={key:0},B={style:{"white-space":"nowrap"}},E={style:{"white-space":"nowrap"}},V={key:0},N={style:{"white-space":"nowrap"}},U={style:{"white-space":"nowrap"}},q={key:0},F={style:{"white-space":"nowrap"}};function M(h,e,a,u,R,y){return a.studentList&&a.studentList.length?b((n(),_(k,{key:0,class:C([{"cursor-not-allowed":a.isEditingDisabled},"attendance-area no-select"]),cols:"1",onClick:y.handleClick},{default:x(()=>[e[10]||(e[10]=t("h1",null,"出勤",-1)),t("h2",null,[e[0]||(e[0]=t("span",{style:{"white-space":"nowrap"}}," 应到",-1)),e[1]||(e[1]=r(" : ",-1)),t("span",D,s(a.studentList.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[2]||(e[2]=t("span",{style:{"white-space":"nowrap"}}," 实到",-1)),e[3]||(e[3]=r(" : ",-1)),t("span",S,s(a.studentList.length-a.attendance.absent.length-!y.getSetting("display.lateStudentsArePresent")*a.attendance.late.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[4]||(e[4]=t("span",{style:{"white-space":"nowrap"}}," 请假",-1)),e[5]||(e[5]=r(" : ",-1)),t("span",L,s(a.attendance.absent.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.absent,(d,i)=>(n(),l("h3",{key:"absent-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",v,s(`${i+1}. `),1)):o("",!0),t("span",B,s(d),1)]))),128)),t("h2",null,[e[6]||(e[6]=t("span",{style:{"white-space":"nowrap"}},"迟到",-1)),e[7]||(e[7]=r(" : ",-1)),t("span",E,s(a.attendance.late.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.late,(d,i)=>(n(),l("h3",{key:"late-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",V,s(`${i+1}. `),1)):o("",!0),t("span",N,s(d),1)]))),128)),t("h2",null,[e[8]||(e[8]=t("span",{style:{"white-space":"nowrap"}},"不参与",-1)),e[9]||(e[9]=r(" : ",-1)),t("span",U,s(a.attendance.exclude.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.exclude,(d,i)=>(n(),l("h3",{key:"exclude-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",q,s(`${i+1}. `),1)):o("",!0),t("span",F,s(d),1)]))),128))]),_:1},8,["class","onClick"])),[[m,a.isEditingDisabled?!1:{class:`text-${["primary","secondary","info","success","warning","error"][Math.floor(Math.random()*6)]}`}]]):o("",!0)}const P=w(A,[["render",M],["__scopeId","data-v-1b645894"]]);export{P as default}; +import{_ as w,n as g,a0 as m}from"./index-DGIAsv4W.js";import{a as k}from"./VRow-Cjhiymuu.js";import{a0 as f}from"./vendor-vuetify-DsKlzgKp.js";import{R as b,X as n,Y as _,Z as x,k as t,a1 as r,S as s,_ as l,F as c,a2 as p,$ as o,n as C}from"./vendor-vue-BiQC5iF7.js";const A={name:"AttendanceSidebar",props:{studentList:{type:Array,required:!0},attendance:{type:Object,required:!0},isEditingDisabled:{type:Boolean,default:!1}},emits:["click","disabled-click"],setup(){return{display:f()}},methods:{getSetting:g,handleClick(){this.isEditingDisabled?this.$emit("disabled-click"):this.$emit("click")}}},D={style:{"white-space":"nowrap"}},S={style:{"white-space":"nowrap"}},L={style:{"white-space":"nowrap"}},v={key:0},B={style:{"white-space":"nowrap"}},E={style:{"white-space":"nowrap"}},V={key:0},N={style:{"white-space":"nowrap"}},U={style:{"white-space":"nowrap"}},q={key:0},F={style:{"white-space":"nowrap"}};function M(h,e,a,u,R,y){return a.studentList&&a.studentList.length?b((n(),_(k,{key:0,class:C([{"cursor-not-allowed":a.isEditingDisabled},"attendance-area no-select"]),cols:"1",onClick:y.handleClick},{default:x(()=>[e[10]||(e[10]=t("h1",null,"出勤",-1)),t("h2",null,[e[0]||(e[0]=t("span",{style:{"white-space":"nowrap"}}," 应到",-1)),e[1]||(e[1]=r(" : ",-1)),t("span",D,s(a.studentList.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[2]||(e[2]=t("span",{style:{"white-space":"nowrap"}}," 实到",-1)),e[3]||(e[3]=r(" : ",-1)),t("span",S,s(a.studentList.length-a.attendance.absent.length-!y.getSetting("display.lateStudentsArePresent")*a.attendance.late.length-a.attendance.exclude.length)+"人 ",1)]),t("h2",null,[e[4]||(e[4]=t("span",{style:{"white-space":"nowrap"}}," 请假",-1)),e[5]||(e[5]=r(" : ",-1)),t("span",L,s(a.attendance.absent.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.absent,(d,i)=>(n(),l("h3",{key:"absent-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",v,s(`${i+1}. `),1)):o("",!0),t("span",B,s(d),1)]))),128)),t("h2",null,[e[6]||(e[6]=t("span",{style:{"white-space":"nowrap"}},"迟到",-1)),e[7]||(e[7]=r(" : ",-1)),t("span",E,s(a.attendance.late.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.late,(d,i)=>(n(),l("h3",{key:"late-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",V,s(`${i+1}. `),1)):o("",!0),t("span",N,s(d),1)]))),128)),t("h2",null,[e[8]||(e[8]=t("span",{style:{"white-space":"nowrap"}},"不参与",-1)),e[9]||(e[9]=r(" : ",-1)),t("span",U,s(a.attendance.exclude.length)+"人 ",1)]),(n(!0),l(c,null,p(a.attendance.exclude,(d,i)=>(n(),l("h3",{key:"exclude-"+i,class:"gray-text"},[u.display.lgAndUp.value?(n(),l("span",q,s(`${i+1}. `),1)):o("",!0),t("span",F,s(d),1)]))),128))]),_:1},8,["class","onClick"])),[[m,a.isEditingDisabled?!1:{class:`text-${["primary","secondary","info","success","warning","error"][Math.floor(Math.random()*6)]}`}]]):o("",!0)}const P=w(A,[["render",M],["__scopeId","data-v-1b645894"]]);export{P as default}; diff --git a/assets/CacheManagement-DY4pjQFw.js b/assets/CacheManagement-3L-v8_PB.js similarity index 94% rename from assets/CacheManagement-DY4pjQFw.js rename to assets/CacheManagement-3L-v8_PB.js index a8a3a4d..1b3c261 100644 --- a/assets/CacheManagement-DY4pjQFw.js +++ b/assets/CacheManagement-3L-v8_PB.js @@ -1 +1 @@ -import{_ as S,c as b,g as A,h as p,f as d,d as C,p as E,q as N,r as L,t as P,e as _}from"./index-CzpSlHRw.js";import{V as y}from"./VAlert-DaoJAibO.js";import{V as R,a as B,b as F,c as H}from"./VExpansionPanels-CQt43P3v.js";import{V as I}from"./VChip-B3whZF-S.js";import{V as z}from"./VSkeletonLoader-Bqlz0ln3.js";import{X as i,Y as c,Z as s,j as t,k as r,a1 as l,$ as v,S as f,_ as w,F as V,a2 as x}from"./vendor-vue-28M5UGz3.js";import{V as M,a as k}from"./VRow-sd4d6eNi.js";import{V as U}from"./VContainer-BIFGURze.js";import"./vendor-vuetify-95axeNJO.js";const j={name:"CacheManager",data(){return{caches:[],loading:!1,serviceWorkerActive:!1,message:"",messageType:"info"}},mounted(){this.checkServiceWorker()},methods:{checkServiceWorker(){"serviceWorker"in navigator?navigator.serviceWorker.ready.then(()=>{this.serviceWorkerActive=!0,this.refreshCaches()}).catch(()=>{this.serviceWorkerActive=!1}):this.serviceWorkerActive=!1},async refreshCaches(){if(this.serviceWorkerActive){this.loading=!0,this.message="",this.caches=[];try{const a=await this.sendMessageToSW({type:"CACHE_KEYS"});for(const e of a.cacheNames){const n=await this.sendMessageToSW({type:"CACHE_CONTENT",cacheName:e});this.caches.push({name:e,urls:n.urls||[]})}}catch(a){this.showMessage("获取缓存信息失败: "+a.message,"error")}finally{this.loading=!1}}},async clearCache(a){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_CACHE",cacheName:a})).success?(this.showMessage(`已清除缓存: ${this.formatCacheName(a)}`,"success"),await this.refreshCaches()):this.showMessage("清除缓存失败","error")}catch(e){this.showMessage("清除缓存失败: "+e.message,"error")}finally{this.loading=!1}},async clearUrl(a,e){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_URL",cacheName:a,url:e})).success?(this.showMessage(`已从缓存中删除: ${this.getFileName(e)}`,"success"),await this.refreshCaches()):this.showMessage("删除缓存项失败","error")}catch(n){this.showMessage("删除缓存项失败: "+n.message,"error")}finally{this.loading=!1}},async clearAllCaches(){if(confirm("确定要清除所有缓存吗?这可能会导致应用需要重新下载资源。")){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_ALL_CACHES"})).success?(this.showMessage("已清除所有缓存","success"),await this.refreshCaches()):this.showMessage("清除所有缓存失败","error")}catch(a){this.showMessage("清除所有缓存失败: "+a.message,"error")}finally{this.loading=!1}}},sendMessageToSW(a){return new Promise((e,n)=>{if(!navigator.serviceWorker.controller){n(new Error("Service Worker 未控制页面"));return}const g=new MessageChannel;g.port1.onmessage=o=>{e(o.data)},navigator.serviceWorker.controller.postMessage(a,[g.port2]),setTimeout(()=>{n(new Error("Service Worker 响应超时"))},5e3)})},formatCacheName(a){return a.replace("workbox-precache-","预缓存-").replace("-cache","").replace("js","JS").replace("css","CSS").replace("html","HTML").replace("images","图片").replace("external-resources","外部资源").replace("cdn-cgi","CDN")},getFileName(a){try{const e=new URL(a),n=e.pathname.split("/");return n[n.length-1]||e.hostname}catch(e){return console.error("获取文件名失败:",e),a}},showMessage(a,e="info"){this.message=a,this.messageType=e,setTimeout(()=>{this.message===a&&(this.message="")},5e3)}}},D={class:"d-flex align-center"},O={class:"d-flex justify-end mb-2"};function Y(a,e,n,g,o,m){return i(),c(_,null,{default:s(()=>[t(b,{class:"d-flex align-center"},{default:s(()=>[e[2]||(e[2]=r("span",null,"缓存管理",-1)),t(A),t(p,{loading:o.loading,color:"error",onClick:m.clearAllCaches},{default:s(()=>[...e[0]||(e[0]=[l(" 清除所有缓存 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{class:"ml-2",icon:"",onClick:m.refreshCaches},{default:s(()=>[t(d,null,{default:s(()=>[...e[1]||(e[1]=[l("mdi-refresh",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1}),t(C,null,{default:s(()=>[o.serviceWorkerActive?v("",!0):(i(),c(y,{key:0,class:"mb-4",type:"warning"},{default:s(()=>[...e[3]||(e[3]=[l(" Service Worker 未激活,缓存管理功能不可用。 ",-1)])]),_:1})),o.message?(i(),c(y,{key:1,type:o.messageType,class:"mb-4"},{default:s(()=>[l(f(o.message),1)]),_:1},8,["type"])):v("",!0),o.caches.length>0?(i(),c(R,{key:2},{default:s(()=>[(i(!0),w(V,null,x(o.caches,u=>(i(),c(B,{key:u.name},{default:s(()=>[t(F,null,{default:s(()=>[r("div",D,[r("span",null,f(m.formatCacheName(u.name)),1),t(I,{class:"ml-2",size:"small"},{default:s(()=>[l(f(u.urls.length)+" 个文件 ",1)]),_:2},1024)])]),_:2},1024),t(H,null,{default:s(()=>[r("div",O,[t(p,{loading:o.loading,color:"error",size:"small",onClick:h=>m.clearCache(u.name)},{default:s(()=>[...e[4]||(e[4]=[l(" 清除此缓存 ",-1)])]),_:1},8,["loading","onClick"])]),t(E,{lines:"two"},{default:s(()=>[(i(!0),w(V,null,x(u.urls,(h,T)=>(i(),c(N,{key:T},{append:s(()=>[t(p,{color:"error",icon:"",size:"small",onClick:Z=>m.clearUrl(u.name,h)},{default:s(()=>[t(d,null,{default:s(()=>[...e[5]||(e[5]=[l("mdi-delete",-1)])]),_:1})]),_:1},8,["onClick"])]),default:s(()=>[t(L,{class:"text-truncate"},{default:s(()=>[l(f(m.getFileName(h)),1)]),_:2},1024),t(P,{class:"text-truncate"},{default:s(()=>[l(f(h),1)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})):o.loading?(i(),c(z,{key:3,type:"article"})):(i(),c(y,{key:4,type:"info"},{default:s(()=>[...e[6]||(e[6]=[l(" 没有找到缓存数据。 ",-1)])]),_:1}))]),_:1})]),_:1})}const W=S(j,[["render",Y]]),$={name:"CacheManagementPage",components:{CacheManager:W},metaInfo:{title:"缓存管理"}},q={class:"d-flex align-center mb-6"},J={class:"d-flex align-center mb-2"},K={class:"d-flex align-center mb-2"};function X(a,e,n,g,o,m){const u=W;return i(),c(U,null,{default:s(()=>[t(M,null,{default:s(()=>[t(k,{cols:"12"},{default:s(()=>[r("div",q,[t(d,{class:"mr-3",color:"primary",size:"x-large"},{default:s(()=>[...e[0]||(e[0]=[l(" mdi-database-cog-outline ",-1)])]),_:1}),e[1]||(e[1]=r("div",null,[r("h1",{class:"text-h4"}," 缓存管理 "),r("div",{class:"text-subtitle-1 text-grey"}," 管理应用的本地缓存资源 ")],-1))]),t(_,{class:"mb-6",color:"info",density:"compact",variant:"tonal"},{default:s(()=>[t(C,{class:"d-flex align-center"},{default:s(()=>[t(d,{class:"mr-2",color:"info"},{default:s(()=>[...e[2]||(e[2]=[l(" mdi-information-outline ",-1)])]),_:1}),e[3]||(e[3]=r("span",null,"在这里您可以查看和管理应用的缓存文件。清除缓存可能会导致应用需要重新下载资源,但有助于解决某些显示问题。",-1))]),_:1})]),_:1}),t(M,null,{default:s(()=>[t(k,{cols:"12",md:"8"},{default:s(()=>[t(_,{class:"mb-4",variant:"tonal"},{default:s(()=>[t(C,null,{default:s(()=>[r("div",J,[t(d,{class:"mr-2",color:"primary"},{default:s(()=>[...e[4]||(e[4]=[l(" mdi-information ",-1)])]),_:1}),e[5]||(e[5]=r("span",{class:"text-h6"},"什么是缓存?",-1))]),e[6]||(e[6]=r("p",null," 缓存是浏览器在本地存储的网站资源副本,如图片、脚本和样式表等。这些缓存可以加快页面加载速度,减少数据使用,并在离线时提供基本功能。 ",-1))]),_:1})]),_:1})]),_:1}),t(k,{cols:"12",md:"4"},{default:s(()=>[t(_,{class:"mb-4",variant:"tonal"},{default:s(()=>[t(C,null,{default:s(()=>[r("div",K,[t(d,{class:"mr-2",color:"warning"},{default:s(()=>[...e[7]||(e[7]=[l(" mdi-lightbulb-outline ",-1)])]),_:1}),e[8]||(e[8]=r("span",{class:"text-h6"},"何时清除缓存?",-1))]),e[9]||(e[9]=r("ul",{class:"pl-4"},[r("li",null,"应用显示过时的内容"),r("li",null,"界面出现异常"),r("li",null,"应用功能不正常")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),t(u)]),_:1})]),_:1})]),_:1})}const oe=S($,[["render",X]]);export{oe as default}; +import{_ as S,c as b,g as A,h as p,f as d,d as C,p as E,q as N,r as L,t as P,e as _}from"./index-DGIAsv4W.js";import{V as y}from"./VAlert-BZ4-f-hy.js";import{V as R,a as B,b as F,c as H}from"./VExpansionPanels-BDI8gHu5.js";import{V as I}from"./VChip-mRzIPuM0.js";import{V as z}from"./VSkeletonLoader-DwE_iqTb.js";import{X as i,Y as c,Z as s,j as t,k as r,a1 as l,$ as v,S as f,_ as w,F as V,a2 as x}from"./vendor-vue-BiQC5iF7.js";import{V as M,a as k}from"./VRow-Cjhiymuu.js";import{V as U}from"./VContainer-DZyPrcqa.js";import"./vendor-vuetify-DsKlzgKp.js";const j={name:"CacheManager",data(){return{caches:[],loading:!1,serviceWorkerActive:!1,message:"",messageType:"info"}},mounted(){this.checkServiceWorker()},methods:{checkServiceWorker(){"serviceWorker"in navigator?navigator.serviceWorker.ready.then(()=>{this.serviceWorkerActive=!0,this.refreshCaches()}).catch(()=>{this.serviceWorkerActive=!1}):this.serviceWorkerActive=!1},async refreshCaches(){if(this.serviceWorkerActive){this.loading=!0,this.message="",this.caches=[];try{const a=await this.sendMessageToSW({type:"CACHE_KEYS"});for(const e of a.cacheNames){const n=await this.sendMessageToSW({type:"CACHE_CONTENT",cacheName:e});this.caches.push({name:e,urls:n.urls||[]})}}catch(a){this.showMessage("获取缓存信息失败: "+a.message,"error")}finally{this.loading=!1}}},async clearCache(a){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_CACHE",cacheName:a})).success?(this.showMessage(`已清除缓存: ${this.formatCacheName(a)}`,"success"),await this.refreshCaches()):this.showMessage("清除缓存失败","error")}catch(e){this.showMessage("清除缓存失败: "+e.message,"error")}finally{this.loading=!1}},async clearUrl(a,e){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_URL",cacheName:a,url:e})).success?(this.showMessage(`已从缓存中删除: ${this.getFileName(e)}`,"success"),await this.refreshCaches()):this.showMessage("删除缓存项失败","error")}catch(n){this.showMessage("删除缓存项失败: "+n.message,"error")}finally{this.loading=!1}},async clearAllCaches(){if(confirm("确定要清除所有缓存吗?这可能会导致应用需要重新下载资源。")){this.loading=!0;try{(await this.sendMessageToSW({type:"CLEAR_ALL_CACHES"})).success?(this.showMessage("已清除所有缓存","success"),await this.refreshCaches()):this.showMessage("清除所有缓存失败","error")}catch(a){this.showMessage("清除所有缓存失败: "+a.message,"error")}finally{this.loading=!1}}},sendMessageToSW(a){return new Promise((e,n)=>{if(!navigator.serviceWorker.controller){n(new Error("Service Worker 未控制页面"));return}const g=new MessageChannel;g.port1.onmessage=o=>{e(o.data)},navigator.serviceWorker.controller.postMessage(a,[g.port2]),setTimeout(()=>{n(new Error("Service Worker 响应超时"))},5e3)})},formatCacheName(a){return a.replace("workbox-precache-","预缓存-").replace("-cache","").replace("js","JS").replace("css","CSS").replace("html","HTML").replace("images","图片").replace("external-resources","外部资源").replace("cdn-cgi","CDN")},getFileName(a){try{const e=new URL(a),n=e.pathname.split("/");return n[n.length-1]||e.hostname}catch(e){return console.error("获取文件名失败:",e),a}},showMessage(a,e="info"){this.message=a,this.messageType=e,setTimeout(()=>{this.message===a&&(this.message="")},5e3)}}},D={class:"d-flex align-center"},O={class:"d-flex justify-end mb-2"};function Y(a,e,n,g,o,m){return i(),c(_,null,{default:s(()=>[t(b,{class:"d-flex align-center"},{default:s(()=>[e[2]||(e[2]=r("span",null,"缓存管理",-1)),t(A),t(p,{loading:o.loading,color:"error",onClick:m.clearAllCaches},{default:s(()=>[...e[0]||(e[0]=[l(" 清除所有缓存 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{class:"ml-2",icon:"",onClick:m.refreshCaches},{default:s(()=>[t(d,null,{default:s(()=>[...e[1]||(e[1]=[l("mdi-refresh",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1}),t(C,null,{default:s(()=>[o.serviceWorkerActive?v("",!0):(i(),c(y,{key:0,class:"mb-4",type:"warning"},{default:s(()=>[...e[3]||(e[3]=[l(" Service Worker 未激活,缓存管理功能不可用。 ",-1)])]),_:1})),o.message?(i(),c(y,{key:1,type:o.messageType,class:"mb-4"},{default:s(()=>[l(f(o.message),1)]),_:1},8,["type"])):v("",!0),o.caches.length>0?(i(),c(R,{key:2},{default:s(()=>[(i(!0),w(V,null,x(o.caches,u=>(i(),c(B,{key:u.name},{default:s(()=>[t(F,null,{default:s(()=>[r("div",D,[r("span",null,f(m.formatCacheName(u.name)),1),t(I,{class:"ml-2",size:"small"},{default:s(()=>[l(f(u.urls.length)+" 个文件 ",1)]),_:2},1024)])]),_:2},1024),t(H,null,{default:s(()=>[r("div",O,[t(p,{loading:o.loading,color:"error",size:"small",onClick:h=>m.clearCache(u.name)},{default:s(()=>[...e[4]||(e[4]=[l(" 清除此缓存 ",-1)])]),_:1},8,["loading","onClick"])]),t(E,{lines:"two"},{default:s(()=>[(i(!0),w(V,null,x(u.urls,(h,T)=>(i(),c(N,{key:T},{append:s(()=>[t(p,{color:"error",icon:"",size:"small",onClick:Z=>m.clearUrl(u.name,h)},{default:s(()=>[t(d,null,{default:s(()=>[...e[5]||(e[5]=[l("mdi-delete",-1)])]),_:1})]),_:1},8,["onClick"])]),default:s(()=>[t(L,{class:"text-truncate"},{default:s(()=>[l(f(m.getFileName(h)),1)]),_:2},1024),t(P,{class:"text-truncate"},{default:s(()=>[l(f(h),1)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})):o.loading?(i(),c(z,{key:3,type:"article"})):(i(),c(y,{key:4,type:"info"},{default:s(()=>[...e[6]||(e[6]=[l(" 没有找到缓存数据。 ",-1)])]),_:1}))]),_:1})]),_:1})}const W=S(j,[["render",Y]]),$={name:"CacheManagementPage",components:{CacheManager:W},metaInfo:{title:"缓存管理"}},q={class:"d-flex align-center mb-6"},J={class:"d-flex align-center mb-2"},K={class:"d-flex align-center mb-2"};function X(a,e,n,g,o,m){const u=W;return i(),c(U,null,{default:s(()=>[t(M,null,{default:s(()=>[t(k,{cols:"12"},{default:s(()=>[r("div",q,[t(d,{class:"mr-3",color:"primary",size:"x-large"},{default:s(()=>[...e[0]||(e[0]=[l(" mdi-database-cog-outline ",-1)])]),_:1}),e[1]||(e[1]=r("div",null,[r("h1",{class:"text-h4"}," 缓存管理 "),r("div",{class:"text-subtitle-1 text-grey"}," 管理应用的本地缓存资源 ")],-1))]),t(_,{class:"mb-6",color:"info",density:"compact",variant:"tonal"},{default:s(()=>[t(C,{class:"d-flex align-center"},{default:s(()=>[t(d,{class:"mr-2",color:"info"},{default:s(()=>[...e[2]||(e[2]=[l(" mdi-information-outline ",-1)])]),_:1}),e[3]||(e[3]=r("span",null,"在这里您可以查看和管理应用的缓存文件。清除缓存可能会导致应用需要重新下载资源,但有助于解决某些显示问题。",-1))]),_:1})]),_:1}),t(M,null,{default:s(()=>[t(k,{cols:"12",md:"8"},{default:s(()=>[t(_,{class:"mb-4",variant:"tonal"},{default:s(()=>[t(C,null,{default:s(()=>[r("div",J,[t(d,{class:"mr-2",color:"primary"},{default:s(()=>[...e[4]||(e[4]=[l(" mdi-information ",-1)])]),_:1}),e[5]||(e[5]=r("span",{class:"text-h6"},"什么是缓存?",-1))]),e[6]||(e[6]=r("p",null," 缓存是浏览器在本地存储的网站资源副本,如图片、脚本和样式表等。这些缓存可以加快页面加载速度,减少数据使用,并在离线时提供基本功能。 ",-1))]),_:1})]),_:1})]),_:1}),t(k,{cols:"12",md:"4"},{default:s(()=>[t(_,{class:"mb-4",variant:"tonal"},{default:s(()=>[t(C,null,{default:s(()=>[r("div",K,[t(d,{class:"mr-2",color:"warning"},{default:s(()=>[...e[7]||(e[7]=[l(" mdi-lightbulb-outline ",-1)])]),_:1}),e[8]||(e[8]=r("span",{class:"text-h6"},"何时清除缓存?",-1))]),e[9]||(e[9]=r("ul",{class:"pl-4"},[r("li",null,"应用显示过时的内容"),r("li",null,"界面出现异常"),r("li",null,"应用功能不正常")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),t(u)]),_:1})]),_:1})]),_:1})}const oe=S($,[["render",X]]);export{oe as default}; diff --git a/assets/ChatWidget-DKseinU1.js b/assets/ChatWidget-BXhjl6gS.js similarity index 97% rename from assets/ChatWidget-DKseinU1.js rename to assets/ChatWidget-BXhjl6gS.js index 2858a07..7ad7afd 100644 --- a/assets/ChatWidget-DKseinU1.js +++ b/assets/ChatWidget-BXhjl6gS.js @@ -1,3 +1,3 @@ -import{s as Q,g as F,j as D,a as x}from"./socketClient-pOSoE2ci.js";import{_ as V,n as N,e as S,d as w,h as _,f as p,k as K,c as W,g as E,G as j,i as b,o as H,l as q}from"./index-CzpSlHRw.js";import{X as u,_ as m,j as i,Z as a,k as c,S as f,a1 as g,$ as y,F as k,N as M,R as L,V as G,m as J,a2 as U,n as X,Y as $,ae as R,aa as B}from"./vendor-vue-28M5UGz3.js";import{p as O,s as Y}from"./soundList-D9U-Grcp.js";import{V as C}from"./VChip-B3whZF-S.js";import{f as Z,s as ee,c as te}from"./deviceEvents-CH859Fwr.js";import{V as se,a as ie}from"./VTooltip-C8vChj8G.js";import{V as ne,a as T}from"./VRow-sd4d6eNi.js";import{V as oe}from"./VPagination-CwVL3tMR.js";import{V as re}from"./VTextarea-zDVNnlPQ.js";const ae={name:"EventSender",emits:["sent","error"],methods:{async sendEvent(e,t={}){try{return Q(e,t),this.$emit("sent",{eventName:e,content:t,timestamp:new Date().toISOString(),success:!0}),{success:!0,eventId:(t==null?void 0:t.eventId)||null,notificationId:(t==null?void 0:t.notificationId)||null}}catch(o){return console.error("发送事件失败:",o),this.$emit("error",{eventName:e,content:t,error:o.message,timestamp:new Date().toISOString(),success:!1}),{success:!1,error:o.message}}},async sendNotification(e,t=!1,o=[],d={},l=null){const r=`evt-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return this.sendEvent("notification",{eventId:r,notificationId:l,message:e,isUrgent:t,targetDevices:o,senderInfo:d})},async sendReceipt(e,t,o={},d=null){const l=`rcpt-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-receipt",{eventId:l,originalEventId:e,notificationId:d,status:t,deviceInfo:o})},async sendDisplayedReceipt(e={},t=null){const o=`disp-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-displayed",{eventId:o,notificationId:t,deviceInfo:e})},async sendReadReceipt(e={},t=null){const o=`read-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-read",{eventId:o,notificationId:t,deviceInfo:e})}}},le={style:{display:"none"}};function de(e,t,o,d,l,r){return u(),m("div",le)}const P=V(ae,[["render",de]]),ce={name:"UrgentNotification",components:{EventSender:P},data(){return{visible:!1,notificationQueue:[],currentIndex:0,autoCloseTimer:null,urgentSoundTimer:null,currentAudio:null}},computed:{currentNotification(){return this.notificationQueue[this.currentIndex]||null},hasNotifications(){return this.notificationQueue.length>0},hasMultipleNotifications(){return this.notificationQueue.length>1},notificationCountText(){return this.hasMultipleNotifications?`${this.currentIndex+1} / ${this.notificationQueue.length}`:""},isUrgent(){var e,t;return((t=(e=this.currentNotification)==null?void 0:e.content)==null?void 0:t.isUrgent)||!1},urgencyColor(){return this.isUrgent?"red darken-2":"blue darken-2"},iconColor(){return"white"},urgencyIcon(){return this.isUrgent?"mdi-alert-circle-outline":"mdi-information-outline"},urgencyTitle(){return this.isUrgent?"🚨 紧急通知":"📢 通知消息"},senderName(){var t,o,d;const e=((t=this.currentNotification)==null?void 0:t.senderInfo)||((d=(o=this.currentNotification)==null?void 0:o.content)==null?void 0:d.senderInfo);return e?e.deviceName||e.deviceType||"未知设备":"未知发送者"},deviceType(){var t,o,d;const e=((t=this.currentNotification)==null?void 0:t.senderInfo)||((d=(o=this.currentNotification)==null?void 0:o.content)==null?void 0:d.senderInfo);return(e==null?void 0:e.deviceType)=="teacher"?"教师":(e==null?void 0:e.deviceType)=="student"?"学生":(e==null?void 0:e.deviceType)=="classroom"?"教室":(e==null?void 0:e.deviceType)||"未知类型"},targetDevices(){var e,t;return((t=(e=this.currentNotification)==null?void 0:e.content)==null?void 0:t.targetDevices)||[]}},beforeUnmount(){this.autoCloseTimer&&clearTimeout(this.autoCloseTimer),this.urgentSoundTimer&&clearInterval(this.urgentSoundTimer),this.stopNotificationSound()},methods:{show(e){var o;if(this.notificationQueue.findIndex(d=>{var l,r;return((l=d.content)==null?void 0:l.notificationId)===((r=e.content)==null?void 0:r.notificationId)})!==-1){console.log("通知已存在,跳过添加");return}this.notificationQueue.push(e),this.visible?(o=e.content)!=null&&o.isUrgent&&!this.isUrgent?(this.currentIndex=this.notificationQueue.length-1,this.sendDisplayedReceipt(),this.playNotificationSound(),this.sendBrowserNotification(e),this.startUrgentSound()):this.sendBrowserNotification(e):(this.currentIndex=this.notificationQueue.length-1,this.visible=!0,this.sendDisplayedReceipt(),this.playNotificationSound(),this.sendBrowserNotification(e),this.isUrgent&&this.startUrgentSound())},close(){var e,t,o,d;try{this.sendReadReceipt(),console.log("已发送已读回执")}catch(l){console.warn("发送已读回执失败:",l)}if((t=(e=this.currentNotification)==null?void 0:e.content)!=null&&t.message){const l=this.isUrgent?"紧急通知":"通知";this.isUrgent?(o=this.$message)==null||o.error(l,`${this.currentNotification.content.message}`):(d=this.$message)==null||d.info(l,`${this.currentNotification.content.message}`)}this.notificationQueue.length>0&&(this.notificationQueue.splice(this.currentIndex,1),this.currentIndex>=this.notificationQueue.length&&(this.currentIndex=Math.max(0,this.notificationQueue.length-1)),this.notificationQueue.length>0?(this.sendDisplayedReceipt(),this.isUrgent?this.startUrgentSound():this.stopUrgentSound()):this.closeWithoutRead())},closeWithoutRead(){this.visible=!1,this.notificationQueue=[],this.currentIndex=0,this.autoCloseTimer&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.stopUrgentSound()},formatTime(e){if(!e)return"";try{const t=new Date(e);if(new Date-t<24*60*60*1e3){const l=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0");return`${l}:${r}`}else{const l=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${l}/${r}`}}catch{return"无效时间"}},getDeviceTypeLabel(e){return{classroom:"教室设备",student:"学生设备",teacher:"教师设备",admin:"管理员设备",system:"系统设备"}[e]||e},playNotificationSound(){try{this.stopNotificationSound();const e=this.isUrgent?N("notification.urgentSound"):N("notification.singleSound");this.currentAudio=O(e,!1),this.currentAudio||this.playFallbackSound()}catch(e){console.warn("无法播放通知音效:",e),this.playFallbackSound()}},playFallbackSound(){try{const e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),o=e.createGain();t.connect(o),o.connect(e.destination),t.frequency.value=1e3,t.type="sine",o.gain.value=.3,t.start(),t.stop(e.currentTime+.3)}catch(e){console.warn("无法播放备用音效:",e)}},stopNotificationSound(){this.currentAudio&&(Y(this.currentAudio),this.currentAudio=null)},sendDisplayedReceipt(){var e;try{this.$refs.eventSender&&((e=this.currentNotification)!=null&&e.eventId)&&(this.$refs.eventSender.sendDisplayedReceipt({},this.currentNotification.content.notificationId),console.log("已发送显示回执:",this.currentNotification.eventId))}catch(t){console.warn("发送显示回执失败:",t)}},sendReadReceipt(){var e;try{this.$refs.eventSender&&((e=this.currentNotification)!=null&&e.eventId)&&(this.$refs.eventSender.sendReadReceipt({},this.currentNotification.content.notificationId),console.log("已发送已读回执:",this.currentNotification.eventId))}catch(t){console.warn("发送已读回执失败:",t)}},previousNotification(){this.currentIndex>0&&(this.currentIndex--,this.sendDisplayedReceipt(),this.isUrgent?this.startUrgentSound():this.stopUrgentSound())},nextNotification(){this.currentIndex{this.visible&&this.isUrgent?this.playFallbackSound():this.stopUrgentSound()},1e3))},stopUrgentSound(){this.urgentSoundTimer&&(clearInterval(this.urgentSoundTimer),this.urgentSoundTimer=null),this.stopNotificationSound()},async sendBrowserNotification(e){var t,o,d,l;if(!("Notification"in window)){console.warn("浏览器不支持通知API");return}try{let r=Notification.permission;if(r==="default"&&(r=await Notification.requestPermission()),r!=="granted"){console.warn("用户未授予通知权限");return}const I=((t=e.content)==null?void 0:t.message)||"新通知",n=e.senderInfo||((o=e.content)==null?void 0:o.senderInfo),v=(n==null?void 0:n.deviceName)||(n==null?void 0:n.deviceType)||"未知发送者",s=((d=e.content)==null?void 0:d.isUrgent)||!1,h=new Notification(s?"🚨 紧急通知":"📢 通知消息",{body:`${I} +import{s as Q,g as F,j as D,a as x}from"./socketClient-BKHEsaLg.js";import{_ as V,n as N,e as S,d as w,h as _,f as p,k as K,c as W,g as E,G as j,i as b,o as H,l as q}from"./index-DGIAsv4W.js";import{X as u,_ as m,j as i,Z as a,k as c,S as f,a1 as g,$ as y,F as k,N as M,R as L,V as G,m as J,a2 as U,n as X,Y as $,ae as R,aa as B}from"./vendor-vue-BiQC5iF7.js";import{p as O,s as Y}from"./soundList-D9U-Grcp.js";import{V as C}from"./VChip-mRzIPuM0.js";import{f as Z,s as ee,c as te}from"./deviceEvents-HN9RDua9.js";import{V as se,a as ie}from"./VTooltip-2IUjfpCS.js";import{V as ne,a as T}from"./VRow-Cjhiymuu.js";import{V as oe}from"./VPagination-DLzhjdaP.js";import{V as re}from"./VTextarea-vGWmTJww.js";const ae={name:"EventSender",emits:["sent","error"],methods:{async sendEvent(e,t={}){try{return Q(e,t),this.$emit("sent",{eventName:e,content:t,timestamp:new Date().toISOString(),success:!0}),{success:!0,eventId:(t==null?void 0:t.eventId)||null,notificationId:(t==null?void 0:t.notificationId)||null}}catch(o){return console.error("发送事件失败:",o),this.$emit("error",{eventName:e,content:t,error:o.message,timestamp:new Date().toISOString(),success:!1}),{success:!1,error:o.message}}},async sendNotification(e,t=!1,o=[],d={},l=null){const r=`evt-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return this.sendEvent("notification",{eventId:r,notificationId:l,message:e,isUrgent:t,targetDevices:o,senderInfo:d})},async sendReceipt(e,t,o={},d=null){const l=`rcpt-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-receipt",{eventId:l,originalEventId:e,notificationId:d,status:t,deviceInfo:o})},async sendDisplayedReceipt(e={},t=null){const o=`disp-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-displayed",{eventId:o,notificationId:t,deviceInfo:e})},async sendReadReceipt(e={},t=null){const o=`read-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;return this.sendEvent("notification-read",{eventId:o,notificationId:t,deviceInfo:e})}}},le={style:{display:"none"}};function de(e,t,o,d,l,r){return u(),m("div",le)}const P=V(ae,[["render",de]]),ce={name:"UrgentNotification",components:{EventSender:P},data(){return{visible:!1,notificationQueue:[],currentIndex:0,autoCloseTimer:null,urgentSoundTimer:null,currentAudio:null}},computed:{currentNotification(){return this.notificationQueue[this.currentIndex]||null},hasNotifications(){return this.notificationQueue.length>0},hasMultipleNotifications(){return this.notificationQueue.length>1},notificationCountText(){return this.hasMultipleNotifications?`${this.currentIndex+1} / ${this.notificationQueue.length}`:""},isUrgent(){var e,t;return((t=(e=this.currentNotification)==null?void 0:e.content)==null?void 0:t.isUrgent)||!1},urgencyColor(){return this.isUrgent?"red darken-2":"blue darken-2"},iconColor(){return"white"},urgencyIcon(){return this.isUrgent?"mdi-alert-circle-outline":"mdi-information-outline"},urgencyTitle(){return this.isUrgent?"🚨 紧急通知":"📢 通知消息"},senderName(){var t,o,d;const e=((t=this.currentNotification)==null?void 0:t.senderInfo)||((d=(o=this.currentNotification)==null?void 0:o.content)==null?void 0:d.senderInfo);return e?e.deviceName||e.deviceType||"未知设备":"未知发送者"},deviceType(){var t,o,d;const e=((t=this.currentNotification)==null?void 0:t.senderInfo)||((d=(o=this.currentNotification)==null?void 0:o.content)==null?void 0:d.senderInfo);return(e==null?void 0:e.deviceType)=="teacher"?"教师":(e==null?void 0:e.deviceType)=="student"?"学生":(e==null?void 0:e.deviceType)=="classroom"?"教室":(e==null?void 0:e.deviceType)||"未知类型"},targetDevices(){var e,t;return((t=(e=this.currentNotification)==null?void 0:e.content)==null?void 0:t.targetDevices)||[]}},beforeUnmount(){this.autoCloseTimer&&clearTimeout(this.autoCloseTimer),this.urgentSoundTimer&&clearInterval(this.urgentSoundTimer),this.stopNotificationSound()},methods:{show(e){var o;if(this.notificationQueue.findIndex(d=>{var l,r;return((l=d.content)==null?void 0:l.notificationId)===((r=e.content)==null?void 0:r.notificationId)})!==-1){console.log("通知已存在,跳过添加");return}this.notificationQueue.push(e),this.visible?(o=e.content)!=null&&o.isUrgent&&!this.isUrgent?(this.currentIndex=this.notificationQueue.length-1,this.sendDisplayedReceipt(),this.playNotificationSound(),this.sendBrowserNotification(e),this.startUrgentSound()):this.sendBrowserNotification(e):(this.currentIndex=this.notificationQueue.length-1,this.visible=!0,this.sendDisplayedReceipt(),this.playNotificationSound(),this.sendBrowserNotification(e),this.isUrgent&&this.startUrgentSound())},close(){var e,t,o,d;try{this.sendReadReceipt(),console.log("已发送已读回执")}catch(l){console.warn("发送已读回执失败:",l)}if((t=(e=this.currentNotification)==null?void 0:e.content)!=null&&t.message){const l=this.isUrgent?"紧急通知":"通知";this.isUrgent?(o=this.$message)==null||o.error(l,`${this.currentNotification.content.message}`):(d=this.$message)==null||d.info(l,`${this.currentNotification.content.message}`)}this.notificationQueue.length>0&&(this.notificationQueue.splice(this.currentIndex,1),this.currentIndex>=this.notificationQueue.length&&(this.currentIndex=Math.max(0,this.notificationQueue.length-1)),this.notificationQueue.length>0?(this.sendDisplayedReceipt(),this.isUrgent?this.startUrgentSound():this.stopUrgentSound()):this.closeWithoutRead())},closeWithoutRead(){this.visible=!1,this.notificationQueue=[],this.currentIndex=0,this.autoCloseTimer&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.stopUrgentSound()},formatTime(e){if(!e)return"";try{const t=new Date(e);if(new Date-t<24*60*60*1e3){const l=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0");return`${l}:${r}`}else{const l=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${l}/${r}`}}catch{return"无效时间"}},getDeviceTypeLabel(e){return{classroom:"教室设备",student:"学生设备",teacher:"教师设备",admin:"管理员设备",system:"系统设备"}[e]||e},playNotificationSound(){try{this.stopNotificationSound();const e=this.isUrgent?N("notification.urgentSound"):N("notification.singleSound");this.currentAudio=O(e,!1),this.currentAudio||this.playFallbackSound()}catch(e){console.warn("无法播放通知音效:",e),this.playFallbackSound()}},playFallbackSound(){try{const e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),o=e.createGain();t.connect(o),o.connect(e.destination),t.frequency.value=1e3,t.type="sine",o.gain.value=.3,t.start(),t.stop(e.currentTime+.3)}catch(e){console.warn("无法播放备用音效:",e)}},stopNotificationSound(){this.currentAudio&&(Y(this.currentAudio),this.currentAudio=null)},sendDisplayedReceipt(){var e;try{this.$refs.eventSender&&((e=this.currentNotification)!=null&&e.eventId)&&(this.$refs.eventSender.sendDisplayedReceipt({},this.currentNotification.content.notificationId),console.log("已发送显示回执:",this.currentNotification.eventId))}catch(t){console.warn("发送显示回执失败:",t)}},sendReadReceipt(){var e;try{this.$refs.eventSender&&((e=this.currentNotification)!=null&&e.eventId)&&(this.$refs.eventSender.sendReadReceipt({},this.currentNotification.content.notificationId),console.log("已发送已读回执:",this.currentNotification.eventId))}catch(t){console.warn("发送已读回执失败:",t)}},previousNotification(){this.currentIndex>0&&(this.currentIndex--,this.sendDisplayedReceipt(),this.isUrgent?this.startUrgentSound():this.stopUrgentSound())},nextNotification(){this.currentIndex{this.visible&&this.isUrgent?this.playFallbackSound():this.stopUrgentSound()},1e3))},stopUrgentSound(){this.urgentSoundTimer&&(clearInterval(this.urgentSoundTimer),this.urgentSoundTimer=null),this.stopNotificationSound()},async sendBrowserNotification(e){var t,o,d,l;if(!("Notification"in window)){console.warn("浏览器不支持通知API");return}try{let r=Notification.permission;if(r==="default"&&(r=await Notification.requestPermission()),r!=="granted"){console.warn("用户未授予通知权限");return}const I=((t=e.content)==null?void 0:t.message)||"新通知",n=e.senderInfo||((o=e.content)==null?void 0:o.senderInfo),v=(n==null?void 0:n.deviceName)||(n==null?void 0:n.deviceType)||"未知发送者",s=((d=e.content)==null?void 0:d.isUrgent)||!1,h=new Notification(s?"🚨 紧急通知":"📢 通知消息",{body:`${I} 来自: ${v}`,icon:"/pwa/image/icon-192.png",badge:"/pwa/image/icon-192.png",tag:((l=e.content)==null?void 0:l.notificationId)||`notification-${Date.now()}`,requireInteraction:s,silent:!1,vibrate:s?[200,100,200,100,200]:[200],timestamp:e.timestamp||Date.now()});h.onclick=()=>{window.focus(),h.close()},s||setTimeout(()=>{h.close()},1e4)}catch(r){console.error("发送浏览器通知失败:",r)}}}},ue={class:"urgent-title mb-6"},he={class:"urgent-subtitle mb-6"},fe={key:0,class:"navigation-controls mt-6"},me={class:"notification-counter mb-3"},ge={class:"navigation-buttons"},pe={class:"mt-8"};function ve(e,t,o,d,l,r){const I=P;return u(),m(k,null,[i(K,{modelValue:l.visible,"onUpdate:modelValue":t[0]||(t[0]=n=>l.visible=n),"max-width":"800",persistent:"",transition:"dialog-transition",class:"urgent-notification-dialog"},{default:a(()=>[i(S,{class:"urgent-notification-card",color:r.urgencyColor,elevation:"24"},{default:a(()=>[i(w,null,{default:a(()=>{var n,v,s;return[c("div",ue,f(((v=(n=r.currentNotification)==null?void 0:n.content)==null?void 0:v.message)||"无内容"),1),c("div",he,f(r.senderName)+" "+f(r.deviceType)+" "+f(r.formatTime((s=r.currentNotification)==null?void 0:s.timestamp)),1),r.hasMultipleNotifications?(u(),m("div",fe,[i(S,{variant:"flat",color:"rgba(255,255,255,0.1)"},{default:a(()=>[i(w,{class:"text-center"},{default:a(()=>[c("div",me,[i(C,{color:"white",variant:"flat",size:"small"},{default:a(()=>[g(f(r.notificationCountText),1)]),_:1})]),c("div",ge,[i(_,{disabled:l.currentIndex===0,color:"white",variant:"outlined",size:"small",onClick:r.previousNotification},{default:a(()=>[i(p,null,{default:a(()=>[...t[1]||(t[1]=[g(" mdi-chevron-left ",-1)])]),_:1}),t[2]||(t[2]=g(" 上一个 ",-1))]),_:1},8,["disabled","onClick"]),i(_,{disabled:l.currentIndex===l.notificationQueue.length-1,color:"white",variant:"outlined",size:"small",class:"ml-2",onClick:r.nextNotification},{default:a(()=>[t[4]||(t[4]=g(" 下一个 ",-1)),i(p,null,{default:a(()=>[...t[3]||(t[3]=[g(" mdi-chevron-right ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1})])):y("",!0),c("div",pe,[i(_,{color:"white",size:"large",variant:"flat",onClick:r.close},{default:a(()=>[i(p,{left:""},{default:a(()=>[...t[5]||(t[5]=[g(" mdi-check ",-1)])]),_:1}),t[6]||(t[6]=g(" 我知道了 ",-1))]),_:1},8,["onClick"])])]}),_:1})]),_:1},8,["color"])]),_:1},8,["modelValue"]),i(I,{ref:"eventSender"},null,512)],64)}const z=V(ce,[["render",ve],["__scopeId","data-v-103eca06"]]),ye={name:"ChatWidget",components:{UrgentNotification:z},props:{modelValue:{type:Boolean,default:!1},showButton:{type:Boolean,default:!0},offset:{type:Number,default:16},width:{type:Number,default:380},height:{type:Number,default:520}},emits:["update:modelValue"],data(){return{visible:this.modelValue,text:"",messages:[],allEvents:[],lastVisit:null,unreadCount:0,connected:!1,socketId:"",currentMode:"chat",currentPage:1,itemsPerPage:20,loading:!1,isDestroying:!1,eventStats:{chat:0,kvChanged:0,other:0},cleanupFunctions:[]}},computed:{panelStyle(){return{right:this.offset+"px",bottom:this.offset+"px",width:this.width+"px",height:this.height+"px"}},toggleStyle(){return{right:this.offset+"px",bottom:this.offset+"px"}},canSend(){return!!(N("server.kvToken")&&this.text.trim())},showToggleButton(){return this.$props.showButton&&!this.visible},decoratedMessages(){if(!this.lastVisit)return this.messages;const e=this.messages.findIndex(d=>d.at&&new Date(d.at).getTime()>=new Date(this.lastVisit).getTime());if(e<=0)return this.messages;const t=this.messages.slice(0,e),o=this.messages.slice(e);return[...t,{_id:"divider",_type:"divider"},...o]},currentDisplayItems(){return this.currentMode==="chat"?this.decoratedMessages:this.paginatedEvents},paginatedEvents(){if(this.isDestroying||!this.allEvents)return[];const e=(this.currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage;return this.allEvents.slice(e,t)},totalPages(){return this.isDestroying||!this.allEvents?1:Math.ceil(this.allEvents.length/this.itemsPerPage)},modeTitle(){return this.currentMode==="chat"?"设备聊天室":"所有事件"}},watch:{modelValue(e){this.visible=e,e&&this.onOpen()}},mounted(){try{const s=localStorage.getItem("chat.lastVisit");s&&(this.lastVisit=s)}catch{}const e=F();this.connected=!!e.connected,this.socketId=e.id||"",e.on("connect",()=>{this.connected=!0,this.socketId=e.id||""}),e.on("disconnect",()=>{this.connected=!1});const t=N("server.kvToken");t&&D(t);const o=s=>(...h)=>{if(!this.isDestroying)try{s(...h)}catch(A){console.error("ChatWidget 事件处理错误:",A)}},d=x("chat:message",o(s=>{this.pushMessage(s),this.addEvent({_id:`legacy-chat-${Date.now()}-${Math.random()}`,type:"chat:message",content:s,timestamp:s.at||new Date().toISOString(),senderId:s.senderId,uuid:s.uuid,senderInfo:s.senderInfo})})),l=x("chat",o(s=>{if(s&&s.content&&s.content.text){const h={text:s.content.text,senderId:s.senderId,at:s.timestamp,uuid:s.senderId,senderInfo:s.senderInfo};this.pushMessage(h),this.addEvent({_id:s.eventId||`chat-${Date.now()}-${Math.random()}`,type:"chat",content:s.content,timestamp:s.timestamp,eventId:s.eventId,senderId:s.senderId,senderInfo:s.senderInfo})}}));this.deviceEventHandler=te({onChat:o((s,h)=>{this.pushMessage(s),this.addEvent(h)}),onKvChanged:o((s,h)=>{this.addEvent(h)}),onUrgentNotice:o((s,h)=>{this.addEvent(h),this.showUrgentNotification(h)}),onNotification:o((s,h)=>{console.log("收到通知事件:",s,h),this.addEvent(h),this.showUrgentNotification(h)}),onOtherEvent:o(s=>{(s.type==="urgent-notice"||s.type==="notification")&&this.showUrgentNotification(s),this.addEvent(s)}),enableLegacySupport:!0});const r=x("device-event",this.deviceEventHandler),I=x("kv-key-changed",o(s=>{s.content&&s.timestamp?this.addEvent({_id:`kv-${Date.now()}-${Math.random()}`,type:"kv-key-changed",content:s.content,timestamp:s.timestamp,eventId:s.eventId,senderId:s.senderId,senderInfo:s.senderInfo}):this.addEvent({_id:`legacy-kv-${Date.now()}-${Math.random()}`,type:"kv-key-changed",content:s,timestamp:s.updatedAt||new Date().toISOString(),uuid:s.uuid})})),n=x("urgent-notice",o(s=>{console.log("收到紧急通知:",s),this.addEvent({_id:`urgent-${Date.now()}-${Math.random()}`,type:"urgent-notice",content:s.content||s,timestamp:s.timestamp||new Date().toISOString(),eventId:s.eventId,senderId:s.senderId,senderInfo:s.senderInfo}),this.showUrgentNotification(s)})),v=x("notification",o(s=>{var h;console.log("收到通知事件:",s),this.addEvent({_id:`notification-${Date.now()}-${Math.random()}`,type:"notification",content:s.content||s,timestamp:s.timestamp||new Date().toISOString(),eventId:s.eventId,senderId:s.senderId,senderInfo:s.senderInfo||((h=s.content)==null?void 0:h.senderInfo)}),this.showUrgentNotification(s)}));this.cleanupFunctions=[d,l,n,v,r,I],this.visible&&this.onOpen()},beforeUnmount(){this.isDestroying=!0,this.cleanupFunctions&&Array.isArray(this.cleanupFunctions)&&this.cleanupFunctions.forEach(e=>{try{typeof e=="function"&&e()}catch(t){console.warn("ChatWidget 清理函数执行失败:",t)}});try{this.offMessage&&this.offMessage(),this.offDeviceEvent&&this.offDeviceEvent(),this.offKvChanged&&this.offKvChanged()}catch(e){console.warn("ChatWidget 旧清理函数执行失败:",e)}this.cleanupFunctions=[],this.messages=[],this.allEvents=[]},methods:{open(){this.visible=!0,this.$emit("update:modelValue",!0),this.onOpen()},close(){this.visible=!1,this.$emit("update:modelValue",!1);try{localStorage.setItem("chat.lastVisit",new Date().toISOString())}catch{}this.unreadCount=0},onOpen(){this.$nextTick(()=>this.scrollToBottom())},insertEmoji(e){this.text+=e,this.$nextTick(()=>{var t,o;if((o=(t=this.$refs.inputRef)==null?void 0:t.$el)!=null&&o.querySelector){const d=this.$refs.inputRef.$el.querySelector("textarea");d==null||d.focus()}})},handleEnter(e){e.shiftKey||this.send()},send(){const e=this.text.trim();if(!e)return;const t={_id:`self-${Date.now()}-${Math.random()}`,text:e,at:new Date().toISOString(),senderId:this.socketId,self:!0,senderInfo:{deviceName:"我",deviceType:"client",isReadOnly:!1}};this.pushMessage(t),this.addEvent({_id:`self-event-${Date.now()}-${Math.random()}`,type:"chat",content:{text:e},timestamp:new Date().toISOString(),senderId:this.socketId,senderInfo:{deviceName:"本设备",deviceType:"client",isReadOnly:!1}}),ee(e),this.text=""},pushMessage(e){if(!(this.isDestroying||!e))try{const t={_id:`${e.at||Date.now()}-${Math.random()}`,text:typeof(e==null?void 0:e.text)=="string"?e.text:(e==null?void 0:e.text)||"",at:e.at||new Date().toISOString(),senderId:e.senderId,self:!!(e.senderId&&e.senderId===this.socketId),senderInfo:e.senderInfo||null,deviceName:this.getDeviceName(e.senderInfo,e.senderId===this.socketId)};if(!t.text)return;this.messages.push(t),this.visible||this.unreadCount++,this.$nextTick(()=>{this.isDestroying||this.scrollToBottom()}),this.messages.length>500&&this.messages.shift()}catch(t){console.error("ChatWidget pushMessage 错误:",t)}},formatTime(e){try{const t=new Date(e),o=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0");return`${o}:${d}`}catch{return""}},scrollToBottom(){if(!this.isDestroying)try{const e=this.$refs.listRef;if(!e)return;requestAnimationFrame(()=>{!this.isDestroying&&e&&(e.scrollTop=e.scrollHeight)})}catch(e){console.warn("ChatWidget scrollToBottom 错误:",e)}},addEvent(e){if(!(this.isDestroying||!e))try{this.allEvents.unshift(e),e.type==="chat"||e.type==="chat:message"?this.eventStats.chat++:e.type==="kv-key-changed"?this.eventStats.kvChanged++:this.eventStats.other++,this.allEvents.length>200&&(this.allEvents=this.allEvents.slice(0,200))}catch(t){console.error("ChatWidget addEvent 错误:",t)}},getEventColor(e){switch(e){case"chat":case"chat:message":return"success";case"kv-key-changed":return"info";default:return"warning"}},getEventTypeLabel(e){switch(e){case"chat":case"chat:message":return"聊天";case"kv-key-changed":return"KV变化";default:return e}},formatDeviceInfo(e){return Z(e)},getDeviceName(e,t=!1){return t?"我":e?e.deviceName==="realtime"?"系统":e.deviceName||e.deviceType||"未知设备":"未知设备"},showUrgentNotification(e){try{this.$refs.urgentNotification?this.$refs.urgentNotification.show(e):console.warn("紧急通知组件未找到")}catch(t){console.error("显示紧急通知失败:",t)}}}},_e={class:"text-subtitle-1"},Ie={key:0,ref:"listRef",class:"messages"},Se={key:0,class:"divider-row"},we={class:"avatar"},xe={class:"bubble"},ke={key:0,class:"sender-name"},Ne={class:"text"},be={class:"meta"},Te={key:0,class:"device-name"},Ce={key:1,class:"events-container"},Ve={class:"event-stats mb-3"},Ee={class:"text-h6"},Me={class:"text-h6"},Ue={class:"text-h6"},$e={class:"events-list"},Re={class:"d-flex align-center mb-1"},Be={class:"text-caption"},Oe={key:0,class:"mb-1 text-caption"},Pe={class:"event-content"},ze={key:0,class:"chat-content"},Ae={key:1,class:"text-caption event-data"},Qe={key:0,class:"text-center text-grey pa-4"},Fe={key:0,class:"pagination mt-2"};function De(e,t,o,d,l,r){const I=z;return u(),m(k,null,[r.showToggleButton?(u(),m("div",{key:0,style:M(r.toggleStyle),class:"chat-toggle"},[i(_,{color:"primary",icon:"",variant:"flat",onClick:t[0]||(t[0]=n=>r.open())},{default:a(()=>[i(se,{content:l.unreadCount||void 0,"model-value":l.unreadCount>0,color:"error",overlap:""},{default:a(()=>[i(p,null,{default:a(()=>[...t[7]||(t[7]=[g(" mdi-chat ",-1)])]),_:1})]),_:1},8,["content","model-value"])]),_:1})],4)):y("",!0),L(c("div",{style:M(r.panelStyle),class:"chat-panel"},[i(S,{border:"",class:"chat-card",elevation:"8"},{default:a(()=>[i(W,{class:"d-flex align-center"},{default:a(()=>[i(p,{class:"mr-2"},{default:a(()=>[...t[8]||(t[8]=[g(" mdi-chat-processing ",-1)])]),_:1}),c("span",_e,f(r.modeTitle),1),i(E),i(j,{modelValue:l.currentMode,"onUpdate:modelValue":t[1]||(t[1]=n=>l.currentMode=n),class:"mr-2",mandatory:"",size:"small",variant:"outlined"},{default:a(()=>[i(_,{value:"chat",size:"small"},{default:a(()=>[i(p,null,{default:a(()=>[...t[9]||(t[9]=[g("mdi-chat",-1)])]),_:1})]),_:1}),i(_,{value:"events",size:"small"},{default:a(()=>[i(p,null,{default:a(()=>[...t[10]||(t[10]=[g("mdi-format-list-bulleted",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"]),i(ie,{location:"top"},{activator:a(({props:n})=>[i(C,J({color:l.connected?"success":"grey",size:"x-small"},n,{variant:"tonal"}),{default:a(()=>[g(f(l.connected?"已连接":"未连接"),1)]),_:1},16,["color"])]),default:a(()=>[c("span",null,"Socket "+f(l.socketId||"-"),1)]),_:1}),i(_,{icon:"",variant:"text",onClick:t[2]||(t[2]=n=>r.close())},{default:a(()=>[i(p,null,{default:a(()=>[...t[11]||(t[11]=[g("mdi-close",-1)])]),_:1})]),_:1})]),_:1}),i(b),i(w,{class:"chat-body"},{default:a(()=>[l.currentMode==="chat"?(u(),m("div",Ie,[(u(!0),m(k,null,U(r.decoratedMessages,n=>(u(),m(k,{key:n._id},[n._type==="divider"?(u(),m("div",Se,[i(b,{class:"my-2"}),t[12]||(t[12]=c("div",{class:"divider-text"}," 今天 - 上次访问 ",-1)),i(b,{class:"my-2"})])):(u(),m("div",{key:1,class:X([{self:n.self},"message-row"])},[c("div",we,[i(H,{color:n.self?"primary":"grey",size:"24"},{default:a(()=>[i(p,{size:"small"},{default:a(()=>[g(f(n.self?"mdi-account":"mdi-account-outline"),1)]),_:2},1024)]),_:2},1032,["color"])]),c("div",xe,[!n.self&&n.deviceName?(u(),m("div",ke,f(n.deviceName),1)):y("",!0),c("div",Ne,f(n.text),1),c("div",be,[n.self&&n.deviceName?(u(),m("span",Te,f(n.deviceName)+" • ",1)):y("",!0),g(" "+f(r.formatTime(n.at)),1)])])],2))],64))),128))],512)):(u(),m("div",Ce,[c("div",Ve,[i(ne,{dense:""},{default:a(()=>[i(T,{cols:"4"},{default:a(()=>[i(S,{color:"success",dark:"",size:"small"},{default:a(()=>[i(w,{class:"text-center pa-2"},{default:a(()=>[c("div",Ee,f(l.eventStats.chat),1),t[13]||(t[13]=c("div",{class:"text-caption"}," 聊天 ",-1))]),_:1})]),_:1})]),_:1}),i(T,{cols:"4"},{default:a(()=>[i(S,{color:"info",dark:"",size:"small"},{default:a(()=>[i(w,{class:"text-center pa-2"},{default:a(()=>[c("div",Me,f(l.eventStats.kvChanged),1),t[14]||(t[14]=c("div",{class:"text-caption"}," KV变化 ",-1))]),_:1})]),_:1})]),_:1}),i(T,{cols:"4"},{default:a(()=>[i(S,{color:"warning",dark:"",size:"small"},{default:a(()=>[i(w,{class:"text-center pa-2"},{default:a(()=>[c("div",Ue,f(l.eventStats.other),1),t[15]||(t[15]=c("div",{class:"text-caption"}," 其他 ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),c("div",$e,[(u(!0),m(k,null,U(r.paginatedEvents,n=>(u(),m("div",{key:n._id,class:"event-item mb-2"},[i(S,{color:r.getEventColor(n.type),size:"small",variant:"outlined"},{default:a(()=>[i(w,{class:"pa-2"},{default:a(()=>{var v;return[c("div",Re,[i(C,{color:r.getEventColor(n.type),size:"x-small"},{default:a(()=>[g(f(r.getEventTypeLabel(n.type)),1)]),_:2},1032,["color"]),i(E),c("span",Be,f(r.formatTime(n.timestamp||n.at)),1)]),n.senderInfo?(u(),m("div",Oe,[t[16]||(t[16]=c("strong",null,"发送者:",-1)),g(" "+f(r.formatDeviceInfo(n.senderInfo)),1)])):y("",!0),c("div",Pe,[n.type==="chat"||n.type==="chat:message"?(u(),m("div",ze,f(((v=n.content)==null?void 0:v.text)||n.text),1)):(u(),m("pre",Ae,f(JSON.stringify(n.content||n,null,1)),1))])]}),_:2},1024)]),_:2},1032,["color"])]))),128)),l.allEvents.length===0?(u(),m("div",Qe," 暂无事件 ")):y("",!0)]),r.totalPages>1?(u(),m("div",Fe,[i(oe,{modelValue:l.currentPage,"onUpdate:modelValue":t[3]||(t[3]=n=>l.currentPage=n),length:r.totalPages,"total-visible":3,size:"small"},null,8,["modelValue","length"])])):y("",!0)]))]),_:1}),l.currentMode==="chat"?(u(),$(b,{key:0})):y("",!0),l.currentMode==="chat"?(u(),$(q,{key:1,class:"chat-input"},{default:a(()=>[i(_,{class:"mr-1",icon:"",variant:"text",onClick:t[4]||(t[4]=n=>r.insertEmoji("😄"))},{default:a(()=>[i(p,null,{default:a(()=>[...t[17]||(t[17]=[g("mdi-emoticon-outline",-1)])]),_:1})]),_:1}),i(re,{ref:"inputRef",modelValue:l.text,"onUpdate:modelValue":t[5]||(t[5]=n=>l.text=n),"auto-grow":"",class:"flex-grow-1","hide-details":"",placeholder:"输入消息",rows:"1",variant:"solo",onKeydown:[R(B(r.handleEnter,["prevent"]),["enter"]),t[6]||(t[6]=R(B(()=>{},["shift","stop"]),["enter"]))]},null,8,["modelValue","onKeydown"]),i(_,{disabled:!r.canSend,class:"ml-2",color:"primary",onClick:r.send},{default:a(()=>[i(p,{start:""},{default:a(()=>[...t[18]||(t[18]=[g(" mdi-send ",-1)])]),_:1}),t[19]||(t[19]=g(" 发送 ",-1))]),_:1},8,["disabled","onClick"])]),_:1})):y("",!0)]),_:1})],4),[[G,l.visible]]),i(I,{ref:"urgentNotification"},null,512)],64)}const Ke=V(ye,[["render",De],["__scopeId","data-v-1a62ac2a"]]),et=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{et as C,P as _,Ke as a}; diff --git a/assets/ExamConfigEditor-Dw1BoZRS.js b/assets/ExamConfigEditor-BVwEXehR.js similarity index 97% rename from assets/ExamConfigEditor-Dw1BoZRS.js rename to assets/ExamConfigEditor-BVwEXehR.js index d5dcc8f..81f9d52 100644 --- a/assets/ExamConfigEditor-Dw1BoZRS.js +++ b/assets/ExamConfigEditor-BVwEXehR.js @@ -1,2 +1,2 @@ -import{d as x}from"./dataProvider-DBZnFcYO.js";import{X as g,_ as v,Y as y,Z as a,k as c,j as s,a1 as m,S as D,$ as C,F as E,a2 as M,aa as q,R as Y,V as G,m as J}from"./vendor-vue-28M5UGz3.js";import{_ as K,f as p,p as R,q as O,r as X,d as w,e as b,h,G as Z,c as V,g as k,a5 as Q,i as W,l as L,k as $}from"./index-CzpSlHRw.js";import{V as A}from"./VAlert-DaoJAibO.js";import{V as ee}from"./VSkeletonLoader-Bqlz0ln3.js";import{a as _}from"./VTooltip-C8vChj8G.js";import{V as z,a as te}from"./VChip-B3whZF-S.js";import{a as T,V as I}from"./VRow-sd4d6eNi.js";import{V as N}from"./VTextField-BxdS2D7S.js";import{V as ae}from"./VTextarea-zDVNnlPQ.js";import{V as se}from"./VSwitch-DcxT6NgQ.js";import{V as re}from"./VAutocomplete-D8Wr7ywO.js";import{V as B}from"./VSheet-ZjkOR-Oc.js";import{V as P}from"./VDatePicker-BJ3ukfdk.js";import{V as H}from"./VTimePicker-DvAq_vLK.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";import"./vendor-vuetify-95axeNJO.js";import"./VSelect-DZBjiB3J.js";import"./VCheckboxBtn-BLxCsxXE.js";import"./VPicker-199veasp.js";const le={name:"ExamConfigEditor",props:{configId:{type:String,required:!0},dialogMode:{type:Boolean,default:!1}},emits:["saved","error","opened","deleted"],data(){return{localConfig:{examName:"",message:"",room:"",examInfos:[]},loading:!1,saving:!1,deleting:!1,deleteDialog:!1,error:"",success:"",isEditMode:!1,showJsonPreview:!1,availableSubjects:[],customSubjectInput:"",enableCustomAlertTime:!1,defaultExamTips:["请保持卷面整洁,字迹清晰,诚信应考。在听到终考铃时立刻起立,停止作答。","沉着 冷静 细心 守记","答题不守记,自己两行泪。"]}},computed:{formattedJson(){try{return JSON.stringify(this.localConfig,null,2)}catch(t){return console.error("格式化JSON时出错:",t),"无效的JSON格式"}},formattedStorageJson(){try{const t={examName:this.localConfig.examName,message:this.localConfig.message,room:this.localConfig.room,examInfos:this.localConfig.examInfos.map(e=>({name:e.name,start:this.formatDisplayDateTime(e.start),end:this.formatDisplayDateTime(e.end),alertTime:parseInt(e.alertTime)||15}))};return JSON.stringify(t,null,2)}catch(t){return console.error("格式化存储JSON时出错:",t),"无效的JSON格式"}},isValidConfig(){return this.localConfig.examName&&this.localConfig.message&&this.localConfig.examInfos&&this.localConfig.examInfos.length>0&&this.localConfig.examInfos.every(t=>t.name&&t.start&&t.end)},validationErrors(){const t=[];if((!this.localConfig.examName||this.localConfig.examName.trim()==="")&&t.push("考试名称不能为空"),(!this.localConfig.message||this.localConfig.message.trim()==="")&&t.push("考试提示不能为空"),!this.localConfig.examInfos||this.localConfig.examInfos.length===0)t.push("至少需要添加一个考试科目");else{this.localConfig.examInfos.forEach((e,i)=>{const l=`第${i+1}个科目`;if((!e.name||e.name.trim()==="")&&t.push(`${l}的名称不能为空`),e.start||t.push(`${l}的开始时间不能为空`),e.end||t.push(`${l}的结束时间不能为空`),e.start&&e.end){const r=new Date(e.start),n=new Date(e.end);isNaN(r.getTime())&&t.push(`${l}的开始时间格式不正确`),isNaN(n.getTime())&&t.push(`${l}的结束时间格式不正确`),!isNaN(r.getTime())&&!isNaN(n.getTime())&&(n<=r&&t.push(`${l}的结束时间必须晚于开始时间`),(n-r)/(1e3*60*60)>24&&t.push(`${l}的考试时长不能超过24小时`))}});for(let e=0;eu&&t.push(`第${e+1}个科目与第${i+1}个科目的时间有重叠`)}}}return t},hasValidationErrors(){return this.validationErrors.length>0}},watch:{configId:{immediate:!0,handler(t){t&&this.loadConfig()}}},created(){this.loadSubjects()},methods:{async loadSubjects(){try{const t=await x.loadData("classworks-config-subject");t&&Array.isArray(t)?this.availableSubjects=t.sort((e,i)=>(e.order??0)-(i.order??0)).map(e=>({name:e.name,order:e.order??0})):this.availableSubjects=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8}]}catch(t){console.warn("加载科目列表失败,使用默认列表:",t),this.availableSubjects=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8}]}},autoFillRemaining(){if(this.localConfig.examInfos.length===0)return;let t=null;for(let e=this.localConfig.examInfos.length-1;e>=0;e--)if(this.localConfig.examInfos[e].end){t=new Date(this.localConfig.examInfos[e].end);break}t||(t=new Date);for(let e=0;e12)return`${e}月份不合法(1-12)`;if(S<1||S>31)return`${e}日期不合法(1-31)`;if(U<0||U>23)return`${e}小时不合法(0-23)`;if(F<0||F>59)return`${e}分钟不合法(0-59)`;const j=new Date(d,f-1,S,U,F);return isNaN(j.getTime())?`${e}日期不存在`:j.getMonth()!==f-1||j.getDate()!==S?`${e}日期不存在`:!0},validateEndAfterStart(t){if(!t.startFormatted||!t.endFormatted)return!0;try{const e=new Date(t.start||t.startFormatted.replace(/\//g,"-")),i=new Date(t.end||t.endFormatted.replace(/\//g,"-"));return isNaN(e.getTime())||isNaN(i.getTime())?!0:i<=e?"结束时间必须晚于开始时间":(i.getTime()-e.getTime())/(1e3*60*60)>24?"考试时长不能超过24小时":!0}catch{return!0}},validateNoTimeOverlap(t,e){if(!t.startFormatted||!t.endFormatted)return!0;try{const i=new Date(t.start||t.startFormatted.replace(/\//g,"-")),l=new Date(t.end||t.endFormatted.replace(/\//g,"-"));if(isNaN(i.getTime())||isNaN(l.getTime()))return!0;for(let r=0;r=o&&io&&l<=u||i<=o&&l>=u)return`时间与"${n.name||`第${r+1}个科目`}"重叠`}return!0}catch{return!0}},toggleAlertTimeMode(){this.enableCustomAlertTime||this.localConfig.examInfos.forEach(t=>{t.alertTime=15})},getExamDuration(t){if(!t.start||!t.end)return"";try{const e=new Date(t.start),i=new Date(t.end);if(isNaN(e.getTime())||isNaN(i.getTime()))return"";const l=i.getTime()-e.getTime(),r=Math.round(l/(1e3*60));if(r<60)return`${r}分钟`;const n=Math.floor(r/60),o=r%60;return o===0?`${n}小时`:`${n}小时${o}分钟`}catch{return""}},updateStartDateTimeFromInput(t){if(t===void 0||!this.localConfig.examInfos[t])return;const e=this.localConfig.examInfos[t],i=e.startFormatted;if(!i)return;const l=i.match(/(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})\s+(\d{1,2}):(\d{1,2})/);if(!l)return;const[,r,n,o,u,d]=l,f=new Date(parseInt(r),parseInt(n)-1,parseInt(o),parseInt(u),parseInt(d));isNaN(f.getTime())||(e.startDate=f,e.startTime=this.formatTimeOnly(f),e.start=this.formatDateTimeLocal(f),this.updateStartDateTime(t))},updateEndDateTimeFromInput(t){if(t===void 0||!this.localConfig.examInfos[t])return;const e=this.localConfig.examInfos[t],i=e.endFormatted;if(!i)return;const l=i.match(/(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})\s+(\d{1,2}):(\d{1,2})/);if(!l)return;const[,r,n,o,u,d]=l,f=new Date(parseInt(r),parseInt(n)-1,parseInt(o),parseInt(u),parseInt(d));isNaN(f.getTime())||(e.endDate=f,e.endTime=this.formatTimeOnly(f),e.end=this.formatDateTimeLocal(f),this.updateEndDateTime(t))},async loadConfig(){var t;this.loading=!0,this.error="";try{const e=await x.loadData(`es_${this.configId}`);if(e){this.localConfig={examName:"",message:"",room:"",examInfos:[],...e},Array.isArray(this.localConfig.examInfos)||(this.localConfig.examInfos=[]),this.localConfig.examInfos.forEach(l=>{if(l.start){const r=this.parseDateTime(l.start);l.start=this.formatDateTimeLocal(r),l.startDate=r,l.startTime=this.formatTimeOnly(r),l.startFormatted=this.formatDisplayDateTime(r),l.startDateMenu=!1}if(l.end){const r=this.parseDateTime(l.end);l.end=this.formatDateTimeLocal(r),l.endDate=r,l.endTime=this.formatTimeOnly(r),l.endFormatted=this.formatDisplayDateTime(r),l.endDateMenu=!1}try{if(l.start&&l.end){const r=new Date(l.start),n=new Date(l.end),o=Math.round((n.getTime()-r.getTime())/(1e3*60));o>0&&o<=24*60?l.durationMinutes=o:l.durationMinutes=120}else l.durationMinutes=120}catch{l.durationMinutes=120}l.alertTime===void 0||l.alertTime===null?l.alertTime=15:l.alertTime=parseInt(l.alertTime)||15});const i=this.localConfig.examInfos.some(l=>l.alertTime!==15);this.enableCustomAlertTime=i}else console.error("加载配置失败:",e),this.error="加载配置失败: "+(((t=e.error)==null?void 0:t.message)||"未知错误"),this.$emit("error",this.error)}catch(e){console.error(e),this.error="加载配置失败: "+e.message,this.$emit("error",this.error)}finally{this.loading=!1}},async saveConfig(){var t;if(!this.isValidConfig){const e=this.validationErrors;return e.length>0?this.error=`配置验证失败:${e.join(";")}`:this.error="请填写完整的配置信息",!1}this.saving=!0,this.error="";try{const e={examName:this.localConfig.examName,message:this.localConfig.message,room:this.localConfig.room,examInfos:this.localConfig.examInfos.map(l=>({name:l.name,start:this.formatDisplayDateTime(l.start),end:this.formatDisplayDateTime(l.end),alertTime:parseInt(l.alertTime)||15}))},i=await x.saveData(`es_${this.configId}`,e);return i?(this.success="配置保存成功",this.$emit("saved",e),!0):(this.error="保存配置失败: "+(((t=i.error)==null?void 0:t.message)||"未知错误"),this.$emit("error",this.error),!1)}catch(e){return this.error="保存配置失败: "+e,this.$emit("error",this.error),!1}finally{this.saving=!1}},addExamInfo(){let t=new Date;if(this.localConfig.examInfos.length>0){const r=this.localConfig.examInfos[this.localConfig.examInfos.length-1];r.end&&(t=new Date(r.end))}const e=new Date(t.getTime()+10*60*1e3),i=new Date(e.getTime()+2*60*60*1e3),l={name:"",start:this.formatDateTimeLocal(e),end:this.formatDateTimeLocal(i),durationMinutes:120,alertTime:15,startDate:e,startTime:this.formatTimeOnly(e),startFormatted:this.formatDisplayDateTime(e),startDateMenu:!1,endDate:i,endTime:this.formatTimeOnly(i),endFormatted:this.formatDisplayDateTime(i),endDateMenu:!1};this.localConfig.examInfos.push(l)},removeExamInfo(t){this.localConfig.examInfos.splice(t,1)},moveExamInfo(t,e){const i=t+e;if(i>=0&&i({name:e.name,start:this.formatDisplayDateTime(e.start),end:this.formatDisplayDateTime(e.end),alertTime:parseInt(e.alertTime)||15}))};return JSON.stringify(t,null,2)}catch(t){return console.error("格式化存储JSON时出错:",t),"无效的JSON格式"}},isValidConfig(){return this.localConfig.examName&&this.localConfig.message&&this.localConfig.examInfos&&this.localConfig.examInfos.length>0&&this.localConfig.examInfos.every(t=>t.name&&t.start&&t.end)},validationErrors(){const t=[];if((!this.localConfig.examName||this.localConfig.examName.trim()==="")&&t.push("考试名称不能为空"),(!this.localConfig.message||this.localConfig.message.trim()==="")&&t.push("考试提示不能为空"),!this.localConfig.examInfos||this.localConfig.examInfos.length===0)t.push("至少需要添加一个考试科目");else{this.localConfig.examInfos.forEach((e,i)=>{const l=`第${i+1}个科目`;if((!e.name||e.name.trim()==="")&&t.push(`${l}的名称不能为空`),e.start||t.push(`${l}的开始时间不能为空`),e.end||t.push(`${l}的结束时间不能为空`),e.start&&e.end){const r=new Date(e.start),n=new Date(e.end);isNaN(r.getTime())&&t.push(`${l}的开始时间格式不正确`),isNaN(n.getTime())&&t.push(`${l}的结束时间格式不正确`),!isNaN(r.getTime())&&!isNaN(n.getTime())&&(n<=r&&t.push(`${l}的结束时间必须晚于开始时间`),(n-r)/(1e3*60*60)>24&&t.push(`${l}的考试时长不能超过24小时`))}});for(let e=0;eu&&t.push(`第${e+1}个科目与第${i+1}个科目的时间有重叠`)}}}return t},hasValidationErrors(){return this.validationErrors.length>0}},watch:{configId:{immediate:!0,handler(t){t&&this.loadConfig()}}},created(){this.loadSubjects()},methods:{async loadSubjects(){try{const t=await x.loadData("classworks-config-subject");t&&Array.isArray(t)?this.availableSubjects=t.sort((e,i)=>(e.order??0)-(i.order??0)).map(e=>({name:e.name,order:e.order??0})):this.availableSubjects=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8}]}catch(t){console.warn("加载科目列表失败,使用默认列表:",t),this.availableSubjects=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8}]}},autoFillRemaining(){if(this.localConfig.examInfos.length===0)return;let t=null;for(let e=this.localConfig.examInfos.length-1;e>=0;e--)if(this.localConfig.examInfos[e].end){t=new Date(this.localConfig.examInfos[e].end);break}t||(t=new Date);for(let e=0;e12)return`${e}月份不合法(1-12)`;if(S<1||S>31)return`${e}日期不合法(1-31)`;if(U<0||U>23)return`${e}小时不合法(0-23)`;if(F<0||F>59)return`${e}分钟不合法(0-59)`;const j=new Date(d,f-1,S,U,F);return isNaN(j.getTime())?`${e}日期不存在`:j.getMonth()!==f-1||j.getDate()!==S?`${e}日期不存在`:!0},validateEndAfterStart(t){if(!t.startFormatted||!t.endFormatted)return!0;try{const e=new Date(t.start||t.startFormatted.replace(/\//g,"-")),i=new Date(t.end||t.endFormatted.replace(/\//g,"-"));return isNaN(e.getTime())||isNaN(i.getTime())?!0:i<=e?"结束时间必须晚于开始时间":(i.getTime()-e.getTime())/(1e3*60*60)>24?"考试时长不能超过24小时":!0}catch{return!0}},validateNoTimeOverlap(t,e){if(!t.startFormatted||!t.endFormatted)return!0;try{const i=new Date(t.start||t.startFormatted.replace(/\//g,"-")),l=new Date(t.end||t.endFormatted.replace(/\//g,"-"));if(isNaN(i.getTime())||isNaN(l.getTime()))return!0;for(let r=0;r=o&&io&&l<=u||i<=o&&l>=u)return`时间与"${n.name||`第${r+1}个科目`}"重叠`}return!0}catch{return!0}},toggleAlertTimeMode(){this.enableCustomAlertTime||this.localConfig.examInfos.forEach(t=>{t.alertTime=15})},getExamDuration(t){if(!t.start||!t.end)return"";try{const e=new Date(t.start),i=new Date(t.end);if(isNaN(e.getTime())||isNaN(i.getTime()))return"";const l=i.getTime()-e.getTime(),r=Math.round(l/(1e3*60));if(r<60)return`${r}分钟`;const n=Math.floor(r/60),o=r%60;return o===0?`${n}小时`:`${n}小时${o}分钟`}catch{return""}},updateStartDateTimeFromInput(t){if(t===void 0||!this.localConfig.examInfos[t])return;const e=this.localConfig.examInfos[t],i=e.startFormatted;if(!i)return;const l=i.match(/(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})\s+(\d{1,2}):(\d{1,2})/);if(!l)return;const[,r,n,o,u,d]=l,f=new Date(parseInt(r),parseInt(n)-1,parseInt(o),parseInt(u),parseInt(d));isNaN(f.getTime())||(e.startDate=f,e.startTime=this.formatTimeOnly(f),e.start=this.formatDateTimeLocal(f),this.updateStartDateTime(t))},updateEndDateTimeFromInput(t){if(t===void 0||!this.localConfig.examInfos[t])return;const e=this.localConfig.examInfos[t],i=e.endFormatted;if(!i)return;const l=i.match(/(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})\s+(\d{1,2}):(\d{1,2})/);if(!l)return;const[,r,n,o,u,d]=l,f=new Date(parseInt(r),parseInt(n)-1,parseInt(o),parseInt(u),parseInt(d));isNaN(f.getTime())||(e.endDate=f,e.endTime=this.formatTimeOnly(f),e.end=this.formatDateTimeLocal(f),this.updateEndDateTime(t))},async loadConfig(){var t;this.loading=!0,this.error="";try{const e=await x.loadData(`es_${this.configId}`);if(e){this.localConfig={examName:"",message:"",room:"",examInfos:[],...e},Array.isArray(this.localConfig.examInfos)||(this.localConfig.examInfos=[]),this.localConfig.examInfos.forEach(l=>{if(l.start){const r=this.parseDateTime(l.start);l.start=this.formatDateTimeLocal(r),l.startDate=r,l.startTime=this.formatTimeOnly(r),l.startFormatted=this.formatDisplayDateTime(r),l.startDateMenu=!1}if(l.end){const r=this.parseDateTime(l.end);l.end=this.formatDateTimeLocal(r),l.endDate=r,l.endTime=this.formatTimeOnly(r),l.endFormatted=this.formatDisplayDateTime(r),l.endDateMenu=!1}try{if(l.start&&l.end){const r=new Date(l.start),n=new Date(l.end),o=Math.round((n.getTime()-r.getTime())/(1e3*60));o>0&&o<=24*60?l.durationMinutes=o:l.durationMinutes=120}else l.durationMinutes=120}catch{l.durationMinutes=120}l.alertTime===void 0||l.alertTime===null?l.alertTime=15:l.alertTime=parseInt(l.alertTime)||15});const i=this.localConfig.examInfos.some(l=>l.alertTime!==15);this.enableCustomAlertTime=i}else console.error("加载配置失败:",e),this.error="加载配置失败: "+(((t=e.error)==null?void 0:t.message)||"未知错误"),this.$emit("error",this.error)}catch(e){console.error(e),this.error="加载配置失败: "+e.message,this.$emit("error",this.error)}finally{this.loading=!1}},async saveConfig(){var t;if(!this.isValidConfig){const e=this.validationErrors;return e.length>0?this.error=`配置验证失败:${e.join(";")}`:this.error="请填写完整的配置信息",!1}this.saving=!0,this.error="";try{const e={examName:this.localConfig.examName,message:this.localConfig.message,room:this.localConfig.room,examInfos:this.localConfig.examInfos.map(l=>({name:l.name,start:this.formatDisplayDateTime(l.start),end:this.formatDisplayDateTime(l.end),alertTime:parseInt(l.alertTime)||15}))},i=await x.saveData(`es_${this.configId}`,e);return i?(this.success="配置保存成功",this.$emit("saved",e),!0):(this.error="保存配置失败: "+(((t=i.error)==null?void 0:t.message)||"未知错误"),this.$emit("error",this.error),!1)}catch(e){return this.error="保存配置失败: "+e,this.$emit("error",this.error),!1}finally{this.saving=!1}},addExamInfo(){let t=new Date;if(this.localConfig.examInfos.length>0){const r=this.localConfig.examInfos[this.localConfig.examInfos.length-1];r.end&&(t=new Date(r.end))}const e=new Date(t.getTime()+10*60*1e3),i=new Date(e.getTime()+2*60*60*1e3),l={name:"",start:this.formatDateTimeLocal(e),end:this.formatDateTimeLocal(i),durationMinutes:120,alertTime:15,startDate:e,startTime:this.formatTimeOnly(e),startFormatted:this.formatDisplayDateTime(e),startDateMenu:!1,endDate:i,endTime:this.formatTimeOnly(i),endFormatted:this.formatDisplayDateTime(i),endDateMenu:!1};this.localConfig.examInfos.push(l)},removeExamInfo(t){this.localConfig.examInfos.splice(t,1)},moveExamInfo(t,e){const i=t+e;if(i>=0&&i24*60&&(i=24*60),e.durationMinutes=i,(!e.startDate||!e.startTime)&&e.start){const l=new Date(e.start);isNaN(l.getTime())||(e.startDate=l,e.startTime=this.formatTimeOnly(l))}if(e.startDate&&e.startTime){const l=new Date(e.startDate),[r,n]=String(e.startTime).split(":");l.setHours(parseInt(r),parseInt(n),0,0);const o=new Date(l.getTime()+i*60*1e3);e.endDate=o,e.endTime=this.formatTimeOnly(o),e.end=this.formatDateTimeLocal(o),e.endFormatted=this.formatDisplayDateTime(o)}},formatDateTimeLocal(t){if(!t)return"";let e;if(typeof t=="string"?t.includes("/")?e=new Date(t.replace(/\//g,"-")):e=new Date(t):e=new Date(t),isNaN(e.getTime()))return"";const i=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0");return`${i}-${l}-${r}T${n}:${o}`},formatDisplayDateTime(t){if(!t)return"";const e=new Date(t);if(isNaN(e.getTime()))return t;const i=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0");return`${i}/${l}/${r} ${n}:${o}`},parseDateTime(t){return t?typeof t=="string"?t.includes("/")?new Date(t.replace(/\//g,"-")):new Date(t):new Date(t):new Date},formatTimeOnly(t){if(!t)return"00:00";const e=new Date(t);if(isNaN(e.getTime()))return"00:00";const i=String(e.getHours()).padStart(2,"0"),l=String(e.getMinutes()).padStart(2,"0");return`${i}:${l}`},updateStartDateTime(t){const e=this.localConfig.examInfos[t];if(!e.startDate||!e.startTime)return;const i=new Date(e.startDate),[l,r]=e.startTime.split(":");i.setHours(parseInt(l),parseInt(r),0,0),e.start=this.formatDateTimeLocal(i),e.startFormatted=this.formatDisplayDateTime(i);let n=parseInt(e.durationMinutes);if(isNaN(n)||n<=0||n>24*60)try{let u=null;if(e.endDate&&e.endTime){u=new Date(e.endDate);const[d,f]=String(e.endTime).split(":");u.setHours(parseInt(d),parseInt(f),0,0)}else e.end&&(u=new Date(e.end));if(u&&!isNaN(u.getTime())){const d=Math.round((u.getTime()-i.getTime())/6e4);d>0&&d<=24*60&&(n=d)}}catch{}(isNaN(n)||n<=0||n>24*60)&&(n=120);const o=new Date(i.getTime()+n*60*1e3);e.endDate=o,e.endTime=this.formatTimeOnly(o),e.end=this.formatDateTimeLocal(o),e.endFormatted=this.formatDisplayDateTime(o),e.durationMinutes=n},updateEndDateTime(t){const e=this.localConfig.examInfos[t];if(!e.endDate||!e.endTime)return;const i=new Date(e.endDate),[l,r]=e.endTime.split(":");i.setHours(parseInt(l),parseInt(r),0,0),e.end=this.formatDateTimeLocal(i),e.endFormatted=this.formatDisplayDateTime(i);try{if(e.startDate&&e.startTime){const n=new Date(e.startDate),[o,u]=String(e.startTime).split(":");n.setHours(parseInt(o),parseInt(u),0,0);const d=Math.round((i.getTime()-n.getTime())/(1e3*60));d>0&&d<=24*60&&(e.durationMinutes=d)}}catch{}},async openConfig(){try{const t=await x.getKeyCloudUrl(`es_${this.configId}`,{autoMigrate:!0,autoConfig:!0});if(t.success&&t.url){const e=`https://es.examaware.cn/exam/?configUrl=${encodeURIComponent(t.url)}`;window.open(e,"_blank"),this.success="配置已在新窗口中打开",this.$emit("opened",{configId:this.configId,url:t.url})}else throw new Error(t.error||"获取云端地址失败")}catch(t){this.error="打开配置失败: "+t.message,this.$emit("error","打开配置失败: "+t.message)}},confirmDelete(){this.deleteDialog=!0},async deleteConfig(){this.deleting=!0;try{const i=(await x.loadData("es_list")||[]).filter(r=>r.id!==this.configId);if(!await x.saveData("es_list",i))throw new Error("更新云端列表失败");this.deleteDialog=!1,this.$emit("deleted",{success:!0,message:"配置删除成功",configId:this.configId})}catch(t){console.error("删除配置失败:",t),this.$emit("deleted",{success:!1,message:"删除失败: "+t.message})}finally{this.deleting=!1}},openInEa2Player(){var t;try{const e={examName:this.localConfig.examName,message:this.localConfig.message,room:this.localConfig.room,examInfos:this.localConfig.examInfos.map(n=>({name:n.name,start:this.formatDisplayDateTime(n.start),end:this.formatDisplayDateTime(n.end),alertTime:parseInt(n.alertTime)||15}))},i=JSON.stringify(e),l=btoa(unescape(encodeURIComponent(i))),r=`examaware://player?data=${encodeURIComponent(l)}`;window.location.href=r,(t=this.$message)==null||t.success("正在拉起 ExamAware2 播放器...")}catch(e){this.error="拉起播放器失败: "+e.message}}}},oe={class:"d-flex align-center"},ie={class:"d-flex align-center"},ne={key:4,class:"d-flex justify-space-between align-center mb-4"},de={class:"d-flex align-center gap-2"},me={key:5},ue={class:"mb-8"},ce={class:"text-h3 font-weight-bold",style:{"line-height":"1.2"}},fe={class:"text-subtitle-1 text-grey",style:{"white-space":"pre-wrap","line-height":"1.8"}},ge={key:0,class:"mb-8"},pe={class:"d-flex align-center"},he={class:""},ye={class:"mb-3"},De={class:"d-flex align-center mb-1"},Ce={class:"text-h6 font-weight-medium text-success"},Te={class:"d-flex align-center mb-1"},ve={class:"text-h6 font-weight-medium text-error"},be={key:1,class:"text-center py-12"},we={class:"json-preview"},xe={key:6},Ve={class:"text-subtitle-2 font-weight-bold d-block mb-2"},ke={key:0,class:"mt-3"},Ie={class:"text-caption text-medium-emphasis mt-2 ml-2"},Ne={class:"d-flex align-center mr-4"},Se={class:"w-100"},Ee={class:"d-flex align-center mb-3"},Me={class:"d-flex gap-1"},_e={class:"text-primary font-weight-bold"},Ue={key:1,class:"text-center py-12"};function Fe(t,e,i,l,r,n){return g(),v("div",null,[r.error?(g(),y(A,{key:0,border:"start",class:"mb-4 mt-3 mx-2",closable:"",type:"error",variant:"tonal","onClick:close":e[0]||(e[0]=o=>r.error="")},{default:a(()=>[c("div",oe,[s(p,{class:"mr-2"},{default:a(()=>[...e[10]||(e[10]=[m(" mdi-alert-circle ",-1)])]),_:1}),m(" "+D(r.error),1)])]),_:1})):C("",!0),r.success?(g(),y(A,{key:1,border:"start",class:"mb-4 mt-3 mx-2",closable:"",type:"success",variant:"tonal","onClick:close":e[1]||(e[1]=o=>r.success="")},{default:a(()=>[c("div",ie,[s(p,{class:"mr-2"},{default:a(()=>[...e[11]||(e[11]=[m(" mdi-check-circle ",-1)])]),_:1}),m(" "+D(r.success),1)])]),_:1})):C("",!0),n.hasValidationErrors&&!r.loading?(g(),y(A,{key:2,border:"start",class:"mb-4 mt-3 mx-2",type:"warning",variant:"tonal"},{default:a(()=>[e[13]||(e[13]=c("div",{class:"d-flex align-center"},[c("span",{class:"font-weight-bold"},"配置验证失败,请检查以下问题:")],-1)),s(R,{class:"bg-transparent",density:"compact"},{default:a(()=>[(g(!0),v(E,null,M(n.validationErrors,(o,u)=>(g(),y(O,{key:u,class:"px-0 py-0"},{prepend:a(()=>[s(p,{color:"warning",size:"small"},{default:a(()=>[...e[12]||(e[12]=[m(" mdi-circle-small ",-1)])]),_:1})]),default:a(()=>[s(X,{class:"text-body-2"},{default:a(()=>[m(D(o),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})):C("",!0),r.loading?(g(),y(b,{key:3,class:"my-4",outlined:""},{default:a(()=>[s(w,null,{default:a(()=>[s(ee,{class:"mx-auto",type:"article"})]),_:1})]),_:1})):C("",!0),r.loading?C("",!0):(g(),v("div",ne,[c("div",de,[s(h,{disabled:!n.isValidConfig,class:"text-none",color:"success","prepend-icon":"mdi-open-in-new",variant:"elevated",onClick:n.openConfig},{default:a(()=>[...e[14]||(e[14]=[m(" 打开 ExamSchedule ",-1)])]),_:1},8,["disabled","onClick"]),s(h,{disabled:!n.isValidConfig,class:"text-none",color:"primary","prepend-icon":"mdi-link-variant",variant:"elevated",onClick:n.copyConfigUrl},{default:a(()=>[...e[15]||(e[15]=[m(" 复制远程链接 ",-1)])]),_:1},8,["disabled","onClick"]),s(h,{disabled:!n.isValidConfig,class:"text-none",color:"primary","prepend-icon":"mdi-download",variant:"elevated",onClick:n.downloadAsJson},{default:a(()=>[...e[16]||(e[16]=[m(" JSON 文件 ",-1)])]),_:1},8,["disabled","onClick"]),s(h,{disabled:!n.isValidConfig,class:"text-none",color:"primary","prepend-icon":"mdi-download",variant:"elevated",onClick:n.downloadAsEa2},{default:a(()=>[...e[17]||(e[17]=[m(" .ea2 文件 ",-1)])]),_:1},8,["disabled","onClick"]),s(h,{disabled:!n.isValidConfig,class:"text-none",color:"secondary","prepend-icon":"mdi-play-circle",variant:"elevated",onClick:n.openInEa2Player},{default:a(()=>[...e[18]||(e[18]=[m(" 拉起EA2播放器 ",-1)])]),_:1},8,["disabled","onClick"]),n.isValidConfig?C("",!0):(g(),y(_,{key:0,activator:"parent",location:"bottom"},{default:a(()=>[...e[19]||(e[19]=[c("span",null,"请先完善配置信息后再操作",-1)])]),_:1}))]),s(Z,{modelValue:r.isEditMode,"onUpdate:modelValue":e[2]||(e[2]=o=>r.isEditMode=o),color:"primary",divided:"",variant:"outlined"},{default:a(()=>[s(h,{class:"text-error","prepend-icon":"mdi-delete",onClick:n.confirmDelete},{default:a(()=>[...e[20]||(e[20]=[m(" 删除配置 ",-1)])]),_:1},8,["onClick"]),s(h,{value:!1,"prepend-icon":"mdi-eye"},{default:a(()=>[...e[21]||(e[21]=[m(" 预览 ",-1)])]),_:1}),s(h,{value:!0,"prepend-icon":"mdi-pencil"},{default:a(()=>[...e[22]||(e[22]=[m(" 编辑 ",-1)])]),_:1})]),_:1},8,["modelValue"])])),!r.loading&&!r.isEditMode?(g(),v("div",me,[c("div",ue,[c("div",ce,D(r.localConfig.examName||"未设置考试名称"),1),c("div",fe,D(r.localConfig.message||"未设置考试提示"),1),r.localConfig.room?(g(),y(z,{key:0,class:"px-4 py-2",size:"large"},{default:a(()=>[s(p,{start:""},{default:a(()=>[...e[23]||(e[23]=[m(" mdi-home ",-1)])]),_:1}),m(" 考场:"+D(r.localConfig.room),1)]),_:1})):C("",!0)]),r.localConfig.examInfos&&r.localConfig.examInfos.length>0?(g(),v("div",ge,[s(I,null,{default:a(()=>[(g(!0),v(E,null,M(r.localConfig.examInfos,(o,u)=>(g(),y(T,{key:u,cols:"12",lg:"4",md:"6"},{default:a(()=>[s(b,{class:"h-100",hover:"",variant:"tonal"},{default:a(()=>[s(V,{class:"bg-primary-lighten-5 pa-4"},{default:a(()=>[c("div",pe,[s(p,{class:"mr-2"},{default:a(()=>[...e[24]||(e[24]=[m(" mdi-book-open-page-variant ",-1)])]),_:1}),c("span",he,D(o.name||"未设置科目"),1)])]),_:2},1024),s(w,{class:"pa-4"},{default:a(()=>[c("div",ye,[c("div",De,[s(p,{class:"mr-2",color:"success",size:"small"},{default:a(()=>[...e[25]||(e[25]=[m(" mdi-clock-start ",-1)])]),_:1}),e[26]||(e[26]=c("span",{class:"text-body-2 text-grey-darken-1"},"开始时间",-1))]),c("div",Ce,D(o.startFormatted||o.start||"未设置"),1)]),c("div",null,[c("div",Te,[s(p,{class:"mr-2",color:"error",size:"small"},{default:a(()=>[...e[27]||(e[27]=[m(" mdi-clock-end ",-1)])]),_:1}),e[28]||(e[28]=c("span",{class:"text-body-2 text-grey-darken-1"},"结束时间",-1))]),c("div",ve,D(o.endFormatted||o.end||"未设置"),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})])):(g(),v("div",be,[s(p,{class:"mb-4",color:"grey-lighten-2",size:"80"},{default:a(()=>[...e[29]||(e[29]=[m(" mdi-calendar-blank ",-1)])]),_:1}),e[32]||(e[32]=c("div",{class:"text-h5 text-grey-darken-1 mb-2"}," 暂无考试科目安排 ",-1)),e[33]||(e[33]=c("div",{class:"text-body-1 text-grey mb-4"},' 点击上方"添加科目"按钮开始配置考试时间表 ',-1)),s(h,{color:"primary",variant:"outlined",onClick:n.quickEdit},{default:a(()=>[s(p,{start:""},{default:a(()=>[...e[30]||(e[30]=[m(" mdi-plus ",-1)])]),_:1}),e[31]||(e[31]=m(" 立即添加 ",-1))]),_:1},8,["onClick"])])),s(b,{border:"",class:"mb-4",elevation:"2"},{default:a(()=>[s(V,{class:"d-flex align-center text-white cursor-pointer",onClick:e[3]||(e[3]=o=>r.showJsonPreview=!r.showJsonPreview)},{default:a(()=>[s(p,{class:"mr-2"},{default:a(()=>[...e[34]||(e[34]=[m(" mdi-code-json ",-1)])]),_:1}),e[36]||(e[36]=m(" 配置预览 ",-1)),s(k),s(h,{color:"white","prepend-icon":"mdi-content-copy",size:"small",variant:"outlined",onClick:q(n.copyToClipboard,["stop"])},{default:a(()=>[...e[35]||(e[35]=[m(" 复制 ",-1)])]),_:1},8,["onClick"]),s(h,{icon:r.showJsonPreview?"mdi-chevron-up":"mdi-chevron-down",class:"ml-2",color:"white",size:"small",variant:"text"},null,8,["icon"])]),_:1}),s(Q,null,{default:a(()=>[Y(s(w,{class:"pa-4"},{default:a(()=>[s(b,{class:"pa-4",variant:"tonal"},{default:a(()=>[c("pre",we,[c("code",null,D(n.formattedStorageJson),1)])]),_:1})]),_:1},512),[[G,r.showJsonPreview]])]),_:1})]),_:1})])):C("",!0),!r.loading&&r.isEditMode?(g(),v("div",xe,[s(b,{border:"",class:"mb-4",elevation:"1"},{default:a(()=>[s(V,{class:"d-flex align-center bg-primary-lighten-5 pa-4"},{default:a(()=>[s(p,{class:"mr-2"},{default:a(()=>[...e[37]||(e[37]=[m(" mdi-information ",-1)])]),_:1}),e[38]||(e[38]=c("span",{class:"font-weight-bold"},"基本信息",-1))]),_:1}),s(w,{class:"pa-6"},{default:a(()=>[s(I,null,{default:a(()=>[s(T,{cols:"12",md:"6"},{default:a(()=>[s(N,{modelValue:r.localConfig.examName,"onUpdate:modelValue":e[4]||(e[4]=o=>r.localConfig.examName=o),rules:[o=>!!o||"考试名称不能为空",o=>o&&o.trim().length>0||"考试名称不能为空白字符",o=>!o||o.length<=100||"考试名称不能超过100个字符"],clearable:"",density:"comfortable",label:"考试名称",placeholder:"如:2025年高考模拟考试","prepend-inner-icon":"mdi-calendar-text",required:"",variant:"outlined"},null,8,["modelValue","rules"])]),_:1}),s(T,{cols:"12",md:"6"},{default:a(()=>[s(N,{modelValue:r.localConfig.room,"onUpdate:modelValue":e[5]||(e[5]=o=>r.localConfig.room=o),clearable:"",density:"comfortable",label:"考场号(仅 ExamSchedule-Management 支持此配置)",placeholder:"如:一号考场","prepend-inner-icon":"mdi-home",variant:"outlined"},null,8,["modelValue"])]),_:1})]),_:1}),s(I,null,{default:a(()=>[s(T,{cols:"12"},{default:a(()=>[c("span",Ve,[s(p,{size:"small",class:"mr-1"},{default:a(()=>[...e[39]||(e[39]=[m("mdi-message-text",-1)])]),_:1}),e[40]||(e[40]=m(" 考试提示 ",-1))]),s(ae,{modelValue:r.localConfig.message,"onUpdate:modelValue":e[6]||(e[6]=o=>r.localConfig.message=o),rules:[o=>!!o||"考试提示不能为空",o=>o&&o.trim().length>0||"考试提示不能为空白字符"],clearable:"",density:"comfortable",label:"输入考试相关的提示信息...","no-resize":"",placeholder:"例如:请保持卷面整洁,诚信应考。在听到终考铃时立刻停止作答。",rows:"3",variant:"outlined"},null,8,["modelValue","rules"]),!r.localConfig.message||r.localConfig.message.trim()===""?(g(),v("div",ke,[s(te,{class:"d-flex gap-2",column:""},{default:a(()=>[(g(!0),v(E,null,M(r.defaultExamTips,(o,u)=>(g(),y(z,{key:u,class:"cursor-pointer",color:"primary",size:"small",variant:"outlined",onClick:d=>n.selectDefaultTip(o)},{default:a(()=>[s(p,{size:"small",start:""},{default:a(()=>[...e[41]||(e[41]=[m(" mdi-plus ",-1)])]),_:1}),m(" "+D(o.substring(0,20))+"... ",1)]),_:2},1032,["onClick"]))),128))]),_:1}),c("div",Ie,[s(p,{class:"mr-1",size:"x-small"},{default:a(()=>[...e[42]||(e[42]=[m(" mdi-lightbulb-outline ",-1)])]),_:1}),e[43]||(e[43]=m(" 点击上方选项快速添加常用考试提示 ",-1))])])):C("",!0)]),_:1})]),_:1})]),_:1})]),_:1}),s(b,{border:"",class:"mb-4",elevation:"1"},{default:a(()=>[s(V,{class:"d-flex align-center bg-success-lighten-5 pa-4"},{default:a(()=>[s(p,{class:"mr-2"},{default:a(()=>[...e[44]||(e[44]=[m(" mdi-format-list-bulleted ",-1)])]),_:1}),e[47]||(e[47]=c("span",{class:"font-weight-bold"},"考试科目安排",-1)),s(k),c("div",Ne,[s(se,{modelValue:r.enableCustomAlertTime,"onUpdate:modelValue":e[7]||(e[7]=o=>r.enableCustomAlertTime=o),color:"primary",density:"compact","hide-details":"",onChange:n.toggleAlertTimeMode},{label:a(()=>[...e[45]||(e[45]=[c("span",{class:"text-body-2"},"自定义提醒时间",-1)])]),_:1},8,["modelValue","onChange"])]),s(h,{color:"success","prepend-icon":"mdi-plus",size:"small",variant:"elevated",onClick:n.addExamInfo},{default:a(()=>[...e[46]||(e[46]=[m(" 添加科目 ",-1)])]),_:1},8,["onClick"])]),_:1}),s(w,{class:"pa-0"},{default:a(()=>[r.localConfig.examInfos&&r.localConfig.examInfos.length>0?(g(),y(R,{key:0,class:"py-0"},{default:a(()=>[(g(!0),v(E,null,M(r.localConfig.examInfos,(o,u)=>(g(),y(O,{key:u,class:"border-b pa-4 hover-highlight"},{default:a(()=>[c("div",Se,[c("div",Ee,[s(z,{color:u%2===0?"primary":"secondary",size:"small",variant:"tonal",class:"mr-3"},{default:a(()=>[s(p,{start:"",size:"small"},{default:a(()=>[m(" mdi-numeric-"+D(u+1)+"-circle ",1)]),_:2},1024),m(" 第 "+D(u+1)+" 科目 ",1)]),_:2},1032,["color"]),s(k),c("div",Me,[u>0?(g(),y(h,{key:0,color:"primary",icon:"mdi-arrow-up",size:"x-small",variant:"text",onClick:d=>n.moveExamInfo(u,-1)},{default:a(()=>[s(_,{activator:"parent",location:"bottom"},{default:a(()=>[...e[48]||(e[48]=[m(" 上移 ",-1)])]),_:1})]),_:1},8,["onClick"])):C("",!0),un.moveExamInfo(u,1)},{default:a(()=>[s(_,{activator:"parent",location:"bottom"},{default:a(()=>[...e[49]||(e[49]=[m(" 下移 ",-1)])]),_:1})]),_:1},8,["onClick"])):C("",!0),s(h,{color:"error",icon:"mdi-delete",size:"x-small",variant:"text",onClick:d=>n.removeExamInfo(u)},{default:a(()=>[s(_,{activator:"parent",location:"bottom"},{default:a(()=>[...e[50]||(e[50]=[m(" 删除 ",-1)])]),_:1})]),_:1},8,["onClick"])])]),s(I,{class:"align-start"},{default:a(()=>[s(T,{cols:"12",md:"4"},{default:a(()=>[s(re,{modelValue:o.name,"onUpdate:modelValue":d=>o.name=d,items:r.availableSubjects,rules:[d=>!!d||"科目名称不能为空",d=>d&&d.trim().length>0||"科目名称不能为空白字符"],clearable:"",density:"comfortable","item-title":"name",label:"科目名称","no-data-text":"没有可用科目,请输入自定义名称","prepend-inner-icon":"mdi-book",variant:"outlined"},{"prepend-item":a(()=>[r.customSubjectInput?(g(),y(O,{key:0,title:"自定义:"},{append:a(()=>[c("span",_e,D(r.customSubjectInput),1)]),_:1})):C("",!0),r.customSubjectInput?(g(),y(W,{key:1})):C("",!0)]),_:1},8,["modelValue","onUpdate:modelValue","items","rules"])]),_:2},1024),s(T,{cols:"12",md:"3"},{default:a(()=>[s(B,{modelValue:o.startDateMenu,"onUpdate:modelValue":d=>o.startDateMenu=d,"close-on-content-click":!1,"min-width":"auto","offset-y":"",transition:"scale-transition"},{activator:a(({props:d})=>[s(N,J({modelValue:o.startFormatted,"onUpdate:modelValue":f=>o.startFormatted=f,rules:[f=>!!f||"开始时间不能为空",f=>n.validateTimeFormat(f,"开始时间"),()=>n.validateNoTimeOverlap(o,u)],density:"comfortable",label:"开始时间",placeholder:"2025/01/01 09:00","prepend-inner-icon":"mdi-clock-start"},{ref_for:!0},d,{variant:"outlined",onBlur:f=>n.updateStartDateTimeFromInput(u)}),{append:a(()=>[s(p,null,{default:a(()=>[...e[51]||(e[51]=[m("mdi-calendar-clock",-1)])]),_:1})]),_:1},16,["modelValue","onUpdate:modelValue","rules","onBlur"])]),default:a(()=>[s(b,{"min-width":"500"},{default:a(()=>[s(V,{class:"text-center py-3 bg-primary-lighten-5"},{default:a(()=>[s(p,{class:"mr-2",color:"primary"},{default:a(()=>[...e[52]||(e[52]=[m(" mdi-clock-start ",-1)])]),_:1}),e[53]||(e[53]=m(" 选择开始时间 ",-1))]),_:1}),s(w,{class:"pa-0"},{default:a(()=>[s(I,{"no-gutters":""},{default:a(()=>[s(T,{class:"border-e",cols:"6"},{default:a(()=>[s(P,{modelValue:o.startDate,"onUpdate:modelValue":[d=>o.startDate=d,d=>n.updateStartDateTime(u)],color:"primary",elevation:"0",locale:"zh-cn","show-adjacent-months":""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),s(T,{cols:"6"},{default:a(()=>[s(H,{modelValue:o.startTime,"onUpdate:modelValue":[d=>o.startTime=d,d=>n.updateStartDateTime(u)],color:"primary",elevation:"0",format:"24hr",scrollable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),s(L,null,{default:a(()=>[s(k),s(h,{color:"grey",variant:"text",onClick:d=>o.startDateMenu=!1},{default:a(()=>[...e[54]||(e[54]=[m(" 关闭 ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),s(T,{cols:"12",md:"3"},{default:a(()=>[s(B,{modelValue:o.endDateMenu,"onUpdate:modelValue":d=>o.endDateMenu=d,"close-on-content-click":!1,"min-width":"auto","offset-y":"",transition:"scale-transition"},{activator:a(({props:d})=>[s(N,J({modelValue:o.endFormatted,"onUpdate:modelValue":f=>o.endFormatted=f,rules:[f=>!!f||"结束时间不能为空",f=>n.validateTimeFormat(f,"结束时间"),()=>n.validateEndAfterStart(o),()=>n.validateNoTimeOverlap(o,u)],density:"comfortable",label:"结束时间",placeholder:"2025/01/01 11:00","prepend-inner-icon":"mdi-clock-end"},{ref_for:!0},d,{variant:"outlined",onBlur:f=>n.updateEndDateTimeFromInput(u)}),{append:a(()=>[s(p,null,{default:a(()=>[...e[55]||(e[55]=[m("mdi-calendar-clock",-1)])]),_:1})]),_:1},16,["modelValue","onUpdate:modelValue","rules","onBlur"])]),default:a(()=>[s(b,{"min-width":"500"},{default:a(()=>[s(V,{class:"text-center py-3 bg-error-lighten-5"},{default:a(()=>[s(p,{class:"mr-2",color:"error"},{default:a(()=>[...e[56]||(e[56]=[m(" mdi-clock-end ",-1)])]),_:1}),e[57]||(e[57]=m(" 选择结束时间 ",-1))]),_:1}),s(w,{class:"pa-0"},{default:a(()=>[s(I,{"no-gutters":""},{default:a(()=>[s(T,{class:"border-e",cols:"6"},{default:a(()=>[s(P,{modelValue:o.endDate,"onUpdate:modelValue":[d=>o.endDate=d,d=>n.updateEndDateTime(u)],color:"error",elevation:"0",locale:"zh-cn","show-adjacent-months":""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),s(T,{cols:"6"},{default:a(()=>[s(H,{modelValue:o.endTime,"onUpdate:modelValue":[d=>o.endTime=d,d=>n.updateEndDateTime(u)],color:"error",elevation:"0",format:"24hr",scrollable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024),s(L,null,{default:a(()=>[s(k),s(h,{color:"grey",variant:"text",onClick:d=>o.endDateMenu=!1},{default:a(()=>[...e[58]||(e[58]=[m(" 关闭 ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),s(T,{cols:"12",md:"2"},{default:a(()=>[s(N,{modelValue:o.durationMinutes,"onUpdate:modelValue":d=>o.durationMinutes=d,rules:[d=>!!d||"时长不能为空",d=>!isNaN(d)||"时长必须是数字",d=>parseInt(d)>0||"时长必须大于0",d=>parseInt(d)<=1440||"时长不能超过1440分钟(24小时)"],type:"number",min:"1",max:"1440",density:"comfortable",label:"时长(分钟)",placeholder:"例如:120","prepend-inner-icon":"mdi-timer",variant:"outlined",hint:n.durationHint(o),"persistent-hint":"",onBlur:d=>n.updateDurationFromInput(u)},null,8,["modelValue","onUpdate:modelValue","rules","hint","onBlur"])]),_:2},1024),r.enableCustomAlertTime?(g(),y(T,{key:0,cols:"12",md:"2"},{default:a(()=>[s(N,{modelValue:o.alertTime,"onUpdate:modelValue":d=>o.alertTime=d,rules:[d=>!!d||"提醒时间不能为空",d=>!isNaN(d)||"提醒时间必须是数字",d=>parseInt(d)>=0||"提醒时间不能为负数",d=>parseInt(d)<=120||"提醒时间不能超过120分钟"],type:"number",min:"0",max:"120",density:"comfortable",label:"提醒时间(分钟)",placeholder:"例如:15","prepend-inner-icon":"mdi-bell-ring",variant:"outlined",hint:"考试结束前提醒","persistent-hint":""},null,8,["modelValue","onUpdate:modelValue","rules"])]),_:2},1024)):C("",!0)]),_:2},1024)])]),_:2},1024))),128))]),_:1})):(g(),v("div",Ue,[s(p,{class:"mb-4",color:"grey-lighten-2",size:"80"},{default:a(()=>[...e[59]||(e[59]=[m(" mdi-calendar-blank ",-1)])]),_:1}),e[61]||(e[61]=c("div",{class:"text-h5 text-grey-darken-1 mb-2"}," 暂无考试科目安排 ",-1)),e[62]||(e[62]=c("div",{class:"text-body-1 text-grey mb-4"},' 点击上方"添加科目"按钮开始配置 ',-1)),s(h,{color:"success","prepend-icon":"mdi-plus",size:"large",variant:"elevated",onClick:n.addExamInfo},{default:a(()=>[...e[60]||(e[60]=[m(" 立即添加科目 ",-1)])]),_:1},8,["onClick"])]))]),_:1})]),_:1})])):C("",!0),s($,{modelValue:r.deleteDialog,"onUpdate:modelValue":e[9]||(e[9]=o=>r.deleteDialog=o),"max-width":"400"},{default:a(()=>[s(b,null,{default:a(()=>[s(V,{class:"d-flex align-center"},{default:a(()=>[s(p,{class:"mr-2",color:"error"},{default:a(()=>[...e[63]||(e[63]=[m(" mdi-delete-alert ",-1)])]),_:1}),e[64]||(e[64]=m(" 确认删除配置 ",-1))]),_:1}),s(w,null,{default:a(()=>[e[65]||(e[65]=m(" 确定要删除配置 ",-1)),c("strong",null,D(r.localConfig.examName||`配置 ${i.configId}`),1),e[66]||(e[66]=m(" 吗? ",-1)),e[67]||(e[67]=c("br",null,null,-1)),e[68]||(e[68]=c("small",{class:"text-grey"},"此操作不可撤销,将会删除所有相关数据",-1))]),_:1}),s(L,null,{default:a(()=>[s(k),s(h,{color:"grey",variant:"text",onClick:e[8]||(e[8]=o=>r.deleteDialog=!1)},{default:a(()=>[...e[69]||(e[69]=[m(" 取消 ",-1)])]),_:1}),s(h,{loading:r.deleting,color:"error",variant:"outlined",onClick:n.deleteConfig},{default:a(()=>[...e[70]||(e[70]=[m(" 删除 ",-1)])]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const at=K(le,[["render",Fe],["__scopeId","data-v-05515a40"]]);export{at as default}; diff --git a/assets/ExamScheduleCard-CNAe4BGo.js b/assets/ExamScheduleCard-DhbbmO7J.js similarity index 79% rename from assets/ExamScheduleCard-CNAe4BGo.js rename to assets/ExamScheduleCard-DhbbmO7J.js index a1dfd52..24210af 100644 --- a/assets/ExamScheduleCard-CNAe4BGo.js +++ b/assets/ExamScheduleCard-DhbbmO7J.js @@ -1 +1 @@ -import{u as y}from"./index-Kr7NEaRJ.js";import{X as l,Y as f,Z as e,j as a,a1 as r,k as n,S as i,N as _,_ as d,F as h,$ as V,a2 as S,a7 as b,a8 as k}from"./vendor-vue-28M5UGz3.js";import{_ as v,c as I,f as c,g as w,h as C,d as T,V as E,p as N,q as z,r as B,t as D,o as L,e as j}from"./index-CzpSlHRw.js";import{V as A}from"./VAlert-DaoJAibO.js";import"./dataProvider-DBZnFcYO.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";import"./VChip-B3whZF-S.js";import"./vendor-vuetify-95axeNJO.js";import"./VTabs-DxZkDLgQ.js";import"./VTable-D9zIyrqQ.js";import"./VTooltip-C8vChj8G.js";import"./VTextField-BxdS2D7S.js";import"./soundList-D9U-Grcp.js";import"./VSwitch-DcxT6NgQ.js";import"./VContainer-BIFGURze.js";import"./socketClient-pOSoE2ci.js";import"./vendor-socket-dm1FmSOd.js";import"./deviceEvents-CH859Fwr.js";import"./VAppBarTitle-C1UGCJHo.js";import"./VRow-sd4d6eNi.js";const q={name:"ExamScheduleCard",props:{examId:{type:String,required:!0},contentStyle:{type:Object,default:()=>({})}},computed:{...k(y,["exams","loadingDetails"]),exam(){return this.exams[this.examId]},loading(){return this.loadingDetails[this.examId]}},mounted(){this.fetchExam(this.examId)},methods:{...b(y,["fetchExam"]),formatTime(m){if(!m)return"";try{const t=new Date(m),u=(t.getMonth()+1).toString().padStart(2,"0"),p=t.getDate().toString().padStart(2,"0"),x=t.getHours().toString().padStart(2,"0"),s=t.getMinutes().toString().padStart(2,"0");return`${u}-${p} ${x}:${s}`}catch{return m}}}},F={class:"text-truncate"},M={key:0,class:"d-flex justify-center align-center fill-height",style:{"min-height":"200px"}},$={class:"d-flex align-center mb-1"},H={class:"font-weight-medium"},O={class:"d-flex align-center"},P={class:"font-weight-medium"},X={key:2,class:"d-flex flex-column align-center justify-center fill-height text-grey mt-4"};function Y(m,t,u,p,x,s){return l(),f(j,{class:"fill-height d-flex flex-column rounded-xl",elevation:"2"},{default:e(()=>[a(I,{class:"d-flex align-center py-3 px-4 bg-primary text-white"},{default:e(()=>{var o;return[a(c,{class:"mr-2"},{default:e(()=>[...t[1]||(t[1]=[r(" mdi-calendar-clock ",-1)])]),_:1}),n("span",F,i(((o=s.exam)==null?void 0:o.examName)||"加载中..."),1),a(w),a(C,{icon:"mdi-close",variant:"text",density:"comfortable",onClick:t[0]||(t[0]=g=>m.$emit("close"))})]}),_:1}),a(T,{class:"flex-grow-1 pa-4 overflow-y-auto",style:_(u.contentStyle)},{default:e(()=>[s.loading?(l(),d("div",M,[a(E,{indeterminate:"",color:"primary"})])):s.exam?(l(),d(h,{key:1},[s.exam.message?(l(),f(A,{key:0,color:"info",variant:"tonal",class:"mb-4 text-body-1",border:"start",density:"compact"},{default:e(()=>[r(i(s.exam.message),1)]),_:1})):V("",!0),a(N,{density:"comfortable",class:"pa-0 bg-transparent"},{default:e(()=>[(l(!0),d(h,null,S(s.exam.examInfos,(o,g)=>(l(),f(z,{key:g,class:"px-0 mb-3"},{prepend:e(()=>[a(L,{color:"primary",variant:"tonal",size:"large",class:"mr-3 font-weight-bold elevation-1"},{default:e(()=>[r(i(o.name.charAt(0)),1)]),_:2},1024)]),default:e(()=>[a(B,{class:"font-weight-bold text-h6 mb-1"},{default:e(()=>[r(i(o.name),1)]),_:2},1024),a(D,{class:"text-body-1"},{default:e(()=>[n("div",$,[a(c,{size:"small",color:"success",class:"mr-2"},{default:e(()=>[...t[2]||(t[2]=[r(" mdi-clock-start ",-1)])]),_:1}),n("span",H,i(s.formatTime(o.start)),1)]),n("div",O,[a(c,{size:"small",color:"error",class:"mr-2"},{default:e(()=>[...t[3]||(t[3]=[r(" mdi-clock-end ",-1)])]),_:1}),n("span",P,i(s.formatTime(o.end)),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1})],64)):(l(),d("div",X,[a(c,{size:"large",class:"mb-2"},{default:e(()=>[...t[4]||(t[4]=[r(" mdi-alert-circle-outline ",-1)])]),_:1}),t[5]||(t[5]=r(" 无法加载考试信息 ",-1))]))]),_:1},8,["style"])]),_:1})}const ft=v(q,[["render",Y],["__scopeId","data-v-93870135"]]);export{ft as default}; +import{u as y}from"./index-DCuIjJC4.js";import{X as l,Y as f,Z as e,j as a,a1 as r,k as n,S as i,N as _,_ as d,F as h,$ as V,a2 as S,a7 as b,a8 as k}from"./vendor-vue-BiQC5iF7.js";import{_ as v,c as I,f as c,g as w,h as C,d as T,V as E,p as N,q as z,r as B,t as D,o as L,e as j}from"./index-DGIAsv4W.js";import{V as A}from"./VAlert-BZ4-f-hy.js";import"./dataProvider-GWPC-0Vt.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";import"./VChip-mRzIPuM0.js";import"./vendor-vuetify-DsKlzgKp.js";import"./VTabs-DqmvmKGK.js";import"./VTable-Cq72iBVc.js";import"./VTooltip-2IUjfpCS.js";import"./VTextField-BurlcggD.js";import"./soundList-D9U-Grcp.js";import"./VSwitch-k6hfPfa2.js";import"./VContainer-DZyPrcqa.js";import"./socketClient-BKHEsaLg.js";import"./vendor-socket-dm1FmSOd.js";import"./deviceEvents-HN9RDua9.js";import"./VAppBarTitle-DheyIZnb.js";import"./VRow-Cjhiymuu.js";const q={name:"ExamScheduleCard",props:{examId:{type:String,required:!0},contentStyle:{type:Object,default:()=>({})}},computed:{...k(y,["exams","loadingDetails"]),exam(){return this.exams[this.examId]},loading(){return this.loadingDetails[this.examId]}},mounted(){this.fetchExam(this.examId)},methods:{...b(y,["fetchExam"]),formatTime(m){if(!m)return"";try{const t=new Date(m),u=(t.getMonth()+1).toString().padStart(2,"0"),p=t.getDate().toString().padStart(2,"0"),x=t.getHours().toString().padStart(2,"0"),s=t.getMinutes().toString().padStart(2,"0");return`${u}-${p} ${x}:${s}`}catch{return m}}}},F={class:"text-truncate"},M={key:0,class:"d-flex justify-center align-center fill-height",style:{"min-height":"200px"}},$={class:"d-flex align-center mb-1"},H={class:"font-weight-medium"},O={class:"d-flex align-center"},P={class:"font-weight-medium"},X={key:2,class:"d-flex flex-column align-center justify-center fill-height text-grey mt-4"};function Y(m,t,u,p,x,s){return l(),f(j,{class:"fill-height d-flex flex-column rounded-xl",elevation:"2"},{default:e(()=>[a(I,{class:"d-flex align-center py-3 px-4 bg-primary text-white"},{default:e(()=>{var o;return[a(c,{class:"mr-2"},{default:e(()=>[...t[1]||(t[1]=[r(" mdi-calendar-clock ",-1)])]),_:1}),n("span",F,i(((o=s.exam)==null?void 0:o.examName)||"加载中..."),1),a(w),a(C,{icon:"mdi-close",variant:"text",density:"comfortable",onClick:t[0]||(t[0]=g=>m.$emit("close"))})]}),_:1}),a(T,{class:"flex-grow-1 pa-4 overflow-y-auto",style:_(u.contentStyle)},{default:e(()=>[s.loading?(l(),d("div",M,[a(E,{indeterminate:"",color:"primary"})])):s.exam?(l(),d(h,{key:1},[s.exam.message?(l(),f(A,{key:0,color:"info",variant:"tonal",class:"mb-4 text-body-1",border:"start",density:"compact"},{default:e(()=>[r(i(s.exam.message),1)]),_:1})):V("",!0),a(N,{density:"comfortable",class:"pa-0 bg-transparent"},{default:e(()=>[(l(!0),d(h,null,S(s.exam.examInfos,(o,g)=>(l(),f(z,{key:g,class:"px-0 mb-3"},{prepend:e(()=>[a(L,{color:"primary",variant:"tonal",size:"large",class:"mr-3 font-weight-bold elevation-1"},{default:e(()=>[r(i(o.name.charAt(0)),1)]),_:2},1024)]),default:e(()=>[a(B,{class:"font-weight-bold text-h6 mb-1"},{default:e(()=>[r(i(o.name),1)]),_:2},1024),a(D,{class:"text-body-1"},{default:e(()=>[n("div",$,[a(c,{size:"small",color:"success",class:"mr-2"},{default:e(()=>[...t[2]||(t[2]=[r(" mdi-clock-start ",-1)])]),_:1}),n("span",H,i(s.formatTime(o.start)),1)]),n("div",O,[a(c,{size:"small",color:"error",class:"mr-2"},{default:e(()=>[...t[3]||(t[3]=[r(" mdi-clock-end ",-1)])]),_:1}),n("span",P,i(s.formatTime(o.end)),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1})],64)):(l(),d("div",X,[a(c,{size:"large",class:"mb-2"},{default:e(()=>[...t[4]||(t[4]=[r(" mdi-alert-circle-outline ",-1)])]),_:1}),t[5]||(t[5]=r(" 无法加载考试信息 ",-1))]))]),_:1},8,["style"])]),_:1})}const ft=v(q,[["render",Y],["__scopeId","data-v-93870135"]]);export{ft as default}; diff --git a/assets/FloatingToolbar-Di0zKY20.js b/assets/FloatingToolbar-BZD3ZR8B.js similarity index 90% rename from assets/FloatingToolbar-Di0zKY20.js rename to assets/FloatingToolbar-BZD3ZR8B.js index 29e328c..b9eec19 100644 --- a/assets/FloatingToolbar-Di0zKY20.js +++ b/assets/FloatingToolbar-BZD3ZR8B.js @@ -1 +1 @@ -import{_ as v,e as m,y as b,h as n,a0 as r,v as y,aA as g}from"./index-CzpSlHRw.js";import{V as k}from"./VSheet-ZjkOR-Oc.js";import{V as T}from"./VDatePicker-BJ3ukfdk.js";import{X as s,_ as V,j as t,Z as o,n as x,R as d,m as C,Y as u,$ as c,a1 as $}from"./vendor-vue-28M5UGz3.js";import"./vendor-vuetify-95axeNJO.js";import"./VTooltip-C8vChj8G.js";import"./VPicker-199veasp.js";const B={name:"FloatingToolbar",props:{loading:{type:Boolean,default:!1},unreadCount:{type:Number,default:0},selectedDate:{type:[String,Date],required:!0},isToday:{type:Boolean,required:!0},copyToTodayLoading:{type:Boolean,default:!1}},data(){return{isExpanded:!1}},methods:{handleDateSelect(a){this.$emit("date-select",a)}}},D={class:"floating-toolbar-container"};function z(a,e,i,S,f,p){return s(),V("div",D,[t(y,null,{default:o(()=>[t(m,{class:x([{"toolbar-expanded":f.isExpanded},"floating-toolbar"]),elevation:"4",rounded:"xl"},{default:o(()=>[t(b,{class:"toolbar-buttons",variant:"text"},{default:o(()=>[d(t(n,{title:"查看昨天",class:"toolbar-btn",icon:"mdi-chevron-left",variant:"text",onClick:e[0]||(e[0]=l=>a.$emit("prev-day"))},null,512),[[r]]),d(t(n,{title:"缩小字体",class:"toolbar-btn",icon:"mdi-format-font-size-decrease",variant:"text",onClick:e[1]||(e[1]=l=>a.$emit("zoom","out"))},null,512),[[r]]),d(t(n,{title:"放大字体",class:"toolbar-btn",icon:"mdi-format-font-size-increase",variant:"text",onClick:e[2]||(e[2]=l=>a.$emit("zoom","up"))},null,512),[[r]]),t(k,{"close-on-content-click":!1,location:"top"},{activator:o(({props:l})=>[d(t(n,C({title:"选择日期",class:"toolbar-btn",icon:"mdi-calendar"},l,{variant:"text"}),null,16),[[r]])]),default:o(()=>[t(m,{border:"",class:"date-picker-card"},{default:o(()=>[t(T,{"model-value":i.selectedDate,color:"primary","onUpdate:modelValue":p.handleDateSelect},null,8,["model-value","onUpdate:modelValue"])]),_:1})]),_:1}),d(t(n,{loading:i.loading,title:"刷新数据",class:"toolbar-btn",icon:"mdi-refresh",variant:"text",onClick:e[3]||(e[3]=l=>a.$emit("refresh"))},null,8,["loading"]),[[r]]),i.isToday?c("",!0):d((s(),u(n,{key:0,title:"查看明天",class:"toolbar-btn",icon:"mdi-chevron-right",variant:"text",onClick:e[4]||(e[4]=l=>a.$emit("next-day"))},null,512)),[[r]])]),_:1})]),_:1},8,["class"])]),_:1}),t(g,null,{default:o(()=>[i.isToday?c("",!0):(s(),u(n,{key:0,loading:i.copyToTodayLoading,disabled:i.copyToTodayLoading,class:"side-action-btn",color:"primary",elevation:"4","prepend-icon":"mdi-content-copy",rounded:"xl",size:"large",text:"复制作业内容到今天",onClick:e[5]||(e[5]=l=>a.$emit("copy-to-today"))},{default:o(()=>[...e[6]||(e[6]=[$(" 复制到今天 ",-1)])]),_:1},8,["loading","disabled"]))]),_:1})])}const P=v(B,[["render",z],["__scopeId","data-v-ecf1022d"]]);export{P as default}; +import{_ as v,e as m,y as b,h as n,a0 as r,v as y,aA as g}from"./index-DGIAsv4W.js";import{V as k}from"./VSheet-BBnSA_kJ.js";import{V as T}from"./VDatePicker-CuGF0KeL.js";import{X as s,_ as V,j as t,Z as o,n as x,R as d,m as C,Y as u,$ as c,a1 as $}from"./vendor-vue-BiQC5iF7.js";import"./vendor-vuetify-DsKlzgKp.js";import"./VTooltip-2IUjfpCS.js";import"./VPicker-SM18M-iq.js";const B={name:"FloatingToolbar",props:{loading:{type:Boolean,default:!1},unreadCount:{type:Number,default:0},selectedDate:{type:[String,Date],required:!0},isToday:{type:Boolean,required:!0},copyToTodayLoading:{type:Boolean,default:!1}},data(){return{isExpanded:!1}},methods:{handleDateSelect(a){this.$emit("date-select",a)}}},D={class:"floating-toolbar-container"};function z(a,e,i,S,f,p){return s(),V("div",D,[t(y,null,{default:o(()=>[t(m,{class:x([{"toolbar-expanded":f.isExpanded},"floating-toolbar"]),elevation:"4",rounded:"xl"},{default:o(()=>[t(b,{class:"toolbar-buttons",variant:"text"},{default:o(()=>[d(t(n,{title:"查看昨天",class:"toolbar-btn",icon:"mdi-chevron-left",variant:"text",onClick:e[0]||(e[0]=l=>a.$emit("prev-day"))},null,512),[[r]]),d(t(n,{title:"缩小字体",class:"toolbar-btn",icon:"mdi-format-font-size-decrease",variant:"text",onClick:e[1]||(e[1]=l=>a.$emit("zoom","out"))},null,512),[[r]]),d(t(n,{title:"放大字体",class:"toolbar-btn",icon:"mdi-format-font-size-increase",variant:"text",onClick:e[2]||(e[2]=l=>a.$emit("zoom","up"))},null,512),[[r]]),t(k,{"close-on-content-click":!1,location:"top"},{activator:o(({props:l})=>[d(t(n,C({title:"选择日期",class:"toolbar-btn",icon:"mdi-calendar"},l,{variant:"text"}),null,16),[[r]])]),default:o(()=>[t(m,{border:"",class:"date-picker-card"},{default:o(()=>[t(T,{"model-value":i.selectedDate,color:"primary","onUpdate:modelValue":p.handleDateSelect},null,8,["model-value","onUpdate:modelValue"])]),_:1})]),_:1}),d(t(n,{loading:i.loading,title:"刷新数据",class:"toolbar-btn",icon:"mdi-refresh",variant:"text",onClick:e[3]||(e[3]=l=>a.$emit("refresh"))},null,8,["loading"]),[[r]]),i.isToday?c("",!0):d((s(),u(n,{key:0,title:"查看明天",class:"toolbar-btn",icon:"mdi-chevron-right",variant:"text",onClick:e[4]||(e[4]=l=>a.$emit("next-day"))},null,512)),[[r]])]),_:1})]),_:1},8,["class"])]),_:1}),t(g,null,{default:o(()=>[i.isToday?c("",!0):(s(),u(n,{key:0,loading:i.copyToTodayLoading,disabled:i.copyToTodayLoading,class:"side-action-btn",color:"primary",elevation:"4","prepend-icon":"mdi-content-copy",rounded:"xl",size:"large",text:"复制作业内容到今天",onClick:e[5]||(e[5]=l=>a.$emit("copy-to-today"))},{default:o(()=>[...e[6]||(e[6]=[$(" 复制到今天 ",-1)])]),_:1},8,["loading","disabled"]))]),_:1})])}const P=v(B,[["render",z],["__scopeId","data-v-ecf1022d"]]);export{P as default}; diff --git a/assets/HomeworkEditDialog-CbH0TGxK.js b/assets/HomeworkEditDialog-BpaBTmY_.js similarity index 95% rename from assets/HomeworkEditDialog-CbH0TGxK.js rename to assets/HomeworkEditDialog-BpaBTmY_.js index f4927e5..df4aca6 100644 --- a/assets/HomeworkEditDialog-CbH0TGxK.js +++ b/assets/HomeworkEditDialog-BpaBTmY_.js @@ -1,4 +1,4 @@ -import{d as L}from"./dataProvider-DBZnFcYO.js";import{_ as V,e as w,c as D,g as B,h as C,F as T,d as P,k as R,n as _}from"./index-CzpSlHRw.js";import{V as j}from"./VTextarea-zDVNnlPQ.js";import{V as x}from"./VChip-B3whZF-S.js";import{V as E}from"./VAlert-DaoJAibO.js";import{a0 as q}from"./vendor-vuetify-95axeNJO.js";import{X as o,Y as y,Z as c,j as d,a1 as h,S as k,k as f,_ as u,F as v,a2 as S,$ as g}from"./vendor-vue-28M5UGz3.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";import"./VTextField-BxdS2D7S.js";const A={name:"HomeworkEditDialog",props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},initialContent:{type:String,default:""},autoSave:{type:Boolean,default:!1},isEditingPastData:{type:Boolean,default:!1},currentDateString:{type:String,default:""}},emits:["update:modelValue","save"],setup(){const{mobile:n}=q();return{mobile:n}},data(){return{content:"",templateData:null,currentLine:"",currentLineStart:0,currentLineEnd:0,quickTexts:["课","题","例","变","T","P"]}},computed:{isMobile(){return _("display.forceDesktopMode")?!1:this.mobile},dialogVisible:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},subject(){return this.title},hasTemplates(){var n,t;return!!((t=(n=this.templateData)==null?void 0:n.actions)!=null&&t.length||this.subjectBooks||this.commonBooks)},subjectBooks(){var n,t,s;return!this.subject||!((s=(t=(n=this.templateData)==null?void 0:n.subjects)==null?void 0:t[this.subject])!=null&&s.books)?null:this.templateData.subjects[this.subject].books},commonBooks(){var n,t;return(t=(n=this.templateData)==null?void 0:n.commonSubject)!=null&&t.books?this.templateData.commonSubject.books:null},showQuickTools(){return _("display.showQuickTools")},autoSavePromptText(){return _("edit.autoSavePromptText")},manualSavePromptText(){return _("edit.manualSavePromptText")}},watch:{async modelValue(n){if(n){this.content=this.initialContent;try{this.templateData=await L.loadData("classworks-config-homework-template")}catch(t){console.error("Failed to load homework templates:",t),this.templateData=null}this.$nextTick(()=>{this.$refs.inputRef&&(this.$refs.inputRef.focus(),this.updateCurrentLine())})}}},methods:{handleClose(){const n=this.content.trim();n!==this.initialContent.trim()&&this.$emit("save",n),this.dialogVisible=!1},updateCurrentLine(){const t=this.$refs.inputRef.$el.querySelector("textarea").selectionStart,s=this.content;let a=0;const i=s.split(` +import{d as L}from"./dataProvider-GWPC-0Vt.js";import{_ as V,e as w,c as D,g as B,h as C,F as T,d as P,k as R,n as _}from"./index-DGIAsv4W.js";import{V as j}from"./VTextarea-vGWmTJww.js";import{V as x}from"./VChip-mRzIPuM0.js";import{V as E}from"./VAlert-BZ4-f-hy.js";import{a0 as q}from"./vendor-vuetify-DsKlzgKp.js";import{X as o,Y as y,Z as c,j as d,a1 as h,S as k,k as f,_ as u,F as v,a2 as S,$ as g}from"./vendor-vue-BiQC5iF7.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";import"./VTextField-BurlcggD.js";const A={name:"HomeworkEditDialog",props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},initialContent:{type:String,default:""},autoSave:{type:Boolean,default:!1},isEditingPastData:{type:Boolean,default:!1},currentDateString:{type:String,default:""}},emits:["update:modelValue","save"],setup(){const{mobile:n}=q();return{mobile:n}},data(){return{content:"",templateData:null,currentLine:"",currentLineStart:0,currentLineEnd:0,quickTexts:["课","题","例","变","T","P"]}},computed:{isMobile(){return _("display.forceDesktopMode")?!1:this.mobile},dialogVisible:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},subject(){return this.title},hasTemplates(){var n,t;return!!((t=(n=this.templateData)==null?void 0:n.actions)!=null&&t.length||this.subjectBooks||this.commonBooks)},subjectBooks(){var n,t,s;return!this.subject||!((s=(t=(n=this.templateData)==null?void 0:n.subjects)==null?void 0:t[this.subject])!=null&&s.books)?null:this.templateData.subjects[this.subject].books},commonBooks(){var n,t;return(t=(n=this.templateData)==null?void 0:n.commonSubject)!=null&&t.books?this.templateData.commonSubject.books:null},showQuickTools(){return _("display.showQuickTools")},autoSavePromptText(){return _("edit.autoSavePromptText")},manualSavePromptText(){return _("edit.manualSavePromptText")}},watch:{async modelValue(n){if(n){this.content=this.initialContent;try{this.templateData=await L.loadData("classworks-config-homework-template")}catch(t){console.error("Failed to load homework templates:",t),this.templateData=null}this.$nextTick(()=>{this.$refs.inputRef&&(this.$refs.inputRef.focus(),this.updateCurrentLine())})}}},methods:{handleClose(){const n=this.content.trim();n!==this.initialContent.trim()&&this.$emit("save",n),this.dialogVisible=!1},updateCurrentLine(){const t=this.$refs.inputRef.$el.querySelector("textarea").selectionStart,s=this.content;let a=0;const i=s.split(` `);for(let e=0;ea.includes(n));s!==-1&&(t.splice(s,1),this.content=t.join(` `))}else{const t=this.content.trim().length>0;this.content=(t?this.content.trim()+` diff --git a/assets/InitServiceChooser-CG7kcSTF.js b/assets/InitServiceChooser-Cm36vuZZ.js similarity index 97% rename from assets/InitServiceChooser-CG7kcSTF.js rename to assets/InitServiceChooser-Cm36vuZZ.js index 9c5b36e..b759aea 100644 --- a/assets/InitServiceChooser-CG7kcSTF.js +++ b/assets/InitServiceChooser-Cm36vuZZ.js @@ -1 +1 @@ -import{_ as ie,n as A,s as L,d as Q,f as k,e as y,l as P,h as g,g as ee,c as be,j as ue,o as xe,W as M,k as Y}from"./index-CzpSlHRw.js";import{a as q}from"./dataProvider-DBZnFcYO.js";import{V as ne}from"./VTextField-BxdS2D7S.js";import{V as re}from"./VAlert-DaoJAibO.js";import{o as ke,X as f,Y as z,Z as s,j as l,k as t,a1 as a,S as T,$,b as x,R as O,V as j,u as G,_ as F,F as we,a2 as ye,e as N,D as Ce}from"./vendor-vue-28M5UGz3.js";import{V as Ve}from"./VTextarea-zDVNnlPQ.js";import{V as ve}from"./VChip-B3whZF-S.js";import{V as $e,a as me,b as ce,c as pe}from"./VExpansionPanels-CQt43P3v.js";import{V as ze,a as fe}from"./VRow-sd4d6eNi.js";import{v as Se}from"./vendor-utils-B_Y_1aLs.js";import"./vendor-vuetify-95axeNJO.js";import"./serverRotation-xQe1elLG.js";const De={class:"text-center mb-6"},Te={class:"text-body-2"},_e={class:"form-section"},Ie={__name:"DeviceAuthDialog",props:{showCancel:{type:Boolean,default:!1},preconfig:{type:Object,default:null}},emits:["success","cancel"],setup(K,{expose:h,emit:C}){const V=K,r=C,c=x({namespace:"",password:""}),n=x(!1),d=x("");ke(()=>V.preconfig,u=>{u&&(console.log("应用预配置数据:",u),c.value.namespace=u.namespace||"",c.value.password=u.password||"",u.autoExecute&&u.namespace?(console.log("检测到自动执行标志且有命名空间,自动执行认证"),setTimeout(()=>{p()},300)):u.namespace&&console.log("预配置数据已填入,等待手动认证"))},{immediate:!0,deep:!0});const p=async()=>{var u,i,v,D,R;if(!(!c.value.namespace||n.value)){d.value="",n.value=!0;try{const w=A("server.domain");if(!w)throw new Error("未配置服务器域名");const U=await q.post(`${w}/apps/auth/token`,{namespace:c.value.namespace,password:c.value.password||void 0,appId:"d158067f53627d2b98babe8bffd2fd7d"});if(!U.data.success)throw new Error("设备验证失败");const E=U.data;L("server.kvToken",E.token),(u=E.device)!=null&&u.uuid&&L("device.uuid",E.device.uuid),r("success",E)}catch(w){const U=(i=w==null?void 0:w.response)==null?void 0:i.status;U===401||U===403?d.value="密码错误或无权限访问":U===404?d.value="设备不存在,请检查 namespace 是否正确":d.value=((R=(D=(v=w==null?void 0:w.response)==null?void 0:v.data)==null?void 0:D.error)==null?void 0:R.message)||(w==null?void 0:w.message)||"认证失败,请稍后重试"}finally{n.value=!1}}};return h({reset:()=>{c.value={namespace:"",password:""},d.value=""}}),(u,i)=>(f(),z(y,{class:"auth-card"},{default:s(()=>[l(Q,{class:"pa-8"},{default:s(()=>[t("div",De,[l(k,{class:"mb-4",color:"success",size:"80"},{default:s(()=>[...i[4]||(i[4]=[a(" mdi-account-key ",-1)])]),_:1}),i[5]||(i[5]=t("h2",{class:"text-h4 mb-3"}," 设备认证 ",-1)),i[6]||(i[6]=t("p",{class:"text-body-1 text-medium-emphasis"}," 输入你在 Classworks KV 获取的认证信息 ",-1))]),l(y,{class:"pa-4 mb-6",color:"info",variant:"tonal"},{default:s(()=>[t("div",Te,[l(k,{class:"mr-2",size:"20"},{default:s(()=>[...i[7]||(i[7]=[a(" mdi-information ",-1)])]),_:1}),i[8]||(i[8]=a(" 对于已有UUID的用户,您应当使用UUID与您的密码登录。 ",-1))])]),_:1}),t("div",_e,[l(ne,{modelValue:c.value.namespace,"onUpdate:modelValue":i[0]||(i[0]=v=>c.value.namespace=v),class:"mb-4","hide-details":"auto",label:"命名空间","prepend-inner-icon":"mdi-identifier",variant:"outlined"},null,8,["modelValue"]),l(ne,{modelValue:c.value.password,"onUpdate:modelValue":i[1]||(i[1]=v=>c.value.password=v),label:"认证码","prepend-inner-icon":"mdi-lock-outline",type:"text",variant:"outlined"},null,8,["modelValue"]),d.value?(f(),z(re,{key:0,class:"mt-4",closable:"",type:"error",variant:"tonal","onClick:close":i[2]||(i[2]=v=>d.value="")},{default:s(()=>[a(T(d.value),1)]),_:1})):$("",!0)])]),_:1}),l(P,{class:"pa-6 pt-0"},{default:s(()=>[K.showCancel?(f(),z(g,{key:0,size:"large",variant:"text",onClick:i[3]||(i[3]=v=>u.$emit("cancel"))},{default:s(()=>[...i[9]||(i[9]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(ee),l(g,{disabled:!c.value.namespace||n.value,loading:n.value,class:"px-8",color:"primary",size:"x-large",variant:"elevated",onClick:p},{default:s(()=>[l(k,{size:"24",start:""},{default:s(()=>[...i[10]||(i[10]=[a(" mdi-login ",-1)])]),_:1}),i[11]||(i[11]=t("span",{class:"text-h6"},"认证并登录",-1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))}},Ue=ie(Ie,[["__scopeId","data-v-4a0e5b44"]]),Ae={__name:"TokenInputDialog",props:{showCancel:{type:Boolean,default:!1}},emits:["success","cancel"],setup(K,{expose:h,emit:C}){const V=C,r=x(""),c=x(!1),n=x(""),d=async()=>{var p,u,i;if(!(!r.value||c.value)){n.value="",c.value=!0;try{const v=A("server.domain");if(!v)throw new Error("未配置服务器域名");await q.get(`${v}/kv/_info`,{headers:{Accept:"application/json","x-app-token":r.value}}),L("server.kvToken",r.value),V("success")}catch(v){const D=(p=v==null?void 0:v.response)==null?void 0:p.status;D===401||D===403?n.value="Token 无效或无权限,请确认后重试":D===404?n.value="命名空间不存在或服务器未就绪":n.value=((i=(u=v==null?void 0:v.response)==null?void 0:u.data)==null?void 0:i.message)||(v==null?void 0:v.message)||"验证失败,请稍后重试"}finally{c.value=!1}}};return h({reset:()=>{r.value="",n.value=""}}),(p,u)=>(f(),z(y,null,{default:s(()=>[l(be,null,{default:s(()=>[...u[2]||(u[2]=[a("输入授权 Token",-1)])]),_:1}),l(Q,null,{default:s(()=>[l(ne,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=i=>r.value=i),clearable:"",density:"comfortable","hide-details":"auto",label:"KV 授权 Token",placeholder:"粘贴从授权页面获取的 Token",variant:"outlined"},null,8,["modelValue"]),n.value?(f(),z(re,{key:0,class:"mt-3",type:"error",variant:"tonal"},{default:s(()=>[a(T(n.value),1)]),_:1})):$("",!0)]),_:1}),l(P,null,{default:s(()=>[l(ee),K.showCancel?(f(),z(g,{key:0,variant:"text",onClick:u[1]||(u[1]=i=>p.$emit("cancel"))},{default:s(()=>[...u[3]||(u[3]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(g,{disabled:!r.value||c.value,loading:c.value,color:"primary",onClick:d},{default:s(()=>[...u[4]||(u[4]=[a(" 保存 Token ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))}},Ke={__name:"AlternativeCodeDialog",props:{showCancel:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(K,{expose:h,emit:C}){const V=C,r=x(""),c=()=>{r.value&&V("submit",r.value)};return h({reset:()=>{r.value=""}}),(n,d)=>(f(),z(y,null,{default:s(()=>[l(be,null,{default:s(()=>[...d[2]||(d[2]=[a("输入替代代码",-1)])]),_:1}),l(Q,null,{default:s(()=>[l(Ve,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=p=>r.value=p),density:"comfortable","hide-details":"auto",label:"替代代码",placeholder:"请输入替代代码",rows:"5",variant:"outlined"},null,8,["modelValue"]),l(re,{class:"mt-3",type:"info",variant:"tonal"},{default:s(()=>[...d[3]||(d[3]=[a(" 替代代码功能暂未实现,敬请期待 ",-1)])]),_:1})]),_:1}),l(P,null,{default:s(()=>[l(ee),K.showCancel?(f(),z(g,{key:0,variant:"text",onClick:d[1]||(d[1]=p=>n.$emit("cancel"))},{default:s(()=>[...d[4]||(d[4]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(g,{disabled:!r.value,color:"primary",onClick:c},{default:s(()=>[...d[5]||(d[5]=[a(" 提交 ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1}))}},he={class:"step-content"},Ee={class:"text-center mb-6"},Be={class:"step-content"},Ne={class:"relationship-diagram"},Re={class:"diagram-item"},Oe={class:"text-center"},je={class:"diagram-description mt-3"},Fe={class:"diagram-connector"},Le={class:"diagram-item"},Ge={class:"text-center"},Me={class:"diagram-description mt-3"},He={class:"step-content"},Je={class:"button-group"},We={class:"d-flex flex-column align-center py-2"},Xe={class:"d-flex flex-column align-center py-2"},Ye={class:"step-content"},Ze={class:"text-center mb-6"},qe={class:"step-content"},Qe={class:"text-center mb-6"},Pe={class:"d-flex flex-column flex-sm-row align-center"},et={class:"flex-grow-1"},tt={class:"text-h6 font-weight-bold"},st={class:"text-h5 mb-6"},lt={class:"text-subtitle-2"},at={class:"d-flex align-center"},ot={class:"d-flex align-center"},nt={class:"step-content"},it={class:"text-center mb-6"},rt={class:"d-flex align-center mb-3"},dt={class:"text-h6 font-weight-medium"},ut={key:0,class:"text-body-2 mb-2"},vt={class:"mb-2"},mt={class:"device-code"},ct={key:1,class:"text-body-2 text-error"},pt={class:"log-box"},ft={key:0,class:"text-caption text-medium-emphasis"},bt={class:"d-flex flex-wrap gap-2 mt-4"},Z=5,kt={__name:"FirstTimeGuide",emits:["close","success"],setup(K,{emit:h}){const C=h,V=A("server.authDomain"),r=x(1),c=x(""),n=x("idle"),d=x(""),p=x(null),u=x(null),i=x([]),v=x({1:!1,2:!1,3:!1,4:!1}),D=()=>{r.value{r.value>1&&r.value--},w=S=>{c.value=S,D()},U=()=>{C("close")},E=()=>{window.open(V,"_blank")},te=()=>{r.value=5},se=N(()=>Object.values(v.value).filter(Boolean).length/4*100),H=N(()=>n.value==="success"?"success":n.value==="error"?"error":"primary"),le=N(()=>n.value==="success"?"mdi-check-circle":n.value==="error"?"mdi-alert-circle":n.value==="registering"?"mdi-progress-clock":"mdi-rocket-launch"),ae=N(()=>n.value==="success"?"完成!设备已创建":n.value==="error"?"创建失败":n.value==="registering"?"正在执行…":"准备开始"),m=S=>{const e=new Date,_=String(e.getHours()).padStart(2,"0"),I=String(e.getMinutes()).padStart(2,"0"),X=String(e.getSeconds()).padStart(2,"0");i.value.push({time:`${_}:${I}:${X}`,message:S})},o=()=>"Classworks",b=async()=>{var S,e,_;if(n.value!=="registering"){n.value="registering",d.value="",i.value=[],v.value={1:!1,2:!1,3:!1,4:!1};try{m("正在生成设备信息…");const I=Se(),X=o(),de=A("server.domain");v.value[1]=!0,m("向服务器注册设备…");const ge=await q.post(`${de}/devices`,{uuid:I,deviceName:X});v.value[2]=!0,p.value={uuid:I,deviceName:X,createdAt:new Date().toISOString(),registered:!0},localStorage.setItem("Classworks_progressive_device",JSON.stringify(p.value)),m("获取访问令牌…");try{const B=await q.post(`${de}/apps/auth/token`,{namespace:I,password:"",appId:"d158067f53627d2b98babe8bffd2fd7d"});B.data&&B.data.token?(u.value=B.data,L("server.kvToken",B.data.token),(S=B.data.device)!=null&&S.uuid&&L("device.uuid",B.data.device.uuid),m("已获取 Token 并写入配置")):m("未返回 Token,您可以稍后在授权页完成配置")}catch(B){console.warn("自动获取 Token 失败:",B),m("自动获取 Token 失败,可在授权页手动完成")}v.value[3]=!0,m("完成!您可以应用令牌或前往授权页面继续配置"),v.value[4]=!0,n.value="success"}catch(I){console.error("设备注册失败:",I),d.value=((_=(e=I.response)==null?void 0:e.data)==null?void 0:_.message)||I.message||"网络连接失败",m("失败:"+d.value),n.value="error"}}},oe=()=>{n.value="idle",d.value="",i.value=[],v.value={1:!1,2:!1,3:!1,4:!1}},J=()=>{const S=p.value;if(!(S!=null&&S.uuid))return;const _=`${A("server.authDomain")}/?uuid=${encodeURIComponent(S.uuid)}&tolinktoaccount=true`;window.open(_,"_blank")},W=()=>{u.value&&C("success",u.value),C("close")};return(S,e)=>(f(),z(y,{class:"guide-card"},{default:s(()=>[l(ue,{"model-value":r.value/Z*100,color:"primary",height:"6"},null,8,["model-value"]),l(Q,{class:"pa-8"},{default:s(()=>[O(t("div",he,[t("div",Ee,[l(k,{class:"mb-4",color:"primary",size:"80"},{default:s(()=>[...e[2]||(e[2]=[a(" mdi-hand-wave ",-1)])]),_:1}),e[3]||(e[3]=t("h2",{class:"text-h4 mb-3"}," 欢迎使用 Classworks ",-1)),e[4]||(e[4]=t("p",{class:"text-body-1 text-medium-emphasis"}," 适用于班级大屏的作业板小工具 ",-1))])],512),[[j,r.value===1]]),O(t("div",Be,[e[17]||(e[17]=t("h3",{class:"text-h5 mb-6 text-center"}," Classworks 和 Classworks KV 的关系 ",-1)),l(y,{class:"pa-6 mb-6",color:"primary",variant:"tonal"},{default:s(()=>[t("div",Ne,[t("div",Re,[l(y,{class:"pa-4",color:"blue-darken-1",elevation:"8"},{default:s(()=>[t("div",Oe,[l(k,{color:"white",size:"60"},{default:s(()=>[...e[5]||(e[5]=[a(" mdi-laptop ",-1)])]),_:1}),e[6]||(e[6]=t("h4",{class:"text-h6 text-white mt-2"}," Classworks ",-1)),e[7]||(e[7]=t("p",{class:"text-caption text-white mt-1"}," 作业板应用 ",-1))])]),_:1}),t("div",je,[l(ve,{class:"mb-2",color:"blue",size:"small",variant:"flat"},{default:s(()=>[...e[8]||(e[8]=[a(" 前端应用 ",-1)])]),_:1}),e[9]||(e[9]=t("div",{class:"text-body-2"},[a(" • 显示作业内容"),t("br"),a(" • 管理班级信息"),t("br"),a(" • 提供用户界面 ")],-1))])]),t("div",Fe,[l(k,{color:"primary",size:"40"},{default:s(()=>[...e[10]||(e[10]=[a(" mdi-swap-horizontal ",-1)])]),_:1}),e[11]||(e[11]=t("div",{class:"text-caption font-weight-bold mt-2"}," 数据同步 ",-1))]),t("div",Le,[l(y,{class:"pa-4",color:"green-darken-1",elevation:"8"},{default:s(()=>[t("div",Ge,[l(k,{color:"white",size:"60"},{default:s(()=>[...e[12]||(e[12]=[a(" mdi-cloud-sync ",-1)])]),_:1}),e[13]||(e[13]=t("h4",{class:"text-h6 text-white mt-2"}," Classworks KV ",-1)),e[14]||(e[14]=t("p",{class:"text-caption text-white mt-1"}," 云端数据库 ",-1))])]),_:1}),t("div",Me,[l(ve,{class:"mb-2",color:"green",size:"small",variant:"flat"},{default:s(()=>[...e[15]||(e[15]=[a(" 后端服务 ",-1)])]),_:1}),e[16]||(e[16]=t("div",{class:"text-body-2"},[a(" • 存储作业数据"),t("br"),a(" • 多设备同步"),t("br"),a(" • 权限管理 ")],-1))])])])]),_:1})],512),[[j,r.value===2]]),O(t("div",He,[e[25]||(e[25]=t("h3",{class:"text-h5 mb-6 text-center"}," 你需要在多个设备上查看作业吗? ",-1)),l(y,{class:"mb-6 pa-4",color:"info",variant:"tonal"},{default:s(()=>[...e[18]||(e[18]=[t("div",{class:"text-body-2"}," 比如:在家里电脑、手机上查看,或者多个教室设备共享数据 ",-1)])]),_:1}),t("div",Je,[l(g,{block:"",class:"mb-4 py-6",color:"primary",size:"x-large",variant:"elevated",onClick:e[0]||(e[0]=_=>w("cloud"))},{default:s(()=>[t("div",We,[l(k,{class:"mb-2",size:"40"},{default:s(()=>[...e[19]||(e[19]=[a(" mdi-cloud-check ",-1)])]),_:1}),e[20]||(e[20]=t("span",{class:"text-h6"},"需要,使用云同步",-1)),e[21]||(e[21]=t("span",{class:"text-caption mt-1"},"多设备访问",-1))])]),_:1}),l(g,{block:"",class:"py-6",size:"x-large",variant:"outlined",onClick:e[1]||(e[1]=_=>w("local"))},{default:s(()=>[t("div",Xe,[l(k,{class:"mb-2",size:"40"},{default:s(()=>[...e[22]||(e[22]=[a(" mdi-laptop ",-1)])]),_:1}),e[23]||(e[23]=t("span",{class:"text-h6"},"不需要,只用这台设备",-1)),e[24]||(e[24]=t("span",{class:"text-caption mt-1"},"本地存储",-1))])]),_:1})])],512),[[j,r.value===3]]),O(t("div",Ye,[t("div",Ze,[l(k,{class:"mb-4",color:"success",size:"80"},{default:s(()=>[...e[26]||(e[26]=[a(" mdi-check-circle ",-1)])]),_:1}),e[28]||(e[28]=t("h3",{class:"text-h5 mb-4"}," 您可以使用本地模式 ",-1)),l(y,{class:"pa-4 text-left",variant:"tonal"},{default:s(()=>[...e[27]||(e[27]=[t("div",{class:"text-body-1 mb-2"}," 此数据将存储在您的浏览器中,如果您的浏览器不支持IndexedDB,可能会出现问题。如果您经常清除浏览器数据,请谨慎使用本地模式。 ",-1),t("div",{class:"text-body-1 mb-2"}," 在刚才地方点击使用本地模式的按钮使用。 ",-1)])]),_:1})])],512),[[j,r.value===4&&c.value==="local"]]),O(t("div",qe,[t("div",Qe,[l(k,{class:"mb-4",color:"primary",size:"80"},{default:s(()=>[...e[29]||(e[29]=[a(" mdi-cloud-cog ",-1)])]),_:1}),e[30]||(e[30]=t("h3",{class:"text-h5 mb-4"}," 需要先设置云端账号 ",-1))]),l(y,{class:"pa-6 mb-6",variant:"tonal"},{default:s(()=>[t("div",Pe,[t("div",et,[e[32]||(e[32]=t("h4",{class:"text-h6 font-weight-bold mb-2"}," 自动注册设备 ",-1)),e[33]||(e[33]=t("p",{class:"text-body-2 mb-3 text-medium-emphasis"}," 通过引导式流程自动创建设备、获取令牌并完成初始化。适合首次体验或快速部署多终端。 ",-1)),l(g,{color:"primary","prepend-icon":"mdi-flash",size:"large",variant:"elevated",onClick:te},{default:s(()=>[...e[31]||(e[31]=[a(" 自动注册 ",-1)])]),_:1})])])]),_:1}),e[41]||(e[41]=t("div",{class:"mb-6"}," 也可以手动前往 Classworks KV 控制台获取认证信息: ",-1)),l(y,{color:G(V)=="https://kv.houlang.cloud"?"primary":"error",variant:G(V)=="https://kv.houlang.cloud"?"elevated":"outlined",class:"pa-6 mb-6",onClick:E},{default:s(()=>[l(k,{class:"mb-3",size:"48"},{default:s(()=>[...e[34]||(e[34]=[a(" mdi-open-in-new ",-1)])]),_:1}),t("h4",tt," 请访问 "+T(G(V)=="https://kv.houlang.cloud"?"Classworks KV":"自定义的 Classworks KV 实例 ")+" 控制台 ",1),t("div",st,T(G(V)),1),t("h6",lt,T(G(V)=="https://kv.houlang.cloud"?"此实例由 Classworks KV 官方提供":"此链接由您的实例、预配代码或管理员管理,当前可能不是 Classworks KV 官方的实例地址。"),1)]),_:1},8,["color","variant"]),l($e,{class:"mt-6",variant:"accordion"},{default:s(()=>[l(me,null,{default:s(()=>[l(ce,null,{default:s(()=>[t("div",at,[l(k,{class:"mr-3",color:"warning"},{default:s(()=>[...e[35]||(e[35]=[a(" mdi-help-circle ",-1)])]),_:1}),e[36]||(e[36]=t("span",{class:"text-subtitle-1 font-weight-medium"},"我以前已经使用过 Classworks KV?",-1))])]),_:1}),l(pe,null,{default:s(()=>[l(y,{class:"pa-4",color:"success",variant:"tonal"},{default:s(()=>[...e[37]||(e[37]=[t("div",{class:"text-body-2 mb-2"},[a(" 如果您之前已经使用过 Classworks KV,可以直接使用您的 "),t("strong",null,"UUID(命名空间)"),a(" 和 "),t("strong",null,"设置的密码"),a(" 进行认证。 ")],-1),t("div",{class:"text-body-2"},' 返回上一页,点击"已注册"按钮,输入您的认证信息即可登录。 ',-1)])]),_:1})]),_:1})]),_:1}),l(me,null,{default:s(()=>[l(ce,null,{default:s(()=>[t("div",ot,[l(k,{class:"mr-3",color:"info"},{default:s(()=>[...e[38]||(e[38]=[a(" mdi-help-circle ",-1)])]),_:1}),e[39]||(e[39]=t("span",{class:"text-subtitle-1 font-weight-medium"},"我如何配置不同类型的设备?",-1))])]),_:1}),l(pe,null,{default:s(()=>[l(y,{class:"pa-4",color:"info",variant:"tonal"},{default:s(()=>[...e[40]||(e[40]=[t("div",{class:"text-body-2 mb-2"},[a(" 不同的密码对应不同的设备类型,这将由 "),t("strong",null,"管理员管理"),a("。 ")],-1),t("div",{class:"text-body-2 mb-2"}," 例如: ",-1),t("ul",{class:"text-body-2 ml-4"},[t("li",{class:"mb-1"}," 班级大屏使用一个密码 "),t("li",{class:"mb-1"}," 教师设备使用另一个密码 "),t("li",null,"学生设备使用不同的密码")],-1),t("div",{class:"text-body-2 mt-3"}," 请联系您的管理员获取对应设备类型的密码。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})],512),[[j,r.value===4&&c.value==="cloud"]]),O(t("div",nt,[t("div",it,[l(xe,{class:"mb-4",color:"primary",size:"80",variant:"tonal"},{default:s(()=>[l(k,{size:"48"},{default:s(()=>[...e[42]||(e[42]=[a(" mdi-rocket-launch ",-1)])]),_:1})]),_:1}),e[43]||(e[43]=t("h3",{class:"text-h5 font-weight-bold mb-2"}," 渐进式注册 ",-1)),e[44]||(e[44]=t("p",{class:"text-body-2 text-medium-emphasis"}," 您可以暂时不配置 Classworks KV ",-1))]),l(ue,{"model-value":se.value,class:"mb-6",color:"primary",height:"8",rounded:""},null,8,["model-value"]),l(ze,null,{default:s(()=>[l(fe,{cols:"12"},{default:s(()=>[l(y,{color:H.value,variant:"tonal"},{default:s(()=>[l(M,null,{default:s(()=>[t("div",rt,[l(k,{color:H.value,class:"mr-2",size:"32"},{default:s(()=>[a(T(le.value),1)]),_:1},8,["color"]),t("div",dt,T(ae.value),1)]),p.value?(f(),F("div",ut,[t("div",vt,[e[45]||(e[45]=t("strong",null,"设备名称:",-1)),a(T(p.value.deviceName),1)]),t("div",null,[e[46]||(e[46]=t("strong",null,"设备 UUID:",-1)),t("code",mt,T(p.value.uuid),1)])])):$("",!0),n.value==="error"?(f(),F("div",ct,T(d.value),1)):$("",!0)]),_:1})]),_:1},8,["color"])]),_:1}),l(fe,{cols:"12"},{default:s(()=>[l(y,{variant:"outlined"},{default:s(()=>[l(M,null,{default:s(()=>[e[47]||(e[47]=t("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 过程日志 ",-1)),t("div",pt,[(f(!0),F(we,null,ye(i.value,(_,I)=>(f(),F("div",{key:I,class:"text-caption log-line"},T(_.time)+" · "+T(_.message),1))),128)),i.value.length?$("",!0):(f(),F("div",ft," 等待开始… "))])]),_:1})]),_:1})]),_:1})]),_:1}),t("div",bt,[n.value==="idle"?(f(),z(g,{key:0,color:"primary","prepend-icon":"mdi-play",size:"large",onClick:b},{default:s(()=>[...e[48]||(e[48]=[a(" 开始创建 ",-1)])]),_:1})):$("",!0),n.value==="error"?(f(),z(g,{key:1,color:"error","prepend-icon":"mdi-refresh",variant:"outlined",onClick:oe},{default:s(()=>[...e[49]||(e[49]=[a(" 重试 ",-1)])]),_:1})):$("",!0),n.value==="registering"?(f(),z(g,{key:2,loading:!0,color:"primary","prepend-icon":"mdi-progress-clock",variant:"tonal"},{default:s(()=>[...e[50]||(e[50]=[a(" 正在执行… ",-1)])]),_:1})):$("",!0),n.value==="success"?(f(),z(g,{key:3,color:"success","prepend-icon":"mdi-check-circle",size:"large",variant:"elevated",onClick:W},{default:s(()=>[...e[51]||(e[51]=[a(" 应用令牌并关闭 ",-1)])]),_:1})):$("",!0),n.value==="success"?(f(),z(g,{key:4,color:"primary","prepend-icon":"mdi-open-in-new",size:"large",variant:"outlined",onClick:J},{default:s(()=>[...e[52]||(e[52]=[a(" 前往绑定账户 ",-1)])]),_:1})):$("",!0)])],512),[[j,r.value===5]])]),_:1}),l(P,{class:"pa-6 pt-0"},{default:s(()=>[r.value>1?(f(),z(g,{key:0,size:"large",variant:"text",onClick:R},{default:s(()=>[l(k,{start:""},{default:s(()=>[...e[53]||(e[53]=[a(" mdi-chevron-left ",-1)])]),_:1}),e[54]||(e[54]=a(" 上一步 ",-1))]),_:1})):$("",!0),l(ee),r.value[e[56]||(e[56]=a(" 下一步 ",-1)),l(k,{end:""},{default:s(()=>[...e[55]||(e[55]=[a(" mdi-chevron-right ",-1)])]),_:1})]),_:1},8,["disabled"])):$("",!0),r.value===Z||r.value===4?(f(),z(g,{key:2,color:"primary",size:"large",variant:"elevated",onClick:U},{default:s(()=>[...e[57]||(e[57]=[a(" 关闭 ",-1)])]),_:1})):$("",!0)]),_:1})]),_:1}))}},gt=ie(kt,[["__scopeId","data-v-20273397"]]),xt={key:0,class:"init-overlay"},wt={class:"init-container"},yt={class:"main-card-row"},Ct={class:"card-horizontal-layout"},Vt={class:"card-icon-wrapper"},$t={class:"card-horizontal-layout"},zt={class:"card-icon-wrapper"},St={class:"card-horizontal-layout"},Dt={class:"card-icon-wrapper"},Tt={class:"options-buttons"},_t={__name:"InitServiceChooser",props:{preconfig:{type:Object,default:()=>({namespace:null,authCode:null,autoOpen:!1,autoExecute:!1})}},emits:["done"],setup(K,{emit:h}){const C=K,V=h,r=x(!1),c=x(!1),n=x(!1),d=x(!1),p=x(!1),u=x(null),i=N(()=>A("server.provider")),v=N(()=>i.value==="kv-server"||i.value==="classworkscloud"),D=N(()=>A("server.kvToken")),R=N(()=>{var m;return(m=C.preconfig)!=null&&m.namespace?{namespace:C.preconfig.namespace,password:C.preconfig.authCode||"",autoExecute:C.preconfig.autoExecute||!1}:null}),w=()=>{const m=window.location.pathname,o=m==="/"||m==="/index"||m==="/index.html",b=v.value&&(!D.value||D.value==="");r.value=o&&b};ke(()=>C.preconfig,m=>{m!=null&&m.autoOpen&&(m!=null&&m.namespace)&&r.value&&(console.log("检测到预配数据,自动打开设备认证对话框"),setTimeout(()=>{n.value=!0},500))},{immediate:!0,deep:!0}),Ce(()=>{w()});const U=()=>{const m=A("server.authDomain"),o="d158067f53627d2b98babe8bffd2fd7d",b=window.location.origin,oe=encodeURIComponent(`${b}/authorizecallback`),J=A("device.uuid")||"00000000-0000-4000-8000-000000000000";let W=`${m}/authorize?app_id=${o}&mode=callback&callback_url=${oe}&remark=Classworks 自动授权 来自${window.location.hostname} ${new Date().toLocaleString()}`;J!=="00000000-0000-4000-8000-000000000000"&&(W+=`&uuid=${encodeURIComponent(J)}`),window.location.href=W},E=m=>{c.value=!1,console.log("渐进式注册成功:",m),w(),V("done")},te=m=>{var o;n.value=!1,console.log("认证成功:",m),(o=C.preconfig)!=null&&o.namespace&&console.log(`预配数据认证成功: ${C.preconfig.namespace}`),w(),V("done")},se=()=>{d.value=!1,w(),V("done")},H=m=>{console.log("替代代码:",m),p.value=!1},le=()=>{L("server.provider","kv-local"),r.value=!1,window.location.reload(),V("done")},ae=()=>{window.open(A("server.authDomain"),"_blank")};return(m,o)=>r.value?(f(),F("div",xt,[t("div",wt,[o[22]||(o[22]=t("div",{class:"init-header"},[t("div",{class:"title"}," 欢迎使用 Classworks "),t("div",{class:"subtitle"}," 请选择你的使用方式 ")],-1)),t("div",yt,[l(y,{class:"main-service-card gradient-new clickable",elevation:"4",onClick:o[0]||(o[0]=b=>c.value=!0)},{default:s(()=>[l(M,null,{default:s(()=>[t("div",Ct,[t("div",Vt,[l(k,{color:"primary",size:"48"},{default:s(()=>[...o[12]||(o[12]=[a(" mdi-new-box ",-1)])]),_:1})]),o[13]||(o[13]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," 初次使用 "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 了解 Classworks KV 并开始使用 ")],-1))])]),_:1})]),_:1}),l(y,{class:"main-service-card gradient-registered clickable",elevation:"4",onClick:o[1]||(o[1]=b=>n.value=!0)},{default:s(()=>[l(M,null,{default:s(()=>[t("div",$t,[t("div",zt,[l(k,{color:"success",size:"48"},{default:s(()=>[...o[14]||(o[14]=[a(" mdi-account-check ",-1)])]),_:1})]),o[15]||(o[15]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," 已注册 "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 使用设备 Namespace 登录 ")],-1))])]),_:1})]),_:1}),l(y,{class:"main-service-card clickable",elevation:"4",onClick:ae},{default:s(()=>[l(M,null,{default:s(()=>[t("div",St,[t("div",Dt,[l(k,{color:"info",size:"48"},{default:s(()=>[...o[16]||(o[16]=[a(" mdi-database-cog ",-1)])]),_:1})]),o[17]||(o[17]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," Classworks KV "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 打开云端控制台管理数据 ")],-1))])]),_:1})]),_:1})]),t("div",Tt,[l(g,{"prepend-icon":"mdi-laptop",size:"small",variant:"tonal",onClick:le},{default:s(()=>[...o[18]||(o[18]=[a(" 使用本地模式 ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-flash",size:"small",variant:"tonal",onClick:U},{default:s(()=>[...o[19]||(o[19]=[a(" 授权码式授权(弃用) ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-key",size:"small",variant:"tonal",onClick:o[2]||(o[2]=b=>d.value=!0)},{default:s(()=>[...o[20]||(o[20]=[a(" 输入 Token ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-code-tags",size:"small",variant:"tonal",onClick:o[3]||(o[3]=b=>p.value=!0)},{default:s(()=>[...o[21]||(o[21]=[a(" 输入替代代码 ",-1)])]),_:1})]),o[23]||(o[23]=t("div",{class:"footer-hint"}," 完成授权后可使用作业同步、考试看板等在线功能。 ",-1))]),l(Y,{modelValue:c.value,"onUpdate:modelValue":o[5]||(o[5]=b=>c.value=b),"max-width":"600"},{default:s(()=>[l(gt,{onClose:o[4]||(o[4]=b=>c.value=!1),onSuccess:E})]),_:1},8,["modelValue"]),l(Y,{modelValue:n.value,"onUpdate:modelValue":o[7]||(o[7]=b=>n.value=b),"max-width":"500"},{default:s(()=>[l(Ue,{ref_key:"deviceAuthDialog",ref:u,preconfig:R.value,"show-cancel":!0,onCancel:o[6]||(o[6]=b=>n.value=!1),onSuccess:te},null,8,["preconfig"])]),_:1},8,["modelValue"]),l(Y,{modelValue:d.value,"onUpdate:modelValue":o[9]||(o[9]=b=>d.value=b),"max-width":"500"},{default:s(()=>[l(Ae,{"show-cancel":!0,onCancel:o[8]||(o[8]=b=>d.value=!1),onSuccess:se})]),_:1},8,["modelValue"]),l(Y,{modelValue:p.value,"onUpdate:modelValue":o[11]||(o[11]=b=>p.value=b),"max-width":"500"},{default:s(()=>[l(Ke,{"show-cancel":!0,onCancel:o[10]||(o[10]=b=>p.value=!1),onSubmit:H})]),_:1},8,["modelValue"])])):$("",!0)}},Lt=ie(_t,[["__scopeId","data-v-cbfbc6db"]]);export{Lt as default}; +import{_ as ie,n as A,s as L,d as Q,f as k,e as y,l as P,h as g,g as ee,c as be,j as ue,o as xe,W as M,k as Y}from"./index-DGIAsv4W.js";import{a as q}from"./dataProvider-GWPC-0Vt.js";import{V as ne}from"./VTextField-BurlcggD.js";import{V as re}from"./VAlert-BZ4-f-hy.js";import{o as ke,X as f,Y as z,Z as s,j as l,k as t,a1 as a,S as T,$,b as x,R as O,V as j,u as G,_ as F,F as we,a2 as ye,e as N,D as Ce}from"./vendor-vue-BiQC5iF7.js";import{V as Ve}from"./VTextarea-vGWmTJww.js";import{V as ve}from"./VChip-mRzIPuM0.js";import{V as $e,a as me,b as ce,c as pe}from"./VExpansionPanels-BDI8gHu5.js";import{V as ze,a as fe}from"./VRow-Cjhiymuu.js";import{v as Se}from"./vendor-utils-DwALrQNc.js";import"./vendor-vuetify-DsKlzgKp.js";import"./serverRotation-BtcwvdZJ.js";const De={class:"text-center mb-6"},Te={class:"text-body-2"},_e={class:"form-section"},Ie={__name:"DeviceAuthDialog",props:{showCancel:{type:Boolean,default:!1},preconfig:{type:Object,default:null}},emits:["success","cancel"],setup(K,{expose:h,emit:C}){const V=K,r=C,c=x({namespace:"",password:""}),n=x(!1),d=x("");ke(()=>V.preconfig,u=>{u&&(console.log("应用预配置数据:",u),c.value.namespace=u.namespace||"",c.value.password=u.password||"",u.autoExecute&&u.namespace?(console.log("检测到自动执行标志且有命名空间,自动执行认证"),setTimeout(()=>{p()},300)):u.namespace&&console.log("预配置数据已填入,等待手动认证"))},{immediate:!0,deep:!0});const p=async()=>{var u,i,v,D,R;if(!(!c.value.namespace||n.value)){d.value="",n.value=!0;try{const w=A("server.domain");if(!w)throw new Error("未配置服务器域名");const U=await q.post(`${w}/apps/auth/token`,{namespace:c.value.namespace,password:c.value.password||void 0,appId:"d158067f53627d2b98babe8bffd2fd7d"});if(!U.data.success)throw new Error("设备验证失败");const E=U.data;L("server.kvToken",E.token),(u=E.device)!=null&&u.uuid&&L("device.uuid",E.device.uuid),r("success",E)}catch(w){const U=(i=w==null?void 0:w.response)==null?void 0:i.status;U===401||U===403?d.value="密码错误或无权限访问":U===404?d.value="设备不存在,请检查 namespace 是否正确":d.value=((R=(D=(v=w==null?void 0:w.response)==null?void 0:v.data)==null?void 0:D.error)==null?void 0:R.message)||(w==null?void 0:w.message)||"认证失败,请稍后重试"}finally{n.value=!1}}};return h({reset:()=>{c.value={namespace:"",password:""},d.value=""}}),(u,i)=>(f(),z(y,{class:"auth-card"},{default:s(()=>[l(Q,{class:"pa-8"},{default:s(()=>[t("div",De,[l(k,{class:"mb-4",color:"success",size:"80"},{default:s(()=>[...i[4]||(i[4]=[a(" mdi-account-key ",-1)])]),_:1}),i[5]||(i[5]=t("h2",{class:"text-h4 mb-3"}," 设备认证 ",-1)),i[6]||(i[6]=t("p",{class:"text-body-1 text-medium-emphasis"}," 输入你在 Classworks KV 获取的认证信息 ",-1))]),l(y,{class:"pa-4 mb-6",color:"info",variant:"tonal"},{default:s(()=>[t("div",Te,[l(k,{class:"mr-2",size:"20"},{default:s(()=>[...i[7]||(i[7]=[a(" mdi-information ",-1)])]),_:1}),i[8]||(i[8]=a(" 对于已有UUID的用户,您应当使用UUID与您的密码登录。 ",-1))])]),_:1}),t("div",_e,[l(ne,{modelValue:c.value.namespace,"onUpdate:modelValue":i[0]||(i[0]=v=>c.value.namespace=v),class:"mb-4","hide-details":"auto",label:"命名空间","prepend-inner-icon":"mdi-identifier",variant:"outlined"},null,8,["modelValue"]),l(ne,{modelValue:c.value.password,"onUpdate:modelValue":i[1]||(i[1]=v=>c.value.password=v),label:"认证码","prepend-inner-icon":"mdi-lock-outline",type:"text",variant:"outlined"},null,8,["modelValue"]),d.value?(f(),z(re,{key:0,class:"mt-4",closable:"",type:"error",variant:"tonal","onClick:close":i[2]||(i[2]=v=>d.value="")},{default:s(()=>[a(T(d.value),1)]),_:1})):$("",!0)])]),_:1}),l(P,{class:"pa-6 pt-0"},{default:s(()=>[K.showCancel?(f(),z(g,{key:0,size:"large",variant:"text",onClick:i[3]||(i[3]=v=>u.$emit("cancel"))},{default:s(()=>[...i[9]||(i[9]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(ee),l(g,{disabled:!c.value.namespace||n.value,loading:n.value,class:"px-8",color:"primary",size:"x-large",variant:"elevated",onClick:p},{default:s(()=>[l(k,{size:"24",start:""},{default:s(()=>[...i[10]||(i[10]=[a(" mdi-login ",-1)])]),_:1}),i[11]||(i[11]=t("span",{class:"text-h6"},"认证并登录",-1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))}},Ue=ie(Ie,[["__scopeId","data-v-4a0e5b44"]]),Ae={__name:"TokenInputDialog",props:{showCancel:{type:Boolean,default:!1}},emits:["success","cancel"],setup(K,{expose:h,emit:C}){const V=C,r=x(""),c=x(!1),n=x(""),d=async()=>{var p,u,i;if(!(!r.value||c.value)){n.value="",c.value=!0;try{const v=A("server.domain");if(!v)throw new Error("未配置服务器域名");await q.get(`${v}/kv/_info`,{headers:{Accept:"application/json","x-app-token":r.value}}),L("server.kvToken",r.value),V("success")}catch(v){const D=(p=v==null?void 0:v.response)==null?void 0:p.status;D===401||D===403?n.value="Token 无效或无权限,请确认后重试":D===404?n.value="命名空间不存在或服务器未就绪":n.value=((i=(u=v==null?void 0:v.response)==null?void 0:u.data)==null?void 0:i.message)||(v==null?void 0:v.message)||"验证失败,请稍后重试"}finally{c.value=!1}}};return h({reset:()=>{r.value="",n.value=""}}),(p,u)=>(f(),z(y,null,{default:s(()=>[l(be,null,{default:s(()=>[...u[2]||(u[2]=[a("输入授权 Token",-1)])]),_:1}),l(Q,null,{default:s(()=>[l(ne,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=i=>r.value=i),clearable:"",density:"comfortable","hide-details":"auto",label:"KV 授权 Token",placeholder:"粘贴从授权页面获取的 Token",variant:"outlined"},null,8,["modelValue"]),n.value?(f(),z(re,{key:0,class:"mt-3",type:"error",variant:"tonal"},{default:s(()=>[a(T(n.value),1)]),_:1})):$("",!0)]),_:1}),l(P,null,{default:s(()=>[l(ee),K.showCancel?(f(),z(g,{key:0,variant:"text",onClick:u[1]||(u[1]=i=>p.$emit("cancel"))},{default:s(()=>[...u[3]||(u[3]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(g,{disabled:!r.value||c.value,loading:c.value,color:"primary",onClick:d},{default:s(()=>[...u[4]||(u[4]=[a(" 保存 Token ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))}},Ke={__name:"AlternativeCodeDialog",props:{showCancel:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(K,{expose:h,emit:C}){const V=C,r=x(""),c=()=>{r.value&&V("submit",r.value)};return h({reset:()=>{r.value=""}}),(n,d)=>(f(),z(y,null,{default:s(()=>[l(be,null,{default:s(()=>[...d[2]||(d[2]=[a("输入替代代码",-1)])]),_:1}),l(Q,null,{default:s(()=>[l(Ve,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=p=>r.value=p),density:"comfortable","hide-details":"auto",label:"替代代码",placeholder:"请输入替代代码",rows:"5",variant:"outlined"},null,8,["modelValue"]),l(re,{class:"mt-3",type:"info",variant:"tonal"},{default:s(()=>[...d[3]||(d[3]=[a(" 替代代码功能暂未实现,敬请期待 ",-1)])]),_:1})]),_:1}),l(P,null,{default:s(()=>[l(ee),K.showCancel?(f(),z(g,{key:0,variant:"text",onClick:d[1]||(d[1]=p=>n.$emit("cancel"))},{default:s(()=>[...d[4]||(d[4]=[a(" 取消 ",-1)])]),_:1})):$("",!0),l(g,{disabled:!r.value,color:"primary",onClick:c},{default:s(()=>[...d[5]||(d[5]=[a(" 提交 ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1}))}},he={class:"step-content"},Ee={class:"text-center mb-6"},Be={class:"step-content"},Ne={class:"relationship-diagram"},Re={class:"diagram-item"},Oe={class:"text-center"},je={class:"diagram-description mt-3"},Fe={class:"diagram-connector"},Le={class:"diagram-item"},Ge={class:"text-center"},Me={class:"diagram-description mt-3"},He={class:"step-content"},Je={class:"button-group"},We={class:"d-flex flex-column align-center py-2"},Xe={class:"d-flex flex-column align-center py-2"},Ye={class:"step-content"},Ze={class:"text-center mb-6"},qe={class:"step-content"},Qe={class:"text-center mb-6"},Pe={class:"d-flex flex-column flex-sm-row align-center"},et={class:"flex-grow-1"},tt={class:"text-h6 font-weight-bold"},st={class:"text-h5 mb-6"},lt={class:"text-subtitle-2"},at={class:"d-flex align-center"},ot={class:"d-flex align-center"},nt={class:"step-content"},it={class:"text-center mb-6"},rt={class:"d-flex align-center mb-3"},dt={class:"text-h6 font-weight-medium"},ut={key:0,class:"text-body-2 mb-2"},vt={class:"mb-2"},mt={class:"device-code"},ct={key:1,class:"text-body-2 text-error"},pt={class:"log-box"},ft={key:0,class:"text-caption text-medium-emphasis"},bt={class:"d-flex flex-wrap gap-2 mt-4"},Z=5,kt={__name:"FirstTimeGuide",emits:["close","success"],setup(K,{emit:h}){const C=h,V=A("server.authDomain"),r=x(1),c=x(""),n=x("idle"),d=x(""),p=x(null),u=x(null),i=x([]),v=x({1:!1,2:!1,3:!1,4:!1}),D=()=>{r.value{r.value>1&&r.value--},w=S=>{c.value=S,D()},U=()=>{C("close")},E=()=>{window.open(V,"_blank")},te=()=>{r.value=5},se=N(()=>Object.values(v.value).filter(Boolean).length/4*100),H=N(()=>n.value==="success"?"success":n.value==="error"?"error":"primary"),le=N(()=>n.value==="success"?"mdi-check-circle":n.value==="error"?"mdi-alert-circle":n.value==="registering"?"mdi-progress-clock":"mdi-rocket-launch"),ae=N(()=>n.value==="success"?"完成!设备已创建":n.value==="error"?"创建失败":n.value==="registering"?"正在执行…":"准备开始"),m=S=>{const e=new Date,_=String(e.getHours()).padStart(2,"0"),I=String(e.getMinutes()).padStart(2,"0"),X=String(e.getSeconds()).padStart(2,"0");i.value.push({time:`${_}:${I}:${X}`,message:S})},o=()=>"Classworks",b=async()=>{var S,e,_;if(n.value!=="registering"){n.value="registering",d.value="",i.value=[],v.value={1:!1,2:!1,3:!1,4:!1};try{m("正在生成设备信息…");const I=Se(),X=o(),de=A("server.domain");v.value[1]=!0,m("向服务器注册设备…");const ge=await q.post(`${de}/devices`,{uuid:I,deviceName:X});v.value[2]=!0,p.value={uuid:I,deviceName:X,createdAt:new Date().toISOString(),registered:!0},localStorage.setItem("Classworks_progressive_device",JSON.stringify(p.value)),m("获取访问令牌…");try{const B=await q.post(`${de}/apps/auth/token`,{namespace:I,password:"",appId:"d158067f53627d2b98babe8bffd2fd7d"});B.data&&B.data.token?(u.value=B.data,L("server.kvToken",B.data.token),(S=B.data.device)!=null&&S.uuid&&L("device.uuid",B.data.device.uuid),m("已获取 Token 并写入配置")):m("未返回 Token,您可以稍后在授权页完成配置")}catch(B){console.warn("自动获取 Token 失败:",B),m("自动获取 Token 失败,可在授权页手动完成")}v.value[3]=!0,m("完成!您可以应用令牌或前往授权页面继续配置"),v.value[4]=!0,n.value="success"}catch(I){console.error("设备注册失败:",I),d.value=((_=(e=I.response)==null?void 0:e.data)==null?void 0:_.message)||I.message||"网络连接失败",m("失败:"+d.value),n.value="error"}}},oe=()=>{n.value="idle",d.value="",i.value=[],v.value={1:!1,2:!1,3:!1,4:!1}},J=()=>{const S=p.value;if(!(S!=null&&S.uuid))return;const _=`${A("server.authDomain")}/?uuid=${encodeURIComponent(S.uuid)}&tolinktoaccount=true`;window.open(_,"_blank")},W=()=>{u.value&&C("success",u.value),C("close")};return(S,e)=>(f(),z(y,{class:"guide-card"},{default:s(()=>[l(ue,{"model-value":r.value/Z*100,color:"primary",height:"6"},null,8,["model-value"]),l(Q,{class:"pa-8"},{default:s(()=>[O(t("div",he,[t("div",Ee,[l(k,{class:"mb-4",color:"primary",size:"80"},{default:s(()=>[...e[2]||(e[2]=[a(" mdi-hand-wave ",-1)])]),_:1}),e[3]||(e[3]=t("h2",{class:"text-h4 mb-3"}," 欢迎使用 Classworks ",-1)),e[4]||(e[4]=t("p",{class:"text-body-1 text-medium-emphasis"}," 适用于班级大屏的作业板小工具 ",-1))])],512),[[j,r.value===1]]),O(t("div",Be,[e[17]||(e[17]=t("h3",{class:"text-h5 mb-6 text-center"}," Classworks 和 Classworks KV 的关系 ",-1)),l(y,{class:"pa-6 mb-6",color:"primary",variant:"tonal"},{default:s(()=>[t("div",Ne,[t("div",Re,[l(y,{class:"pa-4",color:"blue-darken-1",elevation:"8"},{default:s(()=>[t("div",Oe,[l(k,{color:"white",size:"60"},{default:s(()=>[...e[5]||(e[5]=[a(" mdi-laptop ",-1)])]),_:1}),e[6]||(e[6]=t("h4",{class:"text-h6 text-white mt-2"}," Classworks ",-1)),e[7]||(e[7]=t("p",{class:"text-caption text-white mt-1"}," 作业板应用 ",-1))])]),_:1}),t("div",je,[l(ve,{class:"mb-2",color:"blue",size:"small",variant:"flat"},{default:s(()=>[...e[8]||(e[8]=[a(" 前端应用 ",-1)])]),_:1}),e[9]||(e[9]=t("div",{class:"text-body-2"},[a(" • 显示作业内容"),t("br"),a(" • 管理班级信息"),t("br"),a(" • 提供用户界面 ")],-1))])]),t("div",Fe,[l(k,{color:"primary",size:"40"},{default:s(()=>[...e[10]||(e[10]=[a(" mdi-swap-horizontal ",-1)])]),_:1}),e[11]||(e[11]=t("div",{class:"text-caption font-weight-bold mt-2"}," 数据同步 ",-1))]),t("div",Le,[l(y,{class:"pa-4",color:"green-darken-1",elevation:"8"},{default:s(()=>[t("div",Ge,[l(k,{color:"white",size:"60"},{default:s(()=>[...e[12]||(e[12]=[a(" mdi-cloud-sync ",-1)])]),_:1}),e[13]||(e[13]=t("h4",{class:"text-h6 text-white mt-2"}," Classworks KV ",-1)),e[14]||(e[14]=t("p",{class:"text-caption text-white mt-1"}," 云端数据库 ",-1))])]),_:1}),t("div",Me,[l(ve,{class:"mb-2",color:"green",size:"small",variant:"flat"},{default:s(()=>[...e[15]||(e[15]=[a(" 后端服务 ",-1)])]),_:1}),e[16]||(e[16]=t("div",{class:"text-body-2"},[a(" • 存储作业数据"),t("br"),a(" • 多设备同步"),t("br"),a(" • 权限管理 ")],-1))])])])]),_:1})],512),[[j,r.value===2]]),O(t("div",He,[e[25]||(e[25]=t("h3",{class:"text-h5 mb-6 text-center"}," 你需要在多个设备上查看作业吗? ",-1)),l(y,{class:"mb-6 pa-4",color:"info",variant:"tonal"},{default:s(()=>[...e[18]||(e[18]=[t("div",{class:"text-body-2"}," 比如:在家里电脑、手机上查看,或者多个教室设备共享数据 ",-1)])]),_:1}),t("div",Je,[l(g,{block:"",class:"mb-4 py-6",color:"primary",size:"x-large",variant:"elevated",onClick:e[0]||(e[0]=_=>w("cloud"))},{default:s(()=>[t("div",We,[l(k,{class:"mb-2",size:"40"},{default:s(()=>[...e[19]||(e[19]=[a(" mdi-cloud-check ",-1)])]),_:1}),e[20]||(e[20]=t("span",{class:"text-h6"},"需要,使用云同步",-1)),e[21]||(e[21]=t("span",{class:"text-caption mt-1"},"多设备访问",-1))])]),_:1}),l(g,{block:"",class:"py-6",size:"x-large",variant:"outlined",onClick:e[1]||(e[1]=_=>w("local"))},{default:s(()=>[t("div",Xe,[l(k,{class:"mb-2",size:"40"},{default:s(()=>[...e[22]||(e[22]=[a(" mdi-laptop ",-1)])]),_:1}),e[23]||(e[23]=t("span",{class:"text-h6"},"不需要,只用这台设备",-1)),e[24]||(e[24]=t("span",{class:"text-caption mt-1"},"本地存储",-1))])]),_:1})])],512),[[j,r.value===3]]),O(t("div",Ye,[t("div",Ze,[l(k,{class:"mb-4",color:"success",size:"80"},{default:s(()=>[...e[26]||(e[26]=[a(" mdi-check-circle ",-1)])]),_:1}),e[28]||(e[28]=t("h3",{class:"text-h5 mb-4"}," 您可以使用本地模式 ",-1)),l(y,{class:"pa-4 text-left",variant:"tonal"},{default:s(()=>[...e[27]||(e[27]=[t("div",{class:"text-body-1 mb-2"}," 此数据将存储在您的浏览器中,如果您的浏览器不支持IndexedDB,可能会出现问题。如果您经常清除浏览器数据,请谨慎使用本地模式。 ",-1),t("div",{class:"text-body-1 mb-2"}," 在刚才地方点击使用本地模式的按钮使用。 ",-1)])]),_:1})])],512),[[j,r.value===4&&c.value==="local"]]),O(t("div",qe,[t("div",Qe,[l(k,{class:"mb-4",color:"primary",size:"80"},{default:s(()=>[...e[29]||(e[29]=[a(" mdi-cloud-cog ",-1)])]),_:1}),e[30]||(e[30]=t("h3",{class:"text-h5 mb-4"}," 需要先设置云端账号 ",-1))]),l(y,{class:"pa-6 mb-6",variant:"tonal"},{default:s(()=>[t("div",Pe,[t("div",et,[e[32]||(e[32]=t("h4",{class:"text-h6 font-weight-bold mb-2"}," 自动注册设备 ",-1)),e[33]||(e[33]=t("p",{class:"text-body-2 mb-3 text-medium-emphasis"}," 通过引导式流程自动创建设备、获取令牌并完成初始化。适合首次体验或快速部署多终端。 ",-1)),l(g,{color:"primary","prepend-icon":"mdi-flash",size:"large",variant:"elevated",onClick:te},{default:s(()=>[...e[31]||(e[31]=[a(" 自动注册 ",-1)])]),_:1})])])]),_:1}),e[41]||(e[41]=t("div",{class:"mb-6"}," 也可以手动前往 Classworks KV 控制台获取认证信息: ",-1)),l(y,{color:G(V)=="https://kv.houlang.cloud"?"primary":"error",variant:G(V)=="https://kv.houlang.cloud"?"elevated":"outlined",class:"pa-6 mb-6",onClick:E},{default:s(()=>[l(k,{class:"mb-3",size:"48"},{default:s(()=>[...e[34]||(e[34]=[a(" mdi-open-in-new ",-1)])]),_:1}),t("h4",tt," 请访问 "+T(G(V)=="https://kv.houlang.cloud"?"Classworks KV":"自定义的 Classworks KV 实例 ")+" 控制台 ",1),t("div",st,T(G(V)),1),t("h6",lt,T(G(V)=="https://kv.houlang.cloud"?"此实例由 Classworks KV 官方提供":"此链接由您的实例、预配代码或管理员管理,当前可能不是 Classworks KV 官方的实例地址。"),1)]),_:1},8,["color","variant"]),l($e,{class:"mt-6",variant:"accordion"},{default:s(()=>[l(me,null,{default:s(()=>[l(ce,null,{default:s(()=>[t("div",at,[l(k,{class:"mr-3",color:"warning"},{default:s(()=>[...e[35]||(e[35]=[a(" mdi-help-circle ",-1)])]),_:1}),e[36]||(e[36]=t("span",{class:"text-subtitle-1 font-weight-medium"},"我以前已经使用过 Classworks KV?",-1))])]),_:1}),l(pe,null,{default:s(()=>[l(y,{class:"pa-4",color:"success",variant:"tonal"},{default:s(()=>[...e[37]||(e[37]=[t("div",{class:"text-body-2 mb-2"},[a(" 如果您之前已经使用过 Classworks KV,可以直接使用您的 "),t("strong",null,"UUID(命名空间)"),a(" 和 "),t("strong",null,"设置的密码"),a(" 进行认证。 ")],-1),t("div",{class:"text-body-2"},' 返回上一页,点击"已注册"按钮,输入您的认证信息即可登录。 ',-1)])]),_:1})]),_:1})]),_:1}),l(me,null,{default:s(()=>[l(ce,null,{default:s(()=>[t("div",ot,[l(k,{class:"mr-3",color:"info"},{default:s(()=>[...e[38]||(e[38]=[a(" mdi-help-circle ",-1)])]),_:1}),e[39]||(e[39]=t("span",{class:"text-subtitle-1 font-weight-medium"},"我如何配置不同类型的设备?",-1))])]),_:1}),l(pe,null,{default:s(()=>[l(y,{class:"pa-4",color:"info",variant:"tonal"},{default:s(()=>[...e[40]||(e[40]=[t("div",{class:"text-body-2 mb-2"},[a(" 不同的密码对应不同的设备类型,这将由 "),t("strong",null,"管理员管理"),a("。 ")],-1),t("div",{class:"text-body-2 mb-2"}," 例如: ",-1),t("ul",{class:"text-body-2 ml-4"},[t("li",{class:"mb-1"}," 班级大屏使用一个密码 "),t("li",{class:"mb-1"}," 教师设备使用另一个密码 "),t("li",null,"学生设备使用不同的密码")],-1),t("div",{class:"text-body-2 mt-3"}," 请联系您的管理员获取对应设备类型的密码。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})],512),[[j,r.value===4&&c.value==="cloud"]]),O(t("div",nt,[t("div",it,[l(xe,{class:"mb-4",color:"primary",size:"80",variant:"tonal"},{default:s(()=>[l(k,{size:"48"},{default:s(()=>[...e[42]||(e[42]=[a(" mdi-rocket-launch ",-1)])]),_:1})]),_:1}),e[43]||(e[43]=t("h3",{class:"text-h5 font-weight-bold mb-2"}," 渐进式注册 ",-1)),e[44]||(e[44]=t("p",{class:"text-body-2 text-medium-emphasis"}," 您可以暂时不配置 Classworks KV ",-1))]),l(ue,{"model-value":se.value,class:"mb-6",color:"primary",height:"8",rounded:""},null,8,["model-value"]),l(ze,null,{default:s(()=>[l(fe,{cols:"12"},{default:s(()=>[l(y,{color:H.value,variant:"tonal"},{default:s(()=>[l(M,null,{default:s(()=>[t("div",rt,[l(k,{color:H.value,class:"mr-2",size:"32"},{default:s(()=>[a(T(le.value),1)]),_:1},8,["color"]),t("div",dt,T(ae.value),1)]),p.value?(f(),F("div",ut,[t("div",vt,[e[45]||(e[45]=t("strong",null,"设备名称:",-1)),a(T(p.value.deviceName),1)]),t("div",null,[e[46]||(e[46]=t("strong",null,"设备 UUID:",-1)),t("code",mt,T(p.value.uuid),1)])])):$("",!0),n.value==="error"?(f(),F("div",ct,T(d.value),1)):$("",!0)]),_:1})]),_:1},8,["color"])]),_:1}),l(fe,{cols:"12"},{default:s(()=>[l(y,{variant:"outlined"},{default:s(()=>[l(M,null,{default:s(()=>[e[47]||(e[47]=t("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 过程日志 ",-1)),t("div",pt,[(f(!0),F(we,null,ye(i.value,(_,I)=>(f(),F("div",{key:I,class:"text-caption log-line"},T(_.time)+" · "+T(_.message),1))),128)),i.value.length?$("",!0):(f(),F("div",ft," 等待开始… "))])]),_:1})]),_:1})]),_:1})]),_:1}),t("div",bt,[n.value==="idle"?(f(),z(g,{key:0,color:"primary","prepend-icon":"mdi-play",size:"large",onClick:b},{default:s(()=>[...e[48]||(e[48]=[a(" 开始创建 ",-1)])]),_:1})):$("",!0),n.value==="error"?(f(),z(g,{key:1,color:"error","prepend-icon":"mdi-refresh",variant:"outlined",onClick:oe},{default:s(()=>[...e[49]||(e[49]=[a(" 重试 ",-1)])]),_:1})):$("",!0),n.value==="registering"?(f(),z(g,{key:2,loading:!0,color:"primary","prepend-icon":"mdi-progress-clock",variant:"tonal"},{default:s(()=>[...e[50]||(e[50]=[a(" 正在执行… ",-1)])]),_:1})):$("",!0),n.value==="success"?(f(),z(g,{key:3,color:"success","prepend-icon":"mdi-check-circle",size:"large",variant:"elevated",onClick:W},{default:s(()=>[...e[51]||(e[51]=[a(" 应用令牌并关闭 ",-1)])]),_:1})):$("",!0),n.value==="success"?(f(),z(g,{key:4,color:"primary","prepend-icon":"mdi-open-in-new",size:"large",variant:"outlined",onClick:J},{default:s(()=>[...e[52]||(e[52]=[a(" 前往绑定账户 ",-1)])]),_:1})):$("",!0)])],512),[[j,r.value===5]])]),_:1}),l(P,{class:"pa-6 pt-0"},{default:s(()=>[r.value>1?(f(),z(g,{key:0,size:"large",variant:"text",onClick:R},{default:s(()=>[l(k,{start:""},{default:s(()=>[...e[53]||(e[53]=[a(" mdi-chevron-left ",-1)])]),_:1}),e[54]||(e[54]=a(" 上一步 ",-1))]),_:1})):$("",!0),l(ee),r.value[e[56]||(e[56]=a(" 下一步 ",-1)),l(k,{end:""},{default:s(()=>[...e[55]||(e[55]=[a(" mdi-chevron-right ",-1)])]),_:1})]),_:1},8,["disabled"])):$("",!0),r.value===Z||r.value===4?(f(),z(g,{key:2,color:"primary",size:"large",variant:"elevated",onClick:U},{default:s(()=>[...e[57]||(e[57]=[a(" 关闭 ",-1)])]),_:1})):$("",!0)]),_:1})]),_:1}))}},gt=ie(kt,[["__scopeId","data-v-20273397"]]),xt={key:0,class:"init-overlay"},wt={class:"init-container"},yt={class:"main-card-row"},Ct={class:"card-horizontal-layout"},Vt={class:"card-icon-wrapper"},$t={class:"card-horizontal-layout"},zt={class:"card-icon-wrapper"},St={class:"card-horizontal-layout"},Dt={class:"card-icon-wrapper"},Tt={class:"options-buttons"},_t={__name:"InitServiceChooser",props:{preconfig:{type:Object,default:()=>({namespace:null,authCode:null,autoOpen:!1,autoExecute:!1})}},emits:["done"],setup(K,{emit:h}){const C=K,V=h,r=x(!1),c=x(!1),n=x(!1),d=x(!1),p=x(!1),u=x(null),i=N(()=>A("server.provider")),v=N(()=>i.value==="kv-server"||i.value==="classworkscloud"),D=N(()=>A("server.kvToken")),R=N(()=>{var m;return(m=C.preconfig)!=null&&m.namespace?{namespace:C.preconfig.namespace,password:C.preconfig.authCode||"",autoExecute:C.preconfig.autoExecute||!1}:null}),w=()=>{const m=window.location.pathname,o=m==="/"||m==="/index"||m==="/index.html",b=v.value&&(!D.value||D.value==="");r.value=o&&b};ke(()=>C.preconfig,m=>{m!=null&&m.autoOpen&&(m!=null&&m.namespace)&&r.value&&(console.log("检测到预配数据,自动打开设备认证对话框"),setTimeout(()=>{n.value=!0},500))},{immediate:!0,deep:!0}),Ce(()=>{w()});const U=()=>{const m=A("server.authDomain"),o="d158067f53627d2b98babe8bffd2fd7d",b=window.location.origin,oe=encodeURIComponent(`${b}/authorizecallback`),J=A("device.uuid")||"00000000-0000-4000-8000-000000000000";let W=`${m}/authorize?app_id=${o}&mode=callback&callback_url=${oe}&remark=Classworks 自动授权 来自${window.location.hostname} ${new Date().toLocaleString()}`;J!=="00000000-0000-4000-8000-000000000000"&&(W+=`&uuid=${encodeURIComponent(J)}`),window.location.href=W},E=m=>{c.value=!1,console.log("渐进式注册成功:",m),w(),V("done")},te=m=>{var o;n.value=!1,console.log("认证成功:",m),(o=C.preconfig)!=null&&o.namespace&&console.log(`预配数据认证成功: ${C.preconfig.namespace}`),w(),V("done")},se=()=>{d.value=!1,w(),V("done")},H=m=>{console.log("替代代码:",m),p.value=!1},le=()=>{L("server.provider","kv-local"),r.value=!1,window.location.reload(),V("done")},ae=()=>{window.open(A("server.authDomain"),"_blank")};return(m,o)=>r.value?(f(),F("div",xt,[t("div",wt,[o[22]||(o[22]=t("div",{class:"init-header"},[t("div",{class:"title"}," 欢迎使用 Classworks "),t("div",{class:"subtitle"}," 请选择你的使用方式 ")],-1)),t("div",yt,[l(y,{class:"main-service-card gradient-new clickable",elevation:"4",onClick:o[0]||(o[0]=b=>c.value=!0)},{default:s(()=>[l(M,null,{default:s(()=>[t("div",Ct,[t("div",Vt,[l(k,{color:"primary",size:"48"},{default:s(()=>[...o[12]||(o[12]=[a(" mdi-new-box ",-1)])]),_:1})]),o[13]||(o[13]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," 初次使用 "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 了解 Classworks KV 并开始使用 ")],-1))])]),_:1})]),_:1}),l(y,{class:"main-service-card gradient-registered clickable",elevation:"4",onClick:o[1]||(o[1]=b=>n.value=!0)},{default:s(()=>[l(M,null,{default:s(()=>[t("div",$t,[t("div",zt,[l(k,{color:"success",size:"48"},{default:s(()=>[...o[14]||(o[14]=[a(" mdi-account-check ",-1)])]),_:1})]),o[15]||(o[15]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," 已注册 "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 使用设备 Namespace 登录 ")],-1))])]),_:1})]),_:1}),l(y,{class:"main-service-card clickable",elevation:"4",onClick:ae},{default:s(()=>[l(M,null,{default:s(()=>[t("div",St,[t("div",Dt,[l(k,{color:"info",size:"48"},{default:s(()=>[...o[16]||(o[16]=[a(" mdi-database-cog ",-1)])]),_:1})]),o[17]||(o[17]=t("div",{class:"card-content"},[t("div",{class:"text-h6 font-weight-bold"}," Classworks KV "),t("div",{class:"text-body-2 text-medium-emphasis mt-1"}," 打开云端控制台管理数据 ")],-1))])]),_:1})]),_:1})]),t("div",Tt,[l(g,{"prepend-icon":"mdi-laptop",size:"small",variant:"tonal",onClick:le},{default:s(()=>[...o[18]||(o[18]=[a(" 使用本地模式 ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-flash",size:"small",variant:"tonal",onClick:U},{default:s(()=>[...o[19]||(o[19]=[a(" 授权码式授权(弃用) ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-key",size:"small",variant:"tonal",onClick:o[2]||(o[2]=b=>d.value=!0)},{default:s(()=>[...o[20]||(o[20]=[a(" 输入 Token ",-1)])]),_:1}),l(g,{"prepend-icon":"mdi-code-tags",size:"small",variant:"tonal",onClick:o[3]||(o[3]=b=>p.value=!0)},{default:s(()=>[...o[21]||(o[21]=[a(" 输入替代代码 ",-1)])]),_:1})]),o[23]||(o[23]=t("div",{class:"footer-hint"}," 完成授权后可使用作业同步、考试看板等在线功能。 ",-1))]),l(Y,{modelValue:c.value,"onUpdate:modelValue":o[5]||(o[5]=b=>c.value=b),"max-width":"600"},{default:s(()=>[l(gt,{onClose:o[4]||(o[4]=b=>c.value=!1),onSuccess:E})]),_:1},8,["modelValue"]),l(Y,{modelValue:n.value,"onUpdate:modelValue":o[7]||(o[7]=b=>n.value=b),"max-width":"500"},{default:s(()=>[l(Ue,{ref_key:"deviceAuthDialog",ref:u,preconfig:R.value,"show-cancel":!0,onCancel:o[6]||(o[6]=b=>n.value=!1),onSuccess:te},null,8,["preconfig"])]),_:1},8,["modelValue"]),l(Y,{modelValue:d.value,"onUpdate:modelValue":o[9]||(o[9]=b=>d.value=b),"max-width":"500"},{default:s(()=>[l(Ae,{"show-cancel":!0,onCancel:o[8]||(o[8]=b=>d.value=!1),onSuccess:se})]),_:1},8,["modelValue"]),l(Y,{modelValue:p.value,"onUpdate:modelValue":o[11]||(o[11]=b=>p.value=b),"max-width":"500"},{default:s(()=>[l(Ke,{"show-cancel":!0,onCancel:o[10]||(o[10]=b=>p.value=!1),onSubmit:H})]),_:1},8,["modelValue"])])):$("",!0)}},Lt=ie(_t,[["__scopeId","data-v-cbfbc6db"]]);export{Lt as default}; diff --git a/assets/MessageLog-92n2iU1x.js b/assets/MessageLog-CZsTVP4i.js similarity index 97% rename from assets/MessageLog-92n2iU1x.js rename to assets/MessageLog-CZsTVP4i.js index 97aa992..1d70156 100644 --- a/assets/MessageLog-92n2iU1x.js +++ b/assets/MessageLog-CZsTVP4i.js @@ -1 +1 @@ -import{af as de,I as Q,N as me,aw as fe,u as ge,L as he,ax as ye,C as we,ag as pe,a2 as be,a3 as ke,m as Se,ay as Te,R as Ve,$ as Ee,a4 as Me,ah as Ce,_ as Pe,az as W,p as _e,q as ee,r as te,t as Be,f as ae}from"./index-CzpSlHRw.js";import{b as xe,c as Le}from"./VAppBarTitle-C1UGCJHo.js";import{D as se,o as H,A as re,s as x,e as V,w as De,q as Ie,I as Re,k as P,j as E,m as ne,P as He,F as ie,t as X,B as Ne,b as q,f as Ye,X as R,Y as $,Z as T,a1 as O,_ as $e,a2 as Oe,S as F,$ as A}from"./vendor-vue-28M5UGz3.js";import{s as ze,K as We,C as z,z as Xe,f as Fe,A as Ae,h as qe,a0 as je,n as Ze,aC as Ue,j as Ke,u as Ge,aH as Je,p as Qe,m as et,a5 as tt,aD as at,az as nt,k as ot}from"./vendor-vuetify-95axeNJO.js";function lt(e){let{rootEl:n,isSticky:s,layoutItemStyles:k}=e;const t=x(!1),u=x(0),a=V(()=>{const w=typeof t.value=="boolean"?"top":t.value;return[s.value?{top:"auto",bottom:"auto",height:void 0}:void 0,t.value?{[w]:ze(u.value)}:{top:k.value.top}]});se(()=>{H(s,w=>{w?window.addEventListener("scroll",S,{passive:!0}):window.removeEventListener("scroll",S)},{immediate:!0})}),re(()=>{window.removeEventListener("scroll",S)});let h=0;function S(){const w=h>window.scrollY?"up":"down",v=n.value.getBoundingClientRect(),d=parseFloat(k.value.top??0),c=window.scrollY-Math.max(0,u.value-d),m=v.height+Math.max(u.value,d)-window.scrollY-window.innerHeight,y=parseFloat(getComputedStyle(n.value).getPropertyValue("--v-body-scroll-y"))||0;v.height0;s--){if(e[s].t===e[s-1].t)continue;const k=oe(n),t=(e[s].d-e[s-1].d)/(e[s].t-e[s-1].t);n+=(t-k)*Math.abs(t),s===e.length-1&&(n*=.5)}return oe(n)*1e3}function it(){const e={};function n(t){Array.from(t.changedTouches).forEach(u=>{(e[u.identifier]??(e[u.identifier]=new We(rt))).push([t.timeStamp,u])})}function s(t){Array.from(t.changedTouches).forEach(u=>{delete e[u.identifier]})}function k(t){var w;const u=(w=e[t])==null?void 0:w.values().reverse();if(!u)throw new Error(`No samples for touch id ${t}`);const a=u[0],h=[],S=[];for(const v of u){if(a[0]-v[0]>st)break;h.push({t:v[0],d:v[1].clientX}),S.push({t:v[0],d:v[1].clientY})}return{x:le(h),y:le(S),get direction(){const{x:v,y:d}=this,[c,m]=[Math.abs(v),Math.abs(d)];return c>m&&v>=0?"right":c>m&&v<=0?"left":m>c&&d>=0?"down":m>c&&d<=0?"up":ut()}}}return{addMovement:n,endTouch:s,getVelocity:k}}function ut(){throw new Error}function ct(e){let{el:n,isActive:s,isTemporary:k,width:t,touchless:u,position:a}=e;se(()=>{window.addEventListener("touchstart",M,{passive:!0}),window.addEventListener("touchmove",C,{passive:!1}),window.addEventListener("touchend",N,{passive:!0})}),re(()=>{window.removeEventListener("touchstart",M),window.removeEventListener("touchmove",C),window.removeEventListener("touchend",N)});const h=V(()=>["left","right"].includes(a.value)),{addMovement:S,endTouch:w,getVelocity:v}=it();let d=!1;const c=x(!1),m=x(0),y=x(0);let p;function L(o,l){return(a.value==="left"?o:a.value==="right"?document.documentElement.clientWidth-o:a.value==="top"?o:a.value==="bottom"?document.documentElement.clientHeight-o:B())-(l?t.value:0)}function D(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=a.value==="left"?(o-y.value)/t.value:a.value==="right"?(document.documentElement.clientWidth-o-y.value)/t.value:a.value==="top"?(o-y.value)/t.value:a.value==="bottom"?(document.documentElement.clientHeight-o-y.value)/t.value:B();return l?Xe(r):r}function M(o){if(u.value)return;const l=o.changedTouches[0].clientX,r=o.changedTouches[0].clientY,i=25,f=a.value==="left"?ldocument.documentElement.clientWidth-i:a.value==="top"?rdocument.documentElement.clientHeight-i:B(),g=s.value&&(a.value==="left"?ldocument.documentElement.clientWidth-t.value:a.value==="top"?rdocument.documentElement.clientHeight-t.value:B());(f||g||s.value&&k.value)&&(p=[l,r],y.value=L(h.value?l:r,s.value),m.value=D(h.value?l:r),d=y.value>-20&&y.value<80,w(o),S(o))}function C(o){const l=o.changedTouches[0].clientX,r=o.changedTouches[0].clientY;if(d){if(!o.cancelable){d=!1;return}const f=Math.abs(l-p[0]),g=Math.abs(r-p[1]);(h.value?f>g&&f>3:g>f&&g>3)?(c.value=!0,d=!1):(h.value?g:f)>3&&(d=!1)}if(!c.value)return;o.preventDefault(),S(o);const i=D(h.value?l:r,!1);m.value=Math.max(0,Math.min(1,i)),i>1?y.value=L(h.value?l:r,!0):i<0&&(y.value=L(h.value?l:r,!1))}function N(o){if(d=!1,!c.value)return;S(o),c.value=!1;const l=v(o.changedTouches[0].identifier),r=Math.abs(l.x),i=Math.abs(l.y);(h.value?r>i&&r>400:i>r&&i>3)?s.value=l.direction===({left:"right",right:"left",top:"down",bottom:"up"}[a.value]||B()):s.value=m.value>.5}const I=V(()=>c.value?{transform:a.value==="left"?`translateX(calc(-100% + ${m.value*t.value}px))`:a.value==="right"?`translateX(calc(100% - ${m.value*t.value}px))`:a.value==="top"?`translateY(calc(-100% + ${m.value*t.value}px))`:a.value==="bottom"?`translateY(calc(100% - ${m.value*t.value}px))`:B(),transition:"none"}:void 0);return z(c,()=>{var r,i;const o=((r=n.value)==null?void 0:r.style.transform)??null,l=((i=n.value)==null?void 0:i.style.transition)??null;De(()=>{var f,g,_,Y;(g=n.value)==null||g.style.setProperty("transform",((f=I.value)==null?void 0:f.transform)||"none"),(Y=n.value)==null||Y.style.setProperty("transition",((_=I.value)==null?void 0:_.transition)||null)}),Ie(()=>{var f,g;(f=n.value)==null||f.style.setProperty("transform",o),(g=n.value)==null||g.style.setProperty("transition",l)})}),{isDragging:c,dragProgress:m,dragStyles:I}}function B(){throw new Error}const vt=["start","end","left","right","top","bottom"],dt=Qe({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>vt.includes(e)},sticky:Boolean,...Ce(),...ot(),...Me(),...nt({mobile:null}),...Ee(),...at(),...Ve(),...tt(Te(),["disableInitialFocus"]),...Se({tag:"nav"}),...et()},"VNavigationDrawer"),mt=Fe()({name:"VNavigationDrawer",props:dt(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,n){let{attrs:s,emit:k,slots:t}=n;const{isRtl:u}=Ae(),{themeClasses:a}=qe(e),{borderClasses:h}=de(e),{backgroundColorClasses:S,backgroundColorStyles:w}=Q(()=>e.color),{elevationClasses:v}=be(e),{displayClasses:d,mobile:c}=je(e),{roundedClasses:m}=me(e),y=fe(),p=Ze(e,"modelValue",null,b=>!!b),{ssrBootStyles:L}=ge(),{scopeId:D}=he(),M=q(),C=x(!1),{runOpenDelay:N,runCloseDelay:I}=ke(e,b=>{C.value=b}),o=V(()=>e.rail&&e.expandOnHover&&C.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),l=V(()=>Je(e.location,u.value)),r=X(()=>e.persistent),i=V(()=>!e.permanent&&(c.value||e.temporary)),f=V(()=>e.sticky&&!i.value&&l.value!=="bottom");ye(e,{isActive:p,localTop:i,contentEl:M}),z(()=>e.expandOnHover&&e.rail!=null,()=>{H(C,b=>k("update:rail",!b))}),z(()=>!e.disableResizeWatcher,()=>{H(i,b=>!e.permanent&&Re(()=>p.value=!b))}),z(()=>!e.disableRouteWatcher&&!!y,()=>{H(y.currentRoute,()=>i.value&&(p.value=!1))}),H(()=>e.permanent,b=>{b&&(p.value=!0)}),e.modelValue==null&&!i.value&&(p.value=e.permanent||!c.value);const{isDragging:g,dragProgress:_}=ct({el:M,isActive:p,isTemporary:i,width:o,touchless:X(()=>e.touchless),position:l}),Y=V(()=>{const b=i.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):o.value;return g.value?b*_.value:b}),{layoutItemStyles:j,layoutItemScrimStyles:ue}=Ue({id:e.name,order:V(()=>parseInt(e.order,10)),position:l,layoutSize:Y,elementSize:o,active:Ne(p),disableTransitions:X(()=>g.value),absolute:V(()=>e.absolute||f.value&&typeof Z.value!="string")}),{isStuck:Z,stickyStyles:ce}=lt({rootEl:M,isSticky:f,layoutItemStyles:j}),U=Q(()=>typeof e.scrim=="string"?e.scrim:null),ve=V(()=>({...g.value?{opacity:_.value*.2,transition:"none"}:void 0,...ue.value}));return Ke({VList:{bgColor:"transparent"}}),Ge(()=>{const b=t.image||e.image;return P(ie,null,[E(e.tag,ne({ref:M,onMouseenter:N,onMouseleave:I,class:["v-navigation-drawer",`v-navigation-drawer--${l.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":C.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":i.value,"v-navigation-drawer--persistent":r.value,"v-navigation-drawer--active":p.value,"v-navigation-drawer--sticky":f.value},a.value,S.value,h.value,d.value,v.value,m.value,e.class],style:[w.value,j.value,L.value,ce.value,e.style],inert:!p.value},D,s),{default:()=>{var K,G,J;return[b&&P("div",{key:"image",class:"v-navigation-drawer__img"},[t.image?E(pe,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},t.image):E(we,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),t.prepend&&P("div",{class:"v-navigation-drawer__prepend"},[(K=t.prepend)==null?void 0:K.call(t)]),P("div",{class:"v-navigation-drawer__content"},[(G=t.default)==null?void 0:G.call(t)]),t.append&&P("div",{class:"v-navigation-drawer__append"},[(J=t.append)==null?void 0:J.call(t)])]}}),E(He,{name:"fade-transition"},{default:()=>[i.value&&(g.value||p.value)&&!!e.scrim&&P("div",ne({class:["v-navigation-drawer__scrim",U.backgroundColorClasses.value],style:[ve.value,U.backgroundColorStyles.value],onClick:()=>{r.value||(p.value=!1)}},D),null)]})])}),{isStuck:Z}}}),ft=Ye({name:"MessageLog",setup(){const e=q(!1),n=q([]),s={success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"},k={success:"success",error:"error",warning:"warning",info:"primary"};return W.onLog(t=>{t&&(n.value=t)}),{drawer:e,messages:n,icons:s,colors:k,deleteMessage:t=>W.deleteMessage(t),clearMessages:()=>W.clearMessages()}}}),gt={class:"text-caption text-grey"};function ht(e,n,s,k,t,u){return e.drawer?(R(),$(mt,{key:0,modelValue:e.drawer,"onUpdate:modelValue":n[0]||(n[0]=a=>e.drawer=a),location:"right",temporary:"",width:"400"},{default:T(()=>[E(xe,{color:"primary"},{default:T(()=>[E(Le,null,{default:T(()=>[...n[1]||(n[1]=[O("消息记录",-1)])]),_:1})]),_:1}),E(_e,null,{default:T(()=>[(R(!0),$e(ie,null,Oe(e.messages,a=>(R(),$(ee,{key:a.id,rounded:""},{prepend:T(()=>[E(ae,{color:e.colors[a.type],icon:e.icons[a.type],size:"20"},null,8,["color","icon"])]),default:T(()=>[E(te,null,{default:T(()=>[O(F(a.title),1)]),_:2},1024),a.content?(R(),$(Be,{key:0},{default:T(()=>[O(F(a.content),1)]),_:2},1024)):A("",!0),P("span",gt,F(new Date(a.timestamp).toLocaleTimeString()),1)]),_:2},1024))),128)),e.messages.length?A("",!0):(R(),$(ee,{key:0},{prepend:T(()=>[E(ae,{color:"grey",icon:"mdi-inbox"})]),default:T(()=>[E(te,{class:"text-grey"},{default:T(()=>[...n[2]||(n[2]=[O(" 暂无消息 ",-1)])]),_:1})]),_:1}))]),_:1})]),_:1},8,["modelValue"])):A("",!0)}const yt=Pe(ft,[["render",ht]]),St=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));export{St as M,mt as V,yt as _}; +import{af as de,I as Q,N as me,aw as fe,u as ge,L as he,ax as ye,C as we,ag as pe,a2 as be,a3 as ke,m as Se,ay as Te,R as Ve,$ as Ee,a4 as Me,ah as Ce,_ as Pe,az as W,p as _e,q as ee,r as te,t as Be,f as ae}from"./index-DGIAsv4W.js";import{b as xe,c as Le}from"./VAppBarTitle-DheyIZnb.js";import{D as se,o as H,A as re,s as x,e as V,w as De,q as Ie,I as Re,k as P,j as E,m as ne,P as He,F as ie,t as X,B as Ne,b as q,f as Ye,X as R,Y as $,Z as T,a1 as O,_ as $e,a2 as Oe,S as F,$ as A}from"./vendor-vue-BiQC5iF7.js";import{s as ze,K as We,C as z,z as Xe,f as Fe,A as Ae,h as qe,a0 as je,n as Ze,aC as Ue,j as Ke,u as Ge,aH as Je,p as Qe,m as et,a5 as tt,aD as at,az as nt,k as ot}from"./vendor-vuetify-DsKlzgKp.js";function lt(e){let{rootEl:n,isSticky:s,layoutItemStyles:k}=e;const t=x(!1),u=x(0),a=V(()=>{const w=typeof t.value=="boolean"?"top":t.value;return[s.value?{top:"auto",bottom:"auto",height:void 0}:void 0,t.value?{[w]:ze(u.value)}:{top:k.value.top}]});se(()=>{H(s,w=>{w?window.addEventListener("scroll",S,{passive:!0}):window.removeEventListener("scroll",S)},{immediate:!0})}),re(()=>{window.removeEventListener("scroll",S)});let h=0;function S(){const w=h>window.scrollY?"up":"down",v=n.value.getBoundingClientRect(),d=parseFloat(k.value.top??0),c=window.scrollY-Math.max(0,u.value-d),m=v.height+Math.max(u.value,d)-window.scrollY-window.innerHeight,y=parseFloat(getComputedStyle(n.value).getPropertyValue("--v-body-scroll-y"))||0;v.height0;s--){if(e[s].t===e[s-1].t)continue;const k=oe(n),t=(e[s].d-e[s-1].d)/(e[s].t-e[s-1].t);n+=(t-k)*Math.abs(t),s===e.length-1&&(n*=.5)}return oe(n)*1e3}function it(){const e={};function n(t){Array.from(t.changedTouches).forEach(u=>{(e[u.identifier]??(e[u.identifier]=new We(rt))).push([t.timeStamp,u])})}function s(t){Array.from(t.changedTouches).forEach(u=>{delete e[u.identifier]})}function k(t){var w;const u=(w=e[t])==null?void 0:w.values().reverse();if(!u)throw new Error(`No samples for touch id ${t}`);const a=u[0],h=[],S=[];for(const v of u){if(a[0]-v[0]>st)break;h.push({t:v[0],d:v[1].clientX}),S.push({t:v[0],d:v[1].clientY})}return{x:le(h),y:le(S),get direction(){const{x:v,y:d}=this,[c,m]=[Math.abs(v),Math.abs(d)];return c>m&&v>=0?"right":c>m&&v<=0?"left":m>c&&d>=0?"down":m>c&&d<=0?"up":ut()}}}return{addMovement:n,endTouch:s,getVelocity:k}}function ut(){throw new Error}function ct(e){let{el:n,isActive:s,isTemporary:k,width:t,touchless:u,position:a}=e;se(()=>{window.addEventListener("touchstart",M,{passive:!0}),window.addEventListener("touchmove",C,{passive:!1}),window.addEventListener("touchend",N,{passive:!0})}),re(()=>{window.removeEventListener("touchstart",M),window.removeEventListener("touchmove",C),window.removeEventListener("touchend",N)});const h=V(()=>["left","right"].includes(a.value)),{addMovement:S,endTouch:w,getVelocity:v}=it();let d=!1;const c=x(!1),m=x(0),y=x(0);let p;function L(o,l){return(a.value==="left"?o:a.value==="right"?document.documentElement.clientWidth-o:a.value==="top"?o:a.value==="bottom"?document.documentElement.clientHeight-o:B())-(l?t.value:0)}function D(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=a.value==="left"?(o-y.value)/t.value:a.value==="right"?(document.documentElement.clientWidth-o-y.value)/t.value:a.value==="top"?(o-y.value)/t.value:a.value==="bottom"?(document.documentElement.clientHeight-o-y.value)/t.value:B();return l?Xe(r):r}function M(o){if(u.value)return;const l=o.changedTouches[0].clientX,r=o.changedTouches[0].clientY,i=25,f=a.value==="left"?ldocument.documentElement.clientWidth-i:a.value==="top"?rdocument.documentElement.clientHeight-i:B(),g=s.value&&(a.value==="left"?ldocument.documentElement.clientWidth-t.value:a.value==="top"?rdocument.documentElement.clientHeight-t.value:B());(f||g||s.value&&k.value)&&(p=[l,r],y.value=L(h.value?l:r,s.value),m.value=D(h.value?l:r),d=y.value>-20&&y.value<80,w(o),S(o))}function C(o){const l=o.changedTouches[0].clientX,r=o.changedTouches[0].clientY;if(d){if(!o.cancelable){d=!1;return}const f=Math.abs(l-p[0]),g=Math.abs(r-p[1]);(h.value?f>g&&f>3:g>f&&g>3)?(c.value=!0,d=!1):(h.value?g:f)>3&&(d=!1)}if(!c.value)return;o.preventDefault(),S(o);const i=D(h.value?l:r,!1);m.value=Math.max(0,Math.min(1,i)),i>1?y.value=L(h.value?l:r,!0):i<0&&(y.value=L(h.value?l:r,!1))}function N(o){if(d=!1,!c.value)return;S(o),c.value=!1;const l=v(o.changedTouches[0].identifier),r=Math.abs(l.x),i=Math.abs(l.y);(h.value?r>i&&r>400:i>r&&i>3)?s.value=l.direction===({left:"right",right:"left",top:"down",bottom:"up"}[a.value]||B()):s.value=m.value>.5}const I=V(()=>c.value?{transform:a.value==="left"?`translateX(calc(-100% + ${m.value*t.value}px))`:a.value==="right"?`translateX(calc(100% - ${m.value*t.value}px))`:a.value==="top"?`translateY(calc(-100% + ${m.value*t.value}px))`:a.value==="bottom"?`translateY(calc(100% - ${m.value*t.value}px))`:B(),transition:"none"}:void 0);return z(c,()=>{var r,i;const o=((r=n.value)==null?void 0:r.style.transform)??null,l=((i=n.value)==null?void 0:i.style.transition)??null;De(()=>{var f,g,_,Y;(g=n.value)==null||g.style.setProperty("transform",((f=I.value)==null?void 0:f.transform)||"none"),(Y=n.value)==null||Y.style.setProperty("transition",((_=I.value)==null?void 0:_.transition)||null)}),Ie(()=>{var f,g;(f=n.value)==null||f.style.setProperty("transform",o),(g=n.value)==null||g.style.setProperty("transition",l)})}),{isDragging:c,dragProgress:m,dragStyles:I}}function B(){throw new Error}const vt=["start","end","left","right","top","bottom"],dt=Qe({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>vt.includes(e)},sticky:Boolean,...Ce(),...ot(),...Me(),...nt({mobile:null}),...Ee(),...at(),...Ve(),...tt(Te(),["disableInitialFocus"]),...Se({tag:"nav"}),...et()},"VNavigationDrawer"),mt=Fe()({name:"VNavigationDrawer",props:dt(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,n){let{attrs:s,emit:k,slots:t}=n;const{isRtl:u}=Ae(),{themeClasses:a}=qe(e),{borderClasses:h}=de(e),{backgroundColorClasses:S,backgroundColorStyles:w}=Q(()=>e.color),{elevationClasses:v}=be(e),{displayClasses:d,mobile:c}=je(e),{roundedClasses:m}=me(e),y=fe(),p=Ze(e,"modelValue",null,b=>!!b),{ssrBootStyles:L}=ge(),{scopeId:D}=he(),M=q(),C=x(!1),{runOpenDelay:N,runCloseDelay:I}=ke(e,b=>{C.value=b}),o=V(()=>e.rail&&e.expandOnHover&&C.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),l=V(()=>Je(e.location,u.value)),r=X(()=>e.persistent),i=V(()=>!e.permanent&&(c.value||e.temporary)),f=V(()=>e.sticky&&!i.value&&l.value!=="bottom");ye(e,{isActive:p,localTop:i,contentEl:M}),z(()=>e.expandOnHover&&e.rail!=null,()=>{H(C,b=>k("update:rail",!b))}),z(()=>!e.disableResizeWatcher,()=>{H(i,b=>!e.permanent&&Re(()=>p.value=!b))}),z(()=>!e.disableRouteWatcher&&!!y,()=>{H(y.currentRoute,()=>i.value&&(p.value=!1))}),H(()=>e.permanent,b=>{b&&(p.value=!0)}),e.modelValue==null&&!i.value&&(p.value=e.permanent||!c.value);const{isDragging:g,dragProgress:_}=ct({el:M,isActive:p,isTemporary:i,width:o,touchless:X(()=>e.touchless),position:l}),Y=V(()=>{const b=i.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):o.value;return g.value?b*_.value:b}),{layoutItemStyles:j,layoutItemScrimStyles:ue}=Ue({id:e.name,order:V(()=>parseInt(e.order,10)),position:l,layoutSize:Y,elementSize:o,active:Ne(p),disableTransitions:X(()=>g.value),absolute:V(()=>e.absolute||f.value&&typeof Z.value!="string")}),{isStuck:Z,stickyStyles:ce}=lt({rootEl:M,isSticky:f,layoutItemStyles:j}),U=Q(()=>typeof e.scrim=="string"?e.scrim:null),ve=V(()=>({...g.value?{opacity:_.value*.2,transition:"none"}:void 0,...ue.value}));return Ke({VList:{bgColor:"transparent"}}),Ge(()=>{const b=t.image||e.image;return P(ie,null,[E(e.tag,ne({ref:M,onMouseenter:N,onMouseleave:I,class:["v-navigation-drawer",`v-navigation-drawer--${l.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":C.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":i.value,"v-navigation-drawer--persistent":r.value,"v-navigation-drawer--active":p.value,"v-navigation-drawer--sticky":f.value},a.value,S.value,h.value,d.value,v.value,m.value,e.class],style:[w.value,j.value,L.value,ce.value,e.style],inert:!p.value},D,s),{default:()=>{var K,G,J;return[b&&P("div",{key:"image",class:"v-navigation-drawer__img"},[t.image?E(pe,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},t.image):E(we,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),t.prepend&&P("div",{class:"v-navigation-drawer__prepend"},[(K=t.prepend)==null?void 0:K.call(t)]),P("div",{class:"v-navigation-drawer__content"},[(G=t.default)==null?void 0:G.call(t)]),t.append&&P("div",{class:"v-navigation-drawer__append"},[(J=t.append)==null?void 0:J.call(t)])]}}),E(He,{name:"fade-transition"},{default:()=>[i.value&&(g.value||p.value)&&!!e.scrim&&P("div",ne({class:["v-navigation-drawer__scrim",U.backgroundColorClasses.value],style:[ve.value,U.backgroundColorStyles.value],onClick:()=>{r.value||(p.value=!1)}},D),null)]})])}),{isStuck:Z}}}),ft=Ye({name:"MessageLog",setup(){const e=q(!1),n=q([]),s={success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"},k={success:"success",error:"error",warning:"warning",info:"primary"};return W.onLog(t=>{t&&(n.value=t)}),{drawer:e,messages:n,icons:s,colors:k,deleteMessage:t=>W.deleteMessage(t),clearMessages:()=>W.clearMessages()}}}),gt={class:"text-caption text-grey"};function ht(e,n,s,k,t,u){return e.drawer?(R(),$(mt,{key:0,modelValue:e.drawer,"onUpdate:modelValue":n[0]||(n[0]=a=>e.drawer=a),location:"right",temporary:"",width:"400"},{default:T(()=>[E(xe,{color:"primary"},{default:T(()=>[E(Le,null,{default:T(()=>[...n[1]||(n[1]=[O("消息记录",-1)])]),_:1})]),_:1}),E(_e,null,{default:T(()=>[(R(!0),$e(ie,null,Oe(e.messages,a=>(R(),$(ee,{key:a.id,rounded:""},{prepend:T(()=>[E(ae,{color:e.colors[a.type],icon:e.icons[a.type],size:"20"},null,8,["color","icon"])]),default:T(()=>[E(te,null,{default:T(()=>[O(F(a.title),1)]),_:2},1024),a.content?(R(),$(Be,{key:0},{default:T(()=>[O(F(a.content),1)]),_:2},1024)):A("",!0),P("span",gt,F(new Date(a.timestamp).toLocaleTimeString()),1)]),_:2},1024))),128)),e.messages.length?A("",!0):(R(),$(ee,{key:0},{prepend:T(()=>[E(ae,{color:"grey",icon:"mdi-inbox"})]),default:T(()=>[E(te,{class:"text-grey"},{default:T(()=>[...n[2]||(n[2]=[O(" 暂无消息 ",-1)])]),_:1})]),_:1}))]),_:1})]),_:1},8,["modelValue"])):A("",!0)}const yt=Pe(ft,[["render",ht]]),St=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));export{St as M,mt as V,yt as _}; diff --git a/assets/PwaInstallCard-C2z5JzJd.js b/assets/PwaInstallCard-C2z5JzJd.js deleted file mode 100644 index c75a5a3..0000000 --- a/assets/PwaInstallCard-C2z5JzJd.js +++ /dev/null @@ -1 +0,0 @@ -import{D as K,A as O,X as f,Y as y,Z as e,k as _,j as t,a1 as l,_ as I,F as M,a2 as L,S as d,aa as Q,$ as ee,b as C,e as q,r as A}from"./vendor-vue-28M5UGz3.js";import{c as D,F as te,d as E,p as B,q as R,r as T,t as W,h,o as F,f as U,l as j,k as ae,e as G,g as se,n as ne,s as ie,aG as oe,aH as le}from"./index-CzpSlHRw.js";import{V as re}from"./VChip-B3whZF-S.js";import"./vendor-vuetify-95axeNJO.js";const de={class:"d-flex flex-no-wrap justify-space-between"},ue={class:"pe-4"},ce={class:"mb-3"},we={__name:"PwaInstallCard",setup(pe){const g=C(!1),o=C(!1),m=C(!1),r=A({title:"",message:"",links:[]}),H={pending:"待授权",granted:"已完成",denied:"已拒绝",unavailable:"不可用"},X={pending:"mdi-progress-clock",granted:"mdi-check-circle",denied:"mdi-close-circle",unavailable:"mdi-help-circle"},k={pending:"primary",granted:"success",denied:"error",unavailable:"surface-variant"},n=A({pwa:{label:"安装应用",description:"将网站安装为独立应用,便于快速启动",status:"pending"},notification:{label:"通知权限",description:"允许接收作业、考试等通知提醒",status:"pending"},storage:{label:"离线存储",description:"启用持久化存储以获得更稳健的离线体验",status:"pending"}}),b=q(()=>[{key:"pwa",...n.pwa},{key:"notification",...n.notification},{key:"storage",...n.storage}]),V=q(()=>b.value.some(a=>a.status==="pending")),$={pwa:[{text:"MDN - 安装 PWA 指南",desc:"检查浏览器是否支持并手动触发安装",href:"https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps/Guides/Installing"},{text:"Microsoft Edge - PWA 体验",desc:"Edge 浏览器安装与 UX 说明",href:"https://learn.microsoft.com/zh-cn/microsoft-edge/progressive-web-apps/ux"}],notification:[{text:"MDN - 通知权限与用法",desc:"浏览器通知权限的工作方式与调试",href:"https://developer.mozilla.org/zh-CN/docs/Web/API/notification"}],storage:[{text:"MDN - Storage 持久化说明",desc:"了解持久化存储的可用性与申请方式",href:"https://developer.mozilla.org/zh-CN/docs/Web/API/StorageManager/persist"}]};let v;const p=async()=>{var w;if(ne("pwa.hideInstallCard")){g.value=!1;return}if(window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0?n.pwa.status="granted":(window.deferredPwaPrompt,n.pwa.status="pending"),typeof Notification>"u")n.notification.status="unavailable";else{const c=Notification.permission;n.notification.status=c==="granted"?"granted":c==="denied"?"denied":"pending"}if((w=navigator.storage)!=null&&w.persisted){const c=await navigator.storage.persisted();n.storage.status=c?"granted":"pending"}else n.storage.status="unavailable";const i=b.value.some(c=>c.status!=="granted");g.value=i},x=async()=>{const a=window.deferredPwaPrompt;if(!a){n.pwa.status="pending",u("pwa","浏览器没有提供安装提示,可按文档手动安装。");return}a.prompt();const{outcome:s}=await a.userChoice;n.pwa.status=s==="accepted"?"granted":"denied",s!=="accepted"&&u("pwa","如果未出现安装弹窗,或被拒绝,请按说明手动安装。"),window.deferredPwaPrompt=null},P=async()=>{if(typeof Notification>"u"){n.notification.status="unavailable",u("notification","当前环境不支持通知 API,可查看说明手动开启或更换浏览器。");return}const a=await oe();n.notification.status=a?"granted":"denied",a||u("notification","通知请求未被授予,请按说明检查浏览器或系统设置。")},N=async()=>{var s;if(!((s=navigator.storage)!=null&&s.persist)){n.storage.status="unavailable",u("storage","当前浏览器不支持持久化存储,可查看说明或更换浏览器。");return}const a=await le();n.storage.status=a?"granted":"denied",a||u("storage","未能启用持久化存储,可按说明检查浏览器或系统设置。")},Y=async()=>{if(!(!V.value||o.value)){o.value=!0;try{await x(),await P(),await N()}finally{o.value=!1,await p()}}},Z=async a=>{if(!o.value){o.value=!0;try{a==="pwa"?await x():a==="notification"?await P():a==="storage"&&await N()}finally{o.value=!1,await p()}}},u=(a,s="")=>{a==="pwa"?r.title="如何安装为应用":a==="notification"?r.title="如何开启通知":r.title="如何启用离线存储",r.message=s||"查看以下步骤获取更多说明。",r.links=$[a]||[],m.value=!0},J=()=>{ie("pwa.hideInstallCard",!0),g.value=!1},S=()=>{n.pwa.status!=="granted"&&(n.pwa.status="pending"),p()},z=()=>{p()};return K(()=>{p(),window.addEventListener("pwa-prompt-ready",S),v=window.matchMedia("(display-mode: standalone)"),v.addEventListener("change",z)}),O(()=>{window.removeEventListener("pwa-prompt-ready",S),v&&v.removeEventListener("change",z)}),(a,s)=>g.value?(f(),y(G,{key:0,class:"mb-4",color:"surface-variant",variant:"tonal"},{default:e(()=>[_("div",de,[_("div",ue,[t(D,{class:"text-h6"},{default:e(()=>[...s[2]||(s[2]=[l(" 安装应用与授权 ",-1)])]),_:1}),t(te,{class:"pb-1"},{default:e(()=>[...s[3]||(s[3]=[l(" 手动点选下方项目请求安装和权限,也可以直接关闭 ",-1)])]),_:1}),t(E,{class:"pt-0 pb-1"},{default:e(()=>[t(B,{density:"comfortable",lines:"two"},{default:e(()=>[(f(!0),I(M,null,L(b.value,i=>(f(),y(R,{key:i.key,disabled:o.value,onClick:()=>Z(i.key)},{prepend:e(()=>[t(F,{color:k[i.status],size:"32",variant:"tonal"},{default:e(()=>[t(U,{icon:X[i.status]},null,8,["icon"])]),_:2},1032,["color"])]),append:e(()=>[t(re,{color:k[i.status],size:"small",variant:"tonal",class:"me-2"},{default:e(()=>[l(d(H[i.status]),1)]),_:2},1032,["color"]),t(h,{variant:"text",icon:"mdi-information",size:"small",disabled:o.value,onClick:Q(()=>u(i.key),["stop"])},null,8,["disabled","onClick"])]),default:e(()=>[t(T,null,{default:e(()=>[l(d(i.label),1)]),_:2},1024),t(W,null,{default:e(()=>[l(d(i.description),1)]),_:2},1024)]),_:2},1032,["disabled","onClick"]))),128))]),_:1})]),_:1}),t(j,null,{default:e(()=>[t(h,{class:"ms-2",variant:"outlined",size:"small",onClick:J},{default:e(()=>[...s[4]||(s[4]=[l(" 关闭 ",-1)])]),_:1}),t(h,{class:"ms-2",variant:"elevated",color:"primary",size:"small","prepend-icon":o.value?"mdi-timer-sand":"mdi-shield-check",disabled:!V.value||o.value,onClick:Y},{default:e(()=>[l(d(o.value?"处理中":"一次处理全部"),1)]),_:1},8,["prepend-icon","disabled"])]),_:1})]),t(F,{class:"ma-3",size:"100",rounded:"0"},{default:e(()=>[t(U,{icon:"mdi-monitor-cellphone",size:"80"})]),_:1})]),t(ae,{modelValue:m.value,"onUpdate:modelValue":s[1]||(s[1]=i=>m.value=i),"max-width":"520"},{default:e(()=>[t(G,null,{default:e(()=>[t(D,{class:"text-h6"},{default:e(()=>[l(d(r.title),1)]),_:1}),t(E,null,{default:e(()=>[_("p",ce,d(r.message),1),t(B,{density:"comfortable"},{default:e(()=>[(f(!0),I(M,null,L(r.links,(i,w)=>(f(),y(R,{key:w,href:i.href,target:"_blank",rel:"noopener"},{default:e(()=>[t(T,null,{default:e(()=>[l(d(i.text),1)]),_:2},1024),t(W,null,{default:e(()=>[l(d(i.desc),1)]),_:2},1024)]),_:2},1032,["href"]))),128))]),_:1})]),_:1}),t(j,null,{default:e(()=>[t(se),t(h,{variant:"text",onClick:s[0]||(s[0]=i=>m.value=!1)},{default:e(()=>[...s[5]||(s[5]=[l(" 我知道了 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})):ee("",!0)}};export{we as default}; diff --git a/assets/PwaInstallCard-DM1cBO1c.js b/assets/PwaInstallCard-DM1cBO1c.js new file mode 100644 index 0000000..2d9892e --- /dev/null +++ b/assets/PwaInstallCard-DM1cBO1c.js @@ -0,0 +1 @@ +import{D as O,A as Q,X as f,Y as y,Z as e,k as _,j as t,a1 as l,_ as L,F as M,a2 as q,S as d,aa as ee,$ as te,b as C,e as E,r as A}from"./vendor-vue-BiQC5iF7.js";import{c as D,F as ae,d as B,p as R,q as T,r as W,t as F,h,o as U,f as j,l as G,k as se,e as H,g as ne,n as ie,s as oe,aG as le,aH as re}from"./index-DGIAsv4W.js";import{V as de}from"./VChip-mRzIPuM0.js";import"./vendor-vuetify-DsKlzgKp.js";const ue={class:"d-flex flex-no-wrap justify-space-between"},ce={class:"pe-4"},pe={class:"mb-3"},he={__name:"PwaInstallCard",setup(fe){const g=C(!1),o=C(!1),m=C(!1),r=A({title:"",message:"",links:[]}),X={pending:"待授权",granted:"已完成",denied:"已拒绝",unavailable:"不可用"},$={pending:"mdi-progress-clock",granted:"mdi-check-circle",denied:"mdi-close-circle",unavailable:"mdi-help-circle"},k={pending:"primary",granted:"success",denied:"error",unavailable:"surface-variant"},n=A({pwa:{label:"安装应用",description:"将网站安装为独立应用,便于快速启动",status:"pending"},notification:{label:"通知权限",description:"允许接收作业、考试等通知提醒",status:"pending"},storage:{label:"离线存储",description:"启用持久化存储以获得更稳健的离线体验",status:"pending"}}),b=E(()=>[{key:"pwa",...n.pwa},{key:"notification",...n.notification},{key:"storage",...n.storage}]),V=E(()=>b.value.some(a=>a.status==="pending")),Y={pwa:[{text:"MDN - 安装 PWA 指南",desc:"检查浏览器是否支持并手动触发安装",href:"https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps/Guides/Installing"},{text:"Microsoft Edge - PWA 体验",desc:"Edge 浏览器安装与 UX 说明",href:"https://learn.microsoft.com/zh-cn/microsoft-edge/progressive-web-apps/ux"}],notification:[{text:"MDN - 通知权限与用法",desc:"浏览器通知权限的工作方式与调试",href:"https://developer.mozilla.org/zh-CN/docs/Web/API/notification"}],storage:[{text:"MDN - Storage 持久化说明",desc:"了解持久化存储的可用性与申请方式",href:"https://developer.mozilla.org/zh-CN/docs/Web/API/StorageManager/persist"}]};let w;const c=async()=>{var v;if(ie("pwa.hideInstallCard")){g.value=!1;return}if(window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0?n.pwa.status="granted":(window.deferredPwaPrompt,n.pwa.status="pending"),typeof Notification>"u")n.notification.status="unavailable";else{const p=Notification.permission;n.notification.status=p==="granted"?"granted":p==="denied"?"denied":"pending"}if((v=navigator.storage)!=null&&v.persisted){const p=await navigator.storage.persisted();n.storage.status=p?"granted":"pending"}else n.storage.status="unavailable";const i=b.value.some(p=>p.status!=="granted");g.value=i},x=async()=>{const a=window.deferredPwaPrompt;if(!a){n.pwa.status="pending",u("pwa","浏览器没有提供安装提示,可按文档手动安装。");return}a.prompt();const{outcome:s}=await a.userChoice;n.pwa.status=s==="accepted"?"granted":"denied",s!=="accepted"&&u("pwa","如果未出现安装弹窗,或被拒绝,请按说明手动安装。"),window.deferredPwaPrompt=null},P=async()=>{if(typeof Notification>"u"){n.notification.status="unavailable",u("notification","当前环境不支持通知 API,可查看说明手动开启或更换浏览器。");return}const a=await le();n.notification.status=a?"granted":"denied",a||u("notification","通知请求未被授予,请按说明检查浏览器或系统设置。")},N=async()=>{var s;if(!((s=navigator.storage)!=null&&s.persist)){n.storage.status="unavailable",u("storage","当前浏览器不支持持久化存储,可查看说明或更换浏览器。");return}const a=await re();n.storage.status=a?"granted":"denied",a||u("storage","未能启用持久化存储,可按说明检查浏览器或系统设置。")},Z=async()=>{if(!(!V.value||o.value)){o.value=!0;try{await x(),await P(),await N()}finally{o.value=!1,await c()}}},J=async a=>{if(!o.value){o.value=!0;try{a==="pwa"?await x():a==="notification"?await P():a==="storage"&&await N()}finally{o.value=!1,await c()}}},u=(a,s="")=>{a==="pwa"?r.title="如何安装为应用":a==="notification"?r.title="如何开启通知":r.title="如何启用离线存储",r.message=s||"查看以下步骤获取更多说明。",r.links=Y[a]||[],m.value=!0},K=()=>{oe("pwa.hideInstallCard",!0),g.value=!1},S=()=>{n.pwa.status!=="granted"&&(n.pwa.status="pending"),c()},z=()=>{c()},I=()=>{n.pwa.status="granted",c()};return O(()=>{c(),window.addEventListener("pwa-prompt-ready",S),window.addEventListener("pwa-installed",I),w=window.matchMedia("(display-mode: standalone)"),w.addEventListener("change",z)}),Q(()=>{window.removeEventListener("pwa-prompt-ready",S),window.removeEventListener("pwa-installed",I),w&&w.removeEventListener("change",z)}),(a,s)=>g.value?(f(),y(H,{key:0,class:"mb-4",color:"surface-variant",variant:"tonal"},{default:e(()=>[_("div",ue,[_("div",ce,[t(D,{class:"text-h6"},{default:e(()=>[...s[2]||(s[2]=[l(" 安装应用与授权 ",-1)])]),_:1}),t(ae,{class:"pb-1"},{default:e(()=>[...s[3]||(s[3]=[l(" 手动点选下方项目请求安装和权限,也可以直接关闭 ",-1)])]),_:1}),t(B,{class:"pt-0 pb-1"},{default:e(()=>[t(R,{density:"comfortable",lines:"two"},{default:e(()=>[(f(!0),L(M,null,q(b.value,i=>(f(),y(T,{key:i.key,disabled:o.value,onClick:()=>J(i.key)},{prepend:e(()=>[t(U,{color:k[i.status],size:"32",variant:"tonal"},{default:e(()=>[t(j,{icon:$[i.status]},null,8,["icon"])]),_:2},1032,["color"])]),append:e(()=>[t(de,{color:k[i.status],size:"small",variant:"tonal",class:"me-2"},{default:e(()=>[l(d(X[i.status]),1)]),_:2},1032,["color"]),t(h,{variant:"text",icon:"mdi-information",size:"small",disabled:o.value,onClick:ee(()=>u(i.key),["stop"])},null,8,["disabled","onClick"])]),default:e(()=>[t(W,null,{default:e(()=>[l(d(i.label),1)]),_:2},1024),t(F,null,{default:e(()=>[l(d(i.description),1)]),_:2},1024)]),_:2},1032,["disabled","onClick"]))),128))]),_:1})]),_:1}),t(G,null,{default:e(()=>[t(h,{class:"ms-2",variant:"outlined",size:"small",onClick:K},{default:e(()=>[...s[4]||(s[4]=[l(" 关闭 ",-1)])]),_:1}),t(h,{class:"ms-2",variant:"elevated",color:"primary",size:"small","prepend-icon":o.value?"mdi-timer-sand":"mdi-shield-check",disabled:!V.value||o.value,onClick:Z},{default:e(()=>[l(d(o.value?"处理中":"一次处理全部"),1)]),_:1},8,["prepend-icon","disabled"])]),_:1})]),t(U,{class:"ma-3",size:"100",rounded:"0"},{default:e(()=>[t(j,{icon:"mdi-monitor-cellphone",size:"80"})]),_:1})]),t(se,{modelValue:m.value,"onUpdate:modelValue":s[1]||(s[1]=i=>m.value=i),"max-width":"520"},{default:e(()=>[t(H,null,{default:e(()=>[t(D,{class:"text-h6"},{default:e(()=>[l(d(r.title),1)]),_:1}),t(B,null,{default:e(()=>[_("p",pe,d(r.message),1),t(R,{density:"comfortable"},{default:e(()=>[(f(!0),L(M,null,q(r.links,(i,v)=>(f(),y(T,{key:v,href:i.href,target:"_blank",rel:"noopener"},{default:e(()=>[t(W,null,{default:e(()=>[l(d(i.text),1)]),_:2},1024),t(F,null,{default:e(()=>[l(d(i.desc),1)]),_:2},1024)]),_:2},1032,["href"]))),128))]),_:1})]),_:1}),t(G,null,{default:e(()=>[t(ne),t(h,{variant:"text",onClick:s[0]||(s[0]=i=>m.value=!1)},{default:e(()=>[...s[5]||(s[5]=[l(" 我知道了 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})):te("",!0)}};export{he as default}; diff --git a/assets/RandomPicker-MbeqZgNJ.js b/assets/RandomPicker-CsXS_sbB.js similarity index 97% rename from assets/RandomPicker-MbeqZgNJ.js rename to assets/RandomPicker-CsXS_sbB.js index 598269d..5c510a9 100644 --- a/assets/RandomPicker-MbeqZgNJ.js +++ b/assets/RandomPicker-CsXS_sbB.js @@ -1 +1 @@ -import{_ as V,e as C,c as A,f as P,g as _,h,d as v,G as M,k as T,n as u,s as S}from"./index-CzpSlHRw.js";import{X as r,Y as g,Z as l,j as s,a1 as o,k as a,S as c,_ as m,$ as x,F as b,m as L,U as w,a2 as N,n as E}from"./vendor-vue-28M5UGz3.js";import{V as F}from"./VTextField-BxdS2D7S.js";import{a as I}from"./VTooltip-C8vChj8G.js";import{V as y}from"./VChip-B3whZF-S.js";import"./vendor-vuetify-95axeNJO.js";const z={name:"RandomPicker",props:{studentList:{type:Array,required:!0},attendance:{type:Object,required:!0,default:()=>({absent:[],late:[],exclude:[]})}},data(){return{dialog:!1,count:u("randomPicker.defaultCount"),isPickingStarted:!1,isAnimating:!1,pickedStudents:[],animationStudents:[],highlightedIndices:[],animationTimer:null,getSetting:u,tempFilters:{excludeAbsent:u("randomPicker.excludeAbsent"),excludeLate:u("randomPicker.excludeLate"),excludeExcluded:u("randomPicker.excludeExcluded")},pickerMode:u("randomPicker.mode"),minNumber:u("randomPicker.minNumber"),maxNumber:u("randomPicker.maxNumber")}},computed:{absentCount(){return this.attendance.absent?this.attendance.absent.length:0},lateCount(){return this.attendance.late?this.attendance.late.length:0},excludedCount(){return this.attendance.exclude?this.attendance.exclude.length:0},numberModeStudents(){if(this.pickerMode!=="number")return[];const i=[];for(let e=this.minNumber;e<=this.maxNumber;e++)i.push(e.toString().padStart(2,"0")+"号");return i},filteredStudents(){return this.pickerMode==="number"?this.numberModeStudents:!this.studentList||!this.studentList.length?[]:this.studentList.filter(i=>!(this.tempFilters.excludeAbsent&&this.attendance.absent.includes(i)||this.tempFilters.excludeLate&&this.attendance.late.includes(i)||this.tempFilters.excludeExcluded&&this.attendance.exclude.includes(i)))},availableStudents(){return this.filteredStudents},maxAllowedCount(){return Math.min(10,this.filteredStudents.length)},remainingStudents(){return this.filteredStudents.filter(i=>!this.pickedStudents.includes(i))}},watch:{dialog(i){i?(this.count=u("randomPicker.defaultCount"),this.isPickingStarted=!1,this.isAnimating=!1,this.pickedStudents=[],this.tempFilters={excludeAbsent:u("randomPicker.excludeAbsent"),excludeLate:u("randomPicker.excludeLate"),excludeExcluded:u("randomPicker.excludeExcluded")}):this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},tempFilters:{handler(){this.count>this.maxAllowedCount&&(this.count=Math.max(1,this.maxAllowedCount))},deep:!0},pickerMode:{handler(i){S("randomPicker.mode",i)}},minNumber:{handler(i){i>this.maxNumber&&(this.minNumber=this.maxNumber),i<1&&(this.minNumber=1),S("randomPicker.minNumber",this.minNumber)}},maxNumber:{handler(i){i100&&(this.maxNumber=100),S("randomPicker.maxNumber",this.maxNumber)}}},methods:{open(){this.dialog=!0},incrementCount(){this.count1&&this.count--},startPicking(){this.filteredStudents.length!==0&&(this.isPickingStarted=!0,u("randomPicker.animation")?this.startAnimation():this.finishPicking())},startAnimation(){this.isAnimating=!0,this.animationStudents=this.filteredStudents.map((i,e)=>({id:`student-${e}`,name:i})),this.animateHighlight()},animateHighlight(){let e=0;const k=50,p=()=>{this.highlightedIndices=[];const t=[];for(let n=0;n{this.finishPicking()},500)};p()},finishPicking(){this.isAnimating=!1;const i=[...this.filteredStudents].sort(()=>.5-Math.random());this.pickedStudents=i.slice(0,this.count)},resetPicker(){this.isPickingStarted=!1,this.isAnimating=!1,this.pickedStudents=[],this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},refreshSingleStudent(i){if(this.remainingStudents.length===0)return;const e=Math.floor(Math.random()*this.remainingStudents.length),k=this.remainingStudents[e];this.pickedStudents[i]=k;const p=document.querySelectorAll(".result-card");p[i]&&(p[i].classList.add("refresh-animation"),setTimeout(()=>{p[i].classList.remove("refresh-animation")},500))}}},j={class:"d-flex justify-center align-center counter-container"},B={class:"count-display mx-8"},U={class:"text-h2 font-weight-bold"},q={class:"mode-switch-container mt-6"},D={key:0,class:"number-range-container mt-4"},G={class:"d-flex justify-center align-center gap-4"},H={class:"mt-4"},R={key:1,class:"mt-4 text-error"},O={class:"mt-4 text-caption"},X={class:"pa-2"},Y={key:0},Z={key:1},J={key:2},K={key:1,class:"d-flex flex-wrap justify-center gap-2 mt-4"},Q={key:0,class:"animation-container"},W={class:"animation-wrapper"},$={key:1,class:"result-container"},ee={class:"mt-8 d-flex justify-center"};function te(i,e,k,p,t,d){return r(),g(T,{modelValue:t.dialog,"onUpdate:modelValue":e[8]||(e[8]=n=>t.dialog=n),"fullscreen-breakpoint":"sm","max-width":"600",persistent:""},{default:l(()=>[s(C,{border:"",class:"random-picker-card",rounded:"xl"},{default:l(()=>[s(A,{class:"text-h5 d-flex align-center"},{default:l(()=>[s(P,{class:"mr-2",icon:"mdi-account-question"}),e[9]||(e[9]=o(" 随机点名 ",-1)),s(_),s(h,{icon:"mdi-close",variant:"text",onClick:e[0]||(e[0]=n=>t.dialog=!1)})]),_:1}),t.isPickingStarted?(r(),g(v,{key:1,class:"text-center py-6"},{default:l(()=>[t.isAnimating?(r(),m("div",Q,[a("div",W,[s(w,{class:"shuffle-container",name:"shuffle",tag:"div"},{default:l(()=>[(r(!0),m(b,null,N(t.animationStudents,(n,f)=>(r(),m("div",{key:n.id,class:E([{highlighted:t.highlightedIndices.includes(f)},"student-item"])},c(n.name),3))),128))]),_:1})])])):(r(),m("div",$,[e[19]||(e[19]=a("div",{class:"text-h6 mb-4"}," 抽取结果 ",-1)),(r(!0),m(b,null,N(t.pickedStudents,(n,f)=>(r(),g(C,{key:f,class:"mb-2 result-card",color:"primary",variant:"outlined"},{default:l(()=>[s(v,{class:"text-h4 text-center py-4 d-flex align-center justify-center"},{default:l(()=>[o(c(n)+" ",1),s(h,{disabled:d.remainingStudents.length===0,title:d.remainingStudents.length===0?"没有更多可用学生":"重新抽取此学生",class:"ml-2 refresh-btn",icon:"mdi-refresh",size:"small",variant:"text",onClick:ie=>d.refreshSingleStudent(f)},null,8,["disabled","title","onClick"])]),_:2},1024)]),_:2},1024))),128)),a("div",ee,[s(h,{class:"mx-2",color:"primary","prepend-icon":"mdi-refresh",size:"large",onClick:d.resetPicker},{default:l(()=>[...e[17]||(e[17]=[o(" 重新抽取 ",-1)])]),_:1},8,["onClick"]),s(h,{class:"mx-2",color:"grey",size:"large",variant:"outlined",onClick:e[7]||(e[7]=n=>t.dialog=!1)},{default:l(()=>[...e[18]||(e[18]=[o(" 关闭 ",-1)])]),_:1})])]))]),_:1})):(r(),g(v,{key:0,class:"text-center py-6"},{default:l(()=>[e[16]||(e[16]=a("div",{class:"text-h6 mb-4"}," 请选择抽取人数 ",-1)),a("div",j,[s(h,{disabled:t.count<=1,class:"counter-btn",color:"primary",icon:"mdi-minus",size:"x-large",variant:"tonal",onClick:d.decrementCount},null,8,["disabled","onClick"]),a("div",B,[a("span",U,c(t.count),1),e[10]||(e[10]=a("span",{class:"text-subtitle-1 ml-2"},"人",-1))]),s(h,{disabled:t.count>=d.maxAllowedCount,class:"counter-btn",color:"primary",icon:"mdi-plus",size:"x-large",variant:"tonal",onClick:d.incrementCount},null,8,["disabled","onClick"])]),a("div",q,[s(M,{modelValue:t.pickerMode,"onUpdate:modelValue":e[1]||(e[1]=n=>t.pickerMode=n),class:"mode-toggle",color:"primary",mandatory:"",rounded:"pill"},{default:l(()=>[s(h,{"prepend-icon":"mdi-account",value:"name"},{default:l(()=>[...e[11]||(e[11]=[o(" 姓名模式 ",-1)])]),_:1}),s(h,{"prepend-icon":"mdi-numeric",value:"number"},{default:l(()=>[...e[12]||(e[12]=[o(" 学号模式 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),t.pickerMode==="number"?(r(),m("div",D,[e[14]||(e[14]=a("div",{class:"text-subtitle-1 mb-2"}," 学号范围设置 ",-1)),a("div",G,[s(F,{modelValue:t.minNumber,"onUpdate:modelValue":e[2]||(e[2]=n=>t.minNumber=n),modelModifiers:{number:!0},class:"number-input",density:"compact","hide-details":"",label:"最小值",max:"100",min:"1",type:"number"},null,8,["modelValue"]),e[13]||(e[13]=a("span",{class:"mx-2"},"至",-1)),s(F,{modelValue:t.maxNumber,"onUpdate:modelValue":e[3]||(e[3]=n=>t.maxNumber=n),modelModifiers:{number:!0},class:"number-input",density:"compact","hide-details":"",label:"最大值",max:"100",min:"1",type:"number"},null,8,["modelValue"])])])):x("",!0),a("div",H,[s(h,{disabled:d.filteredStudents.length===0,class:"start-btn",color:"primary","prepend-icon":"mdi-dice-multiple",size:"x-large",onClick:d.startPicking},{default:l(()=>[...e[15]||(e[15]=[o(" 开始抽取 ",-1)])]),_:1},8,["disabled","onClick"])]),d.filteredStudents.length===0?(r(),m("div",R,[t.pickerMode==="name"?(r(),m(b,{key:0},[o(" 没有可抽取的学生,请调整过滤选项 ")],64)):(r(),m(b,{key:1},[o(" 请设置有效的学号范围 ")],64))])):x("",!0),a("div",O,[o(" 当前可抽取学生: "+c(d.filteredStudents.length)+"人 ",1),t.pickerMode==="name"?(r(),g(I,{key:0,location:"bottom"},{activator:l(({props:n})=>[s(P,L({class:"ml-1",icon:"mdi-information-outline",size:"small"},n),null,16)]),default:l(()=>[a("div",X,[t.tempFilters.excludeAbsent?(r(),m("div",Y," • 已排除请假学生 ("+c(d.absentCount)+"人) ",1)):x("",!0),t.tempFilters.excludeLate?(r(),m("div",Z," • 已排除迟到学生 ("+c(d.lateCount)+"人) ",1)):x("",!0),t.tempFilters.excludeExcluded?(r(),m("div",J," • 已排除不参与学生 ("+c(d.excludedCount)+"人) ",1)):x("",!0)])]),_:1})):x("",!0),t.pickerMode==="name"?(r(),m("div",K,[s(y,{color:t.tempFilters.excludeLate?"warning":"default",variant:t.tempFilters.excludeLate?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-clock-alert",onClick:e[4]||(e[4]=n=>t.tempFilters.excludeLate=!t.tempFilters.excludeLate)},{default:l(()=>[o(c(t.tempFilters.excludeLate?"排除":"包含")+"迟到学生 ",1)]),_:1},8,["color","variant"]),s(y,{color:t.tempFilters.excludeAbsent?"error":"default",variant:t.tempFilters.excludeAbsent?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-account-off",onClick:e[5]||(e[5]=n=>t.tempFilters.excludeAbsent=!t.tempFilters.excludeAbsent)},{default:l(()=>[o(c(t.tempFilters.excludeAbsent?"排除":"包含")+"请假学生 ",1)]),_:1},8,["color","variant"]),s(y,{color:t.tempFilters.excludeExcluded?"grey":"default",variant:t.tempFilters.excludeExcluded?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-account-cancel",onClick:e[6]||(e[6]=n=>t.tempFilters.excludeExcluded=!t.tempFilters.excludeExcluded)},{default:l(()=>[o(c(t.tempFilters.excludeExcluded?"排除":"包含")+"不参与学生 ",1)]),_:1},8,["color","variant"])])):x("",!0)])]),_:1}))]),_:1})]),_:1},8,["modelValue"])}const ue=V(z,[["render",te],["__scopeId","data-v-090899ef"]]);export{ue as default}; +import{_ as V,e as C,c as A,f as P,g as _,h,d as v,G as M,k as T,n as u,s as S}from"./index-DGIAsv4W.js";import{X as r,Y as g,Z as l,j as s,a1 as o,k as a,S as c,_ as m,$ as x,F as b,m as L,U as w,a2 as N,n as E}from"./vendor-vue-BiQC5iF7.js";import{V as F}from"./VTextField-BurlcggD.js";import{a as I}from"./VTooltip-2IUjfpCS.js";import{V as y}from"./VChip-mRzIPuM0.js";import"./vendor-vuetify-DsKlzgKp.js";const z={name:"RandomPicker",props:{studentList:{type:Array,required:!0},attendance:{type:Object,required:!0,default:()=>({absent:[],late:[],exclude:[]})}},data(){return{dialog:!1,count:u("randomPicker.defaultCount"),isPickingStarted:!1,isAnimating:!1,pickedStudents:[],animationStudents:[],highlightedIndices:[],animationTimer:null,getSetting:u,tempFilters:{excludeAbsent:u("randomPicker.excludeAbsent"),excludeLate:u("randomPicker.excludeLate"),excludeExcluded:u("randomPicker.excludeExcluded")},pickerMode:u("randomPicker.mode"),minNumber:u("randomPicker.minNumber"),maxNumber:u("randomPicker.maxNumber")}},computed:{absentCount(){return this.attendance.absent?this.attendance.absent.length:0},lateCount(){return this.attendance.late?this.attendance.late.length:0},excludedCount(){return this.attendance.exclude?this.attendance.exclude.length:0},numberModeStudents(){if(this.pickerMode!=="number")return[];const i=[];for(let e=this.minNumber;e<=this.maxNumber;e++)i.push(e.toString().padStart(2,"0")+"号");return i},filteredStudents(){return this.pickerMode==="number"?this.numberModeStudents:!this.studentList||!this.studentList.length?[]:this.studentList.filter(i=>!(this.tempFilters.excludeAbsent&&this.attendance.absent.includes(i)||this.tempFilters.excludeLate&&this.attendance.late.includes(i)||this.tempFilters.excludeExcluded&&this.attendance.exclude.includes(i)))},availableStudents(){return this.filteredStudents},maxAllowedCount(){return Math.min(10,this.filteredStudents.length)},remainingStudents(){return this.filteredStudents.filter(i=>!this.pickedStudents.includes(i))}},watch:{dialog(i){i?(this.count=u("randomPicker.defaultCount"),this.isPickingStarted=!1,this.isAnimating=!1,this.pickedStudents=[],this.tempFilters={excludeAbsent:u("randomPicker.excludeAbsent"),excludeLate:u("randomPicker.excludeLate"),excludeExcluded:u("randomPicker.excludeExcluded")}):this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},tempFilters:{handler(){this.count>this.maxAllowedCount&&(this.count=Math.max(1,this.maxAllowedCount))},deep:!0},pickerMode:{handler(i){S("randomPicker.mode",i)}},minNumber:{handler(i){i>this.maxNumber&&(this.minNumber=this.maxNumber),i<1&&(this.minNumber=1),S("randomPicker.minNumber",this.minNumber)}},maxNumber:{handler(i){i100&&(this.maxNumber=100),S("randomPicker.maxNumber",this.maxNumber)}}},methods:{open(){this.dialog=!0},incrementCount(){this.count1&&this.count--},startPicking(){this.filteredStudents.length!==0&&(this.isPickingStarted=!0,u("randomPicker.animation")?this.startAnimation():this.finishPicking())},startAnimation(){this.isAnimating=!0,this.animationStudents=this.filteredStudents.map((i,e)=>({id:`student-${e}`,name:i})),this.animateHighlight()},animateHighlight(){let e=0;const k=50,p=()=>{this.highlightedIndices=[];const t=[];for(let n=0;n{this.finishPicking()},500)};p()},finishPicking(){this.isAnimating=!1;const i=[...this.filteredStudents].sort(()=>.5-Math.random());this.pickedStudents=i.slice(0,this.count)},resetPicker(){this.isPickingStarted=!1,this.isAnimating=!1,this.pickedStudents=[],this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},refreshSingleStudent(i){if(this.remainingStudents.length===0)return;const e=Math.floor(Math.random()*this.remainingStudents.length),k=this.remainingStudents[e];this.pickedStudents[i]=k;const p=document.querySelectorAll(".result-card");p[i]&&(p[i].classList.add("refresh-animation"),setTimeout(()=>{p[i].classList.remove("refresh-animation")},500))}}},j={class:"d-flex justify-center align-center counter-container"},B={class:"count-display mx-8"},U={class:"text-h2 font-weight-bold"},q={class:"mode-switch-container mt-6"},D={key:0,class:"number-range-container mt-4"},G={class:"d-flex justify-center align-center gap-4"},H={class:"mt-4"},R={key:1,class:"mt-4 text-error"},O={class:"mt-4 text-caption"},X={class:"pa-2"},Y={key:0},Z={key:1},J={key:2},K={key:1,class:"d-flex flex-wrap justify-center gap-2 mt-4"},Q={key:0,class:"animation-container"},W={class:"animation-wrapper"},$={key:1,class:"result-container"},ee={class:"mt-8 d-flex justify-center"};function te(i,e,k,p,t,d){return r(),g(T,{modelValue:t.dialog,"onUpdate:modelValue":e[8]||(e[8]=n=>t.dialog=n),"fullscreen-breakpoint":"sm","max-width":"600",persistent:""},{default:l(()=>[s(C,{border:"",class:"random-picker-card",rounded:"xl"},{default:l(()=>[s(A,{class:"text-h5 d-flex align-center"},{default:l(()=>[s(P,{class:"mr-2",icon:"mdi-account-question"}),e[9]||(e[9]=o(" 随机点名 ",-1)),s(_),s(h,{icon:"mdi-close",variant:"text",onClick:e[0]||(e[0]=n=>t.dialog=!1)})]),_:1}),t.isPickingStarted?(r(),g(v,{key:1,class:"text-center py-6"},{default:l(()=>[t.isAnimating?(r(),m("div",Q,[a("div",W,[s(w,{class:"shuffle-container",name:"shuffle",tag:"div"},{default:l(()=>[(r(!0),m(b,null,N(t.animationStudents,(n,f)=>(r(),m("div",{key:n.id,class:E([{highlighted:t.highlightedIndices.includes(f)},"student-item"])},c(n.name),3))),128))]),_:1})])])):(r(),m("div",$,[e[19]||(e[19]=a("div",{class:"text-h6 mb-4"}," 抽取结果 ",-1)),(r(!0),m(b,null,N(t.pickedStudents,(n,f)=>(r(),g(C,{key:f,class:"mb-2 result-card",color:"primary",variant:"outlined"},{default:l(()=>[s(v,{class:"text-h4 text-center py-4 d-flex align-center justify-center"},{default:l(()=>[o(c(n)+" ",1),s(h,{disabled:d.remainingStudents.length===0,title:d.remainingStudents.length===0?"没有更多可用学生":"重新抽取此学生",class:"ml-2 refresh-btn",icon:"mdi-refresh",size:"small",variant:"text",onClick:ie=>d.refreshSingleStudent(f)},null,8,["disabled","title","onClick"])]),_:2},1024)]),_:2},1024))),128)),a("div",ee,[s(h,{class:"mx-2",color:"primary","prepend-icon":"mdi-refresh",size:"large",onClick:d.resetPicker},{default:l(()=>[...e[17]||(e[17]=[o(" 重新抽取 ",-1)])]),_:1},8,["onClick"]),s(h,{class:"mx-2",color:"grey",size:"large",variant:"outlined",onClick:e[7]||(e[7]=n=>t.dialog=!1)},{default:l(()=>[...e[18]||(e[18]=[o(" 关闭 ",-1)])]),_:1})])]))]),_:1})):(r(),g(v,{key:0,class:"text-center py-6"},{default:l(()=>[e[16]||(e[16]=a("div",{class:"text-h6 mb-4"}," 请选择抽取人数 ",-1)),a("div",j,[s(h,{disabled:t.count<=1,class:"counter-btn",color:"primary",icon:"mdi-minus",size:"x-large",variant:"tonal",onClick:d.decrementCount},null,8,["disabled","onClick"]),a("div",B,[a("span",U,c(t.count),1),e[10]||(e[10]=a("span",{class:"text-subtitle-1 ml-2"},"人",-1))]),s(h,{disabled:t.count>=d.maxAllowedCount,class:"counter-btn",color:"primary",icon:"mdi-plus",size:"x-large",variant:"tonal",onClick:d.incrementCount},null,8,["disabled","onClick"])]),a("div",q,[s(M,{modelValue:t.pickerMode,"onUpdate:modelValue":e[1]||(e[1]=n=>t.pickerMode=n),class:"mode-toggle",color:"primary",mandatory:"",rounded:"pill"},{default:l(()=>[s(h,{"prepend-icon":"mdi-account",value:"name"},{default:l(()=>[...e[11]||(e[11]=[o(" 姓名模式 ",-1)])]),_:1}),s(h,{"prepend-icon":"mdi-numeric",value:"number"},{default:l(()=>[...e[12]||(e[12]=[o(" 学号模式 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),t.pickerMode==="number"?(r(),m("div",D,[e[14]||(e[14]=a("div",{class:"text-subtitle-1 mb-2"}," 学号范围设置 ",-1)),a("div",G,[s(F,{modelValue:t.minNumber,"onUpdate:modelValue":e[2]||(e[2]=n=>t.minNumber=n),modelModifiers:{number:!0},class:"number-input",density:"compact","hide-details":"",label:"最小值",max:"100",min:"1",type:"number"},null,8,["modelValue"]),e[13]||(e[13]=a("span",{class:"mx-2"},"至",-1)),s(F,{modelValue:t.maxNumber,"onUpdate:modelValue":e[3]||(e[3]=n=>t.maxNumber=n),modelModifiers:{number:!0},class:"number-input",density:"compact","hide-details":"",label:"最大值",max:"100",min:"1",type:"number"},null,8,["modelValue"])])])):x("",!0),a("div",H,[s(h,{disabled:d.filteredStudents.length===0,class:"start-btn",color:"primary","prepend-icon":"mdi-dice-multiple",size:"x-large",onClick:d.startPicking},{default:l(()=>[...e[15]||(e[15]=[o(" 开始抽取 ",-1)])]),_:1},8,["disabled","onClick"])]),d.filteredStudents.length===0?(r(),m("div",R,[t.pickerMode==="name"?(r(),m(b,{key:0},[o(" 没有可抽取的学生,请调整过滤选项 ")],64)):(r(),m(b,{key:1},[o(" 请设置有效的学号范围 ")],64))])):x("",!0),a("div",O,[o(" 当前可抽取学生: "+c(d.filteredStudents.length)+"人 ",1),t.pickerMode==="name"?(r(),g(I,{key:0,location:"bottom"},{activator:l(({props:n})=>[s(P,L({class:"ml-1",icon:"mdi-information-outline",size:"small"},n),null,16)]),default:l(()=>[a("div",X,[t.tempFilters.excludeAbsent?(r(),m("div",Y," • 已排除请假学生 ("+c(d.absentCount)+"人) ",1)):x("",!0),t.tempFilters.excludeLate?(r(),m("div",Z," • 已排除迟到学生 ("+c(d.lateCount)+"人) ",1)):x("",!0),t.tempFilters.excludeExcluded?(r(),m("div",J," • 已排除不参与学生 ("+c(d.excludedCount)+"人) ",1)):x("",!0)])]),_:1})):x("",!0),t.pickerMode==="name"?(r(),m("div",K,[s(y,{color:t.tempFilters.excludeLate?"warning":"default",variant:t.tempFilters.excludeLate?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-clock-alert",onClick:e[4]||(e[4]=n=>t.tempFilters.excludeLate=!t.tempFilters.excludeLate)},{default:l(()=>[o(c(t.tempFilters.excludeLate?"排除":"包含")+"迟到学生 ",1)]),_:1},8,["color","variant"]),s(y,{color:t.tempFilters.excludeAbsent?"error":"default",variant:t.tempFilters.excludeAbsent?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-account-off",onClick:e[5]||(e[5]=n=>t.tempFilters.excludeAbsent=!t.tempFilters.excludeAbsent)},{default:l(()=>[o(c(t.tempFilters.excludeAbsent?"排除":"包含")+"请假学生 ",1)]),_:1},8,["color","variant"]),s(y,{color:t.tempFilters.excludeExcluded?"grey":"default",variant:t.tempFilters.excludeExcluded?"elevated":"text",class:"filter-chip","prepend-icon":"mdi-account-cancel",onClick:e[6]||(e[6]=n=>t.tempFilters.excludeExcluded=!t.tempFilters.excludeExcluded)},{default:l(()=>[o(c(t.tempFilters.excludeExcluded?"排除":"包含")+"不参与学生 ",1)]),_:1},8,["color","variant"])])):x("",!0)])]),_:1}))]),_:1})]),_:1},8,["modelValue"])}const ue=V(z,[["render",te],["__scopeId","data-v-090899ef"]]);export{ue as default}; diff --git a/assets/StudentNameManager-DSeAWOCU.js b/assets/StudentNameManager-DB-P5C67.js similarity index 91% rename from assets/StudentNameManager-DSeAWOCU.js rename to assets/StudentNameManager-DB-P5C67.js index 12dca55..b341a8a 100644 --- a/assets/StudentNameManager-DSeAWOCU.js +++ b/assets/StudentNameManager-DB-P5C67.js @@ -1 +1 @@ -import{_ as le,w as oe,e as ne,c as ue,d as re,l as ie,h as z,g as ve,k as de,n as $}from"./index-CzpSlHRw.js";import{a as D,d as E}from"./dataProvider-DBZnFcYO.js";import{V as ce}from"./VAutocomplete-D8Wr7ywO.js";import{V as me}from"./VTextField-BxdS2D7S.js";import{V as pe}from"./VChip-B3whZF-S.js";import{V as fe}from"./VSwitch-DcxT6NgQ.js";import{V as ge}from"./VCombobox-DqiaU_M6.js";import{V as ke}from"./VAlert-DaoJAibO.js";import{o as P,D as ye,X as p,_ as j,j as d,Z as f,a1 as _,S as B,F as U,k as I,$ as H,a2 as he,Y as R,af as Ve,e as g,b as c}from"./vendor-vue-28M5UGz3.js";import"./vendor-vuetify-95axeNJO.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";import"./VSelect-DZBjiB3J.js";import"./VSheet-ZjkOR-Oc.js";import"./VCheckboxBtn-BLxCsxXE.js";const Te={key:0,class:"mt-2 text-caption text-medium-emphasis"},be={class:"mt-2 mb-4"},we={class:"d-flex flex-wrap gap-2"},Ae={key:0,class:"ms-1 text-error"},Se={__name:"StudentNameManager",emits:["token-info-updated"],setup(Ne,{expose:K,emit:X}){const F=X,v=c(!1),k=c(""),y=c([]),T=c(""),m=c(!1),i=c(""),u=c(null),r=c([]),Y=c(""),b=c(""),o=c({name:"",isHeadTeacher:!1,subjects:[]}),w=g(()=>{var e;return((e=u.value)==null?void 0:e.deviceType)==="student"}),C=g(()=>{var e;return((e=u.value)==null?void 0:e.deviceType)==="teacher"}),Z=g(()=>{var e;return((e=u.value)==null?void 0:e.isReadOnly)===!0}),q=g(()=>{var e;return((e=u.value)==null?void 0:e.note)||"设置名称"}),G=g(()=>!!h.value),h=g(()=>$("server.kvToken")),L=g(()=>$("server.provider")),J=g(()=>L.value==="kv-server"||L.value==="classworkscloud"),Q=g(()=>w.value?"设置学生姓名":C.value?"设置教师姓名":"设置姓名"),W=g(()=>r.value),A=async()=>{var e;if(!(!J.value||!h.value))try{const a=$("server.domain");if(!a)return;const t=await D.get(`${a}/kv/_token`,{headers:{Authorization:`Bearer ${h.value}`}});if(u.value=t.data,u.value.deviceType==="student"){T.value=u.value.note||"";const s=(await D.get(`${a}/kv/classworks-list-main`,{headers:{Authorization:`Bearer ${h.value}`}})).data.value||[];if(y.value=Array.isArray(s)?s:[],y.value.length>0){const l=u.value.note||"",V=y.value.some(S=>S.name===l);(!l||!V)&&(v.value=!0,k.value="")}return}if(u.value.deviceType==="teacher"){b.value=u.value.note||"";try{const s=(await D.get(`${a}/kv/classworks-list-teacher`,{headers:{Authorization:`Bearer ${h.value}`}})).data.value||[];r.value=Array.isArray(s)?s:[]}catch(n){((e=n==null?void 0:n.response)==null?void 0:e.status)===404?(console.log("教师列表不存在,初始化为空"),r.value=[]):(console.error("加载教师列表失败:",n),r.value=[])}if(r.value.length>0){const n=u.value.note||"",s=r.value.some(l=>l.name===n);(!n||!s)&&(v.value=!0,Y.value="")}return}}catch(a){console.error("检查学生姓名状态失败:",a)}},ee=async()=>{var e,a,t,n;if(!(!k.value||m.value)){i.value="",m.value=!0;try{const s=$("server.domain"),l=h.value;(await D.post(`${s}/apps/tokens/${l}/set-student-name`,{name:k.value})).data.success&&(T.value=k.value,v.value=!1,await A(),F("token-info-updated"))}catch(s){const l=(e=s==null?void 0:s.response)==null?void 0:e.status;l===400?i.value="该名称不在学生列表中,请选择正确的姓名":l===403?i.value="只有学生类型的 Token 可以设置姓名":l===404?i.value="设备未设置学生列表或 Token 不存在":i.value=((n=(t=(a=s==null?void 0:s.response)==null?void 0:a.data)==null?void 0:t.error)==null?void 0:n.message)||(s==null?void 0:s.message)||"设置失败,请稍后重试"}finally{m.value=!1}}},ae=async()=>{var e,a,t,n,s;if(!(!o.value.name||m.value)){i.value="",m.value=!0;try{const l=$("server.domain"),V=h.value,S={name:o.value.name.trim(),isHeadTeacher:!!o.value.isHeadTeacher,subjects:Array.isArray(o.value.subjects)?o.value.subjects.filter(x=>x&&String(x).trim()).map(x=>String(x).trim()):[]},O=r.value.findIndex(x=>x.name===S.name);O>=0?r.value[O]=S:r.value.push(S);const N=await E.saveData("classworks-list-teacher",r.value);if((N==null?void 0:N.success)===!1)throw new Error(((e=N==null?void 0:N.error)==null?void 0:e.message)||"保存列表失败");(await D.post(`${l}/apps/tokens/${V}/set-teacher-name`,{name:S.name})).data.success&&(b.value=S.name,v.value=!1,await A(),F("token-info-updated"))}catch(l){const V=(a=l==null?void 0:l.response)==null?void 0:a.status;V===400?i.value="该名称不在教师列表中,请选择正确的姓名":V===403?i.value="只有教师类型的 Token 可以设置姓名":V===404?i.value="设备未设置教师列表或 Token 不存在":i.value=((s=(n=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:n.error)==null?void 0:s.message)||(l==null?void 0:l.message)||"设置失败,请稍后重试"}finally{m.value=!1}}},te=e=>{o.value.name=e.name,o.value.isHeadTeacher=e.isHeadTeacher||!1,o.value.subjects=Array.isArray(e.subjects)?[...e.subjects]:[]},se=()=>{v.value=!1},M=async()=>{if(console.log("StudentNameManager.openDialog called"),console.log("isStudentToken:",w.value),console.log("studentList.length:",y.value.length),console.log("currentStudentName:",T.value),w.value){const e=await E.loadData("classworks-list-main");y.value=Array.isArray(e==null?void 0:e.value)?e.value:Array.isArray(e)?e:[],y.value.length===0?(console.log("Student list is empty, trying to load..."),await A(),k.value=T.value,v.value=!0):(k.value=T.value,v.value=!0);return}if(C.value){try{const e=await E.loadData("classworks-list-teacher");r.value=Array.isArray(e==null?void 0:e.value)?e.value:Array.isArray(e)?e:[]}catch{console.log("教师列表不存在或加载失败,允许手动创建"),r.value=[]}if(o.value={name:b.value,isHeadTeacher:!1,subjects:[]},b.value){const e=r.value.find(a=>a.name===b.value);e&&(o.value.isHeadTeacher=e.isHeadTeacher||!1,o.value.subjects=Array.isArray(e.subjects)?[...e.subjects]:[])}v.value=!0,console.log("Dialog opened (teacher), showDialog:",v.value);return}console.log("Not a student/teacher token, cannot open dialog")};return P(h,()=>{A()}),oe(()=>{A()}),P(u,()=>{F("token-info-updated")},{deep:!0}),ye(()=>{A()}),K({checkStudentNameStatus:A,openDialog:M,currentStudentName:T,currentTeacherName:b,isStudentToken:w,isTeacherToken:C,isReadOnly:Z,displayName:q,hasToken:G,tokenInfo:u}),(e,a)=>(p(),j(U,null,[d(de,{modelValue:v.value,"onUpdate:modelValue":a[4]||(a[4]=t=>v.value=t),"max-width":"720",persistent:""},{default:f(()=>[d(ne,null,{default:f(()=>[d(ue,null,{default:f(()=>[_(B(Q.value),1)]),_:1}),d(re,null,{default:f(()=>[w.value?(p(),j(U,{key:0},[a[5]||(a[5]=I("div",{class:"mb-2"}," 请从列表中选择您的姓名: ",-1)),d(ce,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=t=>k.value=t),items:y.value,clearable:"","hide-details":"","item-title":"name","item-value":"name",label:"学生姓名",placeholder:"选择您的姓名"},null,8,["modelValue","items"]),y.value.length>0?(p(),j("div",Te," 共 "+B(y.value.length)+" 位学生 ",1)):H("",!0)],64)):C.value?(p(),j(U,{key:1},[d(me,{modelValue:o.value.name,"onUpdate:modelValue":a[1]||(a[1]=t=>o.value.name=t),label:"教师姓名",placeholder:"输入姓名或从下方建议中选择",clearable:""},null,8,["modelValue"]),I("div",be,[I("div",we,[(p(!0),j(U,null,he(W.value,t=>(p(),R(pe,{key:t.name,size:"small",onClick:n=>te(t)},{default:f(()=>[_(B(t.name)+" ",1),t.isHeadTeacher?(p(),j("span",Ae," 👨‍🏫 ")):H("",!0)]),_:2},1032,["onClick"]))),128))])]),d(fe,{modelValue:o.value.isHeadTeacher,"onUpdate:modelValue":a[2]||(a[2]=t=>o.value.isHeadTeacher=t),inset:"",color:"primary",label:o.value.isHeadTeacher?"班主任":"非班主任"},null,8,["modelValue","label"]),d(ge,{modelValue:o.value.subjects,"onUpdate:modelValue":a[3]||(a[3]=t=>o.value.subjects=t),multiple:"",chips:"",clearable:"",label:"任教科目",hint:"可直接输入并回车添加多个科目","persistent-hint":""},null,8,["modelValue"])],64)):H("",!0),i.value?(p(),R(ke,{key:2,class:"mt-3",type:"error",variant:"tonal"},{default:f(()=>[_(B(i.value),1)]),_:1})):H("",!0)]),_:1}),d(ie,null,{default:f(()=>[d(z,{variant:"text",onClick:se},{default:f(()=>[...a[6]||(a[6]=[_(" 稍后设置 ",-1)])]),_:1}),d(ve),w.value?(p(),R(z,{key:0,disabled:!k.value||m.value,loading:m.value,color:"primary",onClick:ee},{default:f(()=>[...a[7]||(a[7]=[_(" 确认 ",-1)])]),_:1},8,["disabled","loading"])):C.value?(p(),R(z,{key:1,disabled:!o.value.name||m.value,loading:m.value,color:"primary",onClick:ae},{default:f(()=>[...a[8]||(a[8]=[_(" 确认 ",-1)])]),_:1},8,["disabled","loading"])):H("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),Ve(e.$slots,"header-display",{isStudent:w.value,openDialog:M,studentName:T.value,teacherName:b.value},void 0)],64))}},Oe=le(Se,[["__scopeId","data-v-e0ac52e0"]]);export{Oe as default}; +import{_ as le,w as oe,e as ne,c as ue,d as re,l as ie,h as z,g as ve,k as de,n as $}from"./index-DGIAsv4W.js";import{a as D,d as E}from"./dataProvider-GWPC-0Vt.js";import{V as ce}from"./VAutocomplete-N0zTUlyj.js";import{V as me}from"./VTextField-BurlcggD.js";import{V as pe}from"./VChip-mRzIPuM0.js";import{V as fe}from"./VSwitch-k6hfPfa2.js";import{V as ge}from"./VCombobox-BGa7K58w.js";import{V as ke}from"./VAlert-BZ4-f-hy.js";import{o as P,D as ye,X as p,_ as j,j as d,Z as f,a1 as _,S as B,F as U,k as I,$ as H,a2 as he,Y as R,af as Ve,e as g,b as c}from"./vendor-vue-BiQC5iF7.js";import"./vendor-vuetify-DsKlzgKp.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";import"./VSelect-oxA0t9CG.js";import"./VSheet-BBnSA_kJ.js";import"./VCheckboxBtn-BKcSogH0.js";const Te={key:0,class:"mt-2 text-caption text-medium-emphasis"},be={class:"mt-2 mb-4"},we={class:"d-flex flex-wrap gap-2"},Ae={key:0,class:"ms-1 text-error"},Se={__name:"StudentNameManager",emits:["token-info-updated"],setup(Ne,{expose:K,emit:X}){const F=X,v=c(!1),k=c(""),y=c([]),T=c(""),m=c(!1),i=c(""),u=c(null),r=c([]),Y=c(""),b=c(""),o=c({name:"",isHeadTeacher:!1,subjects:[]}),w=g(()=>{var e;return((e=u.value)==null?void 0:e.deviceType)==="student"}),C=g(()=>{var e;return((e=u.value)==null?void 0:e.deviceType)==="teacher"}),Z=g(()=>{var e;return((e=u.value)==null?void 0:e.isReadOnly)===!0}),q=g(()=>{var e;return((e=u.value)==null?void 0:e.note)||"设置名称"}),G=g(()=>!!h.value),h=g(()=>$("server.kvToken")),L=g(()=>$("server.provider")),J=g(()=>L.value==="kv-server"||L.value==="classworkscloud"),Q=g(()=>w.value?"设置学生姓名":C.value?"设置教师姓名":"设置姓名"),W=g(()=>r.value),A=async()=>{var e;if(!(!J.value||!h.value))try{const a=$("server.domain");if(!a)return;const t=await D.get(`${a}/kv/_token`,{headers:{Authorization:`Bearer ${h.value}`}});if(u.value=t.data,u.value.deviceType==="student"){T.value=u.value.note||"";const s=(await D.get(`${a}/kv/classworks-list-main`,{headers:{Authorization:`Bearer ${h.value}`}})).data.value||[];if(y.value=Array.isArray(s)?s:[],y.value.length>0){const l=u.value.note||"",V=y.value.some(S=>S.name===l);(!l||!V)&&(v.value=!0,k.value="")}return}if(u.value.deviceType==="teacher"){b.value=u.value.note||"";try{const s=(await D.get(`${a}/kv/classworks-list-teacher`,{headers:{Authorization:`Bearer ${h.value}`}})).data.value||[];r.value=Array.isArray(s)?s:[]}catch(n){((e=n==null?void 0:n.response)==null?void 0:e.status)===404?(console.log("教师列表不存在,初始化为空"),r.value=[]):(console.error("加载教师列表失败:",n),r.value=[])}if(r.value.length>0){const n=u.value.note||"",s=r.value.some(l=>l.name===n);(!n||!s)&&(v.value=!0,Y.value="")}return}}catch(a){console.error("检查学生姓名状态失败:",a)}},ee=async()=>{var e,a,t,n;if(!(!k.value||m.value)){i.value="",m.value=!0;try{const s=$("server.domain"),l=h.value;(await D.post(`${s}/apps/tokens/${l}/set-student-name`,{name:k.value})).data.success&&(T.value=k.value,v.value=!1,await A(),F("token-info-updated"))}catch(s){const l=(e=s==null?void 0:s.response)==null?void 0:e.status;l===400?i.value="该名称不在学生列表中,请选择正确的姓名":l===403?i.value="只有学生类型的 Token 可以设置姓名":l===404?i.value="设备未设置学生列表或 Token 不存在":i.value=((n=(t=(a=s==null?void 0:s.response)==null?void 0:a.data)==null?void 0:t.error)==null?void 0:n.message)||(s==null?void 0:s.message)||"设置失败,请稍后重试"}finally{m.value=!1}}},ae=async()=>{var e,a,t,n,s;if(!(!o.value.name||m.value)){i.value="",m.value=!0;try{const l=$("server.domain"),V=h.value,S={name:o.value.name.trim(),isHeadTeacher:!!o.value.isHeadTeacher,subjects:Array.isArray(o.value.subjects)?o.value.subjects.filter(x=>x&&String(x).trim()).map(x=>String(x).trim()):[]},O=r.value.findIndex(x=>x.name===S.name);O>=0?r.value[O]=S:r.value.push(S);const N=await E.saveData("classworks-list-teacher",r.value);if((N==null?void 0:N.success)===!1)throw new Error(((e=N==null?void 0:N.error)==null?void 0:e.message)||"保存列表失败");(await D.post(`${l}/apps/tokens/${V}/set-teacher-name`,{name:S.name})).data.success&&(b.value=S.name,v.value=!1,await A(),F("token-info-updated"))}catch(l){const V=(a=l==null?void 0:l.response)==null?void 0:a.status;V===400?i.value="该名称不在教师列表中,请选择正确的姓名":V===403?i.value="只有教师类型的 Token 可以设置姓名":V===404?i.value="设备未设置教师列表或 Token 不存在":i.value=((s=(n=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:n.error)==null?void 0:s.message)||(l==null?void 0:l.message)||"设置失败,请稍后重试"}finally{m.value=!1}}},te=e=>{o.value.name=e.name,o.value.isHeadTeacher=e.isHeadTeacher||!1,o.value.subjects=Array.isArray(e.subjects)?[...e.subjects]:[]},se=()=>{v.value=!1},M=async()=>{if(console.log("StudentNameManager.openDialog called"),console.log("isStudentToken:",w.value),console.log("studentList.length:",y.value.length),console.log("currentStudentName:",T.value),w.value){const e=await E.loadData("classworks-list-main");y.value=Array.isArray(e==null?void 0:e.value)?e.value:Array.isArray(e)?e:[],y.value.length===0?(console.log("Student list is empty, trying to load..."),await A(),k.value=T.value,v.value=!0):(k.value=T.value,v.value=!0);return}if(C.value){try{const e=await E.loadData("classworks-list-teacher");r.value=Array.isArray(e==null?void 0:e.value)?e.value:Array.isArray(e)?e:[]}catch{console.log("教师列表不存在或加载失败,允许手动创建"),r.value=[]}if(o.value={name:b.value,isHeadTeacher:!1,subjects:[]},b.value){const e=r.value.find(a=>a.name===b.value);e&&(o.value.isHeadTeacher=e.isHeadTeacher||!1,o.value.subjects=Array.isArray(e.subjects)?[...e.subjects]:[])}v.value=!0,console.log("Dialog opened (teacher), showDialog:",v.value);return}console.log("Not a student/teacher token, cannot open dialog")};return P(h,()=>{A()}),oe(()=>{A()}),P(u,()=>{F("token-info-updated")},{deep:!0}),ye(()=>{A()}),K({checkStudentNameStatus:A,openDialog:M,currentStudentName:T,currentTeacherName:b,isStudentToken:w,isTeacherToken:C,isReadOnly:Z,displayName:q,hasToken:G,tokenInfo:u}),(e,a)=>(p(),j(U,null,[d(de,{modelValue:v.value,"onUpdate:modelValue":a[4]||(a[4]=t=>v.value=t),"max-width":"720",persistent:""},{default:f(()=>[d(ne,null,{default:f(()=>[d(ue,null,{default:f(()=>[_(B(Q.value),1)]),_:1}),d(re,null,{default:f(()=>[w.value?(p(),j(U,{key:0},[a[5]||(a[5]=I("div",{class:"mb-2"}," 请从列表中选择您的姓名: ",-1)),d(ce,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=t=>k.value=t),items:y.value,clearable:"","hide-details":"","item-title":"name","item-value":"name",label:"学生姓名",placeholder:"选择您的姓名"},null,8,["modelValue","items"]),y.value.length>0?(p(),j("div",Te," 共 "+B(y.value.length)+" 位学生 ",1)):H("",!0)],64)):C.value?(p(),j(U,{key:1},[d(me,{modelValue:o.value.name,"onUpdate:modelValue":a[1]||(a[1]=t=>o.value.name=t),label:"教师姓名",placeholder:"输入姓名或从下方建议中选择",clearable:""},null,8,["modelValue"]),I("div",be,[I("div",we,[(p(!0),j(U,null,he(W.value,t=>(p(),R(pe,{key:t.name,size:"small",onClick:n=>te(t)},{default:f(()=>[_(B(t.name)+" ",1),t.isHeadTeacher?(p(),j("span",Ae," 👨‍🏫 ")):H("",!0)]),_:2},1032,["onClick"]))),128))])]),d(fe,{modelValue:o.value.isHeadTeacher,"onUpdate:modelValue":a[2]||(a[2]=t=>o.value.isHeadTeacher=t),inset:"",color:"primary",label:o.value.isHeadTeacher?"班主任":"非班主任"},null,8,["modelValue","label"]),d(ge,{modelValue:o.value.subjects,"onUpdate:modelValue":a[3]||(a[3]=t=>o.value.subjects=t),multiple:"",chips:"",clearable:"",label:"任教科目",hint:"可直接输入并回车添加多个科目","persistent-hint":""},null,8,["modelValue"])],64)):H("",!0),i.value?(p(),R(ke,{key:2,class:"mt-3",type:"error",variant:"tonal"},{default:f(()=>[_(B(i.value),1)]),_:1})):H("",!0)]),_:1}),d(ie,null,{default:f(()=>[d(z,{variant:"text",onClick:se},{default:f(()=>[...a[6]||(a[6]=[_(" 稍后设置 ",-1)])]),_:1}),d(ve),w.value?(p(),R(z,{key:0,disabled:!k.value||m.value,loading:m.value,color:"primary",onClick:ee},{default:f(()=>[...a[7]||(a[7]=[_(" 确认 ",-1)])]),_:1},8,["disabled","loading"])):C.value?(p(),R(z,{key:1,disabled:!o.value.name||m.value,loading:m.value,color:"primary",onClick:ae},{default:f(()=>[...a[8]||(a[8]=[_(" 确认 ",-1)])]),_:1},8,["disabled","loading"])):H("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),Ve(e.$slots,"header-display",{isStudent:w.value,openDialog:M,studentName:T.value,teacherName:b.value},void 0)],64))}},Oe=le(Se,[["__scopeId","data-v-e0ac52e0"]]);export{Oe as default}; diff --git a/assets/UrgentTestDialog-7IGcZhxC.js b/assets/UrgentTestDialog-BqTcJt8c.js similarity index 93% rename from assets/UrgentTestDialog-7IGcZhxC.js rename to assets/UrgentTestDialog-BqTcJt8c.js index 044ce92..b11b5d9 100644 --- a/assets/UrgentTestDialog-7IGcZhxC.js +++ b/assets/UrgentTestDialog-BqTcJt8c.js @@ -1 +1 @@ -import{_ as O,a as L}from"./ChatWidget-DKseinU1.js";import{a as S}from"./socketClient-pOSoE2ci.js";import{d as N}from"./dataProvider-DBZnFcYO.js";import{_ as W,e as h,f as I,g as V,h as v,d as y,l as w,c as T,p as j,q,k as b}from"./index-CzpSlHRw.js";import{b as E,c as A}from"./VAppBarTitle-C1UGCJHo.js";import{V as K}from"./VContainer-BIFGURze.js";import{V as F,a as x}from"./VRow-sd4d6eNi.js";import{V as M}from"./VForm-DIiMelbi.js";import{V as P}from"./VSwitch-DcxT6NgQ.js";import{V as R}from"./VCheckbox-tGn5q60R.js";import{V as z}from"./VTextarea-zDVNnlPQ.js";import{X as f,Y as D,Z as s,j as t,a1 as a,S as u,_,F as U,a2 as k,k as m}from"./vendor-vue-28M5UGz3.js";import"./soundList-D9U-Grcp.js";import"./VChip-B3whZF-S.js";import"./vendor-vuetify-95axeNJO.js";import"./deviceEvents-CH859Fwr.js";import"./VTooltip-C8vChj8G.js";import"./VPagination-CwVL3tMR.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-xQe1elLG.js";import"./vendor-utils-B_Y_1aLs.js";import"./VTextField-BxdS2D7S.js";import"./VCheckboxBtn-BLxCsxXE.js";const X={name:"UrgentTestDialog",components:{ChatWidget:L,EventSender:O},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{sending:!1,notificationForm:{isUrgent:!1,message:"",isPersistent:!1},sentMessages:[],receiptCleanup:[],persistentNotifications:[],editDialog:!1,editForm:{id:null,message:"",isUrgent:!1,resend:!1},savingEdit:!1,deleteConfirmDialog:!1,itemToDelete:null}},computed:{dialog:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){this.setupEventListeners(),this.loadPersistentNotifications()},beforeUnmount(){this.cleanup()},methods:{generateNotificationId(){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let e="";for(let l=0;l<32;l++)e+=i.charAt(Math.floor(Math.random()*i.length));return e},async sendNotification(){if(this.notificationForm.message.trim()){this.sending=!0;try{const i=this.generateNotificationId(),e=this.notificationForm.message,l=this.notificationForm.isUrgent,c=this.notificationForm.isPersistent,o=await this.$refs.eventSender.sendNotification(e,l,[],{deviceName:"测试设备",deviceType:"system",isReadOnly:!1},i),r=(o==null?void 0:o.eventId)||`msg-${Date.now()}`;if(this.sentMessages.push({id:r,notificationId:i,message:e,isUrgent:l,timestamp:new Date().toISOString(),receipts:{displayed:[],read:[]}}),c)try{const p="notification-list",g=await N.loadData(p);let n=[];g&&Array.isArray(g)?n=g:g&&g.success!==!1&&Array.isArray(g.data)&&(n=g.data);const d={id:i,message:e,isUrgent:l,timestamp:new Date().toISOString()};n.unshift(d),await N.saveData(p,n),this.persistentNotifications=n,console.log("常驻通知已保存")}catch(p){console.error("保存常驻通知失败",p)}console.log("通知已发送,事件ID:",r,"通知ID:",i),this.resetForm()}catch(i){console.error("发送通知失败:",i)}finally{this.sending=!1}}},resetForm(){this.notificationForm={isUrgent:!1,message:"",isPersistent:!1}},close(){this.dialog=!1},setupEventListeners(){const i=S("notification-displayed",l=>{console.log("收到显示回执:",l),this.updateReceipt(l,"displayed")}),e=S("notification-read",l=>{console.log("收到已读回执:",l),this.updateReceipt(l,"read")});this.receiptCleanup.push(i,e)},updateReceipt(i,e){var r,p,g,n,d;const l=i.originalEventId,c=i.notificationId||((r=i.content)==null?void 0:r.notificationId);if(!l&&!c)return;const o=this.sentMessages.find(C=>C.id===l||C.notificationId===c);if(o){const C={senderId:i.senderId||"unknown-sender",deviceName:((p=i.senderInfo)==null?void 0:p.deviceName)||((g=i.deviceInfo)==null?void 0:g.deviceName)||"未知设备",deviceType:((n=i.senderInfo)==null?void 0:n.deviceType)||((d=i.deviceInfo)==null?void 0:d.deviceType)||"unknown",timestamp:new Date().toISOString()};o.receipts[e].find(B=>B.senderId===C.senderId)||(o.receipts[e].push(C),console.log(`更新${e}回执:`,o.id,C))}},cleanup(){this.receiptCleanup.forEach(i=>i()),this.receiptCleanup=[]},formatTime(i){return new Date(i).toLocaleString("zh-CN")},getReceiptStatus(i){return i.read.length>0?"已读":i.displayed.length>0?"已显示":"已发送"},getReceiptColor(i){return i.read.length>0?"success":i.displayed.length>0?"info":"grey"},formatDeviceTime(i){return new Date(i).toLocaleTimeString("zh-CN")},getMainCardColor(i){return i.read.length>0?"success":i.displayed.length>0?"info":"grey"},hasAnyReceipts(i){return i.read.length>0||i.displayed.length>0},getDisplayedOnlyDevices(i){const e=i.read.map(l=>l.senderId);return i.displayed.filter(l=>!e.includes(l.senderId))},openEditDialog(i){this.editForm={id:i.id,message:i.message,isUrgent:i.isUrgent||!1,resend:!1,timestamp:i.timestamp},this.editDialog=!0},async saveEdit(){var i,e;if(this.editForm.message.trim()){this.savingEdit=!0;try{const l=this.persistentNotifications.findIndex(c=>c.id===this.editForm.id);if(l!==-1){if(this.persistentNotifications[l]={...this.persistentNotifications[l],message:this.editForm.message,isUrgent:this.editForm.isUrgent,timestamp:new Date().toISOString()},await N.saveData("notification-list",this.persistentNotifications),this.editForm.resend){const c=this.editForm.id,o=this.editForm.message,r=this.editForm.isUrgent,p=await this.$refs.eventSender.sendNotification(o,r,[],{deviceName:"测试设备",deviceType:"system",isReadOnly:!1},c),g=(p==null?void 0:p.eventId)||`msg-${Date.now()}`;this.sentMessages.push({id:g,notificationId:c,message:o,isUrgent:r,timestamp:new Date().toISOString(),receipts:{displayed:[],read:[]}})}this.editDialog=!1,(i=this.$message)==null||i.success("已更新")}}catch(l){console.error("保存失败",l),(e=this.$message)==null||e.error("保存失败")}finally{this.savingEdit=!1}}},async loadPersistentNotifications(){try{const i=await N.loadData("notification-list");i&&Array.isArray(i)?this.persistentNotifications=i:i&&i.success!==!1&&Array.isArray(i.data)?this.persistentNotifications=i.data:this.persistentNotifications=[]}catch(i){console.error("加载常驻通知失败",i)}},async deleteNotification(i){if(confirm("确定要删除这个通知吗?"))try{this.sentMessages=this.sentMessages.filter(l=>l.id!==i),this.persistentNotifications=this.persistentNotifications.filter(l=>l.id!==i),console.log("通知已删除,通知ID:",i)}catch(l){console.error("删除通知失败:",l)}},deletePersistentNotification(i){this.itemToDelete=i,this.deleteConfirmDialog=!0},async executeDelete(){var e,l;if(!this.itemToDelete)return;const i=this.itemToDelete;this.deleteConfirmDialog=!1,this.itemToDelete=null;try{this.persistentNotifications=this.persistentNotifications.filter(o=>o.id!==i);const c=this.persistentNotifications.length>0?this.persistentNotifications:{};await N.saveData("notification-list",c),(e=this.$message)==null||e.success("已删除")}catch(c){console.error("删除失败",c),(l=this.$message)==null||l.error("删除失败")}}}},Y={key:0,class:"text-center text-grey py-4"},Z={key:0,class:"text-center text-grey py-8"},G={class:"d-flex align-center mb-2"},H={class:"font-weight-medium"},J={class:"text-caption font-weight-medium"},Q={class:"text-body-2 mb-3",style:{"max-height":"60px",overflow:"hidden"}},$={class:"text-caption"},ee={key:0},te={class:"align-center"},ie={class:"text-body-2 font-weight-medium"},se={class:"text-caption mt-1"},ne={class:"align-center"},oe={class:"text-body-2 font-weight-medium"},le={class:"text-caption text-grey"},re={class:"text-caption text-grey mt-1"},ae={key:1};function de(i,e,l,c,o,r){const p=L,g=O;return f(),D(b,{modelValue:r.dialog,"onUpdate:modelValue":e[11]||(e[11]=n=>r.dialog=n),fullscreen:"",transition:"dialog-bottom-transition",scrollable:""},{default:s(()=>[t(h,null,{default:s(()=>[t(E,{dark:"",flat:""},{default:s(()=>[t(A,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[12]||(e[12]=[a(" mdi-chat ",-1)])]),_:1}),e[13]||(e[13]=a(" 发送通知 ",-1))]),_:1}),t(V),t(v,{icon:"mdi-close",onClick:r.close},null,8,["onClick"])]),_:1}),t(y,{class:"pa-0"},{default:s(()=>[t(K,null,{default:s(()=>[t(F,null,{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(y,null,{default:s(()=>[t(M,null,{default:s(()=>[t(F,null,{default:s(()=>[t(x,{cols:"12",md:"6"},{default:s(()=>[t(P,{modelValue:o.notificationForm.isUrgent,"onUpdate:modelValue":e[0]||(e[0]=n=>o.notificationForm.isUrgent=n),label:"强调通知",color:"red",inset:""},null,8,["modelValue"]),t(R,{modelValue:o.notificationForm.isPersistent,"onUpdate:modelValue":e[1]||(e[1]=n=>o.notificationForm.isPersistent=n),label:"常驻展示",color:"primary","hide-details":"",class:"mt-0"},null,8,["modelValue"])]),_:1}),t(x,{cols:"12"},{default:s(()=>[t(z,{modelValue:o.notificationForm.message,"onUpdate:modelValue":e[2]||(e[2]=n=>o.notificationForm.message=n),label:"通知内容",outlined:"",rows:"3",placeholder:"请输入强调通知的内容..."},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),t(w,{class:"px-6 pb-6"},{default:s(()=>[t(v,{color:o.notificationForm.isUrgent?"red":"blue",disabled:!o.notificationForm.message.trim(),loading:o.sending,size:"large",variant:"elevated",onClick:r.sendNotification},{default:s(()=>[t(I,{left:""},{default:s(()=>[a(u(o.notificationForm.isUrgent?"mdi-alert-circle":"mdi-information"),1)]),_:1}),a(" "+u(o.notificationForm.isUrgent?"发送强调通知":"发送通知"),1)]),_:1},8,["color","disabled","loading","onClick"]),t(V)]),_:1})]),_:1})]),_:1})]),_:1}),t(F,{class:"mt-4"},{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[14]||(e[14]=[a(" mdi-pin ",-1)])]),_:1}),e[15]||(e[15]=a(" 常驻通知管理 ",-1))]),_:1}),t(y,null,{default:s(()=>[o.persistentNotifications.length===0?(f(),_("div",Y," 暂无常驻通知 ")):(f(),D(j,{key:1},{default:s(()=>[(f(!0),_(U,null,k(o.persistentNotifications,n=>(f(),D(q,{key:n.id,title:n.message,subtitle:r.formatTime(n.timestamp),lines:"two"},{prepend:s(()=>[t(I,{color:n.isUrgent?"error":"primary"},{default:s(()=>[a(u(n.isUrgent?"mdi-alert-circle":"mdi-information"),1)]),_:2},1032,["color"])]),append:s(()=>[t(v,{icon:"mdi-pencil",variant:"text",size:"small",onClick:d=>r.openEditDialog(n)},null,8,["onClick"]),t(v,{icon:"mdi-delete",variant:"text",color:"error",size:"small",onClick:d=>r.deletePersistentNotification(n.id)},null,8,["onClick"])]),_:2},1032,["title","subtitle"]))),128))]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1}),t(F,{class:"mt-4"},{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[16]||(e[16]=[a(" mdi-history ",-1)])]),_:1}),e[17]||(e[17]=a(" 消息记录 ",-1)),t(V)]),_:1}),t(y,null,{default:s(()=>[o.sentMessages.length===0?(f(),_("div",Z,[t(I,{size:"64",color:"grey-lighten-2"},{default:s(()=>[...e[18]||(e[18]=[a(" mdi-message-outline ",-1)])]),_:1}),e[19]||(e[19]=m("div",{class:"mt-2"}," 暂无发送记录 ",-1))])):(f(),D(F,{key:1},{default:s(()=>[(f(!0),_(U,null,k(o.sentMessages.slice().reverse(),n=>(f(),D(x,{key:n.id,cols:"12",md:"6",lg:"4"},{default:s(()=>[t(h,{color:r.getMainCardColor(n.receipts),class:"mb-2"},{default:s(()=>[t(y,null,{default:s(()=>[m("div",G,[m("span",H,u(n.isUrgent?"强调通知":"通知"),1),t(V),m("span",J,u(r.getReceiptStatus(n.receipts)),1)]),m("div",Q,u(n.message),1),m("div",$,[m("div",null,"发送时间:"+u(r.formatTime(n.timestamp)),1),m("div",null,"事件ID:"+u(n.id),1),m("div",null,"通知ID:"+u(n.notificationId),1)])]),_:2},1024)]),_:2},1032,["color"]),r.hasAnyReceipts(n.receipts)?(f(),_("div",ee,[(f(!0),_(U,null,k(n.receipts.read,d=>(f(),D(h,{key:`${d.senderId}-read`,color:"success",class:"mb-1",size:"small"},{default:s(()=>[t(y,{class:"pa-2"},{default:s(()=>[m("div",te,[m("span",ie,u(d.deviceName),1),e[20]||(e[20]=m("br",null,null,-1)),a(" "+u(d.deviceType),1)]),m("div",se," 已读于 "+u(r.formatDeviceTime(d.timestamp)),1)]),_:2},1024)]),_:2},1024))),128)),(f(!0),_(U,null,k(r.getDisplayedOnlyDevices(n.receipts),d=>(f(),D(h,{key:`${d.senderId}-displayed`,color:"info-lighten-4",variant:"outlined",class:"mb-1",size:"small"},{default:s(()=>[t(y,{class:"pa-2"},{default:s(()=>[m("div",ne,[m("span",oe,u(d.deviceName),1),t(V),m("span",le,u(d.deviceType=="classroom"?"教室设备上的应用":d.deviceType),1)]),m("div",re," 已显示于 "+u(r.formatDeviceTime(d.timestamp)),1)]),_:2},1024)]),_:2},1024))),128))])):(f(),_("div",ae,[t(h,{color:"info-lighten-4",variant:"outlined",class:"mb-1",size:"small",title:"无设备在线"},{default:s(()=>[t(y,null,{default:s(()=>[...e[21]||(e[21]=[a(" 如果数秒后任然显示这个提示,则可能没有任何设备在线接收通知。 ",-1)])]),_:1})]),_:1})]))]),_:2},1024))),128))]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(p),t(g,{ref:"eventSender"},null,512),t(b,{modelValue:o.editDialog,"onUpdate:modelValue":e[8]||(e[8]=n=>o.editDialog=n),"max-width":"500",fullscreen:i.$vuetify.display.xs},{default:s(()=>[t(h,null,{default:s(()=>[t(E,{flat:"",density:"compact"},{default:s(()=>[t(A,null,{default:s(()=>[...e[22]||(e[22]=[a("编辑常驻通知",-1)])]),_:1}),t(V),t(v,{icon:"mdi-close",onClick:e[3]||(e[3]=n=>o.editDialog=!1)})]),_:1}),t(y,null,{default:s(()=>[t(M,null,{default:s(()=>[t(z,{modelValue:o.editForm.message,"onUpdate:modelValue":e[4]||(e[4]=n=>o.editForm.message=n),label:"通知内容",rows:"3","auto-grow":""},null,8,["modelValue"]),t(P,{modelValue:o.editForm.isUrgent,"onUpdate:modelValue":e[5]||(e[5]=n=>o.editForm.isUrgent=n),label:"强调通知",color:"error","hide-details":""},null,8,["modelValue"]),t(R,{modelValue:o.editForm.resend,"onUpdate:modelValue":e[6]||(e[6]=n=>o.editForm.resend=n),label:"保存并重新发送通知",hint:"勾选后将作为新通知发送给所有在线设备","persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),t(w,null,{default:s(()=>[t(V),t(v,{variant:"text",onClick:e[7]||(e[7]=n=>o.editDialog=!1)},{default:s(()=>[...e[23]||(e[23]=[a(" 取消 ",-1)])]),_:1}),t(v,{color:"primary",loading:o.savingEdit,onClick:r.saveEdit},{default:s(()=>[...e[24]||(e[24]=[a(" 保存 ",-1)])]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","fullscreen"]),t(b,{modelValue:o.deleteConfirmDialog,"onUpdate:modelValue":e[10]||(e[10]=n=>o.deleteConfirmDialog=n),"max-width":"400"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,{class:"text-h5"},{default:s(()=>[...e[25]||(e[25]=[a(" 确认删除 ",-1)])]),_:1}),t(y,null,{default:s(()=>[...e[26]||(e[26]=[a("确定要删除这条常驻通知吗?此操作无法撤销。",-1)])]),_:1}),t(w,null,{default:s(()=>[t(V),t(v,{color:"grey-darken-1",variant:"text",onClick:e[9]||(e[9]=n=>o.deleteConfirmDialog=!1)},{default:s(()=>[...e[27]||(e[27]=[a(" 取消 ",-1)])]),_:1}),t(v,{color:"error",variant:"text",onClick:r.executeDelete},{default:s(()=>[...e[28]||(e[28]=[a(" 删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}const Ae=W(X,[["render",de],["__scopeId","data-v-128c728f"]]);export{Ae as default}; +import{_ as O,a as L}from"./ChatWidget-BXhjl6gS.js";import{a as S}from"./socketClient-BKHEsaLg.js";import{d as N}from"./dataProvider-GWPC-0Vt.js";import{_ as W,e as h,f as I,g as V,h as v,d as y,l as w,c as T,p as j,q,k as b}from"./index-DGIAsv4W.js";import{b as E,c as A}from"./VAppBarTitle-DheyIZnb.js";import{V as K}from"./VContainer-DZyPrcqa.js";import{V as F,a as x}from"./VRow-Cjhiymuu.js";import{V as M}from"./VForm-ObW_L7SS.js";import{V as P}from"./VSwitch-k6hfPfa2.js";import{V as R}from"./VCheckbox-BRi_fHJs.js";import{V as z}from"./VTextarea-vGWmTJww.js";import{X as f,Y as D,Z as s,j as t,a1 as a,S as u,_,F as U,a2 as k,k as m}from"./vendor-vue-BiQC5iF7.js";import"./soundList-D9U-Grcp.js";import"./VChip-mRzIPuM0.js";import"./vendor-vuetify-DsKlzgKp.js";import"./deviceEvents-HN9RDua9.js";import"./VTooltip-2IUjfpCS.js";import"./VPagination-DLzhjdaP.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-BtcwvdZJ.js";import"./vendor-utils-DwALrQNc.js";import"./VTextField-BurlcggD.js";import"./VCheckboxBtn-BKcSogH0.js";const X={name:"UrgentTestDialog",components:{ChatWidget:L,EventSender:O},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{sending:!1,notificationForm:{isUrgent:!1,message:"",isPersistent:!1},sentMessages:[],receiptCleanup:[],persistentNotifications:[],editDialog:!1,editForm:{id:null,message:"",isUrgent:!1,resend:!1},savingEdit:!1,deleteConfirmDialog:!1,itemToDelete:null}},computed:{dialog:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){this.setupEventListeners(),this.loadPersistentNotifications()},beforeUnmount(){this.cleanup()},methods:{generateNotificationId(){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let e="";for(let l=0;l<32;l++)e+=i.charAt(Math.floor(Math.random()*i.length));return e},async sendNotification(){if(this.notificationForm.message.trim()){this.sending=!0;try{const i=this.generateNotificationId(),e=this.notificationForm.message,l=this.notificationForm.isUrgent,c=this.notificationForm.isPersistent,o=await this.$refs.eventSender.sendNotification(e,l,[],{deviceName:"测试设备",deviceType:"system",isReadOnly:!1},i),r=(o==null?void 0:o.eventId)||`msg-${Date.now()}`;if(this.sentMessages.push({id:r,notificationId:i,message:e,isUrgent:l,timestamp:new Date().toISOString(),receipts:{displayed:[],read:[]}}),c)try{const p="notification-list",g=await N.loadData(p);let n=[];g&&Array.isArray(g)?n=g:g&&g.success!==!1&&Array.isArray(g.data)&&(n=g.data);const d={id:i,message:e,isUrgent:l,timestamp:new Date().toISOString()};n.unshift(d),await N.saveData(p,n),this.persistentNotifications=n,console.log("常驻通知已保存")}catch(p){console.error("保存常驻通知失败",p)}console.log("通知已发送,事件ID:",r,"通知ID:",i),this.resetForm()}catch(i){console.error("发送通知失败:",i)}finally{this.sending=!1}}},resetForm(){this.notificationForm={isUrgent:!1,message:"",isPersistent:!1}},close(){this.dialog=!1},setupEventListeners(){const i=S("notification-displayed",l=>{console.log("收到显示回执:",l),this.updateReceipt(l,"displayed")}),e=S("notification-read",l=>{console.log("收到已读回执:",l),this.updateReceipt(l,"read")});this.receiptCleanup.push(i,e)},updateReceipt(i,e){var r,p,g,n,d;const l=i.originalEventId,c=i.notificationId||((r=i.content)==null?void 0:r.notificationId);if(!l&&!c)return;const o=this.sentMessages.find(C=>C.id===l||C.notificationId===c);if(o){const C={senderId:i.senderId||"unknown-sender",deviceName:((p=i.senderInfo)==null?void 0:p.deviceName)||((g=i.deviceInfo)==null?void 0:g.deviceName)||"未知设备",deviceType:((n=i.senderInfo)==null?void 0:n.deviceType)||((d=i.deviceInfo)==null?void 0:d.deviceType)||"unknown",timestamp:new Date().toISOString()};o.receipts[e].find(B=>B.senderId===C.senderId)||(o.receipts[e].push(C),console.log(`更新${e}回执:`,o.id,C))}},cleanup(){this.receiptCleanup.forEach(i=>i()),this.receiptCleanup=[]},formatTime(i){return new Date(i).toLocaleString("zh-CN")},getReceiptStatus(i){return i.read.length>0?"已读":i.displayed.length>0?"已显示":"已发送"},getReceiptColor(i){return i.read.length>0?"success":i.displayed.length>0?"info":"grey"},formatDeviceTime(i){return new Date(i).toLocaleTimeString("zh-CN")},getMainCardColor(i){return i.read.length>0?"success":i.displayed.length>0?"info":"grey"},hasAnyReceipts(i){return i.read.length>0||i.displayed.length>0},getDisplayedOnlyDevices(i){const e=i.read.map(l=>l.senderId);return i.displayed.filter(l=>!e.includes(l.senderId))},openEditDialog(i){this.editForm={id:i.id,message:i.message,isUrgent:i.isUrgent||!1,resend:!1,timestamp:i.timestamp},this.editDialog=!0},async saveEdit(){var i,e;if(this.editForm.message.trim()){this.savingEdit=!0;try{const l=this.persistentNotifications.findIndex(c=>c.id===this.editForm.id);if(l!==-1){if(this.persistentNotifications[l]={...this.persistentNotifications[l],message:this.editForm.message,isUrgent:this.editForm.isUrgent,timestamp:new Date().toISOString()},await N.saveData("notification-list",this.persistentNotifications),this.editForm.resend){const c=this.editForm.id,o=this.editForm.message,r=this.editForm.isUrgent,p=await this.$refs.eventSender.sendNotification(o,r,[],{deviceName:"测试设备",deviceType:"system",isReadOnly:!1},c),g=(p==null?void 0:p.eventId)||`msg-${Date.now()}`;this.sentMessages.push({id:g,notificationId:c,message:o,isUrgent:r,timestamp:new Date().toISOString(),receipts:{displayed:[],read:[]}})}this.editDialog=!1,(i=this.$message)==null||i.success("已更新")}}catch(l){console.error("保存失败",l),(e=this.$message)==null||e.error("保存失败")}finally{this.savingEdit=!1}}},async loadPersistentNotifications(){try{const i=await N.loadData("notification-list");i&&Array.isArray(i)?this.persistentNotifications=i:i&&i.success!==!1&&Array.isArray(i.data)?this.persistentNotifications=i.data:this.persistentNotifications=[]}catch(i){console.error("加载常驻通知失败",i)}},async deleteNotification(i){if(confirm("确定要删除这个通知吗?"))try{this.sentMessages=this.sentMessages.filter(l=>l.id!==i),this.persistentNotifications=this.persistentNotifications.filter(l=>l.id!==i),console.log("通知已删除,通知ID:",i)}catch(l){console.error("删除通知失败:",l)}},deletePersistentNotification(i){this.itemToDelete=i,this.deleteConfirmDialog=!0},async executeDelete(){var e,l;if(!this.itemToDelete)return;const i=this.itemToDelete;this.deleteConfirmDialog=!1,this.itemToDelete=null;try{this.persistentNotifications=this.persistentNotifications.filter(o=>o.id!==i);const c=this.persistentNotifications.length>0?this.persistentNotifications:{};await N.saveData("notification-list",c),(e=this.$message)==null||e.success("已删除")}catch(c){console.error("删除失败",c),(l=this.$message)==null||l.error("删除失败")}}}},Y={key:0,class:"text-center text-grey py-4"},Z={key:0,class:"text-center text-grey py-8"},G={class:"d-flex align-center mb-2"},H={class:"font-weight-medium"},J={class:"text-caption font-weight-medium"},Q={class:"text-body-2 mb-3",style:{"max-height":"60px",overflow:"hidden"}},$={class:"text-caption"},ee={key:0},te={class:"align-center"},ie={class:"text-body-2 font-weight-medium"},se={class:"text-caption mt-1"},ne={class:"align-center"},oe={class:"text-body-2 font-weight-medium"},le={class:"text-caption text-grey"},re={class:"text-caption text-grey mt-1"},ae={key:1};function de(i,e,l,c,o,r){const p=L,g=O;return f(),D(b,{modelValue:r.dialog,"onUpdate:modelValue":e[11]||(e[11]=n=>r.dialog=n),fullscreen:"",transition:"dialog-bottom-transition",scrollable:""},{default:s(()=>[t(h,null,{default:s(()=>[t(E,{dark:"",flat:""},{default:s(()=>[t(A,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[12]||(e[12]=[a(" mdi-chat ",-1)])]),_:1}),e[13]||(e[13]=a(" 发送通知 ",-1))]),_:1}),t(V),t(v,{icon:"mdi-close",onClick:r.close},null,8,["onClick"])]),_:1}),t(y,{class:"pa-0"},{default:s(()=>[t(K,null,{default:s(()=>[t(F,null,{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(y,null,{default:s(()=>[t(M,null,{default:s(()=>[t(F,null,{default:s(()=>[t(x,{cols:"12",md:"6"},{default:s(()=>[t(P,{modelValue:o.notificationForm.isUrgent,"onUpdate:modelValue":e[0]||(e[0]=n=>o.notificationForm.isUrgent=n),label:"强调通知",color:"red",inset:""},null,8,["modelValue"]),t(R,{modelValue:o.notificationForm.isPersistent,"onUpdate:modelValue":e[1]||(e[1]=n=>o.notificationForm.isPersistent=n),label:"常驻展示",color:"primary","hide-details":"",class:"mt-0"},null,8,["modelValue"])]),_:1}),t(x,{cols:"12"},{default:s(()=>[t(z,{modelValue:o.notificationForm.message,"onUpdate:modelValue":e[2]||(e[2]=n=>o.notificationForm.message=n),label:"通知内容",outlined:"",rows:"3",placeholder:"请输入强调通知的内容..."},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),t(w,{class:"px-6 pb-6"},{default:s(()=>[t(v,{color:o.notificationForm.isUrgent?"red":"blue",disabled:!o.notificationForm.message.trim(),loading:o.sending,size:"large",variant:"elevated",onClick:r.sendNotification},{default:s(()=>[t(I,{left:""},{default:s(()=>[a(u(o.notificationForm.isUrgent?"mdi-alert-circle":"mdi-information"),1)]),_:1}),a(" "+u(o.notificationForm.isUrgent?"发送强调通知":"发送通知"),1)]),_:1},8,["color","disabled","loading","onClick"]),t(V)]),_:1})]),_:1})]),_:1})]),_:1}),t(F,{class:"mt-4"},{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[14]||(e[14]=[a(" mdi-pin ",-1)])]),_:1}),e[15]||(e[15]=a(" 常驻通知管理 ",-1))]),_:1}),t(y,null,{default:s(()=>[o.persistentNotifications.length===0?(f(),_("div",Y," 暂无常驻通知 ")):(f(),D(j,{key:1},{default:s(()=>[(f(!0),_(U,null,k(o.persistentNotifications,n=>(f(),D(q,{key:n.id,title:n.message,subtitle:r.formatTime(n.timestamp),lines:"two"},{prepend:s(()=>[t(I,{color:n.isUrgent?"error":"primary"},{default:s(()=>[a(u(n.isUrgent?"mdi-alert-circle":"mdi-information"),1)]),_:2},1032,["color"])]),append:s(()=>[t(v,{icon:"mdi-pencil",variant:"text",size:"small",onClick:d=>r.openEditDialog(n)},null,8,["onClick"]),t(v,{icon:"mdi-delete",variant:"text",color:"error",size:"small",onClick:d=>r.deletePersistentNotification(n.id)},null,8,["onClick"])]),_:2},1032,["title","subtitle"]))),128))]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1}),t(F,{class:"mt-4"},{default:s(()=>[t(x,{cols:"12"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,null,{default:s(()=>[t(I,{class:"mr-2"},{default:s(()=>[...e[16]||(e[16]=[a(" mdi-history ",-1)])]),_:1}),e[17]||(e[17]=a(" 消息记录 ",-1)),t(V)]),_:1}),t(y,null,{default:s(()=>[o.sentMessages.length===0?(f(),_("div",Z,[t(I,{size:"64",color:"grey-lighten-2"},{default:s(()=>[...e[18]||(e[18]=[a(" mdi-message-outline ",-1)])]),_:1}),e[19]||(e[19]=m("div",{class:"mt-2"}," 暂无发送记录 ",-1))])):(f(),D(F,{key:1},{default:s(()=>[(f(!0),_(U,null,k(o.sentMessages.slice().reverse(),n=>(f(),D(x,{key:n.id,cols:"12",md:"6",lg:"4"},{default:s(()=>[t(h,{color:r.getMainCardColor(n.receipts),class:"mb-2"},{default:s(()=>[t(y,null,{default:s(()=>[m("div",G,[m("span",H,u(n.isUrgent?"强调通知":"通知"),1),t(V),m("span",J,u(r.getReceiptStatus(n.receipts)),1)]),m("div",Q,u(n.message),1),m("div",$,[m("div",null,"发送时间:"+u(r.formatTime(n.timestamp)),1),m("div",null,"事件ID:"+u(n.id),1),m("div",null,"通知ID:"+u(n.notificationId),1)])]),_:2},1024)]),_:2},1032,["color"]),r.hasAnyReceipts(n.receipts)?(f(),_("div",ee,[(f(!0),_(U,null,k(n.receipts.read,d=>(f(),D(h,{key:`${d.senderId}-read`,color:"success",class:"mb-1",size:"small"},{default:s(()=>[t(y,{class:"pa-2"},{default:s(()=>[m("div",te,[m("span",ie,u(d.deviceName),1),e[20]||(e[20]=m("br",null,null,-1)),a(" "+u(d.deviceType),1)]),m("div",se," 已读于 "+u(r.formatDeviceTime(d.timestamp)),1)]),_:2},1024)]),_:2},1024))),128)),(f(!0),_(U,null,k(r.getDisplayedOnlyDevices(n.receipts),d=>(f(),D(h,{key:`${d.senderId}-displayed`,color:"info-lighten-4",variant:"outlined",class:"mb-1",size:"small"},{default:s(()=>[t(y,{class:"pa-2"},{default:s(()=>[m("div",ne,[m("span",oe,u(d.deviceName),1),t(V),m("span",le,u(d.deviceType=="classroom"?"教室设备上的应用":d.deviceType),1)]),m("div",re," 已显示于 "+u(r.formatDeviceTime(d.timestamp)),1)]),_:2},1024)]),_:2},1024))),128))])):(f(),_("div",ae,[t(h,{color:"info-lighten-4",variant:"outlined",class:"mb-1",size:"small",title:"无设备在线"},{default:s(()=>[t(y,null,{default:s(()=>[...e[21]||(e[21]=[a(" 如果数秒后任然显示这个提示,则可能没有任何设备在线接收通知。 ",-1)])]),_:1})]),_:1})]))]),_:2},1024))),128))]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(p),t(g,{ref:"eventSender"},null,512),t(b,{modelValue:o.editDialog,"onUpdate:modelValue":e[8]||(e[8]=n=>o.editDialog=n),"max-width":"500",fullscreen:i.$vuetify.display.xs},{default:s(()=>[t(h,null,{default:s(()=>[t(E,{flat:"",density:"compact"},{default:s(()=>[t(A,null,{default:s(()=>[...e[22]||(e[22]=[a("编辑常驻通知",-1)])]),_:1}),t(V),t(v,{icon:"mdi-close",onClick:e[3]||(e[3]=n=>o.editDialog=!1)})]),_:1}),t(y,null,{default:s(()=>[t(M,null,{default:s(()=>[t(z,{modelValue:o.editForm.message,"onUpdate:modelValue":e[4]||(e[4]=n=>o.editForm.message=n),label:"通知内容",rows:"3","auto-grow":""},null,8,["modelValue"]),t(P,{modelValue:o.editForm.isUrgent,"onUpdate:modelValue":e[5]||(e[5]=n=>o.editForm.isUrgent=n),label:"强调通知",color:"error","hide-details":""},null,8,["modelValue"]),t(R,{modelValue:o.editForm.resend,"onUpdate:modelValue":e[6]||(e[6]=n=>o.editForm.resend=n),label:"保存并重新发送通知",hint:"勾选后将作为新通知发送给所有在线设备","persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),t(w,null,{default:s(()=>[t(V),t(v,{variant:"text",onClick:e[7]||(e[7]=n=>o.editDialog=!1)},{default:s(()=>[...e[23]||(e[23]=[a(" 取消 ",-1)])]),_:1}),t(v,{color:"primary",loading:o.savingEdit,onClick:r.saveEdit},{default:s(()=>[...e[24]||(e[24]=[a(" 保存 ",-1)])]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","fullscreen"]),t(b,{modelValue:o.deleteConfirmDialog,"onUpdate:modelValue":e[10]||(e[10]=n=>o.deleteConfirmDialog=n),"max-width":"400"},{default:s(()=>[t(h,null,{default:s(()=>[t(T,{class:"text-h5"},{default:s(()=>[...e[25]||(e[25]=[a(" 确认删除 ",-1)])]),_:1}),t(y,null,{default:s(()=>[...e[26]||(e[26]=[a("确定要删除这条常驻通知吗?此操作无法撤销。",-1)])]),_:1}),t(w,null,{default:s(()=>[t(V),t(v,{color:"grey-darken-1",variant:"text",onClick:e[9]||(e[9]=n=>o.deleteConfirmDialog=!1)},{default:s(()=>[...e[27]||(e[27]=[a(" 取消 ",-1)])]),_:1}),t(v,{color:"error",variant:"text",onClick:r.executeDelete},{default:s(()=>[...e[28]||(e[28]=[a(" 删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}const Ae=W(X,[["render",de],["__scopeId","data-v-128c728f"]]);export{Ae as default}; diff --git a/assets/VAlert-DaoJAibO.js b/assets/VAlert-BZ4-f-hy.js similarity index 94% rename from assets/VAlert-DaoJAibO.js rename to assets/VAlert-BZ4-f-hy.js index 3cb7756..e887600 100644 --- a/assets/VAlert-DaoJAibO.js +++ b/assets/VAlert-BZ4-f-hy.js @@ -1 +1 @@ -import{aa as R,p as P,f as j,n as w,h as F,an as O,I as p,m as E,k as H}from"./vendor-vuetify-95axeNJO.js";import{aj as K,K as q,O as G,ak as J,N as Q,H as U,al as W,f as X,ag as y,h as Y,b as Z,a2 as ee,am as ae,m as te,R as le,an as ne,T as oe,$ as se,a as ie,M as re}from"./index-CzpSlHRw.js";import{e as ce,j as l,k as o,N as f,n as k,m as S,t as b}from"./vendor-vue-28M5UGz3.js";const ue=R("v-alert-title"),de=P({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function me(e,s){return{iconSize:ce(()=>{const a=new Map(e.iconSizes),t=e.iconSize??s()??"default";return a.has(t)?a.get(t):t})}}const ve=["success","info","warning","error"],ye=P({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:p,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>ve.includes(e)},...H(),...re(),...ie(),...se(),...de(),...oe(),...ne(),...le(),...te(),...E(),...ae({variant:"flat"})},"VAlert"),be=j()({name:"VAlert",props:ye(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,s){let{emit:c,slots:a}=s;const t=w(e,"modelValue"),i=b(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:V}=me(e,()=>e.prominent?44:void 0),{themeClasses:g}=F(e),{colorClasses:z,colorStyles:C,variantClasses:x}=K(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:_}=q(e),{dimensionStyles:h}=Z(e),{elevationClasses:I}=ee(e),{locationStyles:B}=G(e),{positionClasses:T}=J(e),{roundedClasses:A}=Q(e),{textColorClasses:$,textColorStyles:D}=U(()=>e.borderColor),{t:L}=O(),u=b(()=>({"aria-label":L(e.closeLabel),onClick(r){t.value=!1,c("click:close",r)}}));return()=>{const r=!!(a.prepend||i.value),N=!!(a.title||e.title),M=!!(a.close||e.closable),d={density:e.density,icon:i.value,size:e.iconSize||e.prominent?V.value:void 0};return t.value&&l(e.tag,{class:k(["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},g.value,z.value,_.value,I.value,T.value,A.value,x.value,e.class]),style:f([C.value,h.value,B.value,e.style]),role:"alert"},{default:()=>{var m,v;return[W(!1,"v-alert"),e.border&&o("div",{key:"border",class:k(["v-alert__border",$.value]),style:f(D.value)},null),r&&o("div",{key:"prepend",class:"v-alert__prepend"},[a.prepend?l(y,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...d}}},a.prepend):l(X,S({key:"prepend-icon"},d),null)]),o("div",{class:"v-alert__content"},[N&&l(ue,{key:"title"},{default:()=>{var n;return[((n=a.title)==null?void 0:n.call(a))??e.title]}}),((m=a.text)==null?void 0:m.call(a))??e.text,(v=a.default)==null?void 0:v.call(a)]),a.append&&o("div",{key:"append",class:"v-alert__append"},[a.append()]),M&&o("div",{key:"close",class:"v-alert__close"},[a.close?l(y,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var n;return[(n=a.close)==null?void 0:n.call(a,{props:u.value})]}}):l(Y,S({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},u.value),null)])]}})}}});export{be as V,ue as a}; +import{aa as R,p as P,f as j,n as w,h as F,an as O,I as p,m as E,k as H}from"./vendor-vuetify-DsKlzgKp.js";import{aj as K,K as q,O as G,ak as J,N as Q,H as U,al as W,f as X,ag as y,h as Y,b as Z,a2 as ee,am as ae,m as te,R as le,an as ne,T as oe,$ as se,a as ie,M as re}from"./index-DGIAsv4W.js";import{e as ce,j as l,k as o,N as f,n as k,m as S,t as b}from"./vendor-vue-BiQC5iF7.js";const ue=R("v-alert-title"),de=P({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function me(e,s){return{iconSize:ce(()=>{const a=new Map(e.iconSizes),t=e.iconSize??s()??"default";return a.has(t)?a.get(t):t})}}const ve=["success","info","warning","error"],ye=P({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:p,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>ve.includes(e)},...H(),...re(),...ie(),...se(),...de(),...oe(),...ne(),...le(),...te(),...E(),...ae({variant:"flat"})},"VAlert"),be=j()({name:"VAlert",props:ye(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,s){let{emit:c,slots:a}=s;const t=w(e,"modelValue"),i=b(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:V}=me(e,()=>e.prominent?44:void 0),{themeClasses:g}=F(e),{colorClasses:z,colorStyles:C,variantClasses:x}=K(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:_}=q(e),{dimensionStyles:h}=Z(e),{elevationClasses:I}=ee(e),{locationStyles:B}=G(e),{positionClasses:T}=J(e),{roundedClasses:A}=Q(e),{textColorClasses:$,textColorStyles:D}=U(()=>e.borderColor),{t:L}=O(),u=b(()=>({"aria-label":L(e.closeLabel),onClick(r){t.value=!1,c("click:close",r)}}));return()=>{const r=!!(a.prepend||i.value),N=!!(a.title||e.title),M=!!(a.close||e.closable),d={density:e.density,icon:i.value,size:e.iconSize||e.prominent?V.value:void 0};return t.value&&l(e.tag,{class:k(["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},g.value,z.value,_.value,I.value,T.value,A.value,x.value,e.class]),style:f([C.value,h.value,B.value,e.style]),role:"alert"},{default:()=>{var m,v;return[W(!1,"v-alert"),e.border&&o("div",{key:"border",class:k(["v-alert__border",$.value]),style:f(D.value)},null),r&&o("div",{key:"prepend",class:"v-alert__prepend"},[a.prepend?l(y,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...d}}},a.prepend):l(X,S({key:"prepend-icon"},d),null)]),o("div",{class:"v-alert__content"},[N&&l(ue,{key:"title"},{default:()=>{var n;return[((n=a.title)==null?void 0:n.call(a))??e.title]}}),((m=a.text)==null?void 0:m.call(a))??e.text,(v=a.default)==null?void 0:v.call(a)]),a.append&&o("div",{key:"append",class:"v-alert__append"},[a.append()]),M&&o("div",{key:"close",class:"v-alert__close"},[a.close?l(y,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var n;return[(n=a.close)==null?void 0:n.call(a,{props:u.value})]}}):l(Y,S({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},u.value),null)])]}})}}});export{be as V,ue as a}; diff --git a/assets/VAppBarTitle-C1UGCJHo.js b/assets/VAppBarTitle-DheyIZnb.js similarity index 97% rename from assets/VAppBarTitle-C1UGCJHo.js rename to assets/VAppBarTitle-DheyIZnb.js index 73fcf82..4470203 100644 --- a/assets/VAppBarTitle-C1UGCJHo.js +++ b/assets/VAppBarTitle-DheyIZnb.js @@ -1 +1 @@ -import{m as U,I as K,af as Q,O as X,N as Z,C as ee,ag as D,a5 as te,a2 as ae,R as le,T as oe,$ as ne,ah as se,u as ie}from"./index-CzpSlHRw.js";import{f as N,u as A,p as R,k as M,h as re,A as ue,j as ce,s as E,m as ve,z as de,n as me,C as ge,aC as he,a5 as W,aD as fe}from"./vendor-vuetify-95axeNJO.js";import{j as f,k as P,N as $,n as j,s as h,e as d,o as I,D as be,A as ye,b as q,w as Se,m as F,t as L}from"./vendor-vue-28M5UGz3.js";const O=R({text:String,...M(),...U()},"VToolbarTitle"),J=N()({name:"VToolbarTitle",props:O(),setup(e,b){let{slots:t}=b;return A(()=>{const u=!!(t.default||t.text||e.text);return f(e.tag,{class:j(["v-toolbar-title",e.class]),style:$(e.style)},{default:()=>{var n;return[u&&P("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():e.text,(n=t.default)==null?void 0:n.call(t)])]}})}),{}}}),Te=[null,"prominent","default","comfortable","compact"],Y=R({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>Te.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...se(),...M(),...ne(),...oe(),...le(),...U({tag:"header"}),...ve()},"VToolbar"),z=N()({name:"VToolbar",props:Y(),setup(e,b){var B;let{slots:t}=b;const{backgroundColorClasses:u,backgroundColorStyles:n}=K(()=>e.color),{borderClasses:o}=Q(e),{elevationClasses:m}=ae(e),{locationStyles:s}=X(e),{roundedClasses:c}=Z(e),{themeClasses:H}=re(e),{rtlClasses:k}=ue(),r=h(e.extended===null?!!((B=t.extension)!=null&&B.call(t)):e.extended),x=d(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),y=d(()=>r.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return ce({VBtn:{variant:"text"}}),A(()=>{var V;const v=!!(e.title||t.title),C=!!(t.image||e.image),p=(V=t.extension)==null?void 0:V.call(t);return r.value=e.extended===null?!!p:e.extended,f(e.tag,{class:j(["v-toolbar",`v-toolbar--collapse-${e.collapsePosition}`,{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},u.value,o.value,m.value,c.value,H.value,k.value,e.class]),style:$([n.value,s.value,e.style])},{default:()=>[C&&P("div",{key:"image",class:"v-toolbar__image"},[t.image?f(D,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},t.image):f(ee,{key:"image-img",cover:!0,src:e.image},null)]),f(D,{defaults:{VTabs:{height:E(x.value)}}},{default:()=>{var w,S,l;return[P("div",{class:"v-toolbar__content",style:{height:E(x.value)}},[t.prepend&&P("div",{class:"v-toolbar__prepend"},[(w=t.prepend)==null?void 0:w.call(t)]),v&&f(J,{key:"title",text:e.title},{text:t.title}),(S=t.default)==null?void 0:S.call(t),t.append&&P("div",{class:"v-toolbar__append"},[(l=t.append)==null?void 0:l.call(t)])])]}}),f(D,{defaults:{VTabs:{height:E(y.value)}}},{default:()=>[f(te,null,{default:()=>[r.value&&P("div",{class:"v-toolbar__extension",style:{height:E(y.value)}},[p])]})]})]})}),{contentHeight:x,extensionHeight:y}}}),He=R({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function xe(e){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:t,layoutSize:u}=b;let n=0,o=0;const m=q(null),s=h(0),c=h(0),H=h(0),k=h(!1),r=h(!1),x=h(!1),y=h(!1),B=h(!0),v=d(()=>Number(e.scrollThreshold)),C=d(()=>de((v.value-s.value)/v.value||0));function p(l){const a="window"in l?window.innerHeight:l.clientHeight,i="window"in l?document.documentElement.scrollHeight:l.scrollHeight;return{clientHeight:a,scrollHeight:i}}function V(){const l=m.value;if(!l)return;const{clientHeight:a,scrollHeight:i}=p(l),T=i-a,g=(u==null?void 0:u.value)||0,_=v.value+g;B.value=T>_}function w(){V()}function S(){const l=m.value;if(!l||t&&!t.value)return;n=s.value,s.value="window"in l?l.pageYOffset:l.scrollTop;const a=l instanceof Window?document.documentElement.scrollHeight:l.scrollHeight;o!==a&&(a>o&&V(),o=a),r.value=s.value=T-5;!r.value&&g&&s.value>=v.value&&B.value&&(y.value=!0);const _=Math.abs(s.value-n)>100,G=s.value<=5;(r.value&&n-s.value>1&&!g||_&&s.value{c.value=c.value||s.value}),I(k,()=>{c.value=0}),be(()=>{I(()=>e.scrollTarget,l=>{var i;const a=l?document.querySelector(l):window;a&&a!==m.value&&((i=m.value)==null||i.removeEventListener("scroll",S),m.value=a,m.value.addEventListener("scroll",S,{passive:!0}),Promise.resolve().then(()=>{V()}))},{immediate:!0}),window.addEventListener("resize",w,{passive:!0})}),ye(()=>{var l;(l=m.value)==null||l.removeEventListener("scroll",S),window.removeEventListener("resize",w)}),t&&I(t,S,{immediate:!0}),{scrollThreshold:v,currentScroll:s,currentThreshold:H,isScrollActive:k,scrollRatio:C,isScrollingUp:r,savedScroll:c,isAtBottom:x,reachedBottomWhileScrollingDown:y,hasEnoughScrollableSpace:B}}const Be=R({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...W(Y(),["location"]),...fe(),...He(),height:{type:[Number,String],default:64}},"VAppBar"),Pe=N()({name:"VAppBar",props:Be(),emits:{"update:modelValue":e=>!0},setup(e,b){let{slots:t}=b;const u=q(),n=me(e,"modelValue"),o=d(()=>{var i;const a=new Set(((i=e.scrollBehavior)==null?void 0:i.split(" "))??[]);return{hide:a.has("hide"),fullyHide:a.has("fully-hide"),inverted:a.has("inverted"),collapse:a.has("collapse"),elevate:a.has("elevate"),fadeImage:a.has("fade-image")}}),m=d(()=>{const a=o.value;return a.hide||a.fullyHide||a.inverted||a.collapse||a.elevate||a.fadeImage||!n.value}),s=d(()=>{var T,g;const a=((T=u.value)==null?void 0:T.contentHeight)??0,i=((g=u.value)==null?void 0:g.extensionHeight)??0;return a+i}),{currentScroll:c,scrollThreshold:H,isScrollingUp:k,scrollRatio:r,isAtBottom:x,reachedBottomWhileScrollingDown:y,hasEnoughScrollableSpace:B}=xe(e,{canScroll:m,layoutSize:s}),v=L(()=>o.value.hide||o.value.fullyHide),C=d(()=>e.collapse||o.value.collapse&&(o.value.inverted?r.value>0:r.value===0)),p=d(()=>e.flat||o.value.fullyHide&&!n.value||o.value.elevate&&(o.value.inverted?c.value>0:c.value===0)),V=d(()=>o.value.fadeImage?o.value.inverted?1-r.value:r.value:void 0),w=d(()=>{var T,g;if(o.value.hide&&o.value.inverted)return 0;const a=((T=u.value)==null?void 0:T.contentHeight)??0,i=((g=u.value)==null?void 0:g.extensionHeight)??0;return v.value?c.value!!e.scrollBehavior,()=>{Se(()=>{if(!v.value){n.value=!0;return}if(o.value.inverted){n.value=c.value>H.value;return}if(!B.value){n.value=!0;return}if(y.value){n.value=!1;return}n.value=k.value&&!x.value||c.valueparseInt(e.order,10)),position:L(()=>e.location),layoutSize:w,elementSize:h(void 0),active:n,absolute:L(()=>e.absolute)});return A(()=>{const a=W(z.filterProps(e),["location"]);return f(z,F({ref:u,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...l.value,"--v-toolbar-image-opacity":V.value,height:void 0,...S.value},e.style]},a,{collapse:C.value,flat:p.value}),t)}),{}}}),Ce=N()({name:"VAppBarTitle",props:O(),setup(e,b){let{slots:t}=b;return A(()=>f(J,F(e,{class:"v-app-bar-title"}),t)),{}}});export{Ce as V,Pe as a,z as b,J as c}; +import{m as U,I as K,af as Q,O as X,N as Z,C as ee,ag as D,a5 as te,a2 as ae,R as le,T as oe,$ as ne,ah as se,u as ie}from"./index-DGIAsv4W.js";import{f as N,u as A,p as R,k as M,h as re,A as ue,j as ce,s as E,m as ve,z as de,n as me,C as ge,aC as he,a5 as W,aD as fe}from"./vendor-vuetify-DsKlzgKp.js";import{j as f,k as P,N as $,n as j,s as h,e as d,o as I,D as be,A as ye,b as q,w as Se,m as F,t as L}from"./vendor-vue-BiQC5iF7.js";const O=R({text:String,...M(),...U()},"VToolbarTitle"),J=N()({name:"VToolbarTitle",props:O(),setup(e,b){let{slots:t}=b;return A(()=>{const u=!!(t.default||t.text||e.text);return f(e.tag,{class:j(["v-toolbar-title",e.class]),style:$(e.style)},{default:()=>{var n;return[u&&P("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():e.text,(n=t.default)==null?void 0:n.call(t)])]}})}),{}}}),Te=[null,"prominent","default","comfortable","compact"],Y=R({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>Te.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...se(),...M(),...ne(),...oe(),...le(),...U({tag:"header"}),...ve()},"VToolbar"),z=N()({name:"VToolbar",props:Y(),setup(e,b){var B;let{slots:t}=b;const{backgroundColorClasses:u,backgroundColorStyles:n}=K(()=>e.color),{borderClasses:o}=Q(e),{elevationClasses:m}=ae(e),{locationStyles:s}=X(e),{roundedClasses:c}=Z(e),{themeClasses:H}=re(e),{rtlClasses:k}=ue(),r=h(e.extended===null?!!((B=t.extension)!=null&&B.call(t)):e.extended),x=d(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),y=d(()=>r.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return ce({VBtn:{variant:"text"}}),A(()=>{var V;const v=!!(e.title||t.title),C=!!(t.image||e.image),p=(V=t.extension)==null?void 0:V.call(t);return r.value=e.extended===null?!!p:e.extended,f(e.tag,{class:j(["v-toolbar",`v-toolbar--collapse-${e.collapsePosition}`,{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},u.value,o.value,m.value,c.value,H.value,k.value,e.class]),style:$([n.value,s.value,e.style])},{default:()=>[C&&P("div",{key:"image",class:"v-toolbar__image"},[t.image?f(D,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},t.image):f(ee,{key:"image-img",cover:!0,src:e.image},null)]),f(D,{defaults:{VTabs:{height:E(x.value)}}},{default:()=>{var w,S,l;return[P("div",{class:"v-toolbar__content",style:{height:E(x.value)}},[t.prepend&&P("div",{class:"v-toolbar__prepend"},[(w=t.prepend)==null?void 0:w.call(t)]),v&&f(J,{key:"title",text:e.title},{text:t.title}),(S=t.default)==null?void 0:S.call(t),t.append&&P("div",{class:"v-toolbar__append"},[(l=t.append)==null?void 0:l.call(t)])])]}}),f(D,{defaults:{VTabs:{height:E(y.value)}}},{default:()=>[f(te,null,{default:()=>[r.value&&P("div",{class:"v-toolbar__extension",style:{height:E(y.value)}},[p])]})]})]})}),{contentHeight:x,extensionHeight:y}}}),He=R({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function xe(e){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:t,layoutSize:u}=b;let n=0,o=0;const m=q(null),s=h(0),c=h(0),H=h(0),k=h(!1),r=h(!1),x=h(!1),y=h(!1),B=h(!0),v=d(()=>Number(e.scrollThreshold)),C=d(()=>de((v.value-s.value)/v.value||0));function p(l){const a="window"in l?window.innerHeight:l.clientHeight,i="window"in l?document.documentElement.scrollHeight:l.scrollHeight;return{clientHeight:a,scrollHeight:i}}function V(){const l=m.value;if(!l)return;const{clientHeight:a,scrollHeight:i}=p(l),T=i-a,g=(u==null?void 0:u.value)||0,_=v.value+g;B.value=T>_}function w(){V()}function S(){const l=m.value;if(!l||t&&!t.value)return;n=s.value,s.value="window"in l?l.pageYOffset:l.scrollTop;const a=l instanceof Window?document.documentElement.scrollHeight:l.scrollHeight;o!==a&&(a>o&&V(),o=a),r.value=s.value=T-5;!r.value&&g&&s.value>=v.value&&B.value&&(y.value=!0);const _=Math.abs(s.value-n)>100,G=s.value<=5;(r.value&&n-s.value>1&&!g||_&&s.value{c.value=c.value||s.value}),I(k,()=>{c.value=0}),be(()=>{I(()=>e.scrollTarget,l=>{var i;const a=l?document.querySelector(l):window;a&&a!==m.value&&((i=m.value)==null||i.removeEventListener("scroll",S),m.value=a,m.value.addEventListener("scroll",S,{passive:!0}),Promise.resolve().then(()=>{V()}))},{immediate:!0}),window.addEventListener("resize",w,{passive:!0})}),ye(()=>{var l;(l=m.value)==null||l.removeEventListener("scroll",S),window.removeEventListener("resize",w)}),t&&I(t,S,{immediate:!0}),{scrollThreshold:v,currentScroll:s,currentThreshold:H,isScrollActive:k,scrollRatio:C,isScrollingUp:r,savedScroll:c,isAtBottom:x,reachedBottomWhileScrollingDown:y,hasEnoughScrollableSpace:B}}const Be=R({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...W(Y(),["location"]),...fe(),...He(),height:{type:[Number,String],default:64}},"VAppBar"),Pe=N()({name:"VAppBar",props:Be(),emits:{"update:modelValue":e=>!0},setup(e,b){let{slots:t}=b;const u=q(),n=me(e,"modelValue"),o=d(()=>{var i;const a=new Set(((i=e.scrollBehavior)==null?void 0:i.split(" "))??[]);return{hide:a.has("hide"),fullyHide:a.has("fully-hide"),inverted:a.has("inverted"),collapse:a.has("collapse"),elevate:a.has("elevate"),fadeImage:a.has("fade-image")}}),m=d(()=>{const a=o.value;return a.hide||a.fullyHide||a.inverted||a.collapse||a.elevate||a.fadeImage||!n.value}),s=d(()=>{var T,g;const a=((T=u.value)==null?void 0:T.contentHeight)??0,i=((g=u.value)==null?void 0:g.extensionHeight)??0;return a+i}),{currentScroll:c,scrollThreshold:H,isScrollingUp:k,scrollRatio:r,isAtBottom:x,reachedBottomWhileScrollingDown:y,hasEnoughScrollableSpace:B}=xe(e,{canScroll:m,layoutSize:s}),v=L(()=>o.value.hide||o.value.fullyHide),C=d(()=>e.collapse||o.value.collapse&&(o.value.inverted?r.value>0:r.value===0)),p=d(()=>e.flat||o.value.fullyHide&&!n.value||o.value.elevate&&(o.value.inverted?c.value>0:c.value===0)),V=d(()=>o.value.fadeImage?o.value.inverted?1-r.value:r.value:void 0),w=d(()=>{var T,g;if(o.value.hide&&o.value.inverted)return 0;const a=((T=u.value)==null?void 0:T.contentHeight)??0,i=((g=u.value)==null?void 0:g.extensionHeight)??0;return v.value?c.value!!e.scrollBehavior,()=>{Se(()=>{if(!v.value){n.value=!0;return}if(o.value.inverted){n.value=c.value>H.value;return}if(!B.value){n.value=!0;return}if(y.value){n.value=!1;return}n.value=k.value&&!x.value||c.valueparseInt(e.order,10)),position:L(()=>e.location),layoutSize:w,elementSize:h(void 0),active:n,absolute:L(()=>e.absolute)});return A(()=>{const a=W(z.filterProps(e),["location"]);return f(z,F({ref:u,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...l.value,"--v-toolbar-image-opacity":V.value,height:void 0,...S.value},e.style]},a,{collapse:C.value,flat:p.value}),t)}),{}}}),Ce=N()({name:"VAppBarTitle",props:O(),setup(e,b){let{slots:t}=b;return A(()=>f(J,F(e,{class:"v-app-bar-title"}),t)),{}}});export{Ce as V,Pe as a,z as b,J as c}; diff --git a/assets/VAutocomplete-D8Wr7ywO.js b/assets/VAutocomplete-N0zTUlyj.js similarity index 94% rename from assets/VAutocomplete-D8Wr7ywO.js rename to assets/VAutocomplete-N0zTUlyj.js index 32a3fb3..b3855cc 100644 --- a/assets/VAutocomplete-D8Wr7ywO.js +++ b/assets/VAutocomplete-N0zTUlyj.js @@ -1 +1 @@ -import{h as Oe,e as ze,V as te,i as Ue}from"./VTextField-BxdS2D7S.js";import{u as $e,a as qe,c as He,h as je,d as Ge,e as Je,m as We,b as Qe,f as Xe}from"./VSelect-DZBjiB3J.js";import{aB as Ye,H as Ze,f as ue,p as el,q as ne,i as ll,a6 as al,o as tl,ag as ul,E as nl}from"./index-CzpSlHRw.js";import{f as ol,an as il,n as J,w as sl,E as rl,u as cl,aI as vl,aJ as dl,aK as oe,o as fl,_ as ie,p as ml,a5 as pl}from"./vendor-vuetify-95axeNJO.js";import{V as hl,a as gl}from"./VSheet-ZjkOR-Oc.js";import{V as yl}from"./VCheckboxBtn-BLxCsxXE.js";import{V as se}from"./VChip-B3whZF-S.js";import{o as z,I as re,j as f,k as x,F as W,m as S,N as Vl,n as kl,a1 as bl,s as P,e as I,b as A,t as Cl}from"./vendor-vue-28M5UGz3.js";const Sl=ml({autoSelectFirst:{type:[Boolean,String]},clearOnSelect:Boolean,search:String,...We({filterKeys:["title"]}),...Je(),...pl(Ue({modelValue:null,role:"combobox"}),["validationValue","dirty"])},"VAutocomplete"),El=ol()({name:"VAutocomplete",props:Sl(),emits:{"update:focused":l=>!0,"update:search":l=>!0,"update:modelValue":l=>!0,"update:menu":l=>!0},setup(l,ce){let{slots:t}=ce;const{t:ve}=il(),m=A(),h=P(!1),g=P(!0),U=P(!1),_=A(),$=A(),r=P(-1),R=P(null),{items:q,transformIn:de,transformOut:fe}=Ye(l),{textColorClasses:me,textColorStyles:pe}=Ze(()=>{var e;return(e=m.value)==null?void 0:e.color}),{InputIcon:he}=Oe(l),c=J(l,"search",""),n=J(l,"modelValue",[],e=>de(e===null?[null]:sl(e)),e=>{const a=fe(e);return l.multiple?a:a[0]??null}),ge=I(()=>typeof l.counterValue=="function"?l.counterValue(n.value):typeof l.counterValue=="number"?l.counterValue:n.value.length),D=ze(l),{filteredItems:B,getMatches:ye}=$e(l,q,()=>R.value??(g.value?"":c.value)),y=I(()=>l.hideSelected&&R.value===null?B.value.filter(e=>!n.value.some(a=>a.value===e.value)):B.value),Q=Cl(()=>l.closableChips&&!D.isReadonly.value&&!D.isDisabled.value),L=I(()=>!!(l.chips||t.chip)),E=I(()=>L.value||!!t.selection),Ve=I(()=>n.value.map(e=>e.props.value)),M=I(()=>y.value.find(e=>e.type==="item"&&!e.props.disabled)),H=I(()=>{var a;return(l.autoSelectFirst===!0||l.autoSelectFirst==="exact"&&c.value===((a=M.value)==null?void 0:a.title))&&y.value.length>0&&!g.value&&!U.value}),K=I(()=>l.hideNoData&&!y.value.length||D.isReadonly.value||D.isDisabled.value),j=J(l,"menu"),v=I({get:()=>j.value,set:e=>{var a;j.value&&!e&&((a=_.value)!=null&&a.ΨopenChildren.size)||e&&K.value||(j.value=e)}}),{menuId:ke,ariaExpanded:be,ariaControls:Ce}=qe(l,v),T=A(),X=A(),Y=A(),Se=Ge(T,m),Ie=Xe(v,()=>{var e;return(e=_.value)==null?void 0:e.contentEl},()=>{var e;return(e=m.value)==null?void 0:e.controlRef}),{onTabKeydown:we}=Qe({groups:[{type:"element",contentRef:X},{type:"list",contentRef:T,displayItemsCount:()=>y.value.length},{type:"element",contentRef:Y}],onLeave:()=>{var e;v.value=!1,(e=m.value)==null||e.focus()}});function xe(e){l.openOnClear&&(v.value=!0),c.value=""}function Fe(){K.value||(v.value=!0)}function Re(e){K.value||(h.value&&(e.preventDefault(),e.stopPropagation()),v.value=!v.value)}function De(e){var a,u;e.key==="Tab"&&we(e),(a=T.value)!=null&&a.$el.contains(e.target)&&(oe(e)||e.key==="Backspace")&&((u=m.value)==null||u.focus())}function Pe(e){var V,d,w,k,o;if(D.isReadonly.value)return;const a=(V=m.value)==null?void 0:V.selectionStart,u=n.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(e.key)&&e.preventDefault(),["Enter","ArrowDown"].includes(e.key)&&(v.value=!0),["Escape"].includes(e.key)&&(v.value=!1),H.value&&["Enter","Tab"].includes(e.key)&&M.value&&!n.value.some(i=>{let{value:b}=i;return b===M.value.value})&&F(M.value),e.key==="ArrowDown"&&H.value&&((d=T.value)==null||d.focus("next")),["Backspace","Delete"].includes(e.key)){if(!l.multiple&&E.value&&n.value.length>0&&!c.value)return F(n.value[0],!1);if(~r.value){e.preventDefault();const i=r.value;F(n.value[r.value],!1),r.value=i>=u-1?u-2:i}else e.key==="Backspace"&&!c.value&&(r.value=u-1);return}if(l.multiple)if(e.key==="ArrowLeft"){if(r.value<0&&a&&a>0)return;const i=r.value>-1?r.value-1:u-1;if(n.value[i])r.value=i;else{const b=((w=c.value)==null?void 0:w.length)??null;r.value=-1,(k=m.value)==null||k.setSelectionRange(b,b)}}else if(e.key==="ArrowRight"){if(r.value<0)return;const i=r.value+1;n.value[i]?r.value=i:(r.value=-1,(o=m.value)==null||o.setSelectionRange(0,0))}else~r.value&&oe(e)&&(r.value=-1)}function Ae(e){if(ie(m.value,":autofill")||ie(m.value,":-webkit-autofill")){const a=q.value.find(u=>u.title===e.target.value);a&&F(a)}}function Ee(){var e;l.eager&&((e=$.value)==null||e.calculateVisibleItems())}function Me(){var e;h.value&&(g.value=!0,(e=m.value)==null||e.focus()),R.value=null}function Te(e){h.value=!0,setTimeout(()=>{U.value=!0})}function _e(e){var a;if(U.value=!1,!((a=m.value)!=null&&a.$el.contains(e.relatedTarget))){if(Ie(e))return;h.value=!1}}function Be(e){(e==null||e===""&&!l.multiple&&!E.value)&&(n.value=[])}function Le(e){var u;const a=(u=_.value)==null?void 0:u.contentEl;a!=null&&a.contains(e.relatedTarget)&&(h.value=!0)}const G=P(!1);function F(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!e||e.props.disabled))if(l.multiple){const u=n.value.findIndex(d=>(l.valueComparator||fl)(d.value,e.value)),V=a??!~u;if(~u){const d=V?[...n.value,e]:[...n.value];d.splice(u,1),n.value=d}else V&&(n.value=[...n.value,e]);l.clearOnSelect&&(c.value="")}else{const u=a!==!1;n.value=u?[e]:[],R.value=g.value?"":c.value??"",c.value=u&&!E.value?e.title:"",re(()=>{v.value=!1,g.value=!0})}}return z(h,(e,a)=>{var u;e!==a&&(e?(G.value=!0,c.value=l.multiple||E.value?"":String(((u=n.value.at(-1))==null?void 0:u.props.title)??""),g.value=!0,re(()=>G.value=!1)):(!l.multiple&&c.value==null&&(n.value=[]),v.value=!1,!g.value&&c.value&&(R.value=c.value),c.value="",r.value=-1))}),z(c,e=>{!h.value||G.value||(e&&(v.value=!0),g.value=!e)}),z(v,e=>{if(!l.hideSelected&&e&&n.value.length&&g.value){const a=y.value.findIndex(u=>n.value.some(V=>u.value===V.value));rl&&window.requestAnimationFrame(()=>{var u;a>=0&&((u=$.value)==null||u.scrollToIndex(a))})}e&&(R.value=null)}),z(q,(e,a)=>{v.value||h.value&&!a.length&&e.length&&(v.value=!0)}),cl(()=>{const e=!!(!l.hideNoData||y.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),a=n.value.length>0,u=te.filterProps(l),V={search:c,filteredItems:B.value};return f(te,S({ref:m},u,{modelValue:c.value,"onUpdate:modelValue":[d=>c.value=d,Be],focused:h.value,"onUpdate:focused":d=>h.value=d,validationValue:n.externalValue,counterValue:ge.value,dirty:a,onChange:Ae,class:["v-autocomplete",`v-autocomplete--${l.multiple?"multiple":"single"}`,{"v-autocomplete--active-menu":v.value,"v-autocomplete--chips":!!l.chips,"v-autocomplete--selection-slot":!!E.value,"v-autocomplete--selecting-index":r.value>-1},l.class],style:l.style,readonly:D.isReadonly.value,placeholder:a?void 0:l.placeholder,"onClick:clear":xe,"onMousedown:control":Fe,onKeydown:Pe,onBlur:Le,"aria-expanded":be.value,"aria-controls":Ce.value}),{...t,default:d=>{var k;let{id:w}=d;return x(W,null,[f(hl,S({id:ke.value,ref:_,modelValue:v.value,"onUpdate:modelValue":o=>v.value=o,activator:"parent",disabled:K.value,eager:l.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,onAfterEnter:Ee,onAfterLeave:Me},l.menuProps,{contentClass:["v-autocomplete__content",(k=l.menuProps)==null?void 0:k.contentClass]}),{default:()=>[f(gl,{onFocusin:Te,onKeydown:De},{default:()=>[t["menu-header"]&&x("header",{ref:X},[t["menu-header"](V)]),e&&f(el,S({key:"autocomplete-list",ref:T,filterable:!0,selected:Ve.value,selectStrategy:l.multiple?"independent":"single-independent",onMousedown:o=>o.preventDefault(),onFocusout:_e,tabindex:"-1",selectable:!!y.value.length,"aria-live":"polite","aria-labelledby":`${w.value}-label`,"aria-multiselectable":l.multiple,color:l.itemColor??l.color},Se,l.listProps),{default:()=>{var o,i,b;return[(o=t["prepend-item"])==null?void 0:o.call(t),!y.value.length&&!l.hideNoData&&(((i=t["no-data"])==null?void 0:i.call(t))??f(ne,{key:"no-data",title:ve(l.noDataText)},null)),f(He,{ref:$,renderless:!0,items:y.value,itemKey:"value"},{default:N=>{var ee,le,ae;let{item:s,index:C,itemRef:p}=N;const Z=S(s.props,{ref:p,key:s.value,active:H.value&&s===M.value?!0:void 0,onClick:()=>F(s,null),"aria-posinset":C+1,"aria-setsize":y.value.length});return s.type==="divider"?((ee=t.divider)==null?void 0:ee.call(t,{props:s.raw,index:C}))??f(ll,S(s.props,{key:`divider-${C}`}),null):s.type==="subheader"?((le=t.subheader)==null?void 0:le.call(t,{props:s.raw,index:C}))??f(al,S(s.props,{key:`subheader-${C}`}),null):((ae=t.item)==null?void 0:ae.call(t,{item:s,index:C,props:Z}))??f(ne,S(Z,{role:"option"}),{prepend:O=>{let{isSelected:Ke}=O;return x(W,null,[l.multiple&&!l.hideSelected?f(yl,{key:s.value,modelValue:Ke,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:Ne=>Ne.preventDefault()},null):void 0,s.props.prependAvatar&&f(tl,{image:s.props.prependAvatar},null),s.props.prependIcon&&f(ue,{icon:s.props.prependIcon},null)])},title:()=>{var O;return g.value?s.title:je("v-autocomplete",s.title,(O=ye(s))==null?void 0:O.title)}})}}),(b=t["append-item"])==null?void 0:b.call(t)]}}),t["menu-footer"]&&x("footer",{ref:Y},[t["menu-footer"](V)])]})]}),n.value.map((o,i)=>{function b(p){p.stopPropagation(),p.preventDefault(),F(o,!1)}const N=S(se.filterProps(o.props),{"onClick:close":b,onKeydown(p){p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),p.stopPropagation(),b(p))},onMousedown(p){p.preventDefault(),p.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),s=L.value?!!t.chip:!!t.selection,C=s?dl(L.value?t.chip({item:o,index:i,props:N}):t.selection({item:o,index:i})):void 0;if(!(s&&!C))return x("div",{key:o.value,class:kl(["v-autocomplete__selection",i===r.value&&["v-autocomplete__selection--selected",me.value]]),style:Vl(i===r.value?pe.value:{})},[L.value?t.chip?f(ul,{key:"chip-defaults",defaults:{VChip:{closable:Q.value,size:"small",text:o.title}}},{default:()=>[C]}):f(se,S({key:"chip",closable:Q.value,size:"small",text:o.title,disabled:o.props.disabled},N),null):C??x("span",{class:"v-autocomplete__selection-text"},[o.title,l.multiple&&i!0,"update:search":l=>!0,"update:modelValue":l=>!0,"update:menu":l=>!0},setup(l,ce){let{slots:t}=ce;const{t:ve}=il(),m=A(),h=P(!1),g=P(!0),U=P(!1),_=A(),$=A(),r=P(-1),R=P(null),{items:q,transformIn:de,transformOut:fe}=Ye(l),{textColorClasses:me,textColorStyles:pe}=Ze(()=>{var e;return(e=m.value)==null?void 0:e.color}),{InputIcon:he}=Oe(l),c=J(l,"search",""),n=J(l,"modelValue",[],e=>de(e===null?[null]:sl(e)),e=>{const a=fe(e);return l.multiple?a:a[0]??null}),ge=I(()=>typeof l.counterValue=="function"?l.counterValue(n.value):typeof l.counterValue=="number"?l.counterValue:n.value.length),D=ze(l),{filteredItems:B,getMatches:ye}=$e(l,q,()=>R.value??(g.value?"":c.value)),y=I(()=>l.hideSelected&&R.value===null?B.value.filter(e=>!n.value.some(a=>a.value===e.value)):B.value),Q=Cl(()=>l.closableChips&&!D.isReadonly.value&&!D.isDisabled.value),L=I(()=>!!(l.chips||t.chip)),E=I(()=>L.value||!!t.selection),Ve=I(()=>n.value.map(e=>e.props.value)),M=I(()=>y.value.find(e=>e.type==="item"&&!e.props.disabled)),H=I(()=>{var a;return(l.autoSelectFirst===!0||l.autoSelectFirst==="exact"&&c.value===((a=M.value)==null?void 0:a.title))&&y.value.length>0&&!g.value&&!U.value}),K=I(()=>l.hideNoData&&!y.value.length||D.isReadonly.value||D.isDisabled.value),j=J(l,"menu"),v=I({get:()=>j.value,set:e=>{var a;j.value&&!e&&((a=_.value)!=null&&a.ΨopenChildren.size)||e&&K.value||(j.value=e)}}),{menuId:ke,ariaExpanded:be,ariaControls:Ce}=qe(l,v),T=A(),X=A(),Y=A(),Se=Ge(T,m),Ie=Xe(v,()=>{var e;return(e=_.value)==null?void 0:e.contentEl},()=>{var e;return(e=m.value)==null?void 0:e.controlRef}),{onTabKeydown:we}=Qe({groups:[{type:"element",contentRef:X},{type:"list",contentRef:T,displayItemsCount:()=>y.value.length},{type:"element",contentRef:Y}],onLeave:()=>{var e;v.value=!1,(e=m.value)==null||e.focus()}});function xe(e){l.openOnClear&&(v.value=!0),c.value=""}function Fe(){K.value||(v.value=!0)}function Re(e){K.value||(h.value&&(e.preventDefault(),e.stopPropagation()),v.value=!v.value)}function De(e){var a,u;e.key==="Tab"&&we(e),(a=T.value)!=null&&a.$el.contains(e.target)&&(oe(e)||e.key==="Backspace")&&((u=m.value)==null||u.focus())}function Pe(e){var V,d,w,k,o;if(D.isReadonly.value)return;const a=(V=m.value)==null?void 0:V.selectionStart,u=n.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(e.key)&&e.preventDefault(),["Enter","ArrowDown"].includes(e.key)&&(v.value=!0),["Escape"].includes(e.key)&&(v.value=!1),H.value&&["Enter","Tab"].includes(e.key)&&M.value&&!n.value.some(i=>{let{value:b}=i;return b===M.value.value})&&F(M.value),e.key==="ArrowDown"&&H.value&&((d=T.value)==null||d.focus("next")),["Backspace","Delete"].includes(e.key)){if(!l.multiple&&E.value&&n.value.length>0&&!c.value)return F(n.value[0],!1);if(~r.value){e.preventDefault();const i=r.value;F(n.value[r.value],!1),r.value=i>=u-1?u-2:i}else e.key==="Backspace"&&!c.value&&(r.value=u-1);return}if(l.multiple)if(e.key==="ArrowLeft"){if(r.value<0&&a&&a>0)return;const i=r.value>-1?r.value-1:u-1;if(n.value[i])r.value=i;else{const b=((w=c.value)==null?void 0:w.length)??null;r.value=-1,(k=m.value)==null||k.setSelectionRange(b,b)}}else if(e.key==="ArrowRight"){if(r.value<0)return;const i=r.value+1;n.value[i]?r.value=i:(r.value=-1,(o=m.value)==null||o.setSelectionRange(0,0))}else~r.value&&oe(e)&&(r.value=-1)}function Ae(e){if(ie(m.value,":autofill")||ie(m.value,":-webkit-autofill")){const a=q.value.find(u=>u.title===e.target.value);a&&F(a)}}function Ee(){var e;l.eager&&((e=$.value)==null||e.calculateVisibleItems())}function Me(){var e;h.value&&(g.value=!0,(e=m.value)==null||e.focus()),R.value=null}function Te(e){h.value=!0,setTimeout(()=>{U.value=!0})}function _e(e){var a;if(U.value=!1,!((a=m.value)!=null&&a.$el.contains(e.relatedTarget))){if(Ie(e))return;h.value=!1}}function Be(e){(e==null||e===""&&!l.multiple&&!E.value)&&(n.value=[])}function Le(e){var u;const a=(u=_.value)==null?void 0:u.contentEl;a!=null&&a.contains(e.relatedTarget)&&(h.value=!0)}const G=P(!1);function F(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!e||e.props.disabled))if(l.multiple){const u=n.value.findIndex(d=>(l.valueComparator||fl)(d.value,e.value)),V=a??!~u;if(~u){const d=V?[...n.value,e]:[...n.value];d.splice(u,1),n.value=d}else V&&(n.value=[...n.value,e]);l.clearOnSelect&&(c.value="")}else{const u=a!==!1;n.value=u?[e]:[],R.value=g.value?"":c.value??"",c.value=u&&!E.value?e.title:"",re(()=>{v.value=!1,g.value=!0})}}return z(h,(e,a)=>{var u;e!==a&&(e?(G.value=!0,c.value=l.multiple||E.value?"":String(((u=n.value.at(-1))==null?void 0:u.props.title)??""),g.value=!0,re(()=>G.value=!1)):(!l.multiple&&c.value==null&&(n.value=[]),v.value=!1,!g.value&&c.value&&(R.value=c.value),c.value="",r.value=-1))}),z(c,e=>{!h.value||G.value||(e&&(v.value=!0),g.value=!e)}),z(v,e=>{if(!l.hideSelected&&e&&n.value.length&&g.value){const a=y.value.findIndex(u=>n.value.some(V=>u.value===V.value));rl&&window.requestAnimationFrame(()=>{var u;a>=0&&((u=$.value)==null||u.scrollToIndex(a))})}e&&(R.value=null)}),z(q,(e,a)=>{v.value||h.value&&!a.length&&e.length&&(v.value=!0)}),cl(()=>{const e=!!(!l.hideNoData||y.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),a=n.value.length>0,u=te.filterProps(l),V={search:c,filteredItems:B.value};return f(te,S({ref:m},u,{modelValue:c.value,"onUpdate:modelValue":[d=>c.value=d,Be],focused:h.value,"onUpdate:focused":d=>h.value=d,validationValue:n.externalValue,counterValue:ge.value,dirty:a,onChange:Ae,class:["v-autocomplete",`v-autocomplete--${l.multiple?"multiple":"single"}`,{"v-autocomplete--active-menu":v.value,"v-autocomplete--chips":!!l.chips,"v-autocomplete--selection-slot":!!E.value,"v-autocomplete--selecting-index":r.value>-1},l.class],style:l.style,readonly:D.isReadonly.value,placeholder:a?void 0:l.placeholder,"onClick:clear":xe,"onMousedown:control":Fe,onKeydown:Pe,onBlur:Le,"aria-expanded":be.value,"aria-controls":Ce.value}),{...t,default:d=>{var k;let{id:w}=d;return x(W,null,[f(hl,S({id:ke.value,ref:_,modelValue:v.value,"onUpdate:modelValue":o=>v.value=o,activator:"parent",disabled:K.value,eager:l.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,onAfterEnter:Ee,onAfterLeave:Me},l.menuProps,{contentClass:["v-autocomplete__content",(k=l.menuProps)==null?void 0:k.contentClass]}),{default:()=>[f(gl,{onFocusin:Te,onKeydown:De},{default:()=>[t["menu-header"]&&x("header",{ref:X},[t["menu-header"](V)]),e&&f(el,S({key:"autocomplete-list",ref:T,filterable:!0,selected:Ve.value,selectStrategy:l.multiple?"independent":"single-independent",onMousedown:o=>o.preventDefault(),onFocusout:_e,tabindex:"-1",selectable:!!y.value.length,"aria-live":"polite","aria-labelledby":`${w.value}-label`,"aria-multiselectable":l.multiple,color:l.itemColor??l.color},Se,l.listProps),{default:()=>{var o,i,b;return[(o=t["prepend-item"])==null?void 0:o.call(t),!y.value.length&&!l.hideNoData&&(((i=t["no-data"])==null?void 0:i.call(t))??f(ne,{key:"no-data",title:ve(l.noDataText)},null)),f(He,{ref:$,renderless:!0,items:y.value,itemKey:"value"},{default:N=>{var ee,le,ae;let{item:s,index:C,itemRef:p}=N;const Z=S(s.props,{ref:p,key:s.value,active:H.value&&s===M.value?!0:void 0,onClick:()=>F(s,null),"aria-posinset":C+1,"aria-setsize":y.value.length});return s.type==="divider"?((ee=t.divider)==null?void 0:ee.call(t,{props:s.raw,index:C}))??f(ll,S(s.props,{key:`divider-${C}`}),null):s.type==="subheader"?((le=t.subheader)==null?void 0:le.call(t,{props:s.raw,index:C}))??f(al,S(s.props,{key:`subheader-${C}`}),null):((ae=t.item)==null?void 0:ae.call(t,{item:s,index:C,props:Z}))??f(ne,S(Z,{role:"option"}),{prepend:O=>{let{isSelected:Ke}=O;return x(W,null,[l.multiple&&!l.hideSelected?f(yl,{key:s.value,modelValue:Ke,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:Ne=>Ne.preventDefault()},null):void 0,s.props.prependAvatar&&f(tl,{image:s.props.prependAvatar},null),s.props.prependIcon&&f(ue,{icon:s.props.prependIcon},null)])},title:()=>{var O;return g.value?s.title:je("v-autocomplete",s.title,(O=ye(s))==null?void 0:O.title)}})}}),(b=t["append-item"])==null?void 0:b.call(t)]}}),t["menu-footer"]&&x("footer",{ref:Y},[t["menu-footer"](V)])]})]}),n.value.map((o,i)=>{function b(p){p.stopPropagation(),p.preventDefault(),F(o,!1)}const N=S(se.filterProps(o.props),{"onClick:close":b,onKeydown(p){p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),p.stopPropagation(),b(p))},onMousedown(p){p.preventDefault(),p.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),s=L.value?!!t.chip:!!t.selection,C=s?dl(L.value?t.chip({item:o,index:i,props:N}):t.selection({item:o,index:i})):void 0;if(!(s&&!C))return x("div",{key:o.value,class:kl(["v-autocomplete__selection",i===r.value&&["v-autocomplete__selection--selected",me.value]]),style:Vl(i===r.value?pe.value:{})},[L.value?t.chip?f(ul,{key:"chip-defaults",defaults:{VChip:{closable:Q.value,size:"small",text:o.title}}},{default:()=>[C]}):f(se,S({key:"chip",closable:Q.value,size:"small",text:o.title,disabled:o.props.disabled},N),null):C??x("span",{class:"v-autocomplete__selection-text"},[o.title,l.multiple&&i!0,"update:focused":e=>!0},setup(e,n){let{attrs:i,slots:a}=n;const o=U(e,"modelValue"),{isFocused:m,focus:f,blur:p}=R(e),t=N(),V=M();return j(()=>{const[b,k]=w(i),v=l.filterProps(e),x=r.filterProps(e);return d(l,c({ref:t,class:["v-checkbox",e.class]},b,v,{modelValue:o.value,"onUpdate:modelValue":s=>o.value=s,id:e.id||`checkbox-${V}`,focused:m.value,style:e.style}),{...a,default:s=>{let{id:h,messagesId:P,isDisabled:C,isReadonly:y,isValid:I}=s;return d(r,c(x,{id:h.value,"aria-describedby":P.value,disabled:C.value,readonly:y.value},k,{error:I.value===!1,modelValue:o.value,"onUpdate:modelValue":A=>o.value=A,onFocus:f,onBlur:p}),a)}})}),B({},t)}});export{K as V}; +import{V as r,m as F}from"./VCheckboxBtn-BKcSogH0.js";import{u as R,a as l,d as g}from"./VTextField-BurlcggD.js";import{E as B}from"./index-DGIAsv4W.js";import{f as E,n as U,u as j,ao as w,p as D,a5 as u}from"./vendor-vuetify-DsKlzgKp.js";import{E as M,j as d,m as c,b as N}from"./vendor-vue-BiQC5iF7.js";const $=D({...u(g(),["direction"]),...u(F(),["inline"])},"VCheckbox"),K=E()({name:"VCheckbox",inheritAttrs:!1,props:$(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,n){let{attrs:i,slots:a}=n;const o=U(e,"modelValue"),{isFocused:m,focus:f,blur:p}=R(e),t=N(),V=M();return j(()=>{const[b,k]=w(i),v=l.filterProps(e),x=r.filterProps(e);return d(l,c({ref:t,class:["v-checkbox",e.class]},b,v,{modelValue:o.value,"onUpdate:modelValue":s=>o.value=s,id:e.id||`checkbox-${V}`,focused:m.value,style:e.style}),{...a,default:s=>{let{id:h,messagesId:P,isDisabled:C,isReadonly:y,isValid:I}=s;return d(r,c(x,{id:h.value,"aria-describedby":P.value,disabled:C.value,readonly:y.value},k,{error:I.value===!1,modelValue:o.value,"onUpdate:modelValue":A=>o.value=A,onFocus:f,onBlur:p}),a)}})}),B({},t)}});export{K as V}; diff --git a/assets/VCheckboxBtn-BLxCsxXE.js b/assets/VCheckboxBtn-BKcSogH0.js similarity index 80% rename from assets/VCheckboxBtn-BLxCsxXE.js rename to assets/VCheckboxBtn-BKcSogH0.js index 9c8c2ff..df3d237 100644 --- a/assets/VCheckboxBtn-BLxCsxXE.js +++ b/assets/VCheckboxBtn-BKcSogH0.js @@ -1 +1 @@ -import{a,m as f}from"./VSwitch-DcxT6NgQ.js";import{f as I,n as c,u as V,a5 as v,p as k,I as x}from"./vendor-vuetify-95axeNJO.js";import{j as h,m as b,t as l}from"./vendor-vue-28M5UGz3.js";const C=k({indeterminate:Boolean,indeterminateIcon:{type:x,default:"$checkboxIndeterminate"},...f({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),B=I()({name:"VCheckboxBtn",props:C(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,r){let{slots:s}=r;const t=c(e,"indeterminate"),n=c(e,"modelValue");function u(o){t.value&&(t.value=!1)}const m=l(()=>t.value?e.indeterminateIcon:e.falseIcon),i=l(()=>t.value?e.indeterminateIcon:e.trueIcon);return V(()=>{const o=v(a.filterProps(e),["modelValue"]);return h(a,b(o,{modelValue:n.value,"onUpdate:modelValue":[d=>n.value=d,u],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:m.value,trueIcon:i.value,"aria-checked":t.value?"mixed":void 0}),s)}),{}}});export{B as V,C as m}; +import{a,m as f}from"./VSwitch-k6hfPfa2.js";import{f as I,n as c,u as V,a5 as v,p as k,I as x}from"./vendor-vuetify-DsKlzgKp.js";import{j as h,m as b,t as l}from"./vendor-vue-BiQC5iF7.js";const C=k({indeterminate:Boolean,indeterminateIcon:{type:x,default:"$checkboxIndeterminate"},...f({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),B=I()({name:"VCheckboxBtn",props:C(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,r){let{slots:s}=r;const t=c(e,"indeterminate"),n=c(e,"modelValue");function u(o){t.value&&(t.value=!1)}const m=l(()=>t.value?e.indeterminateIcon:e.falseIcon),i=l(()=>t.value?e.indeterminateIcon:e.trueIcon);return V(()=>{const o=v(a.filterProps(e),["modelValue"]);return h(a,b(o,{modelValue:n.value,"onUpdate:modelValue":[d=>n.value=d,u],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:m.value,trueIcon:i.value,"aria-checked":t.value?"mixed":void 0}),s)}),{}}});export{B as V,C as m}; diff --git a/assets/VChip-B3whZF-S.js b/assets/VChip-mRzIPuM0.js similarity index 97% rename from assets/VChip-B3whZF-S.js rename to assets/VChip-mRzIPuM0.js index d36cbd0..15bc3f8 100644 --- a/assets/VChip-B3whZF-S.js +++ b/assets/VChip-mRzIPuM0.js @@ -1 +1 @@ -import{o as ye,j as h,k,n as L,N as Pe,e as S,s as F,m as ee,t as A,R as se,V as we,F as ie,S as Re}from"./vendor-vue-28M5UGz3.js";import{aa as pe,ao as oe,f as E,ap as ke,m as le,am as ge,a0 as ce,af as Ee,K as _e,N as Te,aq as Be,ab as re,ar as Fe,aj as Oe,al as Ge,as as De,ag as H,o as ue,a2 as Me,at as We,au as Le,R as He,ae as $e,$ as Ne,M as qe,ah as Ke}from"./index-CzpSlHRw.js";import{f as te,A as je,a0 as Ue,y as de,aG as Qe,E as ve,u as be,$ as Xe,p as ae,I as _,az as Je,k as ne,h as Se,j as Ye,o as Ze,m as Ce,an as el,n as ll,ag as fe}from"./vendor-vuetify-95axeNJO.js";function tl(e){let{selectedElement:s,containerElement:n,isRtl:r,isHorizontal:i}=e;const y=O(i,n),c=xe(i,r,n),p=O(i,s),m=Ve(i,s),g=p*.4;return c>m?m-g:c+ytypeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...ne(),...Je({mobile:null}),...le(),...ke({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),me=te()({name:"VSlideGroup",props:ze(),emits:{"update:modelValue":e=>!0},setup(e,s){let{slots:n}=s;const{isRtl:r}=je(),{displayClasses:i,mobile:y}=Ue(e),c=pe(e,e.symbol),p=F(!1),m=F(0),g=F(0),I=F(0),v=S(()=>e.direction==="horizontal"),{resizeRef:d,contentRect:a}=de(),{resizeRef:u,contentRect:b}=de(),G=Qe(),C=S(()=>({container:d.el,duration:200,easing:"easeOutQuart"})),$=S(()=>c.selected.value.length?c.items.value.findIndex(t=>t.id===c.selected.value[0]):-1),N=S(()=>c.selected.value.length?c.items.value.findIndex(t=>t.id===c.selected.value[c.selected.value.length-1]):-1);if(ve){let t=-1;ye(()=>[c.selected.value,a.value,b.value,v.value],()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{if(a.value&&b.value){const l=v.value?"width":"height";g.value=a.value[l],I.value=b.value[l],p.value=g.value+1=0&&u.el){const l=u.el.children[N.value];D(l,e.centerActive)}})})}const P=F(!1);function D(t,l){let o=0;l?o=al({containerElement:d.el,isHorizontal:v.value,selectedElement:t}):o=tl({containerElement:d.el,isHorizontal:v.value,isRtl:r.value,selectedElement:t}),T(o)}function T(t){if(!ve||!d.el)return;const l=O(v.value,d.el),o=xe(v.value,r.value,d.el);if(!(he(v.value,d.el)<=l||Math.abs(t-o)<16)){if(v.value&&r.value&&d.el){const{scrollWidth:Y,offsetWidth:Z}=d.el;t=Y-Z-t}v.value?G.horizontal(t,C.value):G(t,C.value)}}function q(t){const{scrollTop:l,scrollLeft:o}=t.target;m.value=v.value?o:l}function f(t){if(P.value=!0,!(!p.value||!u.el)){for(const l of t.composedPath())for(const o of u.el.children)if(o===l){D(o);return}}}function z(t){P.value=!1}let x=!1;function K(t){var l;!x&&!P.value&&!(t.relatedTarget&&((l=u.el)!=null&&l.contains(t.relatedTarget)))&&V(),x=!1}function B(){x=!0}function M(t){if(!u.el)return;function l(o){t.preventDefault(),V(o)}v.value?t.key==="ArrowRight"?l(r.value?"prev":"next"):t.key==="ArrowLeft"&&l(r.value?"next":"prev"):t.key==="ArrowDown"?l("next"):t.key==="ArrowUp"&&l("prev"),t.key==="Home"?l("first"):t.key==="End"&&l("last")}function w(t,l){if(!t)return;let o=t;do o=o==null?void 0:o[l==="next"?"nextElementSibling":"previousElementSibling"];while(o!=null&&o.hasAttribute("disabled"));return o}function V(t){if(!u.el)return;let l;if(!t)l=Xe(u.el)[0];else if(t==="next"){if(l=w(u.el.querySelector(":focus"),t),!l)return V("first")}else if(t==="prev"){if(l=w(u.el.querySelector(":focus"),t),!l)return V("last")}else t==="first"?(l=u.el.firstElementChild,l!=null&&l.hasAttribute("disabled")&&(l=w(l,"next"))):t==="last"&&(l=u.el.lastElementChild,l!=null&&l.hasAttribute("disabled")&&(l=w(l,"prev")));l&&l.focus({preventScroll:!0})}function R(t){const l=v.value&&r.value?-1:1,o=(t==="prev"?-l:l)*g.value;let J=m.value+o;if(v.value&&r.value&&d.el){const{scrollWidth:Y,offsetWidth:Z}=d.el;J+=Y-Z}T(J)}const j=S(()=>({next:c.next,prev:c.prev,select:c.select,isSelected:c.isSelected})),W=S(()=>p.value||Math.abs(m.value)>0),U=S(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!y.value;case!0:return W.value;case"mobile":return y.value||W.value;default:return!y.value&&W.value}}),Q=S(()=>Math.abs(m.value)>1),X=S(()=>{if(!d.value||!W.value)return!1;const t=he(v.value,d.el),l=nl(v.value,d.el);return t-l-Math.abs(m.value)>1});return be(()=>h(e.tag,{class:L(["v-slide-group",{"v-slide-group--vertical":!v.value,"v-slide-group--has-affixes":U.value,"v-slide-group--is-overflowing":p.value},i.value,e.class]),style:Pe(e.style),tabindex:P.value||c.selected.value.length?-1:0,onFocus:K},{default:()=>{var t,l,o;return[U.value&&k("div",{key:"prev",class:L(["v-slide-group__prev",{"v-slide-group__prev--disabled":!Q.value}]),onMousedown:B,onClick:()=>Q.value&&R("prev")},[((t=n.prev)==null?void 0:t.call(n,j.value))??h(oe,null,{default:()=>[h(E,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),k("div",{key:"container",ref:d,class:L(["v-slide-group__container",e.contentClass]),onScroll:q},[k("div",{ref:u,class:"v-slide-group__content",onFocusin:f,onFocusout:z,onKeydown:M},[(l=n.default)==null?void 0:l.call(n,j.value)])]),U.value&&k("div",{key:"next",class:L(["v-slide-group__next",{"v-slide-group__next--disabled":!X.value}]),onMousedown:B,onClick:()=>X.value&&R("next")},[((o=n.next)==null?void 0:o.call(n,j.value))??h(oe,null,{default:()=>[h(E,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:c.selected,scrollTo:R,scrollOffset:m,focus:V,hasPrev:Q,hasNext:X}}}),Ae=Symbol.for("vuetify:v-chip-group"),sl=ae({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Ze},...ze({scrollToActive:!1}),...ne(),...ke({selectedClass:"v-chip--selected"}),...le(),...Ce(),...ge({variant:"tonal"})},"VChipGroup"),ul=te()({name:"VChipGroup",props:sl(),emits:{"update:modelValue":e=>!0},setup(e,s){let{slots:n}=s;const{themeClasses:r}=Se(e),{isSelected:i,select:y,next:c,prev:p,selected:m}=pe(e,Ae);return Ye({VChip:{baseColor:A(()=>e.baseColor),color:A(()=>e.color),disabled:A(()=>e.disabled),filter:A(()=>e.filter),variant:A(()=>e.variant)}}),be(()=>{const g=me.filterProps(e);return h(me,ee(g,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var I;return[(I=n.default)==null?void 0:I.call(n,{isSelected:i,select:y,next:c,prev:p,selected:m.value})]}})}),{}}}),il=ae({activeClass:String,appendAvatar:String,appendIcon:_,baseColor:String,closable:Boolean,closeIcon:{type:_,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:_,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:_,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:fe(),onClickOnce:fe(),...Ke(),...ne(),...qe(),...Ne(),...$e(),...He(),...Le(),...We(),...le({tag:"span"}),...Ce(),...ge({variant:"tonal"})},"VChip"),dl=te()({name:"VChip",directives:{vRipple:ce},props:il(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,s){let{attrs:n,emit:r,slots:i}=s;const{t:y}=el(),{borderClasses:c}=Ee(e),{densityClasses:p}=_e(e),{elevationClasses:m}=Me(e),{roundedClasses:g}=Te(e),{sizeClasses:I}=Be(e),{themeClasses:v}=Se(e),d=ll(e,"modelValue"),a=re(e,Ae,!1),u=re(e,Ie,!1),b=Fe(e,n),G=A(()=>e.link!==!1&&b.isLink.value),C=S(()=>!e.disabled&&e.link!==!1&&(!!a||e.link||b.isClickable.value)),$=A(()=>({"aria-label":y(e.closeLabel),disabled:e.disabled,onClick(f){f.preventDefault(),f.stopPropagation(),d.value=!1,r("click:close",f)}}));ye(d,f=>{f?(a==null||a.register(),u==null||u.register()):(a==null||a.unregister(),u==null||u.unregister())});const{colorClasses:N,colorStyles:P,variantClasses:D}=Oe(()=>({color:!a||a.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function T(f){var z,x;r("click",f),C.value&&((x=(z=b.navigate).value)==null||x.call(z,f),a==null||a.toggle())}function q(f){(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),T(f))}return()=>{var V;const f=b.isLink.value?"a":e.tag,z=!!(e.appendIcon||e.appendAvatar),x=!!(z||i.append),K=!!(i.close||e.closable),B=!!(i.filter||e.filter)&&a,M=!!(e.prependIcon||e.prependAvatar),w=!!(M||i.prepend);return d.value&&se(h(f,ee(b.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":C.value,"v-chip--filter":B,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((V=b.isActive)==null?void 0:V.value)},v.value,c.value,N.value,p.value,m.value,g.value,I.value,D.value,a==null?void 0:a.selectedClass.value,e.class],style:[P.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:C.value?0:void 0,onClick:T,onKeydown:C.value&&!G.value&&q}),{default:()=>{var R;return[Ge(C.value,"v-chip"),B&&h(De,{key:"filter"},{default:()=>[se(k("div",{class:"v-chip__filter"},[i.filter?h(H,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},i.filter):h(E,{key:"filter-icon",icon:e.filterIcon},null)]),[[we,a.isSelected.value]])]}),w&&k("div",{key:"prepend",class:"v-chip__prepend"},[i.prepend?h(H,{key:"prepend-defaults",disabled:!M,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},i.prepend):k(ie,null,[e.prependIcon&&h(E,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(ue,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),k("div",{class:"v-chip__content","data-no-activator":""},[((R=i.default)==null?void 0:R.call(i,{isSelected:a==null?void 0:a.isSelected.value,selectedClass:a==null?void 0:a.selectedClass.value,select:a==null?void 0:a.select,toggle:a==null?void 0:a.toggle,value:a==null?void 0:a.value.value,disabled:e.disabled}))??Re(e.text)]),x&&k("div",{key:"append",class:"v-chip__append"},[i.append?h(H,{key:"append-defaults",disabled:!z,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},i.append):k(ie,null,[e.appendIcon&&h(E,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(ue,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),K&&k("button",ee({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},$.value),[i.close?h(H,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},i.close):h(E,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[ce,C.value&&e.ripple,null]])}}});export{dl as V,ul as a,me as b,ze as m}; +import{o as ye,j as h,k,n as L,N as Pe,e as S,s as F,m as ee,t as A,R as se,V as we,F as ie,S as Re}from"./vendor-vue-BiQC5iF7.js";import{aa as pe,ao as oe,f as E,ap as ke,m as le,am as ge,a0 as ce,af as Ee,K as _e,N as Te,aq as Be,ab as re,ar as Fe,aj as Oe,al as Ge,as as De,ag as H,o as ue,a2 as Me,at as We,au as Le,R as He,ae as $e,$ as Ne,M as qe,ah as Ke}from"./index-DGIAsv4W.js";import{f as te,A as je,a0 as Ue,y as de,aG as Qe,E as ve,u as be,$ as Xe,p as ae,I as _,az as Je,k as ne,h as Se,j as Ye,o as Ze,m as Ce,an as el,n as ll,ag as fe}from"./vendor-vuetify-DsKlzgKp.js";function tl(e){let{selectedElement:s,containerElement:n,isRtl:r,isHorizontal:i}=e;const y=O(i,n),c=xe(i,r,n),p=O(i,s),m=Ve(i,s),g=p*.4;return c>m?m-g:c+ytypeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...ne(),...Je({mobile:null}),...le(),...ke({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),me=te()({name:"VSlideGroup",props:ze(),emits:{"update:modelValue":e=>!0},setup(e,s){let{slots:n}=s;const{isRtl:r}=je(),{displayClasses:i,mobile:y}=Ue(e),c=pe(e,e.symbol),p=F(!1),m=F(0),g=F(0),I=F(0),v=S(()=>e.direction==="horizontal"),{resizeRef:d,contentRect:a}=de(),{resizeRef:u,contentRect:b}=de(),G=Qe(),C=S(()=>({container:d.el,duration:200,easing:"easeOutQuart"})),$=S(()=>c.selected.value.length?c.items.value.findIndex(t=>t.id===c.selected.value[0]):-1),N=S(()=>c.selected.value.length?c.items.value.findIndex(t=>t.id===c.selected.value[c.selected.value.length-1]):-1);if(ve){let t=-1;ye(()=>[c.selected.value,a.value,b.value,v.value],()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{if(a.value&&b.value){const l=v.value?"width":"height";g.value=a.value[l],I.value=b.value[l],p.value=g.value+1=0&&u.el){const l=u.el.children[N.value];D(l,e.centerActive)}})})}const P=F(!1);function D(t,l){let o=0;l?o=al({containerElement:d.el,isHorizontal:v.value,selectedElement:t}):o=tl({containerElement:d.el,isHorizontal:v.value,isRtl:r.value,selectedElement:t}),T(o)}function T(t){if(!ve||!d.el)return;const l=O(v.value,d.el),o=xe(v.value,r.value,d.el);if(!(he(v.value,d.el)<=l||Math.abs(t-o)<16)){if(v.value&&r.value&&d.el){const{scrollWidth:Y,offsetWidth:Z}=d.el;t=Y-Z-t}v.value?G.horizontal(t,C.value):G(t,C.value)}}function q(t){const{scrollTop:l,scrollLeft:o}=t.target;m.value=v.value?o:l}function f(t){if(P.value=!0,!(!p.value||!u.el)){for(const l of t.composedPath())for(const o of u.el.children)if(o===l){D(o);return}}}function z(t){P.value=!1}let x=!1;function K(t){var l;!x&&!P.value&&!(t.relatedTarget&&((l=u.el)!=null&&l.contains(t.relatedTarget)))&&V(),x=!1}function B(){x=!0}function M(t){if(!u.el)return;function l(o){t.preventDefault(),V(o)}v.value?t.key==="ArrowRight"?l(r.value?"prev":"next"):t.key==="ArrowLeft"&&l(r.value?"next":"prev"):t.key==="ArrowDown"?l("next"):t.key==="ArrowUp"&&l("prev"),t.key==="Home"?l("first"):t.key==="End"&&l("last")}function w(t,l){if(!t)return;let o=t;do o=o==null?void 0:o[l==="next"?"nextElementSibling":"previousElementSibling"];while(o!=null&&o.hasAttribute("disabled"));return o}function V(t){if(!u.el)return;let l;if(!t)l=Xe(u.el)[0];else if(t==="next"){if(l=w(u.el.querySelector(":focus"),t),!l)return V("first")}else if(t==="prev"){if(l=w(u.el.querySelector(":focus"),t),!l)return V("last")}else t==="first"?(l=u.el.firstElementChild,l!=null&&l.hasAttribute("disabled")&&(l=w(l,"next"))):t==="last"&&(l=u.el.lastElementChild,l!=null&&l.hasAttribute("disabled")&&(l=w(l,"prev")));l&&l.focus({preventScroll:!0})}function R(t){const l=v.value&&r.value?-1:1,o=(t==="prev"?-l:l)*g.value;let J=m.value+o;if(v.value&&r.value&&d.el){const{scrollWidth:Y,offsetWidth:Z}=d.el;J+=Y-Z}T(J)}const j=S(()=>({next:c.next,prev:c.prev,select:c.select,isSelected:c.isSelected})),W=S(()=>p.value||Math.abs(m.value)>0),U=S(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!y.value;case!0:return W.value;case"mobile":return y.value||W.value;default:return!y.value&&W.value}}),Q=S(()=>Math.abs(m.value)>1),X=S(()=>{if(!d.value||!W.value)return!1;const t=he(v.value,d.el),l=nl(v.value,d.el);return t-l-Math.abs(m.value)>1});return be(()=>h(e.tag,{class:L(["v-slide-group",{"v-slide-group--vertical":!v.value,"v-slide-group--has-affixes":U.value,"v-slide-group--is-overflowing":p.value},i.value,e.class]),style:Pe(e.style),tabindex:P.value||c.selected.value.length?-1:0,onFocus:K},{default:()=>{var t,l,o;return[U.value&&k("div",{key:"prev",class:L(["v-slide-group__prev",{"v-slide-group__prev--disabled":!Q.value}]),onMousedown:B,onClick:()=>Q.value&&R("prev")},[((t=n.prev)==null?void 0:t.call(n,j.value))??h(oe,null,{default:()=>[h(E,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),k("div",{key:"container",ref:d,class:L(["v-slide-group__container",e.contentClass]),onScroll:q},[k("div",{ref:u,class:"v-slide-group__content",onFocusin:f,onFocusout:z,onKeydown:M},[(l=n.default)==null?void 0:l.call(n,j.value)])]),U.value&&k("div",{key:"next",class:L(["v-slide-group__next",{"v-slide-group__next--disabled":!X.value}]),onMousedown:B,onClick:()=>X.value&&R("next")},[((o=n.next)==null?void 0:o.call(n,j.value))??h(oe,null,{default:()=>[h(E,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:c.selected,scrollTo:R,scrollOffset:m,focus:V,hasPrev:Q,hasNext:X}}}),Ae=Symbol.for("vuetify:v-chip-group"),sl=ae({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Ze},...ze({scrollToActive:!1}),...ne(),...ke({selectedClass:"v-chip--selected"}),...le(),...Ce(),...ge({variant:"tonal"})},"VChipGroup"),ul=te()({name:"VChipGroup",props:sl(),emits:{"update:modelValue":e=>!0},setup(e,s){let{slots:n}=s;const{themeClasses:r}=Se(e),{isSelected:i,select:y,next:c,prev:p,selected:m}=pe(e,Ae);return Ye({VChip:{baseColor:A(()=>e.baseColor),color:A(()=>e.color),disabled:A(()=>e.disabled),filter:A(()=>e.filter),variant:A(()=>e.variant)}}),be(()=>{const g=me.filterProps(e);return h(me,ee(g,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var I;return[(I=n.default)==null?void 0:I.call(n,{isSelected:i,select:y,next:c,prev:p,selected:m.value})]}})}),{}}}),il=ae({activeClass:String,appendAvatar:String,appendIcon:_,baseColor:String,closable:Boolean,closeIcon:{type:_,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:_,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:_,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:fe(),onClickOnce:fe(),...Ke(),...ne(),...qe(),...Ne(),...$e(),...He(),...Le(),...We(),...le({tag:"span"}),...Ce(),...ge({variant:"tonal"})},"VChip"),dl=te()({name:"VChip",directives:{vRipple:ce},props:il(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,s){let{attrs:n,emit:r,slots:i}=s;const{t:y}=el(),{borderClasses:c}=Ee(e),{densityClasses:p}=_e(e),{elevationClasses:m}=Me(e),{roundedClasses:g}=Te(e),{sizeClasses:I}=Be(e),{themeClasses:v}=Se(e),d=ll(e,"modelValue"),a=re(e,Ae,!1),u=re(e,Ie,!1),b=Fe(e,n),G=A(()=>e.link!==!1&&b.isLink.value),C=S(()=>!e.disabled&&e.link!==!1&&(!!a||e.link||b.isClickable.value)),$=A(()=>({"aria-label":y(e.closeLabel),disabled:e.disabled,onClick(f){f.preventDefault(),f.stopPropagation(),d.value=!1,r("click:close",f)}}));ye(d,f=>{f?(a==null||a.register(),u==null||u.register()):(a==null||a.unregister(),u==null||u.unregister())});const{colorClasses:N,colorStyles:P,variantClasses:D}=Oe(()=>({color:!a||a.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function T(f){var z,x;r("click",f),C.value&&((x=(z=b.navigate).value)==null||x.call(z,f),a==null||a.toggle())}function q(f){(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),T(f))}return()=>{var V;const f=b.isLink.value?"a":e.tag,z=!!(e.appendIcon||e.appendAvatar),x=!!(z||i.append),K=!!(i.close||e.closable),B=!!(i.filter||e.filter)&&a,M=!!(e.prependIcon||e.prependAvatar),w=!!(M||i.prepend);return d.value&&se(h(f,ee(b.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":C.value,"v-chip--filter":B,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((V=b.isActive)==null?void 0:V.value)},v.value,c.value,N.value,p.value,m.value,g.value,I.value,D.value,a==null?void 0:a.selectedClass.value,e.class],style:[P.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:C.value?0:void 0,onClick:T,onKeydown:C.value&&!G.value&&q}),{default:()=>{var R;return[Ge(C.value,"v-chip"),B&&h(De,{key:"filter"},{default:()=>[se(k("div",{class:"v-chip__filter"},[i.filter?h(H,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},i.filter):h(E,{key:"filter-icon",icon:e.filterIcon},null)]),[[we,a.isSelected.value]])]}),w&&k("div",{key:"prepend",class:"v-chip__prepend"},[i.prepend?h(H,{key:"prepend-defaults",disabled:!M,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},i.prepend):k(ie,null,[e.prependIcon&&h(E,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(ue,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),k("div",{class:"v-chip__content","data-no-activator":""},[((R=i.default)==null?void 0:R.call(i,{isSelected:a==null?void 0:a.isSelected.value,selectedClass:a==null?void 0:a.selectedClass.value,select:a==null?void 0:a.select,toggle:a==null?void 0:a.toggle,value:a==null?void 0:a.value.value,disabled:e.disabled}))??Re(e.text)]),x&&k("div",{key:"append",class:"v-chip__append"},[i.append?h(H,{key:"append-defaults",disabled:!z,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},i.append):k(ie,null,[e.appendIcon&&h(E,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(ue,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),K&&k("button",ee({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},$.value),[i.close?h(H,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},i.close):h(E,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[ce,C.value&&e.ripple,null]])}}});export{dl as V,ul as a,me as b,ze as m}; diff --git a/assets/VCombobox-DqiaU_M6.js b/assets/VCombobox-BGa7K58w.js similarity index 95% rename from assets/VCombobox-DqiaU_M6.js rename to assets/VCombobox-BGa7K58w.js index 487e6be..b993be9 100644 --- a/assets/VCombobox-DqiaU_M6.js +++ b/assets/VCombobox-BGa7K58w.js @@ -1,2 +1,2 @@ -import{h as qe,e as He,V as se,i as Ge}from"./VTextField-BxdS2D7S.js";import{u as Je,a as We,b as Qe,c as Xe,h as Ye,d as Ze,e as el,m as ll,f as al}from"./VSelect-DZBjiB3J.js";import{aB as tl,H as nl,aC as _,f as re,p as ul,q as ce,i as ol,a6 as il,o as sl,ag as rl,E as cl}from"./index-CzpSlHRw.js";import{f as vl,an as dl,n as ve,w as fl,o as de,E as ml,u as hl,aI as bl,aJ as pl,aK as fe,aL as gl,p as yl,a5 as xl,aM as Vl}from"./vendor-vuetify-95axeNJO.js";import{V as kl,a as Cl}from"./VSheet-ZjkOR-Oc.js";import{V as wl}from"./VCheckboxBtn-BLxCsxXE.js";import{V as me}from"./VChip-B3whZF-S.js";import{s as P,o as L,j as d,k as S,F as Q,m as F,N as Il,n as Dl,a1 as Fl,e as w,I as N,b as A,t as Sl}from"./vendor-vue-28M5UGz3.js";const Rl=yl({alwaysFilter:Boolean,autoSelectFirst:{type:[Boolean,String]},clearOnSelect:{type:Boolean,default:!0},delimiters:Array,...ll({filterKeys:["title"]}),...el({hideNoData:!0,returnObject:!0}),...xl(Ge({modelValue:null,role:"combobox"}),["validationValue","dirty"])},"VCombobox"),Nl=vl()({name:"VCombobox",props:Rl(),emits:{"update:focused":l=>!0,"update:modelValue":l=>!0,"update:search":l=>!0,"update:menu":l=>!0},setup(l,he){var te;let{emit:be,slots:t}=he;const{t:pe}=dl(),m=A(),g=P(!1),I=P(!0),G=P(!1),K=A(),O=A(),i=P(-1);let $=!1;const{items:X,transformIn:ge,transformOut:ye}=tl(l),{textColorClasses:xe,textColorStyles:Ve}=nl(()=>{var e;return(e=m.value)==null?void 0:e.color}),{InputIcon:ke}=qe(l),o=ve(l,"modelValue",[],e=>ge(fl(e)),e=>{const a=ye(e);return l.multiple?a:a[0]??null}),R=He(l),Y=Sl(()=>l.closableChips&&!R.isReadonly.value&&!R.isDisabled.value),z=w(()=>!!(l.chips||t.chip)),D=w(()=>z.value||!!t.selection),y=P(!l.multiple&&!D.value?((te=o.value[0])==null?void 0:te.title)??"":""),T=P(null),v=w({get:()=>y.value,set:async e=>{var a;if(y.value=e??"",e===null||e===""&&!l.multiple&&!D.value?o.value=[]:!l.multiple&&!D.value&&(o.value=[_(l,e)],N(()=>{var n;return(n=O.value)==null?void 0:n.scrollToIndex(0)})),e&&l.multiple&&((a=l.delimiters)!=null&&a.length)){const n=le(e);n.length>1&&(ae(n),y.value="")}e||(i.value=-1),I.value=!e}}),Ce=w(()=>typeof l.counterValue=="function"?l.counterValue(o.value):typeof l.counterValue=="number"?l.counterValue:l.multiple?o.value.length:v.value.length),{filteredItems:U,getMatches:we}=Je(l,X,()=>T.value??(l.alwaysFilter||!I.value?v.value:"")),x=w(()=>l.hideSelected&&T.value===null?U.value.filter(e=>!o.value.some(a=>a.value===e.value)):U.value),j=w(()=>l.hideNoData&&!x.value.length||R.isReadonly.value||R.isDisabled.value),J=ve(l,"menu"),r=w({get:()=>J.value,set:e=>{var a;J.value&&!e&&((a=K.value)!=null&&a.ΨopenChildren.size)||e&&j.value||(J.value=e)}}),{menuId:Ie,ariaExpanded:De,ariaControls:Fe}=We(l,r);L(y,e=>{$?N(()=>$=!1):g.value&&!r.value&&(r.value=!0),be("update:search",e)}),L(o,e=>{var a;!l.multiple&&!D.value&&(y.value=((a=e[0])==null?void 0:a.title)??"")});const Se=w(()=>o.value.map(e=>e.value)),E=w(()=>x.value.find(e=>e.type==="item"&&!e.props.disabled)),W=w(()=>{var a;return(l.autoSelectFirst===!0||l.autoSelectFirst==="exact"&&v.value===((a=E.value)==null?void 0:a.title))&&x.value.length>0&&!I.value&&!G.value}),M=A(),Z=A(),ee=A(),Re=Ze(M,m),Pe=al(r,()=>{var e;return(e=K.value)==null?void 0:e.contentEl},()=>{var e;return(e=m.value)==null?void 0:e.controlRef}),{onTabKeydown:Ae}=Qe({groups:[{type:"element",contentRef:Z},{type:"list",contentRef:M,displayItemsCount:()=>x.value.length},{type:"element",contentRef:ee}],onLeave:()=>{var e;r.value=!1,(e=m.value)==null||e.focus()}});function Te(e){$=!0,N(()=>$=!1),l.openOnClear&&(r.value=!0)}function Ee(){j.value||(r.value=!0)}function Me(e){j.value||(g.value&&(e.preventDefault(),e.stopPropagation()),r.value=!r.value)}function Be(e){var a,n;e.key==="Tab"&&Ae(e),(a=M.value)!=null&&a.$el.contains(e.target)&&(fe(e)||e.key==="Backspace")&&((n=m.value)==null||n.focus())}function _e(e){var c,f,h,k;if(gl(e)||R.isReadonly.value)return;const a=(c=m.value)==null?void 0:c.selectionStart,n=o.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(e.key)&&e.preventDefault(),["Enter","ArrowDown"].includes(e.key)&&(r.value=!0),["Escape"].includes(e.key)&&(r.value=!1),W.value&&["Enter","Tab"].includes(e.key)&&E.value&&!o.value.some(u=>{let{value:b}=u;return b===E.value.value})&&V(E.value),e.key==="ArrowDown"&&W.value&&((f=M.value)==null||f.focus("next")),e.key==="Enter"&&v.value&&(V(_(l,v.value),!0,!0),D.value&&(y.value="")),["Backspace","Delete"].includes(e.key)){if(!l.multiple&&D.value&&o.value.length>0&&!v.value)return V(o.value[0],!1);if(~i.value){e.preventDefault();const u=i.value;V(o.value[i.value],!1),i.value=u>=n-1?n-2:u}else e.key==="Backspace"&&!v.value&&(i.value=n-1);return}if(l.multiple)if(e.key==="ArrowLeft"){if(i.value<0&&a&&a>0)return;const u=i.value>-1?i.value-1:n-1;o.value[u]?i.value=u:(i.value=-1,(h=m.value)==null||h.setSelectionRange(v.value.length,v.value.length))}else if(e.key==="ArrowRight"){if(i.value<0)return;const u=i.value+1;o.value[u]?i.value=u:(i.value=-1,(k=m.value)==null||k.setSelectionRange(0,0))}else~i.value&&fe(e)&&(i.value=-1)}function Le(e){var c;const a=((c=e==null?void 0:e.clipboardData)==null?void 0:c.getData("Text"))??"",n=le(a);n.length>1&&l.multiple&&(e.preventDefault(),ae(n))}function Ne(){var e;l.eager&&((e=O.value)==null||e.calculateVisibleItems())}function Ke(){var e;g.value&&((e=m.value)==null||e.focus()),I.value=!0,T.value=null}function V(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!(!e||e.props.disabled))if(l.multiple){const c=o.value.findIndex(h=>(l.valueComparator||de)(h.value,e.value)),f=a??!~c;if(~c){const h=f?[...o.value,e]:[...o.value];h.splice(c,1),o.value=h}else f&&(o.value=[...o.value,e]);l.clearOnSelect&&(v.value="")}else{const c=a!==!1;o.value=c?[e]:[],(!I.value||l.alwaysFilter)&&y.value&&(T.value=y.value),y.value=c&&!D.value?e.title:"",N(()=>{r.value=n,I.value=!0})}}function le(e){const n=[` +import{h as qe,e as He,V as se,i as Ge}from"./VTextField-BurlcggD.js";import{u as Je,a as We,b as Qe,c as Xe,h as Ye,d as Ze,e as el,m as ll,f as al}from"./VSelect-oxA0t9CG.js";import{aB as tl,H as nl,aC as _,f as re,p as ul,q as ce,i as ol,a6 as il,o as sl,ag as rl,E as cl}from"./index-DGIAsv4W.js";import{f as vl,an as dl,n as ve,w as fl,o as de,E as ml,u as hl,aI as bl,aJ as pl,aK as fe,aL as gl,p as yl,a5 as xl,aM as Vl}from"./vendor-vuetify-DsKlzgKp.js";import{V as kl,a as Cl}from"./VSheet-BBnSA_kJ.js";import{V as wl}from"./VCheckboxBtn-BKcSogH0.js";import{V as me}from"./VChip-mRzIPuM0.js";import{s as P,o as L,j as d,k as S,F as Q,m as F,N as Il,n as Dl,a1 as Fl,e as w,I as N,b as A,t as Sl}from"./vendor-vue-BiQC5iF7.js";const Rl=yl({alwaysFilter:Boolean,autoSelectFirst:{type:[Boolean,String]},clearOnSelect:{type:Boolean,default:!0},delimiters:Array,...ll({filterKeys:["title"]}),...el({hideNoData:!0,returnObject:!0}),...xl(Ge({modelValue:null,role:"combobox"}),["validationValue","dirty"])},"VCombobox"),Nl=vl()({name:"VCombobox",props:Rl(),emits:{"update:focused":l=>!0,"update:modelValue":l=>!0,"update:search":l=>!0,"update:menu":l=>!0},setup(l,he){var te;let{emit:be,slots:t}=he;const{t:pe}=dl(),m=A(),g=P(!1),I=P(!0),G=P(!1),K=A(),O=A(),i=P(-1);let $=!1;const{items:X,transformIn:ge,transformOut:ye}=tl(l),{textColorClasses:xe,textColorStyles:Ve}=nl(()=>{var e;return(e=m.value)==null?void 0:e.color}),{InputIcon:ke}=qe(l),o=ve(l,"modelValue",[],e=>ge(fl(e)),e=>{const a=ye(e);return l.multiple?a:a[0]??null}),R=He(l),Y=Sl(()=>l.closableChips&&!R.isReadonly.value&&!R.isDisabled.value),z=w(()=>!!(l.chips||t.chip)),D=w(()=>z.value||!!t.selection),y=P(!l.multiple&&!D.value?((te=o.value[0])==null?void 0:te.title)??"":""),T=P(null),v=w({get:()=>y.value,set:async e=>{var a;if(y.value=e??"",e===null||e===""&&!l.multiple&&!D.value?o.value=[]:!l.multiple&&!D.value&&(o.value=[_(l,e)],N(()=>{var n;return(n=O.value)==null?void 0:n.scrollToIndex(0)})),e&&l.multiple&&((a=l.delimiters)!=null&&a.length)){const n=le(e);n.length>1&&(ae(n),y.value="")}e||(i.value=-1),I.value=!e}}),Ce=w(()=>typeof l.counterValue=="function"?l.counterValue(o.value):typeof l.counterValue=="number"?l.counterValue:l.multiple?o.value.length:v.value.length),{filteredItems:U,getMatches:we}=Je(l,X,()=>T.value??(l.alwaysFilter||!I.value?v.value:"")),x=w(()=>l.hideSelected&&T.value===null?U.value.filter(e=>!o.value.some(a=>a.value===e.value)):U.value),j=w(()=>l.hideNoData&&!x.value.length||R.isReadonly.value||R.isDisabled.value),J=ve(l,"menu"),r=w({get:()=>J.value,set:e=>{var a;J.value&&!e&&((a=K.value)!=null&&a.ΨopenChildren.size)||e&&j.value||(J.value=e)}}),{menuId:Ie,ariaExpanded:De,ariaControls:Fe}=We(l,r);L(y,e=>{$?N(()=>$=!1):g.value&&!r.value&&(r.value=!0),be("update:search",e)}),L(o,e=>{var a;!l.multiple&&!D.value&&(y.value=((a=e[0])==null?void 0:a.title)??"")});const Se=w(()=>o.value.map(e=>e.value)),E=w(()=>x.value.find(e=>e.type==="item"&&!e.props.disabled)),W=w(()=>{var a;return(l.autoSelectFirst===!0||l.autoSelectFirst==="exact"&&v.value===((a=E.value)==null?void 0:a.title))&&x.value.length>0&&!I.value&&!G.value}),M=A(),Z=A(),ee=A(),Re=Ze(M,m),Pe=al(r,()=>{var e;return(e=K.value)==null?void 0:e.contentEl},()=>{var e;return(e=m.value)==null?void 0:e.controlRef}),{onTabKeydown:Ae}=Qe({groups:[{type:"element",contentRef:Z},{type:"list",contentRef:M,displayItemsCount:()=>x.value.length},{type:"element",contentRef:ee}],onLeave:()=>{var e;r.value=!1,(e=m.value)==null||e.focus()}});function Te(e){$=!0,N(()=>$=!1),l.openOnClear&&(r.value=!0)}function Ee(){j.value||(r.value=!0)}function Me(e){j.value||(g.value&&(e.preventDefault(),e.stopPropagation()),r.value=!r.value)}function Be(e){var a,n;e.key==="Tab"&&Ae(e),(a=M.value)!=null&&a.$el.contains(e.target)&&(fe(e)||e.key==="Backspace")&&((n=m.value)==null||n.focus())}function _e(e){var c,f,h,k;if(gl(e)||R.isReadonly.value)return;const a=(c=m.value)==null?void 0:c.selectionStart,n=o.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(e.key)&&e.preventDefault(),["Enter","ArrowDown"].includes(e.key)&&(r.value=!0),["Escape"].includes(e.key)&&(r.value=!1),W.value&&["Enter","Tab"].includes(e.key)&&E.value&&!o.value.some(u=>{let{value:b}=u;return b===E.value.value})&&V(E.value),e.key==="ArrowDown"&&W.value&&((f=M.value)==null||f.focus("next")),e.key==="Enter"&&v.value&&(V(_(l,v.value),!0,!0),D.value&&(y.value="")),["Backspace","Delete"].includes(e.key)){if(!l.multiple&&D.value&&o.value.length>0&&!v.value)return V(o.value[0],!1);if(~i.value){e.preventDefault();const u=i.value;V(o.value[i.value],!1),i.value=u>=n-1?n-2:u}else e.key==="Backspace"&&!v.value&&(i.value=n-1);return}if(l.multiple)if(e.key==="ArrowLeft"){if(i.value<0&&a&&a>0)return;const u=i.value>-1?i.value-1:n-1;o.value[u]?i.value=u:(i.value=-1,(h=m.value)==null||h.setSelectionRange(v.value.length,v.value.length))}else if(e.key==="ArrowRight"){if(i.value<0)return;const u=i.value+1;o.value[u]?i.value=u:(i.value=-1,(k=m.value)==null||k.setSelectionRange(0,0))}else~i.value&&fe(e)&&(i.value=-1)}function Le(e){var c;const a=((c=e==null?void 0:e.clipboardData)==null?void 0:c.getData("Text"))??"",n=le(a);n.length>1&&l.multiple&&(e.preventDefault(),ae(n))}function Ne(){var e;l.eager&&((e=O.value)==null||e.calculateVisibleItems())}function Ke(){var e;g.value&&((e=m.value)==null||e.focus()),I.value=!0,T.value=null}function V(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!(!e||e.props.disabled))if(l.multiple){const c=o.value.findIndex(h=>(l.valueComparator||de)(h.value,e.value)),f=a??!~c;if(~c){const h=f?[...o.value,e]:[...o.value];h.splice(c,1),o.value=h}else f&&(o.value=[...o.value,e]);l.clearOnSelect&&(v.value="")}else{const c=a!==!1;o.value=c?[e]:[],(!I.value||l.alwaysFilter)&&y.value&&(T.value=y.value),y.value=c&&!D.value?e.title:"",N(()=>{r.value=n,I.value=!0})}}function le(e){const n=[` `,...l.delimiters??[]].map(Vl).join("|");return e.split(new RegExp(`(?:${n})+`))}async function ae(e){for(let a of e)a=a.trim(),a&&(V(_(l,a)),await N())}function Oe(e){g.value=!0,setTimeout(()=>{G.value=!0})}function $e(e){var a;if(G.value=!1,!((a=m.value)!=null&&a.$el.contains(e.relatedTarget))){if(Pe(e))return;g.value=!1}}function ze(e){var n;const a=(n=K.value)==null?void 0:n.contentEl;a!=null&&a.contains(e.relatedTarget)&&(g.value=!0)}return L(g,(e,a)=>{if(!(e||e===a)&&(i.value=-1,r.value=!1,v.value)){if(l.multiple){V(_(l,v.value));return}if(!D.value)return;o.value.some(n=>{let{title:c}=n;return c===v.value})?y.value="":V(_(l,v.value))}}),L(r,e=>{if(!l.hideSelected&&e&&o.value.length&&I.value){const a=x.value.findIndex(n=>o.value.some(c=>(l.valueComparator||de)(c.value,n.value)));ml&&window.requestAnimationFrame(()=>{var n;a>=0&&((n=O.value)==null||n.scrollToIndex(a))})}e&&(T.value=null)}),L(X,(e,a)=>{r.value||g.value&&!a.length&&e.length&&(r.value=!0)}),hl(()=>{const e=!!(!l.hideNoData||x.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),a=o.value.length>0,n=se.filterProps(l),c={search:v,filteredItems:U.value};return d(se,F({ref:m},n,{modelValue:v.value,"onUpdate:modelValue":f=>v.value=f,focused:g.value,"onUpdate:focused":f=>g.value=f,validationValue:o.externalValue,counterValue:Ce.value,dirty:a,class:["v-combobox",{"v-combobox--active-menu":r.value,"v-combobox--chips":!!l.chips,"v-combobox--selection-slot":!!D.value,"v-combobox--selecting-index":i.value>-1,[`v-combobox--${l.multiple?"multiple":"single"}`]:!0},l.class],style:l.style,readonly:R.isReadonly.value,placeholder:a?void 0:l.placeholder,"onClick:clear":Te,"onMousedown:control":Ee,onKeydown:_e,onPaste:Le,onBlur:ze,"aria-expanded":De.value,"aria-controls":Fe.value}),{...t,default:f=>{var k;let{id:h}=f;return S(Q,null,[d(kl,F({id:Ie.value,ref:K,modelValue:r.value,"onUpdate:modelValue":u=>r.value=u,activator:"parent",disabled:j.value,eager:l.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,onAfterEnter:Ne,onAfterLeave:Ke},l.menuProps,{contentClass:["v-combobox__content",(k=l.menuProps)==null?void 0:k.contentClass]}),{default:()=>[d(Cl,{onFocusin:Oe,onKeydown:Be},{default:()=>[t["menu-header"]&&S("header",{ref:Z},[t["menu-header"](c)]),e&&d(ul,F({key:"combobox-list",ref:M,filterable:!0,selected:Se.value,selectStrategy:l.multiple?"independent":"single-independent",onMousedown:u=>u.preventDefault(),selectable:!!x.value.length,onFocusout:$e,tabindex:"-1","aria-live":"polite","aria-labelledby":`${h.value}-label`,"aria-multiselectable":l.multiple,color:l.itemColor??l.color},Re,l.listProps),{default:()=>{var u,b,B;return[(u=t["prepend-item"])==null?void 0:u.call(t),!x.value.length&&!l.hideNoData&&(((b=t["no-data"])==null?void 0:b.call(t))??d(ce,{key:"no-data",title:pe(l.noDataText)},null)),d(Xe,{ref:O,renderless:!0,items:x.value,itemKey:"value"},{default:q=>{var ue,oe,ie;let{item:s,index:C,itemRef:p}=q;const ne=F(s.props,{ref:p,key:s.value,active:W.value&&s===E.value?!0:void 0,onClick:()=>V(s,null),"aria-posinset":C+1,"aria-setsize":x.value.length});return s.type==="divider"?((ue=t.divider)==null?void 0:ue.call(t,{props:s.raw,index:C}))??d(ol,F(s.props,{key:`divider-${C}`}),null):s.type==="subheader"?((oe=t.subheader)==null?void 0:oe.call(t,{props:s.raw,index:C}))??d(il,F(s.props,{key:`subheader-${C}`}),null):((ie=t.item)==null?void 0:ie.call(t,{item:s,index:C,props:ne}))??d(ce,F(ne,{role:"option"}),{prepend:H=>{let{isSelected:Ue}=H;return S(Q,null,[l.multiple&&!l.hideSelected?d(wl,{key:s.value,modelValue:Ue,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:je=>je.preventDefault()},null):void 0,s.props.prependAvatar&&d(sl,{image:s.props.prependAvatar},null),s.props.prependIcon&&d(re,{icon:s.props.prependIcon},null)])},title:()=>{var H;return I.value?s.title:Ye("v-combobox",s.title,(H=we(s))==null?void 0:H.title)}})}}),(B=t["append-item"])==null?void 0:B.call(t)]}}),t["menu-footer"]&&S("footer",{ref:ee},[t["menu-footer"](c)])]})]}),o.value.map((u,b)=>{function B(p){p.stopPropagation(),p.preventDefault(),V(u,!1)}const q=F(me.filterProps(u.props),{"onClick:close":B,onKeydown(p){p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),p.stopPropagation(),B(p))},onMousedown(p){p.preventDefault(),p.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),s=z.value?!!t.chip:!!t.selection,C=s?pl(z.value?t.chip({item:u,index:b,props:q}):t.selection({item:u,index:b})):void 0;if(!(s&&!C))return S("div",{key:u.value,class:Dl(["v-combobox__selection",b===i.value&&["v-combobox__selection--selected",xe.value]]),style:Il(b===i.value?Ve.value:{})},[z.value?t.chip?d(rl,{key:"chip-defaults",defaults:{VChip:{closable:Y.value,size:"small",text:u.title}}},{default:()=>[C]}):d(me,F({key:"chip",closable:Y.value,size:"small",text:u.title,disabled:u.props.disabled},q),null):C??S("span",{class:"v-combobox__selection-text"},[u.title,l.multiple&&bp(e.tag,{class:d(["v-container",{"v-container--fluid":e.fluid},n.value,e.class]),style:C([o.value,e.style])},a)),{}}});export{P as V}; +import{f as t,A as r,u as l,p as i,k as m}from"./vendor-vuetify-DsKlzgKp.js";import{b as u,m as c,a as f}from"./index-DGIAsv4W.js";import{j as p,N as C,n as d}from"./vendor-vue-BiQC5iF7.js";const y=i({fluid:{type:Boolean,default:!1},...m(),...f(),...c()},"VContainer"),P=t()({name:"VContainer",props:y(),setup(e,s){let{slots:a}=s;const{rtlClasses:n}=r(),{dimensionStyles:o}=u(e);return l(()=>p(e.tag,{class:d(["v-container",{"v-container--fluid":e.fluid},n.value,e.class]),style:C([o.value,e.style])},a)),{}}});export{P as V}; diff --git a/assets/VDataTable-Bg4qcCRf.js b/assets/VDataTable-DmTCHg4b.js similarity index 98% rename from assets/VDataTable-Bg4qcCRf.js rename to assets/VDataTable-DmTCHg4b.js index ba99e07..53c6893 100644 --- a/assets/VDataTable-Bg4qcCRf.js +++ b/assets/VDataTable-DmTCHg4b.js @@ -1 +1 @@ -import{n as q,p as _,l as $e,z as be,f as J,an as ce,u as te,a5 as Pe,I as G,av as vt,s as R,aw as yt,w as Z,ah as ht,o as He,ax as ue,ay as ne,F as bt,a0 as we,az as ke,ag as pe,aj as xe,aA as Be,ai as re,j as pt}from"./vendor-vuetify-95axeNJO.js";import{l as j,e as I,d as X,o as Ie,p as Y,k as S,j as w,m as H,n as ie,w as xt,a as St,b as U,s as Pt,t as N,F as Q,N as wt,I as kt,a1 as Oe,x as oe,aa as se,S as It,y as Dt}from"./vendor-vue-28M5UGz3.js";import{V as Ee}from"./VPagination-CwVL3tMR.js";import{V as Le,u as Tt,m as Vt}from"./VSelect-DZBjiB3J.js";import{a7 as Ct,I as Ft,a8 as Bt,f as _e,a9 as Ot,M as De,h as je,i as Et}from"./index-CzpSlHRw.js";import{V as _t}from"./VChip-B3whZF-S.js";import{V as de}from"./VCheckboxBtn-BLxCsxXE.js";import{b as Ae,m as At}from"./VTable-D9zIyrqQ.js";const Nt=_({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10},pageBy:{type:String,default:"any"}},"DataTable-paginate"),Me=Symbol.for("vuetify:data-table-pagination");function Rt(e){const a=q(e,"page",void 0,t=>Number(t??1)),l=q(e,"itemsPerPage",void 0,t=>Number(t??10));return{page:a,itemsPerPage:l}}function Gt(e){const{page:a,itemsPerPage:l,itemsLength:t}=e,n=I(()=>l.value===-1?0:l.value*(a.value-1)),r=I(()=>l.value===-1?t.value:Math.min(t.value,n.value+l.value)),o=I(()=>l.value===-1||t.value===0?1:Math.ceil(t.value/l.value));Ie([a,o],()=>{a.value>o.value&&(a.value=o.value)});function i(f){l.value=f,a.value=1}function u(){a.value=be(a.value+1,1,o.value)}function c(){a.value=be(a.value-1,1,o.value)}function g(f){a.value=be(f,1,o.value)}const v={page:a,itemsPerPage:l,startIndex:n,stopIndex:r,pageCount:o,itemsLength:t,nextPage:u,prevPage:c,setPage:g,setItemsPerPage:i};return Y(Me,v),v}function $t(){const e=X(Me);if(!e)throw new Error("Missing pagination!");return e}function Ht(e){const a=$e("usePaginatedItems"),{items:l,startIndex:t,stopIndex:n,itemsPerPage:r}=e,o=I(()=>r.value<=0?j(l):j(l).slice(t.value,n.value));return Ie(o,i=>{a.emit("update:currentItems",i)},{immediate:!0}),{paginatedItems:o}}function Lt(e){const{sortedItems:a,paginate:l,group:t}=e,n=j(e.pageBy);if(n==="item"){const{paginatedItems:r,pageCount:o,setItemsPerPage:i}=l(a),{flatItems:u}=t(r);return{pageCount:o,setItemsPerPage:i,paginatedItems:u}}if(n==="group"){const{flatItems:r,groups:o}=t(a),{paginatedItems:i,pageCount:u,setItemsPerPage:c}=l(o),g=I(()=>{if(!i.value.length)return[];const v=i.value.at(0).id,f=i.value.at(-1).id,p=r.value.findIndex(d=>d.type==="group"&&d.id===v),y=r.value.findIndex(d=>d.type==="group"&&d.id===f),h=r.value.findIndex((d,b)=>b>y&&d.type==="group"&&d.depth===0);return r.value.slice(p,h===-1?void 0:h)});return{pageCount:u,setItemsPerPage:c,paginatedItems:g}}if(n==="any"){const{flatItems:r}=t(a),{paginatedItems:o,pageCount:i,setItemsPerPage:u}=l(r);return{pageCount:i,setItemsPerPage:u,paginatedItems:o}}throw new Error(`Unrecognized pagination target ${n}`)}const We=_({color:String,prevIcon:{type:G,default:"$prev"},nextIcon:{type:G,default:"$next"},firstIcon:{type:G,default:"$first"},lastIcon:{type:G,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),Ne=J()({name:"VDataTableFooter",props:We(),setup(e,a){let{slots:l}=a;const{t}=ce(),{page:n,pageCount:r,startIndex:o,stopIndex:i,itemsLength:u,itemsPerPage:c,setItemsPerPage:g}=$t(),v=I(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?t("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?t(f.title):f.title}));return te(()=>{var p;const f=Ee.filterProps(e);return S("div",{class:"v-data-table-footer"},[(p=l.prepend)==null?void 0:p.call(l),S("div",{class:"v-data-table-footer__items-per-page"},[S("span",null,[t(e.itemsPerPageText)]),w(Le,{items:v.value,itemColor:e.color,modelValue:c.value,"onUpdate:modelValue":y=>g(Number(y)),density:"compact",variant:"outlined","aria-label":t(e.itemsPerPageText),hideDetails:!0},null)]),S("div",{class:"v-data-table-footer__info"},[S("div",null,[t(e.pageText,u.value?o.value+1:0,i.value,u.value)])]),S("div",{class:"v-data-table-footer__pagination"},[w(Ee,H({modelValue:n.value,"onUpdate:modelValue":y=>n.value=y,density:"comfortable",firstAriaLabel:e.firstPageLabel,lastAriaLabel:e.lastPageLabel,length:r.value,nextAriaLabel:e.nextPageLabel,previousAriaLabel:e.prevPageLabel,rounded:!0,showFirstLastPage:!0,totalVisible:e.showCurrentPage?1:0,variant:"plain"},Pe(f,["color"])),null)])])}),{}}}),ee=vt({align:{type:String,default:"start"},fixed:{type:[Boolean,String],default:!1},fixedOffset:[Number,String],fixedEndOffset:[Number,String],height:[Number,String],lastFixed:Boolean,firstFixedEnd:Boolean,noPadding:Boolean,indent:[Number,String],empty:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,a)=>{let{slots:l}=a;const t=e.tag??"td",n=typeof e.fixed=="string"?e.fixed:e.fixed?"start":"none";return w(t,{class:ie(["v-data-table__td",{"v-data-table-column--fixed":n==="start","v-data-table-column--fixed-end":n==="end","v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--first-fixed-end":e.firstFixedEnd,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap,"v-data-table-column--empty":e.empty},`v-data-table-column--align-${e.align}`]),style:{height:R(e.height),width:R(e.width),maxWidth:R(e.maxWidth),left:n==="start"?R(e.fixedOffset||null):void 0,right:n==="end"?R(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?R(e.indent):void 0}},{default:()=>{var r;return[(r=l.default)==null?void 0:r.call(l)]}})}),jt=_({headers:Array},"DataTable-header"),ze=Symbol.for("vuetify:data-table-headers"),Ke={title:"",sortable:!1},Mt={...Ke,width:48};function Wt(){const a=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(l=>({element:l,priority:0}));return{enqueue:(l,t)=>{let n=!1;for(let r=0;rt){a.splice(r,0,{element:l,priority:t}),n=!0;break}n||a.push({element:l,priority:t})},size:()=>a.length,count:()=>{let l=0;if(!a.length)return 0;const t=Math.floor(a[0].priority);for(let n=0;na.shift()}}function Se(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)a.push(e);else for(const l of e.children)Se(l,a);return a}function Ue(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const l of e)l.key&&a.add(l.key),l.children&&Ue(l.children,a);return a}function zt(e){if(e.key){if(e.key==="data-table-group")return Ke;if(["data-table-expand","data-table-select"].includes(e.key))return Mt}}function Te(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(a,...e.children.map(l=>Te(l,a+1))):a}function Kt(e){let a=!1;function l(r,o){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"none";if(r)if(i!=="none"&&(r.fixed=i),r.fixed===!0&&(r.fixed="start"),r.fixed===o)if(r.children)if(o==="start")for(let u=r.children.length-1;u>=0;u--)l(r.children[u],o,o);else for(let u=0;u=0;u--)l(r.children[u],o);else for(let u=0;u=0;r--)l(e[r],"start");for(let r=0;r=0;r--)n=Qe(e[r],n)}function qe(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return a;if(e.children){e.fixedOffset=a;for(const l of e.children)a=qe(l,a)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=a,a+=parseFloat(e.width||"0")||0);return a}function Qe(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return a;if(e.children){e.fixedEndOffset=a;for(const l of e.children)a=Qe(l,a)}else e.fixed==="end"&&(e.fixedEndOffset=a,a+=parseFloat(e.width||"0")||0);return a}function Ut(e,a){const l=[];let t=0;const n=Wt(e);for(;n.size()>0;){let o=n.count();const i=[];let u=1;for(;o>0;){const{element:c,priority:g}=n.dequeue(),v=a-t-Te(c);if(i.push({...c,rowspan:v??1,colspan:c.children?Se(c).length:1}),c.children)for(const f of c.children){const p=g%1+u/Math.pow(10,t+2);n.enqueue(f,t+v+p)}u+=1,o-=1}t+=1,l.push(i)}return{columns:e.map(o=>Se(o)).flat(),headers:l}}function Je(e){const a=[];for(const l of e){const t={...zt(l),...l},n=t.key??(typeof t.value=="string"?t.value:null),r=t.value??n??null,o={...t,key:n,value:r,sortable:t.sortable??(t.key!=null||!!t.sort),children:t.children?Je(t.children):void 0};a.push(o)}return a}function qt(e,a){const l=U([]),t=U([]),n=U({}),r=U({}),o=U({});xt(()=>{var h,d,b;const c=(e.headers||Object.keys(e.items[0]??{}).map(s=>({key:s,title:St(s)}))).slice(),g=Ue(c);(h=a==null?void 0:a.groupBy)!=null&&h.value.length&&!g.has("data-table-group")&&c.unshift({key:"data-table-group",title:"Group"}),(d=a==null?void 0:a.showSelect)!=null&&d.value&&!g.has("data-table-select")&&c.unshift({key:"data-table-select"}),(b=a==null?void 0:a.showExpand)!=null&&b.value&&!g.has("data-table-expand")&&c.push({key:"data-table-expand"});const v=Je(c);Kt(v);const f=Math.max(...v.map(s=>Te(s)))+1,p=Ut(v,f);l.value=p.headers,t.value=p.columns;const y=p.headers.flat(1);for(const s of y)s.key&&(s.sortable&&(s.sort&&(n.value[s.key]=s.sort),s.sortRaw&&(r.value[s.key]=s.sortRaw)),s.filter&&(o.value[s.key]=s.filter))});const i={headers:l,columns:t,sortFunctions:n,sortRawFunctions:r,filterFunctions:o};return Y(ze,i),i}function fe(){const e=X(ze);if(!e)throw new Error("Missing headers!");return e}const Qt={showSelectAll:!1,allSelected:()=>[],select:e=>{var t;let{items:a,value:l}=e;return new Set(l?[(t=a[0])==null?void 0:t.value]:[])},selectAll:e=>{let{selected:a}=e;return a}},Xe={showSelectAll:!0,allSelected:e=>{let{currentPage:a}=e;return a},select:e=>{let{items:a,value:l,selected:t}=e;for(const n of a)l?t.add(n.value):t.delete(n.value);return t},selectAll:e=>{let{value:a,currentPage:l,selected:t}=e;return Xe.select({items:l,value:a,selected:t})}},Jt={showSelectAll:!0,allSelected:e=>{let{allItems:a}=e;return a},select:e=>{let{items:a,value:l,selected:t}=e;for(const n of a)l?t.add(n.value):t.delete(n.value);return t},selectAll:e=>{let{value:a,allItems:l}=e;return new Set(a?l.map(t=>t.value):[])}},Xt=_({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:Function},"DataTable-select"),Ye=Symbol.for("vuetify:data-table-selection");function Yt(e,a){let{allItems:l,currentPage:t}=a;const n=q(e,"modelValue",e.modelValue,s=>{const x=e.valueComparator;return x?new Set(Z(s).map(D=>{var P;return((P=l.value.find(F=>x(D,F.value)))==null?void 0:P.value)??D})):new Set(Z(s).map(D=>{var P,F;return ht(D)?((P=l.value.find(V=>D===V.value))==null?void 0:P.value)??D:((F=l.value.find(V=>He(D,V.value)))==null?void 0:F.value)??D}))},s=>[...s.values()]),r=I(()=>l.value.filter(s=>s.selectable)),o=I(()=>j(t).filter(s=>s.selectable)),i=I(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return Qt;case"all":return Jt;case"page":default:return Xe}}),u=Pt(null);function c(s){return Z(s).every(x=>n.value.has(x.value))}function g(s){return Z(s).some(x=>n.value.has(x.value))}function v(s,x){const D=i.value.select({items:s,value:x,selected:new Set(n.value)});n.value=D}function f(s,x,D){const P=[],F=j(t);if(x=x??F.findIndex(V=>V.value===s.value),e.selectStrategy!=="single"&&(D!=null&&D.shiftKey)&&u.value!==null){const[V,W]=[u.value,x].sort((k,m)=>k-m);P.push(...F.slice(V,W+1).filter(k=>k.selectable))}else P.push(s),u.value=x;v(P,!c([s]))}function p(s){const x=i.value.selectAll({value:s,allItems:r.value,currentPage:o.value,selected:new Set(n.value)});n.value=x}const y=I(()=>n.value.size>0),h=I(()=>{const s=i.value.allSelected({allItems:r.value,currentPage:o.value});return!!s.length&&c(s)}),d=N(()=>i.value.showSelectAll),b={toggleSelect:f,select:v,selectAll:p,isSelected:c,isSomeSelected:g,someSelected:y,allSelected:h,showSelectAll:d,lastSelectedIndex:u,selectStrategy:i};return Y(Ye,b),b}function ge(){const e=X(Ye);if(!e)throw new Error("Missing selection!");return e}const Zt=_({initialSortOrder:{type:String,default:"asc",validator:e=>!e||["asc","desc"].includes(e)},sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:{type:[Boolean,Object],default:!1},mustSort:Boolean},"DataTable-sort"),Ze=Symbol.for("vuetify:data-table-sort");function ea(e){const a=N(()=>e.initialSortOrder),l=q(e,"sortBy"),t=N(()=>e.mustSort),n=N(()=>e.multiSort);return{initialSortOrder:a,sortBy:l,multiSort:n,mustSort:t}}function ta(e,a){if(!bt(e))return{active:!!e};const{key:l,mode:t,modifier:n}=e,r=n==="alt"&&(a==null?void 0:a.altKey)||n==="shift"&&(a==null?void 0:a.shiftKey);return{active:!l||(a==null?void 0:a.ctrlKey)||(a==null?void 0:a.metaKey)||!1,mode:r?t==="append"?"prepend":"append":t}}function aa(e){const{initialSortOrder:a,sortBy:l,mustSort:t,multiSort:n,page:r}=e,o=function(c,g){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(c.key==null)return;let f=l.value.map(d=>({...d}))??[];const p=f.find(d=>d.key===c.key),y=a.value,h=a.value==="desc"?"asc":"desc";if(p)p.order===h?v||t.value&&f.length===1?p.order=a.value:f=f.filter(d=>d.key!==c.key):p.order=h;else{const{active:d,mode:b}=ta(n.value,g);d?b==="prepend"?f.unshift({key:c.key,order:y}):f.push({key:c.key,order:y}):f=[{key:c.key,order:y}]}l.value=f,r&&(r.value=1)};function i(c){return!!l.value.find(g=>g.key===c.key)}const u={sortBy:l,toggleSort:o,isSorted:i};return Y(Ze,u),u}function et(){const e=X(Ze);if(!e)throw new Error("Missing sort!");return e}function la(e,a,l,t){const n=ce();return{sortedItems:I(()=>{var o,i;return l.value.length?na(a.value,l.value,n.current.value,{transform:t==null?void 0:t.transform,sortFunctions:{...e.customKeySort,...(o=t==null?void 0:t.sortFunctions)==null?void 0:o.value},sortRawFunctions:(i=t==null?void 0:t.sortRawFunctions)==null?void 0:i.value}):a.value})}}function na(e,a,l,t){const n=new Intl.Collator(l,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,t!=null&&t.transform?t.transform(o):o]).sort((o,i)=>{var u,c;for(let g=0;gs!=null?s.toString().toLocaleLowerCase():s),y!==h))return ne(y)&&ne(h)?0:ne(y)?-1:ne(h)?1:!isNaN(y)&&!isNaN(h)?Number(y)-Number(h):n.compare(y,h)}return 0}).map(o=>{let[i]=o;return i})}const tt=_({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,initialSortOrder:String,sortIcon:{type:G},sortAscIcon:{type:G,default:"$sortAsc"},sortDescIcon:{type:G,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...De(),...ke(),...Ot()},"VDataTableHeaders"),Re=J()({name:"VDataTableHeaders",props:tt(),setup(e,a){let{slots:l}=a;const{t}=ce(),{toggleSort:n,sortBy:r,isSorted:o}=et(),{someSelected:i,allSelected:u,selectAll:c,showSelectAll:g}=ge(),{columns:v,headers:f}=fe(),{loaderClasses:p}=Ct(e);function y(k,m){if(!(e.sticky||e.fixedHeader)&&!k.fixed)return;const E=typeof k.fixed=="string"?k.fixed:k.fixed?"start":"none";return{position:"sticky",left:E==="start"?R(k.fixedOffset):void 0,right:E==="end"?R(k.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${m})`:void 0}}function h(k,m){k.key==="Enter"&&!e.disableSort&&n(m,k)}function d(k){const m=r.value.find(E=>E.key===k.key);switch(m==null?void 0:m.order){case"asc":return e.sortAscIcon;case"desc":return e.sortDescIcon;default:return e.sortIcon||(e.initialSortOrder==="asc"?e.sortAscIcon:e.sortDescIcon)}}const{backgroundColorClasses:b,backgroundColorStyles:s}=Ft(()=>e.color),{displayClasses:x,mobile:D}=we(e),P=I(()=>({headers:f.value,columns:v.value,toggleSort:n,isSorted:o,sortBy:r.value,someSelected:i.value,allSelected:u.value,selectAll:c,getSortIcon:d})),F=I(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},x.value,p.value]),V=k=>{let{column:m,x:E,y:T}=k;const B=m.key==="data-table-select"||m.key==="data-table-expand",O=m.key==="data-table-group"&&m.width===0&&!m.title,L=H(e.headerProps??{},m.headerProps??{});return w(ee,H({tag:"th",align:m.align,class:[{"v-data-table__th--sortable":m.sortable&&!e.disableSort,"v-data-table__th--sorted":o(m),"v-data-table__th--fixed":m.fixed},...F.value],style:{width:R(m.width),minWidth:R(m.minWidth),maxWidth:R(m.maxWidth),...y(m,T)},colspan:m.colspan,rowspan:m.rowspan,fixed:m.fixed,nowrap:m.nowrap,lastFixed:m.lastFixed,firstFixedEnd:m.firstFixedEnd,noPadding:B,empty:O,tabindex:m.sortable?0:void 0,onClick:m.sortable?C=>n(m,C):void 0,onKeydown:m.sortable?C=>h(C,m):void 0},L),{default:()=>{var K;const C=`header.${m.key}`,M={column:m,selectAll:c,isSorted:o,toggleSort:n,sortBy:r.value,someSelected:i.value,allSelected:u.value,getSortIcon:d};return l[C]?l[C](M):O?"":m.key==="data-table-select"?((K=l["header.data-table-select"])==null?void 0:K.call(l,M))??(g.value&&w(de,{color:e.color,density:e.density,modelValue:u.value,indeterminate:i.value&&!u.value,"onUpdate:modelValue":c},null)):S("div",{class:"v-data-table-header__content"},[S("span",null,[m.title]),m.sortable&&!e.disableSort&&w(_e,{key:"icon",class:"v-data-table-header__sort-icon",icon:d(m)},null),e.multiSort&&o(m)&&S("div",{key:"badge",class:ie(["v-data-table-header__sort-badge",...b.value]),style:wt(s.value)},[r.value.findIndex(me=>me.key===m.key)+1])])}})},W=()=>{const k=I(()=>v.value.filter(T=>(T==null?void 0:T.sortable)&&!e.disableSort)),m=v.value.find(T=>T.key==="data-table-select"),E=I({get:()=>k.value.filter(T=>{let{key:B}=T;return r.value.some(O=>O.key===B)}),set:T=>{const B=Z(T),O=r.value.map(C=>C.key);B.filter(C=>{let{key:M}=C;return!O.includes(M)}).forEach(C=>n(C)),kt(()=>r.value=r.value.filter(C=>{let{key:M}=C;return B.some(K=>K.key===M)}))}});return w(ee,H({tag:"th",class:[...F.value],colspan:f.value.length+1},e.headerProps),{default:()=>[S("div",{class:"v-data-table-header__content"},[w(Le,{modelValue:E.value,"onUpdate:modelValue":T=>E.value=T,chips:!0,color:e.color,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:k.value,label:t("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined",returnObject:!0,"onClick:clear":()=>r.value=[]},{append:m?()=>w(de,{color:e.color,density:"compact",modelValue:u.value,indeterminate:i.value&&!u.value,"onUpdate:modelValue":()=>c(!u.value)},null):void 0,chip:T=>{let{item:B}=T;return w(_t,{onClick:B.raw.sortable?()=>n(B.raw,void 0,!0):void 0,onMousedown:O=>{O.preventDefault(),O.stopPropagation()}},{default:()=>[B.title,w(_e,{class:ie(["v-data-table__td-sort-icon",o(B.raw)&&"v-data-table__td-sort-icon-active"]),icon:d(B.raw),size:"small"},null)]})}})])]})};te(()=>D.value?S("tr",null,[w(W,null,null)]):S(Q,null,[l.headers?l.headers(P.value):f.value.map((k,m)=>S("tr",null,[k.map((E,T)=>w(V,{column:E,x:T,y:m},null))])),e.loading&&S("tr",{class:"v-data-table-progress"},[S("th",{colspan:v.value.length},[w(Bt,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"||e.loading==="true"?e.color:e.loading,indeterminate:!0},{default:l.loader})])])]))}}),ra=_({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),at=Symbol.for("vuetify:data-table-group");function oa(e){return{groupBy:q(e,"groupBy")}}function sa(e){const{disableSort:a,groupBy:l,sortBy:t}=e,n=U(new Set),r=I(()=>l.value.map(g=>({...g,order:g.order??!1})).concat(a!=null&&a.value?[]:t.value));function o(g){return n.value.has(g.id)}function i(g){const v=new Set(n.value);o(g)?v.delete(g.id):v.add(g.id),n.value=v}function u(g){function v(f){const p=[];for(const y of f.items)"type"in y&&y.type==="group"?p.push(...v(y)):p.push(y);return[...new Set(p)]}return v({items:g})}const c={sortByWithGroups:r,toggleGroup:i,opened:n,groupBy:l,extractRows:u,isGroupOpen:o};return Y(at,c),c}function lt(){const e=X(at);if(!e)throw new Error("Missing group!");return e}function ua(e,a){if(!e.length)return[];const l=new Map;for(const t of e){const n=ue(t.raw,a);l.has(n)||l.set(n,[]),l.get(n).push(t)}return l}function nt(e,a){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!a.length)return[];const n=ua(e,a[0]),r=[],o=a.slice(1);return n.forEach((i,u)=>{const c=a[0],g=`${t}_${c}_${u}`;r.push({depth:l,id:g,key:c,value:u,items:o.length?nt(i,o,l+1,g):i,type:"group"})}),r}function rt(e,a,l){const t=[];for(const n of e)"type"in n&&n.type==="group"?(n.value!=null&&t.push(n),(a.has(n.id)||n.value==null)&&(t.push(...rt(n.items,a,l)),l&&t.push({...n,type:"group-summary"}))):t.push(n);return t}function ia(e,a,l,t){const n=I(()=>a.value.length?nt(j(e),a.value.map(o=>o.key)):[]),r=I(()=>a.value.length?rt(n.value,l.value,j(t)):j(e));return{groups:n,flatItems:r}}const ot=_({item:{type:Object,required:!0},groupCollapseIcon:{type:G,default:"$tableGroupCollapse"},groupExpandIcon:{type:G,default:"$tableGroupExpand"},...De()},"VDataTableGroupHeaderRow"),da=J()({name:"VDataTableGroupHeaderRow",props:ot(),setup(e,a){let{slots:l}=a;const{isGroupOpen:t,toggleGroup:n,extractRows:r}=lt(),{isSelected:o,isSomeSelected:i,select:u}=ge(),{columns:c}=fe(),g=I(()=>r([e.item])),v=N(()=>c.value.length-(c.value.some(f=>f.key==="data-table-select")?1:0));return()=>S("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[c.value.map(f=>{var p,y;if(f.key==="data-table-group"){const h=t(e.item)?e.groupCollapseIcon:e.groupExpandIcon,d=()=>n(e.item);return((p=l["data-table-group"])==null?void 0:p.call(l,{item:e.item,count:g.value.length,props:{icon:h,onClick:d}}))??w(ee,{class:"v-data-table-group-header-row__column",colspan:v.value},{default:()=>[w(je,{size:"small",variant:"text",icon:h,onClick:d},null),S("span",null,[e.item.value]),S("span",null,[Oe("("),g.value.length,Oe(")")])]})}else if(f.key==="data-table-select"){const h=g.value.filter(x=>x.selectable),d=h.length>0&&o(h),b=i(h)&&!d,s=x=>u(h,x);return((y=l["data-table-select"])==null?void 0:y.call(l,{props:{modelValue:d,indeterminate:b,"onUpdate:modelValue":s}}))??w(ee,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[w(de,{density:e.density,disabled:h.length===0,modelValue:d,indeterminate:b,"onUpdate:modelValue":s},null)]})}return""})])}}),ca=_({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),st=Symbol.for("vuetify:datatable:expanded");function fa(e){const a=N(()=>e.expandOnClick),l=q(e,"expanded",e.expanded,i=>new Set(i),i=>[...i.values()]);function t(i,u){const c=new Set(l.value),g=oe(i.value);if(u)c.add(g);else{const v=[...l.value].find(f=>oe(f)===g);c.delete(v)}l.value=c}function n(i){const u=oe(i.value);return[...l.value].some(c=>oe(c)===u)}function r(i){t(i,!n(i))}const o={expand:t,expanded:l,expandOnClick:a,isExpanded:n,toggleExpand:r};return Y(st,o),o}function ut(){const e=X(st);if(!e)throw new Error("foo");return e}const it=_({color:String,index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:G,default:"$collapse"},expandIcon:{type:G,default:"$expand"},onClick:pe(),onContextmenu:pe(),onDblclick:pe(),...De(),...ke()},"VDataTableRow"),ga=J()({name:"VDataTableRow",props:it(),setup(e,a){let{slots:l}=a;const{displayClasses:t,mobile:n}=we(e,"v-data-table__tr"),{isSelected:r,toggleSelect:o,someSelected:i,allSelected:u,selectAll:c}=ge(),{isExpanded:g,toggleExpand:v}=ut(),{toggleSort:f,sortBy:p,isSorted:y}=et(),{columns:h}=fe();te(()=>S("tr",{class:ie(["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},t.value]),onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&h.value.map((d,b)=>{const s=e.item,x=`item.${d.key}`,D=`header.${d.key}`,P={index:e.index,item:s.raw,internalItem:s,value:ue(s.columns,d.key),column:d,isSelected:r,toggleSelect:o,isExpanded:g,toggleExpand:v},F={column:d,selectAll:c,isSorted:y,toggleSort:f,sortBy:p.value,someSelected:i.value,allSelected:u.value,getSortIcon:()=>""},V=typeof e.cellProps=="function"?e.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value,column:d}):e.cellProps,W=typeof d.cellProps=="function"?d.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value}):d.cellProps,k=d.key==="data-table-select"||d.key==="data-table-expand",m=d.key==="data-table-group"&&d.width===0&&!d.title;return w(ee,H({align:d.align,indent:d.indent,class:{"v-data-table__td--expanded-row":d.key==="data-table-expand","v-data-table__td--select-row":d.key==="data-table-select"},fixed:d.fixed,fixedOffset:d.fixedOffset,fixedEndOffset:d.fixedEndOffset,lastFixed:d.lastFixed,firstFixedEnd:d.firstFixedEnd,maxWidth:n.value?void 0:d.maxWidth,noPadding:k,empty:m,nowrap:d.nowrap,width:n.value?void 0:d.width},V,W),{default:()=>{var T,B,O,L;if(d.key==="data-table-select")return((T=l["item.data-table-select"])==null?void 0:T.call(l,{...P,props:{color:e.color,disabled:!s.selectable,modelValue:r([s]),onClick:se(()=>o(s),["stop"])}}))??w(de,{color:e.color,disabled:!s.selectable,density:e.density,modelValue:r([s]),onClick:se(C=>o(s,e.index,C),["stop"])},null);if(d.key==="data-table-expand")return((B=l["item.data-table-expand"])==null?void 0:B.call(l,{...P,props:{icon:g(s)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:se(()=>v(s),["stop"])}}))??w(je,{icon:g(s)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:se(()=>v(s),["stop"])},null);if(l[x]&&!n.value)return l[x](P);const E=It(P.value);return n.value?S(Q,null,[S("div",{class:"v-data-table__td-title"},[((O=l[D])==null?void 0:O.call(l,F))??d.title]),S("div",{class:"v-data-table__td-value"},[((L=l[x])==null?void 0:L.call(l,P))??E])]):E}})})]))}}),dt=_({color:String,loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...xe(it(),["collapseIcon","expandIcon","density"]),...xe(ot(),["groupCollapseIcon","groupExpandIcon","density"]),...ke()},"VDataTableRows"),Ge=J()({name:"VDataTableRows",inheritAttrs:!1,props:dt(),setup(e,a){let{attrs:l,slots:t}=a;const{columns:n}=fe(),{expandOnClick:r,toggleExpand:o,isExpanded:i}=ut(),{isSelected:u,toggleSelect:c}=ge(),{toggleGroup:g,isGroupOpen:v}=lt(),{t:f}=ce(),{mobile:p}=we(e);return te(()=>{var h,d;const y=xe(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||t.loading)?S("tr",{class:"v-data-table-rows-loading",key:"loading"},[S("td",{colspan:n.value.length},[((h=t.loading)==null?void 0:h.call(t))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?S("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[S("td",{colspan:n.value.length},[((d=t["no-data"])==null?void 0:d.call(t))??f(e.noDataText)])]):S(Q,null,[e.items.map((b,s)=>{var P,F;if(b.type==="group"){const V={index:s,item:b,columns:n.value,isExpanded:i,toggleExpand:o,isSelected:u,toggleSelect:c,toggleGroup:g,isGroupOpen:v};return t["group-header"]?t["group-header"](V):w(da,H({key:`group-header_${b.id}`,item:b},Be(l,":groupHeader",()=>V),y),t)}if(b.type==="group-summary"){const V={index:s,item:b,columns:n.value,toggleGroup:g};return((P=t["group-summary"])==null?void 0:P.call(t,V))??""}const x={index:b.virtualIndex??s,item:b.raw,internalItem:b,columns:n.value,isExpanded:i,toggleExpand:o,isSelected:u,toggleSelect:c},D={...x,props:H({key:`item_${b.key??b.index}`,onClick:r.value?()=>{o(b)}:void 0,index:s,item:b,color:e.color,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:p.value},Be(l,":row",()=>x),typeof e.rowProps=="function"?e.rowProps({item:x.item,index:x.index,internalItem:x.internalItem}):e.rowProps)};return S(Q,{key:D.props.key},[t.item?t.item(D):w(ga,D.props,t),i(b)&&((F=t["expanded-row"])==null?void 0:F.call(t,x))])})])}),{}}}),ma=_({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function va(e,a,l,t){const n=e.returnObject?a:re(a,e.itemValue),r=re(a,e.itemSelectable,!0),o=t.reduce((i,u)=>(u.key!=null&&(i[u.key]=re(a,u.value)),i),{});return{type:"item",key:e.returnObject?re(a,e.itemValue):n,index:l,value:n,selectable:r,columns:o,raw:a}}function ya(e,a,l){return a.map((t,n)=>va(e,t,n,l))}function ha(e,a){return{items:I(()=>ya(e,e.items,a.value))}}function ba(e){let{page:a,itemsPerPage:l,sortBy:t,groupBy:n,search:r}=e;const o=$e("VDataTable"),i=()=>({page:a.value,itemsPerPage:l.value,sortBy:t.value,groupBy:n.value,search:r.value});let u=null;Ie(i,c=>{He(u,c)||(u&&u.search!==c.search&&(a.value=1),o.emit("update:options",c),u=c)},{deep:!0,immediate:!0})}const pa=_({...dt(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...ca(),...ra(),...jt(),...ma(),...Xt(),...Zt(),...Pe(tt(),["multiSort","initialSortOrder"]),...At()},"DataTable"),xa=_({...Nt(),...pa(),...Vt(),...We()},"VDataTable"),Ca=J()({name:"VDataTable",props:xa(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,a){let{attrs:l,slots:t}=a;const{groupBy:n}=oa(e),{initialSortOrder:r,sortBy:o,multiSort:i,mustSort:u}=ea(e),{page:c,itemsPerPage:g}=Rt(e),{disableSort:v}=Dt(e),{columns:f,headers:p,sortFunctions:y,sortRawFunctions:h,filterFunctions:d}=qt(e,{groupBy:n,showSelect:N(()=>e.showSelect),showExpand:N(()=>e.showExpand)}),{items:b}=ha(e,f),s=N(()=>e.search),{filteredItems:x}=Tt(e,b,s,{transform:A=>A.columns,customKeyFilter:d}),{toggleSort:D}=aa({initialSortOrder:r,sortBy:o,multiSort:i,mustSort:u,page:c}),{sortByWithGroups:P,opened:F,extractRows:V,isGroupOpen:W,toggleGroup:k}=sa({groupBy:n,sortBy:o,disableSort:v}),{sortedItems:m}=la(e,x,P,{transform:A=>({...A.raw,...A.columns}),sortFunctions:y,sortRawFunctions:h}),E=I(()=>e.pageBy==="auto"?e.groupBy.length?"group":"item":e.pageBy),{pageCount:T,setItemsPerPage:B,paginatedItems:O}=Lt({pageBy:E,sortedItems:m,paginate:A=>{const ve=I(()=>j(A).length),{startIndex:ye,stopIndex:he,pageCount:z,setItemsPerPage:ae}=Gt({page:c,itemsPerPage:g,itemsLength:ve}),{paginatedItems:le}=Ht({items:A,startIndex:ye,stopIndex:he,itemsPerPage:g});return{paginatedItems:le,pageCount:z,setItemsPerPage:ae}},group:A=>ia(A,n,F,()=>!!t["group-summary"])}),L=I(()=>V(O.value)),{isSelected:C,select:M,selectAll:K,toggleSelect:me,someSelected:ct,allSelected:ft}=Yt(e,{allItems:b,currentPage:L}),{isExpanded:gt,toggleExpand:mt}=fa(e);ba({page:c,itemsPerPage:g,sortBy:o,groupBy:n,search:s}),pt({VDataTableRows:{hideNoData:N(()=>e.hideNoData),noDataText:N(()=>e.noDataText),loading:N(()=>e.loading),loadingText:N(()=>e.loadingText)}});const $=I(()=>({page:c.value,itemsPerPage:g.value,sortBy:o.value,pageCount:T.value,toggleSort:D,setItemsPerPage:B,someSelected:ct.value,allSelected:ft.value,isSelected:C,select:M,selectAll:K,toggleSelect:me,isExpanded:gt,toggleExpand:mt,isGroupOpen:W,toggleGroup:k,items:L.value.map(A=>A.raw),internalItems:L.value,groupedItems:O.value,columns:f.value,headers:p.value}));return te(()=>{const A=Ne.filterProps(e),ve=Re.filterProps(Pe(e,["multiSort"])),ye=Ge.filterProps(e),he=Ae.filterProps(e);return w(Ae,H({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},he,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var z;return(z=t.top)==null?void 0:z.call(t,$.value)},default:()=>{var z,ae,le,Ve,Ce,Fe;return t.default?t.default($.value):S(Q,null,[(z=t.colgroup)==null?void 0:z.call(t,$.value),!e.hideDefaultHeader&&S("thead",{key:"thead"},[w(Re,H(ve,{multiSort:!!e.multiSort}),t)]),(ae=t.thead)==null?void 0:ae.call(t,$.value),!e.hideDefaultBody&&S("tbody",null,[(le=t["body.prepend"])==null?void 0:le.call(t,$.value),t.body?t.body($.value):w(Ge,H(l,ye,{items:O.value}),t),(Ve=t["body.append"])==null?void 0:Ve.call(t,$.value)]),(Ce=t.tbody)==null?void 0:Ce.call(t,$.value),(Fe=t.tfoot)==null?void 0:Fe.call(t,$.value)])},bottom:()=>t.bottom?t.bottom($.value):!e.hideDefaultFooter&&S(Q,null,[w(Et,null,null),w(Ne,A,{prepend:t["footer.prepend"]})])})}),{}}});export{Ca as V}; +import{n as q,p as _,l as $e,z as be,f as J,an as ce,u as te,a5 as Pe,I as G,av as vt,s as R,aw as yt,w as Z,ah as ht,o as He,ax as ue,ay as ne,F as bt,a0 as we,az as ke,ag as pe,aj as xe,aA as Be,ai as re,j as pt}from"./vendor-vuetify-DsKlzgKp.js";import{l as j,e as I,d as X,o as Ie,p as Y,k as S,j as w,m as H,n as ie,w as xt,a as St,b as U,s as Pt,t as N,F as Q,N as wt,I as kt,a1 as Oe,x as oe,aa as se,S as It,y as Dt}from"./vendor-vue-BiQC5iF7.js";import{V as Ee}from"./VPagination-DLzhjdaP.js";import{V as Le,u as Tt,m as Vt}from"./VSelect-oxA0t9CG.js";import{a7 as Ct,I as Ft,a8 as Bt,f as _e,a9 as Ot,M as De,h as je,i as Et}from"./index-DGIAsv4W.js";import{V as _t}from"./VChip-mRzIPuM0.js";import{V as de}from"./VCheckboxBtn-BKcSogH0.js";import{b as Ae,m as At}from"./VTable-Cq72iBVc.js";const Nt=_({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10},pageBy:{type:String,default:"any"}},"DataTable-paginate"),Me=Symbol.for("vuetify:data-table-pagination");function Rt(e){const a=q(e,"page",void 0,t=>Number(t??1)),l=q(e,"itemsPerPage",void 0,t=>Number(t??10));return{page:a,itemsPerPage:l}}function Gt(e){const{page:a,itemsPerPage:l,itemsLength:t}=e,n=I(()=>l.value===-1?0:l.value*(a.value-1)),r=I(()=>l.value===-1?t.value:Math.min(t.value,n.value+l.value)),o=I(()=>l.value===-1||t.value===0?1:Math.ceil(t.value/l.value));Ie([a,o],()=>{a.value>o.value&&(a.value=o.value)});function i(f){l.value=f,a.value=1}function u(){a.value=be(a.value+1,1,o.value)}function c(){a.value=be(a.value-1,1,o.value)}function g(f){a.value=be(f,1,o.value)}const v={page:a,itemsPerPage:l,startIndex:n,stopIndex:r,pageCount:o,itemsLength:t,nextPage:u,prevPage:c,setPage:g,setItemsPerPage:i};return Y(Me,v),v}function $t(){const e=X(Me);if(!e)throw new Error("Missing pagination!");return e}function Ht(e){const a=$e("usePaginatedItems"),{items:l,startIndex:t,stopIndex:n,itemsPerPage:r}=e,o=I(()=>r.value<=0?j(l):j(l).slice(t.value,n.value));return Ie(o,i=>{a.emit("update:currentItems",i)},{immediate:!0}),{paginatedItems:o}}function Lt(e){const{sortedItems:a,paginate:l,group:t}=e,n=j(e.pageBy);if(n==="item"){const{paginatedItems:r,pageCount:o,setItemsPerPage:i}=l(a),{flatItems:u}=t(r);return{pageCount:o,setItemsPerPage:i,paginatedItems:u}}if(n==="group"){const{flatItems:r,groups:o}=t(a),{paginatedItems:i,pageCount:u,setItemsPerPage:c}=l(o),g=I(()=>{if(!i.value.length)return[];const v=i.value.at(0).id,f=i.value.at(-1).id,p=r.value.findIndex(d=>d.type==="group"&&d.id===v),y=r.value.findIndex(d=>d.type==="group"&&d.id===f),h=r.value.findIndex((d,b)=>b>y&&d.type==="group"&&d.depth===0);return r.value.slice(p,h===-1?void 0:h)});return{pageCount:u,setItemsPerPage:c,paginatedItems:g}}if(n==="any"){const{flatItems:r}=t(a),{paginatedItems:o,pageCount:i,setItemsPerPage:u}=l(r);return{pageCount:i,setItemsPerPage:u,paginatedItems:o}}throw new Error(`Unrecognized pagination target ${n}`)}const We=_({color:String,prevIcon:{type:G,default:"$prev"},nextIcon:{type:G,default:"$next"},firstIcon:{type:G,default:"$first"},lastIcon:{type:G,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),Ne=J()({name:"VDataTableFooter",props:We(),setup(e,a){let{slots:l}=a;const{t}=ce(),{page:n,pageCount:r,startIndex:o,stopIndex:i,itemsLength:u,itemsPerPage:c,setItemsPerPage:g}=$t(),v=I(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?t("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?t(f.title):f.title}));return te(()=>{var p;const f=Ee.filterProps(e);return S("div",{class:"v-data-table-footer"},[(p=l.prepend)==null?void 0:p.call(l),S("div",{class:"v-data-table-footer__items-per-page"},[S("span",null,[t(e.itemsPerPageText)]),w(Le,{items:v.value,itemColor:e.color,modelValue:c.value,"onUpdate:modelValue":y=>g(Number(y)),density:"compact",variant:"outlined","aria-label":t(e.itemsPerPageText),hideDetails:!0},null)]),S("div",{class:"v-data-table-footer__info"},[S("div",null,[t(e.pageText,u.value?o.value+1:0,i.value,u.value)])]),S("div",{class:"v-data-table-footer__pagination"},[w(Ee,H({modelValue:n.value,"onUpdate:modelValue":y=>n.value=y,density:"comfortable",firstAriaLabel:e.firstPageLabel,lastAriaLabel:e.lastPageLabel,length:r.value,nextAriaLabel:e.nextPageLabel,previousAriaLabel:e.prevPageLabel,rounded:!0,showFirstLastPage:!0,totalVisible:e.showCurrentPage?1:0,variant:"plain"},Pe(f,["color"])),null)])])}),{}}}),ee=vt({align:{type:String,default:"start"},fixed:{type:[Boolean,String],default:!1},fixedOffset:[Number,String],fixedEndOffset:[Number,String],height:[Number,String],lastFixed:Boolean,firstFixedEnd:Boolean,noPadding:Boolean,indent:[Number,String],empty:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,a)=>{let{slots:l}=a;const t=e.tag??"td",n=typeof e.fixed=="string"?e.fixed:e.fixed?"start":"none";return w(t,{class:ie(["v-data-table__td",{"v-data-table-column--fixed":n==="start","v-data-table-column--fixed-end":n==="end","v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--first-fixed-end":e.firstFixedEnd,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap,"v-data-table-column--empty":e.empty},`v-data-table-column--align-${e.align}`]),style:{height:R(e.height),width:R(e.width),maxWidth:R(e.maxWidth),left:n==="start"?R(e.fixedOffset||null):void 0,right:n==="end"?R(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?R(e.indent):void 0}},{default:()=>{var r;return[(r=l.default)==null?void 0:r.call(l)]}})}),jt=_({headers:Array},"DataTable-header"),ze=Symbol.for("vuetify:data-table-headers"),Ke={title:"",sortable:!1},Mt={...Ke,width:48};function Wt(){const a=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(l=>({element:l,priority:0}));return{enqueue:(l,t)=>{let n=!1;for(let r=0;rt){a.splice(r,0,{element:l,priority:t}),n=!0;break}n||a.push({element:l,priority:t})},size:()=>a.length,count:()=>{let l=0;if(!a.length)return 0;const t=Math.floor(a[0].priority);for(let n=0;na.shift()}}function Se(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)a.push(e);else for(const l of e.children)Se(l,a);return a}function Ue(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const l of e)l.key&&a.add(l.key),l.children&&Ue(l.children,a);return a}function zt(e){if(e.key){if(e.key==="data-table-group")return Ke;if(["data-table-expand","data-table-select"].includes(e.key))return Mt}}function Te(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(a,...e.children.map(l=>Te(l,a+1))):a}function Kt(e){let a=!1;function l(r,o){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"none";if(r)if(i!=="none"&&(r.fixed=i),r.fixed===!0&&(r.fixed="start"),r.fixed===o)if(r.children)if(o==="start")for(let u=r.children.length-1;u>=0;u--)l(r.children[u],o,o);else for(let u=0;u=0;u--)l(r.children[u],o);else for(let u=0;u=0;r--)l(e[r],"start");for(let r=0;r=0;r--)n=Qe(e[r],n)}function qe(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return a;if(e.children){e.fixedOffset=a;for(const l of e.children)a=qe(l,a)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=a,a+=parseFloat(e.width||"0")||0);return a}function Qe(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return a;if(e.children){e.fixedEndOffset=a;for(const l of e.children)a=Qe(l,a)}else e.fixed==="end"&&(e.fixedEndOffset=a,a+=parseFloat(e.width||"0")||0);return a}function Ut(e,a){const l=[];let t=0;const n=Wt(e);for(;n.size()>0;){let o=n.count();const i=[];let u=1;for(;o>0;){const{element:c,priority:g}=n.dequeue(),v=a-t-Te(c);if(i.push({...c,rowspan:v??1,colspan:c.children?Se(c).length:1}),c.children)for(const f of c.children){const p=g%1+u/Math.pow(10,t+2);n.enqueue(f,t+v+p)}u+=1,o-=1}t+=1,l.push(i)}return{columns:e.map(o=>Se(o)).flat(),headers:l}}function Je(e){const a=[];for(const l of e){const t={...zt(l),...l},n=t.key??(typeof t.value=="string"?t.value:null),r=t.value??n??null,o={...t,key:n,value:r,sortable:t.sortable??(t.key!=null||!!t.sort),children:t.children?Je(t.children):void 0};a.push(o)}return a}function qt(e,a){const l=U([]),t=U([]),n=U({}),r=U({}),o=U({});xt(()=>{var h,d,b;const c=(e.headers||Object.keys(e.items[0]??{}).map(s=>({key:s,title:St(s)}))).slice(),g=Ue(c);(h=a==null?void 0:a.groupBy)!=null&&h.value.length&&!g.has("data-table-group")&&c.unshift({key:"data-table-group",title:"Group"}),(d=a==null?void 0:a.showSelect)!=null&&d.value&&!g.has("data-table-select")&&c.unshift({key:"data-table-select"}),(b=a==null?void 0:a.showExpand)!=null&&b.value&&!g.has("data-table-expand")&&c.push({key:"data-table-expand"});const v=Je(c);Kt(v);const f=Math.max(...v.map(s=>Te(s)))+1,p=Ut(v,f);l.value=p.headers,t.value=p.columns;const y=p.headers.flat(1);for(const s of y)s.key&&(s.sortable&&(s.sort&&(n.value[s.key]=s.sort),s.sortRaw&&(r.value[s.key]=s.sortRaw)),s.filter&&(o.value[s.key]=s.filter))});const i={headers:l,columns:t,sortFunctions:n,sortRawFunctions:r,filterFunctions:o};return Y(ze,i),i}function fe(){const e=X(ze);if(!e)throw new Error("Missing headers!");return e}const Qt={showSelectAll:!1,allSelected:()=>[],select:e=>{var t;let{items:a,value:l}=e;return new Set(l?[(t=a[0])==null?void 0:t.value]:[])},selectAll:e=>{let{selected:a}=e;return a}},Xe={showSelectAll:!0,allSelected:e=>{let{currentPage:a}=e;return a},select:e=>{let{items:a,value:l,selected:t}=e;for(const n of a)l?t.add(n.value):t.delete(n.value);return t},selectAll:e=>{let{value:a,currentPage:l,selected:t}=e;return Xe.select({items:l,value:a,selected:t})}},Jt={showSelectAll:!0,allSelected:e=>{let{allItems:a}=e;return a},select:e=>{let{items:a,value:l,selected:t}=e;for(const n of a)l?t.add(n.value):t.delete(n.value);return t},selectAll:e=>{let{value:a,allItems:l}=e;return new Set(a?l.map(t=>t.value):[])}},Xt=_({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:Function},"DataTable-select"),Ye=Symbol.for("vuetify:data-table-selection");function Yt(e,a){let{allItems:l,currentPage:t}=a;const n=q(e,"modelValue",e.modelValue,s=>{const x=e.valueComparator;return x?new Set(Z(s).map(D=>{var P;return((P=l.value.find(F=>x(D,F.value)))==null?void 0:P.value)??D})):new Set(Z(s).map(D=>{var P,F;return ht(D)?((P=l.value.find(V=>D===V.value))==null?void 0:P.value)??D:((F=l.value.find(V=>He(D,V.value)))==null?void 0:F.value)??D}))},s=>[...s.values()]),r=I(()=>l.value.filter(s=>s.selectable)),o=I(()=>j(t).filter(s=>s.selectable)),i=I(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return Qt;case"all":return Jt;case"page":default:return Xe}}),u=Pt(null);function c(s){return Z(s).every(x=>n.value.has(x.value))}function g(s){return Z(s).some(x=>n.value.has(x.value))}function v(s,x){const D=i.value.select({items:s,value:x,selected:new Set(n.value)});n.value=D}function f(s,x,D){const P=[],F=j(t);if(x=x??F.findIndex(V=>V.value===s.value),e.selectStrategy!=="single"&&(D!=null&&D.shiftKey)&&u.value!==null){const[V,W]=[u.value,x].sort((k,m)=>k-m);P.push(...F.slice(V,W+1).filter(k=>k.selectable))}else P.push(s),u.value=x;v(P,!c([s]))}function p(s){const x=i.value.selectAll({value:s,allItems:r.value,currentPage:o.value,selected:new Set(n.value)});n.value=x}const y=I(()=>n.value.size>0),h=I(()=>{const s=i.value.allSelected({allItems:r.value,currentPage:o.value});return!!s.length&&c(s)}),d=N(()=>i.value.showSelectAll),b={toggleSelect:f,select:v,selectAll:p,isSelected:c,isSomeSelected:g,someSelected:y,allSelected:h,showSelectAll:d,lastSelectedIndex:u,selectStrategy:i};return Y(Ye,b),b}function ge(){const e=X(Ye);if(!e)throw new Error("Missing selection!");return e}const Zt=_({initialSortOrder:{type:String,default:"asc",validator:e=>!e||["asc","desc"].includes(e)},sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:{type:[Boolean,Object],default:!1},mustSort:Boolean},"DataTable-sort"),Ze=Symbol.for("vuetify:data-table-sort");function ea(e){const a=N(()=>e.initialSortOrder),l=q(e,"sortBy"),t=N(()=>e.mustSort),n=N(()=>e.multiSort);return{initialSortOrder:a,sortBy:l,multiSort:n,mustSort:t}}function ta(e,a){if(!bt(e))return{active:!!e};const{key:l,mode:t,modifier:n}=e,r=n==="alt"&&(a==null?void 0:a.altKey)||n==="shift"&&(a==null?void 0:a.shiftKey);return{active:!l||(a==null?void 0:a.ctrlKey)||(a==null?void 0:a.metaKey)||!1,mode:r?t==="append"?"prepend":"append":t}}function aa(e){const{initialSortOrder:a,sortBy:l,mustSort:t,multiSort:n,page:r}=e,o=function(c,g){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(c.key==null)return;let f=l.value.map(d=>({...d}))??[];const p=f.find(d=>d.key===c.key),y=a.value,h=a.value==="desc"?"asc":"desc";if(p)p.order===h?v||t.value&&f.length===1?p.order=a.value:f=f.filter(d=>d.key!==c.key):p.order=h;else{const{active:d,mode:b}=ta(n.value,g);d?b==="prepend"?f.unshift({key:c.key,order:y}):f.push({key:c.key,order:y}):f=[{key:c.key,order:y}]}l.value=f,r&&(r.value=1)};function i(c){return!!l.value.find(g=>g.key===c.key)}const u={sortBy:l,toggleSort:o,isSorted:i};return Y(Ze,u),u}function et(){const e=X(Ze);if(!e)throw new Error("Missing sort!");return e}function la(e,a,l,t){const n=ce();return{sortedItems:I(()=>{var o,i;return l.value.length?na(a.value,l.value,n.current.value,{transform:t==null?void 0:t.transform,sortFunctions:{...e.customKeySort,...(o=t==null?void 0:t.sortFunctions)==null?void 0:o.value},sortRawFunctions:(i=t==null?void 0:t.sortRawFunctions)==null?void 0:i.value}):a.value})}}function na(e,a,l,t){const n=new Intl.Collator(l,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,t!=null&&t.transform?t.transform(o):o]).sort((o,i)=>{var u,c;for(let g=0;gs!=null?s.toString().toLocaleLowerCase():s),y!==h))return ne(y)&&ne(h)?0:ne(y)?-1:ne(h)?1:!isNaN(y)&&!isNaN(h)?Number(y)-Number(h):n.compare(y,h)}return 0}).map(o=>{let[i]=o;return i})}const tt=_({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,initialSortOrder:String,sortIcon:{type:G},sortAscIcon:{type:G,default:"$sortAsc"},sortDescIcon:{type:G,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...De(),...ke(),...Ot()},"VDataTableHeaders"),Re=J()({name:"VDataTableHeaders",props:tt(),setup(e,a){let{slots:l}=a;const{t}=ce(),{toggleSort:n,sortBy:r,isSorted:o}=et(),{someSelected:i,allSelected:u,selectAll:c,showSelectAll:g}=ge(),{columns:v,headers:f}=fe(),{loaderClasses:p}=Ct(e);function y(k,m){if(!(e.sticky||e.fixedHeader)&&!k.fixed)return;const E=typeof k.fixed=="string"?k.fixed:k.fixed?"start":"none";return{position:"sticky",left:E==="start"?R(k.fixedOffset):void 0,right:E==="end"?R(k.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${m})`:void 0}}function h(k,m){k.key==="Enter"&&!e.disableSort&&n(m,k)}function d(k){const m=r.value.find(E=>E.key===k.key);switch(m==null?void 0:m.order){case"asc":return e.sortAscIcon;case"desc":return e.sortDescIcon;default:return e.sortIcon||(e.initialSortOrder==="asc"?e.sortAscIcon:e.sortDescIcon)}}const{backgroundColorClasses:b,backgroundColorStyles:s}=Ft(()=>e.color),{displayClasses:x,mobile:D}=we(e),P=I(()=>({headers:f.value,columns:v.value,toggleSort:n,isSorted:o,sortBy:r.value,someSelected:i.value,allSelected:u.value,selectAll:c,getSortIcon:d})),F=I(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},x.value,p.value]),V=k=>{let{column:m,x:E,y:T}=k;const B=m.key==="data-table-select"||m.key==="data-table-expand",O=m.key==="data-table-group"&&m.width===0&&!m.title,L=H(e.headerProps??{},m.headerProps??{});return w(ee,H({tag:"th",align:m.align,class:[{"v-data-table__th--sortable":m.sortable&&!e.disableSort,"v-data-table__th--sorted":o(m),"v-data-table__th--fixed":m.fixed},...F.value],style:{width:R(m.width),minWidth:R(m.minWidth),maxWidth:R(m.maxWidth),...y(m,T)},colspan:m.colspan,rowspan:m.rowspan,fixed:m.fixed,nowrap:m.nowrap,lastFixed:m.lastFixed,firstFixedEnd:m.firstFixedEnd,noPadding:B,empty:O,tabindex:m.sortable?0:void 0,onClick:m.sortable?C=>n(m,C):void 0,onKeydown:m.sortable?C=>h(C,m):void 0},L),{default:()=>{var K;const C=`header.${m.key}`,M={column:m,selectAll:c,isSorted:o,toggleSort:n,sortBy:r.value,someSelected:i.value,allSelected:u.value,getSortIcon:d};return l[C]?l[C](M):O?"":m.key==="data-table-select"?((K=l["header.data-table-select"])==null?void 0:K.call(l,M))??(g.value&&w(de,{color:e.color,density:e.density,modelValue:u.value,indeterminate:i.value&&!u.value,"onUpdate:modelValue":c},null)):S("div",{class:"v-data-table-header__content"},[S("span",null,[m.title]),m.sortable&&!e.disableSort&&w(_e,{key:"icon",class:"v-data-table-header__sort-icon",icon:d(m)},null),e.multiSort&&o(m)&&S("div",{key:"badge",class:ie(["v-data-table-header__sort-badge",...b.value]),style:wt(s.value)},[r.value.findIndex(me=>me.key===m.key)+1])])}})},W=()=>{const k=I(()=>v.value.filter(T=>(T==null?void 0:T.sortable)&&!e.disableSort)),m=v.value.find(T=>T.key==="data-table-select"),E=I({get:()=>k.value.filter(T=>{let{key:B}=T;return r.value.some(O=>O.key===B)}),set:T=>{const B=Z(T),O=r.value.map(C=>C.key);B.filter(C=>{let{key:M}=C;return!O.includes(M)}).forEach(C=>n(C)),kt(()=>r.value=r.value.filter(C=>{let{key:M}=C;return B.some(K=>K.key===M)}))}});return w(ee,H({tag:"th",class:[...F.value],colspan:f.value.length+1},e.headerProps),{default:()=>[S("div",{class:"v-data-table-header__content"},[w(Le,{modelValue:E.value,"onUpdate:modelValue":T=>E.value=T,chips:!0,color:e.color,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:k.value,label:t("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined",returnObject:!0,"onClick:clear":()=>r.value=[]},{append:m?()=>w(de,{color:e.color,density:"compact",modelValue:u.value,indeterminate:i.value&&!u.value,"onUpdate:modelValue":()=>c(!u.value)},null):void 0,chip:T=>{let{item:B}=T;return w(_t,{onClick:B.raw.sortable?()=>n(B.raw,void 0,!0):void 0,onMousedown:O=>{O.preventDefault(),O.stopPropagation()}},{default:()=>[B.title,w(_e,{class:ie(["v-data-table__td-sort-icon",o(B.raw)&&"v-data-table__td-sort-icon-active"]),icon:d(B.raw),size:"small"},null)]})}})])]})};te(()=>D.value?S("tr",null,[w(W,null,null)]):S(Q,null,[l.headers?l.headers(P.value):f.value.map((k,m)=>S("tr",null,[k.map((E,T)=>w(V,{column:E,x:T,y:m},null))])),e.loading&&S("tr",{class:"v-data-table-progress"},[S("th",{colspan:v.value.length},[w(Bt,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"||e.loading==="true"?e.color:e.loading,indeterminate:!0},{default:l.loader})])])]))}}),ra=_({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),at=Symbol.for("vuetify:data-table-group");function oa(e){return{groupBy:q(e,"groupBy")}}function sa(e){const{disableSort:a,groupBy:l,sortBy:t}=e,n=U(new Set),r=I(()=>l.value.map(g=>({...g,order:g.order??!1})).concat(a!=null&&a.value?[]:t.value));function o(g){return n.value.has(g.id)}function i(g){const v=new Set(n.value);o(g)?v.delete(g.id):v.add(g.id),n.value=v}function u(g){function v(f){const p=[];for(const y of f.items)"type"in y&&y.type==="group"?p.push(...v(y)):p.push(y);return[...new Set(p)]}return v({items:g})}const c={sortByWithGroups:r,toggleGroup:i,opened:n,groupBy:l,extractRows:u,isGroupOpen:o};return Y(at,c),c}function lt(){const e=X(at);if(!e)throw new Error("Missing group!");return e}function ua(e,a){if(!e.length)return[];const l=new Map;for(const t of e){const n=ue(t.raw,a);l.has(n)||l.set(n,[]),l.get(n).push(t)}return l}function nt(e,a){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!a.length)return[];const n=ua(e,a[0]),r=[],o=a.slice(1);return n.forEach((i,u)=>{const c=a[0],g=`${t}_${c}_${u}`;r.push({depth:l,id:g,key:c,value:u,items:o.length?nt(i,o,l+1,g):i,type:"group"})}),r}function rt(e,a,l){const t=[];for(const n of e)"type"in n&&n.type==="group"?(n.value!=null&&t.push(n),(a.has(n.id)||n.value==null)&&(t.push(...rt(n.items,a,l)),l&&t.push({...n,type:"group-summary"}))):t.push(n);return t}function ia(e,a,l,t){const n=I(()=>a.value.length?nt(j(e),a.value.map(o=>o.key)):[]),r=I(()=>a.value.length?rt(n.value,l.value,j(t)):j(e));return{groups:n,flatItems:r}}const ot=_({item:{type:Object,required:!0},groupCollapseIcon:{type:G,default:"$tableGroupCollapse"},groupExpandIcon:{type:G,default:"$tableGroupExpand"},...De()},"VDataTableGroupHeaderRow"),da=J()({name:"VDataTableGroupHeaderRow",props:ot(),setup(e,a){let{slots:l}=a;const{isGroupOpen:t,toggleGroup:n,extractRows:r}=lt(),{isSelected:o,isSomeSelected:i,select:u}=ge(),{columns:c}=fe(),g=I(()=>r([e.item])),v=N(()=>c.value.length-(c.value.some(f=>f.key==="data-table-select")?1:0));return()=>S("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[c.value.map(f=>{var p,y;if(f.key==="data-table-group"){const h=t(e.item)?e.groupCollapseIcon:e.groupExpandIcon,d=()=>n(e.item);return((p=l["data-table-group"])==null?void 0:p.call(l,{item:e.item,count:g.value.length,props:{icon:h,onClick:d}}))??w(ee,{class:"v-data-table-group-header-row__column",colspan:v.value},{default:()=>[w(je,{size:"small",variant:"text",icon:h,onClick:d},null),S("span",null,[e.item.value]),S("span",null,[Oe("("),g.value.length,Oe(")")])]})}else if(f.key==="data-table-select"){const h=g.value.filter(x=>x.selectable),d=h.length>0&&o(h),b=i(h)&&!d,s=x=>u(h,x);return((y=l["data-table-select"])==null?void 0:y.call(l,{props:{modelValue:d,indeterminate:b,"onUpdate:modelValue":s}}))??w(ee,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[w(de,{density:e.density,disabled:h.length===0,modelValue:d,indeterminate:b,"onUpdate:modelValue":s},null)]})}return""})])}}),ca=_({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),st=Symbol.for("vuetify:datatable:expanded");function fa(e){const a=N(()=>e.expandOnClick),l=q(e,"expanded",e.expanded,i=>new Set(i),i=>[...i.values()]);function t(i,u){const c=new Set(l.value),g=oe(i.value);if(u)c.add(g);else{const v=[...l.value].find(f=>oe(f)===g);c.delete(v)}l.value=c}function n(i){const u=oe(i.value);return[...l.value].some(c=>oe(c)===u)}function r(i){t(i,!n(i))}const o={expand:t,expanded:l,expandOnClick:a,isExpanded:n,toggleExpand:r};return Y(st,o),o}function ut(){const e=X(st);if(!e)throw new Error("foo");return e}const it=_({color:String,index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:G,default:"$collapse"},expandIcon:{type:G,default:"$expand"},onClick:pe(),onContextmenu:pe(),onDblclick:pe(),...De(),...ke()},"VDataTableRow"),ga=J()({name:"VDataTableRow",props:it(),setup(e,a){let{slots:l}=a;const{displayClasses:t,mobile:n}=we(e,"v-data-table__tr"),{isSelected:r,toggleSelect:o,someSelected:i,allSelected:u,selectAll:c}=ge(),{isExpanded:g,toggleExpand:v}=ut(),{toggleSort:f,sortBy:p,isSorted:y}=et(),{columns:h}=fe();te(()=>S("tr",{class:ie(["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},t.value]),onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&h.value.map((d,b)=>{const s=e.item,x=`item.${d.key}`,D=`header.${d.key}`,P={index:e.index,item:s.raw,internalItem:s,value:ue(s.columns,d.key),column:d,isSelected:r,toggleSelect:o,isExpanded:g,toggleExpand:v},F={column:d,selectAll:c,isSorted:y,toggleSort:f,sortBy:p.value,someSelected:i.value,allSelected:u.value,getSortIcon:()=>""},V=typeof e.cellProps=="function"?e.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value,column:d}):e.cellProps,W=typeof d.cellProps=="function"?d.cellProps({index:P.index,item:P.item,internalItem:P.internalItem,value:P.value}):d.cellProps,k=d.key==="data-table-select"||d.key==="data-table-expand",m=d.key==="data-table-group"&&d.width===0&&!d.title;return w(ee,H({align:d.align,indent:d.indent,class:{"v-data-table__td--expanded-row":d.key==="data-table-expand","v-data-table__td--select-row":d.key==="data-table-select"},fixed:d.fixed,fixedOffset:d.fixedOffset,fixedEndOffset:d.fixedEndOffset,lastFixed:d.lastFixed,firstFixedEnd:d.firstFixedEnd,maxWidth:n.value?void 0:d.maxWidth,noPadding:k,empty:m,nowrap:d.nowrap,width:n.value?void 0:d.width},V,W),{default:()=>{var T,B,O,L;if(d.key==="data-table-select")return((T=l["item.data-table-select"])==null?void 0:T.call(l,{...P,props:{color:e.color,disabled:!s.selectable,modelValue:r([s]),onClick:se(()=>o(s),["stop"])}}))??w(de,{color:e.color,disabled:!s.selectable,density:e.density,modelValue:r([s]),onClick:se(C=>o(s,e.index,C),["stop"])},null);if(d.key==="data-table-expand")return((B=l["item.data-table-expand"])==null?void 0:B.call(l,{...P,props:{icon:g(s)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:se(()=>v(s),["stop"])}}))??w(je,{icon:g(s)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:se(()=>v(s),["stop"])},null);if(l[x]&&!n.value)return l[x](P);const E=It(P.value);return n.value?S(Q,null,[S("div",{class:"v-data-table__td-title"},[((O=l[D])==null?void 0:O.call(l,F))??d.title]),S("div",{class:"v-data-table__td-value"},[((L=l[x])==null?void 0:L.call(l,P))??E])]):E}})})]))}}),dt=_({color:String,loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...xe(it(),["collapseIcon","expandIcon","density"]),...xe(ot(),["groupCollapseIcon","groupExpandIcon","density"]),...ke()},"VDataTableRows"),Ge=J()({name:"VDataTableRows",inheritAttrs:!1,props:dt(),setup(e,a){let{attrs:l,slots:t}=a;const{columns:n}=fe(),{expandOnClick:r,toggleExpand:o,isExpanded:i}=ut(),{isSelected:u,toggleSelect:c}=ge(),{toggleGroup:g,isGroupOpen:v}=lt(),{t:f}=ce(),{mobile:p}=we(e);return te(()=>{var h,d;const y=xe(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||t.loading)?S("tr",{class:"v-data-table-rows-loading",key:"loading"},[S("td",{colspan:n.value.length},[((h=t.loading)==null?void 0:h.call(t))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?S("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[S("td",{colspan:n.value.length},[((d=t["no-data"])==null?void 0:d.call(t))??f(e.noDataText)])]):S(Q,null,[e.items.map((b,s)=>{var P,F;if(b.type==="group"){const V={index:s,item:b,columns:n.value,isExpanded:i,toggleExpand:o,isSelected:u,toggleSelect:c,toggleGroup:g,isGroupOpen:v};return t["group-header"]?t["group-header"](V):w(da,H({key:`group-header_${b.id}`,item:b},Be(l,":groupHeader",()=>V),y),t)}if(b.type==="group-summary"){const V={index:s,item:b,columns:n.value,toggleGroup:g};return((P=t["group-summary"])==null?void 0:P.call(t,V))??""}const x={index:b.virtualIndex??s,item:b.raw,internalItem:b,columns:n.value,isExpanded:i,toggleExpand:o,isSelected:u,toggleSelect:c},D={...x,props:H({key:`item_${b.key??b.index}`,onClick:r.value?()=>{o(b)}:void 0,index:s,item:b,color:e.color,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:p.value},Be(l,":row",()=>x),typeof e.rowProps=="function"?e.rowProps({item:x.item,index:x.index,internalItem:x.internalItem}):e.rowProps)};return S(Q,{key:D.props.key},[t.item?t.item(D):w(ga,D.props,t),i(b)&&((F=t["expanded-row"])==null?void 0:F.call(t,x))])})])}),{}}}),ma=_({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function va(e,a,l,t){const n=e.returnObject?a:re(a,e.itemValue),r=re(a,e.itemSelectable,!0),o=t.reduce((i,u)=>(u.key!=null&&(i[u.key]=re(a,u.value)),i),{});return{type:"item",key:e.returnObject?re(a,e.itemValue):n,index:l,value:n,selectable:r,columns:o,raw:a}}function ya(e,a,l){return a.map((t,n)=>va(e,t,n,l))}function ha(e,a){return{items:I(()=>ya(e,e.items,a.value))}}function ba(e){let{page:a,itemsPerPage:l,sortBy:t,groupBy:n,search:r}=e;const o=$e("VDataTable"),i=()=>({page:a.value,itemsPerPage:l.value,sortBy:t.value,groupBy:n.value,search:r.value});let u=null;Ie(i,c=>{He(u,c)||(u&&u.search!==c.search&&(a.value=1),o.emit("update:options",c),u=c)},{deep:!0,immediate:!0})}const pa=_({...dt(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...ca(),...ra(),...jt(),...ma(),...Xt(),...Zt(),...Pe(tt(),["multiSort","initialSortOrder"]),...At()},"DataTable"),xa=_({...Nt(),...pa(),...Vt(),...We()},"VDataTable"),Ca=J()({name:"VDataTable",props:xa(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,a){let{attrs:l,slots:t}=a;const{groupBy:n}=oa(e),{initialSortOrder:r,sortBy:o,multiSort:i,mustSort:u}=ea(e),{page:c,itemsPerPage:g}=Rt(e),{disableSort:v}=Dt(e),{columns:f,headers:p,sortFunctions:y,sortRawFunctions:h,filterFunctions:d}=qt(e,{groupBy:n,showSelect:N(()=>e.showSelect),showExpand:N(()=>e.showExpand)}),{items:b}=ha(e,f),s=N(()=>e.search),{filteredItems:x}=Tt(e,b,s,{transform:A=>A.columns,customKeyFilter:d}),{toggleSort:D}=aa({initialSortOrder:r,sortBy:o,multiSort:i,mustSort:u,page:c}),{sortByWithGroups:P,opened:F,extractRows:V,isGroupOpen:W,toggleGroup:k}=sa({groupBy:n,sortBy:o,disableSort:v}),{sortedItems:m}=la(e,x,P,{transform:A=>({...A.raw,...A.columns}),sortFunctions:y,sortRawFunctions:h}),E=I(()=>e.pageBy==="auto"?e.groupBy.length?"group":"item":e.pageBy),{pageCount:T,setItemsPerPage:B,paginatedItems:O}=Lt({pageBy:E,sortedItems:m,paginate:A=>{const ve=I(()=>j(A).length),{startIndex:ye,stopIndex:he,pageCount:z,setItemsPerPage:ae}=Gt({page:c,itemsPerPage:g,itemsLength:ve}),{paginatedItems:le}=Ht({items:A,startIndex:ye,stopIndex:he,itemsPerPage:g});return{paginatedItems:le,pageCount:z,setItemsPerPage:ae}},group:A=>ia(A,n,F,()=>!!t["group-summary"])}),L=I(()=>V(O.value)),{isSelected:C,select:M,selectAll:K,toggleSelect:me,someSelected:ct,allSelected:ft}=Yt(e,{allItems:b,currentPage:L}),{isExpanded:gt,toggleExpand:mt}=fa(e);ba({page:c,itemsPerPage:g,sortBy:o,groupBy:n,search:s}),pt({VDataTableRows:{hideNoData:N(()=>e.hideNoData),noDataText:N(()=>e.noDataText),loading:N(()=>e.loading),loadingText:N(()=>e.loadingText)}});const $=I(()=>({page:c.value,itemsPerPage:g.value,sortBy:o.value,pageCount:T.value,toggleSort:D,setItemsPerPage:B,someSelected:ct.value,allSelected:ft.value,isSelected:C,select:M,selectAll:K,toggleSelect:me,isExpanded:gt,toggleExpand:mt,isGroupOpen:W,toggleGroup:k,items:L.value.map(A=>A.raw),internalItems:L.value,groupedItems:O.value,columns:f.value,headers:p.value}));return te(()=>{const A=Ne.filterProps(e),ve=Re.filterProps(Pe(e,["multiSort"])),ye=Ge.filterProps(e),he=Ae.filterProps(e);return w(Ae,H({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},he,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var z;return(z=t.top)==null?void 0:z.call(t,$.value)},default:()=>{var z,ae,le,Ve,Ce,Fe;return t.default?t.default($.value):S(Q,null,[(z=t.colgroup)==null?void 0:z.call(t,$.value),!e.hideDefaultHeader&&S("thead",{key:"thead"},[w(Re,H(ve,{multiSort:!!e.multiSort}),t)]),(ae=t.thead)==null?void 0:ae.call(t,$.value),!e.hideDefaultBody&&S("tbody",null,[(le=t["body.prepend"])==null?void 0:le.call(t,$.value),t.body?t.body($.value):w(Ge,H(l,ye,{items:O.value}),t),(Ve=t["body.append"])==null?void 0:Ve.call(t,$.value)]),(Ce=t.tbody)==null?void 0:Ce.call(t,$.value),(Fe=t.tfoot)==null?void 0:Fe.call(t,$.value)])},bottom:()=>t.bottom?t.bottom($.value):!e.hideDefaultFooter&&S(Q,null,[w(Et,null,null),w(Ne,A,{prepend:t["footer.prepend"]})])})}),{}}});export{Ca as V}; diff --git a/assets/VDatePicker-BJ3ukfdk.js b/assets/VDatePicker-CuGF0KeL.js similarity index 98% rename from assets/VDatePicker-BJ3ukfdk.js rename to assets/VDatePicker-CuGF0KeL.js index 8525414..c271823 100644 --- a/assets/VDatePicker-BJ3ukfdk.js +++ b/assets/VDatePicker-CuGF0KeL.js @@ -1,2 +1,2 @@ -import{f as J,an as le,u as K,s as ne,p as E,I as ae,ag as Ie,aR as X,n as W,w as j,a5 as H,aS as Te,as as ke,X as de,A as Ne,aT as We}from"./vendor-vuetify-95axeNJO.js";import{h as I,g as ue,ag as re,I as Be,P as ge,av as se,ao as $e}from"./index-CzpSlHRw.js";import{j as b,k as M,F as G,n as Q,e as P,N as Re,o as be,a1 as Fe,s as Z,b as Le,t as L,w as De,m as $,R as je}from"./vendor-vue-28M5UGz3.js";import{V as He}from"./VTooltip-C8vChj8G.js";import{V as ce,m as Ee}from"./VPicker-199veasp.js";const we=E({active:{type:[String,Array],default:void 0},controlHeight:[Number,String],controlVariant:{type:String,default:"docked"},noMonthPicker:Boolean,disabled:{type:[Boolean,String,Array],default:null},nextIcon:{type:ae,default:"$next"},prevIcon:{type:ae,default:"$prev"},modeIcon:{type:ae,default:"$subgroup"},text:String,monthText:String,yearText:String,viewMode:{type:String,default:"month"}},"VDatePickerControls"),ve=J()({name:"VDatePickerControls",props:we(),emits:{"click:year":()=>!0,"click:month":()=>!0,"click:prev":()=>!0,"click:next":()=>!0,"click:prev-year":()=>!0,"click:next-year":()=>!0},setup(e,a){let{emit:D,slots:l}=a;const{t}=le(),c=P(()=>Array.isArray(e.disabled)?e.disabled.includes("text"):!!e.disabled),m=P(()=>Array.isArray(e.disabled)?e.disabled.includes("mode"):!!e.disabled),s=P(()=>Array.isArray(e.disabled)?e.disabled.includes("prev-month"):!!e.disabled),u=P(()=>Array.isArray(e.disabled)?e.disabled.includes("next-month"):!!e.disabled),k=P(()=>Array.isArray(e.disabled)?e.disabled.includes("prev-year"):!!e.disabled),v=P(()=>Array.isArray(e.disabled)?e.disabled.includes("next-year"):!!e.disabled);function w(){D("click:prev")}function d(){D("click:next")}function x(){D("click:prev-year")}function S(){D("click:next-year")}function n(){D("click:year")}function h(){D("click:month")}return K(()=>{const i={VBtn:{density:"comfortable",variant:"text"}},A=b(I,{"data-testid":"prev-month",disabled:s.value,icon:e.prevIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.previousMonth"),onClick:w},null),T=b(I,{"data-testid":"next-month",disabled:u.value,icon:e.nextIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.nextMonth"),onClick:d},null),_=b(I,{"data-testid":"prev-year",disabled:k.value,icon:e.prevIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.previousYear"),onClick:x},null),R=b(I,{"data-testid":"next-year",disabled:v.value,icon:e.nextIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.nextYear"),onClick:S},null),y=b(I,{class:"v-date-picker-controls__only-month-btn","data-testid":"month-btn",density:"default",disabled:c.value,text:e.monthText,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectMonth"),onClick:h},null),r=b(I,{class:"v-date-picker-controls__only-year-btn","data-testid":"year-btn",density:"default",disabled:m.value,text:e.yearText,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null),g=b(I,{class:"v-date-picker-controls__year-btn","data-testid":"year-btn",density:"default",disabled:m.value,text:e.text,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null),C=M(G,null,[b(I,{class:"v-date-picker-controls__month-btn","data-testid":"month-btn",height:"36",disabled:c.value,text:e.text,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectMonth"),onClick:h},null),b(I,{class:"v-date-picker-controls__mode-btn","data-testid":"year-btn",disabled:m.value,icon:e.modeIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null)]),O={viewMode:e.viewMode,disabled:Array.isArray(e.disabled)?e.disabled:[],monthYearText:e.text??"",monthText:e.monthText??"",yearText:e.yearText??"",openMonths:h,openYears:n,prevMonth:w,nextMonth:d,prevYear:x,nextYear:S},U=M(G,null,[e.noMonthPicker?g:C,b(ue,null,null),M("div",{class:"v-date-picker-controls__month"},[A,T])]),ee=M(G,null,[M("div",{class:"v-date-picker-controls__month"},[A,y,T]),b(ue,null,null),M("div",{class:"v-date-picker-controls__year"},[_,r,R])]);return b(re,{defaults:i},{default:()=>{var te;return[M("div",{class:Q(["v-date-picker-controls",`v-date-picker-controls--variant-${e.controlVariant}`]),style:{"--v-date-picker-controls-height":ne(e.controlHeight)}},[((te=l.default)==null?void 0:te.call(l,O))??M(G,null,[e.controlVariant==="modal"&&U,e.controlVariant==="docked"&&ee])])]}})}),{}}}),Ue=E({appendIcon:ae,color:String,header:String,transition:String,onClick:Ie()},"VDatePickerHeader"),fe=J()({name:"VDatePickerHeader",props:Ue(),emits:{click:()=>!0,"click:append":()=>!0},setup(e,a){let{emit:D,slots:l}=a;const{backgroundColorClasses:t,backgroundColorStyles:c}=Be(()=>e.color);function m(){D("click")}function s(){D("click:append")}return K(()=>{const u=!!(l.default||e.header),k=!!(l.append||e.appendIcon);return M("div",{class:Q(["v-date-picker-header",{"v-date-picker-header--clickable":!!e.onClick},t.value]),style:Re(c.value),onClick:m},[l.prepend&&M("div",{key:"prepend",class:"v-date-picker-header__prepend"},[l.prepend()]),u&&b(ge,{key:"content",name:e.transition},{default:()=>{var v;return[M("div",{key:e.header,class:"v-date-picker-header__content"},[((v=l.default)==null?void 0:v.call(l))??e.header])]}}),k&&M("div",{class:"v-date-picker-header__append"},[l.append?b(re,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VBtn:{icon:e.appendIcon,variant:"text"}}},{default:()=>{var v;return[(v=l.append)==null?void 0:v.call(l)]}}):b(I,{key:"append-btn",icon:e.appendIcon,variant:"text",onClick:s},null)])])}),{}}}),pe=E({allowedDates:[Array,Function],disabled:{type:Boolean,default:null},displayValue:null,modelValue:Array,month:[Number,String],max:null,min:null,showAdjacentMonths:Boolean,year:[Number,String],weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},weeksInMonth:{type:String,default:"dynamic"},firstDayOfWeek:{type:[Number,String],default:void 0},firstDayOfYear:{type:[Number,String],default:void 0},weekdayFormat:String},"calendar");function ze(e){const a=X(),D=W(e,"modelValue",[],n=>j(n).map(h=>a.date(h))),l=P(()=>e.displayValue?a.date(e.displayValue):D.value.length>0?a.date(D.value[0]):e.min?a.date(e.min):Array.isArray(e.allowedDates)?a.date(e.allowedDates[0]):a.date()),t=W(e,"year",void 0,n=>{const h=n!=null?Number(n):a.getYear(l.value);return a.startOfYear(a.setYear(a.date(),h))},n=>a.getYear(n)),c=W(e,"month",void 0,n=>{const h=n!=null?Number(n):a.getMonth(l.value),i=a.setYear(a.startOfMonth(a.date()),a.getYear(t.value));return a.setMonth(i,h)},n=>a.getMonth(n)),m=P(()=>{const n=a.toJsDate(a.startOfWeek(a.date(),e.firstDayOfWeek)).getDay();return a.getWeekdays(e.firstDayOfWeek,e.weekdayFormat).filter((h,i)=>e.weekdays.includes((i+n)%7))}),s=P(()=>{const n=a.getWeekArray(c.value,e.firstDayOfWeek),h=n.flat(),i=6*7;if(e.weeksInMonth==="static"&&h.lengthe.weekdays.includes(a.toJsDate(i).getDay())).map((i,A)=>{const T=a.toISO(i),_=!a.isSameMonth(i,c.value),R=a.isSameDay(i,a.startOfMonth(c.value)),y=a.isSameDay(i,a.endOfMonth(c.value)),r=a.isSameDay(i,c.value),g=e.weekdays.length;return{date:i,formatted:a.format(i,"keyboardDate"),isAdjacent:_,isDisabled:S(i),isEnd:y,isHidden:_&&!e.showAdjacentMonths,isSame:r,isSelected:D.value.some(C=>a.isSameDay(i,C)),isStart:R,isToday:a.isSameDay(i,h),isWeekEnd:A%g===g-1,isWeekStart:A%g===0,isoDate:T,localized:a.format(i,"dayOfMonth"),month:a.getMonth(i),year:a.getYear(i)}})}const k=P(()=>{const n=a.startOfWeek(l.value,e.firstDayOfWeek),h=[];for(let A=0;A<=6;A++)h.push(a.addDays(n,A));const i=a.date();return u(h,i)}),v=P(()=>{const n=s.value.flat(),h=a.date();return u(n,h)}),w=P(()=>s.value.map(n=>n.length?a.getWeek(n[0],e.firstDayOfWeek,e.firstDayOfYear):null)),{minDate:d,maxDate:x}=Me(e);function S(n){if(e.disabled)return!0;const h=a.date(n);return d.value&&a.isBefore(a.endOfDay(h),d.value)||x.value&&a.isAfter(h,x.value)?!0:Array.isArray(e.allowedDates)&&e.allowedDates.length>0?!e.allowedDates.some(i=>a.isSameDay(a.date(i),h)):typeof e.allowedDates=="function"?!e.allowedDates(h):!1}return{displayValue:l,daysInMonth:v,daysInWeek:k,genDays:u,model:D,weeksInMonth:s,weekdayLabels:m,weekNumbers:w}}function Me(e){const a=X(),D=P(()=>{if(!e.min)return null;const m=a.date(e.min);return a.isValid(m)?m:null}),l=P(()=>{if(!e.max)return null;const m=a.date(e.max);return a.isValid(m)?m:null});function t(m){return D.value&&a.isBefore(m,D.value)?D.value:l.value&&a.isAfter(m,l.value)?l.value:m}function c(m){return(!D.value||a.isAfter(m,D.value))&&(!l.value||a.isBefore(m,l.value))}return{minDate:D,maxDate:l,clampDate:t,isInAllowedRange:c}}const xe=E({color:String,hideWeekdays:Boolean,multiple:[Boolean,Number,String],showWeek:Boolean,readonly:Boolean,transition:{type:String,default:"picker-transition"},reverseTransition:{type:String,default:"picker-reverse-transition"},events:{type:[Array,Function,Object],default:()=>null},eventColor:{type:[Array,Function,Object,String],default:()=>null},...H(pe(),["displayValue"])},"VDatePickerMonth"),he=J()({name:"VDatePickerMonth",props:xe(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=Le(),{t:c}=le(),{daysInMonth:m,model:s,weekNumbers:u,weekdayLabels:k}=ze(e),v=X(),w=Z(),d=Z(),x=Z(!1),S=L(()=>x.value?e.reverseTransition:e.transition);e.multiple==="range"&&s.value.length>0&&(w.value=s.value[0],s.value.length>1&&(d.value=s.value[s.value.length-1]));const n=P(()=>{const y=["number","string"].includes(typeof e.multiple)?Number(e.multiple):1/0;return s.value.length>=y});be(m,(y,r)=>{r&&(x.value=v.isBefore(y[0].date,r[0].date))});function h(y){const r=v.startOfDay(y);if(s.value.length===0?w.value=void 0:s.value.length===1&&(w.value=s.value[0],d.value=void 0),!w.value)w.value=r,s.value=[w.value];else if(d.value)w.value=y,d.value=void 0,s.value=[w.value];else{if(v.isSameDay(r,w.value)){w.value=void 0,s.value=[];return}else v.isBefore(r,w.value)?(d.value=v.endOfDay(w.value),w.value=r):d.value=v.endOfDay(r);s.value=Te(v,w.value,d.value)}}function i(y){const r=v.format(y.date,"fullDateWithWeekday"),g=y.isToday?"currentDate":"selectDate";return c(`$vuetify.datePicker.ariaLabel.${g}`,r)}function A(y){const r=s.value.findIndex(g=>v.isSameDay(g,y));if(r===-1)s.value=[...s.value,y];else{const g=[...s.value];g.splice(r,1),s.value=g}}function T(y){e.multiple==="range"?h(y):e.multiple?A(y):s.value=[y]}function _(y){const{events:r,eventColor:g}=e;let C,O=[];if(Array.isArray(r)?C=r.includes(y):r instanceof Function?C=r(y)||!1:r?C=r[y]||!1:C=!1,C)C!==!0?O=j(C):typeof g=="string"?O=[g]:typeof g=="function"?O=j(g(y)):Array.isArray(g)?O=g:typeof g=="object"&&g!==null&&(O=j(g[y]));else return[];return O.length?O.filter(Boolean).map(U=>typeof U=="string"?U:"surface-variant"):["surface-variant"]}function R(y){const r=_(y);return r.length?M("div",{class:"v-date-picker-month__events"},[r.map(g=>b(He,{dot:!0,color:g},null))]):null}K(()=>M("div",{class:"v-date-picker-month",style:{"--v-date-picker-days-in-week":e.weekdays.length}},[e.showWeek&&M("div",{key:"weeks",class:"v-date-picker-month__weeks"},[!e.hideWeekdays&&M("div",{key:"hide-week-days",class:"v-date-picker-month__day"},[Fe(" ")]),u.value.map(y=>M("div",{class:Q(["v-date-picker-month__day","v-date-picker-month__day--adjacent"])},[y]))]),b(ge,{name:S.value},{default:()=>{var y;return[M("div",{ref:t,key:(y=m.value[0].date)==null?void 0:y.toString(),class:"v-date-picker-month__days"},[!e.hideWeekdays&&k.value.map(r=>M("div",{class:Q(["v-date-picker-month__day","v-date-picker-month__weekday"])},[r])),m.value.map((r,g)=>{var O;const C={props:{class:"v-date-picker-month__day-btn",color:r.isSelected||r.isToday?e.color:void 0,disabled:r.isDisabled,readonly:e.readonly,icon:!0,ripple:!1,variant:r.isSelected?"flat":r.isToday?"outlined":"text","aria-label":i(r),"aria-current":r.isToday?"date":void 0,onClick:()=>T(r.date)},item:r,i:g};return n.value&&!r.isSelected&&(r.isDisabled=!0),M("div",{class:Q(["v-date-picker-month__day",{"v-date-picker-month__day--adjacent":r.isAdjacent,"v-date-picker-month__day--hide-adjacent":r.isHidden,"v-date-picker-month__day--selected":r.isSelected,"v-date-picker-month__day--week-end":r.isWeekEnd,"v-date-picker-month__day--week-start":r.isWeekStart}]),"data-v-date":r.isDisabled?void 0:r.isoDate},[(e.showAdjacentMonths||!r.isAdjacent)&&(((O=l.day)==null?void 0:O.call(l,C))??b(I,C.props,{default:()=>[r.localized,R(r.isoDate)]}))])})])]}})]))}}),Pe=E({color:String,height:[String,Number],min:null,max:null,modelValue:Number,year:Number,allowedMonths:[Array,Function]},"VDatePickerMonths"),ye=J()({name:"VDatePickerMonths",props:Pe(),emits:{"update:modelValue":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),c=W(e,"modelValue"),m=P(()=>{let u=t.startOfYear(t.date());return e.year&&(u=t.setYear(u,e.year)),ke(12).map(k=>{const v=t.format(u,"monthShort"),w=t.format(u,"month"),d=!!(!s(k)||e.min&&t.isAfter(t.startOfMonth(t.date(e.min)),u)||e.max&&t.isAfter(u,t.startOfMonth(t.date(e.max))));return u=t.getNextMonth(u),{isDisabled:d,text:v,label:w,value:k}})});De(()=>{c.value=c.value??t.getMonth(t.date())});function s(u){return Array.isArray(e.allowedMonths)&&e.allowedMonths.length?e.allowedMonths.includes(u):typeof e.allowedMonths=="function"?e.allowedMonths(u):!0}return K(()=>M("div",{class:"v-date-picker-months",style:{height:ne(e.height)}},[M("div",{class:"v-date-picker-months__content"},[m.value.map((u,k)=>{var d;const v={active:c.value===k,ariaLabel:u.label,color:c.value===k?e.color:void 0,disabled:u.isDisabled,rounded:!0,text:u.text,variant:c.value===u.value?"flat":"text",onClick:()=>w(k)};function w(x){if(c.value===x){D("update:modelValue",c.value);return}c.value=x}return((d=l.month)==null?void 0:d.call(l,{month:u,i:k,props:v}))??b(I,$({key:"month"},v),null)})])])),{}}}),Ye=E({color:String,height:[String,Number],min:null,max:null,modelValue:Number,allowedYears:[Array,Function]},"VDatePickerYears"),me=J()({name:"VDatePickerYears",props:Ye(),directives:{vIntersect:se},emits:{"update:modelValue":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),c=W(e,"modelValue"),m=Z(!1),s=P(()=>{const d=t.getYear(t.date());let x=d-100,S=d+52;e.min&&(x=t.getYear(t.date(e.min))),e.max&&(S=t.getYear(t.date(e.max)));let n=t.startOfYear(t.date());return n=t.setYear(n,x),ke(S-x+1,x).map(h=>{const i=t.format(n,"year");return n=t.setYear(n,t.getYear(n)+1),{text:i,value:h,isDisabled:!w(h)}})});De(()=>{c.value=c.value??t.getYear(t.date())});const u=de(),k=de();function v(){const d=u.el,x=k.el;if(!d||!x)return;const S=d.getBoundingClientRect(),n=x.getBoundingClientRect();d.scrollTop+=n.top-S.top-d.clientHeight/2+n.height/2}function w(d){return Array.isArray(e.allowedYears)&&e.allowedYears.length?e.allowedYears.includes(d):typeof e.allowedYears=="function"?e.allowedYears(d):!0}return K(()=>je(M("div",{class:"v-date-picker-years",ref:u,style:{height:ne(e.height)}},[M("div",{class:"v-date-picker-years__content",onFocus:()=>{var d;return(d=k.el)==null?void 0:d.focus()},onFocusin:()=>m.value=!0,onFocusout:()=>m.value=!1,tabindex:m.value?-1:0},[s.value.map((d,x)=>{var n;const S={ref:c.value===d.value?k:void 0,active:c.value===d.value,color:c.value===d.value?e.color:void 0,rounded:!0,text:d.text,disabled:d.isDisabled,variant:c.value===d.value?"flat":"text",onClick:()=>{if(c.value===d.value){D("update:modelValue",c.value);return}c.value=d.value}};return((n=l.year)==null?void 0:n.call(l,{year:d,i:x,props:S}))??b(I,$({key:"month"},S),null)})])]),[[se,{handler:v},null,{once:!0}]])),{}}}),Je=E({header:{type:String,default:"$vuetify.datePicker.header"},headerColor:String,headerDateFormat:{type:String,default:"normalDateWithWeekday"},landscapeHeaderWidth:[Number,String],...H(we(),["active","monthText","yearText"]),...xe({weeksInMonth:"static"}),...H(Pe(),["modelValue"]),...H(Ye(),["modelValue"]),...Ee({title:"$vuetify.datePicker.title"}),modelValue:null},"VDatePicker"),Ze=J()({name:"VDatePicker",props:Je(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0,"update:viewMode":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),{t:c}=le(),{rtlClasses:m}=Ne(),s=W(e,"modelValue",void 0,o=>j(o).map(f=>t.date(f)),o=>e.multiple?o:o[0]),u=W(e,"viewMode"),{minDate:k,maxDate:v,clampDate:w}=Me(e),d=P(()=>{var V;const o=t.date(),f=(V=s.value)!=null&&V[0]?t.date(s.value[0]):w(o);return f&&t.isValid(f)?f:o}),x=L(()=>e.headerColor??e.color),S=W(e,"month"),n=P({get:()=>Number(S.value??t.getMonth(t.startOfMonth(d.value))),set:o=>S.value=o}),h=W(e,"year"),i=P({get:()=>Number(h.value??t.getYear(t.startOfYear(t.setMonth(d.value,n.value)))),set:o=>h.value=o}),A=Z(!1),T=P(()=>{if(e.multiple&&s.value.length>1)return c("$vuetify.datePicker.itemsSelected",s.value.length);const o=s.value[0]&&t.isValid(s.value[0])?t.format(t.date(s.value[0]),e.headerDateFormat):c(e.header);return e.landscape&&o.split(" ").length===3?o.replace(" ",` +import{f as J,an as le,u as K,s as ne,p as E,I as ae,ag as Ie,aR as X,n as W,w as j,a5 as H,aS as Te,as as ke,X as de,A as Ne,aT as We}from"./vendor-vuetify-DsKlzgKp.js";import{h as I,g as ue,ag as re,I as Be,P as ge,av as se,ao as $e}from"./index-DGIAsv4W.js";import{j as b,k as M,F as G,n as Q,e as P,N as Re,o as be,a1 as Fe,s as Z,b as Le,t as L,w as De,m as $,R as je}from"./vendor-vue-BiQC5iF7.js";import{V as He}from"./VTooltip-2IUjfpCS.js";import{V as ce,m as Ee}from"./VPicker-SM18M-iq.js";const we=E({active:{type:[String,Array],default:void 0},controlHeight:[Number,String],controlVariant:{type:String,default:"docked"},noMonthPicker:Boolean,disabled:{type:[Boolean,String,Array],default:null},nextIcon:{type:ae,default:"$next"},prevIcon:{type:ae,default:"$prev"},modeIcon:{type:ae,default:"$subgroup"},text:String,monthText:String,yearText:String,viewMode:{type:String,default:"month"}},"VDatePickerControls"),ve=J()({name:"VDatePickerControls",props:we(),emits:{"click:year":()=>!0,"click:month":()=>!0,"click:prev":()=>!0,"click:next":()=>!0,"click:prev-year":()=>!0,"click:next-year":()=>!0},setup(e,a){let{emit:D,slots:l}=a;const{t}=le(),c=P(()=>Array.isArray(e.disabled)?e.disabled.includes("text"):!!e.disabled),m=P(()=>Array.isArray(e.disabled)?e.disabled.includes("mode"):!!e.disabled),s=P(()=>Array.isArray(e.disabled)?e.disabled.includes("prev-month"):!!e.disabled),u=P(()=>Array.isArray(e.disabled)?e.disabled.includes("next-month"):!!e.disabled),k=P(()=>Array.isArray(e.disabled)?e.disabled.includes("prev-year"):!!e.disabled),v=P(()=>Array.isArray(e.disabled)?e.disabled.includes("next-year"):!!e.disabled);function w(){D("click:prev")}function d(){D("click:next")}function x(){D("click:prev-year")}function S(){D("click:next-year")}function n(){D("click:year")}function h(){D("click:month")}return K(()=>{const i={VBtn:{density:"comfortable",variant:"text"}},A=b(I,{"data-testid":"prev-month",disabled:s.value,icon:e.prevIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.previousMonth"),onClick:w},null),T=b(I,{"data-testid":"next-month",disabled:u.value,icon:e.nextIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.nextMonth"),onClick:d},null),_=b(I,{"data-testid":"prev-year",disabled:k.value,icon:e.prevIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.previousYear"),onClick:x},null),R=b(I,{"data-testid":"next-year",disabled:v.value,icon:e.nextIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.nextYear"),onClick:S},null),y=b(I,{class:"v-date-picker-controls__only-month-btn","data-testid":"month-btn",density:"default",disabled:c.value,text:e.monthText,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectMonth"),onClick:h},null),r=b(I,{class:"v-date-picker-controls__only-year-btn","data-testid":"year-btn",density:"default",disabled:m.value,text:e.yearText,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null),g=b(I,{class:"v-date-picker-controls__year-btn","data-testid":"year-btn",density:"default",disabled:m.value,text:e.text,appendIcon:e.modeIcon,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null),C=M(G,null,[b(I,{class:"v-date-picker-controls__month-btn","data-testid":"month-btn",height:"36",disabled:c.value,text:e.text,rounded:!0,"aria-label":t("$vuetify.datePicker.ariaLabel.selectMonth"),onClick:h},null),b(I,{class:"v-date-picker-controls__mode-btn","data-testid":"year-btn",disabled:m.value,icon:e.modeIcon,"aria-label":t("$vuetify.datePicker.ariaLabel.selectYear"),onClick:n},null)]),O={viewMode:e.viewMode,disabled:Array.isArray(e.disabled)?e.disabled:[],monthYearText:e.text??"",monthText:e.monthText??"",yearText:e.yearText??"",openMonths:h,openYears:n,prevMonth:w,nextMonth:d,prevYear:x,nextYear:S},U=M(G,null,[e.noMonthPicker?g:C,b(ue,null,null),M("div",{class:"v-date-picker-controls__month"},[A,T])]),ee=M(G,null,[M("div",{class:"v-date-picker-controls__month"},[A,y,T]),b(ue,null,null),M("div",{class:"v-date-picker-controls__year"},[_,r,R])]);return b(re,{defaults:i},{default:()=>{var te;return[M("div",{class:Q(["v-date-picker-controls",`v-date-picker-controls--variant-${e.controlVariant}`]),style:{"--v-date-picker-controls-height":ne(e.controlHeight)}},[((te=l.default)==null?void 0:te.call(l,O))??M(G,null,[e.controlVariant==="modal"&&U,e.controlVariant==="docked"&&ee])])]}})}),{}}}),Ue=E({appendIcon:ae,color:String,header:String,transition:String,onClick:Ie()},"VDatePickerHeader"),fe=J()({name:"VDatePickerHeader",props:Ue(),emits:{click:()=>!0,"click:append":()=>!0},setup(e,a){let{emit:D,slots:l}=a;const{backgroundColorClasses:t,backgroundColorStyles:c}=Be(()=>e.color);function m(){D("click")}function s(){D("click:append")}return K(()=>{const u=!!(l.default||e.header),k=!!(l.append||e.appendIcon);return M("div",{class:Q(["v-date-picker-header",{"v-date-picker-header--clickable":!!e.onClick},t.value]),style:Re(c.value),onClick:m},[l.prepend&&M("div",{key:"prepend",class:"v-date-picker-header__prepend"},[l.prepend()]),u&&b(ge,{key:"content",name:e.transition},{default:()=>{var v;return[M("div",{key:e.header,class:"v-date-picker-header__content"},[((v=l.default)==null?void 0:v.call(l))??e.header])]}}),k&&M("div",{class:"v-date-picker-header__append"},[l.append?b(re,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VBtn:{icon:e.appendIcon,variant:"text"}}},{default:()=>{var v;return[(v=l.append)==null?void 0:v.call(l)]}}):b(I,{key:"append-btn",icon:e.appendIcon,variant:"text",onClick:s},null)])])}),{}}}),pe=E({allowedDates:[Array,Function],disabled:{type:Boolean,default:null},displayValue:null,modelValue:Array,month:[Number,String],max:null,min:null,showAdjacentMonths:Boolean,year:[Number,String],weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},weeksInMonth:{type:String,default:"dynamic"},firstDayOfWeek:{type:[Number,String],default:void 0},firstDayOfYear:{type:[Number,String],default:void 0},weekdayFormat:String},"calendar");function ze(e){const a=X(),D=W(e,"modelValue",[],n=>j(n).map(h=>a.date(h))),l=P(()=>e.displayValue?a.date(e.displayValue):D.value.length>0?a.date(D.value[0]):e.min?a.date(e.min):Array.isArray(e.allowedDates)?a.date(e.allowedDates[0]):a.date()),t=W(e,"year",void 0,n=>{const h=n!=null?Number(n):a.getYear(l.value);return a.startOfYear(a.setYear(a.date(),h))},n=>a.getYear(n)),c=W(e,"month",void 0,n=>{const h=n!=null?Number(n):a.getMonth(l.value),i=a.setYear(a.startOfMonth(a.date()),a.getYear(t.value));return a.setMonth(i,h)},n=>a.getMonth(n)),m=P(()=>{const n=a.toJsDate(a.startOfWeek(a.date(),e.firstDayOfWeek)).getDay();return a.getWeekdays(e.firstDayOfWeek,e.weekdayFormat).filter((h,i)=>e.weekdays.includes((i+n)%7))}),s=P(()=>{const n=a.getWeekArray(c.value,e.firstDayOfWeek),h=n.flat(),i=6*7;if(e.weeksInMonth==="static"&&h.lengthe.weekdays.includes(a.toJsDate(i).getDay())).map((i,A)=>{const T=a.toISO(i),_=!a.isSameMonth(i,c.value),R=a.isSameDay(i,a.startOfMonth(c.value)),y=a.isSameDay(i,a.endOfMonth(c.value)),r=a.isSameDay(i,c.value),g=e.weekdays.length;return{date:i,formatted:a.format(i,"keyboardDate"),isAdjacent:_,isDisabled:S(i),isEnd:y,isHidden:_&&!e.showAdjacentMonths,isSame:r,isSelected:D.value.some(C=>a.isSameDay(i,C)),isStart:R,isToday:a.isSameDay(i,h),isWeekEnd:A%g===g-1,isWeekStart:A%g===0,isoDate:T,localized:a.format(i,"dayOfMonth"),month:a.getMonth(i),year:a.getYear(i)}})}const k=P(()=>{const n=a.startOfWeek(l.value,e.firstDayOfWeek),h=[];for(let A=0;A<=6;A++)h.push(a.addDays(n,A));const i=a.date();return u(h,i)}),v=P(()=>{const n=s.value.flat(),h=a.date();return u(n,h)}),w=P(()=>s.value.map(n=>n.length?a.getWeek(n[0],e.firstDayOfWeek,e.firstDayOfYear):null)),{minDate:d,maxDate:x}=Me(e);function S(n){if(e.disabled)return!0;const h=a.date(n);return d.value&&a.isBefore(a.endOfDay(h),d.value)||x.value&&a.isAfter(h,x.value)?!0:Array.isArray(e.allowedDates)&&e.allowedDates.length>0?!e.allowedDates.some(i=>a.isSameDay(a.date(i),h)):typeof e.allowedDates=="function"?!e.allowedDates(h):!1}return{displayValue:l,daysInMonth:v,daysInWeek:k,genDays:u,model:D,weeksInMonth:s,weekdayLabels:m,weekNumbers:w}}function Me(e){const a=X(),D=P(()=>{if(!e.min)return null;const m=a.date(e.min);return a.isValid(m)?m:null}),l=P(()=>{if(!e.max)return null;const m=a.date(e.max);return a.isValid(m)?m:null});function t(m){return D.value&&a.isBefore(m,D.value)?D.value:l.value&&a.isAfter(m,l.value)?l.value:m}function c(m){return(!D.value||a.isAfter(m,D.value))&&(!l.value||a.isBefore(m,l.value))}return{minDate:D,maxDate:l,clampDate:t,isInAllowedRange:c}}const xe=E({color:String,hideWeekdays:Boolean,multiple:[Boolean,Number,String],showWeek:Boolean,readonly:Boolean,transition:{type:String,default:"picker-transition"},reverseTransition:{type:String,default:"picker-reverse-transition"},events:{type:[Array,Function,Object],default:()=>null},eventColor:{type:[Array,Function,Object,String],default:()=>null},...H(pe(),["displayValue"])},"VDatePickerMonth"),he=J()({name:"VDatePickerMonth",props:xe(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=Le(),{t:c}=le(),{daysInMonth:m,model:s,weekNumbers:u,weekdayLabels:k}=ze(e),v=X(),w=Z(),d=Z(),x=Z(!1),S=L(()=>x.value?e.reverseTransition:e.transition);e.multiple==="range"&&s.value.length>0&&(w.value=s.value[0],s.value.length>1&&(d.value=s.value[s.value.length-1]));const n=P(()=>{const y=["number","string"].includes(typeof e.multiple)?Number(e.multiple):1/0;return s.value.length>=y});be(m,(y,r)=>{r&&(x.value=v.isBefore(y[0].date,r[0].date))});function h(y){const r=v.startOfDay(y);if(s.value.length===0?w.value=void 0:s.value.length===1&&(w.value=s.value[0],d.value=void 0),!w.value)w.value=r,s.value=[w.value];else if(d.value)w.value=y,d.value=void 0,s.value=[w.value];else{if(v.isSameDay(r,w.value)){w.value=void 0,s.value=[];return}else v.isBefore(r,w.value)?(d.value=v.endOfDay(w.value),w.value=r):d.value=v.endOfDay(r);s.value=Te(v,w.value,d.value)}}function i(y){const r=v.format(y.date,"fullDateWithWeekday"),g=y.isToday?"currentDate":"selectDate";return c(`$vuetify.datePicker.ariaLabel.${g}`,r)}function A(y){const r=s.value.findIndex(g=>v.isSameDay(g,y));if(r===-1)s.value=[...s.value,y];else{const g=[...s.value];g.splice(r,1),s.value=g}}function T(y){e.multiple==="range"?h(y):e.multiple?A(y):s.value=[y]}function _(y){const{events:r,eventColor:g}=e;let C,O=[];if(Array.isArray(r)?C=r.includes(y):r instanceof Function?C=r(y)||!1:r?C=r[y]||!1:C=!1,C)C!==!0?O=j(C):typeof g=="string"?O=[g]:typeof g=="function"?O=j(g(y)):Array.isArray(g)?O=g:typeof g=="object"&&g!==null&&(O=j(g[y]));else return[];return O.length?O.filter(Boolean).map(U=>typeof U=="string"?U:"surface-variant"):["surface-variant"]}function R(y){const r=_(y);return r.length?M("div",{class:"v-date-picker-month__events"},[r.map(g=>b(He,{dot:!0,color:g},null))]):null}K(()=>M("div",{class:"v-date-picker-month",style:{"--v-date-picker-days-in-week":e.weekdays.length}},[e.showWeek&&M("div",{key:"weeks",class:"v-date-picker-month__weeks"},[!e.hideWeekdays&&M("div",{key:"hide-week-days",class:"v-date-picker-month__day"},[Fe(" ")]),u.value.map(y=>M("div",{class:Q(["v-date-picker-month__day","v-date-picker-month__day--adjacent"])},[y]))]),b(ge,{name:S.value},{default:()=>{var y;return[M("div",{ref:t,key:(y=m.value[0].date)==null?void 0:y.toString(),class:"v-date-picker-month__days"},[!e.hideWeekdays&&k.value.map(r=>M("div",{class:Q(["v-date-picker-month__day","v-date-picker-month__weekday"])},[r])),m.value.map((r,g)=>{var O;const C={props:{class:"v-date-picker-month__day-btn",color:r.isSelected||r.isToday?e.color:void 0,disabled:r.isDisabled,readonly:e.readonly,icon:!0,ripple:!1,variant:r.isSelected?"flat":r.isToday?"outlined":"text","aria-label":i(r),"aria-current":r.isToday?"date":void 0,onClick:()=>T(r.date)},item:r,i:g};return n.value&&!r.isSelected&&(r.isDisabled=!0),M("div",{class:Q(["v-date-picker-month__day",{"v-date-picker-month__day--adjacent":r.isAdjacent,"v-date-picker-month__day--hide-adjacent":r.isHidden,"v-date-picker-month__day--selected":r.isSelected,"v-date-picker-month__day--week-end":r.isWeekEnd,"v-date-picker-month__day--week-start":r.isWeekStart}]),"data-v-date":r.isDisabled?void 0:r.isoDate},[(e.showAdjacentMonths||!r.isAdjacent)&&(((O=l.day)==null?void 0:O.call(l,C))??b(I,C.props,{default:()=>[r.localized,R(r.isoDate)]}))])})])]}})]))}}),Pe=E({color:String,height:[String,Number],min:null,max:null,modelValue:Number,year:Number,allowedMonths:[Array,Function]},"VDatePickerMonths"),ye=J()({name:"VDatePickerMonths",props:Pe(),emits:{"update:modelValue":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),c=W(e,"modelValue"),m=P(()=>{let u=t.startOfYear(t.date());return e.year&&(u=t.setYear(u,e.year)),ke(12).map(k=>{const v=t.format(u,"monthShort"),w=t.format(u,"month"),d=!!(!s(k)||e.min&&t.isAfter(t.startOfMonth(t.date(e.min)),u)||e.max&&t.isAfter(u,t.startOfMonth(t.date(e.max))));return u=t.getNextMonth(u),{isDisabled:d,text:v,label:w,value:k}})});De(()=>{c.value=c.value??t.getMonth(t.date())});function s(u){return Array.isArray(e.allowedMonths)&&e.allowedMonths.length?e.allowedMonths.includes(u):typeof e.allowedMonths=="function"?e.allowedMonths(u):!0}return K(()=>M("div",{class:"v-date-picker-months",style:{height:ne(e.height)}},[M("div",{class:"v-date-picker-months__content"},[m.value.map((u,k)=>{var d;const v={active:c.value===k,ariaLabel:u.label,color:c.value===k?e.color:void 0,disabled:u.isDisabled,rounded:!0,text:u.text,variant:c.value===u.value?"flat":"text",onClick:()=>w(k)};function w(x){if(c.value===x){D("update:modelValue",c.value);return}c.value=x}return((d=l.month)==null?void 0:d.call(l,{month:u,i:k,props:v}))??b(I,$({key:"month"},v),null)})])])),{}}}),Ye=E({color:String,height:[String,Number],min:null,max:null,modelValue:Number,allowedYears:[Array,Function]},"VDatePickerYears"),me=J()({name:"VDatePickerYears",props:Ye(),directives:{vIntersect:se},emits:{"update:modelValue":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),c=W(e,"modelValue"),m=Z(!1),s=P(()=>{const d=t.getYear(t.date());let x=d-100,S=d+52;e.min&&(x=t.getYear(t.date(e.min))),e.max&&(S=t.getYear(t.date(e.max)));let n=t.startOfYear(t.date());return n=t.setYear(n,x),ke(S-x+1,x).map(h=>{const i=t.format(n,"year");return n=t.setYear(n,t.getYear(n)+1),{text:i,value:h,isDisabled:!w(h)}})});De(()=>{c.value=c.value??t.getYear(t.date())});const u=de(),k=de();function v(){const d=u.el,x=k.el;if(!d||!x)return;const S=d.getBoundingClientRect(),n=x.getBoundingClientRect();d.scrollTop+=n.top-S.top-d.clientHeight/2+n.height/2}function w(d){return Array.isArray(e.allowedYears)&&e.allowedYears.length?e.allowedYears.includes(d):typeof e.allowedYears=="function"?e.allowedYears(d):!0}return K(()=>je(M("div",{class:"v-date-picker-years",ref:u,style:{height:ne(e.height)}},[M("div",{class:"v-date-picker-years__content",onFocus:()=>{var d;return(d=k.el)==null?void 0:d.focus()},onFocusin:()=>m.value=!0,onFocusout:()=>m.value=!1,tabindex:m.value?-1:0},[s.value.map((d,x)=>{var n;const S={ref:c.value===d.value?k:void 0,active:c.value===d.value,color:c.value===d.value?e.color:void 0,rounded:!0,text:d.text,disabled:d.isDisabled,variant:c.value===d.value?"flat":"text",onClick:()=>{if(c.value===d.value){D("update:modelValue",c.value);return}c.value=d.value}};return((n=l.year)==null?void 0:n.call(l,{year:d,i:x,props:S}))??b(I,$({key:"month"},S),null)})])]),[[se,{handler:v},null,{once:!0}]])),{}}}),Je=E({header:{type:String,default:"$vuetify.datePicker.header"},headerColor:String,headerDateFormat:{type:String,default:"normalDateWithWeekday"},landscapeHeaderWidth:[Number,String],...H(we(),["active","monthText","yearText"]),...xe({weeksInMonth:"static"}),...H(Pe(),["modelValue"]),...H(Ye(),["modelValue"]),...Ee({title:"$vuetify.datePicker.title"}),modelValue:null},"VDatePicker"),Ze=J()({name:"VDatePicker",props:Je(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0,"update:viewMode":e=>!0},setup(e,a){let{emit:D,slots:l}=a;const t=X(),{t:c}=le(),{rtlClasses:m}=Ne(),s=W(e,"modelValue",void 0,o=>j(o).map(f=>t.date(f)),o=>e.multiple?o:o[0]),u=W(e,"viewMode"),{minDate:k,maxDate:v,clampDate:w}=Me(e),d=P(()=>{var V;const o=t.date(),f=(V=s.value)!=null&&V[0]?t.date(s.value[0]):w(o);return f&&t.isValid(f)?f:o}),x=L(()=>e.headerColor??e.color),S=W(e,"month"),n=P({get:()=>Number(S.value??t.getMonth(t.startOfMonth(d.value))),set:o=>S.value=o}),h=W(e,"year"),i=P({get:()=>Number(h.value??t.getYear(t.startOfYear(t.setMonth(d.value,n.value)))),set:o=>h.value=o}),A=Z(!1),T=P(()=>{if(e.multiple&&s.value.length>1)return c("$vuetify.datePicker.itemsSelected",s.value.length);const o=s.value[0]&&t.isValid(s.value[0])?t.format(t.date(s.value[0]),e.headerDateFormat):c(e.header);return e.landscape&&o.split(" ").length===3?o.replace(" ",` `):o}),_=L(()=>{let o=t.date();return o=t.setDate(o,1),o=t.setMonth(o,n.value),o=t.setYear(o,i.value),o}),R=L(()=>t.format(_.value,"monthAndYear")),y=L(()=>t.format(_.value,"monthShort")),r=L(()=>t.format(_.value,"year")),g=L(()=>`date-picker-header${A.value?"-reverse":""}-transition`),C=P(()=>{if(e.disabled)return!0;const o=[];if(u.value!=="month")o.push("prev-month","next-month","prev-year","next-year");else{let f=t.date();if(f=t.startOfMonth(f),f=t.setMonth(f,n.value),f=t.setYear(f,i.value),k.value){const V=t.addDays(t.startOfMonth(f),-1),N=t.addDays(t.startOfYear(f),-1);t.isAfter(k.value,V)&&o.push("prev-month"),t.isAfter(k.value,N)&&o.push("prev-year")}if(v.value){const V=t.addDays(t.endOfMonth(f),1),N=t.addDays(t.endOfYear(f),1);t.isAfter(V,v.value)&&o.push("next-month"),t.isAfter(N,v.value)&&o.push("next-year")}}return o}),O=P(()=>e.allowedYears||te),U=P(()=>e.allowedMonths||Se);function ee(o,f){const V=e.allowedDates;if(typeof V!="function")return!0;const N=1+We(t,o,f);for(let B=0;B0?n.value--:(i.value--,n.value=11,F()),q()}function Ce(){if(i.value++,v.value){const o=String(n.value+1).padStart(2,"0"),f=t.parseISO(`${i.value}-${o}-01`);t.isAfter(f,v.value)&&(n.value=t.getMonth(v.value))}F()}function _e(){if(i.value--,k.value){const o=String(n.value+1).padStart(2,"0"),f=t.endOfMonth(t.parseISO(`${i.value}-${o}-01`));t.isAfter(k.value,f)&&(n.value=t.getMonth(k.value))}F()}function Oe(){u.value="month"}function ie(){u.value=u.value==="months"?"month":"months"}function oe(){u.value=u.value==="year"?"month":"year"}function q(){u.value==="months"&&ie()}function F(){u.value==="year"&&oe()}return be(s,(o,f)=>{const V=j(f),N=j(o);if(!N.length)return;const B=t.date(V[V.length-1]),p=t.date(N[N.length-1]);if(t.isSameDay(B,p))return;const z=t.getMonth(p),Y=t.getYear(p);z!==n.value&&(n.value=z,q()),Y!==i.value&&(i.value=Y,F()),A.value=t.isBefore(B,p)}),K(()=>{const o=ce.filterProps(e),f=H(ve.filterProps(e),["viewMode"]),V=fe.filterProps(e),N=he.filterProps(e),B=H(ye.filterProps(e),["modelValue"]),p=H(me.filterProps(e),["modelValue"]),z={color:x.value,header:T.value,transition:g.value};return b(ce,$(o,{color:x.value,class:["v-date-picker",`v-date-picker--${u.value}`,{"v-date-picker--show-week":e.showWeek},m.value,e.class],style:[{"--v-date-picker-landscape-header-width":ne(e.landscapeHeaderWidth)},e.style]}),{title:()=>{var Y;return((Y=l.title)==null?void 0:Y.call(l))??M("div",{class:"v-date-picker__title"},[c(e.title)])},header:()=>l.header?b(re,{defaults:{VDatePickerHeader:{...z}}},{default:()=>{var Y;return[(Y=l.header)==null?void 0:Y.call(l,z)]}}):b(fe,$({key:"header"},V,z,{onClick:u.value!=="month"?Oe:void 0}),{prepend:l.prepend,append:l.append}),default:()=>M(G,null,[b(ve,$(f,{disabled:C.value,viewMode:u.value,text:R.value,monthText:y.value,yearText:r.value,"onClick:next":Ve,"onClick:prev":Ae,"onClick:nextYear":Ce,"onClick:prevYear":_e,"onClick:month":ie,"onClick:year":oe}),{default:l.controls}),b($e,{hideOnLeave:!0},{default:()=>[u.value==="months"?b(ye,$({key:"date-picker-months"},B,{modelValue:n.value,"onUpdate:modelValue":[Y=>n.value=Y,q],min:k.value,max:v.value,year:i.value,allowedMonths:U.value}),{month:l.month}):u.value==="year"?b(me,$({key:"date-picker-years"},p,{modelValue:i.value,"onUpdate:modelValue":[Y=>i.value=Y,F],min:k.value,max:v.value,allowedYears:O.value}),{year:l.year}):b(he,$({key:"date-picker-month"},N,{modelValue:s.value,"onUpdate:modelValue":Y=>s.value=Y,month:n.value,"onUpdate:month":[Y=>n.value=Y,q],year:i.value,"onUpdate:year":[Y=>i.value=Y,F],min:k.value,max:v.value}),{day:l.day})]})]),actions:l.actions})}),{}}});export{Ze as V}; diff --git a/assets/VExpansionPanels-CQt43P3v.js b/assets/VExpansionPanels-BDI8gHu5.js similarity index 96% rename from assets/VExpansionPanels-CQt43P3v.js rename to assets/VExpansionPanels-BDI8gHu5.js index 765101b..5d4db80 100644 --- a/assets/VExpansionPanels-CQt43P3v.js +++ b/assets/VExpansionPanels-BDI8gHu5.js @@ -1 +1 @@ -import{d as B,j as c,R as A,V as $,k as v,N as b,n as p,e as P,t as l,p as F}from"./vendor-vue-28M5UGz3.js";import{ac as O,a5 as q,ad as H,a0 as C,I as R,f as J,ag as _,b as K,a as M,ab as Q,N as U,a2 as W,m as D,R as X,ae as Y,$ as Z,aa as ee,ap as ae}from"./index-CzpSlHRw.js";import{f as y,u as V,p as g,k as I,I as h,h as ne,j as le,m as te,aj as se}from"./vendor-vuetify-95axeNJO.js";const f=Symbol.for("vuetify:v-expansion-panel"),j=g({...I(),...H()},"VExpansionPanelText"),T=y()({name:"VExpansionPanelText",props:j(),setup(e,d){let{slots:n}=d;const a=B(f);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:u}=O(e,a.isSelected);return V(()=>c(q,{onAfterLeave:u},{default:()=>{var o;return[A(v("div",{class:p(["v-expansion-panel-text",e.class]),style:b(e.style)},[n.default&&s.value&&v("div",{class:"v-expansion-panel-text__wrapper"},[(o=n.default)==null?void 0:o.call(n)])]),[[$,a.isSelected.value]])]}})),{}}}),z=g({color:String,expandIcon:{type:h,default:"$expand"},collapseIcon:{type:h,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...I(),...M()},"VExpansionPanelTitle"),w=y()({name:"VExpansionPanelTitle",directives:{vRipple:C},props:z(),setup(e,d){let{slots:n}=d;const a=B(f);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:u}=R(()=>e.color),{dimensionStyles:o}=K(e),r=P(()=>({collapseIcon:e.collapseIcon,disabled:a.disabled.value,expanded:a.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly})),E=l(()=>a.isSelected.value?e.collapseIcon:e.expandIcon);return V(()=>{var x;return A(v("button",{class:p(["v-expansion-panel-title",{"v-expansion-panel-title--active":a.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},s.value,e.class]),style:b([u.value,o.value,e.style]),type:"button",tabindex:a.disabled.value?-1:void 0,disabled:a.disabled.value,"aria-expanded":a.isSelected.value,onClick:e.readonly?void 0:a.toggle},[v("span",{class:"v-expansion-panel-title__overlay"},null),(x=n.default)==null?void 0:x.call(n,r.value),!e.hideActions&&c(_,{defaults:{VIcon:{icon:E.value}}},{default:()=>{var m;return[v("span",{class:"v-expansion-panel-title__icon"},[((m=n.actions)==null?void 0:m.call(n,r.value))??c(J,null,null)])]}})]),[[C,e.ripple]])}),{}}}),G=g({title:String,text:String,bgColor:String,...Z(),...Y(),...X(),...D(),...z(),...j()},"VExpansionPanel"),re=y()({name:"VExpansionPanel",props:G(),emits:{"group:selected":e=>!0},setup(e,d){let{slots:n}=d;const a=Q(e,f),{backgroundColorClasses:s,backgroundColorStyles:u}=R(()=>e.bgColor),{elevationClasses:o}=W(e),{roundedClasses:r}=U(e),E=l(()=>(a==null?void 0:a.disabled.value)||e.disabled),x=P(()=>a.group.items.value.reduce((i,t,k)=>(a.group.selected.value.includes(t.id)&&i.push(k),i),[])),m=P(()=>{const i=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&x.value.some(t=>t-i===1)}),L=P(()=>{const i=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&x.value.some(t=>t-i===-1)});return F(f,a),V(()=>{const i=!!(n.text||e.text),t=!!(n.title||e.title),k=w.filterProps(e),N=T.filterProps(e);return c(e.tag,{class:p(["v-expansion-panel",{"v-expansion-panel--active":a.isSelected.value,"v-expansion-panel--before-active":m.value,"v-expansion-panel--after-active":L.value,"v-expansion-panel--disabled":E.value},r.value,s.value,e.class]),style:b([u.value,e.style])},{default:()=>[v("div",{class:p(["v-expansion-panel__shadow",...o.value])},null),c(_,{defaults:{VExpansionPanelTitle:{...k},VExpansionPanelText:{...N}}},{default:()=>{var S;return[t&&c(w,{key:"title"},{default:()=>[n.title?n.title():e.title]}),i&&c(T,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(S=n.default)==null?void 0:S.call(n)]}})]})}),{groupItem:a}}}),oe=["default","accordion","inset","popout"],ie=g({flat:Boolean,...ae(),...se(G(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...te(),...I(),...D(),variant:{type:String,default:"default",validator:e=>oe.includes(e)}},"VExpansionPanels"),ve=y()({name:"VExpansionPanels",props:ie(),emits:{"update:modelValue":e=>!0},setup(e,d){let{slots:n}=d;const{next:a,prev:s}=ee(e,f),{themeClasses:u}=ne(e),o=l(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return le({VExpansionPanel:{bgColor:l(()=>e.bgColor),collapseIcon:l(()=>e.collapseIcon),color:l(()=>e.color),eager:l(()=>e.eager),elevation:l(()=>e.elevation),expandIcon:l(()=>e.expandIcon),focusable:l(()=>e.focusable),hideActions:l(()=>e.hideActions),readonly:l(()=>e.readonly),ripple:l(()=>e.ripple),rounded:l(()=>e.rounded),static:l(()=>e.static)}}),V(()=>c(e.tag,{class:p(["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},u.value,o.value,e.class]),style:b(e.style)},{default:()=>{var r;return[(r=n.default)==null?void 0:r.call(n,{prev:s,next:a})]}})),{next:a,prev:s}}});export{ve as V,re as a,w as b,T as c}; +import{d as B,j as c,R as A,V as $,k as v,N as b,n as p,e as P,t as l,p as F}from"./vendor-vue-BiQC5iF7.js";import{ac as O,a5 as q,ad as H,a0 as C,I as R,f as J,ag as _,b as K,a as M,ab as Q,N as U,a2 as W,m as D,R as X,ae as Y,$ as Z,aa as ee,ap as ae}from"./index-DGIAsv4W.js";import{f as y,u as V,p as g,k as I,I as h,h as ne,j as le,m as te,aj as se}from"./vendor-vuetify-DsKlzgKp.js";const f=Symbol.for("vuetify:v-expansion-panel"),j=g({...I(),...H()},"VExpansionPanelText"),T=y()({name:"VExpansionPanelText",props:j(),setup(e,d){let{slots:n}=d;const a=B(f);if(!a)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:u}=O(e,a.isSelected);return V(()=>c(q,{onAfterLeave:u},{default:()=>{var o;return[A(v("div",{class:p(["v-expansion-panel-text",e.class]),style:b(e.style)},[n.default&&s.value&&v("div",{class:"v-expansion-panel-text__wrapper"},[(o=n.default)==null?void 0:o.call(n)])]),[[$,a.isSelected.value]])]}})),{}}}),z=g({color:String,expandIcon:{type:h,default:"$expand"},collapseIcon:{type:h,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...I(),...M()},"VExpansionPanelTitle"),w=y()({name:"VExpansionPanelTitle",directives:{vRipple:C},props:z(),setup(e,d){let{slots:n}=d;const a=B(f);if(!a)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:u}=R(()=>e.color),{dimensionStyles:o}=K(e),r=P(()=>({collapseIcon:e.collapseIcon,disabled:a.disabled.value,expanded:a.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly})),E=l(()=>a.isSelected.value?e.collapseIcon:e.expandIcon);return V(()=>{var x;return A(v("button",{class:p(["v-expansion-panel-title",{"v-expansion-panel-title--active":a.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},s.value,e.class]),style:b([u.value,o.value,e.style]),type:"button",tabindex:a.disabled.value?-1:void 0,disabled:a.disabled.value,"aria-expanded":a.isSelected.value,onClick:e.readonly?void 0:a.toggle},[v("span",{class:"v-expansion-panel-title__overlay"},null),(x=n.default)==null?void 0:x.call(n,r.value),!e.hideActions&&c(_,{defaults:{VIcon:{icon:E.value}}},{default:()=>{var m;return[v("span",{class:"v-expansion-panel-title__icon"},[((m=n.actions)==null?void 0:m.call(n,r.value))??c(J,null,null)])]}})]),[[C,e.ripple]])}),{}}}),G=g({title:String,text:String,bgColor:String,...Z(),...Y(),...X(),...D(),...z(),...j()},"VExpansionPanel"),re=y()({name:"VExpansionPanel",props:G(),emits:{"group:selected":e=>!0},setup(e,d){let{slots:n}=d;const a=Q(e,f),{backgroundColorClasses:s,backgroundColorStyles:u}=R(()=>e.bgColor),{elevationClasses:o}=W(e),{roundedClasses:r}=U(e),E=l(()=>(a==null?void 0:a.disabled.value)||e.disabled),x=P(()=>a.group.items.value.reduce((i,t,k)=>(a.group.selected.value.includes(t.id)&&i.push(k),i),[])),m=P(()=>{const i=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&x.value.some(t=>t-i===1)}),L=P(()=>{const i=a.group.items.value.findIndex(t=>t.id===a.id);return!a.isSelected.value&&x.value.some(t=>t-i===-1)});return F(f,a),V(()=>{const i=!!(n.text||e.text),t=!!(n.title||e.title),k=w.filterProps(e),N=T.filterProps(e);return c(e.tag,{class:p(["v-expansion-panel",{"v-expansion-panel--active":a.isSelected.value,"v-expansion-panel--before-active":m.value,"v-expansion-panel--after-active":L.value,"v-expansion-panel--disabled":E.value},r.value,s.value,e.class]),style:b([u.value,e.style])},{default:()=>[v("div",{class:p(["v-expansion-panel__shadow",...o.value])},null),c(_,{defaults:{VExpansionPanelTitle:{...k},VExpansionPanelText:{...N}}},{default:()=>{var S;return[t&&c(w,{key:"title"},{default:()=>[n.title?n.title():e.title]}),i&&c(T,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(S=n.default)==null?void 0:S.call(n)]}})]})}),{groupItem:a}}}),oe=["default","accordion","inset","popout"],ie=g({flat:Boolean,...ae(),...se(G(),["bgColor","collapseIcon","color","eager","elevation","expandIcon","focusable","hideActions","readonly","ripple","rounded","tile","static"]),...te(),...I(),...D(),variant:{type:String,default:"default",validator:e=>oe.includes(e)}},"VExpansionPanels"),ve=y()({name:"VExpansionPanels",props:ie(),emits:{"update:modelValue":e=>!0},setup(e,d){let{slots:n}=d;const{next:a,prev:s}=ee(e,f),{themeClasses:u}=ne(e),o=l(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return le({VExpansionPanel:{bgColor:l(()=>e.bgColor),collapseIcon:l(()=>e.collapseIcon),color:l(()=>e.color),eager:l(()=>e.eager),elevation:l(()=>e.elevation),expandIcon:l(()=>e.expandIcon),focusable:l(()=>e.focusable),hideActions:l(()=>e.hideActions),readonly:l(()=>e.readonly),ripple:l(()=>e.ripple),rounded:l(()=>e.rounded),static:l(()=>e.static)}}),V(()=>c(e.tag,{class:p(["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},u.value,o.value,e.class]),style:b(e.style)},{default:()=>{var r;return[(r=n.default)==null?void 0:r.call(n,{prev:s,next:a})]}})),{next:a,prev:s}}});export{ve as V,re as a,w as b,T as c}; diff --git a/assets/VForm-DIiMelbi.js b/assets/VForm-ObW_L7SS.js similarity index 70% rename from assets/VForm-DIiMelbi.js rename to assets/VForm-ObW_L7SS.js index fa98e1d..693e40d 100644 --- a/assets/VForm-DIiMelbi.js +++ b/assets/VForm-ObW_L7SS.js @@ -1 +1 @@ -import{f as p,u as b,p as v,k as y}from"./vendor-vuetify-95axeNJO.js";import{j as F,k as V}from"./VTextField-BxdS2D7S.js";import{E as k}from"./index-CzpSlHRw.js";import{k as h,N as R,n as P,b as C}from"./vendor-vue-28M5UGz3.js";const S=v({...y(),...V()},"VForm"),j=p()({name:"VForm",props:S(),emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,i){let{slots:s,emit:f}=i;const r=F(o),n=C();function l(t){t.preventDefault(),r.reset()}function u(t){const a=t,e=r.validate();a.then=e.then.bind(e),a.catch=e.catch.bind(e),a.finally=e.finally.bind(e),f("submit",a),a.defaultPrevented||e.then(c=>{var m;let{valid:d}=c;d&&((m=n.value)==null||m.submit())}),a.preventDefault()}return b(()=>{var t;return h("form",{ref:n,class:P(["v-form",o.class]),style:R(o.style),novalidate:!0,onReset:l,onSubmit:u},[(t=s.default)==null?void 0:t.call(s,r)])}),k(r,n)}});export{j as V}; +import{f as p,u as b,p as v,k as y}from"./vendor-vuetify-DsKlzgKp.js";import{j as F,k as V}from"./VTextField-BurlcggD.js";import{E as k}from"./index-DGIAsv4W.js";import{k as h,N as R,n as P,b as C}from"./vendor-vue-BiQC5iF7.js";const S=v({...y(),...V()},"VForm"),j=p()({name:"VForm",props:S(),emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,i){let{slots:s,emit:f}=i;const r=F(o),n=C();function l(t){t.preventDefault(),r.reset()}function u(t){const a=t,e=r.validate();a.then=e.then.bind(e),a.catch=e.catch.bind(e),a.finally=e.finally.bind(e),f("submit",a),a.defaultPrevented||e.then(c=>{var m;let{valid:d}=c;d&&((m=n.value)==null||m.submit())}),a.preventDefault()}return b(()=>{var t;return h("form",{ref:n,class:P(["v-form",o.class]),style:R(o.style),novalidate:!0,onReset:l,onSubmit:u},[(t=s.default)==null?void 0:t.call(s,r)])}),k(r,n)}});export{j as V}; diff --git a/assets/VPagination-CwVL3tMR.js b/assets/VPagination-DLzhjdaP.js similarity index 96% rename from assets/VPagination-CwVL3tMR.js rename to assets/VPagination-DLzhjdaP.js index 655a44a..0521214 100644 --- a/assets/VPagination-CwVL3tMR.js +++ b/assets/VPagination-DLzhjdaP.js @@ -1 +1 @@ -import{h as P,am as K,m as W,at as q,R as G,$ as O,M as U,ah as X}from"./index-CzpSlHRw.js";import{f as H,n as J,an as Q,A as Y,h as Z,a0 as aa,j as R,y as ea,u as ta,au as B,p as la,I as x,m as ia,k as na,as as V}from"./vendor-vuetify-95axeNJO.js";import{ai as sa,b as ra,j as g,k as b,m as L,n as N,N as ua,s as oa,e as m,I as $,t as d}from"./vendor-vue-28M5UGz3.js";function va(){const a=ra([]);sa(()=>a.value=[]);function _(n,p){a.value[p]=n}return{refs:a,updateRef:_}}const ca=la({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:a=>a.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:a=>a%1===0},totalVisible:[Number,String],firstIcon:{type:x,default:"$first"},prevIcon:{type:x,default:"$prev"},nextIcon:{type:x,default:"$next"},lastIcon:{type:x,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...X(),...na(),...U(),...O(),...G(),...q(),...W({tag:"nav"}),...ia(),...K({variant:"text"})},"VPagination"),ba=H()({name:"VPagination",props:ca(),emits:{"update:modelValue":a=>!0,first:a=>!0,prev:a=>!0,next:a=>!0,last:a=>!0},setup(a,_){let{slots:n,emit:p}=_;const i=J(a,"modelValue"),{t:f,n:C}=Q(),{isRtl:k}=Y(),{themeClasses:w}=Z(a),{width:F}=aa(),I=oa(-1);R(void 0,{scoped:!0});const{resizeRef:M}=ea(e=>{if(!e.length)return;const{target:t,contentRect:l}=e[0],u=t.querySelector(".v-pagination__list > *");if(!u)return;const o=l.width,h=u.offsetWidth+parseFloat(getComputedStyle(u).marginRight)*2;I.value=S(o,h)}),s=m(()=>parseInt(a.length,10)),r=m(()=>parseInt(a.start,10)),v=m(()=>a.totalVisible!=null?parseInt(a.totalVisible,10):I.value>=0?I.value:S(F.value,58));function S(e,t){const l=a.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((e-t*l)/t).toFixed(2))))}const z=m(()=>{if(s.value<=0||isNaN(s.value)||s.value>Number.MAX_SAFE_INTEGER)return[];if(v.value<=0)return[];if(v.value===1)return[i.value];if(s.value<=v.value)return V(s.value,r.value);const e=v.value%2===0,t=e?v.value/2:Math.floor(v.value/2),l=e?t:t+1,u=s.value-t;if(l-i.value>=0)return[...V(Math.max(1,v.value-1),r.value),a.ellipsis,s.value];if(i.value-u>=(e?1:0)){const o=v.value-1,h=s.value-o+r.value;return[r.value,a.ellipsis,...V(o,h)]}else{const o=Math.max(1,v.value-2),h=o===1?i.value:i.value-Math.ceil(o/2)+r.value;return[r.value,a.ellipsis,...V(o,h),a.ellipsis,s.value]}});function y(e,t,l){e.preventDefault(),i.value=t,l&&p(l,t)}const{refs:D,updateRef:T}=va();R({VPaginationBtn:{color:d(()=>a.color),border:d(()=>a.border),density:d(()=>a.density),size:d(()=>a.size),variant:d(()=>a.variant),rounded:d(()=>a.rounded),elevation:d(()=>a.elevation)}});const E=m(()=>z.value.map((e,t)=>{const l=u=>T(u,t);if(typeof e=="string")return{isActive:!1,key:`ellipsis-${t}`,page:e,props:{ref:l,ellipsis:!0,icon:!0,disabled:!0}};{const u=e===i.value;return{isActive:u,key:e,page:C(e),props:{ref:l,ellipsis:!1,icon:!0,disabled:!!a.disabled||Number(a.length)<2,color:u?a.activeColor:a.color,"aria-current":u,"aria-label":f(u?a.currentPageAriaLabel:a.pageAriaLabel,e),onClick:o=>y(o,e)}}}})),c=m(()=>{const e=!!a.disabled||i.value<=r.value,t=!!a.disabled||i.value>=r.value+s.value-1;return{first:a.showFirstLastPage?{icon:k.value?a.lastIcon:a.firstIcon,onClick:l=>y(l,r.value,"first"),disabled:e,"aria-label":f(a.firstAriaLabel),"aria-disabled":e}:void 0,prev:{icon:k.value?a.nextIcon:a.prevIcon,onClick:l=>y(l,i.value-1,"prev"),disabled:e,"aria-label":f(a.previousAriaLabel),"aria-disabled":e},next:{icon:k.value?a.prevIcon:a.nextIcon,onClick:l=>y(l,i.value+1,"next"),disabled:t,"aria-label":f(a.nextAriaLabel),"aria-disabled":t},last:a.showFirstLastPage?{icon:k.value?a.firstIcon:a.lastIcon,onClick:l=>y(l,r.value+s.value-1,"last"),disabled:t,"aria-label":f(a.lastAriaLabel),"aria-disabled":t}:void 0}});function A(){var t;const e=i.value-r.value;(t=D.value[e])==null||t.$el.focus()}function j(e){e.key===B.left&&!a.disabled&&i.value>Number(a.start)?(i.value=i.value-1,$(A)):e.key===B.right&&!a.disabled&&i.valueg(a.tag,{ref:M,class:N(["v-pagination",w.value,a.class]),style:ua(a.style),role:"navigation","aria-label":f(a.ariaLabel),onKeydown:j,"data-test":"v-pagination-root"},{default:()=>[b("ul",{class:"v-pagination__list"},[a.showFirstLastPage&&b("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(c.value.first):g(P,L({_as:"VPaginationBtn"},c.value.first),null)]),b("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(c.value.prev):g(P,L({_as:"VPaginationBtn"},c.value.prev),null)]),E.value.map((e,t)=>b("li",{key:e.key,class:N(["v-pagination__item",{"v-pagination__item--is-active":e.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(e):g(P,L({_as:"VPaginationBtn"},e.props),{default:()=>[e.page]})])),b("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(c.value.next):g(P,L({_as:"VPaginationBtn"},c.value.next),null)]),a.showFirstLastPage&&b("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(c.value.last):g(P,L({_as:"VPaginationBtn"},c.value.last),null)])])]})),{}}});export{ba as V}; +import{h as P,am as K,m as W,at as q,R as G,$ as O,M as U,ah as X}from"./index-DGIAsv4W.js";import{f as H,n as J,an as Q,A as Y,h as Z,a0 as aa,j as R,y as ea,u as ta,au as B,p as la,I as x,m as ia,k as na,as as V}from"./vendor-vuetify-DsKlzgKp.js";import{ai as sa,b as ra,j as g,k as b,m as L,n as N,N as ua,s as oa,e as m,I as $,t as d}from"./vendor-vue-BiQC5iF7.js";function va(){const a=ra([]);sa(()=>a.value=[]);function _(n,p){a.value[p]=n}return{refs:a,updateRef:_}}const ca=la({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:a=>a.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:a=>a%1===0},totalVisible:[Number,String],firstIcon:{type:x,default:"$first"},prevIcon:{type:x,default:"$prev"},nextIcon:{type:x,default:"$next"},lastIcon:{type:x,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...X(),...na(),...U(),...O(),...G(),...q(),...W({tag:"nav"}),...ia(),...K({variant:"text"})},"VPagination"),ba=H()({name:"VPagination",props:ca(),emits:{"update:modelValue":a=>!0,first:a=>!0,prev:a=>!0,next:a=>!0,last:a=>!0},setup(a,_){let{slots:n,emit:p}=_;const i=J(a,"modelValue"),{t:f,n:C}=Q(),{isRtl:k}=Y(),{themeClasses:w}=Z(a),{width:F}=aa(),I=oa(-1);R(void 0,{scoped:!0});const{resizeRef:M}=ea(e=>{if(!e.length)return;const{target:t,contentRect:l}=e[0],u=t.querySelector(".v-pagination__list > *");if(!u)return;const o=l.width,h=u.offsetWidth+parseFloat(getComputedStyle(u).marginRight)*2;I.value=S(o,h)}),s=m(()=>parseInt(a.length,10)),r=m(()=>parseInt(a.start,10)),v=m(()=>a.totalVisible!=null?parseInt(a.totalVisible,10):I.value>=0?I.value:S(F.value,58));function S(e,t){const l=a.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((e-t*l)/t).toFixed(2))))}const z=m(()=>{if(s.value<=0||isNaN(s.value)||s.value>Number.MAX_SAFE_INTEGER)return[];if(v.value<=0)return[];if(v.value===1)return[i.value];if(s.value<=v.value)return V(s.value,r.value);const e=v.value%2===0,t=e?v.value/2:Math.floor(v.value/2),l=e?t:t+1,u=s.value-t;if(l-i.value>=0)return[...V(Math.max(1,v.value-1),r.value),a.ellipsis,s.value];if(i.value-u>=(e?1:0)){const o=v.value-1,h=s.value-o+r.value;return[r.value,a.ellipsis,...V(o,h)]}else{const o=Math.max(1,v.value-2),h=o===1?i.value:i.value-Math.ceil(o/2)+r.value;return[r.value,a.ellipsis,...V(o,h),a.ellipsis,s.value]}});function y(e,t,l){e.preventDefault(),i.value=t,l&&p(l,t)}const{refs:D,updateRef:T}=va();R({VPaginationBtn:{color:d(()=>a.color),border:d(()=>a.border),density:d(()=>a.density),size:d(()=>a.size),variant:d(()=>a.variant),rounded:d(()=>a.rounded),elevation:d(()=>a.elevation)}});const E=m(()=>z.value.map((e,t)=>{const l=u=>T(u,t);if(typeof e=="string")return{isActive:!1,key:`ellipsis-${t}`,page:e,props:{ref:l,ellipsis:!0,icon:!0,disabled:!0}};{const u=e===i.value;return{isActive:u,key:e,page:C(e),props:{ref:l,ellipsis:!1,icon:!0,disabled:!!a.disabled||Number(a.length)<2,color:u?a.activeColor:a.color,"aria-current":u,"aria-label":f(u?a.currentPageAriaLabel:a.pageAriaLabel,e),onClick:o=>y(o,e)}}}})),c=m(()=>{const e=!!a.disabled||i.value<=r.value,t=!!a.disabled||i.value>=r.value+s.value-1;return{first:a.showFirstLastPage?{icon:k.value?a.lastIcon:a.firstIcon,onClick:l=>y(l,r.value,"first"),disabled:e,"aria-label":f(a.firstAriaLabel),"aria-disabled":e}:void 0,prev:{icon:k.value?a.nextIcon:a.prevIcon,onClick:l=>y(l,i.value-1,"prev"),disabled:e,"aria-label":f(a.previousAriaLabel),"aria-disabled":e},next:{icon:k.value?a.prevIcon:a.nextIcon,onClick:l=>y(l,i.value+1,"next"),disabled:t,"aria-label":f(a.nextAriaLabel),"aria-disabled":t},last:a.showFirstLastPage?{icon:k.value?a.firstIcon:a.lastIcon,onClick:l=>y(l,r.value+s.value-1,"last"),disabled:t,"aria-label":f(a.lastAriaLabel),"aria-disabled":t}:void 0}});function A(){var t;const e=i.value-r.value;(t=D.value[e])==null||t.$el.focus()}function j(e){e.key===B.left&&!a.disabled&&i.value>Number(a.start)?(i.value=i.value-1,$(A)):e.key===B.right&&!a.disabled&&i.valueg(a.tag,{ref:M,class:N(["v-pagination",w.value,a.class]),style:ua(a.style),role:"navigation","aria-label":f(a.ariaLabel),onKeydown:j,"data-test":"v-pagination-root"},{default:()=>[b("ul",{class:"v-pagination__list"},[a.showFirstLastPage&&b("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(c.value.first):g(P,L({_as:"VPaginationBtn"},c.value.first),null)]),b("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(c.value.prev):g(P,L({_as:"VPaginationBtn"},c.value.prev),null)]),E.value.map((e,t)=>b("li",{key:e.key,class:N(["v-pagination__item",{"v-pagination__item--is-active":e.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(e):g(P,L({_as:"VPaginationBtn"},e.props),{default:()=>[e.page]})])),b("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(c.value.next):g(P,L({_as:"VPaginationBtn"},c.value.next),null)]),a.showFirstLastPage&&b("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(c.value.last):g(P,L({_as:"VPaginationBtn"},c.value.last),null)])])]})),{}}});export{ba as V}; diff --git a/assets/VPicker-199veasp.js b/assets/VPicker-SM18M-iq.js similarity index 80% rename from assets/VPicker-199veasp.js rename to assets/VPicker-SM18M-iq.js index 3719aa6..e6f2c6c 100644 --- a/assets/VPicker-199veasp.js +++ b/assets/VPicker-SM18M-iq.js @@ -1 +1 @@ -import{aa as m,f as v,u,p as h}from"./vendor-vuetify-95axeNJO.js";import{I as p,ag as f}from"./index-CzpSlHRw.js";import{a as s,m as V}from"./VSheet-ZjkOR-Oc.js";import{j as i,k as t,N as P,n as g,m as y}from"./vendor-vue-28M5UGz3.js";const C=m("v-picker-title"),_=h({bgColor:String,divided:Boolean,landscape:Boolean,title:String,hideHeader:Boolean,hideTitle:Boolean,...V()},"VPicker"),N=v()({name:"VPicker",props:_(),setup(a,o){let{slots:e}=o;const{backgroundColorClasses:c,backgroundColorStyles:d}=p(()=>a.color);return u(()=>{const n=s.filterProps(a),k=!a.hideTitle&&!!(a.title||e.title);return i(s,y(n,{color:a.bgColor,class:["v-picker",{"v-picker--divided":a.divided,"v-picker--landscape":a.landscape,"v-picker--with-actions":!!e.actions},a.class],style:a.style}),{default:()=>{var r;return[!a.hideHeader&&t("div",{key:"header",class:g(["v-picker__header-wrapper",c.value]),style:P([d.value])},[k&&i(C,{key:"picker-title"},{default:()=>{var l;return[((l=e.title)==null?void 0:l.call(e))??a.title]}}),e.header&&t("div",{class:"v-picker__header"},[e.header()])]),t("div",{class:"v-picker__body"},[(r=e.default)==null?void 0:r.call(e)]),e.actions&&i(f,{defaults:{VBtn:{slim:!0,variant:"text"}}},{default:()=>[t("div",{class:"v-picker__actions"},[e.actions()])]})]}})}),{}}});export{N as V,_ as m}; +import{aa as m,f as v,u,p as h}from"./vendor-vuetify-DsKlzgKp.js";import{I as p,ag as f}from"./index-DGIAsv4W.js";import{a as s,m as V}from"./VSheet-BBnSA_kJ.js";import{j as i,k as t,N as P,n as g,m as y}from"./vendor-vue-BiQC5iF7.js";const C=m("v-picker-title"),_=h({bgColor:String,divided:Boolean,landscape:Boolean,title:String,hideHeader:Boolean,hideTitle:Boolean,...V()},"VPicker"),N=v()({name:"VPicker",props:_(),setup(a,o){let{slots:e}=o;const{backgroundColorClasses:c,backgroundColorStyles:d}=p(()=>a.color);return u(()=>{const n=s.filterProps(a),k=!a.hideTitle&&!!(a.title||e.title);return i(s,y(n,{color:a.bgColor,class:["v-picker",{"v-picker--divided":a.divided,"v-picker--landscape":a.landscape,"v-picker--with-actions":!!e.actions},a.class],style:a.style}),{default:()=>{var r;return[!a.hideHeader&&t("div",{key:"header",class:g(["v-picker__header-wrapper",c.value]),style:P([d.value])},[k&&i(C,{key:"picker-title"},{default:()=>{var l;return[((l=e.title)==null?void 0:l.call(e))??a.title]}}),e.header&&t("div",{class:"v-picker__header"},[e.header()])]),t("div",{class:"v-picker__body"},[(r=e.default)==null?void 0:r.call(e)]),e.actions&&i(f,{defaults:{VBtn:{slim:!0,variant:"text"}}},{default:()=>[t("div",{class:"v-picker__actions"},[e.actions()])]})]}})}),{}}});export{N as V,_ as m}; diff --git a/assets/VRow-sd4d6eNi.js b/assets/VRow-Cjhiymuu.js similarity index 93% rename from assets/VRow-sd4d6eNi.js rename to assets/VRow-Cjhiymuu.js index 01f311b..fe6e83f 100644 --- a/assets/VRow-sd4d6eNi.js +++ b/assets/VRow-Cjhiymuu.js @@ -1 +1 @@ -import{f as C,p as S,k as b,aE as i}from"./vendor-vuetify-95axeNJO.js";import{m as k}from"./index-CzpSlHRw.js";import{h as N,e as j,a as u}from"./vendor-vue-28M5UGz3.js";const V=i.reduce((t,a)=>(t[a]={type:[Boolean,String,Number],default:!1},t),{}),v=i.reduce((t,a)=>{const e="offset"+u(a);return t[e]={type:[String,Number],default:null},t},{}),L=i.reduce((t,a)=>{const e="order"+u(a);return t[e]={type:[String,Number],default:null},t},{}),y={col:Object.keys(V),offset:Object.keys(v),order:Object.keys(L)};function G(t,a,e){let s=t;if(!(e==null||e===!1)){if(a){const n=a.replace(t,"");s+=`-${n}`}return t==="col"&&(s="v-"+s),t==="col"&&(e===""||e===!0)||(s+=`-${e}`),s.toLowerCase()}}const _=["auto","start","end","center","baseline","stretch"],I=S({cols:{type:[Boolean,String,Number],default:!1},...V,offset:{type:[String,Number],default:null},...v,order:{type:[String,Number],default:null},...L,alignSelf:{type:String,default:null,validator:t=>_.includes(t)},...b(),...k()},"VCol"),J=C()({name:"VCol",props:I(),setup(t,a){let{slots:e}=a;const s=j(()=>{const n=[];let l;for(l in y)y[l].forEach(o=>{const c=t[o],g=G(l,o,c);g&&n.push(g)});const r=n.some(o=>o.startsWith("v-col-"));return n.push({"v-col":!r||!t.cols,[`v-col-${t.cols}`]:t.cols,[`offset-${t.offset}`]:t.offset,[`order-${t.order}`]:t.order,[`align-self-${t.alignSelf}`]:t.alignSelf}),n});return()=>{var n;return N(t.tag,{class:[s.value,t.class],style:t.style},(n=e.default)==null?void 0:n.call(e))}}}),f=["start","end","center"],$=["space-between","space-around","space-evenly"];function d(t,a){return i.reduce((e,s)=>{const n=t+u(s);return e[n]=a(),e},{})}const R=[...f,"baseline","stretch"],h=t=>R.includes(t),w=d("align",()=>({type:String,default:null,validator:h})),T=[...f,...$],P=t=>T.includes(t),E=d("justify",()=>({type:String,default:null,validator:P})),U=[...f,...$,"stretch"],A=t=>U.includes(t),O=d("alignContent",()=>({type:String,default:null,validator:A})),m={align:Object.keys(w),justify:Object.keys(E),alignContent:Object.keys(O)},B={align:"align",justify:"justify",alignContent:"align-content"};function M(t,a,e){let s=B[t];if(e!=null){if(a){const n=a.replace(t,"");s+=`-${n}`}return s+=`-${e}`,s.toLowerCase()}}const F=S({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:h},...w,justify:{type:String,default:null,validator:P},...E,alignContent:{type:String,default:null,validator:A},...O,...b(),...k()},"VRow"),W=C()({name:"VRow",props:F(),setup(t,a){let{slots:e}=a;const s=j(()=>{const n=[];let l;for(l in m)m[l].forEach(r=>{const o=t[r],c=M(l,r,o);c&&n.push(c)});return n.push({"v-row--no-gutters":t.noGutters,"v-row--dense":t.dense,[`align-${t.align}`]:t.align,[`justify-${t.justify}`]:t.justify,[`align-content-${t.alignContent}`]:t.alignContent}),n});return()=>{var n;return N(t.tag,{class:["v-row",s.value,t.class],style:t.style},(n=e.default)==null?void 0:n.call(e))}}});export{W as V,J as a}; +import{f as C,p as S,k as b,aE as i}from"./vendor-vuetify-DsKlzgKp.js";import{m as k}from"./index-DGIAsv4W.js";import{h as N,e as j,a as u}from"./vendor-vue-BiQC5iF7.js";const V=i.reduce((t,a)=>(t[a]={type:[Boolean,String,Number],default:!1},t),{}),v=i.reduce((t,a)=>{const e="offset"+u(a);return t[e]={type:[String,Number],default:null},t},{}),L=i.reduce((t,a)=>{const e="order"+u(a);return t[e]={type:[String,Number],default:null},t},{}),y={col:Object.keys(V),offset:Object.keys(v),order:Object.keys(L)};function G(t,a,e){let s=t;if(!(e==null||e===!1)){if(a){const n=a.replace(t,"");s+=`-${n}`}return t==="col"&&(s="v-"+s),t==="col"&&(e===""||e===!0)||(s+=`-${e}`),s.toLowerCase()}}const _=["auto","start","end","center","baseline","stretch"],I=S({cols:{type:[Boolean,String,Number],default:!1},...V,offset:{type:[String,Number],default:null},...v,order:{type:[String,Number],default:null},...L,alignSelf:{type:String,default:null,validator:t=>_.includes(t)},...b(),...k()},"VCol"),J=C()({name:"VCol",props:I(),setup(t,a){let{slots:e}=a;const s=j(()=>{const n=[];let l;for(l in y)y[l].forEach(o=>{const c=t[o],g=G(l,o,c);g&&n.push(g)});const r=n.some(o=>o.startsWith("v-col-"));return n.push({"v-col":!r||!t.cols,[`v-col-${t.cols}`]:t.cols,[`offset-${t.offset}`]:t.offset,[`order-${t.order}`]:t.order,[`align-self-${t.alignSelf}`]:t.alignSelf}),n});return()=>{var n;return N(t.tag,{class:[s.value,t.class],style:t.style},(n=e.default)==null?void 0:n.call(e))}}}),f=["start","end","center"],$=["space-between","space-around","space-evenly"];function d(t,a){return i.reduce((e,s)=>{const n=t+u(s);return e[n]=a(),e},{})}const R=[...f,"baseline","stretch"],h=t=>R.includes(t),w=d("align",()=>({type:String,default:null,validator:h})),T=[...f,...$],P=t=>T.includes(t),E=d("justify",()=>({type:String,default:null,validator:P})),U=[...f,...$,"stretch"],A=t=>U.includes(t),O=d("alignContent",()=>({type:String,default:null,validator:A})),m={align:Object.keys(w),justify:Object.keys(E),alignContent:Object.keys(O)},B={align:"align",justify:"justify",alignContent:"align-content"};function M(t,a,e){let s=B[t];if(e!=null){if(a){const n=a.replace(t,"");s+=`-${n}`}return s+=`-${e}`,s.toLowerCase()}}const F=S({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:h},...w,justify:{type:String,default:null,validator:P},...E,alignContent:{type:String,default:null,validator:A},...O,...b(),...k()},"VRow"),W=C()({name:"VRow",props:F(),setup(t,a){let{slots:e}=a;const s=j(()=>{const n=[];let l;for(l in m)m[l].forEach(r=>{const o=t[r],c=M(l,r,o);c&&n.push(c)});return n.push({"v-row--no-gutters":t.noGutters,"v-row--dense":t.dense,[`align-${t.align}`]:t.align,[`justify-${t.justify}`]:t.justify,[`align-content-${t.alignContent}`]:t.alignContent}),n});return()=>{var n;return N(t.tag,{class:["v-row",s.value,t.class],style:t.style},(n=e.default)==null?void 0:n.call(e))}}});export{W as V,J as a}; diff --git a/assets/VSelect-DZBjiB3J.js b/assets/VSelect-oxA0t9CG.js similarity index 97% rename from assets/VSelect-DZBjiB3J.js rename to assets/VSelect-oxA0t9CG.js index 403b3b1..fe4b8b6 100644 --- a/assets/VSelect-DZBjiB3J.js +++ b/assets/VSelect-oxA0t9CG.js @@ -1 +1 @@ -import{e as lt,l as nt,h as at,V as Oe,i as ot}from"./VTextField-BxdS2D7S.js";import{f as Pe,y as ze,u as Re,p as ue,k as He,a0 as ut,z as ke,aN as rt,ai as Ne,E as Ue,l as st,C as it,a3 as ct,s as he,$ as je,w as Ce,an as ft,n as Ve,aO as dt,aJ as vt,o as ge,aK as _e,_ as Le,a5 as mt,I as ht}from"./vendor-vuetify-95axeNJO.js";import{o as oe,k as C,F as se,m as U,w as Fe,s as j,q as Ge,b as J,e as $,I as We,D as gt,j as T,N as pt,n as pe,t as ye,l as xe,u as ie,E as yt,a1 as bt}from"./vendor-vue-28M5UGz3.js";import{b as wt,a as kt,aB as Vt,f as Be,p as It,q as Ke,i as St,a6 as Ct,o as Ft,ag as xt,E as Pt,Q as Rt,aD as Tt,aE as At}from"./index-CzpSlHRw.js";import{V as Mt,a as Dt}from"./VSheet-ZjkOR-Oc.js";import{V as Et}from"./VCheckboxBtn-BLxCsxXE.js";import{V as $e}from"./VChip-B3whZF-S.js";const Ot=ue({renderless:Boolean,...He()},"VVirtualScrollItem"),_t=Pe()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Ot(),emits:{"update:height":e=>!0},setup(e,n){let{attrs:t,emit:s,slots:a}=n;const{resizeRef:c,contentRect:d}=ze(void 0,"border");oe(()=>{var o;return(o=d.value)==null?void 0:o.height},o=>{o!=null&&s("update:height",o)}),Re(()=>{var o,r;return e.renderless?C(se,null,[(o=a.default)==null?void 0:o.call(a,{itemRef:c})]):C("div",U({ref:c,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(r=a.default)==null?void 0:r.call(a)])})}}),Lt=-1,Bt=1,Ie=100,Kt=ue({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function $t(e,n){const t=ut(),s=j(0);Fe(()=>{s.value=parseFloat(e.itemHeight||0)});const a=j(0),c=j(Math.ceil((parseInt(e.height)||t.height.value)/(s.value||16))||1),d=j(0),o=j(0),r=J(),h=J();let k=0;const{resizeRef:y,contentRect:p}=ze();Fe(()=>{y.value=r.value});const g=$(()=>{var f;return r.value===document.documentElement?t.height.value:((f=p.value)==null?void 0:f.height)||parseInt(e.height)||0}),v=$(()=>!!(r.value&&h.value&&g.value&&s.value));let u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length});const b=j(0);let A=-1;function z(f){return u[f]||s.value}const x=rt(()=>{const f=performance.now();S[0]=0;const V=n.value.length;for(let P=1;P<=V;P++)S[P]=(S[P-1]||0)+z(P-1);b.value=Math.max(b.value,performance.now()-f)},b),X=oe(v,f=>{f&&(X(),k=h.value.offsetTop,x.immediate(),G(),~A&&We(()=>{Ue&&window.requestAnimationFrame(()=>{_(A),A=-1})}))});Ge(()=>{x.clear()});function Y(f,V){const P=u[f],D=s.value;s.value=D?Math.min(s.value,V):V,(P!==V||D!==s.value)&&(u[f]=V,x())}function R(f){f=ke(f,0,n.value.length);const V=Math.floor(f),P=f%1,D=V+1,te=S[V]||0,H=S[D]||te;return te+(H-te)*P}function W(f){return zt(S,f)}let q=0,M=0,Z=0;oe(g,(f,V)=>{G(),f{M=0,G()})});let ee=-1;function F(){if(!r.value||!h.value)return;const f=r.value.scrollTop,V=performance.now();V-Z>500?(M=Math.sign(f-q),k=h.value.offsetTop):M=f-q,q=f,Z=V,window.clearTimeout(ee),ee=window.setTimeout(ce,500),G()}function ce(){!r.value||!h.value||(M=0,Z=0,window.clearTimeout(ee),G())}let fe=-1;function G(){cancelAnimationFrame(fe),fe=requestAnimationFrame(de)}function de(){if(!r.value||!g.value||!s.value)return;const f=q-k,V=Math.sign(M),P=Math.max(0,f-Ie),D=ke(W(P),0,n.value.length),te=f+g.value+Ie,H=ke(W(te)+1,D+1,n.value.length);if((V!==Lt||Dc.value)){const re=R(a.value)-R(D),we=R(H)-R(c.value);Math.max(re,we)>Ie?(a.value=D,c.value=H):(D<=0&&(a.value=D),H>=n.value.length&&(c.value=H))}d.value=R(a.value),o.value=R(n.value.length)-R(c.value)}function _(f){const V=R(f);!r.value||f&&!V?A=f:r.value.scrollTop=V}const be=$(()=>n.value.slice(a.value,c.value).map((f,V)=>{const P=V+a.value;return{raw:f,index:P,key:Ne(f,e.itemKey,P)}}));return oe(n,()=>{u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length}),x.immediate(),G()},{deep:1}),{calculateVisibleItems:G,containerRef:r,markerRef:h,computedItems:be,paddingTop:d,paddingBottom:o,scrollToIndex:_,handleScroll:F,handleScrollend:ce,handleItemResize:Y}}function zt(e,n){let t=e.length-1,s=0,a=0,c=null,d=-1;if(e[t]>1,c=e[a],c>n)t=a-1;else if(c[]},renderless:Boolean,...Kt(),...He(),...kt()},"VVirtualScroll"),Nt=Pe()({name:"VVirtualScroll",props:Ht(),setup(e,n){let{slots:t}=n;const s=st("VVirtualScroll"),{dimensionStyles:a}=wt(e),{calculateVisibleItems:c,containerRef:d,markerRef:o,handleScroll:r,handleScrollend:h,handleItemResize:k,scrollToIndex:y,paddingTop:p,paddingBottom:g,computedItems:v}=$t(e,ye(()=>e.items));return it(()=>e.renderless,()=>{function u(){var A,z;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";d.value===document.documentElement?(document[b]("scroll",r,{passive:!0}),document[b]("scrollend",h)):((A=d.value)==null||A[b]("scroll",r,{passive:!0}),(z=d.value)==null||z[b]("scrollend",h))}gt(()=>{d.value=ct(s.vnode.el,!0),u(!0)}),Ge(u)}),Re(()=>{const u=v.value.map(S=>T(_t,{key:S.key,renderless:e.renderless,"onUpdate:height":b=>k(S.index,b)},{default:b=>{var A;return(A=t.default)==null?void 0:A.call(t,{item:S.raw,index:S.index,...b})}}));return e.renderless?C(se,null,[C("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:he(p.value)}},null),u,C("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(g.value)}},null)]):C("div",{ref:d,class:pe(["v-virtual-scroll",e.class]),onScrollPassive:r,onScrollend:h,style:pt([a.value,e.style])},[C("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:he(p.value),paddingBottom:he(g.value)}},[u])])}),{calculateVisibleItems:c,scrollToIndex:y}}});function Ut(e,n,t){return function(a){return!a.relatedTarget&&document.activeElement===document.body&&e.value?(requestAnimationFrame(()=>{if(!e.value)return;const c=n(),d=(c&&je(c)[0])??t();d==null||d.focus({preventScroll:!0})}),!0):!1}}function jt(e,n){const t=j(!1);let s;function a(o){cancelAnimationFrame(s),t.value=!0,s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{t.value=!1})})}async function c(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(t.value){const r=oe(t,()=>{r(),o()})}else o()})}async function d(o){var k,y;if(o.key==="Tab"&&((k=n.value)==null||k.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const r=(y=e.value)==null?void 0:y.$el;if(!r)return;(o.key==="Home"||o.key==="End")&&r.scrollTo({top:o.key==="Home"?0:r.scrollHeight,behavior:"smooth"}),await c();const h=r.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const p=r.getBoundingClientRect().top;for(const g of h)if(g.getBoundingClientRect().top>=p){g.focus();break}}else{const p=r.getBoundingClientRect().bottom;for(const g of[...h].reverse())if(g.getBoundingClientRect().bottom<=p){g.focus();break}}}return{onScrollPassive:a,onKeydown:d}}function Gt(e){let{groups:n,onLeave:t}=e;function s(o){var r;return o.type==="list"?(r=o.contentRef.value)==null?void 0:r.$el:o.contentRef.value}function a(o){const r=s(o);return r?je(r):[]}function c(o){var g;const r=o.target,h=o.shiftKey?"backward":"forward",k=n.map(a),y=n.map(v=>{var u;return v.type==="list"?(u=v.contentRef.value)==null?void 0:u.$el:v.contentRef.value}).findIndex(v=>v==null?void 0:v.contains(r)),p=d(k,y,h,r);if(p===null){const v=n[y],u=k[y];(v.type==="list"||(h==="forward"?u.at(-1)===o.target:u.at(0)===o.target))&&t()}else{o.preventDefault(),o.stopImmediatePropagation();const v=n[p];if(v.type==="list"&&xe(v.displayItemsCount)>0)(g=v.contentRef.value)==null||g.focus(0);else{const u=h==="forward";k[p].at(u?0:-1).focus()}}}function d(o,r,h,k){const y=n[r],p=o[r];if(y.type!=="list"&&!(h==="forward"?p.at(-1)===k:p.at(0)===k))return null;const g=h==="forward"?1:-1;for(let v=r+g;v>=0&&v0||u.type==="list"&&xe(u.displayItemsCount)>0)return v}return null}return{onTabKeydown:c}}const Wt=(e,n,t)=>{if(e==null||n==null)return-1;if(!n.length)return 0;e=e.toString().toLocaleLowerCase(),n=n.toString().toLocaleLowerCase();const s=[];let a=e.indexOf(n);for(;~a;)s.push([a,a+n.length]),a=e.indexOf(n,a+n.length);return s.length?s:-1};function Se(e,n){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+n.length]]:Array.isArray(e[0])?e:[e]}const Qt=ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Jt(e,n,t){var r,h;const s=[],a=(t==null?void 0:t.default)??Wt,c=t!=null&&t.filterKeys?Ce(t.filterKeys):!1,d=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return s;let o=[];e:for(let k=0;k0)&&!(t!=null&&t.noFilter)){let S=!1;if(typeof y=="object"){if(y.type==="divider"||y.type==="subheader"){(((r=o.at(-1))==null?void 0:r.type)!=="divider"||y.type!=="subheader")&&(o=[]),o.push({index:k,matches:{},type:y.type});continue}const z=c||Object.keys(p);S=z.length===d;for(const x of z){const X=Ne(p,x),Y=(h=t==null?void 0:t.customKeyFilter)==null?void 0:h[x];if(u=Y?Y(X,n,y):a(X,n,y),u!==-1&&u!==!1)Y?g[x]=Se(u,n):v[x]=Se(u,n);else if((t==null?void 0:t.filterMode)==="every")continue e}}else u=a(y,n,y),u!==-1&&u!==!1&&(v.title=Se(u,n));const b=Object.keys(v).length,A=Object.keys(g).length;if(!b&&!A||(t==null?void 0:t.filterMode)==="union"&&A!==d&&!b||(t==null?void 0:t.filterMode)==="intersection"&&(A!==d||!b&&d>0&&!S))continue}o.length&&(s.push(...o),o=[]),s.push({index:k,matches:{...v,...g}})}return s}function Xt(e,n,t,s){const a=j([]),c=j(new Map),d=$(()=>s!=null&&s.transform?ie(n).map(r=>[r,s.transform(r)]):ie(n));Fe(()=>{const r=typeof t=="function"?t():ie(t),h=typeof r!="string"&&typeof r!="number"?"":String(r),k=Jt(d.value,h,{customKeyFilter:{...e.customKeyFilter,...ie(s==null?void 0:s.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),y=ie(n),p=[],g=new Map;k.forEach(v=>{let{index:u,matches:S}=v;const b=y[u];p.push(b),g.set(b.value,S)}),a.value=p,c.value=g});function o(r){return c.value.get(r.value)}return{filteredItems:a,filteredMatches:c,getMatches:o}}function Yt(e,n,t){return t==null||!t.length?n:t.map((s,a)=>{const c=a===0?0:t[a-1][1],d=[C("span",{class:pe(`${e}__unmask`)},[n.slice(c,s[0])]),C("span",{class:pe(`${e}__mask`)},[n.slice(s[0],s[1])])];return a===t.length-1&&d.push(C("span",{class:pe(`${e}__unmask`)},[n.slice(s[1])])),C(se,null,[d])})}const qt=ue({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function Zt(e,n){const t=yt(),s=$(()=>`menu-${t}`),a=ye(()=>xe(n)),c=ye(()=>s.value);return{menuId:s,ariaExpanded:a,ariaControls:c}}const el=ue({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:ht,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...qt(),...At({itemChildren:!1})},"Select"),tl=ue({search:String,...Qt({filterKeys:["title"]}),...el(),...mt(ot({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...Rt({transition:{component:Tt}})},"VSelect"),il=Pe()({name:"VSelect",props:tl(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0,"update:search":e=>!0},setup(e,n){let{slots:t}=n;const{t:s}=ft(),a=J(),c=J(),d=J(),o=J(),r=J(),{items:h,transformIn:k,transformOut:y}=Vt(e),p=Ve(e,"search",""),{filteredItems:g,getMatches:v}=Xt(e,h,()=>p.value),u=Ve(e,"modelValue",[],l=>k(l===null?[null]:Ce(l)),l=>{const i=y(l);return e.multiple?i:i[0]??null}),S=$(()=>typeof e.counterValue=="function"?e.counterValue(u.value):typeof e.counterValue=="number"?e.counterValue:u.value.length),b=lt(e),A=nt(e),z=$(()=>u.value.map(l=>l.value)),x=j(!1),X=ye(()=>e.closableChips&&!b.isReadonly.value&&!b.isDisabled.value),{InputIcon:Y}=at(e);let R="",W=0,q;const M=$(()=>{const l=p.value?g.value:h.value;return e.hideSelected?l.filter(i=>!u.value.some(I=>(e.valueComparator||ge)(I,i))):l}),Z=$(()=>e.hideNoData&&!M.value.length||b.isReadonly.value||b.isDisabled.value),ee=Ve(e,"menu"),F=$({get:()=>ee.value,set:l=>{var i;ee.value&&!l&&((i=c.value)!=null&&i.ΨopenChildren.size)||l&&Z.value||(ee.value=l)}}),{menuId:ce,ariaExpanded:fe,ariaControls:G}=Zt(e,F),de=$(()=>{var l;return{...e.menuProps,activatorProps:{...((l=e.menuProps)==null?void 0:l.activatorProps)||{},"aria-haspopup":"listbox"}}}),_=J(),be=jt(_,a),f=Ut(F,()=>{var l;return(l=c.value)==null?void 0:l.contentEl},()=>{var l;return(l=a.value)==null?void 0:l.controlRef}),{onTabKeydown:V}=Gt({groups:[{type:"element",contentRef:d},{type:"list",contentRef:_,displayItemsCount:()=>M.value.length},{type:"element",contentRef:o}],onLeave:()=>{var l;F.value=!1,(l=a.value)==null||l.focus()}});function P(l){e.openOnClear&&(F.value=!0)}function D(){Z.value||(F.value=!F.value)}function te(l){var i;l.key==="Tab"&&V(l),(i=_.value)!=null&&i.$el.contains(l.target)&&_e(l)&&H(l)}function H(l){var L,K,ae;if(!l.key||b.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(l.key)&&l.preventDefault(),["Enter","ArrowDown"," "].includes(l.key)&&(F.value=!0),["Escape","Tab"].includes(l.key)&&(F.value=!1),e.clearable&&l.key==="Backspace"){l.preventDefault(),u.value=[],P();return}l.key==="Home"?(L=_.value)==null||L.focus("first"):l.key==="End"&&((K=_.value)==null||K.focus("last"));const i=1e3;if(!_e(l))return;const I=performance.now();I-q>i&&(R="",W=0),R+=l.key.toLowerCase(),q=I;const Q=M.value;function N(){let m=le();return m||R.at(-1)===R.at(-2)&&(R=R.slice(0,-1),W++,m=le(),m)||(W=0,m=le(),m)?m:(R=l.key.toLowerCase(),le())}function le(){for(let m=W;m1&&arguments[1]!==void 0?arguments[1]:!0;if(!l.props.disabled)if(e.multiple){const I=u.value.findIndex(N=>(e.valueComparator||ge)(N.value,l.value)),Q=i??!~I;if(~I){const N=Q?[...u.value,l]:[...u.value];N.splice(I,1),u.value=N}else Q&&(u.value=[...u.value,l])}else{const I=i!==!1;u.value=I?[l]:[],We(()=>{F.value=!1})}}function we(l){var I;const i=l.target;(I=a.value)!=null&&I.$el.contains(i)||(F.value=!1)}function Te(){return M.value.findIndex(l=>u.value.some(i=>(e.valueComparator||ge)(i.value,l.value)))}function Qe(){if(!u.value.length)return-1;const l=e.valueComparator||ge;let i=0;for(const I of M.value){if(u.value.some(N=>l(N.value,I.value)))return I.props.disabled?-1:i;I.props.disabled||i++}return-1}function Je(){var l;if(e.eager&&((l=r.value)==null||l.calculateVisibleItems()),_.value&&x.value){const i=Qe();_.value.focus(i>=0?i:"first",{focusVisible:!1})}}function Xe(){var l;p.value="",x.value&&((l=a.value)==null||l.focus())}function Ye(l){x.value=!0}function qe(l){var i;if(!((i=a.value)!=null&&i.$el.contains(l.relatedTarget))){if(f(l))return;x.value=!1}}function Ze(l){if(l==null)u.value=[];else if(Le(a.value,":autofill")||Le(a.value,":-webkit-autofill")){const i=h.value.find(I=>I.title===l);i&&re(i)}else a.value&&(a.value.value="")}return oe(F,()=>{if(!e.hideSelected&&F.value&&u.value.length){const l=Te();Ue&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var i;l>=0&&((i=r.value)==null||i.scrollToIndex(l))})}}),oe(h,(l,i)=>{F.value||x.value&&e.hideNoData&&!i.length&&l.length&&(F.value=!0)}),Re(()=>{const l=!!(e.chips||t.chip),i=!!(!e.hideNoData||M.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),I=u.value.length>0,Q=Oe.filterProps(e),N=I||!x.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder,le={search:p,filteredItems:g.value};return T(Oe,U({ref:a},Q,{modelValue:u.value.map(B=>B.props.title).join(", "),name:void 0,"onUpdate:modelValue":Ze,focused:x.value,"onUpdate:focused":B=>x.value=B,validationValue:u.externalValue,counterValue:S.value,dirty:I,class:["v-select",{"v-select--active-menu":F.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":u.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:N,"onClick:clear":P,"onMousedown:control":D,onBlur:we,onKeydown:H,"aria-expanded":fe.value,"aria-controls":G.value}),{...t,default:B=>{let{id:ne}=B;return C(se,null,[C("select",{hidden:!0,multiple:e.multiple,name:A.fieldName.value},[h.value.map(w=>C("option",{key:w.value,value:w.value,selected:z.value.includes(w.value)},null))]),T(Mt,U({id:ce.value,ref:c,modelValue:F.value,"onUpdate:modelValue":w=>F.value=w,activator:"parent",disabled:Z.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:Je,onAfterLeave:Xe},de.value,{contentClass:["v-select__content",de.value.contentClass]}),{default:()=>[T(Dt,{onFocusin:Ye,onFocusout:qe,onKeydown:te},{default:()=>[t["menu-header"]&&C("header",{ref:d},[t["menu-header"](le)]),i&&T(It,U({key:"select-list",ref:_,selected:z.value,selectStrategy:e.multiple?"independent":"single-independent",tabindex:"-1",selectable:!!M.value.length,"aria-live":"polite","aria-labelledby":`${ne.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},be,e.listProps),{default:()=>{var w,L,K;return[(w=t["prepend-item"])==null?void 0:w.call(t),!M.value.length&&!e.hideNoData&&(((L=t["no-data"])==null?void 0:L.call(t))??T(Ke,{key:"no-data",title:s(e.noDataText)},null)),T(Nt,{ref:r,renderless:!0,items:M.value,itemKey:"value"},{default:ae=>{var Me,De,Ee;let{item:m,index:E,itemRef:O}=ae;const ve=dt(m.props),Ae=U(m.props,{ref:O,key:m.value,onClick:()=>re(m,null),"aria-posinset":E+1,"aria-setsize":M.value.length});return m.type==="divider"?((Me=t.divider)==null?void 0:Me.call(t,{props:m.raw,index:E}))??T(St,U(m.props,{key:`divider-${E}`}),null):m.type==="subheader"?((De=t.subheader)==null?void 0:De.call(t,{props:m.raw,index:E}))??T(Ct,U(m.props,{key:`subheader-${E}`}),null):((Ee=t.item)==null?void 0:Ee.call(t,{item:m,index:E,props:Ae}))??T(Ke,U(Ae,{role:"option"}),{prepend:me=>{let{isSelected:et}=me;return C(se,null,[e.multiple&&!e.hideSelected?T(Et,{key:m.value,modelValue:et,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:tt=>tt.preventDefault()},null):void 0,ve.prependAvatar&&T(Ft,{image:ve.prependAvatar},null),ve.prependIcon&&T(Be,{icon:ve.prependIcon},null)])},title:()=>{var me;return p.value?Yt("v-select",m.title,(me=v(m))==null?void 0:me.title):m.title}})}}),(K=t["append-item"])==null?void 0:K.call(t)]}}),t["menu-footer"]&&C("footer",{ref:o},[t["menu-footer"](le)])]})]}),u.value.map((w,L)=>{function K(O){O.stopPropagation(),O.preventDefault(),re(w,!1)}const ae=U($e.filterProps(w.props),{"onClick:close":K,onKeydown(O){O.key!=="Enter"&&O.key!==" "||(O.preventDefault(),O.stopPropagation(),K(O))},onMousedown(O){O.preventDefault(),O.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),m=l?!!t.chip:!!t.selection,E=m?vt(l?t.chip({item:w,index:L,props:ae}):t.selection({item:w,index:L})):void 0;if(!(m&&!E))return C("div",{key:w.value,class:"v-select__selection"},[l?t.chip?T(xt,{key:"chip-defaults",defaults:{VChip:{closable:X.value,size:"small",text:w.title}}},{default:()=>[E]}):T($e,U({key:"chip",closable:X.value,size:"small",text:w.title,disabled:w.props.disabled},ae),null):E??C("span",{class:"v-select__selection-text"},[w.title,e.multiple&&L!0},setup(e,n){let{attrs:t,emit:s,slots:a}=n;const{resizeRef:c,contentRect:d}=ze(void 0,"border");oe(()=>{var o;return(o=d.value)==null?void 0:o.height},o=>{o!=null&&s("update:height",o)}),Re(()=>{var o,r;return e.renderless?C(se,null,[(o=a.default)==null?void 0:o.call(a,{itemRef:c})]):C("div",U({ref:c,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(r=a.default)==null?void 0:r.call(a)])})}}),Lt=-1,Bt=1,Ie=100,Kt=ue({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function $t(e,n){const t=ut(),s=j(0);Fe(()=>{s.value=parseFloat(e.itemHeight||0)});const a=j(0),c=j(Math.ceil((parseInt(e.height)||t.height.value)/(s.value||16))||1),d=j(0),o=j(0),r=J(),h=J();let k=0;const{resizeRef:y,contentRect:p}=ze();Fe(()=>{y.value=r.value});const g=$(()=>{var f;return r.value===document.documentElement?t.height.value:((f=p.value)==null?void 0:f.height)||parseInt(e.height)||0}),v=$(()=>!!(r.value&&h.value&&g.value&&s.value));let u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length});const b=j(0);let A=-1;function z(f){return u[f]||s.value}const x=rt(()=>{const f=performance.now();S[0]=0;const V=n.value.length;for(let P=1;P<=V;P++)S[P]=(S[P-1]||0)+z(P-1);b.value=Math.max(b.value,performance.now()-f)},b),X=oe(v,f=>{f&&(X(),k=h.value.offsetTop,x.immediate(),G(),~A&&We(()=>{Ue&&window.requestAnimationFrame(()=>{_(A),A=-1})}))});Ge(()=>{x.clear()});function Y(f,V){const P=u[f],D=s.value;s.value=D?Math.min(s.value,V):V,(P!==V||D!==s.value)&&(u[f]=V,x())}function R(f){f=ke(f,0,n.value.length);const V=Math.floor(f),P=f%1,D=V+1,te=S[V]||0,H=S[D]||te;return te+(H-te)*P}function W(f){return zt(S,f)}let q=0,M=0,Z=0;oe(g,(f,V)=>{G(),f{M=0,G()})});let ee=-1;function F(){if(!r.value||!h.value)return;const f=r.value.scrollTop,V=performance.now();V-Z>500?(M=Math.sign(f-q),k=h.value.offsetTop):M=f-q,q=f,Z=V,window.clearTimeout(ee),ee=window.setTimeout(ce,500),G()}function ce(){!r.value||!h.value||(M=0,Z=0,window.clearTimeout(ee),G())}let fe=-1;function G(){cancelAnimationFrame(fe),fe=requestAnimationFrame(de)}function de(){if(!r.value||!g.value||!s.value)return;const f=q-k,V=Math.sign(M),P=Math.max(0,f-Ie),D=ke(W(P),0,n.value.length),te=f+g.value+Ie,H=ke(W(te)+1,D+1,n.value.length);if((V!==Lt||Dc.value)){const re=R(a.value)-R(D),we=R(H)-R(c.value);Math.max(re,we)>Ie?(a.value=D,c.value=H):(D<=0&&(a.value=D),H>=n.value.length&&(c.value=H))}d.value=R(a.value),o.value=R(n.value.length)-R(c.value)}function _(f){const V=R(f);!r.value||f&&!V?A=f:r.value.scrollTop=V}const be=$(()=>n.value.slice(a.value,c.value).map((f,V)=>{const P=V+a.value;return{raw:f,index:P,key:Ne(f,e.itemKey,P)}}));return oe(n,()=>{u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length}),x.immediate(),G()},{deep:1}),{calculateVisibleItems:G,containerRef:r,markerRef:h,computedItems:be,paddingTop:d,paddingBottom:o,scrollToIndex:_,handleScroll:F,handleScrollend:ce,handleItemResize:Y}}function zt(e,n){let t=e.length-1,s=0,a=0,c=null,d=-1;if(e[t]>1,c=e[a],c>n)t=a-1;else if(c[]},renderless:Boolean,...Kt(),...He(),...kt()},"VVirtualScroll"),Nt=Pe()({name:"VVirtualScroll",props:Ht(),setup(e,n){let{slots:t}=n;const s=st("VVirtualScroll"),{dimensionStyles:a}=wt(e),{calculateVisibleItems:c,containerRef:d,markerRef:o,handleScroll:r,handleScrollend:h,handleItemResize:k,scrollToIndex:y,paddingTop:p,paddingBottom:g,computedItems:v}=$t(e,ye(()=>e.items));return it(()=>e.renderless,()=>{function u(){var A,z;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";d.value===document.documentElement?(document[b]("scroll",r,{passive:!0}),document[b]("scrollend",h)):((A=d.value)==null||A[b]("scroll",r,{passive:!0}),(z=d.value)==null||z[b]("scrollend",h))}gt(()=>{d.value=ct(s.vnode.el,!0),u(!0)}),Ge(u)}),Re(()=>{const u=v.value.map(S=>T(_t,{key:S.key,renderless:e.renderless,"onUpdate:height":b=>k(S.index,b)},{default:b=>{var A;return(A=t.default)==null?void 0:A.call(t,{item:S.raw,index:S.index,...b})}}));return e.renderless?C(se,null,[C("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:he(p.value)}},null),u,C("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(g.value)}},null)]):C("div",{ref:d,class:pe(["v-virtual-scroll",e.class]),onScrollPassive:r,onScrollend:h,style:pt([a.value,e.style])},[C("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:he(p.value),paddingBottom:he(g.value)}},[u])])}),{calculateVisibleItems:c,scrollToIndex:y}}});function Ut(e,n,t){return function(a){return!a.relatedTarget&&document.activeElement===document.body&&e.value?(requestAnimationFrame(()=>{if(!e.value)return;const c=n(),d=(c&&je(c)[0])??t();d==null||d.focus({preventScroll:!0})}),!0):!1}}function jt(e,n){const t=j(!1);let s;function a(o){cancelAnimationFrame(s),t.value=!0,s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{t.value=!1})})}async function c(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(t.value){const r=oe(t,()=>{r(),o()})}else o()})}async function d(o){var k,y;if(o.key==="Tab"&&((k=n.value)==null||k.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const r=(y=e.value)==null?void 0:y.$el;if(!r)return;(o.key==="Home"||o.key==="End")&&r.scrollTo({top:o.key==="Home"?0:r.scrollHeight,behavior:"smooth"}),await c();const h=r.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const p=r.getBoundingClientRect().top;for(const g of h)if(g.getBoundingClientRect().top>=p){g.focus();break}}else{const p=r.getBoundingClientRect().bottom;for(const g of[...h].reverse())if(g.getBoundingClientRect().bottom<=p){g.focus();break}}}return{onScrollPassive:a,onKeydown:d}}function Gt(e){let{groups:n,onLeave:t}=e;function s(o){var r;return o.type==="list"?(r=o.contentRef.value)==null?void 0:r.$el:o.contentRef.value}function a(o){const r=s(o);return r?je(r):[]}function c(o){var g;const r=o.target,h=o.shiftKey?"backward":"forward",k=n.map(a),y=n.map(v=>{var u;return v.type==="list"?(u=v.contentRef.value)==null?void 0:u.$el:v.contentRef.value}).findIndex(v=>v==null?void 0:v.contains(r)),p=d(k,y,h,r);if(p===null){const v=n[y],u=k[y];(v.type==="list"||(h==="forward"?u.at(-1)===o.target:u.at(0)===o.target))&&t()}else{o.preventDefault(),o.stopImmediatePropagation();const v=n[p];if(v.type==="list"&&xe(v.displayItemsCount)>0)(g=v.contentRef.value)==null||g.focus(0);else{const u=h==="forward";k[p].at(u?0:-1).focus()}}}function d(o,r,h,k){const y=n[r],p=o[r];if(y.type!=="list"&&!(h==="forward"?p.at(-1)===k:p.at(0)===k))return null;const g=h==="forward"?1:-1;for(let v=r+g;v>=0&&v0||u.type==="list"&&xe(u.displayItemsCount)>0)return v}return null}return{onTabKeydown:c}}const Wt=(e,n,t)=>{if(e==null||n==null)return-1;if(!n.length)return 0;e=e.toString().toLocaleLowerCase(),n=n.toString().toLocaleLowerCase();const s=[];let a=e.indexOf(n);for(;~a;)s.push([a,a+n.length]),a=e.indexOf(n,a+n.length);return s.length?s:-1};function Se(e,n){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+n.length]]:Array.isArray(e[0])?e:[e]}const Qt=ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Jt(e,n,t){var r,h;const s=[],a=(t==null?void 0:t.default)??Wt,c=t!=null&&t.filterKeys?Ce(t.filterKeys):!1,d=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return s;let o=[];e:for(let k=0;k0)&&!(t!=null&&t.noFilter)){let S=!1;if(typeof y=="object"){if(y.type==="divider"||y.type==="subheader"){(((r=o.at(-1))==null?void 0:r.type)!=="divider"||y.type!=="subheader")&&(o=[]),o.push({index:k,matches:{},type:y.type});continue}const z=c||Object.keys(p);S=z.length===d;for(const x of z){const X=Ne(p,x),Y=(h=t==null?void 0:t.customKeyFilter)==null?void 0:h[x];if(u=Y?Y(X,n,y):a(X,n,y),u!==-1&&u!==!1)Y?g[x]=Se(u,n):v[x]=Se(u,n);else if((t==null?void 0:t.filterMode)==="every")continue e}}else u=a(y,n,y),u!==-1&&u!==!1&&(v.title=Se(u,n));const b=Object.keys(v).length,A=Object.keys(g).length;if(!b&&!A||(t==null?void 0:t.filterMode)==="union"&&A!==d&&!b||(t==null?void 0:t.filterMode)==="intersection"&&(A!==d||!b&&d>0&&!S))continue}o.length&&(s.push(...o),o=[]),s.push({index:k,matches:{...v,...g}})}return s}function Xt(e,n,t,s){const a=j([]),c=j(new Map),d=$(()=>s!=null&&s.transform?ie(n).map(r=>[r,s.transform(r)]):ie(n));Fe(()=>{const r=typeof t=="function"?t():ie(t),h=typeof r!="string"&&typeof r!="number"?"":String(r),k=Jt(d.value,h,{customKeyFilter:{...e.customKeyFilter,...ie(s==null?void 0:s.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),y=ie(n),p=[],g=new Map;k.forEach(v=>{let{index:u,matches:S}=v;const b=y[u];p.push(b),g.set(b.value,S)}),a.value=p,c.value=g});function o(r){return c.value.get(r.value)}return{filteredItems:a,filteredMatches:c,getMatches:o}}function Yt(e,n,t){return t==null||!t.length?n:t.map((s,a)=>{const c=a===0?0:t[a-1][1],d=[C("span",{class:pe(`${e}__unmask`)},[n.slice(c,s[0])]),C("span",{class:pe(`${e}__mask`)},[n.slice(s[0],s[1])])];return a===t.length-1&&d.push(C("span",{class:pe(`${e}__unmask`)},[n.slice(s[1])])),C(se,null,[d])})}const qt=ue({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function Zt(e,n){const t=yt(),s=$(()=>`menu-${t}`),a=ye(()=>xe(n)),c=ye(()=>s.value);return{menuId:s,ariaExpanded:a,ariaControls:c}}const el=ue({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:ht,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...qt(),...At({itemChildren:!1})},"Select"),tl=ue({search:String,...Qt({filterKeys:["title"]}),...el(),...mt(ot({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...Rt({transition:{component:Tt}})},"VSelect"),il=Pe()({name:"VSelect",props:tl(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0,"update:search":e=>!0},setup(e,n){let{slots:t}=n;const{t:s}=ft(),a=J(),c=J(),d=J(),o=J(),r=J(),{items:h,transformIn:k,transformOut:y}=Vt(e),p=Ve(e,"search",""),{filteredItems:g,getMatches:v}=Xt(e,h,()=>p.value),u=Ve(e,"modelValue",[],l=>k(l===null?[null]:Ce(l)),l=>{const i=y(l);return e.multiple?i:i[0]??null}),S=$(()=>typeof e.counterValue=="function"?e.counterValue(u.value):typeof e.counterValue=="number"?e.counterValue:u.value.length),b=lt(e),A=nt(e),z=$(()=>u.value.map(l=>l.value)),x=j(!1),X=ye(()=>e.closableChips&&!b.isReadonly.value&&!b.isDisabled.value),{InputIcon:Y}=at(e);let R="",W=0,q;const M=$(()=>{const l=p.value?g.value:h.value;return e.hideSelected?l.filter(i=>!u.value.some(I=>(e.valueComparator||ge)(I,i))):l}),Z=$(()=>e.hideNoData&&!M.value.length||b.isReadonly.value||b.isDisabled.value),ee=Ve(e,"menu"),F=$({get:()=>ee.value,set:l=>{var i;ee.value&&!l&&((i=c.value)!=null&&i.ΨopenChildren.size)||l&&Z.value||(ee.value=l)}}),{menuId:ce,ariaExpanded:fe,ariaControls:G}=Zt(e,F),de=$(()=>{var l;return{...e.menuProps,activatorProps:{...((l=e.menuProps)==null?void 0:l.activatorProps)||{},"aria-haspopup":"listbox"}}}),_=J(),be=jt(_,a),f=Ut(F,()=>{var l;return(l=c.value)==null?void 0:l.contentEl},()=>{var l;return(l=a.value)==null?void 0:l.controlRef}),{onTabKeydown:V}=Gt({groups:[{type:"element",contentRef:d},{type:"list",contentRef:_,displayItemsCount:()=>M.value.length},{type:"element",contentRef:o}],onLeave:()=>{var l;F.value=!1,(l=a.value)==null||l.focus()}});function P(l){e.openOnClear&&(F.value=!0)}function D(){Z.value||(F.value=!F.value)}function te(l){var i;l.key==="Tab"&&V(l),(i=_.value)!=null&&i.$el.contains(l.target)&&_e(l)&&H(l)}function H(l){var L,K,ae;if(!l.key||b.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(l.key)&&l.preventDefault(),["Enter","ArrowDown"," "].includes(l.key)&&(F.value=!0),["Escape","Tab"].includes(l.key)&&(F.value=!1),e.clearable&&l.key==="Backspace"){l.preventDefault(),u.value=[],P();return}l.key==="Home"?(L=_.value)==null||L.focus("first"):l.key==="End"&&((K=_.value)==null||K.focus("last"));const i=1e3;if(!_e(l))return;const I=performance.now();I-q>i&&(R="",W=0),R+=l.key.toLowerCase(),q=I;const Q=M.value;function N(){let m=le();return m||R.at(-1)===R.at(-2)&&(R=R.slice(0,-1),W++,m=le(),m)||(W=0,m=le(),m)?m:(R=l.key.toLowerCase(),le())}function le(){for(let m=W;m1&&arguments[1]!==void 0?arguments[1]:!0;if(!l.props.disabled)if(e.multiple){const I=u.value.findIndex(N=>(e.valueComparator||ge)(N.value,l.value)),Q=i??!~I;if(~I){const N=Q?[...u.value,l]:[...u.value];N.splice(I,1),u.value=N}else Q&&(u.value=[...u.value,l])}else{const I=i!==!1;u.value=I?[l]:[],We(()=>{F.value=!1})}}function we(l){var I;const i=l.target;(I=a.value)!=null&&I.$el.contains(i)||(F.value=!1)}function Te(){return M.value.findIndex(l=>u.value.some(i=>(e.valueComparator||ge)(i.value,l.value)))}function Qe(){if(!u.value.length)return-1;const l=e.valueComparator||ge;let i=0;for(const I of M.value){if(u.value.some(N=>l(N.value,I.value)))return I.props.disabled?-1:i;I.props.disabled||i++}return-1}function Je(){var l;if(e.eager&&((l=r.value)==null||l.calculateVisibleItems()),_.value&&x.value){const i=Qe();_.value.focus(i>=0?i:"first",{focusVisible:!1})}}function Xe(){var l;p.value="",x.value&&((l=a.value)==null||l.focus())}function Ye(l){x.value=!0}function qe(l){var i;if(!((i=a.value)!=null&&i.$el.contains(l.relatedTarget))){if(f(l))return;x.value=!1}}function Ze(l){if(l==null)u.value=[];else if(Le(a.value,":autofill")||Le(a.value,":-webkit-autofill")){const i=h.value.find(I=>I.title===l);i&&re(i)}else a.value&&(a.value.value="")}return oe(F,()=>{if(!e.hideSelected&&F.value&&u.value.length){const l=Te();Ue&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var i;l>=0&&((i=r.value)==null||i.scrollToIndex(l))})}}),oe(h,(l,i)=>{F.value||x.value&&e.hideNoData&&!i.length&&l.length&&(F.value=!0)}),Re(()=>{const l=!!(e.chips||t.chip),i=!!(!e.hideNoData||M.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),I=u.value.length>0,Q=Oe.filterProps(e),N=I||!x.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder,le={search:p,filteredItems:g.value};return T(Oe,U({ref:a},Q,{modelValue:u.value.map(B=>B.props.title).join(", "),name:void 0,"onUpdate:modelValue":Ze,focused:x.value,"onUpdate:focused":B=>x.value=B,validationValue:u.externalValue,counterValue:S.value,dirty:I,class:["v-select",{"v-select--active-menu":F.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":u.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:N,"onClick:clear":P,"onMousedown:control":D,onBlur:we,onKeydown:H,"aria-expanded":fe.value,"aria-controls":G.value}),{...t,default:B=>{let{id:ne}=B;return C(se,null,[C("select",{hidden:!0,multiple:e.multiple,name:A.fieldName.value},[h.value.map(w=>C("option",{key:w.value,value:w.value,selected:z.value.includes(w.value)},null))]),T(Mt,U({id:ce.value,ref:c,modelValue:F.value,"onUpdate:modelValue":w=>F.value=w,activator:"parent",disabled:Z.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:Je,onAfterLeave:Xe},de.value,{contentClass:["v-select__content",de.value.contentClass]}),{default:()=>[T(Dt,{onFocusin:Ye,onFocusout:qe,onKeydown:te},{default:()=>[t["menu-header"]&&C("header",{ref:d},[t["menu-header"](le)]),i&&T(It,U({key:"select-list",ref:_,selected:z.value,selectStrategy:e.multiple?"independent":"single-independent",tabindex:"-1",selectable:!!M.value.length,"aria-live":"polite","aria-labelledby":`${ne.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},be,e.listProps),{default:()=>{var w,L,K;return[(w=t["prepend-item"])==null?void 0:w.call(t),!M.value.length&&!e.hideNoData&&(((L=t["no-data"])==null?void 0:L.call(t))??T(Ke,{key:"no-data",title:s(e.noDataText)},null)),T(Nt,{ref:r,renderless:!0,items:M.value,itemKey:"value"},{default:ae=>{var Me,De,Ee;let{item:m,index:E,itemRef:O}=ae;const ve=dt(m.props),Ae=U(m.props,{ref:O,key:m.value,onClick:()=>re(m,null),"aria-posinset":E+1,"aria-setsize":M.value.length});return m.type==="divider"?((Me=t.divider)==null?void 0:Me.call(t,{props:m.raw,index:E}))??T(St,U(m.props,{key:`divider-${E}`}),null):m.type==="subheader"?((De=t.subheader)==null?void 0:De.call(t,{props:m.raw,index:E}))??T(Ct,U(m.props,{key:`subheader-${E}`}),null):((Ee=t.item)==null?void 0:Ee.call(t,{item:m,index:E,props:Ae}))??T(Ke,U(Ae,{role:"option"}),{prepend:me=>{let{isSelected:et}=me;return C(se,null,[e.multiple&&!e.hideSelected?T(Et,{key:m.value,modelValue:et,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:tt=>tt.preventDefault()},null):void 0,ve.prependAvatar&&T(Ft,{image:ve.prependAvatar},null),ve.prependIcon&&T(Be,{icon:ve.prependIcon},null)])},title:()=>{var me;return p.value?Yt("v-select",m.title,(me=v(m))==null?void 0:me.title):m.title}})}}),(K=t["append-item"])==null?void 0:K.call(t)]}}),t["menu-footer"]&&C("footer",{ref:o},[t["menu-footer"](le)])]})]}),u.value.map((w,L)=>{function K(O){O.stopPropagation(),O.preventDefault(),re(w,!1)}const ae=U($e.filterProps(w.props),{"onClick:close":K,onKeydown(O){O.key!=="Enter"&&O.key!==" "||(O.preventDefault(),O.stopPropagation(),K(O))},onMousedown(O){O.preventDefault(),O.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),m=l?!!t.chip:!!t.selection,E=m?vt(l?t.chip({item:w,index:L,props:ae}):t.selection({item:w,index:L})):void 0;if(!(m&&!E))return C("div",{key:w.value,class:"v-select__selection"},[l?t.chip?T(xt,{key:"chip-defaults",defaults:{VChip:{closable:X.value,size:"small",text:w.title}}},{default:()=>[E]}):T($e,U({key:"chip",closable:X.value,size:"small",text:w.title,disabled:w.props.disabled},ae),null):E??C("span",{class:"v-select__selection-text"},[w.title,e.multiple&&L!0},setup(a,f){let{slots:u}=f;const o=W(a,"modelValue"),{scopeId:y}=x(),{isRtl:i}=X(),d=oe(),c=ce(()=>a.id||`v-menu-${d}`),n=me(),t=ne(C,null),m=de(new Set);ve(C,{register(){m.value.add(d)},unregister(){m.value.delete(d)},closeParents(e){setTimeout(()=>{var s;!m.value.size&&!a.persistent&&(e==null||(s=n.value)!=null&&s.contentEl&&!ee(e,n.value.contentEl))&&(o.value=!1,t==null||t.closeParents())},40)}}),le(()=>t==null?void 0:t.unregister()),re(()=>o.value=!1),ue(o,e=>{e?t==null||t.register():t==null||t.unregister()},{immediate:!0});function g(e){t==null||t.closeParents(e)}function S(e){var s,l,r,v,h;if(!a.disabled)if(e.key==="Tab"||e.key==="Enter"&&!a.closeOnContentClick){if(e.key==="Enter"&&(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement&&e.target.closest("form")))return;e.key==="Enter"&&e.preventDefault(),!Y(Z((s=n.value)==null?void 0:s.contentEl,!1),e.shiftKey?"prev":"next",T=>T.tabIndex>=0)&&!a.retainFocus&&(o.value=!1,(r=(l=n.value)==null?void 0:l.activatorEl)==null||r.focus())}else a.submenu&&e.key===(i.value?"ArrowRight":"ArrowLeft")&&(o.value=!1,(h=(v=n.value)==null?void 0:v.activatorEl)==null||h.focus())}function w(e){var l;if(a.disabled)return;const s=(l=n.value)==null?void 0:l.contentEl;s&&o.value?e.key==="ArrowDown"?(e.preventDefault(),e.stopImmediatePropagation(),k(s,"next")):e.key==="ArrowUp"?(e.preventDefault(),e.stopImmediatePropagation(),k(s,"prev")):a.submenu&&(e.key===(i.value?"ArrowRight":"ArrowLeft")?o.value=!1:e.key===(i.value?"ArrowLeft":"ArrowRight")&&(e.preventDefault(),k(s,"first"))):(a.submenu?e.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(e.key))&&(o.value=!0,e.preventDefault(),setTimeout(()=>setTimeout(()=>w(e))))}const R=ie(()=>b({"aria-haspopup":"menu","aria-expanded":String(o.value),"aria-controls":c.value,"aria-owns":c.value,onKeydown:w},a.activatorProps));return A(()=>{const e=V.filterProps(a);return P(V,b({ref:n,id:c.value,class:["v-menu",a.class],style:a.style},e,{modelValue:o.value,"onUpdate:modelValue":s=>o.value=s,absolute:!0,activatorProps:R.value,location:a.location??(a.submenu?"end":"bottom"),"onClick:outside":g,onKeydown:S},y),{activator:u.activator,default:function(){for(var s=arguments.length,l=new Array(s),r=0;r{var v;return[(v=u.default)==null?void 0:v.call(u,...l)]}})}})}),L({id:c,ΨopenChildren:m},n)}}),ke=D({color:String,...J(),...se(),...q(),...Q(),...G(),...H(),...j(),...$(),...te()},"VSheet"),be=E()({name:"VSheet",props:ke(),setup(a,f){let{slots:u}=f;const{themeClasses:o}=ae(a),{backgroundColorClasses:y,backgroundColorStyles:i}=O(()=>a.color),{borderClasses:d}=B(a),{dimensionStyles:c}=N(a),{elevationClasses:n}=z(a),{locationStyles:t}=K(a),{positionClasses:m}=U(a),{roundedClasses:g}=F(a);return A(()=>P(a.tag,{class:ye(["v-sheet",o.value,y.value,d.value,n.value,m.value,g.value,a.class]),style:fe([i.value,c.value,t.value,a.style])},u)),{}}});export{Ve as V,be as a,ke as m}; +import{L as x,aF as C,D as V,ag as I,E as L,U as M,aD as p,I as O,af as B,O as K,ak as U,N as F,b as N,a2 as z,m as $,R as j,an as H,T as G,$ as Q,a as q,ah as J}from"./index-DGIAsv4W.js";import{f as E,n as W,A as X,u as A,aP as Y,$ as Z,p as D,a5 as _,ak as k,aQ as ee,h as ae,m as te,k as se}from"./vendor-vuetify-DsKlzgKp.js";import{E as oe,d as ne,A as le,G as re,o as ue,j as P,m as b,e as ie,t as ce,b as me,s as de,p as ve,N as fe,n as ye}from"./vendor-vue-BiQC5iF7.js";const ge=D({id:String,submenu:Boolean,..._(M({captureFocus:!0,closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:p}}),["absolute"])},"VMenu"),Ve=E()({name:"VMenu",props:ge(),emits:{"update:modelValue":a=>!0},setup(a,f){let{slots:u}=f;const o=W(a,"modelValue"),{scopeId:y}=x(),{isRtl:i}=X(),d=oe(),c=ce(()=>a.id||`v-menu-${d}`),n=me(),t=ne(C,null),m=de(new Set);ve(C,{register(){m.value.add(d)},unregister(){m.value.delete(d)},closeParents(e){setTimeout(()=>{var s;!m.value.size&&!a.persistent&&(e==null||(s=n.value)!=null&&s.contentEl&&!ee(e,n.value.contentEl))&&(o.value=!1,t==null||t.closeParents())},40)}}),le(()=>t==null?void 0:t.unregister()),re(()=>o.value=!1),ue(o,e=>{e?t==null||t.register():t==null||t.unregister()},{immediate:!0});function g(e){t==null||t.closeParents(e)}function S(e){var s,l,r,v,h;if(!a.disabled)if(e.key==="Tab"||e.key==="Enter"&&!a.closeOnContentClick){if(e.key==="Enter"&&(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement&&e.target.closest("form")))return;e.key==="Enter"&&e.preventDefault(),!Y(Z((s=n.value)==null?void 0:s.contentEl,!1),e.shiftKey?"prev":"next",T=>T.tabIndex>=0)&&!a.retainFocus&&(o.value=!1,(r=(l=n.value)==null?void 0:l.activatorEl)==null||r.focus())}else a.submenu&&e.key===(i.value?"ArrowRight":"ArrowLeft")&&(o.value=!1,(h=(v=n.value)==null?void 0:v.activatorEl)==null||h.focus())}function w(e){var l;if(a.disabled)return;const s=(l=n.value)==null?void 0:l.contentEl;s&&o.value?e.key==="ArrowDown"?(e.preventDefault(),e.stopImmediatePropagation(),k(s,"next")):e.key==="ArrowUp"?(e.preventDefault(),e.stopImmediatePropagation(),k(s,"prev")):a.submenu&&(e.key===(i.value?"ArrowRight":"ArrowLeft")?o.value=!1:e.key===(i.value?"ArrowLeft":"ArrowRight")&&(e.preventDefault(),k(s,"first"))):(a.submenu?e.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(e.key))&&(o.value=!0,e.preventDefault(),setTimeout(()=>setTimeout(()=>w(e))))}const R=ie(()=>b({"aria-haspopup":"menu","aria-expanded":String(o.value),"aria-controls":c.value,"aria-owns":c.value,onKeydown:w},a.activatorProps));return A(()=>{const e=V.filterProps(a);return P(V,b({ref:n,id:c.value,class:["v-menu",a.class],style:a.style},e,{modelValue:o.value,"onUpdate:modelValue":s=>o.value=s,absolute:!0,activatorProps:R.value,location:a.location??(a.submenu?"end":"bottom"),"onClick:outside":g,onKeydown:S},y),{activator:u.activator,default:function(){for(var s=arguments.length,l=new Array(s),r=0;r{var v;return[(v=u.default)==null?void 0:v.call(u,...l)]}})}})}),L({id:c,ΨopenChildren:m},n)}}),ke=D({color:String,...J(),...se(),...q(),...Q(),...G(),...H(),...j(),...$(),...te()},"VSheet"),be=E()({name:"VSheet",props:ke(),setup(a,f){let{slots:u}=f;const{themeClasses:o}=ae(a),{backgroundColorClasses:y,backgroundColorStyles:i}=O(()=>a.color),{borderClasses:d}=B(a),{dimensionStyles:c}=N(a),{elevationClasses:n}=z(a),{locationStyles:t}=K(a),{positionClasses:m}=U(a),{roundedClasses:g}=F(a);return A(()=>P(a.tag,{class:ye(["v-sheet",o.value,y.value,d.value,n.value,m.value,g.value,a.class]),style:fe([i.value,c.value,t.value,a.style])},u)),{}}});export{Ve as V,be as a,ke as m}; diff --git a/assets/VSkeletonLoader-Bqlz0ln3.js b/assets/VSkeletonLoader-DwE_iqTb.js similarity index 92% rename from assets/VSkeletonLoader-Bqlz0ln3.js rename to assets/VSkeletonLoader-DwE_iqTb.js index b8cad48..f1ebc27 100644 --- a/assets/VSkeletonLoader-Bqlz0ln3.js +++ b/assets/VSkeletonLoader-DwE_iqTb.js @@ -1 +1 @@ -import{I as f,b as k,a2 as x,$ as y,a as S}from"./index-CzpSlHRw.js";import{f as w,h as C,an as L,u as B,w as P,p as V,m as T}from"./vendor-vuetify-95axeNJO.js";import{k as r,m as A,F as _,e as F,n as $}from"./vendor-vue-28M5UGz3.js";const D={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function E(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r("div",{class:$(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[a])}function l(e){const[a,t]=e.split("@");return Array.from({length:t}).map(()=>i(a))}function i(e){let a=[];if(!e)return a;const t=D[e];if(e!==t){if(e.includes(","))return d(e);if(e.includes("@"))return l(e);t.includes(",")?a=d(t):t.includes("@")?a=l(t):t&&a.push(i(t))}return[E(e,a)]}function d(e){return e.replace(/\s/g,"").split(",").map(i)}const I=V({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...S(),...y(),...T()},"VSkeletonLoader"),R=w()({name:"VSkeletonLoader",inheritAttrs:!1,props:I(),setup(e,a){let{attrs:t,slots:n}=a;const{backgroundColorClasses:c,backgroundColorStyles:u}=f(()=>e.color),{dimensionStyles:m}=k(e),{elevationClasses:g}=x(e),{themeClasses:v}=C(e),{t:p}=L(),b=F(()=>i(P(e.type).join(",")));return B(()=>{var s;const o=!n.default||e.loading,h=e.boilerplate||!o?{}:{ariaLive:"polite",ariaLabel:p(e.loadingText),role:"alert"};return o?r("div",A({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},v.value,c.value,g.value],style:[u.value,m.value]},h,t),[b.value]):r(_,null,[(s=n.default)==null?void 0:s.call(n)])}),{}}});export{R as V}; +import{I as f,b as k,a2 as x,$ as y,a as S}from"./index-DGIAsv4W.js";import{f as w,h as C,an as L,u as B,w as P,p as V,m as T}from"./vendor-vuetify-DsKlzgKp.js";import{k as r,m as A,F as _,e as F,n as $}from"./vendor-vue-BiQC5iF7.js";const D={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function E(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r("div",{class:$(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[a])}function l(e){const[a,t]=e.split("@");return Array.from({length:t}).map(()=>i(a))}function i(e){let a=[];if(!e)return a;const t=D[e];if(e!==t){if(e.includes(","))return d(e);if(e.includes("@"))return l(e);t.includes(",")?a=d(t):t.includes("@")?a=l(t):t&&a.push(i(t))}return[E(e,a)]}function d(e){return e.replace(/\s/g,"").split(",").map(i)}const I=V({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...S(),...y(),...T()},"VSkeletonLoader"),R=w()({name:"VSkeletonLoader",inheritAttrs:!1,props:I(),setup(e,a){let{attrs:t,slots:n}=a;const{backgroundColorClasses:c,backgroundColorStyles:u}=f(()=>e.color),{dimensionStyles:m}=k(e),{elevationClasses:g}=x(e),{themeClasses:v}=C(e),{t:p}=L(),b=F(()=>i(P(e.type).join(",")));return B(()=>{var s;const o=!n.default||e.loading,h=e.boilerplate||!o?{}:{ariaLive:"polite",ariaLabel:p(e.loadingText),role:"alert"};return o?r("div",A({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},v.value,c.value,g.value],style:[u.value,m.value]},h,t),[b.value]):r(_,null,[(s=n.default)==null?void 0:s.call(n)])}),{}}});export{R as V}; diff --git a/assets/VSwitch-DcxT6NgQ.js b/assets/VSwitch-k6hfPfa2.js similarity index 95% rename from assets/VSwitch-DcxT6NgQ.js rename to assets/VSwitch-k6hfPfa2.js index 2f909cc..1fcebc9 100644 --- a/assets/VSwitch-DcxT6NgQ.js +++ b/assets/VSwitch-k6hfPfa2.js @@ -1 +1 @@ -import{M as ie,a0 as J,f as Z,K as se,H as re,I as ce,a7 as de,ag as ve,a1 as fe,a8 as me,V as ye,E as Ce}from"./index-CzpSlHRw.js";import{f as Ve,u as be,a as Q,d as ge}from"./VTextField-BxdS2D7S.js";import{p as G,o as ke,I as W,m as Se,k as p,f as q,n as D,j as he,u as O,ao as ee,_ as we,w as H,aF as Ie}from"./vendor-vuetify-95axeNJO.js";import{E as K,t as n,k as r,N as M,n as R,p as Pe,q as _e,m as U,R as Ae,F as le,j as C,d as Be,b as $,I as Fe,s as X,e as x}from"./vendor-vue-28M5UGz3.js";const ae=Symbol.for("vuetify:selection-control-group"),te=G({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:W,trueIcon:W,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:ke},...p(),...ie(),...Se()},"SelectionControlGroup"),xe=G({...te({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");q()({name:"VSelectionControlGroup",props:xe(),emits:{"update:modelValue":e=>!0},setup(e,i){let{slots:f}=i;const l=D(e,"modelValue"),a=K(),u=n(()=>e.id||`v-selection-control-group-${a}`),c=n(()=>e.name||u.value),t=new Set;return Pe(ae,{modelValue:l,forceUpdate:()=>{t.forEach(o=>o())},onForceUpdate:o=>{t.add(o),_e(()=>{t.delete(o)})}}),he({[e.defaultsTarget]:{color:n(()=>e.color),disabled:n(()=>e.disabled),density:n(()=>e.density),error:n(()=>e.error),inline:n(()=>e.inline),modelValue:l,multiple:n(()=>!!e.multiple||e.multiple==null&&Array.isArray(l.value)),name:c,falseIcon:n(()=>e.falseIcon),trueIcon:n(()=>e.trueIcon),readonly:n(()=>e.readonly),ripple:n(()=>e.ripple),type:n(()=>e.type),valueComparator:n(()=>e.valueComparator)}}),O(()=>{var o;return r("div",{class:R(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:M(e.style),role:e.type==="radio"?"radiogroup":void 0},[(o=f.default)==null?void 0:o.call(f)])}),{}}});const ne=G({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...p(),...te()},"VSelectionControl");function Re(e){const i=Be(ae,void 0),{densityClasses:f}=se(e),l=D(e,"modelValue"),a=x(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),u=x(()=>e.falseValue!==void 0?e.falseValue:!1),c=x(()=>!!e.multiple||e.multiple==null&&Array.isArray(l.value)),t=x({get(){const m=i?i.modelValue.value:l.value;return c.value?H(m).some(s=>e.valueComparator(s,a.value)):e.valueComparator(m,a.value)},set(m){if(e.readonly)return;const s=m?a.value:u.value;let y=s;c.value&&(y=m?[...H(l.value),s]:H(l.value).filter(d=>!e.valueComparator(d,a.value))),i?i.modelValue.value=y:l.value=y}}),{textColorClasses:o,textColorStyles:w}=re(()=>{if(!(e.error||e.disabled))return t.value?e.color:e.baseColor}),{backgroundColorClasses:b,backgroundColorStyles:g}=ce(()=>t.value&&!e.error&&!e.disabled?e.color:e.baseColor),I=x(()=>t.value?e.trueIcon:e.falseIcon);return{group:i,densityClasses:f,trueValue:a,falseValue:u,model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,icon:I}}const Y=q()({name:"VSelectionControl",directives:{vRipple:J},inheritAttrs:!1,props:ne(),emits:{"update:modelValue":e=>!0},setup(e,i){let{attrs:f,slots:l}=i;const{group:a,densityClasses:u,icon:c,model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,trueValue:I}=Re(e),m=K(),s=X(!1),y=X(!1),d=$(),P=n(()=>e.id||`input-${m}`),k=n(()=>!e.disabled&&!e.readonly);a==null||a.onForceUpdate(()=>{d.value&&(d.value.checked=t.value)});function S(v){k.value&&(s.value=!0,we(v.target,":focus-visible")!==!1&&(y.value=!0))}function h(){s.value=!1,y.value=!1}function z(v){v.stopPropagation()}function A(v){if(!k.value){d.value&&(d.value.checked=t.value);return}e.readonly&&a&&Fe(()=>a.forceUpdate()),t.value=v.target.checked}return O(()=>{var B,_;const v=l.label?l.label({label:e.label,props:{for:P.value}}):e.label,[E,N]=ee(f),T=r("input",U({ref:d,checked:t.value,disabled:!!e.disabled,id:P.value,onBlur:h,onFocus:S,onInput:A,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:I.value,name:e.name,"aria-checked":e.type==="checkbox"?t.value:void 0},N),null);return r("div",U({class:["v-selection-control",{"v-selection-control--dirty":t.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":s.value,"v-selection-control--focus-visible":y.value,"v-selection-control--inline":e.inline},u.value,e.class]},E,{style:e.style}),[r("div",{class:R(["v-selection-control__wrapper",o.value]),style:M(w.value)},[(B=l.default)==null?void 0:B.call(l,{backgroundColorClasses:b,backgroundColorStyles:g}),Ae(r("div",{class:R(["v-selection-control__input"])},[((_=l.input)==null?void 0:_.call(l,{model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,inputNode:T,icon:c.value,props:{onFocus:S,onBlur:h,id:P.value}}))??r(le,null,[c.value&&C(Z,{key:"icon",icon:c.value},null),T])]),[[J,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),v&&C(Ve,{for:P.value,onClick:z},{default:()=>[v]})])}),{isFocused:s,input:d}}}),Te=G({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...ge(),...ne()},"VSwitch"),ze=q()({name:"VSwitch",inheritAttrs:!1,props:Te(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,i){let{attrs:f,slots:l}=i;const a=D(e,"indeterminate"),u=D(e,"modelValue"),{loaderClasses:c}=de(e),{isFocused:t,focus:o,blur:w}=be(e),b=$(),g=$(),I=Ie&&window.matchMedia("(forced-colors: active)").matches,m=n(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),s=K(),y=n(()=>e.id||`switch-${s}`);function d(){a.value&&(a.value=!1)}function P(k){var S,h;k.stopPropagation(),k.preventDefault(),(h=(S=b.value)==null?void 0:S.input)==null||h.click()}return O(()=>{const[k,S]=ee(f),h=Q.filterProps(e),z=Y.filterProps(e);return C(Q,U({ref:g,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":a.value},c.value,e.class]},k,h,{modelValue:u.value,"onUpdate:modelValue":A=>u.value=A,id:y.value,focused:t.value,style:e.style}),{...l,default:A=>{let{id:v,messagesId:E,isDisabled:N,isReadonly:T,isValid:B}=A;const _={model:u,isValid:B};return C(Y,U({ref:b},z,{modelValue:u.value,"onUpdate:modelValue":[F=>u.value=F,d],id:v.value,"aria-describedby":E.value,type:"checkbox","aria-checked":a.value?"mixed":void 0,disabled:N.value,readonly:T.value,onFocus:o,onBlur:w},S),{...l,default:F=>{let{backgroundColorClasses:j,backgroundColorStyles:V}=F;return r("div",{class:R(["v-switch__track",I?void 0:j.value]),style:M(V.value),onClick:P},[l["track-true"]&&r("div",{key:"prepend",class:"v-switch__track-true"},[l["track-true"](_)]),l["track-false"]&&r("div",{key:"append",class:"v-switch__track-false"},[l["track-false"](_)])])},input:F=>{let{inputNode:j,icon:V,backgroundColorClasses:oe,backgroundColorStyles:ue}=F;return r(le,null,[j,r("div",{class:R(["v-switch__thumb",{"v-switch__thumb--filled":V||e.loading},e.inset||I?void 0:oe.value]),style:M(e.inset?void 0:ue.value)},[l.thumb?C(ve,{defaults:{VIcon:{icon:V,size:"x-small"}}},{default:()=>[l.thumb({..._,icon:V})]}):C(fe,null,{default:()=>[e.loading?C(me,{name:"v-switch",active:!0,color:B.value===!1?void 0:m.value},{default:L=>l.loader?l.loader(L):C(ye,{active:L.isActive,color:L.color,indeterminate:!0,size:"16",width:"2"},null)}):V&&C(Z,{key:String(V),icon:V,size:"x-small"},null)]})])])}})}})}),Ce({},g)}});export{ze as V,Y as a,ne as m}; +import{M as ie,a0 as J,f as Z,K as se,H as re,I as ce,a7 as de,ag as ve,a1 as fe,a8 as me,V as ye,E as Ce}from"./index-DGIAsv4W.js";import{f as Ve,u as be,a as Q,d as ge}from"./VTextField-BurlcggD.js";import{p as G,o as ke,I as W,m as Se,k as p,f as q,n as D,j as he,u as O,ao as ee,_ as we,w as H,aF as Ie}from"./vendor-vuetify-DsKlzgKp.js";import{E as K,t as n,k as r,N as M,n as R,p as Pe,q as _e,m as U,R as Ae,F as le,j as C,d as Be,b as $,I as Fe,s as X,e as x}from"./vendor-vue-BiQC5iF7.js";const ae=Symbol.for("vuetify:selection-control-group"),te=G({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:W,trueIcon:W,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:ke},...p(),...ie(),...Se()},"SelectionControlGroup"),xe=G({...te({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");q()({name:"VSelectionControlGroup",props:xe(),emits:{"update:modelValue":e=>!0},setup(e,i){let{slots:f}=i;const l=D(e,"modelValue"),a=K(),u=n(()=>e.id||`v-selection-control-group-${a}`),c=n(()=>e.name||u.value),t=new Set;return Pe(ae,{modelValue:l,forceUpdate:()=>{t.forEach(o=>o())},onForceUpdate:o=>{t.add(o),_e(()=>{t.delete(o)})}}),he({[e.defaultsTarget]:{color:n(()=>e.color),disabled:n(()=>e.disabled),density:n(()=>e.density),error:n(()=>e.error),inline:n(()=>e.inline),modelValue:l,multiple:n(()=>!!e.multiple||e.multiple==null&&Array.isArray(l.value)),name:c,falseIcon:n(()=>e.falseIcon),trueIcon:n(()=>e.trueIcon),readonly:n(()=>e.readonly),ripple:n(()=>e.ripple),type:n(()=>e.type),valueComparator:n(()=>e.valueComparator)}}),O(()=>{var o;return r("div",{class:R(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:M(e.style),role:e.type==="radio"?"radiogroup":void 0},[(o=f.default)==null?void 0:o.call(f)])}),{}}});const ne=G({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...p(),...te()},"VSelectionControl");function Re(e){const i=Be(ae,void 0),{densityClasses:f}=se(e),l=D(e,"modelValue"),a=x(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),u=x(()=>e.falseValue!==void 0?e.falseValue:!1),c=x(()=>!!e.multiple||e.multiple==null&&Array.isArray(l.value)),t=x({get(){const m=i?i.modelValue.value:l.value;return c.value?H(m).some(s=>e.valueComparator(s,a.value)):e.valueComparator(m,a.value)},set(m){if(e.readonly)return;const s=m?a.value:u.value;let y=s;c.value&&(y=m?[...H(l.value),s]:H(l.value).filter(d=>!e.valueComparator(d,a.value))),i?i.modelValue.value=y:l.value=y}}),{textColorClasses:o,textColorStyles:w}=re(()=>{if(!(e.error||e.disabled))return t.value?e.color:e.baseColor}),{backgroundColorClasses:b,backgroundColorStyles:g}=ce(()=>t.value&&!e.error&&!e.disabled?e.color:e.baseColor),I=x(()=>t.value?e.trueIcon:e.falseIcon);return{group:i,densityClasses:f,trueValue:a,falseValue:u,model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,icon:I}}const Y=q()({name:"VSelectionControl",directives:{vRipple:J},inheritAttrs:!1,props:ne(),emits:{"update:modelValue":e=>!0},setup(e,i){let{attrs:f,slots:l}=i;const{group:a,densityClasses:u,icon:c,model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,trueValue:I}=Re(e),m=K(),s=X(!1),y=X(!1),d=$(),P=n(()=>e.id||`input-${m}`),k=n(()=>!e.disabled&&!e.readonly);a==null||a.onForceUpdate(()=>{d.value&&(d.value.checked=t.value)});function S(v){k.value&&(s.value=!0,we(v.target,":focus-visible")!==!1&&(y.value=!0))}function h(){s.value=!1,y.value=!1}function z(v){v.stopPropagation()}function A(v){if(!k.value){d.value&&(d.value.checked=t.value);return}e.readonly&&a&&Fe(()=>a.forceUpdate()),t.value=v.target.checked}return O(()=>{var B,_;const v=l.label?l.label({label:e.label,props:{for:P.value}}):e.label,[E,N]=ee(f),T=r("input",U({ref:d,checked:t.value,disabled:!!e.disabled,id:P.value,onBlur:h,onFocus:S,onInput:A,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:I.value,name:e.name,"aria-checked":e.type==="checkbox"?t.value:void 0},N),null);return r("div",U({class:["v-selection-control",{"v-selection-control--dirty":t.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":s.value,"v-selection-control--focus-visible":y.value,"v-selection-control--inline":e.inline},u.value,e.class]},E,{style:e.style}),[r("div",{class:R(["v-selection-control__wrapper",o.value]),style:M(w.value)},[(B=l.default)==null?void 0:B.call(l,{backgroundColorClasses:b,backgroundColorStyles:g}),Ae(r("div",{class:R(["v-selection-control__input"])},[((_=l.input)==null?void 0:_.call(l,{model:t,textColorClasses:o,textColorStyles:w,backgroundColorClasses:b,backgroundColorStyles:g,inputNode:T,icon:c.value,props:{onFocus:S,onBlur:h,id:P.value}}))??r(le,null,[c.value&&C(Z,{key:"icon",icon:c.value},null),T])]),[[J,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),v&&C(Ve,{for:P.value,onClick:z},{default:()=>[v]})])}),{isFocused:s,input:d}}}),Te=G({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...ge(),...ne()},"VSwitch"),ze=q()({name:"VSwitch",inheritAttrs:!1,props:Te(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,i){let{attrs:f,slots:l}=i;const a=D(e,"indeterminate"),u=D(e,"modelValue"),{loaderClasses:c}=de(e),{isFocused:t,focus:o,blur:w}=be(e),b=$(),g=$(),I=Ie&&window.matchMedia("(forced-colors: active)").matches,m=n(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),s=K(),y=n(()=>e.id||`switch-${s}`);function d(){a.value&&(a.value=!1)}function P(k){var S,h;k.stopPropagation(),k.preventDefault(),(h=(S=b.value)==null?void 0:S.input)==null||h.click()}return O(()=>{const[k,S]=ee(f),h=Q.filterProps(e),z=Y.filterProps(e);return C(Q,U({ref:g,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":a.value},c.value,e.class]},k,h,{modelValue:u.value,"onUpdate:modelValue":A=>u.value=A,id:y.value,focused:t.value,style:e.style}),{...l,default:A=>{let{id:v,messagesId:E,isDisabled:N,isReadonly:T,isValid:B}=A;const _={model:u,isValid:B};return C(Y,U({ref:b},z,{modelValue:u.value,"onUpdate:modelValue":[F=>u.value=F,d],id:v.value,"aria-describedby":E.value,type:"checkbox","aria-checked":a.value?"mixed":void 0,disabled:N.value,readonly:T.value,onFocus:o,onBlur:w},S),{...l,default:F=>{let{backgroundColorClasses:j,backgroundColorStyles:V}=F;return r("div",{class:R(["v-switch__track",I?void 0:j.value]),style:M(V.value),onClick:P},[l["track-true"]&&r("div",{key:"prepend",class:"v-switch__track-true"},[l["track-true"](_)]),l["track-false"]&&r("div",{key:"append",class:"v-switch__track-false"},[l["track-false"](_)])])},input:F=>{let{inputNode:j,icon:V,backgroundColorClasses:oe,backgroundColorStyles:ue}=F;return r(le,null,[j,r("div",{class:R(["v-switch__thumb",{"v-switch__thumb--filled":V||e.loading},e.inset||I?void 0:oe.value]),style:M(e.inset?void 0:ue.value)},[l.thumb?C(ve,{defaults:{VIcon:{icon:V,size:"x-small"}}},{default:()=>[l.thumb({..._,icon:V})]}):C(fe,null,{default:()=>[e.loading?C(me,{name:"v-switch",active:!0,color:B.value===!1?void 0:m.value},{default:L=>l.loader?l.loader(L):C(ye,{active:L.isActive,color:L.color,indeterminate:!0,size:"16",width:"2"},null)}):V&&C(Z,{key:String(V),icon:V,size:"x-small"},null)]})])])}})}})}),Ce({},g)}});export{ze as V,Y as a,ne as m}; diff --git a/assets/VTable-D9zIyrqQ.js b/assets/VTable-Cq72iBVc.js similarity index 97% rename from assets/VTable-D9zIyrqQ.js rename to assets/VTable-Cq72iBVc.js index 432b515..498c3fa 100644 --- a/assets/VTable-D9zIyrqQ.js +++ b/assets/VTable-Cq72iBVc.js @@ -1 +1 @@ -import{aB as G,f as b,h as N,A as ae,an as se,E as M,a3 as ie,u as T,P as le,s as B,p as V,m as U,k as Y,n as ue,a5 as re}from"./vendor-vuetify-95axeNJO.js";import{o as ce,I as _,R as K,j as g,k as w,n as E,N as H,b as $,s as C,e as m,t as F,p as de,d as q,m as J,V as ve}from"./vendor-vue-28M5UGz3.js";import{aa as fe,h as O,m as Q,ab as he,u as me,ac as we,P as ge,ad as ye,ae as be,K as Te,M as Ve}from"./index-CzpSlHRw.js";const Se=Symbol.for("vuetify:v-tabs"),Ie=e=>{const{touchstartX:o,touchendX:t,touchstartY:n,touchendY:i}=e,u=.5,a=16;e.offsetX=t-o,e.offsetY=i-n,Math.abs(e.offsetY)o+a&&e.right(e)),Math.abs(e.offsetX)n+a&&e.down(e))};function xe(e,o){var n;const t=e.changedTouches[0];o.touchstartX=t.clientX,o.touchstartY=t.clientY,(n=o.start)==null||n.call(o,{originalEvent:e,...o})}function _e(e,o){var n;const t=e.changedTouches[0];o.touchendX=t.clientX,o.touchendY=t.clientY,(n=o.end)==null||n.call(o,{originalEvent:e,...o}),Ie(o)}function Be(e,o){var n;const t=e.changedTouches[0];o.touchmoveX=t.clientX,o.touchmoveY=t.clientY,(n=o.move)==null||n.call(o,{originalEvent:e,...o})}function Ee(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:t=>xe(t,o),touchend:t=>_e(t,o),touchmove:t=>Be(t,o)}}function We(e,o){var r;const t=o.value,n=t!=null&&t.parent?e.parentElement:e,i=(t==null?void 0:t.options)??{passive:!0},u=(r=o.instance)==null?void 0:r.$.uid;if(!n||u===void 0)return;const a=Ee(o.value);n._touchHandlers=n._touchHandlers??Object.create(null),n._touchHandlers[u]=a,G(a).forEach(d=>{n.addEventListener(d,a[d],i)})}function ke(e,o){var u,a;const t=(u=o.value)!=null&&u.parent?e.parentElement:e,n=(a=o.instance)==null?void 0:a.$.uid;if(!(t!=null&&t._touchHandlers)||n===void 0)return;const i=t._touchHandlers[n];G(i).forEach(r=>{t.removeEventListener(r,i[r])}),delete t._touchHandlers[n]}const R={mounted:We,unmounted:ke},Z=Symbol.for("vuetify:v-window"),p=Symbol.for("vuetify:v-window-group"),ee=V({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},verticalArrows:[Boolean,String],touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},crossfade:Boolean,transitionDuration:Number,...Y(),...Q(),...U()},"VWindow"),z=b()({name:"VWindow",directives:{vTouch:R},props:ee(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const{themeClasses:n}=N(e),{isRtl:i}=ae(),{t:u}=se(),a=fe(e,p),r=$(),d=m(()=>i.value?!e.reverse:e.reverse),f=C(!1),S=m(()=>{if(e.crossfade)return"v-window-crossfade-transition";const s=e.direction==="vertical"?"y":"x",l=(d.value?!f.value:f.value)?"-reverse":"";return`v-window-${s}${l}-transition`}),W=C(0),I=$(void 0),y=m(()=>a.items.value.findIndex(s=>a.selected.value.includes(s.id)));ce(y,(s,c)=>{let l;const h={left:0,top:0};M&&c>=0&&(l=ie(r.value),h.left=l==null?void 0:l.scrollLeft,h.top=l==null?void 0:l.scrollTop);const D=a.items.value.length,L=D-1;D<=2?f.value=s{if(!M||!l)return;l.scrollTop!==h.top&&l.scrollTo({...h,behavior:"instant"}),requestAnimationFrame(()=>{if(!l)return;l.scrollTop!==h.top&&l.scrollTo({...h,behavior:"instant"})})})},{flush:"sync"}),de(Z,{transition:S,isReversed:f,transitionCount:W,transitionHeight:I,rootRef:r});const v=F(()=>e.continuous||y.value!==0),k=F(()=>e.continuous||y.value!==a.items.value.length-1);function P(){v.value&&a.prev()}function A(){k.value&&a.next()}const X=m(()=>{const s=[],c={icon:i.value?e.nextIcon:e.prevIcon,class:`v-window__${d.value?"right":"left"}`,onClick:a.prev,"aria-label":u("$vuetify.carousel.prev")};s.push(v.value?t.prev?t.prev({props:c}):g(O,c,null):w("div",null,null));const l={icon:i.value?e.prevIcon:e.nextIcon,class:`v-window__${d.value?"left":"right"}`,onClick:a.next,"aria-label":u("$vuetify.carousel.next")};return s.push(k.value?t.next?t.next({props:l}):g(O,l,null):w("div",null,null)),s}),ne=m(()=>e.touch===!1?e.touch:{...{left:()=>{d.value?P():A()},right:()=>{d.value?A():P()},start:c=>{let{originalEvent:l}=c;l.stopPropagation()}},...e.touch===!0?{}:e.touch});function oe(s){(e.direction==="horizontal"&&s.key==="ArrowLeft"||e.direction==="vertical"&&s.key==="ArrowUp")&&(s.preventDefault(),P(),_(()=>{v.value?x(0):x(1)})),(e.direction==="horizontal"&&s.key==="ArrowRight"||e.direction==="vertical"&&s.key==="ArrowDown")&&(s.preventDefault(),A(),_(()=>{k.value?x(1):x(0)}))}function x(s){var h;const c=X.value[s];if(!c)return;(h=(Array.isArray(c)?c[0]:c).el)==null||h.focus()}return T(()=>K(g(e.tag,{ref:r,class:E(["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover","v-window--vertical-arrows":!!e.verticalArrows,"v-window--crossfade":!!e.crossfade},n.value,e.class]),style:H([e.style,{"--v-window-transition-duration":le()?null:B(e.transitionDuration,"ms")}])},{default:()=>{var s,c;return[w("div",{class:"v-window__container",style:{height:I.value}},[(s=t.default)==null?void 0:s.call(t,{group:a}),e.showArrows!==!1&&w("div",{class:E(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}]),onKeydown:oe},[X.value])]),(c=t.additional)==null?void 0:c.call(t,{group:a})]}}),[[R,ne.value]])),{group:a}}}),Pe=V({...re(ee(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),Le=b()({name:"VTabsWindow",props:Pe(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const n=q(Se,null),i=ue(e,"modelValue"),u=m({get(){var a;return i.value!=null||!n?i.value:(a=n.items.value.find(r=>n.selected.value.includes(r.id)))==null?void 0:a.value},set(a){i.value=a}});return T(()=>{const a=z.filterProps(e);return g(z,J({_as:"VTabsWindow"},a,{modelValue:u.value,"onUpdate:modelValue":r=>u.value=r,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),t)}),{}}}),te=V({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Y(),...be(),...ye()},"VWindowItem"),j=b()({name:"VWindowItem",directives:{vTouch:R},props:te(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:t}=o;const n=q(Z),i=he(e,p),{isBooted:u}=me();if(!n||!i)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const a=C(!1),r=m(()=>u.value&&(n.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function d(){!a.value||!n||(a.value=!1,n.transitionCount.value>0&&(n.transitionCount.value-=1,n.transitionCount.value===0&&(n.transitionHeight.value=void 0)))}function f(){var v;a.value||!n||(a.value=!0,n.transitionCount.value===0&&(n.transitionHeight.value=B((v=n.rootRef.value)==null?void 0:v.clientHeight)),n.transitionCount.value+=1)}function S(){d()}function W(v){a.value&&_(()=>{!r.value||!a.value||!n||(n.transitionHeight.value=B(v.clientHeight))})}const I=m(()=>{const v=n.isReversed.value?e.reverseTransition:e.transition;return r.value?{name:typeof v!="string"?n.transition.value:v,onBeforeEnter:f,onAfterEnter:d,onEnterCancelled:S,onBeforeLeave:f,onAfterLeave:d,onLeaveCancelled:S,onEnter:W}:!1}),{hasContent:y}=we(e,i.isSelected);return T(()=>g(ge,{transition:I.value,disabled:!u.value},{default:()=>{var v;return[K(w("div",{class:E(["v-window-item",i.selectedClass.value,e.class]),style:H(e.style)},[y.value&&((v=t.default)==null?void 0:v.call(t))]),[[ve,i.isSelected.value]])]}})),{groupItem:i}}}),Ae=V({...te()},"VTabsWindowItem"),Me=b()({name:"VTabsWindowItem",props:Ae(),setup(e,o){let{slots:t}=o;return T(()=>{const n=j.filterProps(e);return g(j,J({_as:"VTabsWindowItem"},n,{class:["v-tabs-window-item",e.class],style:e.style}),t)}),{}}}),Ce=V({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Y(),...Ve(),...Q(),...U()},"VTable"),$e=b()({name:"VTable",props:Ce(),setup(e,o){let{slots:t,emit:n}=o;const{themeClasses:i}=N(e),{densityClasses:u}=Te(e);return T(()=>g(e.tag,{class:E(["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!t.top,"v-table--has-bottom":!!t.bottom,"v-table--hover":e.hover,"v-table--striped-even":e.striped==="even","v-table--striped-odd":e.striped==="odd"},i.value,u.value,e.class]),style:H(e.style)},{default:()=>{var a,r,d;return[(a=t.top)==null?void 0:a.call(t),t.default?w("div",{class:"v-table__wrapper",style:{height:B(e.height)}},[w("table",null,[t.default()])]):(r=t.wrapper)==null?void 0:r.call(t),(d=t.bottom)==null?void 0:d.call(t)]}})),{}}});export{Le as V,Me as a,$e as b,z as c,j as d,Se as e,Ce as m}; +import{aB as G,f as b,h as N,A as ae,an as se,E as M,a3 as ie,u as T,P as le,s as B,p as V,m as U,k as Y,n as ue,a5 as re}from"./vendor-vuetify-DsKlzgKp.js";import{o as ce,I as _,R as K,j as g,k as w,n as E,N as H,b as $,s as C,e as m,t as F,p as de,d as q,m as J,V as ve}from"./vendor-vue-BiQC5iF7.js";import{aa as fe,h as O,m as Q,ab as he,u as me,ac as we,P as ge,ad as ye,ae as be,K as Te,M as Ve}from"./index-DGIAsv4W.js";const Se=Symbol.for("vuetify:v-tabs"),Ie=e=>{const{touchstartX:o,touchendX:t,touchstartY:n,touchendY:i}=e,u=.5,a=16;e.offsetX=t-o,e.offsetY=i-n,Math.abs(e.offsetY)o+a&&e.right(e)),Math.abs(e.offsetX)n+a&&e.down(e))};function xe(e,o){var n;const t=e.changedTouches[0];o.touchstartX=t.clientX,o.touchstartY=t.clientY,(n=o.start)==null||n.call(o,{originalEvent:e,...o})}function _e(e,o){var n;const t=e.changedTouches[0];o.touchendX=t.clientX,o.touchendY=t.clientY,(n=o.end)==null||n.call(o,{originalEvent:e,...o}),Ie(o)}function Be(e,o){var n;const t=e.changedTouches[0];o.touchmoveX=t.clientX,o.touchmoveY=t.clientY,(n=o.move)==null||n.call(o,{originalEvent:e,...o})}function Ee(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:t=>xe(t,o),touchend:t=>_e(t,o),touchmove:t=>Be(t,o)}}function We(e,o){var r;const t=o.value,n=t!=null&&t.parent?e.parentElement:e,i=(t==null?void 0:t.options)??{passive:!0},u=(r=o.instance)==null?void 0:r.$.uid;if(!n||u===void 0)return;const a=Ee(o.value);n._touchHandlers=n._touchHandlers??Object.create(null),n._touchHandlers[u]=a,G(a).forEach(d=>{n.addEventListener(d,a[d],i)})}function ke(e,o){var u,a;const t=(u=o.value)!=null&&u.parent?e.parentElement:e,n=(a=o.instance)==null?void 0:a.$.uid;if(!(t!=null&&t._touchHandlers)||n===void 0)return;const i=t._touchHandlers[n];G(i).forEach(r=>{t.removeEventListener(r,i[r])}),delete t._touchHandlers[n]}const R={mounted:We,unmounted:ke},Z=Symbol.for("vuetify:v-window"),p=Symbol.for("vuetify:v-window-group"),ee=V({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},verticalArrows:[Boolean,String],touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},crossfade:Boolean,transitionDuration:Number,...Y(),...Q(),...U()},"VWindow"),z=b()({name:"VWindow",directives:{vTouch:R},props:ee(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const{themeClasses:n}=N(e),{isRtl:i}=ae(),{t:u}=se(),a=fe(e,p),r=$(),d=m(()=>i.value?!e.reverse:e.reverse),f=C(!1),S=m(()=>{if(e.crossfade)return"v-window-crossfade-transition";const s=e.direction==="vertical"?"y":"x",l=(d.value?!f.value:f.value)?"-reverse":"";return`v-window-${s}${l}-transition`}),W=C(0),I=$(void 0),y=m(()=>a.items.value.findIndex(s=>a.selected.value.includes(s.id)));ce(y,(s,c)=>{let l;const h={left:0,top:0};M&&c>=0&&(l=ie(r.value),h.left=l==null?void 0:l.scrollLeft,h.top=l==null?void 0:l.scrollTop);const D=a.items.value.length,L=D-1;D<=2?f.value=s{if(!M||!l)return;l.scrollTop!==h.top&&l.scrollTo({...h,behavior:"instant"}),requestAnimationFrame(()=>{if(!l)return;l.scrollTop!==h.top&&l.scrollTo({...h,behavior:"instant"})})})},{flush:"sync"}),de(Z,{transition:S,isReversed:f,transitionCount:W,transitionHeight:I,rootRef:r});const v=F(()=>e.continuous||y.value!==0),k=F(()=>e.continuous||y.value!==a.items.value.length-1);function P(){v.value&&a.prev()}function A(){k.value&&a.next()}const X=m(()=>{const s=[],c={icon:i.value?e.nextIcon:e.prevIcon,class:`v-window__${d.value?"right":"left"}`,onClick:a.prev,"aria-label":u("$vuetify.carousel.prev")};s.push(v.value?t.prev?t.prev({props:c}):g(O,c,null):w("div",null,null));const l={icon:i.value?e.prevIcon:e.nextIcon,class:`v-window__${d.value?"left":"right"}`,onClick:a.next,"aria-label":u("$vuetify.carousel.next")};return s.push(k.value?t.next?t.next({props:l}):g(O,l,null):w("div",null,null)),s}),ne=m(()=>e.touch===!1?e.touch:{...{left:()=>{d.value?P():A()},right:()=>{d.value?A():P()},start:c=>{let{originalEvent:l}=c;l.stopPropagation()}},...e.touch===!0?{}:e.touch});function oe(s){(e.direction==="horizontal"&&s.key==="ArrowLeft"||e.direction==="vertical"&&s.key==="ArrowUp")&&(s.preventDefault(),P(),_(()=>{v.value?x(0):x(1)})),(e.direction==="horizontal"&&s.key==="ArrowRight"||e.direction==="vertical"&&s.key==="ArrowDown")&&(s.preventDefault(),A(),_(()=>{k.value?x(1):x(0)}))}function x(s){var h;const c=X.value[s];if(!c)return;(h=(Array.isArray(c)?c[0]:c).el)==null||h.focus()}return T(()=>K(g(e.tag,{ref:r,class:E(["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover","v-window--vertical-arrows":!!e.verticalArrows,"v-window--crossfade":!!e.crossfade},n.value,e.class]),style:H([e.style,{"--v-window-transition-duration":le()?null:B(e.transitionDuration,"ms")}])},{default:()=>{var s,c;return[w("div",{class:"v-window__container",style:{height:I.value}},[(s=t.default)==null?void 0:s.call(t,{group:a}),e.showArrows!==!1&&w("div",{class:E(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}]),onKeydown:oe},[X.value])]),(c=t.additional)==null?void 0:c.call(t,{group:a})]}}),[[R,ne.value]])),{group:a}}}),Pe=V({...re(ee(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),Le=b()({name:"VTabsWindow",props:Pe(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const n=q(Se,null),i=ue(e,"modelValue"),u=m({get(){var a;return i.value!=null||!n?i.value:(a=n.items.value.find(r=>n.selected.value.includes(r.id)))==null?void 0:a.value},set(a){i.value=a}});return T(()=>{const a=z.filterProps(e);return g(z,J({_as:"VTabsWindow"},a,{modelValue:u.value,"onUpdate:modelValue":r=>u.value=r,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),t)}),{}}}),te=V({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Y(),...be(),...ye()},"VWindowItem"),j=b()({name:"VWindowItem",directives:{vTouch:R},props:te(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:t}=o;const n=q(Z),i=he(e,p),{isBooted:u}=me();if(!n||!i)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const a=C(!1),r=m(()=>u.value&&(n.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function d(){!a.value||!n||(a.value=!1,n.transitionCount.value>0&&(n.transitionCount.value-=1,n.transitionCount.value===0&&(n.transitionHeight.value=void 0)))}function f(){var v;a.value||!n||(a.value=!0,n.transitionCount.value===0&&(n.transitionHeight.value=B((v=n.rootRef.value)==null?void 0:v.clientHeight)),n.transitionCount.value+=1)}function S(){d()}function W(v){a.value&&_(()=>{!r.value||!a.value||!n||(n.transitionHeight.value=B(v.clientHeight))})}const I=m(()=>{const v=n.isReversed.value?e.reverseTransition:e.transition;return r.value?{name:typeof v!="string"?n.transition.value:v,onBeforeEnter:f,onAfterEnter:d,onEnterCancelled:S,onBeforeLeave:f,onAfterLeave:d,onLeaveCancelled:S,onEnter:W}:!1}),{hasContent:y}=we(e,i.isSelected);return T(()=>g(ge,{transition:I.value,disabled:!u.value},{default:()=>{var v;return[K(w("div",{class:E(["v-window-item",i.selectedClass.value,e.class]),style:H(e.style)},[y.value&&((v=t.default)==null?void 0:v.call(t))]),[[ve,i.isSelected.value]])]}})),{groupItem:i}}}),Ae=V({...te()},"VTabsWindowItem"),Me=b()({name:"VTabsWindowItem",props:Ae(),setup(e,o){let{slots:t}=o;return T(()=>{const n=j.filterProps(e);return g(j,J({_as:"VTabsWindowItem"},n,{class:["v-tabs-window-item",e.class],style:e.style}),t)}),{}}}),Ce=V({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Y(),...Ve(),...Q(),...U()},"VTable"),$e=b()({name:"VTable",props:Ce(),setup(e,o){let{slots:t,emit:n}=o;const{themeClasses:i}=N(e),{densityClasses:u}=Te(e);return T(()=>g(e.tag,{class:E(["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!t.top,"v-table--has-bottom":!!t.bottom,"v-table--hover":e.hover,"v-table--striped-even":e.striped==="even","v-table--striped-odd":e.striped==="odd"},i.value,u.value,e.class]),style:H(e.style)},{default:()=>{var a,r,d;return[(a=t.top)==null?void 0:a.call(t),t.default?w("div",{class:"v-table__wrapper",style:{height:B(e.height)}},[w("table",null,[t.default()])]):(r=t.wrapper)==null?void 0:r.call(t),(d=t.bottom)==null?void 0:d.call(t)]}})),{}}});export{Le as V,Me as a,$e as b,z as c,j as d,Se as e,Ce as m}; diff --git a/assets/VTabs-DxZkDLgQ.js b/assets/VTabs-DqmvmKGK.js similarity index 93% rename from assets/VTabs-DxZkDLgQ.js rename to assets/VTabs-DqmvmKGK.js index cfda3f0..4679c5f 100644 --- a/assets/VTabs-DxZkDLgQ.js +++ b/assets/VTabs-DqmvmKGK.js @@ -1 +1 @@ -import{H as q,I as j,h as M,E as J,J as K,K as L,L as Q,m as Z,M as p}from"./index-CzpSlHRw.js";import{e as F,a as ee,V as te}from"./VTable-D9zIyrqQ.js";import{f as G,u as W,a4 as ae,p as X,a5 as ne,a6 as se,n as le,j as ie,s as E,aj as oe,F as re}from"./vendor-vuetify-95axeNJO.js";import{j as T,k as D,N as de,n as ue,F as Y,m as P,b as R,e as N,t as r}from"./vendor-vue-28M5UGz3.js";import{b as I,m as ce}from"./VChip-B3whZF-S.js";const _=X({fixed:Boolean,sliderColor:String,sliderTransition:String,sliderTransitionDuration:[String,Number],hideSlider:Boolean,inset:Boolean,direction:{type:String,default:"horizontal"},...ne(K({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),ve=G()({name:"VTab",props:_(),setup(e,d){let{slots:C,attrs:t}=d;const{textColorClasses:g,textColorStyles:k}=q(()=>e.sliderColor),{backgroundColorClasses:V,backgroundColorStyles:w}=j(()=>e.sliderColor),h=R(),x=R(),u=N(()=>e.direction==="horizontal"),m=N(()=>{var s,n;return((n=(s=h.value)==null?void 0:s.group)==null?void 0:n.isSelected.value)??!1});function a(s,n){return{opacity:[0,1]}}function l(s,n){return e.direction==="vertical"?{transform:["scaleY(0)","scaleY(1)"]}:{transform:["scaleX(0)","scaleX(1)"]}}function c(s,n){const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),v=u.value?"x":"y",b=u.value?"X":"Y",S=u.value?"right":"bottom",f=u.value?"width":"height",$=i[v],H=o[v],y=$>H?i[S]-o[S]:i[v]-o[v],U=Math.sign(y)>0?u.value?"right":"bottom":Math.sign(y)<0?u.value?"left":"top":"center",A=(Math.abs(y)+(Math.sign(y)<0?i[f]:o[f]))/Math.max(i[f],o[f])||0,O=i[f]/o[f]||0,z=1.5;return{transform:[`translate${b}(${y}px) scale${b}(${O})`,`translate${b}(${y/z}px) scale${b}(${(A-1)/z+1})`,"none"],transformOrigin:Array(3).fill(U)}}function B(s){var i,o;let{value:n}=s;if(n){const v=(o=(i=h.value)==null?void 0:i.$el.parentElement)==null?void 0:o.querySelector(".v-tab--selected .v-tab__slider"),b=x.value;if(!v||!b)return;const S=getComputedStyle(v).backgroundColor,f={fade:a,grow:l,shift:c}[e.sliderTransition??"shift"]??c,$=Number(e.sliderTransitionDuration)||({fade:400,grow:350,shift:225}[e.sliderTransition??"shift"]??225);ae(b,{backgroundColor:[S,S],...f(b,v)},{duration:$,easing:se})}}return W(()=>{const s=M.filterProps(e);return T(M,P({symbol:F,ref:h,class:["v-tab",e.class,m.value&&e.inset?V.value:[]],style:[e.style,m.value&&e.inset?w.value:[],{backgroundColor:m.value&&e.inset?"transparent !important":void 0}],tabindex:m.value?0:-1,role:"tab","aria-selected":String(m.value),active:!1},s,t,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":B}),{...C,default:()=>{var n;return D(Y,null,[((n=C.default)==null?void 0:n.call(C))??e.text,!e.hideSlider&&D("div",{ref:x,class:ue(["v-tab__slider",e.inset?V.value:g.value]),style:de([k.value,e.inset?w.value:g.value])},null)])}})}),J({},h)}});function be(e){return e?e.map(d=>re(d)?d:{text:d,value:d}):[]}const fe=X({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,inset:Boolean,insetPadding:[String,Number],insetRadius:[String,Number],sliderColor:String,...oe(_(),["spaced","sliderTransition","sliderTransitionDuration"]),...ce({mandatory:"force",selectedClass:"v-tab-item--selected"}),...p(),...Z()},"VTabs"),Se=G()({name:"VTabs",props:fe(),emits:{"update:modelValue":e=>!0},setup(e,d){let{attrs:C,slots:t}=d;const g=le(e,"modelValue"),k=N(()=>be(e.items)),{densityClasses:V}=L(e),{backgroundColorClasses:w,backgroundColorStyles:h}=j(()=>e.bgColor),{scopeId:x}=Q();return ie({VTab:{color:r(e,"color"),direction:r(e,"direction"),stacked:r(e,"stacked"),fixed:r(e,"fixedTabs"),inset:r(e,"inset"),sliderColor:r(e,"sliderColor"),sliderTransition:r(e,"sliderTransition"),sliderTransitionDuration:r(e,"sliderTransitionDuration"),hideSlider:r(e,"hideSlider")}}),W(()=>{const u=I.filterProps(e),m=!!(t.window||e.items.length>0);return D(Y,null,[T(I,P(u,{modelValue:g.value,"onUpdate:modelValue":a=>g.value=a,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--inset":e.inset,"v-tabs--stacked":e.stacked},V.value,w.value,e.class],style:[{"--v-tabs-height":E(e.height),"--v-tabs-inset-padding":e.inset?E(e.insetPadding):void 0,"--v-tabs-inset-radius":e.inset?E(e.insetRadius):void 0},h.value,e.style],role:"tablist",symbol:F},x,C),{default:t.default??(()=>k.value.map(a=>{var l;return((l=t.tab)==null?void 0:l.call(t,{item:a}))??T(ve,P(a,{key:a.text,value:a.value,spaced:e.spaced}),{default:t[`tab.${a.value}`]?()=>{var c;return(c=t[`tab.${a.value}`])==null?void 0:c.call(t,{item:a})}:void 0})})),prev:t.prev,next:t.next}),m&&T(te,P({modelValue:g.value,"onUpdate:modelValue":a=>g.value=a,key:"tabs-window"},x),{default:()=>{var a;return[k.value.map(l=>{var c;return((c=t.item)==null?void 0:c.call(t,{item:l}))??T(ee,{value:l.value},{default:()=>{var B;return(B=t[`item.${l.value}`])==null?void 0:B.call(t,{item:l})}})}),(a=t.window)==null?void 0:a.call(t)]}})])}),{}}});export{Se as V,ve as a}; +import{H as q,I as j,h as M,E as J,J as K,K as L,L as Q,m as Z,M as p}from"./index-DGIAsv4W.js";import{e as F,a as ee,V as te}from"./VTable-Cq72iBVc.js";import{f as G,u as W,a4 as ae,p as X,a5 as ne,a6 as se,n as le,j as ie,s as E,aj as oe,F as re}from"./vendor-vuetify-DsKlzgKp.js";import{j as T,k as D,N as de,n as ue,F as Y,m as P,b as R,e as N,t as r}from"./vendor-vue-BiQC5iF7.js";import{b as I,m as ce}from"./VChip-mRzIPuM0.js";const _=X({fixed:Boolean,sliderColor:String,sliderTransition:String,sliderTransitionDuration:[String,Number],hideSlider:Boolean,inset:Boolean,direction:{type:String,default:"horizontal"},...ne(K({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),ve=G()({name:"VTab",props:_(),setup(e,d){let{slots:C,attrs:t}=d;const{textColorClasses:g,textColorStyles:k}=q(()=>e.sliderColor),{backgroundColorClasses:V,backgroundColorStyles:w}=j(()=>e.sliderColor),h=R(),x=R(),u=N(()=>e.direction==="horizontal"),m=N(()=>{var s,n;return((n=(s=h.value)==null?void 0:s.group)==null?void 0:n.isSelected.value)??!1});function a(s,n){return{opacity:[0,1]}}function l(s,n){return e.direction==="vertical"?{transform:["scaleY(0)","scaleY(1)"]}:{transform:["scaleX(0)","scaleX(1)"]}}function c(s,n){const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),v=u.value?"x":"y",b=u.value?"X":"Y",S=u.value?"right":"bottom",f=u.value?"width":"height",$=i[v],H=o[v],y=$>H?i[S]-o[S]:i[v]-o[v],U=Math.sign(y)>0?u.value?"right":"bottom":Math.sign(y)<0?u.value?"left":"top":"center",A=(Math.abs(y)+(Math.sign(y)<0?i[f]:o[f]))/Math.max(i[f],o[f])||0,O=i[f]/o[f]||0,z=1.5;return{transform:[`translate${b}(${y}px) scale${b}(${O})`,`translate${b}(${y/z}px) scale${b}(${(A-1)/z+1})`,"none"],transformOrigin:Array(3).fill(U)}}function B(s){var i,o;let{value:n}=s;if(n){const v=(o=(i=h.value)==null?void 0:i.$el.parentElement)==null?void 0:o.querySelector(".v-tab--selected .v-tab__slider"),b=x.value;if(!v||!b)return;const S=getComputedStyle(v).backgroundColor,f={fade:a,grow:l,shift:c}[e.sliderTransition??"shift"]??c,$=Number(e.sliderTransitionDuration)||({fade:400,grow:350,shift:225}[e.sliderTransition??"shift"]??225);ae(b,{backgroundColor:[S,S],...f(b,v)},{duration:$,easing:se})}}return W(()=>{const s=M.filterProps(e);return T(M,P({symbol:F,ref:h,class:["v-tab",e.class,m.value&&e.inset?V.value:[]],style:[e.style,m.value&&e.inset?w.value:[],{backgroundColor:m.value&&e.inset?"transparent !important":void 0}],tabindex:m.value?0:-1,role:"tab","aria-selected":String(m.value),active:!1},s,t,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":B}),{...C,default:()=>{var n;return D(Y,null,[((n=C.default)==null?void 0:n.call(C))??e.text,!e.hideSlider&&D("div",{ref:x,class:ue(["v-tab__slider",e.inset?V.value:g.value]),style:de([k.value,e.inset?w.value:g.value])},null)])}})}),J({},h)}});function be(e){return e?e.map(d=>re(d)?d:{text:d,value:d}):[]}const fe=X({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,inset:Boolean,insetPadding:[String,Number],insetRadius:[String,Number],sliderColor:String,...oe(_(),["spaced","sliderTransition","sliderTransitionDuration"]),...ce({mandatory:"force",selectedClass:"v-tab-item--selected"}),...p(),...Z()},"VTabs"),Se=G()({name:"VTabs",props:fe(),emits:{"update:modelValue":e=>!0},setup(e,d){let{attrs:C,slots:t}=d;const g=le(e,"modelValue"),k=N(()=>be(e.items)),{densityClasses:V}=L(e),{backgroundColorClasses:w,backgroundColorStyles:h}=j(()=>e.bgColor),{scopeId:x}=Q();return ie({VTab:{color:r(e,"color"),direction:r(e,"direction"),stacked:r(e,"stacked"),fixed:r(e,"fixedTabs"),inset:r(e,"inset"),sliderColor:r(e,"sliderColor"),sliderTransition:r(e,"sliderTransition"),sliderTransitionDuration:r(e,"sliderTransitionDuration"),hideSlider:r(e,"hideSlider")}}),W(()=>{const u=I.filterProps(e),m=!!(t.window||e.items.length>0);return D(Y,null,[T(I,P(u,{modelValue:g.value,"onUpdate:modelValue":a=>g.value=a,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--inset":e.inset,"v-tabs--stacked":e.stacked},V.value,w.value,e.class],style:[{"--v-tabs-height":E(e.height),"--v-tabs-inset-padding":e.inset?E(e.insetPadding):void 0,"--v-tabs-inset-radius":e.inset?E(e.insetRadius):void 0},h.value,e.style],role:"tablist",symbol:F},x,C),{default:t.default??(()=>k.value.map(a=>{var l;return((l=t.tab)==null?void 0:l.call(t,{item:a}))??T(ve,P(a,{key:a.text,value:a.value,spaced:e.spaced}),{default:t[`tab.${a.value}`]?()=>{var c;return(c=t[`tab.${a.value}`])==null?void 0:c.call(t,{item:a})}:void 0})})),prev:t.prev,next:t.next}),m&&T(te,P({modelValue:g.value,"onUpdate:modelValue":a=>g.value=a,key:"tabs-window"},x),{default:()=>{var a;return[k.value.map(l=>{var c;return((c=t.item)==null?void 0:c.call(t,{item:l}))??T(ee,{value:l.value},{default:()=>{var B;return(B=t[`item.${l.value}`])==null?void 0:B.call(t,{item:l})}})}),(a=t.window)==null?void 0:a.call(t)]}})])}),{}}});export{Se as V,ve as a}; diff --git a/assets/VTextField-BxdS2D7S.js b/assets/VTextField-BurlcggD.js similarity index 99% rename from assets/VTextField-BxdS2D7S.js rename to assets/VTextField-BurlcggD.js index b0447c4..bc60a7a 100644 --- a/assets/VTextField-BxdS2D7S.js +++ b/assets/VTextField-BurlcggD.js @@ -1 +1 @@ -import{j as C,R as ve,V as Ce,k as r,N as Z,n as G,t as V,m as U,E as re,o as J,F as ie,b as H,e as m,d as Ve,s as oe,p as Oe,ag as ze,a0 as je,A as Ue,D as He,I as se,u as Ke,ah as We}from"./vendor-vue-28M5UGz3.js";import{P as xe,Q as ke,v as Ie,f as qe,a7 as pe,N as Ge,I as Qe,H as Se,a8 as Xe,ag as Ye,as as Je,R as Ze,a9 as ea,K as aa,b as la,a as na,M as ta,av as me,E as ia}from"./index-CzpSlHRw.js";import{f as Q,u as X,p as $,k as ee,m as fe,ag as p,an as sa,ap as _e,g as Pe,n as de,h as Be,A as we,P as ua,T as oa,G as ra,a4 as da,s as ca,I as ae,a6 as va,w as ue,l as fa,C as ye,aj as ga,ao as ma,a5 as Fe}from"./vendor-vuetify-95axeNJO.js";const ya=$({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...ee(),...ke({transition:{component:Ie}})},"VCounter"),ba=Q()({name:"VCounter",functional:!0,props:ya(),setup(e,t){let{slots:u}=t;const n=V(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return X(()=>C(xe,{transition:e.transition},{default:()=>[ve(r("div",{class:G(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:Z(e.style)},[u.default?u.default({counter:n.value,max:e.max,value:e.value}):n.value]),[[Ce,e.active]])]})),{}}}),ha=$({text:String,onClick:p(),...ee(),...fe()},"VLabel"),Ca=Q()({name:"VLabel",props:ha(),setup(e,t){let{slots:u}=t;return X(()=>{var n;return r("label",{class:G(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:Z(e.style),onClick:e.onClick},[e.text,(n=u.default)==null?void 0:n.call(u)])}),{}}}),Va=$({floating:Boolean,...ee()},"VFieldLabel"),te=Q()({name:"VFieldLabel",props:Va(),setup(e,t){let{slots:u}=t;return X(()=>C(Ca,{class:G(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:Z(e.style)},u)),{}}});function Me(e){const{t}=sa();function u(n){let{name:l,color:a,...y}=n;const b={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[l],x=e[`onClick:${l}`];function I(s){s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),s.stopPropagation(),_e(x,new PointerEvent("click",s)))}const o=x&&b?t(`$vuetify.input.${b}`,e.label??""):void 0;return C(qe,U({icon:e[`${l}Icon`],"aria-label":o,onClick:x,onKeydown:I,color:a},y),null)}return{InputIcon:u}}const Ae=$({focused:Boolean,"onUpdate:focused":p()},"focus");function De(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe();const u=de(e,"focused"),n=V(()=>({[`${t}--focused`]:u.value}));function l(){u.value=!0}function a(){u.value=!1}return{focusClasses:n,isFocused:u,focus:l,blur:a}}const xa=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Re=$({appendInnerIcon:ae,bgColor:String,clearable:Boolean,clearIcon:{type:ae,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:ae,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>xa.includes(e)},"onClick:clear":p(),"onClick:appendInner":p(),"onClick:prependInner":p(),...ee(),...ea(),...Ze(),...fe()},"VField"),be=Q()({name:"VField",inheritAttrs:!1,props:{id:String,details:Boolean,labelId:String,...Ae(),...Re()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:u,emit:n,slots:l}=t;const{themeClasses:a}=Be(e),{loaderClasses:y}=pe(e),{focusClasses:b,isFocused:x,focus:I,blur:o}=De(e),{InputIcon:s}=Me(e),{roundedClasses:c}=Ge(e),{rtlClasses:v}=we(),k=V(()=>e.dirty||e.active),B=V(()=>!!(e.label||l.label)),h=V(()=>!e.singleLine&&B.value),T=re(),_=m(()=>e.id||`input-${T}`),P=V(()=>e.details?`${_.value}-messages`:void 0),i=H(),g=H(),A=H(),d=m(()=>["plain","underlined"].includes(e.variant)),f=m(()=>e.error||e.disabled?void 0:k.value&&x.value?e.color:e.baseColor),w=m(()=>{if(!(!e.iconColor||e.glow&&!x.value))return e.iconColor===!0?f.value:e.iconColor}),{backgroundColorClasses:N,backgroundColorStyles:E}=Qe(()=>e.bgColor),{textColorClasses:O,textColorStyles:R}=Se(f);J(k,F=>{if(h.value&&!ua()){const L=i.value.$el,z=g.value.$el;requestAnimationFrame(()=>{const j=oa(L),M=new ra(z),q=M.x-j.x,Y=M.y-j.y-(j.height/2-M.height/2),le=M.width/.75,ne=Math.abs(le-j.width)>1?{maxWidth:ca(le)}:void 0,ce=getComputedStyle(L),ge=getComputedStyle(z),Le=parseFloat(ce.transitionDuration)*1e3||150,Te=parseFloat(ge.getPropertyValue("--v-field-label-scale")),Ne=ge.getPropertyValue("color");L.style.visibility="visible",z.style.visibility="hidden",da(L,{transform:`translate(${q}px, ${Y}px) scale(${Te})`,color:Ne,...ne},{duration:Le,easing:va,direction:F?"normal":"reverse"}).finished.then(()=>{L.style.removeProperty("visibility"),z.style.removeProperty("visibility")})})}},{flush:"post"});const S=m(()=>({isActive:k,isFocused:x,controlRef:A,iconColor:w,blur:o,focus:I})),D=V(()=>{const F=!k.value;return{"aria-hidden":F,for:F?void 0:_.value}}),K=V(()=>{const F=h.value&&k.value;return{"aria-hidden":F,for:F?void 0:_.value}});function W(F){F.target!==document.activeElement&&F.preventDefault()}return X(()=>{var q;const F=e.variant==="outlined",L=!!(l["prepend-inner"]||e.prependInnerIcon),z=!!(e.clearable||l.clear)&&!e.disabled,j=!!(l["append-inner"]||e.appendInnerIcon||z),M=()=>l.label?l.label({...S.value,label:e.label,props:{for:_.value}}):e.label;return r("div",U({class:["v-field",{"v-field--active":k.value,"v-field--appended":j,"v-field--center-affix":e.centerAffix??!d.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--glow":e.glow,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":L,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!M(),[`v-field--variant-${e.variant}`]:!0},a.value,N.value,b.value,y.value,c.value,v.value,e.class],style:[E.value,e.style],onClick:W},u),[r("div",{class:"v-field__overlay"},null),C(Xe,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:l.loader}),L&&r("div",{key:"prepend",class:"v-field__prepend-inner"},[l["prepend-inner"]?l["prepend-inner"](S.value):e.prependInnerIcon&&C(s,{key:"prepend-icon",name:"prependInner",color:w.value},null)]),r("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&h.value&&C(te,U({key:"floating-label",ref:g,class:[O.value],floating:!0},D.value,{style:R.value}),{default:()=>[M()]}),B.value&&C(te,U({key:"label",ref:i,id:e.labelId},K.value),{default:()=>[M()]}),((q=l.default)==null?void 0:q.call(l,{...S.value,props:{id:_.value,class:"v-field__input","aria-describedby":P.value},focus:I,blur:o}))??r("div",{id:_.value,class:"v-field__input","aria-describedby":P.value},null)]),z&&C(Je,{key:"clear"},{default:()=>[ve(r("div",{class:"v-field__clearable",onMousedown:Y=>{Y.preventDefault(),Y.stopPropagation()}},[C(Ye,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[l.clear?l.clear({...S.value,props:{onFocus:I,onBlur:o,onClick:e["onClick:clear"],tabindex:-1}}):C(s,{name:"clear",onFocus:I,onBlur:o,tabindex:-1},null)]})]),[[Ce,e.dirty]])]}),j&&r("div",{key:"append",class:"v-field__append-inner"},[l["append-inner"]?l["append-inner"](S.value):e.appendInnerIcon&&C(s,{key:"append-icon",name:"appendInner",color:w.value},null)]),r("div",{class:G(["v-field__outline",O.value]),style:Z(R.value)},[F&&r(ie,null,[r("div",{class:"v-field__outline__start"},null),h.value&&r("div",{class:"v-field__outline__notch"},[C(te,U({ref:g,floating:!0},D.value),{default:()=>[M()]})]),r("div",{class:"v-field__outline__end"},null)]),d.value&&h.value&&C(te,U({ref:g,floating:!0},D.value),{default:()=>[M()]})])])}),{controlRef:A,fieldIconColor:w}}}),ka=$({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...ee(),...ke({transition:{component:Ie,leaveAbsolute:!0,group:!0}})},"VMessages"),Ia=Q()({name:"VMessages",props:ka(),setup(e,t){let{slots:u}=t;const n=m(()=>ue(e.messages)),{textColorClasses:l,textColorStyles:a}=Se(()=>e.color);return X(()=>C(xe,{transition:e.transition,tag:"div",class:G(["v-messages",l.value,e.class]),style:Z([a.value,e.style])},{default:()=>[e.active&&n.value.map((y,b)=>r("div",{class:"v-messages__message",key:`${b}-${n.value}`},[u.message?u.message({message:y}):y]))]})),{}}}),$e=Symbol.for("vuetify:form"),Ta=$({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function Na(e){const t=de(e,"modelValue"),u=V(()=>e.disabled),n=V(()=>e.readonly),l=oe(!1),a=H([]),y=H([]);async function b(){const o=[];let s=!0;y.value=[],l.value=!0;for(const c of a.value){const v=await c.validate();if(v.length>0&&(s=!1,o.push({id:c.id,errorMessages:v})),!s&&e.fastFail)break}return y.value=o,l.value=!1,{valid:s,errors:y.value}}function x(){a.value.forEach(o=>o.reset())}function I(){a.value.forEach(o=>o.resetValidation())}return J(a,()=>{let o=0,s=0;const c=[];for(const v of a.value)v.isValid===!1?(s++,c.push({id:v.id,errorMessages:v.errorMessages})):v.isValid===!0&&o++;y.value=c,t.value=s>0?!1:o===a.value.length?!0:null},{deep:!0,flush:"post"}),Oe($e,{register:o=>{let{id:s,vm:c,validate:v,reset:k,resetValidation:B}=o;a.value.some(h=>h.id===s),a.value.push({id:s,validate:v,reset:k,resetValidation:B,vm:ze(c),isValid:null,errorMessages:[]})},unregister:o=>{a.value=a.value.filter(s=>s.id!==o)},update:(o,s,c)=>{const v=a.value.find(k=>k.id===o);v&&(v.isValid=s,v.errorMessages=c)},isDisabled:u,isReadonly:n,isValidating:l,isValid:t,items:a,validateOn:V(()=>e.validateOn)}),{errors:y,isDisabled:u,isReadonly:n,isValidating:l,isValid:t,items:a,validate:b,reset:x,resetValidation:I}}function Sa(e){const t=Ve($e,null);return{...t,isReadonly:m(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:m(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const _a=Symbol.for("vuetify:rules");function Pa(e){const t=Ve(_a,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return(t==null?void 0:t.resolve(e))??V(e)}const Ba=$({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...Ae()},"validation");function wa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe(),u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:re();const n=de(e,"modelValue"),l=m(()=>e.validationValue===void 0?n.value:e.validationValue),a=Sa(e),y=Pa(()=>e.rules),b=H([]),x=oe(!0),I=m(()=>!!(ue(n.value===""?null:n.value).length||ue(l.value===""?null:l.value).length)),o=m(()=>{var i;return(i=e.errorMessages)!=null&&i.length?ue(e.errorMessages).concat(b.value).slice(0,Math.max(0,Number(e.maxErrors))):b.value}),s=m(()=>{var A;let i=(e.validateOn??((A=a.validateOn)==null?void 0:A.value))||"input";i==="lazy"&&(i="input lazy"),i==="eager"&&(i="input eager");const g=new Set((i==null?void 0:i.split(" "))??[]);return{input:g.has("input"),blur:g.has("blur")||g.has("input")||g.has("invalid-input"),invalidInput:g.has("invalid-input"),lazy:g.has("lazy"),eager:g.has("eager")}}),c=m(()=>{var i;return e.error||(i=e.errorMessages)!=null&&i.length?!1:e.rules.length?x.value?b.value.length||s.value.lazy?null:!0:!b.value.length:!0}),v=oe(!1),k=m(()=>({[`${t}--error`]:c.value===!1,[`${t}--dirty`]:I.value,[`${t}--disabled`]:a.isDisabled.value,[`${t}--readonly`]:a.isReadonly.value})),B=fa("validation"),h=m(()=>e.name??Ke(u));je(()=>{var i;(i=a.register)==null||i.call(a,{id:h.value,vm:B,validate:P,reset:T,resetValidation:_})}),Ue(()=>{var i;(i=a.unregister)==null||i.call(a,h.value)}),He(async()=>{var i;s.value.lazy||await P(!s.value.eager),(i=a.update)==null||i.call(a,h.value,c.value,o.value)}),ye(()=>s.value.input||s.value.invalidInput&&c.value===!1,()=>{J(l,()=>{if(l.value!=null)P();else if(e.focused){const i=J(()=>e.focused,g=>{g||P(),i()})}})}),ye(()=>s.value.blur,()=>{J(()=>e.focused,i=>{i||P()})}),J([c,o],()=>{var i;(i=a.update)==null||i.call(a,h.value,c.value,o.value)});async function T(){n.value=null,await se(),await _()}async function _(){x.value=!0,s.value.lazy?b.value=[]:await P(!s.value.eager)}async function P(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const g=[];v.value=!0;for(const A of y.value){if(g.length>=Number(e.maxErrors??1))break;const f=await(typeof A=="function"?A:()=>A)(l.value);if(f!==!0){if(f!==!1&&typeof f!="string"){console.warn(`${f} is not a valid value. Rule functions must return boolean true or a string.`);continue}g.push(f||"")}}return b.value=g,v.value=!1,x.value=i,b.value}return{errorMessages:o,isDirty:I,isDisabled:a.isDisabled,isReadonly:a.isReadonly,isPristine:x,isValid:c,isValidating:v,reset:T,resetValidation:_,validate:P,validationClasses:k}}const Ee=$({id:String,appendIcon:ae,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:ae,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":p(),"onClick:append":p(),...ee(),...ta(),...ga(na(),["maxWidth","minWidth","width"]),...fe(),...Ba()},"VInput"),he=Q()({name:"VInput",props:{...Ee()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:u,slots:n,emit:l}=t;const{densityClasses:a}=aa(e),{dimensionStyles:y}=la(e),{themeClasses:b}=Be(e),{rtlClasses:x}=we(),{InputIcon:I}=Me(e),o=re(),s=m(()=>e.id||`input-${o}`),{errorMessages:c,isDirty:v,isDisabled:k,isReadonly:B,isPristine:h,isValid:T,isValidating:_,reset:P,resetValidation:i,validate:g,validationClasses:A}=wa(e,"v-input",s),d=m(()=>{var S;return(S=e.errorMessages)!=null&&S.length||!h.value&&c.value.length?c.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages}),f=V(()=>d.value.length>0),w=V(()=>!e.hideDetails||e.hideDetails==="auto"&&(f.value||!!n.details)),N=m(()=>w.value?`${s.value}-messages`:void 0),E=m(()=>({id:s,messagesId:N,isDirty:v,isDisabled:k,isReadonly:B,isPristine:h,isValid:T,isValidating:_,hasDetails:w,reset:P,resetValidation:i,validate:g})),O=V(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),R=V(()=>{if(e.iconColor)return e.iconColor===!0?O.value:e.iconColor});return X(()=>{var K,W;const S=!!(n.prepend||e.prependIcon),D=!!(n.append||e.appendIcon);return r("div",{class:G(["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},a.value,b.value,x.value,A.value,e.class]),style:Z([y.value,e.style])},[S&&r("div",{key:"prepend",class:"v-input__prepend"},[n.prepend?n.prepend(E.value):e.prependIcon&&C(I,{key:"prepend-icon",name:"prepend",color:R.value},null)]),n.default&&r("div",{class:"v-input__control"},[(K=n.default)==null?void 0:K.call(n,E.value)]),D&&r("div",{key:"append",class:"v-input__append"},[n.append?n.append(E.value):e.appendIcon&&C(I,{key:"append-icon",name:"append",color:R.value},null)]),w.value&&r("div",{id:N.value,class:"v-input__details",role:"alert","aria-live":"polite"},[C(Ia,{active:f.value,messages:d.value},{message:n.message}),(W=n.details)==null?void 0:W.call(n,E.value)])])}),{reset:P,resetValidation:i,validate:g,isValid:T,errorMessages:c}}}),Fa=$({autocomplete:String},"autocomplete");function Ma(e){const t=re(),u=oe(0),n=V(()=>e.autocomplete==="suppress"),l=V(()=>{if(e.name)return n.value?`${e.name}-${t}-${u.value}`:e.name}),a=V(()=>n.value?"off":e.autocomplete);return{isSuppressing:n,fieldAutocomplete:a,fieldName:l,update:()=>u.value=new Date().getTime()}}function Aa(e){function t(u,n){if(!e.autofocus||!u)return;const l=n[0].target,a=l.matches("input,textarea")?l:l.querySelector("input,textarea");a==null||a.focus()}return{onIntersect:t}}const Da=["color","file","time","date","datetime-local","week","month"],Ra=$({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...Fa(),...Fe(Ee(),["direction"]),...Re()},"VTextField"),Oa=Q()({name:"VTextField",directives:{vIntersect:me},inheritAttrs:!1,props:Ra(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:u,emit:n,slots:l}=t;const a=de(e,"modelValue",void 0,d=>Object.is(d,-0)?"-0":d),{isFocused:y,focus:b,blur:x}=De(e),{onIntersect:I}=Aa(e),o=m(()=>typeof e.counterValue=="function"?e.counterValue(a.value):typeof e.counterValue=="number"?e.counterValue:(a.value??"").toString().length),s=m(()=>{if(u.maxlength)return u.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),c=m(()=>["plain","underlined"].includes(e.variant)),v=H(),k=H(),B=H(),h=Ma(e),T=m(()=>Da.includes(e.type)||e.persistentPlaceholder||y.value||e.active);function _(){h.isSuppressing.value&&h.update(),y.value||b(),se(()=>{var d;B.value!==document.activeElement&&((d=B.value)==null||d.focus())})}function P(d){n("mousedown:control",d),d.target!==B.value&&(_(),d.preventDefault())}function i(d){n("click:control",d)}function g(d,f){d.stopPropagation(),_(),se(()=>{f(),_e(e["onClick:clear"],d)})}function A(d){var O;const f=d.target;if(!((O=e.modelModifiers)!=null&&O.trim&&["text","search","password","tel","url"].includes(e.type))){a.value=f.value;return}const w=f.value,N=f.selectionStart,E=f.selectionEnd;a.value=w,se(()=>{let R=0;w.trimStart().length===f.value.length&&(R=w.length-f.value.length),N!=null&&(f.selectionStart=N-R),E!=null&&(f.selectionEnd=E-R)})}return X(()=>{const d=!!(l.counter||e.counter!==!1&&e.counter!=null),f=!!(d||l.details),[w,N]=ma(u),{modelValue:E,...O}=he.filterProps(e),R=be.filterProps(e);return C(he,U({ref:v,modelValue:a.value,"onUpdate:modelValue":S=>a.value=S,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":c.value},e.class],style:e.style},w,O,{centerAffix:!c.value,focused:y.value}),{...l,default:S=>{let{id:D,isDisabled:K,isDirty:W,isReadonly:F,isValid:L,hasDetails:z,reset:j}=S;return C(be,U({ref:k,onMousedown:P,onClick:i,"onClick:clear":M=>g(M,j),role:e.role},Fe(R,["onClick:clear"]),{id:D.value,labelId:`${D.value}-label`,active:T.value||W.value,dirty:W.value||e.dirty,disabled:K.value,focused:y.value,details:z.value,error:L.value===!1}),{...l,default:M=>{let{props:{class:q,...Y},controlRef:le}=M;const ne=r("input",U({ref:ce=>B.value=le.value=ce,value:a.value,onInput:A,autofocus:e.autofocus,readonly:F.value,disabled:K.value,name:h.fieldName.value,autocomplete:h.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:b,onBlur:x,"aria-labelledby":`${D.value}-label`},Y,N),null);return r(ie,null,[e.prefix&&r("span",{class:"v-text-field__prefix"},[r("span",{class:"v-text-field__prefix__text"},[e.prefix])]),ve(l.default?r("div",{class:G(q),"data-no-activator":""},[l.default({id:D}),ne]):We(ne,{class:q}),[[me,I,null,{once:!0}]]),e.suffix&&r("span",{class:"v-text-field__suffix"},[r("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:f?S=>{var D;return r(ie,null,[(D=l.details)==null?void 0:D.call(l,S),d&&r(ie,null,[r("span",null,null),C(ba,{active:e.persistentCounter||y.value,value:o.value,max:s.value,disabled:e.disabled},l.counter)])])}:void 0})}),ia({},v,k,B)}});export{Oa as V,he as a,be as b,ba as c,Ee as d,Sa as e,Ca as f,Ae as g,Me as h,Ra as i,Na as j,Ta as k,Ma as l,Re as m,Aa as n,Fa as o,De as u}; +import{j as C,R as ve,V as Ce,k as r,N as Z,n as G,t as V,m as U,E as re,o as J,F as ie,b as H,e as m,d as Ve,s as oe,p as Oe,ag as ze,a0 as je,A as Ue,D as He,I as se,u as Ke,ah as We}from"./vendor-vue-BiQC5iF7.js";import{P as xe,Q as ke,v as Ie,f as qe,a7 as pe,N as Ge,I as Qe,H as Se,a8 as Xe,ag as Ye,as as Je,R as Ze,a9 as ea,K as aa,b as la,a as na,M as ta,av as me,E as ia}from"./index-DGIAsv4W.js";import{f as Q,u as X,p as $,k as ee,m as fe,ag as p,an as sa,ap as _e,g as Pe,n as de,h as Be,A as we,P as ua,T as oa,G as ra,a4 as da,s as ca,I as ae,a6 as va,w as ue,l as fa,C as ye,aj as ga,ao as ma,a5 as Fe}from"./vendor-vuetify-DsKlzgKp.js";const ya=$({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...ee(),...ke({transition:{component:Ie}})},"VCounter"),ba=Q()({name:"VCounter",functional:!0,props:ya(),setup(e,t){let{slots:u}=t;const n=V(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return X(()=>C(xe,{transition:e.transition},{default:()=>[ve(r("div",{class:G(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:Z(e.style)},[u.default?u.default({counter:n.value,max:e.max,value:e.value}):n.value]),[[Ce,e.active]])]})),{}}}),ha=$({text:String,onClick:p(),...ee(),...fe()},"VLabel"),Ca=Q()({name:"VLabel",props:ha(),setup(e,t){let{slots:u}=t;return X(()=>{var n;return r("label",{class:G(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:Z(e.style),onClick:e.onClick},[e.text,(n=u.default)==null?void 0:n.call(u)])}),{}}}),Va=$({floating:Boolean,...ee()},"VFieldLabel"),te=Q()({name:"VFieldLabel",props:Va(),setup(e,t){let{slots:u}=t;return X(()=>C(Ca,{class:G(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:Z(e.style)},u)),{}}});function Me(e){const{t}=sa();function u(n){let{name:l,color:a,...y}=n;const b={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[l],x=e[`onClick:${l}`];function I(s){s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),s.stopPropagation(),_e(x,new PointerEvent("click",s)))}const o=x&&b?t(`$vuetify.input.${b}`,e.label??""):void 0;return C(qe,U({icon:e[`${l}Icon`],"aria-label":o,onClick:x,onKeydown:I,color:a},y),null)}return{InputIcon:u}}const Ae=$({focused:Boolean,"onUpdate:focused":p()},"focus");function De(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe();const u=de(e,"focused"),n=V(()=>({[`${t}--focused`]:u.value}));function l(){u.value=!0}function a(){u.value=!1}return{focusClasses:n,isFocused:u,focus:l,blur:a}}const xa=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Re=$({appendInnerIcon:ae,bgColor:String,clearable:Boolean,clearIcon:{type:ae,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:ae,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>xa.includes(e)},"onClick:clear":p(),"onClick:appendInner":p(),"onClick:prependInner":p(),...ee(),...ea(),...Ze(),...fe()},"VField"),be=Q()({name:"VField",inheritAttrs:!1,props:{id:String,details:Boolean,labelId:String,...Ae(),...Re()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:u,emit:n,slots:l}=t;const{themeClasses:a}=Be(e),{loaderClasses:y}=pe(e),{focusClasses:b,isFocused:x,focus:I,blur:o}=De(e),{InputIcon:s}=Me(e),{roundedClasses:c}=Ge(e),{rtlClasses:v}=we(),k=V(()=>e.dirty||e.active),B=V(()=>!!(e.label||l.label)),h=V(()=>!e.singleLine&&B.value),T=re(),_=m(()=>e.id||`input-${T}`),P=V(()=>e.details?`${_.value}-messages`:void 0),i=H(),g=H(),A=H(),d=m(()=>["plain","underlined"].includes(e.variant)),f=m(()=>e.error||e.disabled?void 0:k.value&&x.value?e.color:e.baseColor),w=m(()=>{if(!(!e.iconColor||e.glow&&!x.value))return e.iconColor===!0?f.value:e.iconColor}),{backgroundColorClasses:N,backgroundColorStyles:E}=Qe(()=>e.bgColor),{textColorClasses:O,textColorStyles:R}=Se(f);J(k,F=>{if(h.value&&!ua()){const L=i.value.$el,z=g.value.$el;requestAnimationFrame(()=>{const j=oa(L),M=new ra(z),q=M.x-j.x,Y=M.y-j.y-(j.height/2-M.height/2),le=M.width/.75,ne=Math.abs(le-j.width)>1?{maxWidth:ca(le)}:void 0,ce=getComputedStyle(L),ge=getComputedStyle(z),Le=parseFloat(ce.transitionDuration)*1e3||150,Te=parseFloat(ge.getPropertyValue("--v-field-label-scale")),Ne=ge.getPropertyValue("color");L.style.visibility="visible",z.style.visibility="hidden",da(L,{transform:`translate(${q}px, ${Y}px) scale(${Te})`,color:Ne,...ne},{duration:Le,easing:va,direction:F?"normal":"reverse"}).finished.then(()=>{L.style.removeProperty("visibility"),z.style.removeProperty("visibility")})})}},{flush:"post"});const S=m(()=>({isActive:k,isFocused:x,controlRef:A,iconColor:w,blur:o,focus:I})),D=V(()=>{const F=!k.value;return{"aria-hidden":F,for:F?void 0:_.value}}),K=V(()=>{const F=h.value&&k.value;return{"aria-hidden":F,for:F?void 0:_.value}});function W(F){F.target!==document.activeElement&&F.preventDefault()}return X(()=>{var q;const F=e.variant==="outlined",L=!!(l["prepend-inner"]||e.prependInnerIcon),z=!!(e.clearable||l.clear)&&!e.disabled,j=!!(l["append-inner"]||e.appendInnerIcon||z),M=()=>l.label?l.label({...S.value,label:e.label,props:{for:_.value}}):e.label;return r("div",U({class:["v-field",{"v-field--active":k.value,"v-field--appended":j,"v-field--center-affix":e.centerAffix??!d.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--glow":e.glow,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":L,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!M(),[`v-field--variant-${e.variant}`]:!0},a.value,N.value,b.value,y.value,c.value,v.value,e.class],style:[E.value,e.style],onClick:W},u),[r("div",{class:"v-field__overlay"},null),C(Xe,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:l.loader}),L&&r("div",{key:"prepend",class:"v-field__prepend-inner"},[l["prepend-inner"]?l["prepend-inner"](S.value):e.prependInnerIcon&&C(s,{key:"prepend-icon",name:"prependInner",color:w.value},null)]),r("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&h.value&&C(te,U({key:"floating-label",ref:g,class:[O.value],floating:!0},D.value,{style:R.value}),{default:()=>[M()]}),B.value&&C(te,U({key:"label",ref:i,id:e.labelId},K.value),{default:()=>[M()]}),((q=l.default)==null?void 0:q.call(l,{...S.value,props:{id:_.value,class:"v-field__input","aria-describedby":P.value},focus:I,blur:o}))??r("div",{id:_.value,class:"v-field__input","aria-describedby":P.value},null)]),z&&C(Je,{key:"clear"},{default:()=>[ve(r("div",{class:"v-field__clearable",onMousedown:Y=>{Y.preventDefault(),Y.stopPropagation()}},[C(Ye,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[l.clear?l.clear({...S.value,props:{onFocus:I,onBlur:o,onClick:e["onClick:clear"],tabindex:-1}}):C(s,{name:"clear",onFocus:I,onBlur:o,tabindex:-1},null)]})]),[[Ce,e.dirty]])]}),j&&r("div",{key:"append",class:"v-field__append-inner"},[l["append-inner"]?l["append-inner"](S.value):e.appendInnerIcon&&C(s,{key:"append-icon",name:"appendInner",color:w.value},null)]),r("div",{class:G(["v-field__outline",O.value]),style:Z(R.value)},[F&&r(ie,null,[r("div",{class:"v-field__outline__start"},null),h.value&&r("div",{class:"v-field__outline__notch"},[C(te,U({ref:g,floating:!0},D.value),{default:()=>[M()]})]),r("div",{class:"v-field__outline__end"},null)]),d.value&&h.value&&C(te,U({ref:g,floating:!0},D.value),{default:()=>[M()]})])])}),{controlRef:A,fieldIconColor:w}}}),ka=$({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...ee(),...ke({transition:{component:Ie,leaveAbsolute:!0,group:!0}})},"VMessages"),Ia=Q()({name:"VMessages",props:ka(),setup(e,t){let{slots:u}=t;const n=m(()=>ue(e.messages)),{textColorClasses:l,textColorStyles:a}=Se(()=>e.color);return X(()=>C(xe,{transition:e.transition,tag:"div",class:G(["v-messages",l.value,e.class]),style:Z([a.value,e.style])},{default:()=>[e.active&&n.value.map((y,b)=>r("div",{class:"v-messages__message",key:`${b}-${n.value}`},[u.message?u.message({message:y}):y]))]})),{}}}),$e=Symbol.for("vuetify:form"),Ta=$({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function Na(e){const t=de(e,"modelValue"),u=V(()=>e.disabled),n=V(()=>e.readonly),l=oe(!1),a=H([]),y=H([]);async function b(){const o=[];let s=!0;y.value=[],l.value=!0;for(const c of a.value){const v=await c.validate();if(v.length>0&&(s=!1,o.push({id:c.id,errorMessages:v})),!s&&e.fastFail)break}return y.value=o,l.value=!1,{valid:s,errors:y.value}}function x(){a.value.forEach(o=>o.reset())}function I(){a.value.forEach(o=>o.resetValidation())}return J(a,()=>{let o=0,s=0;const c=[];for(const v of a.value)v.isValid===!1?(s++,c.push({id:v.id,errorMessages:v.errorMessages})):v.isValid===!0&&o++;y.value=c,t.value=s>0?!1:o===a.value.length?!0:null},{deep:!0,flush:"post"}),Oe($e,{register:o=>{let{id:s,vm:c,validate:v,reset:k,resetValidation:B}=o;a.value.some(h=>h.id===s),a.value.push({id:s,validate:v,reset:k,resetValidation:B,vm:ze(c),isValid:null,errorMessages:[]})},unregister:o=>{a.value=a.value.filter(s=>s.id!==o)},update:(o,s,c)=>{const v=a.value.find(k=>k.id===o);v&&(v.isValid=s,v.errorMessages=c)},isDisabled:u,isReadonly:n,isValidating:l,isValid:t,items:a,validateOn:V(()=>e.validateOn)}),{errors:y,isDisabled:u,isReadonly:n,isValidating:l,isValid:t,items:a,validate:b,reset:x,resetValidation:I}}function Sa(e){const t=Ve($e,null);return{...t,isReadonly:m(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:m(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const _a=Symbol.for("vuetify:rules");function Pa(e){const t=Ve(_a,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return(t==null?void 0:t.resolve(e))??V(e)}const Ba=$({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...Ae()},"validation");function wa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe(),u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:re();const n=de(e,"modelValue"),l=m(()=>e.validationValue===void 0?n.value:e.validationValue),a=Sa(e),y=Pa(()=>e.rules),b=H([]),x=oe(!0),I=m(()=>!!(ue(n.value===""?null:n.value).length||ue(l.value===""?null:l.value).length)),o=m(()=>{var i;return(i=e.errorMessages)!=null&&i.length?ue(e.errorMessages).concat(b.value).slice(0,Math.max(0,Number(e.maxErrors))):b.value}),s=m(()=>{var A;let i=(e.validateOn??((A=a.validateOn)==null?void 0:A.value))||"input";i==="lazy"&&(i="input lazy"),i==="eager"&&(i="input eager");const g=new Set((i==null?void 0:i.split(" "))??[]);return{input:g.has("input"),blur:g.has("blur")||g.has("input")||g.has("invalid-input"),invalidInput:g.has("invalid-input"),lazy:g.has("lazy"),eager:g.has("eager")}}),c=m(()=>{var i;return e.error||(i=e.errorMessages)!=null&&i.length?!1:e.rules.length?x.value?b.value.length||s.value.lazy?null:!0:!b.value.length:!0}),v=oe(!1),k=m(()=>({[`${t}--error`]:c.value===!1,[`${t}--dirty`]:I.value,[`${t}--disabled`]:a.isDisabled.value,[`${t}--readonly`]:a.isReadonly.value})),B=fa("validation"),h=m(()=>e.name??Ke(u));je(()=>{var i;(i=a.register)==null||i.call(a,{id:h.value,vm:B,validate:P,reset:T,resetValidation:_})}),Ue(()=>{var i;(i=a.unregister)==null||i.call(a,h.value)}),He(async()=>{var i;s.value.lazy||await P(!s.value.eager),(i=a.update)==null||i.call(a,h.value,c.value,o.value)}),ye(()=>s.value.input||s.value.invalidInput&&c.value===!1,()=>{J(l,()=>{if(l.value!=null)P();else if(e.focused){const i=J(()=>e.focused,g=>{g||P(),i()})}})}),ye(()=>s.value.blur,()=>{J(()=>e.focused,i=>{i||P()})}),J([c,o],()=>{var i;(i=a.update)==null||i.call(a,h.value,c.value,o.value)});async function T(){n.value=null,await se(),await _()}async function _(){x.value=!0,s.value.lazy?b.value=[]:await P(!s.value.eager)}async function P(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const g=[];v.value=!0;for(const A of y.value){if(g.length>=Number(e.maxErrors??1))break;const f=await(typeof A=="function"?A:()=>A)(l.value);if(f!==!0){if(f!==!1&&typeof f!="string"){console.warn(`${f} is not a valid value. Rule functions must return boolean true or a string.`);continue}g.push(f||"")}}return b.value=g,v.value=!1,x.value=i,b.value}return{errorMessages:o,isDirty:I,isDisabled:a.isDisabled,isReadonly:a.isReadonly,isPristine:x,isValid:c,isValidating:v,reset:T,resetValidation:_,validate:P,validationClasses:k}}const Ee=$({id:String,appendIcon:ae,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:ae,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":p(),"onClick:append":p(),...ee(),...ta(),...ga(na(),["maxWidth","minWidth","width"]),...fe(),...Ba()},"VInput"),he=Q()({name:"VInput",props:{...Ee()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:u,slots:n,emit:l}=t;const{densityClasses:a}=aa(e),{dimensionStyles:y}=la(e),{themeClasses:b}=Be(e),{rtlClasses:x}=we(),{InputIcon:I}=Me(e),o=re(),s=m(()=>e.id||`input-${o}`),{errorMessages:c,isDirty:v,isDisabled:k,isReadonly:B,isPristine:h,isValid:T,isValidating:_,reset:P,resetValidation:i,validate:g,validationClasses:A}=wa(e,"v-input",s),d=m(()=>{var S;return(S=e.errorMessages)!=null&&S.length||!h.value&&c.value.length?c.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages}),f=V(()=>d.value.length>0),w=V(()=>!e.hideDetails||e.hideDetails==="auto"&&(f.value||!!n.details)),N=m(()=>w.value?`${s.value}-messages`:void 0),E=m(()=>({id:s,messagesId:N,isDirty:v,isDisabled:k,isReadonly:B,isPristine:h,isValid:T,isValidating:_,hasDetails:w,reset:P,resetValidation:i,validate:g})),O=V(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),R=V(()=>{if(e.iconColor)return e.iconColor===!0?O.value:e.iconColor});return X(()=>{var K,W;const S=!!(n.prepend||e.prependIcon),D=!!(n.append||e.appendIcon);return r("div",{class:G(["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},a.value,b.value,x.value,A.value,e.class]),style:Z([y.value,e.style])},[S&&r("div",{key:"prepend",class:"v-input__prepend"},[n.prepend?n.prepend(E.value):e.prependIcon&&C(I,{key:"prepend-icon",name:"prepend",color:R.value},null)]),n.default&&r("div",{class:"v-input__control"},[(K=n.default)==null?void 0:K.call(n,E.value)]),D&&r("div",{key:"append",class:"v-input__append"},[n.append?n.append(E.value):e.appendIcon&&C(I,{key:"append-icon",name:"append",color:R.value},null)]),w.value&&r("div",{id:N.value,class:"v-input__details",role:"alert","aria-live":"polite"},[C(Ia,{active:f.value,messages:d.value},{message:n.message}),(W=n.details)==null?void 0:W.call(n,E.value)])])}),{reset:P,resetValidation:i,validate:g,isValid:T,errorMessages:c}}}),Fa=$({autocomplete:String},"autocomplete");function Ma(e){const t=re(),u=oe(0),n=V(()=>e.autocomplete==="suppress"),l=V(()=>{if(e.name)return n.value?`${e.name}-${t}-${u.value}`:e.name}),a=V(()=>n.value?"off":e.autocomplete);return{isSuppressing:n,fieldAutocomplete:a,fieldName:l,update:()=>u.value=new Date().getTime()}}function Aa(e){function t(u,n){if(!e.autofocus||!u)return;const l=n[0].target,a=l.matches("input,textarea")?l:l.querySelector("input,textarea");a==null||a.focus()}return{onIntersect:t}}const Da=["color","file","time","date","datetime-local","week","month"],Ra=$({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...Fa(),...Fe(Ee(),["direction"]),...Re()},"VTextField"),Oa=Q()({name:"VTextField",directives:{vIntersect:me},inheritAttrs:!1,props:Ra(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:u,emit:n,slots:l}=t;const a=de(e,"modelValue",void 0,d=>Object.is(d,-0)?"-0":d),{isFocused:y,focus:b,blur:x}=De(e),{onIntersect:I}=Aa(e),o=m(()=>typeof e.counterValue=="function"?e.counterValue(a.value):typeof e.counterValue=="number"?e.counterValue:(a.value??"").toString().length),s=m(()=>{if(u.maxlength)return u.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),c=m(()=>["plain","underlined"].includes(e.variant)),v=H(),k=H(),B=H(),h=Ma(e),T=m(()=>Da.includes(e.type)||e.persistentPlaceholder||y.value||e.active);function _(){h.isSuppressing.value&&h.update(),y.value||b(),se(()=>{var d;B.value!==document.activeElement&&((d=B.value)==null||d.focus())})}function P(d){n("mousedown:control",d),d.target!==B.value&&(_(),d.preventDefault())}function i(d){n("click:control",d)}function g(d,f){d.stopPropagation(),_(),se(()=>{f(),_e(e["onClick:clear"],d)})}function A(d){var O;const f=d.target;if(!((O=e.modelModifiers)!=null&&O.trim&&["text","search","password","tel","url"].includes(e.type))){a.value=f.value;return}const w=f.value,N=f.selectionStart,E=f.selectionEnd;a.value=w,se(()=>{let R=0;w.trimStart().length===f.value.length&&(R=w.length-f.value.length),N!=null&&(f.selectionStart=N-R),E!=null&&(f.selectionEnd=E-R)})}return X(()=>{const d=!!(l.counter||e.counter!==!1&&e.counter!=null),f=!!(d||l.details),[w,N]=ma(u),{modelValue:E,...O}=he.filterProps(e),R=be.filterProps(e);return C(he,U({ref:v,modelValue:a.value,"onUpdate:modelValue":S=>a.value=S,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":c.value},e.class],style:e.style},w,O,{centerAffix:!c.value,focused:y.value}),{...l,default:S=>{let{id:D,isDisabled:K,isDirty:W,isReadonly:F,isValid:L,hasDetails:z,reset:j}=S;return C(be,U({ref:k,onMousedown:P,onClick:i,"onClick:clear":M=>g(M,j),role:e.role},Fe(R,["onClick:clear"]),{id:D.value,labelId:`${D.value}-label`,active:T.value||W.value,dirty:W.value||e.dirty,disabled:K.value,focused:y.value,details:z.value,error:L.value===!1}),{...l,default:M=>{let{props:{class:q,...Y},controlRef:le}=M;const ne=r("input",U({ref:ce=>B.value=le.value=ce,value:a.value,onInput:A,autofocus:e.autofocus,readonly:F.value,disabled:K.value,name:h.fieldName.value,autocomplete:h.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:b,onBlur:x,"aria-labelledby":`${D.value}-label`},Y,N),null);return r(ie,null,[e.prefix&&r("span",{class:"v-text-field__prefix"},[r("span",{class:"v-text-field__prefix__text"},[e.prefix])]),ve(l.default?r("div",{class:G(q),"data-no-activator":""},[l.default({id:D}),ne]):We(ne,{class:q}),[[me,I,null,{once:!0}]]),e.suffix&&r("span",{class:"v-text-field__suffix"},[r("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:f?S=>{var D;return r(ie,null,[(D=l.details)==null?void 0:D.call(l,S),d&&r(ie,null,[r("span",null,null),C(ba,{active:e.persistentCounter||y.value,value:o.value,max:s.value,disabled:e.disabled},l.counter)])])}:void 0})}),ia({},v,k,B)}});export{Oa as V,he as a,be as b,ba as c,Ee as d,Sa as e,Ca as f,Ae as g,Me as h,Ra as i,Na as j,Ta as k,Ma as l,Re as m,Aa as n,Fa as o,De as u}; diff --git a/assets/VTextarea-zDVNnlPQ.js b/assets/VTextarea-vGWmTJww.js similarity index 95% rename from assets/VTextarea-zDVNnlPQ.js rename to assets/VTextarea-vGWmTJww.js index 2a02dba..4dfad07 100644 --- a/assets/VTextarea-zDVNnlPQ.js +++ b/assets/VTextarea-vGWmTJww.js @@ -1 +1 @@ -import{b as w,w as re,D as se,o as f,A as ce,j as A,k as r,F as M,m as z,R as U,aj as de,n as fe,I as C,e as P,s as ve}from"./vendor-vue-28M5UGz3.js";import{u as me,l as xe,a as $,b as j,c as ge,n as he,m as we,d as ye,o as Ve}from"./VTextField-BxdS2D7S.js";import{av as O,E as be}from"./index-CzpSlHRw.js";import{f as Fe,n as Ce,a0 as Pe,u as Ie,ao as ke,s as B,z as Re,ap as Ne,p as Se,a5 as He}from"./vendor-vuetify-95axeNJO.js";const Ae=Se({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...Ve(),...He(ye(),["direction"]),...we()},"VTextarea"),Te=Fe()({name:"VTextarea",directives:{vIntersect:O},inheritAttrs:!1,props:Ae(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(e,W){let{attrs:I,emit:k,slots:o}=W;const l=Ce(e,"modelValue"),{isFocused:y,focus:q,blur:J}=me(e),{onIntersect:K}=he(e),L=P(()=>typeof e.counterValue=="function"?e.counterValue(l.value):(l.value||"").toString().length),Q=P(()=>{if(I.maxlength)return I.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),D=w(),b=w(),T=ve(""),v=w(),R=w(0),{platform:X}=Pe(),F=xe(e),Y=P(()=>e.persistentPlaceholder||y.value||e.active);function N(){var t;F.isSuppressing.value&&F.update(),v.value!==document.activeElement&&((t=v.value)==null||t.focus()),y.value||q()}function Z(t){N(),k("click:control",t)}function ee(t){k("mousedown:control",t)}function te(t){t.stopPropagation(),N(),C(()=>{l.value="",Ne(e["onClick:clear"],t)})}function ae(t){var g;const a=t.target;if(!((g=e.modelModifiers)!=null&&g.trim)){l.value=a.value;return}const n=a.value,x=a.selectionStart,c=a.selectionEnd;l.value=n,C(()=>{let d=0;n.trimStart().length===a.value.length&&(d=n.length-a.value.length),x!=null&&(a.selectionStart=x-d),c!=null&&(a.selectionEnd=c-d)})}const m=w(),V=w(Number(e.rows)),S=P(()=>["plain","underlined"].includes(e.variant));re(()=>{e.autoGrow||(V.value=Number(e.rows))});function s(){C(()=>{if(!v.value)return;if(X.value.firefox){R.value=12;return}const{offsetWidth:t,clientWidth:a}=v.value;R.value=Math.max(0,t-a)}),e.autoGrow&&C(()=>{if(!m.value||!b.value)return;const t=getComputedStyle(m.value),a=getComputedStyle(b.value.$el),n=parseFloat(t.getPropertyValue("--v-field-padding-top"))+parseFloat(t.getPropertyValue("--v-input-padding-top"))+parseFloat(t.getPropertyValue("--v-field-padding-bottom")),x=m.value.scrollHeight,c=parseFloat(t.lineHeight),g=Math.max(parseFloat(e.rows)*c+n,parseFloat(a.getPropertyValue("--v-input-control-height"))),d=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*c+n||1/0,i=Re(x??0,g,d);V.value=Math.floor((i-n)/c),T.value=B(i)})}se(s),f(l,s),f(()=>e.rows,s),f(()=>e.maxHeight,s),f(()=>e.maxRows,s),f(()=>e.density,s),f(V,t=>{k("update:rows",t)});let u;return f(m,t=>{t?(u=new ResizeObserver(s),u.observe(m.value)):u==null||u.disconnect()}),ce(()=>{u==null||u.disconnect()}),Ie(()=>{const t=!!(o.counter||e.counter||e.counterValue),a=!!(t||o.details),[n,x]=ke(I),{modelValue:c,...g}=$.filterProps(e),d={...j.filterProps(e),"onClick:clear":te};return A($,z({ref:D,modelValue:l.value,"onUpdate:modelValue":i=>l.value=i,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":S.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?B(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":B(R.value)},e.style]},n,g,{centerAffix:V.value===1&&!S.value,focused:y.value}),{...o,default:i=>{let{id:h,isDisabled:_,isDirty:p,isReadonly:le,isValid:ne,hasDetails:oe}=i;return A(j,z({ref:b,style:{"--v-textarea-control-height":T.value},onClick:Z,onMousedown:ee,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},d,{id:h.value,active:Y.value||p.value,labelId:`${h.value}-label`,centerAffix:V.value===1&&!S.value,dirty:p.value||e.dirty,disabled:_.value,focused:y.value,details:oe.value,error:ne.value===!1}),{...o,default:ue=>{let{props:{class:E,...G},controlRef:ie}=ue;return r(M,null,[e.prefix&&r("span",{class:"v-text-field__prefix"},[e.prefix]),U(r("textarea",z({ref:H=>v.value=ie.value=H,class:E,value:l.value,onInput:ae,autofocus:e.autofocus,readonly:le.value,disabled:_.value,placeholder:e.placeholder,rows:e.rows,name:F.fieldName.value,autocomplete:F.fieldAutocomplete.value,onFocus:N,onBlur:J,"aria-labelledby":`${h.value}-label`},G,x),null),[[O,{handler:K},null,{once:!0}]]),e.autoGrow&&U(r("textarea",{class:fe([E,"v-textarea__sizer"]),id:`${G.id}-sizer`,"onUpdate:modelValue":H=>l.value=H,ref:m,readonly:!0,"aria-hidden":"true"},null),[[de,l.value]]),e.suffix&&r("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:a?i=>{var h;return r(M,null,[(h=o.details)==null?void 0:h.call(o,i),t&&r(M,null,[r("span",null,null),A(ge,{active:e.persistentCounter||y.value,value:L.value,max:Q.value,disabled:e.disabled},o.counter)])])}:void 0})}),be({},D,b,v)}});export{Te as V}; +import{b as w,w as re,D as se,o as f,A as ce,j as A,k as r,F as M,m as z,R as U,aj as de,n as fe,I as C,e as P,s as ve}from"./vendor-vue-BiQC5iF7.js";import{u as me,l as xe,a as $,b as j,c as ge,n as he,m as we,d as ye,o as Ve}from"./VTextField-BurlcggD.js";import{av as O,E as be}from"./index-DGIAsv4W.js";import{f as Fe,n as Ce,a0 as Pe,u as Ie,ao as ke,s as B,z as Re,ap as Ne,p as Se,a5 as He}from"./vendor-vuetify-DsKlzgKp.js";const Ae=Se({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...Ve(),...He(ye(),["direction"]),...we()},"VTextarea"),Te=Fe()({name:"VTextarea",directives:{vIntersect:O},inheritAttrs:!1,props:Ae(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(e,W){let{attrs:I,emit:k,slots:o}=W;const l=Ce(e,"modelValue"),{isFocused:y,focus:q,blur:J}=me(e),{onIntersect:K}=he(e),L=P(()=>typeof e.counterValue=="function"?e.counterValue(l.value):(l.value||"").toString().length),Q=P(()=>{if(I.maxlength)return I.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),D=w(),b=w(),T=ve(""),v=w(),R=w(0),{platform:X}=Pe(),F=xe(e),Y=P(()=>e.persistentPlaceholder||y.value||e.active);function N(){var t;F.isSuppressing.value&&F.update(),v.value!==document.activeElement&&((t=v.value)==null||t.focus()),y.value||q()}function Z(t){N(),k("click:control",t)}function ee(t){k("mousedown:control",t)}function te(t){t.stopPropagation(),N(),C(()=>{l.value="",Ne(e["onClick:clear"],t)})}function ae(t){var g;const a=t.target;if(!((g=e.modelModifiers)!=null&&g.trim)){l.value=a.value;return}const n=a.value,x=a.selectionStart,c=a.selectionEnd;l.value=n,C(()=>{let d=0;n.trimStart().length===a.value.length&&(d=n.length-a.value.length),x!=null&&(a.selectionStart=x-d),c!=null&&(a.selectionEnd=c-d)})}const m=w(),V=w(Number(e.rows)),S=P(()=>["plain","underlined"].includes(e.variant));re(()=>{e.autoGrow||(V.value=Number(e.rows))});function s(){C(()=>{if(!v.value)return;if(X.value.firefox){R.value=12;return}const{offsetWidth:t,clientWidth:a}=v.value;R.value=Math.max(0,t-a)}),e.autoGrow&&C(()=>{if(!m.value||!b.value)return;const t=getComputedStyle(m.value),a=getComputedStyle(b.value.$el),n=parseFloat(t.getPropertyValue("--v-field-padding-top"))+parseFloat(t.getPropertyValue("--v-input-padding-top"))+parseFloat(t.getPropertyValue("--v-field-padding-bottom")),x=m.value.scrollHeight,c=parseFloat(t.lineHeight),g=Math.max(parseFloat(e.rows)*c+n,parseFloat(a.getPropertyValue("--v-input-control-height"))),d=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*c+n||1/0,i=Re(x??0,g,d);V.value=Math.floor((i-n)/c),T.value=B(i)})}se(s),f(l,s),f(()=>e.rows,s),f(()=>e.maxHeight,s),f(()=>e.maxRows,s),f(()=>e.density,s),f(V,t=>{k("update:rows",t)});let u;return f(m,t=>{t?(u=new ResizeObserver(s),u.observe(m.value)):u==null||u.disconnect()}),ce(()=>{u==null||u.disconnect()}),Ie(()=>{const t=!!(o.counter||e.counter||e.counterValue),a=!!(t||o.details),[n,x]=ke(I),{modelValue:c,...g}=$.filterProps(e),d={...j.filterProps(e),"onClick:clear":te};return A($,z({ref:D,modelValue:l.value,"onUpdate:modelValue":i=>l.value=i,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":S.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?B(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":B(R.value)},e.style]},n,g,{centerAffix:V.value===1&&!S.value,focused:y.value}),{...o,default:i=>{let{id:h,isDisabled:_,isDirty:p,isReadonly:le,isValid:ne,hasDetails:oe}=i;return A(j,z({ref:b,style:{"--v-textarea-control-height":T.value},onClick:Z,onMousedown:ee,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},d,{id:h.value,active:Y.value||p.value,labelId:`${h.value}-label`,centerAffix:V.value===1&&!S.value,dirty:p.value||e.dirty,disabled:_.value,focused:y.value,details:oe.value,error:ne.value===!1}),{...o,default:ue=>{let{props:{class:E,...G},controlRef:ie}=ue;return r(M,null,[e.prefix&&r("span",{class:"v-text-field__prefix"},[e.prefix]),U(r("textarea",z({ref:H=>v.value=ie.value=H,class:E,value:l.value,onInput:ae,autofocus:e.autofocus,readonly:le.value,disabled:_.value,placeholder:e.placeholder,rows:e.rows,name:F.fieldName.value,autocomplete:F.fieldAutocomplete.value,onFocus:N,onBlur:J,"aria-labelledby":`${h.value}-label`},G,x),null),[[O,{handler:K},null,{once:!0}]]),e.autoGrow&&U(r("textarea",{class:fe([E,"v-textarea__sizer"]),id:`${G.id}-sizer`,"onUpdate:modelValue":H=>l.value=H,ref:m,readonly:!0,"aria-hidden":"true"},null),[[de,l.value]]),e.suffix&&r("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:a?i=>{var h;return r(M,null,[(h=o.details)==null?void 0:h.call(o,i),t&&r(M,null,[r("span",null,null),A(ge,{active:e.persistentCounter||y.value,value:L.value,max:Q.value,disabled:e.disabled},o.counter)])])}:void 0})}),be({},D,b,v)}});export{Te as V}; diff --git a/assets/VTimePicker-DvAq_vLK.js b/assets/VTimePicker-BApLLZ8X.js similarity index 98% rename from assets/VTimePicker-DvAq_vLK.js rename to assets/VTimePicker-BApLLZ8X.js index b7c47c2..17dff33 100644 --- a/assets/VTimePicker-DvAq_vLK.js +++ b/assets/VTimePicker-BApLLZ8X.js @@ -1 +1 @@ -import{H as be,I as xe,E as Ne,h as me,K as Ce,M as He}from"./index-CzpSlHRw.js";import{f as p,u as ee,p as Q,aN as Ae,an as ge,n as G,z as ve,a5 as le}from"./vendor-vuetify-95axeNJO.js";import{o as E,q as Te,k as A,N as ae,n as z,b as y,e as V,j as $,s as De,a1 as fe,F as Be,I as Ie,D as Fe,m as ne,t as $e}from"./vendor-vue-28M5UGz3.js";import{V as Ue}from"./VTextField-BxdS2D7S.js";import{V as ke,m as Re}from"./VPicker-199veasp.js";const Ee=Q({allowedValues:Function,ampm:Boolean,color:String,disabled:Boolean,displayedValue:null,double:Boolean,format:{type:Function,default:e=>e},max:{type:Number,required:!0},min:{type:Number,required:!0},scrollable:Boolean,readonly:Boolean,rotate:{type:Number,default:0},step:{type:Number,default:1},modelValue:{type:Number}},"VTimePickerClock"),we=p()({name:"VTimePickerClock",props:Ee(),emits:{change:e=>!0,input:e=>!0},setup(e,d){let{emit:f}=d;const k=y(null),x=y(null),v=y(void 0),u=y(!1),o=y(null),i=y(null),_=Ae(n=>f("change",n),750),{textColorClasses:N,textColorStyles:S}=be(()=>e.color),{backgroundColorClasses:h,backgroundColorStyles:a}=xe(()=>e.color),b=V(()=>e.max-e.min+1),g=V(()=>e.double?b.value/2:b.value),s=V(()=>360/g.value),T=V(()=>s.value*Math.PI/180),I=V(()=>e.modelValue==null?e.min:e.modelValue),q=V(()=>.62),j=V(()=>{const n=[];for(let c=e.min;c<=e.max;c=c+e.step)n.push(c);return n});E(()=>e.modelValue,n=>{v.value=n});function D(n){v.value!==n&&(v.value=n),f("input",n)}function B(n){return!e.allowedValues||e.allowedValues(n)}function L(n){if(!e.scrollable||e.disabled)return;n.preventDefault();const c=Math.sign(-n.deltaY||1);let w=I.value;do w=w+c,w=(w-e.min+b.value)%b.value+e.min;while(!B(w)&&w!==I.value);w!==e.displayedValue&&D(w),_(w)}function K(n){return e.double&&n-e.min>=g.value}function U(n){return K(n)?q.value:1}function r(n){const c=e.rotate*Math.PI/180;return{x:Math.sin((n-e.min)*T.value+c)*U(n),y:-Math.cos((n-e.min)*T.value+c)*U(n)}}function M(n,c){const w=(Math.round(n/s.value)+(c?g.value:0))%b.value+e.min;return n<360-s.value/2?w:c?e.max-g.value+1:e.min}function R(n){const{x:c,y:w}=r(n);return{left:`${Math.round(50+c*50)}%`,top:`${Math.round(50+w*50)}%`}}function t(n,c){const w=c.x-n.x,W=c.y-n.y;return Math.sqrt(w*w+W*W)}function l(n,c){const w=2*Math.atan2(c.y-n.y-t(n,c),c.x-n.x);return Math.abs(w*180/Math.PI)}function C(n){o.value===null&&(o.value=n),i.value=n,D(n)}function m(n){var de,se;if(n.preventDefault(),!u.value&&n.type!=="click"||!k.value)return;const{width:c,top:w,left:W}=(de=k.value)==null?void 0:de.getBoundingClientRect(),{width:te}=((se=x.value)==null?void 0:se.getBoundingClientRect())??{width:0},{clientX:Me,clientY:Se}="touches"in n?n.touches[0]:n,ie={x:c/2,y:-c/2},oe={x:Me-W,y:w-Se},re=Math.round(l(ie,oe)-e.rotate+360)%360,ce=e.double&&t(ie,oe)<(te+te*q.value)/4,Pe=Math.ceil(15/s.value);let Y;for(let Z=0;ZA("div",{class:z([{"v-time-picker-clock":!0,"v-time-picker-clock--indeterminate":e.modelValue==null,"v-time-picker-clock--readonly":e.readonly}]),onMousedown:P,onTouchstart:P,onWheel:L,ref:k},[A("div",{class:"v-time-picker-clock__inner",ref:x},[A("div",{class:z([{"v-time-picker-clock__hand":!0,"v-time-picker-clock__hand--inner":K(e.modelValue)},N.value]),style:ae([{transform:`rotate(${e.rotate+s.value*(I.value-e.min)}deg) scaleY(${U(I.value)})`},S.value])},null),j.value.map(n=>{const c=n===I.value;return A("div",{class:z([{"v-time-picker-clock__item":!0,"v-time-picker-clock__item--active":c,"v-time-picker-clock__item--disabled":e.disabled||!B(n)},c&&h.value]),style:ae([R(n),c&&a.value])},[A("span",null,[e.format(n)])])})])]))}}),Le=Q({active:Boolean,color:String,disabled:Boolean,label:String,modelValue:String,error:String,showHint:Boolean,readonly:Boolean},"VTimePickerField"),ue=p()({name:"VTimePickerField",props:Le(),emits:{"update:modelValue":e=>!0},setup(e,d){let{emit:f}=d;const{textColorClasses:k,textColorStyles:x}=be(()=>e.color),v=y(),u=De(!1);function o(i){if(["Backspace","Delete"].includes(i.key)){i.preventDefault();const _=i.target;_.value="",f("update:modelValue",null)}}return ee(()=>$(Ue,{ref:v,_as:"VTimePickerField",autocomplete:"off",class:z(["v-time-picker-controls__time__field",{"v-time-picker-controls__time__field--active":e.active},e.active?k.value:[]]),style:ae(e.active?x.value:[]),disabled:e.disabled,variant:"solo-filled",inputmode:"numeric",hideDetails:"auto","aria-label":e.label,"aria-invalid":!!e.error,"aria-errormessage":e.error,error:!!e.error,hint:e.showHint?e.label:void 0,persistentHint:!0,flat:!0,modelValue:e.modelValue??(u.value?"":"--"),"onUpdate:modelValue":i=>f("update:modelValue",i),onKeydown:o,onFocus:()=>u.value=!0,onBlur:()=>u.value=!1},null)),Ne({},v)}});function H(e){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(d,"0")}function ye(e){return e?(e-1)%12+1:12}function J(e,d){return e%12+(d==="pm"?12:0)}function X(e){const d=e.replaceAll(/\D/g,"");return d.length>0?Number(d):null}function Ke(e,d,f){{if(e===23&&d)return{value:0};if(e===0&&!d)return{value:23}}return{value:e+(d?1:-1)}}function ze(e,d){return e===59&&d?0:e===0&&!d?59:e+(d?1:-1)}const Ve=Q({allowedHours:[Function,Array],allowedMinutes:[Function,Array],allowedSeconds:[Function,Array],max:String,min:String},"time-validation");function _e(e){const d=V(()=>{const v=e.min?Number(e.min.split(":")[0]):0,u=e.max?Number(e.max.split(":")[0]):23;return o=>ou?!1:Array.isArray(e.allowedHours)?e.allowedHours.includes(o):typeof e.allowedHours=="function"?e.allowedHours(o):!0}),f=V(()=>{const[v,u]=e.min?e.min.split(":").map(Number):[0,0],[o,i]=e.max?e.max.split(":").map(Number):[23,59],_=v*60+u,N=o*60+i;return(S,h)=>{if(S!==null){const a=60*S+h;if(a<_||a>N)return!1}return Array.isArray(e.allowedMinutes)?e.allowedMinutes.includes(h):typeof e.allowedMinutes=="function"?e.allowedMinutes(h):!0}}),k=V(()=>{const[v,u,o]=e.min?e.min.split(":").map(Number):[0,0,0],[i,_,N]=e.max?e.max.split(":").map(Number):[23,59,59],S=v*3600+u*60+(o||0),h=i*3600+_*60+(N||0);return(a,b,g)=>{if(a!==null&&b!==null){const s=3600*a+60*b+g;if(sh)return!1}return Array.isArray(e.allowedSeconds)?e.allowedSeconds.includes(g):typeof e.allowedSeconds=="function"?e.allowedSeconds(g):!0}});function x(v,u,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,_=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;const N=v==="hour"?d.value:v==="minute"?a=>f.value(i,a):a=>k.value(i,_,a),S=v==="hour"?a=>Ke(a,o).value:a=>ze(a,o),h=v==="hour"?24:60;for(let a=1;a<=h&&(u=S(u),!N(u));a++);return u}return{isAllowedHour:d,isAllowedMinute:f,isAllowedSecond:k,findNextAllowed:x}}const qe=Q({ampm:Boolean,color:String,disabled:Boolean,inputHints:Boolean,hour:[Number,String],minute:[Number,String],second:[Number,String],period:String,readonly:Boolean,useSeconds:Boolean,value:Number,viewMode:String,...Ve()},"VTimePickerControls"),he=p()({name:"VTimePickerControls",props:qe(),emits:{"update:period":e=>!0,"update:viewMode":e=>!0,"update:hour":e=>!0,"update:minute":e=>!0,"update:second":e=>!0},setup(e,d){let{emit:f}=d;const{t:k}=ge(),{isAllowedHour:x,isAllowedMinute:v,isAllowedSecond:u,findNextAllowed:o}=_e(e),i=V(()=>e.hour!==null?e.ampm?J(Number(e.hour),e.period??"am"):Number(e.hour):null),_=V(()=>e.minute!==null?Number(e.minute):null),N=V(()=>{var t;return e.hour===null?!0:((t=x.value)==null?void 0:t.call(x,Number(i.value)))??!0}),S=V(()=>{var t;return e.minute===null?!0:((t=v.value)==null?void 0:t.call(v,i.value,Number(e.minute)))??!0}),h=V(()=>{var t;return e.second===null?!0:((t=u.value)==null?void 0:t.call(u,i.value,_.value,Number(e.second)))??!0}),a={in:t=>{if(t==null||isNaN(Number(t)))return null;const l=Number(t);return e.ampm?H(ye(l)):H(l)},out:t=>{if(isNaN(Number(t))||t==null||t==="")return null;const l=typeof t=="string"?X(t):Number(t);return l===null?null:e.ampm?J(l,e.period??"am"):ve(l,0,23)}},b=G(e,"hour",void 0,a.in,a.out),g={in:t=>t!=null&&!isNaN(Number(t))?H(`${t}`):null,out:t=>{if(isNaN(Number(t))||t==null||t==="")return null;const l=typeof t=="string"?X(t):Number(t);return l!==null?ve(l,0,59):null}},s=G(e,"minute",void 0,g.in,g.out),T=G(e,"second",void 0,g.in,g.out);function I(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=e.period==="am",C=e.ampm?J(Number(b.value??0),l?"am":"pm"):Number(b.value??0),m=o("hour",C,t.key==="ArrowUp"),P=l&&m>=12||!l&&m<12;e.ampm&&P?(f("update:period",e.period==="am"?"pm":"am"),Ie(()=>b.value=H(m))):b.value=H(m)}function q(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=Number(s.value??0),C=o("minute",l,t.key==="ArrowUp",i.value);s.value=H(C)}function j(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=Number(T.value??0),C=o("second",l,t.key==="ArrowUp",i.value,_.value);T.value=H(C)}function D(t,l,C){return m=>{if(!m.data)return;const P=m.target,{value:F,selectionStart:O,selectionEnd:n}=P??{};if(X(m.data)===null){m.preventDefault();return}const c=F?F.slice(0,O)+m.data+F.slice(n):m.data;if(c.length>2){if(O===n&&n===0&&m.data.trim().startsWith("0")){m.preventDefault(),P.value=c.trim().substring(0,2),C(P.value),m.data.trim().length===1&&P.setSelectionRange(1,1);return}if(O===n&&n===1&&F.startsWith("0")){m.preventDefault(),P.value=c.trim().substring(0,2),C(P.value);return}const W=e.viewMode==="hour"?e.ampm?12:23:59;if(X(c)>W){m.preventDefault(),P.value=H(String(X(m.data)).substring(0,2)),C(P.value);return}}const w=t(c);l(w)&&m.preventDefault()}}function B(t){f("update:period",t)}const L=y(),K=y(),U=y();E(()=>e.viewMode,(t,l)=>{switch(l){case"hour":L.value.blur();break;case"minute":K.value.blur();break;case"second":U.value.blur();break}});const r=D(a.out,t=>a.in(t)===b.value,t=>b.value=t),M=D(g.out,t=>g.in(t)===s.value,t=>s.value=t),R=D(g.out,t=>g.in(t)===T.value,t=>T.value=t);return ee(()=>A("div",{class:"v-time-picker-controls"},[A("div",{class:z({"v-time-picker-controls__time":!0,"v-time-picker-controls__time--with-ampm":e.ampm,"v-time-picker-controls__time--with-seconds":e.useSeconds})},[$(ue,{ref:L,active:e.viewMode==="hour",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.hour"),showHint:e.inputHints,error:N.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:b.value,"onUpdate:modelValue":t=>b.value=t,onKeydown:I,onBeforeinput:r,onFocus:()=>f("update:viewMode","hour")},null),A("span",{class:"v-time-picker-controls__time__separator"},[fe(":")]),$(ue,{ref:K,active:e.viewMode==="minute",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.minute"),showHint:e.inputHints,error:S.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:s.value,"onUpdate:modelValue":t=>s.value=t,onKeydown:q,onBeforeinput:M,onFocus:()=>f("update:viewMode","minute")},null),e.useSeconds&&A("span",{key:"secondsDivider",class:"v-time-picker-controls__time__separator"},[fe(":")]),e.useSeconds&&A(Be,null,[$(ue,{key:"secondsVal",ref:U,active:e.viewMode==="second",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.second"),showHint:e.inputHints,error:h.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:T.value,"onUpdate:modelValue":t=>T.value=t,onKeydown:j,onBeforeinput:R,onFocus:()=>f("update:viewMode","second")},null)]),e.ampm&&A("div",{class:"v-time-picker-controls__ampm"},[$(me,{active:e.period==="am",color:e.period==="am"?e.color:void 0,class:z({"v-time-picker-controls__ampm__am":!0,"v-time-picker-controls__ampm__btn":!0,"v-time-picker-controls__ampm__btn__active":e.period==="am"}),disabled:e.disabled,text:k("$vuetify.timePicker.am"),variant:e.disabled&&e.period==="am"?"elevated":"tonal",onClick:()=>e.period!=="am"?B("am"):null},null),$(me,{active:e.period==="pm",color:e.period==="pm"?e.color:void 0,class:z({"v-time-picker-controls__ampm__pm":!0,"v-time-picker-controls__ampm__btn":!0,"v-time-picker-controls__ampm__btn__active":e.period==="pm"}),disabled:e.disabled,text:k("$vuetify.timePicker.pm"),variant:e.disabled&&e.period==="pm"?"elevated":"tonal",onClick:()=>e.period!=="pm"?B("pm"):null},null)])])])),{}}}),Oe=Q({disabled:Boolean,format:{type:String,default:"ampm"},viewMode:{type:String,default:"hour"},period:{type:String,default:"am",validator:e=>["am","pm"].includes(e)},modelValue:null,readonly:Boolean,scrollable:Boolean,useSeconds:Boolean,variant:{type:String,default:"dial"},...Ve(),...le(Re({title:"$vuetify.timePicker.title"}),["landscape"]),...He()},"VTimePicker"),Je=p()({name:"VTimePicker",props:Oe(),emits:{"update:hour":e=>!0,"update:minute":e=>!0,"update:period":e=>!0,"update:second":e=>!0,"update:modelValue":e=>!0,"update:viewMode":e=>!0},setup(e,d){let{emit:f,slots:k}=d;const{t:x}=ge(),{densityClasses:v}=Ce(e),u=y(null),o=y(null),i=y(null),_=y(null),N=y(null),S=y(null),h=G(e,"period","am"),a=G(e,"viewMode","hour"),b=y(null),g=y(null),s=V(()=>e.format==="ampm"),{isAllowedHour:T,isAllowedMinute:I,isAllowedSecond:q}=_e(e),j=$e(()=>e.modelValue!==null&&u.value===null&&o.value===null&&(!e.useSeconds||i.value===null));function D(){const r=B();r!==null&&r!==e.modelValue&&f("update:modelValue",r),j.value&&f("update:modelValue",null)}E(u,D),E(o,D),E(i,D),E(h,(r,M)=>{u.value==null||r===M||(r==="pm"&&u.value<12?u.value=u.value+12:r==="am"&&u.value>=12&&(u.value=u.value-12))}),E(()=>e.modelValue,r=>L(r)),E(()=>e.useSeconds,(r,M)=>{M&&!r&&a.value==="second"&&(a.value="minute"),!r&&i.value!==null&&(i.value=null)}),Fe(()=>{L(e.modelValue)});function B(){return u.value!=null&&o.value!=null&&(!e.useSeconds||i.value!=null)?`${H(u.value)}:${H(o.value)}`+(e.useSeconds?`:${H(i.value)}`:""):null}function L(r){if(r==null||r==="")u.value=null,o.value=null,i.value=null;else if(r instanceof Date)u.value=r.getHours(),o.value=r.getMinutes(),i.value=r.getSeconds();else{const[M,,R,,t,l]=r.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/)||new Array(6);u.value=l?J(parseInt(M,10),l):parseInt(M,10),o.value=parseInt(R,10),i.value=parseInt(t||0,10)}h.value=u.value==null||u.value<12?"am":"pm"}function K(r){a.value==="hour"?u.value=s.value?J(r,h.value):r:a.value==="minute"?o.value=r:i.value=r}function U(r){switch(a.value||"hour"){case"hour":f("update:hour",r);break;case"minute":f("update:minute",r);break;case"second":f("update:second",r);break}const M=u.value!==null&&o.value!==null&&(e.useSeconds?i.value!==null:!0);a.value==="hour"?a.value="minute":e.useSeconds&&a.value==="minute"&&(a.value="second"),!(u.value===_.value&&o.value===N.value&&(!e.useSeconds||i.value===S.value)||B()===null)&&(_.value=u.value,N.value=o.value,e.useSeconds&&(S.value=i.value),M&&D())}ee(()=>{const r=le(ke.filterProps(e),["hideHeader"]),M=he.filterProps(e),R=we.filterProps(le(e,["format","modelValue","min","max"])),t=a.value==="hour"?T.value:a.value==="minute"?l=>I.value(u.value,l):l=>q.value(u.value,o.value,l);return $(ke,ne(r,{color:void 0,class:["v-time-picker",`v-time-picker--variant-${e.variant}`,e.class,v.value],hideHeader:e.hideHeader&&e.variant!=="input",style:e.style}),{title:()=>{var l;return((l=k.title)==null?void 0:l.call(k))??A("div",{class:"v-time-picker__title"},[x(e.title)])},header:()=>$(he,ne(M,{ampm:s.value,hour:u.value,minute:o.value,period:h.value,second:i.value,viewMode:a.value,inputHints:e.variant==="input","onUpdate:hour":l=>u.value=l,"onUpdate:minute":l=>o.value=l,"onUpdate:second":l=>i.value=l,"onUpdate:period":l=>h.value=l,"onUpdate:viewMode":l=>a.value=l,ref:b}),null),default:()=>$(we,ne(R,{allowedValues:t,double:a.value==="hour"&&!s.value,format:a.value==="hour"?s.value?ye:l=>l:l=>H(l,2),max:a.value==="hour"?s.value&&h.value==="am"?11:23:59,min:a.value==="hour"&&s.value&&h.value==="pm"?12:0,size:20,step:a.value==="hour"?1:5,modelValue:a.value==="hour"?u.value:a.value==="minute"?o.value:i.value,onChange:U,onInput:K,ref:g}),null),actions:k.actions})})}});export{Je as V}; +import{H as be,I as xe,E as Ne,h as me,K as Ce,M as He}from"./index-DGIAsv4W.js";import{f as p,u as ee,p as Q,aN as Ae,an as ge,n as G,z as ve,a5 as le}from"./vendor-vuetify-DsKlzgKp.js";import{o as E,q as Te,k as A,N as ae,n as z,b as y,e as V,j as $,s as De,a1 as fe,F as Be,I as Ie,D as Fe,m as ne,t as $e}from"./vendor-vue-BiQC5iF7.js";import{V as Ue}from"./VTextField-BurlcggD.js";import{V as ke,m as Re}from"./VPicker-SM18M-iq.js";const Ee=Q({allowedValues:Function,ampm:Boolean,color:String,disabled:Boolean,displayedValue:null,double:Boolean,format:{type:Function,default:e=>e},max:{type:Number,required:!0},min:{type:Number,required:!0},scrollable:Boolean,readonly:Boolean,rotate:{type:Number,default:0},step:{type:Number,default:1},modelValue:{type:Number}},"VTimePickerClock"),we=p()({name:"VTimePickerClock",props:Ee(),emits:{change:e=>!0,input:e=>!0},setup(e,d){let{emit:f}=d;const k=y(null),x=y(null),v=y(void 0),u=y(!1),o=y(null),i=y(null),_=Ae(n=>f("change",n),750),{textColorClasses:N,textColorStyles:S}=be(()=>e.color),{backgroundColorClasses:h,backgroundColorStyles:a}=xe(()=>e.color),b=V(()=>e.max-e.min+1),g=V(()=>e.double?b.value/2:b.value),s=V(()=>360/g.value),T=V(()=>s.value*Math.PI/180),I=V(()=>e.modelValue==null?e.min:e.modelValue),q=V(()=>.62),j=V(()=>{const n=[];for(let c=e.min;c<=e.max;c=c+e.step)n.push(c);return n});E(()=>e.modelValue,n=>{v.value=n});function D(n){v.value!==n&&(v.value=n),f("input",n)}function B(n){return!e.allowedValues||e.allowedValues(n)}function L(n){if(!e.scrollable||e.disabled)return;n.preventDefault();const c=Math.sign(-n.deltaY||1);let w=I.value;do w=w+c,w=(w-e.min+b.value)%b.value+e.min;while(!B(w)&&w!==I.value);w!==e.displayedValue&&D(w),_(w)}function K(n){return e.double&&n-e.min>=g.value}function U(n){return K(n)?q.value:1}function r(n){const c=e.rotate*Math.PI/180;return{x:Math.sin((n-e.min)*T.value+c)*U(n),y:-Math.cos((n-e.min)*T.value+c)*U(n)}}function M(n,c){const w=(Math.round(n/s.value)+(c?g.value:0))%b.value+e.min;return n<360-s.value/2?w:c?e.max-g.value+1:e.min}function R(n){const{x:c,y:w}=r(n);return{left:`${Math.round(50+c*50)}%`,top:`${Math.round(50+w*50)}%`}}function t(n,c){const w=c.x-n.x,W=c.y-n.y;return Math.sqrt(w*w+W*W)}function l(n,c){const w=2*Math.atan2(c.y-n.y-t(n,c),c.x-n.x);return Math.abs(w*180/Math.PI)}function C(n){o.value===null&&(o.value=n),i.value=n,D(n)}function m(n){var de,se;if(n.preventDefault(),!u.value&&n.type!=="click"||!k.value)return;const{width:c,top:w,left:W}=(de=k.value)==null?void 0:de.getBoundingClientRect(),{width:te}=((se=x.value)==null?void 0:se.getBoundingClientRect())??{width:0},{clientX:Me,clientY:Se}="touches"in n?n.touches[0]:n,ie={x:c/2,y:-c/2},oe={x:Me-W,y:w-Se},re=Math.round(l(ie,oe)-e.rotate+360)%360,ce=e.double&&t(ie,oe)<(te+te*q.value)/4,Pe=Math.ceil(15/s.value);let Y;for(let Z=0;ZA("div",{class:z([{"v-time-picker-clock":!0,"v-time-picker-clock--indeterminate":e.modelValue==null,"v-time-picker-clock--readonly":e.readonly}]),onMousedown:P,onTouchstart:P,onWheel:L,ref:k},[A("div",{class:"v-time-picker-clock__inner",ref:x},[A("div",{class:z([{"v-time-picker-clock__hand":!0,"v-time-picker-clock__hand--inner":K(e.modelValue)},N.value]),style:ae([{transform:`rotate(${e.rotate+s.value*(I.value-e.min)}deg) scaleY(${U(I.value)})`},S.value])},null),j.value.map(n=>{const c=n===I.value;return A("div",{class:z([{"v-time-picker-clock__item":!0,"v-time-picker-clock__item--active":c,"v-time-picker-clock__item--disabled":e.disabled||!B(n)},c&&h.value]),style:ae([R(n),c&&a.value])},[A("span",null,[e.format(n)])])})])]))}}),Le=Q({active:Boolean,color:String,disabled:Boolean,label:String,modelValue:String,error:String,showHint:Boolean,readonly:Boolean},"VTimePickerField"),ue=p()({name:"VTimePickerField",props:Le(),emits:{"update:modelValue":e=>!0},setup(e,d){let{emit:f}=d;const{textColorClasses:k,textColorStyles:x}=be(()=>e.color),v=y(),u=De(!1);function o(i){if(["Backspace","Delete"].includes(i.key)){i.preventDefault();const _=i.target;_.value="",f("update:modelValue",null)}}return ee(()=>$(Ue,{ref:v,_as:"VTimePickerField",autocomplete:"off",class:z(["v-time-picker-controls__time__field",{"v-time-picker-controls__time__field--active":e.active},e.active?k.value:[]]),style:ae(e.active?x.value:[]),disabled:e.disabled,variant:"solo-filled",inputmode:"numeric",hideDetails:"auto","aria-label":e.label,"aria-invalid":!!e.error,"aria-errormessage":e.error,error:!!e.error,hint:e.showHint?e.label:void 0,persistentHint:!0,flat:!0,modelValue:e.modelValue??(u.value?"":"--"),"onUpdate:modelValue":i=>f("update:modelValue",i),onKeydown:o,onFocus:()=>u.value=!0,onBlur:()=>u.value=!1},null)),Ne({},v)}});function H(e){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(d,"0")}function ye(e){return e?(e-1)%12+1:12}function J(e,d){return e%12+(d==="pm"?12:0)}function X(e){const d=e.replaceAll(/\D/g,"");return d.length>0?Number(d):null}function Ke(e,d,f){{if(e===23&&d)return{value:0};if(e===0&&!d)return{value:23}}return{value:e+(d?1:-1)}}function ze(e,d){return e===59&&d?0:e===0&&!d?59:e+(d?1:-1)}const Ve=Q({allowedHours:[Function,Array],allowedMinutes:[Function,Array],allowedSeconds:[Function,Array],max:String,min:String},"time-validation");function _e(e){const d=V(()=>{const v=e.min?Number(e.min.split(":")[0]):0,u=e.max?Number(e.max.split(":")[0]):23;return o=>ou?!1:Array.isArray(e.allowedHours)?e.allowedHours.includes(o):typeof e.allowedHours=="function"?e.allowedHours(o):!0}),f=V(()=>{const[v,u]=e.min?e.min.split(":").map(Number):[0,0],[o,i]=e.max?e.max.split(":").map(Number):[23,59],_=v*60+u,N=o*60+i;return(S,h)=>{if(S!==null){const a=60*S+h;if(a<_||a>N)return!1}return Array.isArray(e.allowedMinutes)?e.allowedMinutes.includes(h):typeof e.allowedMinutes=="function"?e.allowedMinutes(h):!0}}),k=V(()=>{const[v,u,o]=e.min?e.min.split(":").map(Number):[0,0,0],[i,_,N]=e.max?e.max.split(":").map(Number):[23,59,59],S=v*3600+u*60+(o||0),h=i*3600+_*60+(N||0);return(a,b,g)=>{if(a!==null&&b!==null){const s=3600*a+60*b+g;if(sh)return!1}return Array.isArray(e.allowedSeconds)?e.allowedSeconds.includes(g):typeof e.allowedSeconds=="function"?e.allowedSeconds(g):!0}});function x(v,u,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,_=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;const N=v==="hour"?d.value:v==="minute"?a=>f.value(i,a):a=>k.value(i,_,a),S=v==="hour"?a=>Ke(a,o).value:a=>ze(a,o),h=v==="hour"?24:60;for(let a=1;a<=h&&(u=S(u),!N(u));a++);return u}return{isAllowedHour:d,isAllowedMinute:f,isAllowedSecond:k,findNextAllowed:x}}const qe=Q({ampm:Boolean,color:String,disabled:Boolean,inputHints:Boolean,hour:[Number,String],minute:[Number,String],second:[Number,String],period:String,readonly:Boolean,useSeconds:Boolean,value:Number,viewMode:String,...Ve()},"VTimePickerControls"),he=p()({name:"VTimePickerControls",props:qe(),emits:{"update:period":e=>!0,"update:viewMode":e=>!0,"update:hour":e=>!0,"update:minute":e=>!0,"update:second":e=>!0},setup(e,d){let{emit:f}=d;const{t:k}=ge(),{isAllowedHour:x,isAllowedMinute:v,isAllowedSecond:u,findNextAllowed:o}=_e(e),i=V(()=>e.hour!==null?e.ampm?J(Number(e.hour),e.period??"am"):Number(e.hour):null),_=V(()=>e.minute!==null?Number(e.minute):null),N=V(()=>{var t;return e.hour===null?!0:((t=x.value)==null?void 0:t.call(x,Number(i.value)))??!0}),S=V(()=>{var t;return e.minute===null?!0:((t=v.value)==null?void 0:t.call(v,i.value,Number(e.minute)))??!0}),h=V(()=>{var t;return e.second===null?!0:((t=u.value)==null?void 0:t.call(u,i.value,_.value,Number(e.second)))??!0}),a={in:t=>{if(t==null||isNaN(Number(t)))return null;const l=Number(t);return e.ampm?H(ye(l)):H(l)},out:t=>{if(isNaN(Number(t))||t==null||t==="")return null;const l=typeof t=="string"?X(t):Number(t);return l===null?null:e.ampm?J(l,e.period??"am"):ve(l,0,23)}},b=G(e,"hour",void 0,a.in,a.out),g={in:t=>t!=null&&!isNaN(Number(t))?H(`${t}`):null,out:t=>{if(isNaN(Number(t))||t==null||t==="")return null;const l=typeof t=="string"?X(t):Number(t);return l!==null?ve(l,0,59):null}},s=G(e,"minute",void 0,g.in,g.out),T=G(e,"second",void 0,g.in,g.out);function I(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=e.period==="am",C=e.ampm?J(Number(b.value??0),l?"am":"pm"):Number(b.value??0),m=o("hour",C,t.key==="ArrowUp"),P=l&&m>=12||!l&&m<12;e.ampm&&P?(f("update:period",e.period==="am"?"pm":"am"),Ie(()=>b.value=H(m))):b.value=H(m)}function q(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=Number(s.value??0),C=o("minute",l,t.key==="ArrowUp",i.value);s.value=H(C)}function j(t){if(!["ArrowUp","ArrowDown"].includes(t.key))return;t.preventDefault(),t.stopPropagation();const l=Number(T.value??0),C=o("second",l,t.key==="ArrowUp",i.value,_.value);T.value=H(C)}function D(t,l,C){return m=>{if(!m.data)return;const P=m.target,{value:F,selectionStart:O,selectionEnd:n}=P??{};if(X(m.data)===null){m.preventDefault();return}const c=F?F.slice(0,O)+m.data+F.slice(n):m.data;if(c.length>2){if(O===n&&n===0&&m.data.trim().startsWith("0")){m.preventDefault(),P.value=c.trim().substring(0,2),C(P.value),m.data.trim().length===1&&P.setSelectionRange(1,1);return}if(O===n&&n===1&&F.startsWith("0")){m.preventDefault(),P.value=c.trim().substring(0,2),C(P.value);return}const W=e.viewMode==="hour"?e.ampm?12:23:59;if(X(c)>W){m.preventDefault(),P.value=H(String(X(m.data)).substring(0,2)),C(P.value);return}}const w=t(c);l(w)&&m.preventDefault()}}function B(t){f("update:period",t)}const L=y(),K=y(),U=y();E(()=>e.viewMode,(t,l)=>{switch(l){case"hour":L.value.blur();break;case"minute":K.value.blur();break;case"second":U.value.blur();break}});const r=D(a.out,t=>a.in(t)===b.value,t=>b.value=t),M=D(g.out,t=>g.in(t)===s.value,t=>s.value=t),R=D(g.out,t=>g.in(t)===T.value,t=>T.value=t);return ee(()=>A("div",{class:"v-time-picker-controls"},[A("div",{class:z({"v-time-picker-controls__time":!0,"v-time-picker-controls__time--with-ampm":e.ampm,"v-time-picker-controls__time--with-seconds":e.useSeconds})},[$(ue,{ref:L,active:e.viewMode==="hour",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.hour"),showHint:e.inputHints,error:N.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:b.value,"onUpdate:modelValue":t=>b.value=t,onKeydown:I,onBeforeinput:r,onFocus:()=>f("update:viewMode","hour")},null),A("span",{class:"v-time-picker-controls__time__separator"},[fe(":")]),$(ue,{ref:K,active:e.viewMode==="minute",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.minute"),showHint:e.inputHints,error:S.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:s.value,"onUpdate:modelValue":t=>s.value=t,onKeydown:q,onBeforeinput:M,onFocus:()=>f("update:viewMode","minute")},null),e.useSeconds&&A("span",{key:"secondsDivider",class:"v-time-picker-controls__time__separator"},[fe(":")]),e.useSeconds&&A(Be,null,[$(ue,{key:"secondsVal",ref:U,active:e.viewMode==="second",color:e.color,disabled:e.disabled,label:k("$vuetify.timePicker.second"),showHint:e.inputHints,error:h.value?void 0:k("$vuetify.timePicker.notAllowed"),modelValue:T.value,"onUpdate:modelValue":t=>T.value=t,onKeydown:j,onBeforeinput:R,onFocus:()=>f("update:viewMode","second")},null)]),e.ampm&&A("div",{class:"v-time-picker-controls__ampm"},[$(me,{active:e.period==="am",color:e.period==="am"?e.color:void 0,class:z({"v-time-picker-controls__ampm__am":!0,"v-time-picker-controls__ampm__btn":!0,"v-time-picker-controls__ampm__btn__active":e.period==="am"}),disabled:e.disabled,text:k("$vuetify.timePicker.am"),variant:e.disabled&&e.period==="am"?"elevated":"tonal",onClick:()=>e.period!=="am"?B("am"):null},null),$(me,{active:e.period==="pm",color:e.period==="pm"?e.color:void 0,class:z({"v-time-picker-controls__ampm__pm":!0,"v-time-picker-controls__ampm__btn":!0,"v-time-picker-controls__ampm__btn__active":e.period==="pm"}),disabled:e.disabled,text:k("$vuetify.timePicker.pm"),variant:e.disabled&&e.period==="pm"?"elevated":"tonal",onClick:()=>e.period!=="pm"?B("pm"):null},null)])])])),{}}}),Oe=Q({disabled:Boolean,format:{type:String,default:"ampm"},viewMode:{type:String,default:"hour"},period:{type:String,default:"am",validator:e=>["am","pm"].includes(e)},modelValue:null,readonly:Boolean,scrollable:Boolean,useSeconds:Boolean,variant:{type:String,default:"dial"},...Ve(),...le(Re({title:"$vuetify.timePicker.title"}),["landscape"]),...He()},"VTimePicker"),Je=p()({name:"VTimePicker",props:Oe(),emits:{"update:hour":e=>!0,"update:minute":e=>!0,"update:period":e=>!0,"update:second":e=>!0,"update:modelValue":e=>!0,"update:viewMode":e=>!0},setup(e,d){let{emit:f,slots:k}=d;const{t:x}=ge(),{densityClasses:v}=Ce(e),u=y(null),o=y(null),i=y(null),_=y(null),N=y(null),S=y(null),h=G(e,"period","am"),a=G(e,"viewMode","hour"),b=y(null),g=y(null),s=V(()=>e.format==="ampm"),{isAllowedHour:T,isAllowedMinute:I,isAllowedSecond:q}=_e(e),j=$e(()=>e.modelValue!==null&&u.value===null&&o.value===null&&(!e.useSeconds||i.value===null));function D(){const r=B();r!==null&&r!==e.modelValue&&f("update:modelValue",r),j.value&&f("update:modelValue",null)}E(u,D),E(o,D),E(i,D),E(h,(r,M)=>{u.value==null||r===M||(r==="pm"&&u.value<12?u.value=u.value+12:r==="am"&&u.value>=12&&(u.value=u.value-12))}),E(()=>e.modelValue,r=>L(r)),E(()=>e.useSeconds,(r,M)=>{M&&!r&&a.value==="second"&&(a.value="minute"),!r&&i.value!==null&&(i.value=null)}),Fe(()=>{L(e.modelValue)});function B(){return u.value!=null&&o.value!=null&&(!e.useSeconds||i.value!=null)?`${H(u.value)}:${H(o.value)}`+(e.useSeconds?`:${H(i.value)}`:""):null}function L(r){if(r==null||r==="")u.value=null,o.value=null,i.value=null;else if(r instanceof Date)u.value=r.getHours(),o.value=r.getMinutes(),i.value=r.getSeconds();else{const[M,,R,,t,l]=r.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/)||new Array(6);u.value=l?J(parseInt(M,10),l):parseInt(M,10),o.value=parseInt(R,10),i.value=parseInt(t||0,10)}h.value=u.value==null||u.value<12?"am":"pm"}function K(r){a.value==="hour"?u.value=s.value?J(r,h.value):r:a.value==="minute"?o.value=r:i.value=r}function U(r){switch(a.value||"hour"){case"hour":f("update:hour",r);break;case"minute":f("update:minute",r);break;case"second":f("update:second",r);break}const M=u.value!==null&&o.value!==null&&(e.useSeconds?i.value!==null:!0);a.value==="hour"?a.value="minute":e.useSeconds&&a.value==="minute"&&(a.value="second"),!(u.value===_.value&&o.value===N.value&&(!e.useSeconds||i.value===S.value)||B()===null)&&(_.value=u.value,N.value=o.value,e.useSeconds&&(S.value=i.value),M&&D())}ee(()=>{const r=le(ke.filterProps(e),["hideHeader"]),M=he.filterProps(e),R=we.filterProps(le(e,["format","modelValue","min","max"])),t=a.value==="hour"?T.value:a.value==="minute"?l=>I.value(u.value,l):l=>q.value(u.value,o.value,l);return $(ke,ne(r,{color:void 0,class:["v-time-picker",`v-time-picker--variant-${e.variant}`,e.class,v.value],hideHeader:e.hideHeader&&e.variant!=="input",style:e.style}),{title:()=>{var l;return((l=k.title)==null?void 0:l.call(k))??A("div",{class:"v-time-picker__title"},[x(e.title)])},header:()=>$(he,ne(M,{ampm:s.value,hour:u.value,minute:o.value,period:h.value,second:i.value,viewMode:a.value,inputHints:e.variant==="input","onUpdate:hour":l=>u.value=l,"onUpdate:minute":l=>o.value=l,"onUpdate:second":l=>i.value=l,"onUpdate:period":l=>h.value=l,"onUpdate:viewMode":l=>a.value=l,ref:b}),null),default:()=>$(we,ne(R,{allowedValues:t,double:a.value==="hour"&&!s.value,format:a.value==="hour"?s.value?ye:l=>l:l=>H(l,2),max:a.value==="hour"?s.value&&h.value==="am"?11:23:59,min:a.value==="hour"&&s.value&&h.value==="pm"?12:0,size:20,step:a.value==="hour"?1:5,modelValue:a.value==="hour"?u.value:a.value==="minute"?o.value:i.value,onChange:U,onInput:K,ref:g}),null),actions:k.actions})})}});export{Je as V}; diff --git a/assets/VTooltip-C8vChj8G.js b/assets/VTooltip-2IUjfpCS.js similarity index 94% rename from assets/VTooltip-C8vChj8G.js rename to assets/VTooltip-2IUjfpCS.js index ef83b09..bb8de2b 100644 --- a/assets/VTooltip-C8vChj8G.js +++ b/assets/VTooltip-2IUjfpCS.js @@ -1 +1 @@ -import{j as m,k as C,R as I,V as R,m as g,E as O,e as P,t as h,b as w}from"./vendor-vue-28M5UGz3.js";import{I as A,N as D,H as F,O as L,P as $,f as E,b as H,a as M,Q as U,m as W,R as X,T as Y,L as j,D as B,E as G,U as Q}from"./index-CzpSlHRw.js";import{f as N,an as _,t as q,u as T,ar as z,p as x,I as J,m as K,k as Z,n as p,a5 as ee}from"./vendor-vuetify-95axeNJO.js";const te=x({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:J,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Z(),...Y({location:"top end"}),...X(),...W(),...K(),...U({transition:"scale-rotate-transition"}),...M()},"VBadge"),le=N()({name:"VBadge",inheritAttrs:!1,props:te(),setup(e,o){const{backgroundColorClasses:n,backgroundColorStyles:l}=A(()=>e.color),{roundedClasses:v}=D(e),{t:f}=_(),{textColorClasses:r,textColorStyles:u}=F(()=>e.textColor),{themeClasses:b}=q(),{locationStyles:V}=L(e,!0,t=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(t)?Number(e.offsetY??0):["left","right"].includes(t)?Number(e.offsetX??0):0)),{dimensionStyles:y}=H(e);return T(()=>{const t=Number(e.content),c=!e.max||isNaN(t)?e.content:t<=Number(e.max)?t:`${e.max}+`,[i,d]=z(o.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return m(e.tag,g({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},d,{style:e.style}),{default:()=>{var a,s;return[C("div",{class:"v-badge__wrapper"},[(s=(a=o.slots).default)==null?void 0:s.call(a),m($,{transition:e.transition},{default:()=>{var S,k;return[I(C("span",g({class:["v-badge__badge",b.value,n.value,v.value,r.value],style:[l.value,u.value,y.value,e.inline?{}:V.value],"aria-atomic":"true","aria-label":f(e.label,t),"aria-live":"polite",role:"status"},i),[e.dot?void 0:o.slots.badge?(k=(S=o.slots).badge)==null?void 0:k.call(S):e.icon?m(E,{icon:e.icon},null):c]),[[R,e.modelValue]])]}})])]}})}),{}}}),ae=x({id:String,interactive:Boolean,text:String,...ee(Q({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","retainFocus","captureFocus","disableInitialFocus"])},"VTooltip"),se=N()({name:"VTooltip",props:ae(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:n}=o;const l=p(e,"modelValue"),{scopeId:v}=j(),f=O(),r=h(()=>e.id||`v-tooltip-${f}`),u=w(),b=P(()=>e.location.split(" ").length>1?e.location:e.location+" center"),V=P(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),y=h(()=>e.transition!=null?e.transition:l.value?"scale-transition":"fade-transition"),t=P(()=>g({"aria-describedby":r.value},e.activatorProps));return T(()=>{const c=B.filterProps(e);return m(B,g({ref:u,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:r.value},c,{modelValue:l.value,"onUpdate:modelValue":i=>l.value=i,transition:y.value,absolute:!0,location:b.value,origin:V.value,role:"tooltip",activatorProps:t.value,_disableGlobalStack:!0},v),{activator:n.activator,default:function(){var s;for(var i=arguments.length,d=new Array(i),a=0;ae.color),{roundedClasses:v}=D(e),{t:f}=_(),{textColorClasses:r,textColorStyles:u}=F(()=>e.textColor),{themeClasses:b}=q(),{locationStyles:V}=L(e,!0,t=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(t)?Number(e.offsetY??0):["left","right"].includes(t)?Number(e.offsetX??0):0)),{dimensionStyles:y}=H(e);return T(()=>{const t=Number(e.content),c=!e.max||isNaN(t)?e.content:t<=Number(e.max)?t:`${e.max}+`,[i,d]=z(o.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return m(e.tag,g({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},d,{style:e.style}),{default:()=>{var a,s;return[C("div",{class:"v-badge__wrapper"},[(s=(a=o.slots).default)==null?void 0:s.call(a),m($,{transition:e.transition},{default:()=>{var S,k;return[I(C("span",g({class:["v-badge__badge",b.value,n.value,v.value,r.value],style:[l.value,u.value,y.value,e.inline?{}:V.value],"aria-atomic":"true","aria-label":f(e.label,t),"aria-live":"polite",role:"status"},i),[e.dot?void 0:o.slots.badge?(k=(S=o.slots).badge)==null?void 0:k.call(S):e.icon?m(E,{icon:e.icon},null):c]),[[R,e.modelValue]])]}})])]}})}),{}}}),ae=x({id:String,interactive:Boolean,text:String,...ee(Q({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","retainFocus","captureFocus","disableInitialFocus"])},"VTooltip"),se=N()({name:"VTooltip",props:ae(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:n}=o;const l=p(e,"modelValue"),{scopeId:v}=j(),f=O(),r=h(()=>e.id||`v-tooltip-${f}`),u=w(),b=P(()=>e.location.split(" ").length>1?e.location:e.location+" center"),V=P(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),y=h(()=>e.transition!=null?e.transition:l.value?"scale-transition":"fade-transition"),t=P(()=>g({"aria-describedby":r.value},e.activatorProps));return T(()=>{const c=B.filterProps(e);return m(B,g({ref:u,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:r.value},c,{modelValue:l.value,"onUpdate:modelValue":i=>l.value=i,transition:y.value,absolute:!0,location:b.value,origin:V.value,role:"tooltip",activatorProps:t.value,_disableGlobalStack:!0},v),{activator:n.activator,default:function(){var s;for(var i=arguments.length,d=new Array(i),a=0;a[i(_,{elevation:"1"},{prepend:o(()=>[i(n,{icon:"mdi-arrow-left",variant:"text",onClick:t[0]||(t[0]=C=>r.$router.back())})]),default:o(()=>[i(g,{class:"text-h6"},{default:o(()=>[...t[1]||(t[1]=[l(" 编辑考试配置 ",-1)])]),_:1}),i(v),i(n,{loading:a.saving,color:"success","prepend-icon":"mdi-content-save",variant:"outlined",onClick:s.save},{default:o(()=>[...t[2]||(t[2]=[l(" 保存 ",-1)])]),_:1},8,["loading","onClick"])]),_:1}),i(p,{class:"py-4",style:{"max-width":"1200px"}},{default:o(()=>[a.id?(m(),d(c,{key:0,ref:"editor","config-id":a.id,onError:s.onError,onSaved:s.onSaved},null,8,["config-id","onError","onSaved"])):x("",!0)]),_:1})]),_:1})}const L=u(E,[["render",V]]);export{L as default}; +import f from"./ExamConfigEditor-BVwEXehR.js";import{_ as u,g as v,h as n}from"./index-DGIAsv4W.js";import{a as _,V as g}from"./VAppBarTitle-DheyIZnb.js";import{V as p}from"./VContainer-DZyPrcqa.js";import{X as m,Y as d,Z as o,j as i,a1 as l,$ as x}from"./vendor-vue-BiQC5iF7.js";import"./dataProvider-GWPC-0Vt.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";import"./VAlert-BZ4-f-hy.js";import"./vendor-vuetify-DsKlzgKp.js";import"./VSkeletonLoader-DwE_iqTb.js";import"./VTooltip-2IUjfpCS.js";import"./VChip-mRzIPuM0.js";import"./VRow-Cjhiymuu.js";import"./VTextField-BurlcggD.js";import"./VTextarea-vGWmTJww.js";import"./VSwitch-k6hfPfa2.js";import"./VAutocomplete-N0zTUlyj.js";import"./VSelect-oxA0t9CG.js";import"./VSheet-BBnSA_kJ.js";import"./VCheckboxBtn-BKcSogH0.js";import"./VDatePicker-CuGF0KeL.js";import"./VPicker-SM18M-iq.js";import"./VTimePicker-BApLLZ8X.js";const E={name:"ExamEditorPage",components:{ExamConfigEditor:f},data(){return{id:this.$route.params.id,saving:!1}},watch:{"$route.params.id"(r){this.id=r}},methods:{async save(){if(this.$refs.editor){this.saving=!0;try{await this.$refs.editor.saveConfig()}finally{this.saving=!1}}},onSaved(){var r,t;(t=(r=this.$toast)==null?void 0:r.success)==null||t.call(r,"保存成功")},onError(r){var t,e;(e=(t=this.$toast)==null?void 0:t.error)==null||e.call(t,r||"保存失败")}}};function V(r,t,e,h,a,s){const c=f;return m(),d(p,{class:"pa-0"},{default:o(()=>[i(_,{elevation:"1"},{prepend:o(()=>[i(n,{icon:"mdi-arrow-left",variant:"text",onClick:t[0]||(t[0]=C=>r.$router.back())})]),default:o(()=>[i(g,{class:"text-h6"},{default:o(()=>[...t[1]||(t[1]=[l(" 编辑考试配置 ",-1)])]),_:1}),i(v),i(n,{loading:a.saving,color:"success","prepend-icon":"mdi-content-save",variant:"outlined",onClick:s.save},{default:o(()=>[...t[2]||(t[2]=[l(" 保存 ",-1)])]),_:1},8,["loading","onClick"])]),_:1}),i(p,{class:"py-4",style:{"max-width":"1200px"}},{default:o(()=>[a.id?(m(),d(c,{key:0,ref:"editor","config-id":a.id,onError:s.onError,onSaved:s.onSaved},null,8,["config-id","onError","onSaved"])):x("",!0)]),_:1})]),_:1})}const L=u(E,[["render",V]]);export{L as default}; diff --git a/assets/_id_-Dn7o9q7x.js b/assets/_id_-DjPmieQy.js similarity index 94% rename from assets/_id_-Dn7o9q7x.js rename to assets/_id_-DjPmieQy.js index b5fb1e4..e9b4788 100644 --- a/assets/_id_-Dn7o9q7x.js +++ b/assets/_id_-DjPmieQy.js @@ -1 +1 @@ -import{d as h}from"./dataProvider-DBZnFcYO.js";import{j as i,N as T,n as _,X as d,_ as u,Z as l,Y as p,a1 as o,S as f,k as B,ae as U,F as y,a2 as J,aa as O,$ as b}from"./vendor-vue-28M5UGz3.js";import{m as F,_ as z,h as r,f as I,e as c,c as D,g as k,G as M,d as V,p as R,q as C,t as v,l as N,k as A,r as S}from"./index-CzpSlHRw.js";import{V as E,a as P}from"./VAppBarTitle-C1UGCJHo.js";import{V as x}from"./VTextField-BxdS2D7S.js";import{f as K,u as j,p as q,k as G}from"./vendor-vuetify-95axeNJO.js";import{V as W}from"./VCheckboxBtn-BLxCsxXE.js";import{V as X}from"./VChip-B3whZF-S.js";import{V as Y}from"./VTextarea-zDVNnlPQ.js";import{V as Z}from"./VSwitch-DcxT6NgQ.js";import{V as H}from"./VContainer-BIFGURze.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";const Q=q({start:Boolean,end:Boolean,...G(),...F()},"VListItemAction"),$=K()({name:"VListItemAction",props:Q(),setup(t,e){let{slots:n}=e;return j(()=>i(t.tag,{class:_(["v-list-item-action",{"v-list-item-action--start":t.start,"v-list-item-action--end":t.end},t.class]),style:T(t.style)},n)),{}}}),ee={data(){return{listId:null,list:null,items:[],originalItems:[],newItemName:"",sortSeed:"1",sortType:"default",isRandomSorted:!1,deleteDialog:{show:!1,title:"",text:"",itemId:null,action:null},isRenaming:!1,newListName:"",itemDialog:{show:!1,item:null,isEditing:!1,editedItem:null}}},computed:{sortedItems(){return this.sortType==="completed"?[...this.items].sort((t,e)=>t.completed===e.completed?0:t.completed?1:-1):this.items},hasCompletedItems(){return this.items.some(t=>t.completed)}},async created(){this.listId=this.$route.params.id,await Promise.all([this.loadListInfo(),this.loadItems()])},methods:{async loadListInfo(){try{const t=await h.loadData("classworks-list-info");t&&Array.isArray(t)&&(this.list=t.find(e=>e.id===this.listId)),this.list||this.$router.push("/list")}catch(t){console.error("Failed to load list info",t),this.$router.push("/list")}},startRenaming(){this.list&&(this.newListName=this.list.name,this.isRenaming=!0)},cancelRenaming(){this.isRenaming=!1,this.newListName=""},async saveListName(){if(this.newListName.trim())try{const t=await h.loadData("classworks-list-info");if(t&&Array.isArray(t)){const e=t.findIndex(n=>n.id===this.listId);e!==-1&&(t[e].name=this.newListName.trim(),await h.saveData("classworks-list-info",t),this.list.name=this.newListName.trim())}this.isRenaming=!1}catch(t){console.error("Failed to update list name",t)}},async loadItems(){try{let t=await h.loadData(`classworks-list-${this.listId}`);(!t||!Array.isArray(t))&&(t=[],await h.saveData(`classworks-list-${this.listId}`,t)),this.items=t.map(e=>typeof e.completed>"u"?{id:e.id||Date.now()+Math.floor(Math.random()*1e3),name:e.name,completed:!1,description:e.description||""}:{...e,description:e.description||""}),this.originalItems=JSON.parse(JSON.stringify(this.items))}catch(t){console.error("Failed to load items",t),this.items=[],this.originalItems=[]}},async addItem(){if(!this.newItemName)return;const t={id:Date.now().toString(),name:this.newItemName,completed:!1,description:""};this.items.push(t),this.originalItems.push(JSON.parse(JSON.stringify(t))),await this.saveItems(),this.newItemName=""},openItemDetails(t){this.itemDialog={show:!0,item:t,isEditing:!1,editedItem:null}},startEditingItem(){this.itemDialog.item&&(this.itemDialog.isEditing=!0,this.itemDialog.editedItem=JSON.parse(JSON.stringify(this.itemDialog.item)))},cancelEditingItem(){this.itemDialog.isEditing=!1,this.itemDialog.editedItem=null},async saveItemChanges(){if(!this.itemDialog.editedItem)return;const t=this.items.findIndex(e=>e.id===this.itemDialog.item.id);if(t!==-1){this.items[t]={...this.itemDialog.editedItem};const e=this.originalItems.findIndex(n=>n.id===this.itemDialog.item.id);e!==-1&&(this.originalItems[e]=JSON.parse(JSON.stringify(this.items[t]))),await this.saveItems(),this.itemDialog.item=this.items[t],this.itemDialog.isEditing=!1,this.itemDialog.editedItem=null}},confirmDeleteItem(t){var n;const e=this.items.find(g=>g.id===t);e&&(this.deleteDialog={show:!0,title:"删除确认",text:`确定要删除 "${e.name}" 吗?`,itemId:t,action:"deleteItem"},this.itemDialog.show&&((n=this.itemDialog.item)==null?void 0:n.id)===t&&(this.itemDialog.show=!1))},confirmDeleteCompleted(){const t=this.items.filter(e=>e.completed).length;this.deleteDialog={show:!0,title:"删除已完成项目",text:`确定要删除所有已完成的项目吗?(共 ${t} 项)`,action:"deleteCompleted"}},confirmDelete(){this.deleteDialog.action==="deleteItem"&&this.deleteDialog.itemId?this.deleteItem(this.deleteDialog.itemId):this.deleteDialog.action==="deleteCompleted"&&this.deleteCompletedItems(),this.deleteDialog.show=!1},async deleteItem(t){this.items=this.items.filter(e=>e.id!==t),this.originalItems=this.originalItems.filter(e=>e.id!==t),await this.saveItems()},async deleteCompletedItems(){this.items=this.items.filter(t=>!t.completed),this.originalItems=this.originalItems.filter(t=>!t.completed),await this.saveItems()},async updateItemStatus(t,e){const n=this.items.find(g=>g.id===t);if(n){n.completed=e;const g=this.originalItems.find(s=>s.id===t);g&&(g.completed=e),await this.saveItems()}},async saveItems(){try{await h.saveData(`classworks-list-${this.listId}`,this.items)}catch(t){console.error("Failed to save items",t)}},randomSort(){const t=this.items.map(e=>{const n=this.hashCode(e.id+this.sortSeed);return{...e,randomValue:this.seededRandom(n)}});t.sort((e,n)=>e.randomValue-n.randomValue),this.items=t.map(e=>{const n={...e};return delete n.randomValue,n}),this.isRandomSorted=!0,this.saveItems()},resetSort(){this.items=JSON.parse(JSON.stringify(this.originalItems)),this.isRandomSorted=!1,this.saveItems()},hashCode(t){let e=0;for(let n=0;n[i(r,{icon:"mdi-arrow-left",variant:"text",onClick:e[0]||(e[0]=a=>t.$router.push("/"))})]),default:l(()=>[s.list&&!s.isRenaming?(d(),p(E,{key:0,class:"text-h6"},{default:l(()=>[o(f(s.list.name),1)]),_:1})):(d(),p(E,{key:1,class:"text-h6"},{default:l(()=>[...e[14]||(e[14]=[o(" 列表 ",-1)])]),_:1}))]),_:1}),i(H,null,{default:l(()=>[B("div",te,[i(r,{border:"",class:"mr-2",icon:"",to:"/list"},{default:l(()=>[i(I,null,{default:l(()=>[...e[15]||(e[15]=[o("mdi-arrow-left",-1)])]),_:1})]),_:1}),s.list&&!s.isRenaming?(d(),u("h1",ie,[o(f(s.list.name)+" ",1),i(r,{border:"",icon:"",size:"small",onClick:m.startRenaming},{default:l(()=>[i(I,null,{default:l(()=>[...e[16]||(e[16]=[o("mdi-pencil",-1)])]),_:1})]),_:1},8,["onClick"])])):s.list&&s.isRenaming?(d(),u("div",le,[i(x,{modelValue:s.newListName,"onUpdate:modelValue":e[1]||(e[1]=a=>s.newListName=a),autofocus:"",class:"mr-2",density:"compact","hide-details":"",label:"列表名称",style:{"min-width":"200px"},onKeyup:U(m.saveListName,["enter"])},null,8,["modelValue","onKeyup"]),i(r,{class:"mr-2",color:"primary",size:"small",onClick:m.saveListName},{default:l(()=>[i(I,null,{default:l(()=>[...e[17]||(e[17]=[o("mdi-check",-1)])]),_:1})]),_:1},8,["onClick"]),i(r,{color:"error",size:"small",onClick:m.cancelRenaming},{default:l(()=>[i(I,null,{default:l(()=>[...e[18]||(e[18]=[o("mdi-close",-1)])]),_:1})]),_:1},8,["onClick"])])):(d(),u("h1",se," 加载中... "))]),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,{class:"d-flex align-center"},{default:l(()=>[e[21]||(e[21]=o(" 项目列表 ",-1)),i(k),i(M,{modelValue:s.sortType,"onUpdate:modelValue":e[2]||(e[2]=a=>s.sortType=a),mandatory:""},{default:l(()=>[i(r,{value:"default"},{default:l(()=>[i(I,null,{default:l(()=>[...e[19]||(e[19]=[o("mdi-sort-alphabetical-ascending",-1)])]),_:1})]),_:1}),i(r,{value:"completed"},{default:l(()=>[i(I,null,{default:l(()=>[...e[20]||(e[20]=[o("mdi-check-circle-outline",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.sortedItems.length===0?(d(),p(V,{key:0},{default:l(()=>[...e[22]||(e[22]=[o(" 暂无项目,请添加新项目 ",-1)])]),_:1})):(d(),p(R,{key:1,"select-strategy":"leaf"},{default:l(()=>[(d(!0),u(y,null,J(m.sortedItems,(a,w)=>(d(),p(C,{key:a.id,class:_({"text-decoration-line-through":a.completed}),onClick:L=>m.openItemDetails(a)},{prepend:l(()=>[i($,{start:""},{default:l(()=>[i(W,{"model-value":a.completed,"onUpdate:modelValue":L=>m.updateItemStatus(a.id,L),onClick:e[3]||(e[3]=O(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]),append:l(()=>[o(f(w+1),1)]),default:l(()=>[o(" "+f(a.name)+" ",1),i(v,null,{default:l(()=>[o(f(a.description),1)]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1})),m.sortedItems.length>0?(d(),p(N,{key:2},{default:l(()=>[i(k),i(r,{disabled:!m.hasCompletedItems,color:"error","prepend-icon":"mdi-delete-sweep",onClick:m.confirmDeleteCompleted},{default:l(()=>[...e[23]||(e[23]=[o(" 删除已完成项目 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})):b("",!0)]),_:1}),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[...e[24]||(e[24]=[o("添加新项目",-1)])]),_:1}),i(V,null,{default:l(()=>[i(x,{modelValue:s.newItemName,"onUpdate:modelValue":e[4]||(e[4]=a=>s.newItemName=a),rules:[a=>!!a||"名称不能为空"],label:"项目名称"},null,8,["modelValue","rules"]),i(r,{disabled:!s.newItemName,color:"primary",onClick:m.addItem},{default:l(()=>[...e[25]||(e[25]=[o(" 添加 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[...e[26]||(e[26]=[o("列表排序",-1)])]),_:1}),i(V,null,{default:l(()=>[i(x,{modelValue:s.sortSeed,"onUpdate:modelValue":e[5]||(e[5]=a=>s.sortSeed=a),class:"mb-3",hint:"输入相同的种子值可以得到相同的排序结果",label:"排序种子 (任意数字或文本)","persistent-hint":""},null,8,["modelValue"]),i(r,{class:"mr-2",color:"primary",onClick:m.randomSort},{default:l(()=>[...e[27]||(e[27]=[o(" 随机排序 ",-1)])]),_:1},8,["onClick"]),i(r,{variant:"text",onClick:m.resetSort},{default:l(()=>[...e[28]||(e[28]=[o(" 撤销 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1}),i(A,{modelValue:s.deleteDialog.show,"onUpdate:modelValue":e[7]||(e[7]=a=>s.deleteDialog.show=a),"max-width":"500"},{default:l(()=>[i(c,{border:"",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[o(f(s.deleteDialog.title),1)]),_:1}),i(V,null,{default:l(()=>[o(f(s.deleteDialog.text),1)]),_:1}),i(N,null,{default:l(()=>[i(k),i(r,{color:"primary",variant:"text",onClick:e[6]||(e[6]=a=>s.deleteDialog.show=!1)},{default:l(()=>[...e[29]||(e[29]=[o(" 取消 ",-1)])]),_:1}),i(r,{color:"error",variant:"text",onClick:m.confirmDelete},{default:l(()=>[...e[30]||(e[30]=[o(" 确认删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),i(A,{modelValue:s.itemDialog.show,"onUpdate:modelValue":e[13]||(e[13]=a=>s.itemDialog.show=a),"max-width":"600"},{default:l(()=>[i(c,{border:"",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[s.itemDialog.isEditing?(d(),u("span",ae,"编辑项目")):(d(),u("span",oe,"项目详情"))]),_:1}),i(V,null,{default:l(()=>[!s.itemDialog.isEditing&&s.itemDialog.item?(d(),u("div",ne,[i(R,null,{default:l(()=>[i(C,null,{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[o(f(s.itemDialog.item.name),1)]),_:1}),i(v,null,{default:l(()=>[o(f(s.itemDialog.item.id),1)]),_:1})]),_:1}),i(C,null,{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[...e[31]||(e[31]=[o(" 状态 ",-1)])]),_:1}),i(v,null,{default:l(()=>[i(X,{color:s.itemDialog.item.completed?"success":"warning",size:"small"},{default:l(()=>[o(f(s.itemDialog.item.completed?"已完成":"未完成"),1)]),_:1},8,["color"])]),_:1})]),_:1}),s.itemDialog.item.description?(d(),p(C,{key:0},{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[...e[32]||(e[32]=[o(" 描述 ",-1)])]),_:1}),i(v,null,{default:l(()=>[o(f(s.itemDialog.item.description),1)]),_:1})]),_:1})):b("",!0)]),_:1})])):s.itemDialog.isEditing&&s.itemDialog.item?(d(),u("div",me,[i(x,{modelValue:s.itemDialog.editedItem.name,"onUpdate:modelValue":e[8]||(e[8]=a=>s.itemDialog.editedItem.name=a),class:"mb-3",label:"名称",variant:"outlined"},null,8,["modelValue"]),i(Y,{modelValue:s.itemDialog.editedItem.description,"onUpdate:modelValue":e[9]||(e[9]=a=>s.itemDialog.editedItem.description=a),class:"mb-3",label:"描述",rows:"3",variant:"outlined"},null,8,["modelValue"]),i(Z,{modelValue:s.itemDialog.editedItem.completed,"onUpdate:modelValue":e[10]||(e[10]=a=>s.itemDialog.editedItem.completed=a),color:"success","hide-details":"",label:"已完成"},null,8,["modelValue"])])):b("",!0)]),_:1}),i(N,null,{default:l(()=>[i(k),s.itemDialog.isEditing?(d(),u(y,{key:1},[i(r,{color:"success",variant:"text",onClick:m.saveItemChanges},{default:l(()=>[...e[36]||(e[36]=[o(" 保存 ",-1)])]),_:1},8,["onClick"]),i(r,{color:"secondary",variant:"text",onClick:m.cancelEditingItem},{default:l(()=>[...e[37]||(e[37]=[o(" 取消 ",-1)])]),_:1},8,["onClick"])],64)):(d(),u(y,{key:0},[i(r,{color:"primary",variant:"text",onClick:m.startEditingItem},{default:l(()=>[...e[33]||(e[33]=[o(" 编辑 ",-1)])]),_:1},8,["onClick"]),i(r,{color:"error",variant:"text",onClick:e[11]||(e[11]=a=>{var w;return m.confirmDeleteItem((w=s.itemDialog.item)==null?void 0:w.id)})},{default:l(()=>[...e[34]||(e[34]=[o(" 删除 ",-1)])]),_:1}),i(r,{color:"secondary",variant:"text",onClick:e[12]||(e[12]=a=>s.itemDialog.show=!1)},{default:l(()=>[...e[35]||(e[35]=[o(" 关闭 ",-1)])]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const Ce=z(ee,[["render",de]]);export{Ce as default}; +import{d as h}from"./dataProvider-GWPC-0Vt.js";import{j as i,N as T,n as _,X as d,_ as u,Z as l,Y as p,a1 as o,S as f,k as B,ae as U,F as y,a2 as J,aa as O,$ as b}from"./vendor-vue-BiQC5iF7.js";import{m as F,_ as z,h as r,f as I,e as c,c as D,g as k,G as M,d as V,p as R,q as C,t as v,l as N,k as A,r as S}from"./index-DGIAsv4W.js";import{V as E,a as P}from"./VAppBarTitle-DheyIZnb.js";import{V as x}from"./VTextField-BurlcggD.js";import{f as K,u as j,p as q,k as G}from"./vendor-vuetify-DsKlzgKp.js";import{V as W}from"./VCheckboxBtn-BKcSogH0.js";import{V as X}from"./VChip-mRzIPuM0.js";import{V as Y}from"./VTextarea-vGWmTJww.js";import{V as Z}from"./VSwitch-k6hfPfa2.js";import{V as H}from"./VContainer-DZyPrcqa.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";const Q=q({start:Boolean,end:Boolean,...G(),...F()},"VListItemAction"),$=K()({name:"VListItemAction",props:Q(),setup(t,e){let{slots:n}=e;return j(()=>i(t.tag,{class:_(["v-list-item-action",{"v-list-item-action--start":t.start,"v-list-item-action--end":t.end},t.class]),style:T(t.style)},n)),{}}}),ee={data(){return{listId:null,list:null,items:[],originalItems:[],newItemName:"",sortSeed:"1",sortType:"default",isRandomSorted:!1,deleteDialog:{show:!1,title:"",text:"",itemId:null,action:null},isRenaming:!1,newListName:"",itemDialog:{show:!1,item:null,isEditing:!1,editedItem:null}}},computed:{sortedItems(){return this.sortType==="completed"?[...this.items].sort((t,e)=>t.completed===e.completed?0:t.completed?1:-1):this.items},hasCompletedItems(){return this.items.some(t=>t.completed)}},async created(){this.listId=this.$route.params.id,await Promise.all([this.loadListInfo(),this.loadItems()])},methods:{async loadListInfo(){try{const t=await h.loadData("classworks-list-info");t&&Array.isArray(t)&&(this.list=t.find(e=>e.id===this.listId)),this.list||this.$router.push("/list")}catch(t){console.error("Failed to load list info",t),this.$router.push("/list")}},startRenaming(){this.list&&(this.newListName=this.list.name,this.isRenaming=!0)},cancelRenaming(){this.isRenaming=!1,this.newListName=""},async saveListName(){if(this.newListName.trim())try{const t=await h.loadData("classworks-list-info");if(t&&Array.isArray(t)){const e=t.findIndex(n=>n.id===this.listId);e!==-1&&(t[e].name=this.newListName.trim(),await h.saveData("classworks-list-info",t),this.list.name=this.newListName.trim())}this.isRenaming=!1}catch(t){console.error("Failed to update list name",t)}},async loadItems(){try{let t=await h.loadData(`classworks-list-${this.listId}`);(!t||!Array.isArray(t))&&(t=[],await h.saveData(`classworks-list-${this.listId}`,t)),this.items=t.map(e=>typeof e.completed>"u"?{id:e.id||Date.now()+Math.floor(Math.random()*1e3),name:e.name,completed:!1,description:e.description||""}:{...e,description:e.description||""}),this.originalItems=JSON.parse(JSON.stringify(this.items))}catch(t){console.error("Failed to load items",t),this.items=[],this.originalItems=[]}},async addItem(){if(!this.newItemName)return;const t={id:Date.now().toString(),name:this.newItemName,completed:!1,description:""};this.items.push(t),this.originalItems.push(JSON.parse(JSON.stringify(t))),await this.saveItems(),this.newItemName=""},openItemDetails(t){this.itemDialog={show:!0,item:t,isEditing:!1,editedItem:null}},startEditingItem(){this.itemDialog.item&&(this.itemDialog.isEditing=!0,this.itemDialog.editedItem=JSON.parse(JSON.stringify(this.itemDialog.item)))},cancelEditingItem(){this.itemDialog.isEditing=!1,this.itemDialog.editedItem=null},async saveItemChanges(){if(!this.itemDialog.editedItem)return;const t=this.items.findIndex(e=>e.id===this.itemDialog.item.id);if(t!==-1){this.items[t]={...this.itemDialog.editedItem};const e=this.originalItems.findIndex(n=>n.id===this.itemDialog.item.id);e!==-1&&(this.originalItems[e]=JSON.parse(JSON.stringify(this.items[t]))),await this.saveItems(),this.itemDialog.item=this.items[t],this.itemDialog.isEditing=!1,this.itemDialog.editedItem=null}},confirmDeleteItem(t){var n;const e=this.items.find(g=>g.id===t);e&&(this.deleteDialog={show:!0,title:"删除确认",text:`确定要删除 "${e.name}" 吗?`,itemId:t,action:"deleteItem"},this.itemDialog.show&&((n=this.itemDialog.item)==null?void 0:n.id)===t&&(this.itemDialog.show=!1))},confirmDeleteCompleted(){const t=this.items.filter(e=>e.completed).length;this.deleteDialog={show:!0,title:"删除已完成项目",text:`确定要删除所有已完成的项目吗?(共 ${t} 项)`,action:"deleteCompleted"}},confirmDelete(){this.deleteDialog.action==="deleteItem"&&this.deleteDialog.itemId?this.deleteItem(this.deleteDialog.itemId):this.deleteDialog.action==="deleteCompleted"&&this.deleteCompletedItems(),this.deleteDialog.show=!1},async deleteItem(t){this.items=this.items.filter(e=>e.id!==t),this.originalItems=this.originalItems.filter(e=>e.id!==t),await this.saveItems()},async deleteCompletedItems(){this.items=this.items.filter(t=>!t.completed),this.originalItems=this.originalItems.filter(t=>!t.completed),await this.saveItems()},async updateItemStatus(t,e){const n=this.items.find(g=>g.id===t);if(n){n.completed=e;const g=this.originalItems.find(s=>s.id===t);g&&(g.completed=e),await this.saveItems()}},async saveItems(){try{await h.saveData(`classworks-list-${this.listId}`,this.items)}catch(t){console.error("Failed to save items",t)}},randomSort(){const t=this.items.map(e=>{const n=this.hashCode(e.id+this.sortSeed);return{...e,randomValue:this.seededRandom(n)}});t.sort((e,n)=>e.randomValue-n.randomValue),this.items=t.map(e=>{const n={...e};return delete n.randomValue,n}),this.isRandomSorted=!0,this.saveItems()},resetSort(){this.items=JSON.parse(JSON.stringify(this.originalItems)),this.isRandomSorted=!1,this.saveItems()},hashCode(t){let e=0;for(let n=0;n[i(r,{icon:"mdi-arrow-left",variant:"text",onClick:e[0]||(e[0]=a=>t.$router.push("/"))})]),default:l(()=>[s.list&&!s.isRenaming?(d(),p(E,{key:0,class:"text-h6"},{default:l(()=>[o(f(s.list.name),1)]),_:1})):(d(),p(E,{key:1,class:"text-h6"},{default:l(()=>[...e[14]||(e[14]=[o(" 列表 ",-1)])]),_:1}))]),_:1}),i(H,null,{default:l(()=>[B("div",te,[i(r,{border:"",class:"mr-2",icon:"",to:"/list"},{default:l(()=>[i(I,null,{default:l(()=>[...e[15]||(e[15]=[o("mdi-arrow-left",-1)])]),_:1})]),_:1}),s.list&&!s.isRenaming?(d(),u("h1",ie,[o(f(s.list.name)+" ",1),i(r,{border:"",icon:"",size:"small",onClick:m.startRenaming},{default:l(()=>[i(I,null,{default:l(()=>[...e[16]||(e[16]=[o("mdi-pencil",-1)])]),_:1})]),_:1},8,["onClick"])])):s.list&&s.isRenaming?(d(),u("div",le,[i(x,{modelValue:s.newListName,"onUpdate:modelValue":e[1]||(e[1]=a=>s.newListName=a),autofocus:"",class:"mr-2",density:"compact","hide-details":"",label:"列表名称",style:{"min-width":"200px"},onKeyup:U(m.saveListName,["enter"])},null,8,["modelValue","onKeyup"]),i(r,{class:"mr-2",color:"primary",size:"small",onClick:m.saveListName},{default:l(()=>[i(I,null,{default:l(()=>[...e[17]||(e[17]=[o("mdi-check",-1)])]),_:1})]),_:1},8,["onClick"]),i(r,{color:"error",size:"small",onClick:m.cancelRenaming},{default:l(()=>[i(I,null,{default:l(()=>[...e[18]||(e[18]=[o("mdi-close",-1)])]),_:1})]),_:1},8,["onClick"])])):(d(),u("h1",se," 加载中... "))]),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,{class:"d-flex align-center"},{default:l(()=>[e[21]||(e[21]=o(" 项目列表 ",-1)),i(k),i(M,{modelValue:s.sortType,"onUpdate:modelValue":e[2]||(e[2]=a=>s.sortType=a),mandatory:""},{default:l(()=>[i(r,{value:"default"},{default:l(()=>[i(I,null,{default:l(()=>[...e[19]||(e[19]=[o("mdi-sort-alphabetical-ascending",-1)])]),_:1})]),_:1}),i(r,{value:"completed"},{default:l(()=>[i(I,null,{default:l(()=>[...e[20]||(e[20]=[o("mdi-check-circle-outline",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.sortedItems.length===0?(d(),p(V,{key:0},{default:l(()=>[...e[22]||(e[22]=[o(" 暂无项目,请添加新项目 ",-1)])]),_:1})):(d(),p(R,{key:1,"select-strategy":"leaf"},{default:l(()=>[(d(!0),u(y,null,J(m.sortedItems,(a,w)=>(d(),p(C,{key:a.id,class:_({"text-decoration-line-through":a.completed}),onClick:L=>m.openItemDetails(a)},{prepend:l(()=>[i($,{start:""},{default:l(()=>[i(W,{"model-value":a.completed,"onUpdate:modelValue":L=>m.updateItemStatus(a.id,L),onClick:e[3]||(e[3]=O(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]),append:l(()=>[o(f(w+1),1)]),default:l(()=>[o(" "+f(a.name)+" ",1),i(v,null,{default:l(()=>[o(f(a.description),1)]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1})),m.sortedItems.length>0?(d(),p(N,{key:2},{default:l(()=>[i(k),i(r,{disabled:!m.hasCompletedItems,color:"error","prepend-icon":"mdi-delete-sweep",onClick:m.confirmDeleteCompleted},{default:l(()=>[...e[23]||(e[23]=[o(" 删除已完成项目 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})):b("",!0)]),_:1}),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[...e[24]||(e[24]=[o("添加新项目",-1)])]),_:1}),i(V,null,{default:l(()=>[i(x,{modelValue:s.newItemName,"onUpdate:modelValue":e[4]||(e[4]=a=>s.newItemName=a),rules:[a=>!!a||"名称不能为空"],label:"项目名称"},null,8,["modelValue","rules"]),i(r,{disabled:!s.newItemName,color:"primary",onClick:m.addItem},{default:l(()=>[...e[25]||(e[25]=[o(" 添加 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),i(c,{border:"",class:"mb-5",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[...e[26]||(e[26]=[o("列表排序",-1)])]),_:1}),i(V,null,{default:l(()=>[i(x,{modelValue:s.sortSeed,"onUpdate:modelValue":e[5]||(e[5]=a=>s.sortSeed=a),class:"mb-3",hint:"输入相同的种子值可以得到相同的排序结果",label:"排序种子 (任意数字或文本)","persistent-hint":""},null,8,["modelValue"]),i(r,{class:"mr-2",color:"primary",onClick:m.randomSort},{default:l(()=>[...e[27]||(e[27]=[o(" 随机排序 ",-1)])]),_:1},8,["onClick"]),i(r,{variant:"text",onClick:m.resetSort},{default:l(()=>[...e[28]||(e[28]=[o(" 撤销 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1}),i(A,{modelValue:s.deleteDialog.show,"onUpdate:modelValue":e[7]||(e[7]=a=>s.deleteDialog.show=a),"max-width":"500"},{default:l(()=>[i(c,{border:"",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[o(f(s.deleteDialog.title),1)]),_:1}),i(V,null,{default:l(()=>[o(f(s.deleteDialog.text),1)]),_:1}),i(N,null,{default:l(()=>[i(k),i(r,{color:"primary",variant:"text",onClick:e[6]||(e[6]=a=>s.deleteDialog.show=!1)},{default:l(()=>[...e[29]||(e[29]=[o(" 取消 ",-1)])]),_:1}),i(r,{color:"error",variant:"text",onClick:m.confirmDelete},{default:l(()=>[...e[30]||(e[30]=[o(" 确认删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),i(A,{modelValue:s.itemDialog.show,"onUpdate:modelValue":e[13]||(e[13]=a=>s.itemDialog.show=a),"max-width":"600"},{default:l(()=>[i(c,{border:"",rounded:"xl"},{default:l(()=>[i(D,null,{default:l(()=>[s.itemDialog.isEditing?(d(),u("span",ae,"编辑项目")):(d(),u("span",oe,"项目详情"))]),_:1}),i(V,null,{default:l(()=>[!s.itemDialog.isEditing&&s.itemDialog.item?(d(),u("div",ne,[i(R,null,{default:l(()=>[i(C,null,{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[o(f(s.itemDialog.item.name),1)]),_:1}),i(v,null,{default:l(()=>[o(f(s.itemDialog.item.id),1)]),_:1})]),_:1}),i(C,null,{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[...e[31]||(e[31]=[o(" 状态 ",-1)])]),_:1}),i(v,null,{default:l(()=>[i(X,{color:s.itemDialog.item.completed?"success":"warning",size:"small"},{default:l(()=>[o(f(s.itemDialog.item.completed?"已完成":"未完成"),1)]),_:1},8,["color"])]),_:1})]),_:1}),s.itemDialog.item.description?(d(),p(C,{key:0},{default:l(()=>[i(S,{class:"text-subtitle-1 font-weight-bold"},{default:l(()=>[...e[32]||(e[32]=[o(" 描述 ",-1)])]),_:1}),i(v,null,{default:l(()=>[o(f(s.itemDialog.item.description),1)]),_:1})]),_:1})):b("",!0)]),_:1})])):s.itemDialog.isEditing&&s.itemDialog.item?(d(),u("div",me,[i(x,{modelValue:s.itemDialog.editedItem.name,"onUpdate:modelValue":e[8]||(e[8]=a=>s.itemDialog.editedItem.name=a),class:"mb-3",label:"名称",variant:"outlined"},null,8,["modelValue"]),i(Y,{modelValue:s.itemDialog.editedItem.description,"onUpdate:modelValue":e[9]||(e[9]=a=>s.itemDialog.editedItem.description=a),class:"mb-3",label:"描述",rows:"3",variant:"outlined"},null,8,["modelValue"]),i(Z,{modelValue:s.itemDialog.editedItem.completed,"onUpdate:modelValue":e[10]||(e[10]=a=>s.itemDialog.editedItem.completed=a),color:"success","hide-details":"",label:"已完成"},null,8,["modelValue"])])):b("",!0)]),_:1}),i(N,null,{default:l(()=>[i(k),s.itemDialog.isEditing?(d(),u(y,{key:1},[i(r,{color:"success",variant:"text",onClick:m.saveItemChanges},{default:l(()=>[...e[36]||(e[36]=[o(" 保存 ",-1)])]),_:1},8,["onClick"]),i(r,{color:"secondary",variant:"text",onClick:m.cancelEditingItem},{default:l(()=>[...e[37]||(e[37]=[o(" 取消 ",-1)])]),_:1},8,["onClick"])],64)):(d(),u(y,{key:0},[i(r,{color:"primary",variant:"text",onClick:m.startEditingItem},{default:l(()=>[...e[33]||(e[33]=[o(" 编辑 ",-1)])]),_:1},8,["onClick"]),i(r,{color:"error",variant:"text",onClick:e[11]||(e[11]=a=>{var w;return m.confirmDeleteItem((w=s.itemDialog.item)==null?void 0:w.id)})},{default:l(()=>[...e[34]||(e[34]=[o(" 删除 ",-1)])]),_:1}),i(r,{color:"secondary",variant:"text",onClick:e[12]||(e[12]=a=>s.itemDialog.show=!1)},{default:l(()=>[...e[35]||(e[35]=[o(" 关闭 ",-1)])]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const Ce=z(ee,[["render",de]]);export{Ce as default}; diff --git a/assets/authorize-BU2NVavn.js b/assets/authorize-CZL9tEmI.js similarity index 84% rename from assets/authorize-BU2NVavn.js rename to assets/authorize-CZL9tEmI.js index 8c3835e..41154d0 100644 --- a/assets/authorize-BU2NVavn.js +++ b/assets/authorize-CZL9tEmI.js @@ -1 +1 @@ -import{ab as V,ac as g,D as _,X as u,Y as l,Z as e,j as a,a1 as c,S as i,$ as d,k,b as m}from"./vendor-vue-28M5UGz3.js";import{s as p,n as y,e as C,c as h,d as x,j as S,l as T,g as B,h as N}from"./index-CzpSlHRw.js";import{V as b,a as j}from"./VRow-sd4d6eNi.js";import{V as R}from"./VContainer-BIFGURze.js";import"./vendor-vuetify-95axeNJO.js";const H={__name:"authorize",setup(w){const f=V(),n=g(),s=m("processing"),r=m("正在验证授权信息...");_(async()=>{try{const t=f.query.token;if(!t){s.value="error",r.value="未获取到授权令牌";return}p("server.kvToken",t);const o=y("device.uuid");o&&o!=="00000000-0000-4000-8000-000000000000"?(p("device.uuid","00000000-0000-4000-8000-000000000000"),r.value="授权成功!已完成数据迁移。"):r.value="授权成功!",s.value="success",n.push("/")}catch(t){console.error("授权处理失败:",t),s.value="error",r.value=`授权失败: ${t.message}`}});const v=()=>{n.push("/")};return(t,o)=>(u(),l(R,{class:"fill-height",fluid:""},{default:e(()=>[a(b,{align:"center",justify:"center"},{default:e(()=>[a(j,{cols:"12",md:"6",sm:"8"},{default:e(()=>[a(C,null,{default:e(()=>[a(h,{class:"text-h5"},{default:e(()=>[c(i(s.value==="processing"?"正在处理授权...":s.value==="success"?"授权成功":"授权失败"),1)]),_:1}),a(x,null,{default:e(()=>[s.value==="processing"?(u(),l(S,{key:0,class:"mb-4",color:"primary",indeterminate:""})):d("",!0),k("p",null,i(r.value),1)]),_:1}),s.value!=="processing"?(u(),l(T,{key:0},{default:e(()=>[a(B),a(N,{color:"primary",onClick:v},{default:e(()=>[...o[0]||(o[0]=[c(" 返回首页 ",-1)])]),_:1})]),_:1})):d("",!0)]),_:1})]),_:1})]),_:1})]),_:1}))}};export{H as default}; +import{ab as V,ac as g,D as _,X as u,Y as l,Z as e,j as a,a1 as c,S as i,$ as d,k,b as m}from"./vendor-vue-BiQC5iF7.js";import{s as p,n as y,e as C,c as h,d as x,j as S,l as T,g as B,h as N}from"./index-DGIAsv4W.js";import{V as b,a as j}from"./VRow-Cjhiymuu.js";import{V as R}from"./VContainer-DZyPrcqa.js";import"./vendor-vuetify-DsKlzgKp.js";const H={__name:"authorize",setup(w){const f=V(),n=g(),s=m("processing"),r=m("正在验证授权信息...");_(async()=>{try{const t=f.query.token;if(!t){s.value="error",r.value="未获取到授权令牌";return}p("server.kvToken",t);const o=y("device.uuid");o&&o!=="00000000-0000-4000-8000-000000000000"?(p("device.uuid","00000000-0000-4000-8000-000000000000"),r.value="授权成功!已完成数据迁移。"):r.value="授权成功!",s.value="success",n.push("/")}catch(t){console.error("授权处理失败:",t),s.value="error",r.value=`授权失败: ${t.message}`}});const v=()=>{n.push("/")};return(t,o)=>(u(),l(R,{class:"fill-height",fluid:""},{default:e(()=>[a(b,{align:"center",justify:"center"},{default:e(()=>[a(j,{cols:"12",md:"6",sm:"8"},{default:e(()=>[a(C,null,{default:e(()=>[a(h,{class:"text-h5"},{default:e(()=>[c(i(s.value==="processing"?"正在处理授权...":s.value==="success"?"授权成功":"授权失败"),1)]),_:1}),a(x,null,{default:e(()=>[s.value==="processing"?(u(),l(S,{key:0,class:"mb-4",color:"primary",indeterminate:""})):d("",!0),k("p",null,i(r.value),1)]),_:1}),s.value!=="processing"?(u(),l(T,{key:0},{default:e(()=>[a(B),a(N,{color:"primary",onClick:v},{default:e(()=>[...o[0]||(o[0]=[c(" 返回首页 ",-1)])]),_:1})]),_:1})):d("",!0)]),_:1})]),_:1})]),_:1})]),_:1}))}};export{H as default}; diff --git a/assets/cses2wakeup-CJGIn7lz.js b/assets/cses2wakeup-DRhHxOpY.js similarity index 97% rename from assets/cses2wakeup-CJGIn7lz.js rename to assets/cses2wakeup-DRhHxOpY.js index e02e088..5758328 100644 --- a/assets/cses2wakeup-CJGIn7lz.js +++ b/assets/cses2wakeup-DRhHxOpY.js @@ -1,4 +1,4 @@ -import{E as Oe,_ as Ye,e as L,c as G,f as D,F as He,d as O,G as Je,h as A,l as qe,g as Ge}from"./index-CzpSlHRw.js";import{V as ie,a as M}from"./VRow-sd4d6eNi.js";import{V as I}from"./VAlert-DaoJAibO.js";import{V as oe,a as Z}from"./VTabs-DxZkDLgQ.js";import{a as K,V as ne}from"./VTooltip-C8vChj8G.js";import{c as de,d as X,b as Ze}from"./VTable-D9zIyrqQ.js";import{V as Ke}from"./VTextarea-zDVNnlPQ.js";import{u as Xe,a as ue,b as ce,c as Qe,m as $e,d as et,V as tt}from"./VTextField-BxdS2D7S.js";import{p as ye,f as st,an as lt,n as rt,w as be,u as at,ao as it,ap as ot,aq as me,a5 as nt}from"./vendor-vuetify-95axeNJO.js";import{e as N,o as dt,j as o,k as p,F as T,m as z,n as ut,b as Q,t as ct,I as mt,s as ft,X as m,Y as v,Z as i,a1 as c,S as y,$ as k,_ as b,a2 as C,ad as pt}from"./vendor-vue-28M5UGz3.js";import{V as j,a as ht}from"./VChip-B3whZF-S.js";import{V as fe}from"./VSwitch-DcxT6NgQ.js";import{V as yt}from"./VSkeletonLoader-Bqlz0ln3.js";import{V as bt}from"./VDataTable-Bg4qcCRf.js";import{V as gt}from"./VCheckbox-tGn5q60R.js";import{V as kt}from"./VContainer-BIFGURze.js";import"./VPagination-CwVL3tMR.js";import"./VSelect-DZBjiB3J.js";import"./VSheet-ZjkOR-Oc.js";import"./VCheckboxBtn-BLxCsxXE.js";function vt(){function s(n){var t,r;return[...((t=n.dataTransfer)==null?void 0:t.items)??[]].filter(l=>l.kind==="file").map(l=>l.webkitGetAsEntry()).filter(Boolean).length>0||[...((r=n.dataTransfer)==null?void 0:r.files)??[]].length>0}async function e(n){var r,l;const a=[],t=[...((r=n.dataTransfer)==null?void 0:r.items)??[]].filter(d=>d.kind==="file").map(d=>d.webkitGetAsEntry()).filter(Boolean);if(t.length)for(const d of t){const f=await ge(d,ke(".",d));a.push(...f.map(h=>h.file))}else a.push(...((l=n.dataTransfer)==null?void 0:l.files)??[]);return a}return{handleDrop:e,hasFilesOrFolders:s}}function ge(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Promise((n,a)=>{s.isFile?s.file(r=>n([{file:r,path:e}]),a):s.isDirectory&&s.createReader().readEntries(async r=>{const l=[];for(const d of r)l.push(...await ge(d,ke(e,d)));n(l)})})}function ke(s,e){return e.isDirectory?`${s}/${e.name}`:s}const Tt=ye({filterByType:String},"file-accept");function wt(s){const e=N(()=>s.filterByType?Dt(s.filterByType):null);function n(a){if(e.value){const t=a.filter(e.value);return{accepted:t,rejected:a.filter(r=>!t.includes(r))}}return{accepted:a,rejected:[]}}return{filterAccepted:n}}function Dt(s){const e=s.split(",").map(r=>r.trim().toLowerCase()),n=e.filter(r=>r.startsWith(".")),a=e.filter(r=>r.endsWith("/*")),t=e.filter(r=>!n.includes(r)&&!a.includes(r));return r=>{var f,h;const l=((f=r.name.split(".").at(-1))==null?void 0:f.toLowerCase())??"",d=((h=r.type.split("/").at(0))==null?void 0:h.toLowerCase())??"";return t.includes(r.type)||n.includes(`.${l}`)||a.includes(`${d}/*`)}}const xt=ye({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:s=>typeof s=="boolean"||[1e3,1024].includes(Number(s))},truncateLength:{type:[Number,String],default:22},...nt(et({prependIcon:"$file"}),["direction"]),modelValue:{type:[Array,Object],default:s=>s.multiple?[]:null,validator:s=>be(s).every(e=>e!=null&&typeof e=="object")},...Tt(),...$e({clearable:!0})},"VFileInput"),Vt=st()({name:"VFileInput",inheritAttrs:!1,props:xt(),emits:{"click:control":s=>!0,"mousedown:control":s=>!0,"update:focused":s=>!0,"update:modelValue":s=>!0,rejected:s=>!0},setup(s,e){let{attrs:n,emit:a,slots:t}=e;const{t:r}=lt(),{filterAccepted:l}=wt(s),d=rt(s,"modelValue",s.modelValue,u=>be(u),u=>!s.multiple&&Array.isArray(u)?u[0]:u),{isFocused:f,focus:h,blur:w}=Xe(s),x=N(()=>typeof s.showSize!="boolean"?s.showSize:void 0),W=N(()=>(d.value??[]).reduce((u,g)=>{let{size:E=0}=g;return u+E},0)),P=N(()=>me(W.value,x.value)),S=N(()=>(d.value??[]).map(u=>{const{name:g="",size:E=0}=u,F=je(g);return s.showSize?`${F} (${me(E,x.value)})`:F})),ve=N(()=>{var g;const u=((g=d.value)==null?void 0:g.length)??0;return s.showSize?r(s.counterSizeString,u,P.value):r(s.counterString,u)}),$=Q(),ee=Q(),V=Q(),Te=ct(()=>f.value||s.active),te=N(()=>["plain","underlined"].includes(s.variant)),_=ft(!1),{handleDrop:we,hasFilesOrFolders:De}=vt();function Y(){var u;V.value!==document.activeElement&&((u=V.value)==null||u.focus()),f.value||h()}function xe(u){var g;(g=V.value)==null||g.click()}function Ve(u){a("mousedown:control",u)}function Ce(u){var g;(g=V.value)==null||g.click(),a("click:control",u)}function Se(u){u.stopPropagation(),Y(),mt(()=>{d.value=[],ot(s["onClick:clear"],u)})}function je(u){if(u.length{(!Array.isArray(u)||!u.length)&&V.value&&(V.value.value="")}),at(()=>{const u=!!(t.counter||s.counter),g=!!(u||t.details),[E,F]=it(n),{modelValue:H,...J}=ue.filterProps(s),Re={...ce.filterProps(s),"onClick:clear":Se},Ne=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,Le=n.accept?String(n.accept):void 0,Me=Ne?void 0:s.filterByType??Le;return o(ue,z({ref:$,modelValue:s.multiple?d.value:d.value[0],class:["v-file-input",{"v-file-input--chips":!!s.chips,"v-file-input--dragging":_.value,"v-file-input--hide":s.hideInput,"v-input--plain-underlined":te.value},s.class],style:s.style,"onClick:prepend":xe},E,J,{centerAffix:!te.value,focused:f.value}),{...t,default:q=>{let{id:U,isDisabled:B,isDirty:le,isReadonly:re,isValid:We,hasDetails:Be}=q;return o(ce,z({ref:ee,prependIcon:s.prependIcon,onMousedown:Ve,onClick:Ce,"onClick:prependInner":s["onClick:prependInner"],"onClick:appendInner":s["onClick:appendInner"]},Re,{id:U.value,active:Te.value||le.value,dirty:le.value||s.dirty,disabled:B.value,focused:f.value,details:Be.value,error:We.value===!1,onDragover:Ae,onDrop:Ee}),{...t,default:Ie=>{var ae;let{props:{class:ze,..._e},controlRef:Ue}=Ie;return p(T,null,[p("input",z({ref:R=>V.value=Ue.value=R,type:"file",accept:Me,readonly:re.value,disabled:B.value,multiple:s.multiple,name:s.name,onClick:R=>{R.stopPropagation(),re.value&&R.preventDefault(),Y()},onChange:Fe,onDragleave:Pe,onFocus:Y,onBlur:w},_e,F),null),p("div",{class:ut(ze)},[!!((ae=d.value)!=null&&ae.length)&&!s.hideInput&&(t.selection?t.selection({fileNames:S.value,totalBytes:W.value,totalBytesReadable:P.value}):s.chips?S.value.map(R=>o(j,{key:R,size:"small",text:R},null)):S.value.join(", "))])])}})},details:g?q=>{var U,B;return p(T,null,[(U=t.details)==null?void 0:U.call(t,q),u&&p(T,null,[p("span",null,null),o(Qe,{active:!!((B=d.value)!=null&&B.length),value:ve.value,disabled:s.disabled},t.counter)])])}:void 0})}),Oe({},$,ee,V)}}),pe=()=>new Promise((s,e)=>{if(typeof window.jsyaml<"u")return s(window.jsyaml);const n=document.createElement("script");n.src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js",n.async=!0,n.onload=()=>s(window.jsyaml),n.onerror=()=>e(new Error("无法加载YAML解析库")),document.head.appendChild(n)});class he{constructor(e){this.data=e,this.version=null,this.subjects=[],this.schedules=[],this._parseData()}_parseData(){if(!this.data)return;this.version=this.data.version||1;const e=this.data.subjects||[];for(const a of e)this.subjects.push({name:a.name,simplified_name:a.simplified_name||null,teacher:a.teacher||null,room:a.room||null});const n=this.data.schedules||[];for(const a of n){const t=[];for(const r of a.classes||[])t.push({subject:r.subject,start_time:r.start_time,end_time:r.end_time});this.schedules.push({name:a.name,enable_day:a.enable_day,weeks:a.weeks||"all",classes:t})}}getSubjects(){return this.subjects}getSchedules(){return this.schedules}getScheduleByDay(e){const n=this.schedules.find(a=>a.enable_day===e);return n?n.classes:[]}toCsesData(){return{version:this.version,subjects:this.subjects,schedules:this.schedules}}}const Ct={name:"Cses2Wakeup",data(){return{activeTab:"text",file:null,jsonText:"",loading:!1,error:"",success:"",processedData:null,selectedRows:[],exportPeriods:[],selectedDays:[1,2,3,4,5,6,7],formatMode:"auto",yamlLibLoaded:!1,activeDay:null,subjectColors:{数学:"blue",语文:"red",英语:"green",物理:"purple",化学:"orange",生物:"teal",历史:"brown",地理:"indigo",政治:"pink",体育:"cyan",自习:"grey",早读:"amber",班会:"deep-purple",听力:"light-blue",信息技术:"light-green"},settings:{hideTeacherName:!1,hideRoom:!1,totalWeeks:30},tableHeaders:[{title:"",key:"data-table-select"},{title:"节次",key:"period"},{title:"周一",key:"1"},{title:"周二",key:"2"},{title:"周三",key:"3"},{title:"周四",key:"4"},{title:"周五",key:"5"},{title:"周六",key:"6"},{title:"周日",key:"7"}],timeTableHeaders:[{title:"节次",key:"period"},{title:"课程",key:"subject"},{title:"星期",key:"day"},{title:"开始时间",key:"startTime"},{title:"结束时间",key:"endTime"},{title:"教师",key:"teacher"},{title:"教室",key:"room"},{title:"周次",key:"weeks"}],dayNames:{1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",7:"周日"}}},computed:{timeTableData(){if(!this.processedData||!this.processedData.tableData)return[];const s=[],e=this.processedData.tableData.filter(a=>this.exportPeriods.includes(a.period)),n={};return e.sort((a,t)=>a.period-t.period).forEach((a,t)=>{n[a.period]=t+1}),e.forEach(a=>{for(let t=1;t<=7;t++){if(!this.selectedDays.includes(t))continue;const r=a[t];if(r)if(Array.isArray(r))r.forEach(l=>{!l||!l.name||s.push({originalPeriod:a.period,period:n[a.period],subject:l.name,day:this.dayNames[t],startTime:l.startTime,endTime:l.endTime,teacher:this.settings.hideTeacherName?"":l.teacher||"",room:this.settings.hideRoom?"":l.room||"",weeks:l.weekType?`1-${this.settings.totalWeeks}${l.weekType}`:`1-${this.settings.totalWeeks}`})});else{if(!r.name)continue;s.push({originalPeriod:a.period,period:n[a.period],subject:r.name,day:this.dayNames[t],startTime:r.startTime,endTime:r.endTime,teacher:this.settings.hideTeacherName?"":r.teacher||"",room:this.settings.hideRoom?"":r.room||"",weeks:r.weekType?`1-${this.settings.totalWeeks}${r.weekType}`:`1-${this.settings.totalWeeks}`})}}}),s.sort((a,t)=>{if(a.period!==t.period)return a.period-t.period;const r={周一:1,周二:2,周三:3,周四:4,周五:5,周六:6,周日:7};return r[a.day]-r[t.day]})},hasExportData(){return this.processedData&&this.exportPeriods.length>0},totalClassHours(){return this.timeTableData.length},daysWithSchedule(){const s=[];for(let e=1;e<=7;e++)this.selectedDays.includes(e)&&this.getDaySchedule(e).length>0&&s.push(e);return s}},async mounted(){try{await pe(),this.yamlLibLoaded=!0}catch(s){this.error=s.message}this.$watch("daysWithSchedule",s=>{s.length>0&&!this.activeDay&&(this.activeDay=s[0])})},methods:{async handleFileChange(){if(this.resetData(),!this.file)return;const s=this.file.name.toLowerCase();if(s.endsWith(".json")||s.endsWith(".js"))this.formatMode="json";else if((s.endsWith(".yml")||s.endsWith(".yaml"))&&(this.formatMode="yaml",!this.yamlLibLoaded))try{await pe(),this.yamlLibLoaded=!0}catch(e){this.error=`无法加载YAML解析库: ${e.message}`;return}try{const e=new FileReader;e.onload=async n=>{try{this.jsonText=n.target.result,await this.processInput()}catch(a){this.error=`文件读取失败: ${a.message}`}},e.onerror=()=>{this.error="文件读取失败"},e.readAsText(this.file)}catch(e){this.error=`文件处理失败: ${e.message}`}},handleTextChange(){this.resetData()},resetData(){this.error="",this.success="",this.processedData=null,this.selectedRows=[],this.exportPeriods=[]},async processInput(){if(!this.jsonText&&!this.file){this.error="请粘贴文本或上传文件";return}this.loading=!0,this.error="",this.success="";try{await this.$nextTick();let s;try{if(this.formatMode==="yaml"||this.formatMode==="auto"&&this.isYaml(this.jsonText)){const n=this.parseYaml(this.jsonText);s=new he(n).toCsesData()}else s=JSON.parse(this.jsonText)}catch(n){throw new Error(`格式解析错误: ${n.message}`)}if(!this.validateCsesFormat(s))throw new Error("不是有效的CSES格式数据");const e=this.processCsesData(s);this.processedData=e,this.selectedDays=[1,2,3,4,5],this.success="数据处理成功!",e.tableData&&e.tableData.length>0&&(this.selectedRows=[...e.tableData],this.exportPeriods=e.tableData.map(n=>n.period))}catch(s){this.error="数据处理失败:"+s.message,console.error(s)}finally{this.loading=!1}},validateCsesFormat(s){return s instanceof he?s.version===1&&Array.isArray(s.subjects)&&Array.isArray(s.schedules):!(!s||typeof s!="object"||s.version!==1||!Array.isArray(s.subjects)||!Array.isArray(s.schedules))},processCsesData(s){const{schedules:e,subjects:n}=s,a=Object.fromEntries(n.map(l=>[l.name,l])),t=[];let r=0;e.forEach(l=>{l.classes&&l.classes.length>r&&(r=l.classes.length)});for(let l=1;l<=r;l++)t.push({period:l,1:null,2:null,3:null,4:null,5:null,6:null,7:null});return e.forEach(l=>{const d=l.enable_day;if(!d||d<1||d>7)return;let f="";l.weeks==="odd"?f="单":l.weeks==="even"&&(f="双"),l.classes.forEach((h,w)=>{if(!h.subject)return;const x=w+1;if(x>r)return;const W=a[h.subject]||{},P={name:h.subject,teacher:W.teacher||"",room:W.room||"",period:x,startTime:h.start_time,endTime:h.end_time,day:d,weekType:f},S=t[x-1][d];S?f&&S.weekType&&f!==S.weekType?(Array.isArray(t[x-1][d])||(t[x-1][d]=[S]),t[x-1][d].push(P)):f===S.weekType?t[x-1][d]=P:f||(t[x-1][d]=P):t[x-1][d]=P})}),{tableData:t,originalData:s}},updateSelectedPeriods(s){this.exportPeriods=[],s&&s.length>0&&(this.exportPeriods=[...new Set(s.filter(e=>e&&typeof e.period=="number").map(e=>e.period))])},getTimeTableData(){return this.timeTableData},downloadCSV(){var t;if(!((t=this.processedData)!=null&&t.tableData)){this.error="没有可下载的数据";return}if(this.exportPeriods.length===0){this.error="请至少选择一节要导出的课";return}if(this.daysWithSchedule.length===0||this.totalClassHours===0){this.error="没有课程数据可导出";return}let s=`课程名称,星期,开始节数,结束节数,老师,地点,周数 +import{E as Oe,_ as Ye,e as L,c as G,f as D,F as He,d as O,G as Je,h as A,l as qe,g as Ge}from"./index-DGIAsv4W.js";import{V as ie,a as M}from"./VRow-Cjhiymuu.js";import{V as I}from"./VAlert-BZ4-f-hy.js";import{V as oe,a as Z}from"./VTabs-DqmvmKGK.js";import{a as K,V as ne}from"./VTooltip-2IUjfpCS.js";import{c as de,d as X,b as Ze}from"./VTable-Cq72iBVc.js";import{V as Ke}from"./VTextarea-vGWmTJww.js";import{u as Xe,a as ue,b as ce,c as Qe,m as $e,d as et,V as tt}from"./VTextField-BurlcggD.js";import{p as ye,f as st,an as lt,n as rt,w as be,u as at,ao as it,ap as ot,aq as me,a5 as nt}from"./vendor-vuetify-DsKlzgKp.js";import{e as N,o as dt,j as o,k as p,F as T,m as z,n as ut,b as Q,t as ct,I as mt,s as ft,X as m,Y as v,Z as i,a1 as c,S as y,$ as k,_ as b,a2 as C,ad as pt}from"./vendor-vue-BiQC5iF7.js";import{V as j,a as ht}from"./VChip-mRzIPuM0.js";import{V as fe}from"./VSwitch-k6hfPfa2.js";import{V as yt}from"./VSkeletonLoader-DwE_iqTb.js";import{V as bt}from"./VDataTable-DmTCHg4b.js";import{V as gt}from"./VCheckbox-BRi_fHJs.js";import{V as kt}from"./VContainer-DZyPrcqa.js";import"./VPagination-DLzhjdaP.js";import"./VSelect-oxA0t9CG.js";import"./VSheet-BBnSA_kJ.js";import"./VCheckboxBtn-BKcSogH0.js";function vt(){function s(n){var t,r;return[...((t=n.dataTransfer)==null?void 0:t.items)??[]].filter(l=>l.kind==="file").map(l=>l.webkitGetAsEntry()).filter(Boolean).length>0||[...((r=n.dataTransfer)==null?void 0:r.files)??[]].length>0}async function e(n){var r,l;const a=[],t=[...((r=n.dataTransfer)==null?void 0:r.items)??[]].filter(d=>d.kind==="file").map(d=>d.webkitGetAsEntry()).filter(Boolean);if(t.length)for(const d of t){const f=await ge(d,ke(".",d));a.push(...f.map(h=>h.file))}else a.push(...((l=n.dataTransfer)==null?void 0:l.files)??[]);return a}return{handleDrop:e,hasFilesOrFolders:s}}function ge(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Promise((n,a)=>{s.isFile?s.file(r=>n([{file:r,path:e}]),a):s.isDirectory&&s.createReader().readEntries(async r=>{const l=[];for(const d of r)l.push(...await ge(d,ke(e,d)));n(l)})})}function ke(s,e){return e.isDirectory?`${s}/${e.name}`:s}const Tt=ye({filterByType:String},"file-accept");function wt(s){const e=N(()=>s.filterByType?Dt(s.filterByType):null);function n(a){if(e.value){const t=a.filter(e.value);return{accepted:t,rejected:a.filter(r=>!t.includes(r))}}return{accepted:a,rejected:[]}}return{filterAccepted:n}}function Dt(s){const e=s.split(",").map(r=>r.trim().toLowerCase()),n=e.filter(r=>r.startsWith(".")),a=e.filter(r=>r.endsWith("/*")),t=e.filter(r=>!n.includes(r)&&!a.includes(r));return r=>{var f,h;const l=((f=r.name.split(".").at(-1))==null?void 0:f.toLowerCase())??"",d=((h=r.type.split("/").at(0))==null?void 0:h.toLowerCase())??"";return t.includes(r.type)||n.includes(`.${l}`)||a.includes(`${d}/*`)}}const xt=ye({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:s=>typeof s=="boolean"||[1e3,1024].includes(Number(s))},truncateLength:{type:[Number,String],default:22},...nt(et({prependIcon:"$file"}),["direction"]),modelValue:{type:[Array,Object],default:s=>s.multiple?[]:null,validator:s=>be(s).every(e=>e!=null&&typeof e=="object")},...Tt(),...$e({clearable:!0})},"VFileInput"),Vt=st()({name:"VFileInput",inheritAttrs:!1,props:xt(),emits:{"click:control":s=>!0,"mousedown:control":s=>!0,"update:focused":s=>!0,"update:modelValue":s=>!0,rejected:s=>!0},setup(s,e){let{attrs:n,emit:a,slots:t}=e;const{t:r}=lt(),{filterAccepted:l}=wt(s),d=rt(s,"modelValue",s.modelValue,u=>be(u),u=>!s.multiple&&Array.isArray(u)?u[0]:u),{isFocused:f,focus:h,blur:w}=Xe(s),x=N(()=>typeof s.showSize!="boolean"?s.showSize:void 0),W=N(()=>(d.value??[]).reduce((u,g)=>{let{size:E=0}=g;return u+E},0)),P=N(()=>me(W.value,x.value)),S=N(()=>(d.value??[]).map(u=>{const{name:g="",size:E=0}=u,F=je(g);return s.showSize?`${F} (${me(E,x.value)})`:F})),ve=N(()=>{var g;const u=((g=d.value)==null?void 0:g.length)??0;return s.showSize?r(s.counterSizeString,u,P.value):r(s.counterString,u)}),$=Q(),ee=Q(),V=Q(),Te=ct(()=>f.value||s.active),te=N(()=>["plain","underlined"].includes(s.variant)),_=ft(!1),{handleDrop:we,hasFilesOrFolders:De}=vt();function Y(){var u;V.value!==document.activeElement&&((u=V.value)==null||u.focus()),f.value||h()}function xe(u){var g;(g=V.value)==null||g.click()}function Ve(u){a("mousedown:control",u)}function Ce(u){var g;(g=V.value)==null||g.click(),a("click:control",u)}function Se(u){u.stopPropagation(),Y(),mt(()=>{d.value=[],ot(s["onClick:clear"],u)})}function je(u){if(u.length{(!Array.isArray(u)||!u.length)&&V.value&&(V.value.value="")}),at(()=>{const u=!!(t.counter||s.counter),g=!!(u||t.details),[E,F]=it(n),{modelValue:H,...J}=ue.filterProps(s),Re={...ce.filterProps(s),"onClick:clear":Se},Ne=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,Le=n.accept?String(n.accept):void 0,Me=Ne?void 0:s.filterByType??Le;return o(ue,z({ref:$,modelValue:s.multiple?d.value:d.value[0],class:["v-file-input",{"v-file-input--chips":!!s.chips,"v-file-input--dragging":_.value,"v-file-input--hide":s.hideInput,"v-input--plain-underlined":te.value},s.class],style:s.style,"onClick:prepend":xe},E,J,{centerAffix:!te.value,focused:f.value}),{...t,default:q=>{let{id:U,isDisabled:B,isDirty:le,isReadonly:re,isValid:We,hasDetails:Be}=q;return o(ce,z({ref:ee,prependIcon:s.prependIcon,onMousedown:Ve,onClick:Ce,"onClick:prependInner":s["onClick:prependInner"],"onClick:appendInner":s["onClick:appendInner"]},Re,{id:U.value,active:Te.value||le.value,dirty:le.value||s.dirty,disabled:B.value,focused:f.value,details:Be.value,error:We.value===!1,onDragover:Ae,onDrop:Ee}),{...t,default:Ie=>{var ae;let{props:{class:ze,..._e},controlRef:Ue}=Ie;return p(T,null,[p("input",z({ref:R=>V.value=Ue.value=R,type:"file",accept:Me,readonly:re.value,disabled:B.value,multiple:s.multiple,name:s.name,onClick:R=>{R.stopPropagation(),re.value&&R.preventDefault(),Y()},onChange:Fe,onDragleave:Pe,onFocus:Y,onBlur:w},_e,F),null),p("div",{class:ut(ze)},[!!((ae=d.value)!=null&&ae.length)&&!s.hideInput&&(t.selection?t.selection({fileNames:S.value,totalBytes:W.value,totalBytesReadable:P.value}):s.chips?S.value.map(R=>o(j,{key:R,size:"small",text:R},null)):S.value.join(", "))])])}})},details:g?q=>{var U,B;return p(T,null,[(U=t.details)==null?void 0:U.call(t,q),u&&p(T,null,[p("span",null,null),o(Qe,{active:!!((B=d.value)!=null&&B.length),value:ve.value,disabled:s.disabled},t.counter)])])}:void 0})}),Oe({},$,ee,V)}}),pe=()=>new Promise((s,e)=>{if(typeof window.jsyaml<"u")return s(window.jsyaml);const n=document.createElement("script");n.src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js",n.async=!0,n.onload=()=>s(window.jsyaml),n.onerror=()=>e(new Error("无法加载YAML解析库")),document.head.appendChild(n)});class he{constructor(e){this.data=e,this.version=null,this.subjects=[],this.schedules=[],this._parseData()}_parseData(){if(!this.data)return;this.version=this.data.version||1;const e=this.data.subjects||[];for(const a of e)this.subjects.push({name:a.name,simplified_name:a.simplified_name||null,teacher:a.teacher||null,room:a.room||null});const n=this.data.schedules||[];for(const a of n){const t=[];for(const r of a.classes||[])t.push({subject:r.subject,start_time:r.start_time,end_time:r.end_time});this.schedules.push({name:a.name,enable_day:a.enable_day,weeks:a.weeks||"all",classes:t})}}getSubjects(){return this.subjects}getSchedules(){return this.schedules}getScheduleByDay(e){const n=this.schedules.find(a=>a.enable_day===e);return n?n.classes:[]}toCsesData(){return{version:this.version,subjects:this.subjects,schedules:this.schedules}}}const Ct={name:"Cses2Wakeup",data(){return{activeTab:"text",file:null,jsonText:"",loading:!1,error:"",success:"",processedData:null,selectedRows:[],exportPeriods:[],selectedDays:[1,2,3,4,5,6,7],formatMode:"auto",yamlLibLoaded:!1,activeDay:null,subjectColors:{数学:"blue",语文:"red",英语:"green",物理:"purple",化学:"orange",生物:"teal",历史:"brown",地理:"indigo",政治:"pink",体育:"cyan",自习:"grey",早读:"amber",班会:"deep-purple",听力:"light-blue",信息技术:"light-green"},settings:{hideTeacherName:!1,hideRoom:!1,totalWeeks:30},tableHeaders:[{title:"",key:"data-table-select"},{title:"节次",key:"period"},{title:"周一",key:"1"},{title:"周二",key:"2"},{title:"周三",key:"3"},{title:"周四",key:"4"},{title:"周五",key:"5"},{title:"周六",key:"6"},{title:"周日",key:"7"}],timeTableHeaders:[{title:"节次",key:"period"},{title:"课程",key:"subject"},{title:"星期",key:"day"},{title:"开始时间",key:"startTime"},{title:"结束时间",key:"endTime"},{title:"教师",key:"teacher"},{title:"教室",key:"room"},{title:"周次",key:"weeks"}],dayNames:{1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",7:"周日"}}},computed:{timeTableData(){if(!this.processedData||!this.processedData.tableData)return[];const s=[],e=this.processedData.tableData.filter(a=>this.exportPeriods.includes(a.period)),n={};return e.sort((a,t)=>a.period-t.period).forEach((a,t)=>{n[a.period]=t+1}),e.forEach(a=>{for(let t=1;t<=7;t++){if(!this.selectedDays.includes(t))continue;const r=a[t];if(r)if(Array.isArray(r))r.forEach(l=>{!l||!l.name||s.push({originalPeriod:a.period,period:n[a.period],subject:l.name,day:this.dayNames[t],startTime:l.startTime,endTime:l.endTime,teacher:this.settings.hideTeacherName?"":l.teacher||"",room:this.settings.hideRoom?"":l.room||"",weeks:l.weekType?`1-${this.settings.totalWeeks}${l.weekType}`:`1-${this.settings.totalWeeks}`})});else{if(!r.name)continue;s.push({originalPeriod:a.period,period:n[a.period],subject:r.name,day:this.dayNames[t],startTime:r.startTime,endTime:r.endTime,teacher:this.settings.hideTeacherName?"":r.teacher||"",room:this.settings.hideRoom?"":r.room||"",weeks:r.weekType?`1-${this.settings.totalWeeks}${r.weekType}`:`1-${this.settings.totalWeeks}`})}}}),s.sort((a,t)=>{if(a.period!==t.period)return a.period-t.period;const r={周一:1,周二:2,周三:3,周四:4,周五:5,周六:6,周日:7};return r[a.day]-r[t.day]})},hasExportData(){return this.processedData&&this.exportPeriods.length>0},totalClassHours(){return this.timeTableData.length},daysWithSchedule(){const s=[];for(let e=1;e<=7;e++)this.selectedDays.includes(e)&&this.getDaySchedule(e).length>0&&s.push(e);return s}},async mounted(){try{await pe(),this.yamlLibLoaded=!0}catch(s){this.error=s.message}this.$watch("daysWithSchedule",s=>{s.length>0&&!this.activeDay&&(this.activeDay=s[0])})},methods:{async handleFileChange(){if(this.resetData(),!this.file)return;const s=this.file.name.toLowerCase();if(s.endsWith(".json")||s.endsWith(".js"))this.formatMode="json";else if((s.endsWith(".yml")||s.endsWith(".yaml"))&&(this.formatMode="yaml",!this.yamlLibLoaded))try{await pe(),this.yamlLibLoaded=!0}catch(e){this.error=`无法加载YAML解析库: ${e.message}`;return}try{const e=new FileReader;e.onload=async n=>{try{this.jsonText=n.target.result,await this.processInput()}catch(a){this.error=`文件读取失败: ${a.message}`}},e.onerror=()=>{this.error="文件读取失败"},e.readAsText(this.file)}catch(e){this.error=`文件处理失败: ${e.message}`}},handleTextChange(){this.resetData()},resetData(){this.error="",this.success="",this.processedData=null,this.selectedRows=[],this.exportPeriods=[]},async processInput(){if(!this.jsonText&&!this.file){this.error="请粘贴文本或上传文件";return}this.loading=!0,this.error="",this.success="";try{await this.$nextTick();let s;try{if(this.formatMode==="yaml"||this.formatMode==="auto"&&this.isYaml(this.jsonText)){const n=this.parseYaml(this.jsonText);s=new he(n).toCsesData()}else s=JSON.parse(this.jsonText)}catch(n){throw new Error(`格式解析错误: ${n.message}`)}if(!this.validateCsesFormat(s))throw new Error("不是有效的CSES格式数据");const e=this.processCsesData(s);this.processedData=e,this.selectedDays=[1,2,3,4,5],this.success="数据处理成功!",e.tableData&&e.tableData.length>0&&(this.selectedRows=[...e.tableData],this.exportPeriods=e.tableData.map(n=>n.period))}catch(s){this.error="数据处理失败:"+s.message,console.error(s)}finally{this.loading=!1}},validateCsesFormat(s){return s instanceof he?s.version===1&&Array.isArray(s.subjects)&&Array.isArray(s.schedules):!(!s||typeof s!="object"||s.version!==1||!Array.isArray(s.subjects)||!Array.isArray(s.schedules))},processCsesData(s){const{schedules:e,subjects:n}=s,a=Object.fromEntries(n.map(l=>[l.name,l])),t=[];let r=0;e.forEach(l=>{l.classes&&l.classes.length>r&&(r=l.classes.length)});for(let l=1;l<=r;l++)t.push({period:l,1:null,2:null,3:null,4:null,5:null,6:null,7:null});return e.forEach(l=>{const d=l.enable_day;if(!d||d<1||d>7)return;let f="";l.weeks==="odd"?f="单":l.weeks==="even"&&(f="双"),l.classes.forEach((h,w)=>{if(!h.subject)return;const x=w+1;if(x>r)return;const W=a[h.subject]||{},P={name:h.subject,teacher:W.teacher||"",room:W.room||"",period:x,startTime:h.start_time,endTime:h.end_time,day:d,weekType:f},S=t[x-1][d];S?f&&S.weekType&&f!==S.weekType?(Array.isArray(t[x-1][d])||(t[x-1][d]=[S]),t[x-1][d].push(P)):f===S.weekType?t[x-1][d]=P:f||(t[x-1][d]=P):t[x-1][d]=P})}),{tableData:t,originalData:s}},updateSelectedPeriods(s){this.exportPeriods=[],s&&s.length>0&&(this.exportPeriods=[...new Set(s.filter(e=>e&&typeof e.period=="number").map(e=>e.period))])},getTimeTableData(){return this.timeTableData},downloadCSV(){var t;if(!((t=this.processedData)!=null&&t.tableData)){this.error="没有可下载的数据";return}if(this.exportPeriods.length===0){this.error="请至少选择一节要导出的课";return}if(this.daysWithSchedule.length===0||this.totalClassHours===0){this.error="没有课程数据可导出";return}let s=`课程名称,星期,开始节数,结束节数,老师,地点,周数 `;for(const r of this.daysWithSchedule){const l=this.groupByPeriod(this.getDaySchedule(r));for(const d of l)for(const f of d.items){const h={周一:1,周二:2,周三:3,周四:4,周五:5,周六:6,周日:7}[f.day],w=this.settings.hideTeacherName?"":f.teacher||"",x=this.settings.hideRoom?"":f.room||"";s+=`${f.subject},${h},${f.period},${f.period},${w},${x},${f.weeks} `}}const e="\uFEFF",n=new Blob([e+s],{type:"text/csv;charset=utf-8"}),a=document.createElement("a");a.href=URL.createObjectURL(n),a.download=`course_schedule_${this.totalClassHours}课时.csv`,a.click(),URL.revokeObjectURL(a.href),this.success=`导出成功!共计 ${this.totalClassHours} 课时`},showExportPreview(){if(!this.hasExportData){this.error="请先选择要导出的节次";return}const s=this.timeTableData.slice(0,5).map(e=>`${e.subject} (${e.day} 第${e.period}节)`).join(` `);this.timeTableData.length>5?this.success=`导出预览 (共${this.totalClassHours}课时): diff --git a/assets/dataProvider-DBZnFcYO.js b/assets/dataProvider-GWPC-0Vt.js similarity index 98% rename from assets/dataProvider-DBZnFcYO.js rename to assets/dataProvider-GWPC-0Vt.js index d71fd43..82275a0 100644 --- a/assets/dataProvider-DBZnFcYO.js +++ b/assets/dataProvider-GWPC-0Vt.js @@ -1 +1 @@ -import{a as ge,g as he}from"./vendor-utils-B_Y_1aLs.js";import{n as d,ai as Se,s as B}from"./index-CzpSlHRw.js";import{i as j,t as x,g as q}from"./serverRotation-xQe1elLG.js";const J=(e,t)=>t.some(r=>e instanceof r);let Y,ee;function pe(){return Y||(Y=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function De(){return ee||(ee=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const M=new WeakMap,P=new WeakMap,K=new WeakMap;function be(e){const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(O(e.result)),s()},o=()=>{n(e.error),s()};e.addEventListener("success",a),e.addEventListener("error",o)});return K.set(t,e),t}function ke(e){if(M.has(e))return;const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),s()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});M.set(e,t)}let W={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return M.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return O(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ie(e){W=e(W)}function Ee(e){return De().includes(e)?function(...t){return e.apply(H(this),t),O(this.request)}:function(...t){return O(e.apply(H(this),t))}}function Ie(e){return typeof e=="function"?Ee(e):(e instanceof IDBTransaction&&ke(e),J(e,pe())?new Proxy(e,W):e)}function O(e){if(e instanceof IDBRequest)return be(e);if(P.has(e))return P.get(e);const t=Ie(e);return t!==e&&(P.set(e,t),K.set(t,e)),t}const H=e=>K.get(e);function ue(e,t,{blocked:r,upgrade:n,blocking:s,terminated:a}={}){const o=indexedDB.open(e,t),i=O(o);return n&&o.addEventListener("upgradeneeded",c=>{n(O(o.result),c.oldVersion,c.newVersion,O(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),i.then(c=>{a&&c.addEventListener("close",()=>a()),s&&c.addEventListener("versionchange",u=>s(u.oldVersion,u.newVersion,u))}).catch(()=>{}),i}const Ne=["get","getKey","getAll","getAllKeys","count"],Oe=["put","add","delete","clear"],F=new Map;function te(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(F.get(t))return F.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=Oe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Ne.includes(r)))return;const a=async function(o,...i){const c=this.transaction(o,s?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(i.shift())),(await Promise.all([u[r](...i),s&&c.done]))[0]};return F.set(t,a),a}ie(e=>({...e,get:(t,r,n)=>te(t,r)||e.get(t,r,n),has:(t,r)=>!!te(t,r)||e.has(t,r)}));const Te=["continue","continuePrimaryKey","advance"],re={},z=new WeakMap,de=new WeakMap,Re={get(e,t){if(!Te.includes(t))return e[t];let r=re[t];return r||(r=re[t]=function(...n){z.set(this,de.get(this)[t](...n))}),r}};async function*_e(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Re);for(de.set(r,t),K.set(r,H(t));t;)yield r,t=await(z.get(r)||t.continue()),z.delete(r)}function ne(e,t){return t===Symbol.asyncIterator&&J(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&J(e,[IDBIndex,IDBObjectStore])}ie(e=>({...e,get(t,r,n){return ne(t,r)?_e:e.get(t,r,n)},has(t,r){return ne(t,r)||e.has(t,r)}}));const je="ClassworksDB",xe=3,E=async()=>ue(je,xe,{upgrade(e){e.objectStoreNames.contains("kv")||e.createObjectStore("kv"),e.objectStoreNames.contains("system")||e.createObjectStore("system"),e.objectStoreNames.contains("syncQueue")||e.createObjectStore("syncQueue")}}),S={async loadData(e){try{const r=await(await E()).get("kv",e);return r?v(JSON.parse(r)):f("数据不存在","NOT_FOUND")}catch(t){return f("读取本地数据失败:"+t)}},async saveData(e,t){try{return await(await E()).put("kv",JSON.stringify(t),e),v(!0)}catch(r){return f("保存本地数据失败:"+r)}},async loadKeys(e={}){try{const s=await(await E()).transaction(["kv"],"readonly").objectStore("kv").getAllKeys(),{sortDir:a="asc",limit:o=100,skip:i=0}=e,c=s.sort((h,y)=>a==="desc"?y.localeCompare(h):h.localeCompare(y)),u=c.length,l=c.slice(i,i+o),g={keys:l,total_rows:u,current_page:{limit:o,skip:i,count:l.length},load_more:null};return v(g)}catch(t){return f("获取本地键名列表失败:"+t.message)}},async addToSyncQueue(e){try{return await(await E()).put("syncQueue",JSON.stringify(e),e.key),v(!0)}catch(t){return f("添加同步队列失败:"+t)}},async getSyncQueue(){try{const e=await E(),t=await e.getAllKeys("syncQueue"),r=[];for(const n of t){const s=await e.get("syncQueue",n);s&&r.push(JSON.parse(s))}return r.sort((n,s)=>n.timestamp-s.timestamp),v(r)}catch(e){return f("获取同步队列失败:"+e)}},async removeFromSyncQueue(e){try{return await(await E()).delete("syncQueue",e),v(!0)}catch(t){return f("删除同步队列项失败:"+t)}},async deleteByPrefix(e){try{const r=(await E()).transaction("kv","readwrite"),n=r.objectStore("kv"),s=await n.getAllKeys();let a=0;for(const o of s)o.startsWith(e)&&(await n.delete(o),a++);return await r.done,a}catch(t){return console.warn("kvLocalProvider.deleteByPrefix 失败:",t),0}}};function Le(e,t){return"headers"in e&&typeof e.headers=="object"&&!Array.isArray(e.headers)?U(e.headers):"getHeaders"in e&&typeof e.getHeaders=="function"?U(e.getHeaders()):U(e)}function U(e,t){const r=D(e,"ratelimit");if(r)return $e(r);let n;if(D(e,"ratelimit-remaining"))n="ratelimit-";else if(D(e,"x-ratelimit-remaining"))n="x-ratelimit-";else if(D(e,"x-rate-limit-remaining"))n="x-rate-limit-";else return;const s=p(D(e,`${n}limit`)),a=p(D(e,`${n}used`))||p(D(e,`${n}observed`)),o=p(D(e,`${n}remaining`));let i;const c=D(e,`${n}reset`);switch(void 0){case"date":{i=fe(c??"");break}case"unix":{i=G(c??"");break}case"seconds":{i=le(c??"");break}case"milliseconds":{i=Be(c??"");break}default:if(c)i=Fe(c);else{const l=D(e,"retry-after");l&&(i=G(l))}}return{limit:Number.isNaN(s)?a+o:s,used:Number.isNaN(a)?s-o:a,remaining:o,reset:i}}var Ae=/limit\s*=\s*(\d+)/i,Ce=/remaining\s*=\s*(\d+)/i,Ke=/reset\s*=\s*(\d+)/i;function $e(e){var t,r,n;const s=p((t=Ae.exec(e))==null?void 0:t[1]),a=p((r=Ce.exec(e))==null?void 0:r[1]),o=p((n=Ke.exec(e))==null?void 0:n[1]),i=X(o);return{limit:s,used:s-a,remaining:a,reset:i}}function X(e){const t=new Date;return t.setSeconds(t.getSeconds()+e),t}function p(e){return typeof e=="number"?e:Number.parseInt(e??"",10)}function D(e,t){var r;if("get"in e&&typeof e.get=="function")return(r=e.get(t))!=null?r:void 0;if(t in e&&typeof e[t]=="string")return e[t]}function fe(e){return new Date(e)}function G(e){const t=p(e);return new Date(t*1e3)}function le(e){const t=p(e);return X(t)}function Be(e){const t=p(e);return X(t/1e3)}var Pe=/[a-z]/i;function Fe(e){if(Pe.test(e))return fe(e);const t=p(e);return t&&t>1e9?G(t):le(t)}const w=ge.create({timeout:1e4});w.interceptors.request.use(e=>{const t=d("server.provider");if(t==="kv-server"||t==="classworkscloud"){const r=d("server.kvToken");if(r)e.headers["x-app-token"]=r;else{const n=d("server.siteKey");n&&(e.headers["x-site-key"]=he.encode(n))}}return e},e=>(console.log(e),Promise.reject(e)));w.interceptors.response.use(e=>e,e=>{if(e.response&&e.response.status===429)try{const t=Le(e.response);t&&Se.show(t.reset,e.config.url,e.config.method.toUpperCase())}catch(t){console.error("解析限速头信息失败:",t)}return Promise.reject(e)});const nt=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"})),b=()=>{const e={Accept:"application/json"},t=d("server.kvToken"),r=d("server.siteKey");return t?e["x-app-token"]=t:r&&(e["x-site-key"]=r),e},I={async loadNamespaceInfo(){var e,t;try{if(j())return await x(async s=>{const a=await w.get(`${s}/kv/_info`,{headers:b()});return v(a.data)});const r=d("server.domain"),n=await w.get(`${r}/kv/_info`,{headers:b()});return v(n.data)}catch(r){return console.error("获取命名空间信息失败:",r),f(((t=(e=r.response)==null?void 0:e.data)==null?void 0:t.message)||"获取命名空间信息失败","NAMESPACE_ERROR")}},async updateNamespaceInfo(e){var t,r;try{if(j())return await x(async a=>await w.put(`${a}/kv/_info`,e,{headers:b()}));const n=d("server.domain");return await w.put(`${n}/kv/_info`,e,{headers:b()})}catch(n){return f(((r=(t=n.response)==null?void 0:t.data)==null?void 0:r.message)||"更新命名空间信息失败","NAMESPACE_ERROR")}},async loadData(e){var t,r,n;try{if(j())return await x(async o=>{const i=await w.get(`${o}/kv/${e}`,{headers:b()});return v(i.data)});const s=d("server.domain"),a=await w.get(`${s}/kv/${e}`,{headers:b()});return v(a.data)}catch(s){return((t=s.response)==null?void 0:t.status)===404?f("数据不存在","NOT_FOUND"):(console.log(s),f(((n=(r=s.response)==null?void 0:r.data)==null?void 0:n.message)||"服务器连接失败","NETWORK_ERROR"))}},async saveData(e,t){var r,n;try{if(j())return await x(async a=>(await w.post(`${a}/kv/${e}`,t,{headers:b()}),v(!0)));const s=d("server.domain");return await w.post(`${s}/kv/${e}`,t,{headers:b()}),v(!0)}catch(s){return console.log(s),f(((n=(r=s.response)==null?void 0:r.data)==null?void 0:n.message)||"保存失败","SAVE_ERROR")}},async loadKeys(e={}){var t,r,n,s,a;try{const{sortBy:o="key",sortDir:i="asc",limit:c=100,skip:u=0}=e,l=new URLSearchParams({sortBy:o,sortDir:i,limit:c.toString(),skip:u.toString()});if(j())return await x(async y=>{const m=await w.get(`${y}/kv/_keys?${l}`,{headers:b()});return v(m.data)});const g=d("server.domain"),h=await w.get(`${g}/kv/_keys?${l}`,{headers:b()});return v(h.data)}catch(o){return((t=o.response)==null?void 0:t.status)===404?f("命名空间不存在","NOT_FOUND"):((r=o.response)==null?void 0:r.status)===403?f("无权限访问此命名空间","PERMISSION_DENIED"):((n=o.response)==null?void 0:n.status)===401?f("认证失败","UNAUTHORIZED"):(console.log(o),f(((a=(s=o.response)==null?void 0:s.data)==null?void 0:a.message)||"获取键名列表失败","NETWORK_ERROR"))}}};function T(e){return{vc:{[e]:0},ts:0,deviceId:e,_fieldTs:{},lastSyncedData:null,lastSyncedTs:0,lastSyncedVc:{[e]:0}}}function se(e,t){const r={...e.vc};return r[t]=(r[t]||0)+1,{...e,vc:r,ts:Date.now(),deviceId:t}}function Ue(e,t){const r={...e};for(const[n,s]of Object.entries(t))r[n]=Math.max(r[n]||0,s);return r}function R(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ve(e,t){if(!e&&!t)return{};if(!e)return{...t};if(!t)return{...e};const r={...e};for(const[n,s]of Object.entries(t)){const a=r[n];(!a||s.ts>a.ts||s.ts===a.ts&&s.deviceIdR(r)?r.id:JSON.stringify(r);if("name"in t)return r=>R(r)?r.name:JSON.stringify(r);if("key"in t)return r=>R(r)?r.key:JSON.stringify(r)}return null}function Qe(e,t,r){const n=ae(e)||ae(r)||(c=>JSON.stringify(c)),s=new Map,a=new Map;e.forEach(c=>{const u=n(c);s.has(u)||s.set(u,c)}),r.forEach(c=>{const u=n(c);a.has(u)||a.set(u,c)});const o=[],i=new Set;for(const[c,u]of s)i.has(c)||(i.add(c),o.push(u));for(const[c,u]of a)i.has(c)||(i.add(c),o.push(u));return o}function Je(e,t,r,n){var o,i;const s={},a=new Set([...Object.keys(e),...Object.keys(r)]);for(const c of a){const u=c in e,l=c in r;if(u&&!l)s[c]=e[c];else if(!u&&l)s[c]=r[c];else{const g=((o=t._fieldTs)==null?void 0:o[c])||{ts:t.ts,deviceId:t.deviceId},h=((i=n._fieldTs)==null?void 0:i[c])||{ts:n.ts,deviceId:n.deviceId};g.ts>h.ts?s[c]=e[c]:h.ts>g.ts?s[c]=r[c]:s[c]=g.deviceId<=h.deviceId?e[c]:r[c]}}return s}function Me(e,t,r,n){const s=Ue(t.vc||{},n.vc||{}),a=Math.max(t.ts||0,n.ts||0),o=Ve(t._fieldTs,n._fieldTs);let i;return R(e)&&R(r)?i=Je(e,t,r,n):Array.isArray(e)&&Array.isArray(r)?i=Qe(e,t,r):typeof e==typeof r&&typeof e!="object"?(t.ts||0)>(n.ts||0)?i=e:(n.ts||0)>(t.ts||0)?i=r:i=(t.deviceId||"")<=(n.deviceId||"")?e:r:i=(t.ts||0)>=(n.ts||0)?e:r,{data:i,meta:{vc:s,ts:a,deviceId:a===(t.ts||0)?t.deviceId:n.deviceId,_fieldTs:o,lastSyncedData:n.lastSyncedData??t.lastSyncedData??null,lastSyncedTs:Math.max(t.lastSyncedTs||0,n.lastSyncedTs||0),lastSyncedVc:s}}}const $="_cache:",We="ClassworksDB",ye=7*24*60*60*1e3,He=[{pattern:"*",ttl:ye}];async function Z(){return ue(We,void 0,{upgrade(e){e.objectStoreNames.contains("kv")||e.createObjectStore("kv"),e.objectStoreNames.contains("system")||e.createObjectStore("system"),e.objectStoreNames.contains("syncQueue")||e.createObjectStore("syncQueue")}})}function ze(e,t){const r="^"+e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function Ge(e){return e&&typeof e=="object"&&!("meta"in e)&&!("cacheTimestamp"in e)}function me(e){return e&&typeof e=="object"&&"meta"in e&&"cacheTimestamp"in e}function ve(e){for(const{pattern:t,ttl:r}of He)if(ze(t,e))return r;return ye}async function A(e){try{const t=await Z(),r=$+e,n=await t.get("kv",r);if(!n)return null;let s;try{s=typeof n=="string"?JSON.parse(n):n}catch{return null}if(Ge(s)){const a=d("device.uuid")||"unknown",o=T(a);o.ts=Date.now(),o.lastSyncedData=s;const i={data:s,meta:o,cacheTimestamp:Date.now(),cacheTTL:ve(e)};return await t.put("kv",JSON.stringify(i),r),{data:i.data,meta:i.meta}}return me(s)?Date.now()-s.cacheTimestamp>s.cacheTTL?(await t.delete("kv",r),null):{data:s.data,meta:s.meta}:null}catch(t){return console.warn("cacheManager.getCacheEntry 失败:",t),null}}async function N(e,t,r){try{const n=await Z(),s=$+e,a={data:t,meta:r,cacheTimestamp:Date.now(),cacheTTL:ve(e)};return await n.put("kv",JSON.stringify(a),s),!0}catch(n){return console.warn("cacheManager.setCacheEntry 失败:",n),!1}}async function we(){let e=0;try{const r=(await Z()).transaction("kv","readwrite"),n=r.objectStore("kv"),s=await n.getAllKeys();for(const a of s){if(!a.startsWith($))continue;const o=await n.get(a);if(!o)continue;let i;try{i=typeof o=="string"?JSON.parse(o):o}catch{continue}me(i)&&Date.now()-i.cacheTimestamp>i.cacheTTL&&(await n.delete(a),e++)}await r.done}catch(t){console.warn("cacheManager.cleanupExpiredEntries 失败:",t)}return e}let _=null,V=!1;async function C(e={}){var n;if(V)return{synced:0,failed:0};V=!0;let t=0,r=0;try{const s=await S.getSyncQueue();if(s.success===!1||!Array.isArray(s)||s.length===0)return{synced:0,failed:0};for(const a of s)try{const o=await I.saveData(a.key,a.data);if(o.success!==!1){if(await S.removeFromSyncQueue(a.key),a.meta){const i=d("device.uuid")||"unknown",c=await A(a.key);if(c){const u={...c.meta};u.lastSyncedData=a.data,u.lastSyncedTs=Date.now(),u.lastSyncedVc={...u.vc},await N(a.key,c.data,u)}else{const u=a.meta||T(i);u.lastSyncedData=a.data,u.lastSyncedTs=Date.now(),u.lastSyncedVc={...u.vc},await N(a.key,a.data,u)}}t++}else r++,e.silent||console.warn(`smartSync: 跳过 key=${a.key}, 服务器错误:`,(n=o.error)==null?void 0:n.message)}catch{r++;break}t>0&&we()}finally{V=!1}return!e.silent&&t>0&&console.log(`smartSync: 同步完成,成功 ${t} 条,失败 ${r} 条`),{synced:t,failed:r}}async function Xe(){try{const e=await S.getSyncQueue();if(e.success===!1||!Array.isArray(e)||e.length===0)return;C({silent:!0})}catch{}}function Ze(){_||(_=()=>C(),window.addEventListener("online",_),we(),navigator.onLine&&C())}function qe(){_&&(window.removeEventListener("online",_),_=null)}const v=e=>e,f=(e,t="UNKNOWN_ERROR")=>({success:!1,error:{code:t,message:e}});function Ye(e){return e&&e.success===!1}function oe(e){var t;return Ye(e)&&((t=e.error)==null?void 0:t.code)==="NETWORK_ERROR"}function ce(){return d("device.uuid")||"unknown"}function L(e){return e&&typeof e=="object"&&!Array.isArray(e)&&"value"in e?e.value:e}const st={init:Ze,destroy:qe,flushNow:C};function Q(){const e=d("server.provider");return e==="kv-server"||e==="classworkscloud"}const at={loadData:async e=>{if(!Q())return S.loadData(e);const t=await I.loadData(e),r=L(t);if(!oe(r)){if(r.success!==!1){const a=await A(e),o=ce();if(a){const i=L(a.data),c=JSON.stringify(i),u=JSON.stringify(r),l=JSON.stringify(L(a.meta.lastSyncedData)??null);if(u===c)return i;if(u!==l){const g=a.meta.vc||{},h=a.meta.lastSyncedVc||{};if((g[o]||0)>(h[o]||0)){const m=T("server");m.ts=Date.now();const k=Me(i,a.meta,r,m);return await N(e,k.data,k.meta),I.saveData(e,k.data),k.data}else{const m=T(o);return m.ts=Date.now(),m.lastSyncedData=r,m.lastSyncedTs=Date.now(),m.lastSyncedVc={...m.vc},await N(e,r,m),r}}else return i}else{const i=T(o);return i.ts=Date.now(),i.lastSyncedData=r,i.lastSyncedTs=Date.now(),i.lastSyncedVc={...i.vc},await N(e,r,i),r}}return r}const n=await A(e);if(n){const a=L(n.data);return typeof a=="object"&&a!==null&&(a.fromCache=!0),a}const s=await S.loadData($+e);return s.success!==!1?{...s,fromCache:!0}:r},saveData:async(e,t)=>{if(!Q())return S.saveData(e,t);const r=ce(),n=await A(e);let s;n?s=se(n.meta,r):s=se(T(r),r),await N(e,t,s);const a=await I.saveData(e,t);return a.success!==!1?(s.lastSyncedData=t,s.lastSyncedTs=Date.now(),s.lastSyncedVc={...s.vc},await N(e,t,s),await S.removeFromSyncQueue(e),Xe(),a):(await S.addToSyncQueue({key:e,data:t,timestamp:Date.now(),meta:s}),{success:!0,queuedForSync:!0})},loadKeys:async(e={})=>{if(!Q())return S.loadKeys(e);const t=await I.loadKeys(e);return oe(t)?S.loadKeys(e):t},async getKeyCloudUrl(e,t={}){var s;const{migrateFromLocal:r=!0,autoConfigureCloud:n=!0}=t;try{const a=d("server.provider");let o;a==="classworkscloud"?o=q():o=d("server.domain");let i=d("server.siteKey");const c=d("device.uuid");let u=!1;if(!o||!c)if(n){const y={"server.domain":"https://kv-service.houlang.cloud","server.siteKey":""};o||(B("server.domain",y["server.domain"]),o=y["server.domain"],u=!0),i||(B("server.siteKey",y["server.siteKey"]),i=y["server.siteKey"]),B("server.provider","classworkscloud"),o=q()}else return f("云端配置无效,请检查服务器域名和设备UUID","CONFIG_ERROR");let l=!1;if(r)try{const y=await S.loadData(e);if(y&&y.success!==!1){const m=await I.loadData(e);if(m&&m.success===!1&&((s=m.error)==null?void 0:s.code)==="NOT_FOUND"){const k=await I.saveData(e,y);k&&k.success!==!1&&(l=!0,console.log(`已成功将键 ${e} 的数据从本地迁移到云端`))}}}catch(y){console.warn(`迁移键 ${e} 的数据时出错:`,y)}const g=d("server.kvToken");return{success:!0,url:`${o}/kv/${e}?token=${g}`,migrated:l,configured:u}}catch(a){return console.error("获取键云端地址时出错:",a),f(a.message||"获取键云端地址失败","CLOUD_URL_ERROR")}}};export{w as a,S as b,nt as c,at as d,I as k,ue as o,st as s}; +import{a as ge,g as he}from"./vendor-utils-DwALrQNc.js";import{n as d,ai as Se,s as B}from"./index-DGIAsv4W.js";import{i as j,t as x,g as q}from"./serverRotation-BtcwvdZJ.js";const J=(e,t)=>t.some(r=>e instanceof r);let Y,ee;function pe(){return Y||(Y=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function De(){return ee||(ee=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const M=new WeakMap,P=new WeakMap,K=new WeakMap;function be(e){const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(O(e.result)),s()},o=()=>{n(e.error),s()};e.addEventListener("success",a),e.addEventListener("error",o)});return K.set(t,e),t}function ke(e){if(M.has(e))return;const t=new Promise((r,n)=>{const s=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),s()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});M.set(e,t)}let W={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return M.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return O(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ie(e){W=e(W)}function Ee(e){return De().includes(e)?function(...t){return e.apply(H(this),t),O(this.request)}:function(...t){return O(e.apply(H(this),t))}}function Ie(e){return typeof e=="function"?Ee(e):(e instanceof IDBTransaction&&ke(e),J(e,pe())?new Proxy(e,W):e)}function O(e){if(e instanceof IDBRequest)return be(e);if(P.has(e))return P.get(e);const t=Ie(e);return t!==e&&(P.set(e,t),K.set(t,e)),t}const H=e=>K.get(e);function ue(e,t,{blocked:r,upgrade:n,blocking:s,terminated:a}={}){const o=indexedDB.open(e,t),i=O(o);return n&&o.addEventListener("upgradeneeded",c=>{n(O(o.result),c.oldVersion,c.newVersion,O(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),i.then(c=>{a&&c.addEventListener("close",()=>a()),s&&c.addEventListener("versionchange",u=>s(u.oldVersion,u.newVersion,u))}).catch(()=>{}),i}const Ne=["get","getKey","getAll","getAllKeys","count"],Oe=["put","add","delete","clear"],F=new Map;function te(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(F.get(t))return F.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=Oe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Ne.includes(r)))return;const a=async function(o,...i){const c=this.transaction(o,s?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(i.shift())),(await Promise.all([u[r](...i),s&&c.done]))[0]};return F.set(t,a),a}ie(e=>({...e,get:(t,r,n)=>te(t,r)||e.get(t,r,n),has:(t,r)=>!!te(t,r)||e.has(t,r)}));const Te=["continue","continuePrimaryKey","advance"],re={},z=new WeakMap,de=new WeakMap,Re={get(e,t){if(!Te.includes(t))return e[t];let r=re[t];return r||(r=re[t]=function(...n){z.set(this,de.get(this)[t](...n))}),r}};async function*_e(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Re);for(de.set(r,t),K.set(r,H(t));t;)yield r,t=await(z.get(r)||t.continue()),z.delete(r)}function ne(e,t){return t===Symbol.asyncIterator&&J(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&J(e,[IDBIndex,IDBObjectStore])}ie(e=>({...e,get(t,r,n){return ne(t,r)?_e:e.get(t,r,n)},has(t,r){return ne(t,r)||e.has(t,r)}}));const je="ClassworksDB",xe=3,E=async()=>ue(je,xe,{upgrade(e){e.objectStoreNames.contains("kv")||e.createObjectStore("kv"),e.objectStoreNames.contains("system")||e.createObjectStore("system"),e.objectStoreNames.contains("syncQueue")||e.createObjectStore("syncQueue")}}),S={async loadData(e){try{const r=await(await E()).get("kv",e);return r?v(JSON.parse(r)):f("数据不存在","NOT_FOUND")}catch(t){return f("读取本地数据失败:"+t)}},async saveData(e,t){try{return await(await E()).put("kv",JSON.stringify(t),e),v(!0)}catch(r){return f("保存本地数据失败:"+r)}},async loadKeys(e={}){try{const s=await(await E()).transaction(["kv"],"readonly").objectStore("kv").getAllKeys(),{sortDir:a="asc",limit:o=100,skip:i=0}=e,c=s.sort((h,y)=>a==="desc"?y.localeCompare(h):h.localeCompare(y)),u=c.length,l=c.slice(i,i+o),g={keys:l,total_rows:u,current_page:{limit:o,skip:i,count:l.length},load_more:null};return v(g)}catch(t){return f("获取本地键名列表失败:"+t.message)}},async addToSyncQueue(e){try{return await(await E()).put("syncQueue",JSON.stringify(e),e.key),v(!0)}catch(t){return f("添加同步队列失败:"+t)}},async getSyncQueue(){try{const e=await E(),t=await e.getAllKeys("syncQueue"),r=[];for(const n of t){const s=await e.get("syncQueue",n);s&&r.push(JSON.parse(s))}return r.sort((n,s)=>n.timestamp-s.timestamp),v(r)}catch(e){return f("获取同步队列失败:"+e)}},async removeFromSyncQueue(e){try{return await(await E()).delete("syncQueue",e),v(!0)}catch(t){return f("删除同步队列项失败:"+t)}},async deleteByPrefix(e){try{const r=(await E()).transaction("kv","readwrite"),n=r.objectStore("kv"),s=await n.getAllKeys();let a=0;for(const o of s)o.startsWith(e)&&(await n.delete(o),a++);return await r.done,a}catch(t){return console.warn("kvLocalProvider.deleteByPrefix 失败:",t),0}}};function Le(e,t){return"headers"in e&&typeof e.headers=="object"&&!Array.isArray(e.headers)?U(e.headers):"getHeaders"in e&&typeof e.getHeaders=="function"?U(e.getHeaders()):U(e)}function U(e,t){const r=D(e,"ratelimit");if(r)return $e(r);let n;if(D(e,"ratelimit-remaining"))n="ratelimit-";else if(D(e,"x-ratelimit-remaining"))n="x-ratelimit-";else if(D(e,"x-rate-limit-remaining"))n="x-rate-limit-";else return;const s=p(D(e,`${n}limit`)),a=p(D(e,`${n}used`))||p(D(e,`${n}observed`)),o=p(D(e,`${n}remaining`));let i;const c=D(e,`${n}reset`);switch(void 0){case"date":{i=fe(c??"");break}case"unix":{i=G(c??"");break}case"seconds":{i=le(c??"");break}case"milliseconds":{i=Be(c??"");break}default:if(c)i=Fe(c);else{const l=D(e,"retry-after");l&&(i=G(l))}}return{limit:Number.isNaN(s)?a+o:s,used:Number.isNaN(a)?s-o:a,remaining:o,reset:i}}var Ae=/limit\s*=\s*(\d+)/i,Ce=/remaining\s*=\s*(\d+)/i,Ke=/reset\s*=\s*(\d+)/i;function $e(e){var t,r,n;const s=p((t=Ae.exec(e))==null?void 0:t[1]),a=p((r=Ce.exec(e))==null?void 0:r[1]),o=p((n=Ke.exec(e))==null?void 0:n[1]),i=X(o);return{limit:s,used:s-a,remaining:a,reset:i}}function X(e){const t=new Date;return t.setSeconds(t.getSeconds()+e),t}function p(e){return typeof e=="number"?e:Number.parseInt(e??"",10)}function D(e,t){var r;if("get"in e&&typeof e.get=="function")return(r=e.get(t))!=null?r:void 0;if(t in e&&typeof e[t]=="string")return e[t]}function fe(e){return new Date(e)}function G(e){const t=p(e);return new Date(t*1e3)}function le(e){const t=p(e);return X(t)}function Be(e){const t=p(e);return X(t/1e3)}var Pe=/[a-z]/i;function Fe(e){if(Pe.test(e))return fe(e);const t=p(e);return t&&t>1e9?G(t):le(t)}const w=ge.create({timeout:1e4});w.interceptors.request.use(e=>{const t=d("server.provider");if(t==="kv-server"||t==="classworkscloud"){const r=d("server.kvToken");if(r)e.headers["x-app-token"]=r;else{const n=d("server.siteKey");n&&(e.headers["x-site-key"]=he.encode(n))}}return e},e=>(console.log(e),Promise.reject(e)));w.interceptors.response.use(e=>e,e=>{if(e.response&&e.response.status===429)try{const t=Le(e.response);t&&Se.show(t.reset,e.config.url,e.config.method.toUpperCase())}catch(t){console.error("解析限速头信息失败:",t)}return Promise.reject(e)});const nt=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"})),b=()=>{const e={Accept:"application/json"},t=d("server.kvToken"),r=d("server.siteKey");return t?e["x-app-token"]=t:r&&(e["x-site-key"]=r),e},I={async loadNamespaceInfo(){var e,t;try{if(j())return await x(async s=>{const a=await w.get(`${s}/kv/_info`,{headers:b()});return v(a.data)});const r=d("server.domain"),n=await w.get(`${r}/kv/_info`,{headers:b()});return v(n.data)}catch(r){return console.error("获取命名空间信息失败:",r),f(((t=(e=r.response)==null?void 0:e.data)==null?void 0:t.message)||"获取命名空间信息失败","NAMESPACE_ERROR")}},async updateNamespaceInfo(e){var t,r;try{if(j())return await x(async a=>await w.put(`${a}/kv/_info`,e,{headers:b()}));const n=d("server.domain");return await w.put(`${n}/kv/_info`,e,{headers:b()})}catch(n){return f(((r=(t=n.response)==null?void 0:t.data)==null?void 0:r.message)||"更新命名空间信息失败","NAMESPACE_ERROR")}},async loadData(e){var t,r,n;try{if(j())return await x(async o=>{const i=await w.get(`${o}/kv/${e}`,{headers:b()});return v(i.data)});const s=d("server.domain"),a=await w.get(`${s}/kv/${e}`,{headers:b()});return v(a.data)}catch(s){return((t=s.response)==null?void 0:t.status)===404?f("数据不存在","NOT_FOUND"):(console.log(s),f(((n=(r=s.response)==null?void 0:r.data)==null?void 0:n.message)||"服务器连接失败","NETWORK_ERROR"))}},async saveData(e,t){var r,n;try{if(j())return await x(async a=>(await w.post(`${a}/kv/${e}`,t,{headers:b()}),v(!0)));const s=d("server.domain");return await w.post(`${s}/kv/${e}`,t,{headers:b()}),v(!0)}catch(s){return console.log(s),f(((n=(r=s.response)==null?void 0:r.data)==null?void 0:n.message)||"保存失败","SAVE_ERROR")}},async loadKeys(e={}){var t,r,n,s,a;try{const{sortBy:o="key",sortDir:i="asc",limit:c=100,skip:u=0}=e,l=new URLSearchParams({sortBy:o,sortDir:i,limit:c.toString(),skip:u.toString()});if(j())return await x(async y=>{const m=await w.get(`${y}/kv/_keys?${l}`,{headers:b()});return v(m.data)});const g=d("server.domain"),h=await w.get(`${g}/kv/_keys?${l}`,{headers:b()});return v(h.data)}catch(o){return((t=o.response)==null?void 0:t.status)===404?f("命名空间不存在","NOT_FOUND"):((r=o.response)==null?void 0:r.status)===403?f("无权限访问此命名空间","PERMISSION_DENIED"):((n=o.response)==null?void 0:n.status)===401?f("认证失败","UNAUTHORIZED"):(console.log(o),f(((a=(s=o.response)==null?void 0:s.data)==null?void 0:a.message)||"获取键名列表失败","NETWORK_ERROR"))}}};function T(e){return{vc:{[e]:0},ts:0,deviceId:e,_fieldTs:{},lastSyncedData:null,lastSyncedTs:0,lastSyncedVc:{[e]:0}}}function se(e,t){const r={...e.vc};return r[t]=(r[t]||0)+1,{...e,vc:r,ts:Date.now(),deviceId:t}}function Ue(e,t){const r={...e};for(const[n,s]of Object.entries(t))r[n]=Math.max(r[n]||0,s);return r}function R(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ve(e,t){if(!e&&!t)return{};if(!e)return{...t};if(!t)return{...e};const r={...e};for(const[n,s]of Object.entries(t)){const a=r[n];(!a||s.ts>a.ts||s.ts===a.ts&&s.deviceIdR(r)?r.id:JSON.stringify(r);if("name"in t)return r=>R(r)?r.name:JSON.stringify(r);if("key"in t)return r=>R(r)?r.key:JSON.stringify(r)}return null}function Qe(e,t,r){const n=ae(e)||ae(r)||(c=>JSON.stringify(c)),s=new Map,a=new Map;e.forEach(c=>{const u=n(c);s.has(u)||s.set(u,c)}),r.forEach(c=>{const u=n(c);a.has(u)||a.set(u,c)});const o=[],i=new Set;for(const[c,u]of s)i.has(c)||(i.add(c),o.push(u));for(const[c,u]of a)i.has(c)||(i.add(c),o.push(u));return o}function Je(e,t,r,n){var o,i;const s={},a=new Set([...Object.keys(e),...Object.keys(r)]);for(const c of a){const u=c in e,l=c in r;if(u&&!l)s[c]=e[c];else if(!u&&l)s[c]=r[c];else{const g=((o=t._fieldTs)==null?void 0:o[c])||{ts:t.ts,deviceId:t.deviceId},h=((i=n._fieldTs)==null?void 0:i[c])||{ts:n.ts,deviceId:n.deviceId};g.ts>h.ts?s[c]=e[c]:h.ts>g.ts?s[c]=r[c]:s[c]=g.deviceId<=h.deviceId?e[c]:r[c]}}return s}function Me(e,t,r,n){const s=Ue(t.vc||{},n.vc||{}),a=Math.max(t.ts||0,n.ts||0),o=Ve(t._fieldTs,n._fieldTs);let i;return R(e)&&R(r)?i=Je(e,t,r,n):Array.isArray(e)&&Array.isArray(r)?i=Qe(e,t,r):typeof e==typeof r&&typeof e!="object"?(t.ts||0)>(n.ts||0)?i=e:(n.ts||0)>(t.ts||0)?i=r:i=(t.deviceId||"")<=(n.deviceId||"")?e:r:i=(t.ts||0)>=(n.ts||0)?e:r,{data:i,meta:{vc:s,ts:a,deviceId:a===(t.ts||0)?t.deviceId:n.deviceId,_fieldTs:o,lastSyncedData:n.lastSyncedData??t.lastSyncedData??null,lastSyncedTs:Math.max(t.lastSyncedTs||0,n.lastSyncedTs||0),lastSyncedVc:s}}}const $="_cache:",We="ClassworksDB",ye=7*24*60*60*1e3,He=[{pattern:"*",ttl:ye}];async function Z(){return ue(We,void 0,{upgrade(e){e.objectStoreNames.contains("kv")||e.createObjectStore("kv"),e.objectStoreNames.contains("system")||e.createObjectStore("system"),e.objectStoreNames.contains("syncQueue")||e.createObjectStore("syncQueue")}})}function ze(e,t){const r="^"+e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(t)}function Ge(e){return e&&typeof e=="object"&&!("meta"in e)&&!("cacheTimestamp"in e)}function me(e){return e&&typeof e=="object"&&"meta"in e&&"cacheTimestamp"in e}function ve(e){for(const{pattern:t,ttl:r}of He)if(ze(t,e))return r;return ye}async function A(e){try{const t=await Z(),r=$+e,n=await t.get("kv",r);if(!n)return null;let s;try{s=typeof n=="string"?JSON.parse(n):n}catch{return null}if(Ge(s)){const a=d("device.uuid")||"unknown",o=T(a);o.ts=Date.now(),o.lastSyncedData=s;const i={data:s,meta:o,cacheTimestamp:Date.now(),cacheTTL:ve(e)};return await t.put("kv",JSON.stringify(i),r),{data:i.data,meta:i.meta}}return me(s)?Date.now()-s.cacheTimestamp>s.cacheTTL?(await t.delete("kv",r),null):{data:s.data,meta:s.meta}:null}catch(t){return console.warn("cacheManager.getCacheEntry 失败:",t),null}}async function N(e,t,r){try{const n=await Z(),s=$+e,a={data:t,meta:r,cacheTimestamp:Date.now(),cacheTTL:ve(e)};return await n.put("kv",JSON.stringify(a),s),!0}catch(n){return console.warn("cacheManager.setCacheEntry 失败:",n),!1}}async function we(){let e=0;try{const r=(await Z()).transaction("kv","readwrite"),n=r.objectStore("kv"),s=await n.getAllKeys();for(const a of s){if(!a.startsWith($))continue;const o=await n.get(a);if(!o)continue;let i;try{i=typeof o=="string"?JSON.parse(o):o}catch{continue}me(i)&&Date.now()-i.cacheTimestamp>i.cacheTTL&&(await n.delete(a),e++)}await r.done}catch(t){console.warn("cacheManager.cleanupExpiredEntries 失败:",t)}return e}let _=null,V=!1;async function C(e={}){var n;if(V)return{synced:0,failed:0};V=!0;let t=0,r=0;try{const s=await S.getSyncQueue();if(s.success===!1||!Array.isArray(s)||s.length===0)return{synced:0,failed:0};for(const a of s)try{const o=await I.saveData(a.key,a.data);if(o.success!==!1){if(await S.removeFromSyncQueue(a.key),a.meta){const i=d("device.uuid")||"unknown",c=await A(a.key);if(c){const u={...c.meta};u.lastSyncedData=a.data,u.lastSyncedTs=Date.now(),u.lastSyncedVc={...u.vc},await N(a.key,c.data,u)}else{const u=a.meta||T(i);u.lastSyncedData=a.data,u.lastSyncedTs=Date.now(),u.lastSyncedVc={...u.vc},await N(a.key,a.data,u)}}t++}else r++,e.silent||console.warn(`smartSync: 跳过 key=${a.key}, 服务器错误:`,(n=o.error)==null?void 0:n.message)}catch{r++;break}t>0&&we()}finally{V=!1}return!e.silent&&t>0&&console.log(`smartSync: 同步完成,成功 ${t} 条,失败 ${r} 条`),{synced:t,failed:r}}async function Xe(){try{const e=await S.getSyncQueue();if(e.success===!1||!Array.isArray(e)||e.length===0)return;C({silent:!0})}catch{}}function Ze(){_||(_=()=>C(),window.addEventListener("online",_),we(),navigator.onLine&&C())}function qe(){_&&(window.removeEventListener("online",_),_=null)}const v=e=>e,f=(e,t="UNKNOWN_ERROR")=>({success:!1,error:{code:t,message:e}});function Ye(e){return e&&e.success===!1}function oe(e){var t;return Ye(e)&&((t=e.error)==null?void 0:t.code)==="NETWORK_ERROR"}function ce(){return d("device.uuid")||"unknown"}function L(e){return e&&typeof e=="object"&&!Array.isArray(e)&&"value"in e?e.value:e}const st={init:Ze,destroy:qe,flushNow:C};function Q(){const e=d("server.provider");return e==="kv-server"||e==="classworkscloud"}const at={loadData:async e=>{if(!Q())return S.loadData(e);const t=await I.loadData(e),r=L(t);if(!oe(r)){if(r.success!==!1){const a=await A(e),o=ce();if(a){const i=L(a.data),c=JSON.stringify(i),u=JSON.stringify(r),l=JSON.stringify(L(a.meta.lastSyncedData)??null);if(u===c)return i;if(u!==l){const g=a.meta.vc||{},h=a.meta.lastSyncedVc||{};if((g[o]||0)>(h[o]||0)){const m=T("server");m.ts=Date.now();const k=Me(i,a.meta,r,m);return await N(e,k.data,k.meta),I.saveData(e,k.data),k.data}else{const m=T(o);return m.ts=Date.now(),m.lastSyncedData=r,m.lastSyncedTs=Date.now(),m.lastSyncedVc={...m.vc},await N(e,r,m),r}}else return i}else{const i=T(o);return i.ts=Date.now(),i.lastSyncedData=r,i.lastSyncedTs=Date.now(),i.lastSyncedVc={...i.vc},await N(e,r,i),r}}return r}const n=await A(e);if(n){const a=L(n.data);return typeof a=="object"&&a!==null&&(a.fromCache=!0),a}const s=await S.loadData($+e);return s.success!==!1?{...s,fromCache:!0}:r},saveData:async(e,t)=>{if(!Q())return S.saveData(e,t);const r=ce(),n=await A(e);let s;n?s=se(n.meta,r):s=se(T(r),r),await N(e,t,s);const a=await I.saveData(e,t);return a.success!==!1?(s.lastSyncedData=t,s.lastSyncedTs=Date.now(),s.lastSyncedVc={...s.vc},await N(e,t,s),await S.removeFromSyncQueue(e),Xe(),a):(await S.addToSyncQueue({key:e,data:t,timestamp:Date.now(),meta:s}),{success:!0,queuedForSync:!0})},loadKeys:async(e={})=>{if(!Q())return S.loadKeys(e);const t=await I.loadKeys(e);return oe(t)?S.loadKeys(e):t},async getKeyCloudUrl(e,t={}){var s;const{migrateFromLocal:r=!0,autoConfigureCloud:n=!0}=t;try{const a=d("server.provider");let o;a==="classworkscloud"?o=q():o=d("server.domain");let i=d("server.siteKey");const c=d("device.uuid");let u=!1;if(!o||!c)if(n){const y={"server.domain":"https://kv-service.houlang.cloud","server.siteKey":""};o||(B("server.domain",y["server.domain"]),o=y["server.domain"],u=!0),i||(B("server.siteKey",y["server.siteKey"]),i=y["server.siteKey"]),B("server.provider","classworkscloud"),o=q()}else return f("云端配置无效,请检查服务器域名和设备UUID","CONFIG_ERROR");let l=!1;if(r)try{const y=await S.loadData(e);if(y&&y.success!==!1){const m=await I.loadData(e);if(m&&m.success===!1&&((s=m.error)==null?void 0:s.code)==="NOT_FOUND"){const k=await I.saveData(e,y);k&&k.success!==!1&&(l=!0,console.log(`已成功将键 ${e} 的数据从本地迁移到云端`))}}}catch(y){console.warn(`迁移键 ${e} 的数据时出错:`,y)}const g=d("server.kvToken");return{success:!0,url:`${o}/kv/${e}?token=${g}`,migrated:l,configured:u}}catch(a){return console.error("获取键云端地址时出错:",a),f(a.message||"获取键云端地址失败","CLOUD_URL_ERROR")}}};export{w as a,S as b,nt as c,at as d,I as k,ue as o,st as s}; diff --git a/assets/debug-D_ZM-0TG.js b/assets/debug-DCZMB0S_.js similarity index 79% rename from assets/debug-D_ZM-0TG.js rename to assets/debug-DCZMB0S_.js index a7b2df3..243ec45 100644 --- a/assets/debug-D_ZM-0TG.js +++ b/assets/debug-DCZMB0S_.js @@ -1 +1 @@ -import{getVisitorId as u,getFingerprintData as f}from"./visitorId-2IHCmkCy.js";import{aa as m}from"./vendor-vuetify-95axeNJO.js";import{e as c,c as p,F as g,d as V,l as v,h as C}from"./index-CzpSlHRw.js";import{V as b}from"./VContainer-BIFGURze.js";import{D,X as _,Y as x,Z as t,j as e,a1 as l,k as y,S as k,b as s}from"./vendor-vue-28M5UGz3.js";const I=m("v-code","code"),j={__name:"debug",setup(B){const o=s(""),d=s({}),r=s(!1),n=async()=>{r.value=!0;try{o.value=await u(),d.value=await f()}catch(i){console.error(i),o.value="Error loading visitor ID"}finally{r.value=!1}};return D(()=>{n()}),(i,a)=>(_(),x(b,null,{default:t(()=>[e(c,{class:"mb-4"},{default:t(()=>[e(p,null,{default:t(()=>[...a[0]||(a[0]=[l("调试信息",-1)])]),_:1}),e(g,null,{default:t(()=>[...a[1]||(a[1]=[l(" 请将这个ID复制并私聊给开发者,以便进行问题排查。 ",-1)])]),_:1}),e(V,null,{default:t(()=>[a[2]||(a[2]=y("div",{class:"text-h6 mb-2"}," 访客 ID ",-1)),e(I,{class:"d-block pa-2 bg-grey-lighten-4 rounded mb-4"},{default:t(()=>[l(k(o.value||"加载中..."),1)]),_:1})]),_:1}),e(v,null,{default:t(()=>[e(C,{color:"primary",loading:r.value,onClick:n},{default:t(()=>[...a[3]||(a[3]=[l(" Refresh ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1}))}};export{j as default}; +import{getVisitorId as u,getFingerprintData as f}from"./visitorId-D_nwlNzA.js";import{aa as m}from"./vendor-vuetify-DsKlzgKp.js";import{e as c,c as p,F as g,d as V,l as v,h as C}from"./index-DGIAsv4W.js";import{V as b}from"./VContainer-DZyPrcqa.js";import{D,X as _,Y as x,Z as t,j as e,a1 as l,k as y,S as k,b as s}from"./vendor-vue-BiQC5iF7.js";const I=m("v-code","code"),j={__name:"debug",setup(B){const o=s(""),d=s({}),r=s(!1),n=async()=>{r.value=!0;try{o.value=await u(),d.value=await f()}catch(i){console.error(i),o.value="Error loading visitor ID"}finally{r.value=!1}};return D(()=>{n()}),(i,a)=>(_(),x(b,null,{default:t(()=>[e(c,{class:"mb-4"},{default:t(()=>[e(p,null,{default:t(()=>[...a[0]||(a[0]=[l("调试信息",-1)])]),_:1}),e(g,null,{default:t(()=>[...a[1]||(a[1]=[l(" 请将这个ID复制并私聊给开发者,以便进行问题排查。 ",-1)])]),_:1}),e(V,null,{default:t(()=>[a[2]||(a[2]=y("div",{class:"text-h6 mb-2"}," 访客 ID ",-1)),e(I,{class:"d-block pa-2 bg-grey-lighten-4 rounded mb-4"},{default:t(()=>[l(k(o.value||"加载中..."),1)]),_:1})]),_:1}),e(v,null,{default:t(()=>[e(C,{color:"primary",loading:r.value,onClick:n},{default:t(()=>[...a[3]||(a[3]=[l(" Refresh ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1}))}};export{j as default}; diff --git a/assets/debug-init-CsSxd_OS.js b/assets/debug-init-57thZXh2.js similarity index 84% rename from assets/debug-init-CsSxd_OS.js rename to assets/debug-init-57thZXh2.js index 4bd0089..176b890 100644 --- a/assets/debug-init-CsSxd_OS.js +++ b/assets/debug-init-57thZXh2.js @@ -1 +1 @@ -import{n as r,e as k,c as g,d as _,i as R,h as f,p as U,q as C,r as S,t as T,s}from"./index-CzpSlHRw.js";import{k as N}from"./dataProvider-DBZnFcYO.js";import{V as B,a as D}from"./VRow-sd4d6eNi.js";import{V as G}from"./VForm-DIiMelbi.js";import{V as n}from"./VTextField-BxdS2D7S.js";import{V as F}from"./VContainer-BIFGURze.js";import{b as i,a4 as K,X as Y,Y as j,Z as t,j as e,a1 as o,S as c,e as y}from"./vendor-vue-28M5UGz3.js";import"./vendor-vuetify-95axeNJO.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";const I="kvinit.redirecting",W={__name:"debug-init",setup(q){const d=i(r("server.provider")||"kv-server"),m=i(r("server.kvToken")||""),v=i(r("device.uuid")||"00000000-0000-4000-8000-000000000000"),p=i(r("server.authDomain")||"https://cs.example.com"),b=()=>{s("server.provider",d.value),s("server.kvToken",m.value),s("device.uuid",v.value),s("server.authDomain",p.value),location.reload()},w=()=>{try{sessionStorage.removeItem(I)}catch(u){console.debug(u)}},x=()=>{N.loadNamespaceInfo=async()=>{throw new Error("模拟加载错误")},location.reload()},E=y(()=>{try{return sessionStorage.getItem(I)}catch(u){return String(u)}}),L=y(()=>JSON.stringify({provider:r("server.provider"),kvToken:r("server.kvToken"),uuid:r("device.uuid"),authDomain:r("server.authDomain")},null,2));return(u,l)=>{const V=K("v-list-item-content");return Y(),j(F,null,{default:t(()=>[e(B,null,{default:t(()=>[e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[4]||(l[4]=[o("KvInitialize 调试面板",-1)])]),_:1}),e(_,null,{default:t(()=>[e(G,null,{default:t(()=>[e(n,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=a=>d.value=a),label:"server.provider (kv-server/classworkscloud/other)"},null,8,["modelValue"]),e(n,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=a=>m.value=a),label:"server.kvToken (空表示未授权)"},null,8,["modelValue"]),e(n,{modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=a=>v.value=a),label:"device.uuid"},null,8,["modelValue"]),e(n,{modelValue:p.value,"onUpdate:modelValue":l[3]||(l[3]=a=>p.value=a),label:"server.authDomain"},null,8,["modelValue"])]),_:1}),e(R,{class:"my-4"}),e(f,{class:"me-2",color:"primary",onClick:b},{default:t(()=>[...l[5]||(l[5]=[o(" 应用设置 ",-1)])]),_:1}),e(f,{class:"me-2",color:"secondary",onClick:w},{default:t(()=>[...l[6]||(l[6]=[o(" 清除重定向守卫 ",-1)])]),_:1}),e(f,{color:"error",onClick:x},{default:t(()=>[...l[7]||(l[7]=[o(" 模拟命名空间加载错误 ",-1)])]),_:1}),e(U,{"two-line":""},{default:t(()=>[e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[8]||(l[8]=[o("当前 sessionGuard",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(E.value),1)]),_:1})]),_:1})]),_:1}),e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[9]||(l[9]=[o("当前 settings",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(L.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[10]||(l[10]=[o("初始化组件已替换",-1)])]),_:1}),e(_,null,{default:t(()=>[...l[11]||(l[11]=[o(" 已迁移为首页内联的 InitServiceChooser 组件。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{W as default}; +import{n as r,e as k,c as g,d as _,i as R,h as f,p as U,q as C,r as S,t as T,s}from"./index-DGIAsv4W.js";import{k as N}from"./dataProvider-GWPC-0Vt.js";import{V as B,a as D}from"./VRow-Cjhiymuu.js";import{V as G}from"./VForm-ObW_L7SS.js";import{V as n}from"./VTextField-BurlcggD.js";import{V as F}from"./VContainer-DZyPrcqa.js";import{b as i,a4 as K,X as Y,Y as j,Z as t,j as e,a1 as o,S as c,e as y}from"./vendor-vue-BiQC5iF7.js";import"./vendor-vuetify-DsKlzgKp.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";const I="kvinit.redirecting",W={__name:"debug-init",setup(q){const d=i(r("server.provider")||"kv-server"),m=i(r("server.kvToken")||""),v=i(r("device.uuid")||"00000000-0000-4000-8000-000000000000"),p=i(r("server.authDomain")||"https://cs.example.com"),b=()=>{s("server.provider",d.value),s("server.kvToken",m.value),s("device.uuid",v.value),s("server.authDomain",p.value),location.reload()},w=()=>{try{sessionStorage.removeItem(I)}catch(u){console.debug(u)}},x=()=>{N.loadNamespaceInfo=async()=>{throw new Error("模拟加载错误")},location.reload()},E=y(()=>{try{return sessionStorage.getItem(I)}catch(u){return String(u)}}),L=y(()=>JSON.stringify({provider:r("server.provider"),kvToken:r("server.kvToken"),uuid:r("device.uuid"),authDomain:r("server.authDomain")},null,2));return(u,l)=>{const V=K("v-list-item-content");return Y(),j(F,null,{default:t(()=>[e(B,null,{default:t(()=>[e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[4]||(l[4]=[o("KvInitialize 调试面板",-1)])]),_:1}),e(_,null,{default:t(()=>[e(G,null,{default:t(()=>[e(n,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=a=>d.value=a),label:"server.provider (kv-server/classworkscloud/other)"},null,8,["modelValue"]),e(n,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=a=>m.value=a),label:"server.kvToken (空表示未授权)"},null,8,["modelValue"]),e(n,{modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=a=>v.value=a),label:"device.uuid"},null,8,["modelValue"]),e(n,{modelValue:p.value,"onUpdate:modelValue":l[3]||(l[3]=a=>p.value=a),label:"server.authDomain"},null,8,["modelValue"])]),_:1}),e(R,{class:"my-4"}),e(f,{class:"me-2",color:"primary",onClick:b},{default:t(()=>[...l[5]||(l[5]=[o(" 应用设置 ",-1)])]),_:1}),e(f,{class:"me-2",color:"secondary",onClick:w},{default:t(()=>[...l[6]||(l[6]=[o(" 清除重定向守卫 ",-1)])]),_:1}),e(f,{color:"error",onClick:x},{default:t(()=>[...l[7]||(l[7]=[o(" 模拟命名空间加载错误 ",-1)])]),_:1}),e(U,{"two-line":""},{default:t(()=>[e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[8]||(l[8]=[o("当前 sessionGuard",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(E.value),1)]),_:1})]),_:1})]),_:1}),e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[9]||(l[9]=[o("当前 settings",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(L.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[10]||(l[10]=[o("初始化组件已替换",-1)])]),_:1}),e(_,null,{default:t(()=>[...l[11]||(l[11]=[o(" 已迁移为首页内联的 InitServiceChooser 组件。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{W as default}; diff --git a/assets/debug-socket-BtS3Wegp.js b/assets/debug-socket-iwz8uZ6l.js similarity index 91% rename from assets/debug-socket-BtS3Wegp.js rename to assets/debug-socket-iwz8uZ6l.js index 27a6c5f..1379c0b 100644 --- a/assets/debug-socket-BtS3Wegp.js +++ b/assets/debug-socket-iwz8uZ6l.js @@ -1 +1 @@ -import{n as te,e as x,c as b,d as w,p as A,q as f,r as v,t as m,i as K,h as i,g as M,o as le}from"./index-CzpSlHRw.js";import{g as U,b as J,j as O,a as p,c as ne,l as ae}from"./socketClient-pOSoE2ci.js";import{s as oe,D as se}from"./deviceEvents-CH859Fwr.js";import{V as j,a as _}from"./VRow-sd4d6eNi.js";import{V as re}from"./VChip-B3whZF-S.js";import{V as ue}from"./VTextField-BxdS2D7S.js";import{V as ie}from"./VTextarea-zDVNnlPQ.js";import{V as de}from"./VContainer-BIFGURze.js";import{b as d,D as ce,A as fe,a4 as ve,X as c,Y as D,Z as l,j as t,a1 as o,S as u,_ as L,$ as me,k as B,F as R,a2 as Y,e as I}from"./vendor-vue-28M5UGz3.js";import"./vendor-vuetify-95axeNJO.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-xQe1elLG.js";const pe={key:0},_e={class:"d-flex"},ge={key:1,class:"text-grey"},ke={class:"text-caption text-grey"},ye={class:"ml-2"},Ve={class:"mb-2",style:{"white-space":"pre-wrap"}},Ie={__name:"debug-socket",setup(Se){const g=d(te("server.kvToken")||""),$=d(""),r=d(""),k=d(!1),T=d(""),y=d([]),C=d([]),V=d(""),N=I(()=>ne()),q=I(()=>{const n=new Date,e=n.getFullYear(),S=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0");return`classworks-data-${e}${S}${s}`});function a(n,e){const S=new Date().toLocaleTimeString();y.value.unshift({time:S,event:n,payload:typeof e=="string"?e:JSON.stringify(e,null,2)}),y.value.length>200&&y.value.pop()}function H(){const n=U();k.value=!!n.connected,T.value=n.id||"",n.on("connect",()=>{k.value=!0,T.value=n.id||"",a("connect",{id:n.id}),r.value&&O(r.value)}),n.on("disconnect",e=>{k.value=!1,a("disconnect",{reason:e})}),n.on("connect_error",e=>a("connect_error",{message:e==null?void 0:e.message})),n.on("reconnect_attempt",e=>a("reconnect_attempt",{attempt:e})),n.on("reconnect",e=>a("reconnect",{attempt:e}))}function X(){p("kv-key-changed",n=>{a("kv-key-changed",n)}),p("device-joined",n=>{a("device-joined",n)}),p("joined",n=>{a("joined",n)}),p("join-error",n=>{a("join-error",n)}),p("chat:message",n=>{a("chat:message",n)}),p("device-event",n=>{a("device-event",n)})}function z(n){try{if(!n){a("join-error","Token 为空");return}O(n),r.value=n,a("join-token",{token:n})}catch(e){a("join-token-error",String(e))}}function Z(n){try{J(n),r.value===n&&(r.value=""),a("leave-token",{token:n})}catch(e){a("leave-token-error",String(e))}}function G(){try{ae(),r.value="",a("leave-all",{})}catch(n){a("leave-all-error",String(n))}}function P(){try{U().connect()}catch(n){a("reconnect-error",String(n))}}const Q=I(()=>{var e;return!!((((e=V.value)==null?void 0:e.trim())||"")&&(r.value||g.value))});function W(){try{const n=(V.value||"").trim();if(!n)return;oe(n),a("send-event",{type:se.CHAT,content:{text:n}}),V.value=""}catch(n){a("chat:error",String(n))}}function h(n){a("select-device",{message:"请输入该设备对应的 KV Token 以加入频道",device:n})}async function E(){try{const e=await(await fetch(`${N.value}/devices/online`)).json();C.value=Array.isArray(e==null?void 0:e.devices)?e.devices:[],a("fetch-online",{count:C.value.length})}catch(n){a("fetch-online-error",String(n))}}function ee(){y.value=[]}return ce(()=>{U(),H(),X(),g.value&&z(g.value),E()}),fe(()=>{try{r.value&&J(r.value)}catch{}}),(n,e)=>{const S=ve("v-list-item-text");return c(),D(de,null,{default:l(()=>[t(j,null,{default:l(()=>[t(_,{cols:"12",md:"6"},{default:l(()=>[t(x,{border:"",class:"mb-4"},{default:l(()=>[t(b,null,{default:l(()=>[...e[4]||(e[4]=[o("连接信息",-1)])]),_:1}),t(w,null,{default:l(()=>[t(A,{density:"compact"},{default:l(()=>[t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[5]||(e[5]=[o("Server URL",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(N.value),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[6]||(e[6]=[o("当前 KV Token",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(g.value||"(未配置)"),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[7]||(e[7]=[o("连接状态",-1)])]),_:1}),t(m,null,{default:l(()=>[t(re,{color:k.value?"success":"error",class:"mr-2",size:"small"},{default:l(()=>[o(u(k.value?"connected":"disconnected"),1)]),_:1},8,["color"]),T.value?(c(),L("span",pe,"id: "+u(T.value),1)):me("",!0)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[8]||(e[8]=[o("已加入 Token",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(r.value||"-"),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[9]||(e[9]=[o("当前数据键",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(q.value),1)]),_:1})]),_:1})]),_:1}),t(K,{class:"my-4"}),t(j,null,{default:l(()=>[t(_,{cols:"12",md:"8"},{default:l(()=>[t(ue,{modelValue:$.value,"onUpdate:modelValue":e[0]||(e[0]=s=>$.value=s),clearable:"",label:"手动加入 Token (留空使用配置的 Token)"},null,8,["modelValue"])]),_:1}),t(_,{class:"d-flex align-center",cols:"12",md:"4"},{default:l(()=>[t(i,{class:"mr-2",color:"primary",onClick:e[1]||(e[1]=s=>z($.value||g.value))},{default:l(()=>[...e[10]||(e[10]=[o(" 加入 ",-1)])]),_:1}),t(i,{disabled:!r.value,class:"mr-2",color:"warning",onClick:e[2]||(e[2]=s=>Z(r.value))},{default:l(()=>[...e[11]||(e[11]=[o(" 离开当前 ",-1)])]),_:1},8,["disabled"]),t(i,{color:"error",variant:"tonal",onClick:G},{default:l(()=>[...e[12]||(e[12]=[o(" 离开全部 ",-1)])]),_:1})]),_:1})]),_:1}),t(K,{class:"my-4"}),t(j,null,{default:l(()=>[t(_,{cols:"12"},{default:l(()=>[t(x,{border:"",color:"primary",variant:"tonal"},{default:l(()=>[t(b,{class:"text-subtitle-1"},{default:l(()=>[...e[13]||(e[13]=[o(" 聊天室消息 ",-1)])]),_:1}),t(w,null,{default:l(()=>[t(ie,{modelValue:V.value,"onUpdate:modelValue":e[3]||(e[3]=s=>V.value=s),"auto-grow":"",clearable:"",label:"发送到当前已加入的设备频道",rows:"2"},null,8,["modelValue"]),B("div",_e,[t(M),t(i,{disabled:!Q.value,color:"primary",onClick:W},{default:l(()=>[...e[14]||(e[14]=[o(" 发送聊天 ",-1)])]),_:1},8,["disabled"])])]),_:1})]),_:1})]),_:1})]),_:1}),t(j,null,{default:l(()=>[t(_,{cols:"12"},{default:l(()=>[t(i,{color:"secondary",variant:"tonal",onClick:P},{default:l(()=>[...e[15]||(e[15]=[o(" 重新连接 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(x,{border:""},{default:l(()=>[t(b,null,{default:l(()=>[...e[16]||(e[16]=[o("在线设备",-1)])]),_:1}),t(w,null,{default:l(()=>[t(i,{class:"mb-3",color:"primary",onClick:E},{default:l(()=>[...e[17]||(e[17]=[o(" 刷新在线列表 ",-1)])]),_:1}),C.value.length?(c(),D(A,{key:0,density:"compact"},{default:l(()=>[(c(!0),L(R,null,Y(C.value,s=>(c(),D(f,{key:s.uuid},{prepend:l(()=>[t(le,{color:s.connections>0?"success":"grey",size:"24"},null,8,["color"])]),append:l(()=>[t(i,{size:"small",variant:"text",onClick:F=>h(s)},{default:l(()=>[...e[18]||(e[18]=[o(" 选择 ",-1)])]),_:1},8,["onClick"])]),default:l(()=>[t(v,null,{default:l(()=>[o(u(s.name||"(未命名)"),1)]),_:2},1024),t(m,null,{default:l(()=>[o(u(s.uuid)+" · 连接数 "+u(s.connections),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(c(),L("div",ge," 暂无数据 "))]),_:1})]),_:1})]),_:1}),t(_,{cols:"12",md:"6"},{default:l(()=>[t(x,{border:""},{default:l(()=>[t(b,{class:"d-flex align-center"},{default:l(()=>[e[20]||(e[20]=o(" 事件日志 ",-1)),t(M),t(i,{color:"error",size:"small",variant:"text",onClick:ee},{default:l(()=>[...e[19]||(e[19]=[o(" 清空 ",-1)])]),_:1})]),_:1}),t(w,null,{default:l(()=>[t(A,{density:"compact"},{default:l(()=>[(c(!0),L(R,null,Y(y.value,(s,F)=>(c(),D(f,{key:F},{default:l(()=>[t(v,null,{default:l(()=>[B("span",ke,u(s.time),1),B("span",ye,u(s.event),1)]),_:2},1024),t(S,null,{default:l(()=>[B("pre",Ve,u(s.payload),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{Ie as default}; +import{n as te,e as x,c as b,d as w,p as A,q as f,r as v,t as m,i as K,h as i,g as M,o as le}from"./index-DGIAsv4W.js";import{g as U,b as J,j as O,a as p,c as ne,l as ae}from"./socketClient-BKHEsaLg.js";import{s as oe,D as se}from"./deviceEvents-HN9RDua9.js";import{V as j,a as _}from"./VRow-Cjhiymuu.js";import{V as re}from"./VChip-mRzIPuM0.js";import{V as ue}from"./VTextField-BurlcggD.js";import{V as ie}from"./VTextarea-vGWmTJww.js";import{V as de}from"./VContainer-DZyPrcqa.js";import{b as d,D as ce,A as fe,a4 as ve,X as c,Y as D,Z as l,j as t,a1 as o,S as u,_ as L,$ as me,k as B,F as R,a2 as Y,e as I}from"./vendor-vue-BiQC5iF7.js";import"./vendor-vuetify-DsKlzgKp.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-BtcwvdZJ.js";const pe={key:0},_e={class:"d-flex"},ge={key:1,class:"text-grey"},ke={class:"text-caption text-grey"},ye={class:"ml-2"},Ve={class:"mb-2",style:{"white-space":"pre-wrap"}},Ie={__name:"debug-socket",setup(Se){const g=d(te("server.kvToken")||""),$=d(""),r=d(""),k=d(!1),T=d(""),y=d([]),C=d([]),V=d(""),N=I(()=>ne()),q=I(()=>{const n=new Date,e=n.getFullYear(),S=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0");return`classworks-data-${e}${S}${s}`});function a(n,e){const S=new Date().toLocaleTimeString();y.value.unshift({time:S,event:n,payload:typeof e=="string"?e:JSON.stringify(e,null,2)}),y.value.length>200&&y.value.pop()}function H(){const n=U();k.value=!!n.connected,T.value=n.id||"",n.on("connect",()=>{k.value=!0,T.value=n.id||"",a("connect",{id:n.id}),r.value&&O(r.value)}),n.on("disconnect",e=>{k.value=!1,a("disconnect",{reason:e})}),n.on("connect_error",e=>a("connect_error",{message:e==null?void 0:e.message})),n.on("reconnect_attempt",e=>a("reconnect_attempt",{attempt:e})),n.on("reconnect",e=>a("reconnect",{attempt:e}))}function X(){p("kv-key-changed",n=>{a("kv-key-changed",n)}),p("device-joined",n=>{a("device-joined",n)}),p("joined",n=>{a("joined",n)}),p("join-error",n=>{a("join-error",n)}),p("chat:message",n=>{a("chat:message",n)}),p("device-event",n=>{a("device-event",n)})}function z(n){try{if(!n){a("join-error","Token 为空");return}O(n),r.value=n,a("join-token",{token:n})}catch(e){a("join-token-error",String(e))}}function Z(n){try{J(n),r.value===n&&(r.value=""),a("leave-token",{token:n})}catch(e){a("leave-token-error",String(e))}}function G(){try{ae(),r.value="",a("leave-all",{})}catch(n){a("leave-all-error",String(n))}}function P(){try{U().connect()}catch(n){a("reconnect-error",String(n))}}const Q=I(()=>{var e;return!!((((e=V.value)==null?void 0:e.trim())||"")&&(r.value||g.value))});function W(){try{const n=(V.value||"").trim();if(!n)return;oe(n),a("send-event",{type:se.CHAT,content:{text:n}}),V.value=""}catch(n){a("chat:error",String(n))}}function h(n){a("select-device",{message:"请输入该设备对应的 KV Token 以加入频道",device:n})}async function E(){try{const e=await(await fetch(`${N.value}/devices/online`)).json();C.value=Array.isArray(e==null?void 0:e.devices)?e.devices:[],a("fetch-online",{count:C.value.length})}catch(n){a("fetch-online-error",String(n))}}function ee(){y.value=[]}return ce(()=>{U(),H(),X(),g.value&&z(g.value),E()}),fe(()=>{try{r.value&&J(r.value)}catch{}}),(n,e)=>{const S=ve("v-list-item-text");return c(),D(de,null,{default:l(()=>[t(j,null,{default:l(()=>[t(_,{cols:"12",md:"6"},{default:l(()=>[t(x,{border:"",class:"mb-4"},{default:l(()=>[t(b,null,{default:l(()=>[...e[4]||(e[4]=[o("连接信息",-1)])]),_:1}),t(w,null,{default:l(()=>[t(A,{density:"compact"},{default:l(()=>[t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[5]||(e[5]=[o("Server URL",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(N.value),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[6]||(e[6]=[o("当前 KV Token",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(g.value||"(未配置)"),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[7]||(e[7]=[o("连接状态",-1)])]),_:1}),t(m,null,{default:l(()=>[t(re,{color:k.value?"success":"error",class:"mr-2",size:"small"},{default:l(()=>[o(u(k.value?"connected":"disconnected"),1)]),_:1},8,["color"]),T.value?(c(),L("span",pe,"id: "+u(T.value),1)):me("",!0)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[8]||(e[8]=[o("已加入 Token",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(r.value||"-"),1)]),_:1})]),_:1}),t(f,null,{default:l(()=>[t(v,null,{default:l(()=>[...e[9]||(e[9]=[o("当前数据键",-1)])]),_:1}),t(m,null,{default:l(()=>[o(u(q.value),1)]),_:1})]),_:1})]),_:1}),t(K,{class:"my-4"}),t(j,null,{default:l(()=>[t(_,{cols:"12",md:"8"},{default:l(()=>[t(ue,{modelValue:$.value,"onUpdate:modelValue":e[0]||(e[0]=s=>$.value=s),clearable:"",label:"手动加入 Token (留空使用配置的 Token)"},null,8,["modelValue"])]),_:1}),t(_,{class:"d-flex align-center",cols:"12",md:"4"},{default:l(()=>[t(i,{class:"mr-2",color:"primary",onClick:e[1]||(e[1]=s=>z($.value||g.value))},{default:l(()=>[...e[10]||(e[10]=[o(" 加入 ",-1)])]),_:1}),t(i,{disabled:!r.value,class:"mr-2",color:"warning",onClick:e[2]||(e[2]=s=>Z(r.value))},{default:l(()=>[...e[11]||(e[11]=[o(" 离开当前 ",-1)])]),_:1},8,["disabled"]),t(i,{color:"error",variant:"tonal",onClick:G},{default:l(()=>[...e[12]||(e[12]=[o(" 离开全部 ",-1)])]),_:1})]),_:1})]),_:1}),t(K,{class:"my-4"}),t(j,null,{default:l(()=>[t(_,{cols:"12"},{default:l(()=>[t(x,{border:"",color:"primary",variant:"tonal"},{default:l(()=>[t(b,{class:"text-subtitle-1"},{default:l(()=>[...e[13]||(e[13]=[o(" 聊天室消息 ",-1)])]),_:1}),t(w,null,{default:l(()=>[t(ie,{modelValue:V.value,"onUpdate:modelValue":e[3]||(e[3]=s=>V.value=s),"auto-grow":"",clearable:"",label:"发送到当前已加入的设备频道",rows:"2"},null,8,["modelValue"]),B("div",_e,[t(M),t(i,{disabled:!Q.value,color:"primary",onClick:W},{default:l(()=>[...e[14]||(e[14]=[o(" 发送聊天 ",-1)])]),_:1},8,["disabled"])])]),_:1})]),_:1})]),_:1})]),_:1}),t(j,null,{default:l(()=>[t(_,{cols:"12"},{default:l(()=>[t(i,{color:"secondary",variant:"tonal",onClick:P},{default:l(()=>[...e[15]||(e[15]=[o(" 重新连接 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(x,{border:""},{default:l(()=>[t(b,null,{default:l(()=>[...e[16]||(e[16]=[o("在线设备",-1)])]),_:1}),t(w,null,{default:l(()=>[t(i,{class:"mb-3",color:"primary",onClick:E},{default:l(()=>[...e[17]||(e[17]=[o(" 刷新在线列表 ",-1)])]),_:1}),C.value.length?(c(),D(A,{key:0,density:"compact"},{default:l(()=>[(c(!0),L(R,null,Y(C.value,s=>(c(),D(f,{key:s.uuid},{prepend:l(()=>[t(le,{color:s.connections>0?"success":"grey",size:"24"},null,8,["color"])]),append:l(()=>[t(i,{size:"small",variant:"text",onClick:F=>h(s)},{default:l(()=>[...e[18]||(e[18]=[o(" 选择 ",-1)])]),_:1},8,["onClick"])]),default:l(()=>[t(v,null,{default:l(()=>[o(u(s.name||"(未命名)"),1)]),_:2},1024),t(m,null,{default:l(()=>[o(u(s.uuid)+" · 连接数 "+u(s.connections),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(c(),L("div",ge," 暂无数据 "))]),_:1})]),_:1})]),_:1}),t(_,{cols:"12",md:"6"},{default:l(()=>[t(x,{border:""},{default:l(()=>[t(b,{class:"d-flex align-center"},{default:l(()=>[e[20]||(e[20]=o(" 事件日志 ",-1)),t(M),t(i,{color:"error",size:"small",variant:"text",onClick:ee},{default:l(()=>[...e[19]||(e[19]=[o(" 清空 ",-1)])]),_:1})]),_:1}),t(w,null,{default:l(()=>[t(A,{density:"compact"},{default:l(()=>[(c(!0),L(R,null,Y(y.value,(s,F)=>(c(),D(f,{key:F},{default:l(()=>[t(v,null,{default:l(()=>[B("span",ke,u(s.time),1),B("span",ye,u(s.event),1)]),_:2},1024),t(S,null,{default:l(()=>[B("pre",Ve,u(s.payload),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{Ie as default}; diff --git a/assets/default-BFwhCf_0.js b/assets/default-VxHjJPAZ.js similarity index 77% rename from assets/default-BFwhCf_0.js rename to assets/default-VxHjJPAZ.js index 6b1b456..5ca57a4 100644 --- a/assets/default-BFwhCf_0.js +++ b/assets/default-VxHjJPAZ.js @@ -1 +1 @@ -import{p as c,k as i,f as u,a7 as _,u as p}from"./vendor-vuetify-95axeNJO.js";import{m as d,a as f,u as v,b as k}from"./index-CzpSlHRw.js";import{j as l,N as y,n as B,k as V,Y as b,a4 as C,X as S,Z as g}from"./vendor-vue-28M5UGz3.js";const M=c({scrollable:Boolean,...i(),...f(),...d({tag:"main"})},"VMain"),P=u()({name:"VMain",props:M(),setup(e,o){let{slots:a}=o;const{dimensionStyles:s}=k(e),{mainStyles:r}=_(),{ssrBootStyles:m}=v();return p(()=>l(e.tag,{class:B(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:y([r.value,m.value,s.value,e.style])},{default:()=>{var n,t;return[e.scrollable?V("div",{class:"v-main__scroller"},[(n=a.default)==null?void 0:n.call(a)]):(t=a.default)==null?void 0:t.call(a)]}})),{}}}),h={__name:"default",setup(e){return(o,a)=>{const s=C("router-view");return S(),b(P,null,{default:g(()=>[l(s)]),_:1})}}};export{h as default}; +import{p as c,k as i,f as u,a7 as _,u as p}from"./vendor-vuetify-DsKlzgKp.js";import{m as d,a as f,u as v,b as k}from"./index-DGIAsv4W.js";import{j as l,N as y,n as B,k as V,Y as b,a4 as C,X as S,Z as g}from"./vendor-vue-BiQC5iF7.js";const M=c({scrollable:Boolean,...i(),...f(),...d({tag:"main"})},"VMain"),P=u()({name:"VMain",props:M(),setup(e,o){let{slots:a}=o;const{dimensionStyles:s}=k(e),{mainStyles:r}=_(),{ssrBootStyles:m}=v();return p(()=>l(e.tag,{class:B(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:y([r.value,m.value,s.value,e.style])},{default:()=>{var n,t;return[e.scrollable?V("div",{class:"v-main__scroller"},[(n=a.default)==null?void 0:n.call(a)]):(t=a.default)==null?void 0:t.call(a)]}})),{}}}),h={__name:"default",setup(e){return(o,a)=>{const s=C("router-view");return S(),b(P,null,{default:g(()=>[l(s)]),_:1})}}};export{h as default}; diff --git a/assets/deviceEvents-CH859Fwr.js b/assets/deviceEvents-HN9RDua9.js similarity index 97% rename from assets/deviceEvents-CH859Fwr.js rename to assets/deviceEvents-HN9RDua9.js index cb340a8..db71387 100644 --- a/assets/deviceEvents-CH859Fwr.js +++ b/assets/deviceEvents-HN9RDua9.js @@ -1 +1 @@ -import{s as E}from"./socketClient-pOSoE2ci.js";const t={CHAT:"chat",KV_KEY_CHANGED:"kv-key-changed",URGENT_NOTICE:"urgent-notice",NOTIFICATION:"notification"};function m(e){if(!e||typeof e!="string")throw new Error("消息文本不能为空");E(t.CHAT,{text:e.trim()})}function I(e,n={}){if(!e||!e.type){console.warn("无效的设备事件数据:",e);return}const o=n[e.type];if(typeof o=="function")try{o(e)}catch(c){console.error(`处理设备事件 ${e.type} 时出错:`,c)}}function g(e){var n;if(e.type!==t.CHAT)throw new Error("不是聊天事件");return{text:((n=e.content)==null?void 0:n.text)||"",senderId:e.senderId,at:e.timestamp,uuid:e.uuid,senderInfo:e.senderInfo}}function T(e){var n,o,c,i,u,s;if(e.type!==t.KV_KEY_CHANGED)throw new Error("不是 KV 变化事件");return{uuid:e.uuid,key:(n=e.content)==null?void 0:n.key,action:(o=e.content)==null?void 0:o.action,created:(c=e.content)==null?void 0:c.created,updatedAt:(i=e.content)==null?void 0:i.updatedAt,deletedAt:(u=e.content)==null?void 0:u.deletedAt,batch:(s=e.content)==null?void 0:s.batch}}function p(e){var n,o,c,i;if(e.type!==t.URGENT_NOTICE)throw new Error("不是紧急通知事件");return{urgency:((n=e.content)==null?void 0:n.urgency)||"info",message:((o=e.content)==null?void 0:o.message)||"",targetDevices:((c=e.content)==null?void 0:c.targetDevices)||[],senderId:e.senderId,senderInfo:((i=e.content)==null?void 0:i.senderInfo)||e.senderInfo,timestamp:e.timestamp}}function y(e){var n,o,c,i;if(e.type!==t.NOTIFICATION)throw new Error("不是通知事件");return{message:((n=e.content)==null?void 0:n.message)||"",isUrgent:((o=e.content)==null?void 0:o.isUrgent)||!1,targetDevices:((c=e.content)==null?void 0:c.targetDevices)||[],senderId:e.senderId,senderInfo:((i=e.content)==null?void 0:i.senderInfo)||e.senderInfo,timestamp:e.timestamp,eventId:e.eventId}}function C(e){return e?e.deviceName==="realtime"?"实时同步":`${e.deviceName||"未知设备"} (${e.deviceType||"未知类型"})`:"未知设备"}function h(e={}){const{onChat:n,onKvChanged:o,onUrgentNotice:c,onNotification:i,onOtherEvent:u,enableLegacySupport:s=!0}=e;return d=>{I(d,{[t.CHAT]:r=>{if(n){const f=s?g(r):r;n(f,r)}},[t.KV_KEY_CHANGED]:r=>{if(o){const f=s?T(r):r;o(f,r)}},[t.URGENT_NOTICE]:r=>{if(c){const f=s?p(r):r;c(f,r)}},[t.NOTIFICATION]:r=>{if(i){const f=s?y(r):r;i(f,r)}}}),u&&d.type!==t.CHAT&&d.type!==t.KV_KEY_CHANGED&&d.type!==t.URGENT_NOTICE&&d.type!==t.NOTIFICATION&&u(d)}}export{t as D,h as c,C as f,m as s}; +import{s as E}from"./socketClient-BKHEsaLg.js";const t={CHAT:"chat",KV_KEY_CHANGED:"kv-key-changed",URGENT_NOTICE:"urgent-notice",NOTIFICATION:"notification"};function m(e){if(!e||typeof e!="string")throw new Error("消息文本不能为空");E(t.CHAT,{text:e.trim()})}function I(e,n={}){if(!e||!e.type){console.warn("无效的设备事件数据:",e);return}const o=n[e.type];if(typeof o=="function")try{o(e)}catch(c){console.error(`处理设备事件 ${e.type} 时出错:`,c)}}function g(e){var n;if(e.type!==t.CHAT)throw new Error("不是聊天事件");return{text:((n=e.content)==null?void 0:n.text)||"",senderId:e.senderId,at:e.timestamp,uuid:e.uuid,senderInfo:e.senderInfo}}function T(e){var n,o,c,i,u,s;if(e.type!==t.KV_KEY_CHANGED)throw new Error("不是 KV 变化事件");return{uuid:e.uuid,key:(n=e.content)==null?void 0:n.key,action:(o=e.content)==null?void 0:o.action,created:(c=e.content)==null?void 0:c.created,updatedAt:(i=e.content)==null?void 0:i.updatedAt,deletedAt:(u=e.content)==null?void 0:u.deletedAt,batch:(s=e.content)==null?void 0:s.batch}}function p(e){var n,o,c,i;if(e.type!==t.URGENT_NOTICE)throw new Error("不是紧急通知事件");return{urgency:((n=e.content)==null?void 0:n.urgency)||"info",message:((o=e.content)==null?void 0:o.message)||"",targetDevices:((c=e.content)==null?void 0:c.targetDevices)||[],senderId:e.senderId,senderInfo:((i=e.content)==null?void 0:i.senderInfo)||e.senderInfo,timestamp:e.timestamp}}function y(e){var n,o,c,i;if(e.type!==t.NOTIFICATION)throw new Error("不是通知事件");return{message:((n=e.content)==null?void 0:n.message)||"",isUrgent:((o=e.content)==null?void 0:o.isUrgent)||!1,targetDevices:((c=e.content)==null?void 0:c.targetDevices)||[],senderId:e.senderId,senderInfo:((i=e.content)==null?void 0:i.senderInfo)||e.senderInfo,timestamp:e.timestamp,eventId:e.eventId}}function C(e){return e?e.deviceName==="realtime"?"实时同步":`${e.deviceName||"未知设备"} (${e.deviceType||"未知类型"})`:"未知设备"}function h(e={}){const{onChat:n,onKvChanged:o,onUrgentNotice:c,onNotification:i,onOtherEvent:u,enableLegacySupport:s=!0}=e;return d=>{I(d,{[t.CHAT]:r=>{if(n){const f=s?g(r):r;n(f,r)}},[t.KV_KEY_CHANGED]:r=>{if(o){const f=s?T(r):r;o(f,r)}},[t.URGENT_NOTICE]:r=>{if(c){const f=s?p(r):r;c(f,r)}},[t.NOTIFICATION]:r=>{if(i){const f=s?y(r):r;i(f,r)}}}),u&&d.type!==t.CHAT&&d.type!==t.KV_KEY_CHANGED&&d.type!==t.URGENT_NOTICE&&d.type!==t.NOTIFICATION&&u(d)}}export{t as D,h as c,C as f,m as s}; diff --git a/assets/examschedule-DnYIE-2I.js b/assets/examschedule-BZ-idwf4.js similarity index 96% rename from assets/examschedule-DnYIE-2I.js rename to assets/examschedule-BZ-idwf4.js index c5c211a..1ddb5f8 100644 --- a/assets/examschedule-DnYIE-2I.js +++ b/assets/examschedule-BZ-idwf4.js @@ -1,4 +1,4 @@ -import A from"./ExamConfigEditor-Dw1BoZRS.js";import{d as C}from"./dataProvider-DBZnFcYO.js";import{_ as F,e as y,c as V,f as g,F as J,d as v,h as u,p as R,q as z,r as O,t as H,o as L,k as S,l as T,g as k,n as P}from"./index-CzpSlHRw.js";import{X as p,Y as h,Z as i,j as s,a1 as l,k as f,S as x,$ as D,_ as U,F as X,a2 as j,ae as B}from"./vendor-vue-28M5UGz3.js";import{V as W,a as q}from"./VRow-sd4d6eNi.js";import{V as N}from"./VAlert-DaoJAibO.js";import{V as M}from"./VChip-B3whZF-S.js";import{V as K}from"./VSkeletonLoader-Bqlz0ln3.js";import{V as Y}from"./VTextField-BxdS2D7S.js";import{V as G}from"./VTextarea-zDVNnlPQ.js";import{V as Z}from"./VContainer-BIFGURze.js";import"./VTooltip-C8vChj8G.js";import"./vendor-vuetify-95axeNJO.js";import"./VSwitch-DcxT6NgQ.js";import"./VAutocomplete-D8Wr7ywO.js";import"./VSelect-DZBjiB3J.js";import"./VSheet-ZjkOR-Oc.js";import"./VCheckboxBtn-BLxCsxXE.js";import"./VDatePicker-BJ3ukfdk.js";import"./VPicker-199veasp.js";import"./VTimePicker-DvAq_vLK.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";const Q={name:"ExamScheduleManager",components:{ExamConfigEditor:A},data(){return{configs:[],loading:!1,error:"",success:"",renameDialog:!1,editDialog:!1,configToRename:null,editingConfig:null,newConfigName:"",renaming:!1,saving:!1,importDialog:!1,importJson:"",importError:"",importing:!1,datePickerDialog:!1,baseDate:"",virtualDateInfo:null,pendingImportConfig:null,aiDialog:!1,copied:!1}},computed:{aiPrompt(){const a=new Date;return`Your task is to generate a JSON configuration file for an exam dashboard. Based on the exam information input by the user, generate the configuration strictly following these rules. +import A from"./ExamConfigEditor-BVwEXehR.js";import{d as C}from"./dataProvider-GWPC-0Vt.js";import{_ as F,e as y,c as V,f as g,F as J,d as v,h as u,p as R,q as z,r as O,t as H,o as L,k as S,l as T,g as k,n as P}from"./index-DGIAsv4W.js";import{X as p,Y as h,Z as i,j as s,a1 as l,k as f,S as x,$ as D,_ as U,F as X,a2 as j,ae as B}from"./vendor-vue-BiQC5iF7.js";import{V as W,a as q}from"./VRow-Cjhiymuu.js";import{V as N}from"./VAlert-BZ4-f-hy.js";import{V as M}from"./VChip-mRzIPuM0.js";import{V as K}from"./VSkeletonLoader-DwE_iqTb.js";import{V as Y}from"./VTextField-BurlcggD.js";import{V as G}from"./VTextarea-vGWmTJww.js";import{V as Z}from"./VContainer-DZyPrcqa.js";import"./VTooltip-2IUjfpCS.js";import"./vendor-vuetify-DsKlzgKp.js";import"./VSwitch-k6hfPfa2.js";import"./VAutocomplete-N0zTUlyj.js";import"./VSelect-oxA0t9CG.js";import"./VSheet-BBnSA_kJ.js";import"./VCheckboxBtn-BKcSogH0.js";import"./VDatePicker-CuGF0KeL.js";import"./VPicker-SM18M-iq.js";import"./VTimePicker-BApLLZ8X.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";const Q={name:"ExamScheduleManager",components:{ExamConfigEditor:A},data(){return{configs:[],loading:!1,error:"",success:"",renameDialog:!1,editDialog:!1,configToRename:null,editingConfig:null,newConfigName:"",renaming:!1,saving:!1,importDialog:!1,importJson:"",importError:"",importing:!1,datePickerDialog:!1,baseDate:"",virtualDateInfo:null,pendingImportConfig:null,aiDialog:!1,copied:!1}},computed:{aiPrompt(){const a=new Date;return`Your task is to generate a JSON configuration file for an exam dashboard. Based on the exam information input by the user, generate the configuration strictly following these rules. Generation Requirements: * Output using JSON blocks in Markdown diff --git a/assets/index-DLFytbG5.js b/assets/index-7Awvo4-J.js similarity index 92% rename from assets/index-DLFytbG5.js rename to assets/index-7Awvo4-J.js index b305814..6f8651b 100644 --- a/assets/index-DLFytbG5.js +++ b/assets/index-7Awvo4-J.js @@ -1 +1 @@ -import{d}from"./dataProvider-DBZnFcYO.js";import{X as n,_ as f,j as s,Z as i,a1 as o,Y as h,F as v,a2 as N,S as y,ae as C,aa as L,$ as x}from"./vendor-vue-28M5UGz3.js";import{_ as I,h as r,e as k,c as g,d as V,p as b,q as _,r as A,f as p,k as B,l as E,g as F}from"./index-CzpSlHRw.js";import{V as S,a as T}from"./VAppBarTitle-C1UGCJHo.js";import{V as D}from"./VTextField-BxdS2D7S.js";import{V as K}from"./VContainer-BIFGURze.js";import"./vendor-utils-B_Y_1aLs.js";import"./serverRotation-xQe1elLG.js";import"./vendor-vuetify-95axeNJO.js";const M={data(){return{lists:[],newListName:"",studentList:[],deleteDialog:{show:!1,text:"",listId:null},editingListId:null,editListName:""}},async created(){await Promise.all([this.loadLists(),this.loadStudentList()])},methods:{async loadLists(){try{let e=await d.loadData("classworks-list-info");(!e||!Array.isArray(e))&&(e=[],await d.saveData("classworks-list-info",e)),this.lists=e}catch(e){console.error("Failed to load lists",e),this.lists=[],await d.saveData("classworks-list-info",[])}},async loadStudentList(){try{const e=await d.loadData("classworks-list-main");e&&Array.isArray(e)?this.studentList=e:this.studentList=[]}catch(e){console.error("Failed to load student list",e),this.studentList=[]}},async createNewList(){if(!this.newListName)return;const e=Date.now().toString(),t={id:e,name:this.newListName};this.lists.push(t),await d.saveData("classworks-list-info",this.lists);const u=[];this.studentList&&this.studentList.length>0&&this.studentList.forEach(w=>{u.push({id:w.id||Date.now()+Math.floor(Math.random()*1e3),name:w.name,completed:!1})}),await d.saveData(`classworks-list-${e}`,u),this.newListName="",this.$router.push(`/list/${e}`)},startEditing(e){const t=this.lists.find(u=>u.id===e);t&&(this.editingListId=e,this.editListName=t.name)},cancelEditing(){this.editingListId=null,this.editListName=""},async saveListName(){if(!(!this.editListName.trim()||!this.editingListId))try{const e=this.lists.findIndex(t=>t.id===this.editingListId);e!==-1&&(this.lists[e].name=this.editListName.trim(),await d.saveData("classworks-list-info",this.lists)),this.editingListId=null,this.editListName=""}catch(e){console.error("Failed to update list name",e)}},confirmDeleteList(e){const t=this.lists.find(u=>u.id===e);t&&(this.deleteDialog={show:!0,text:`确定要删除列表 "${t.name}" 吗?`,listId:e})},confirmDelete(){this.deleteDialog.listId&&this.deleteList(this.deleteDialog.listId),this.deleteDialog.show=!1},async deleteList(e){this.lists=this.lists.filter(t=>t.id!==e),await d.saveData("classworks-list-info",this.lists)}}},U={key:0},P={key:1,class:"d-flex align-center w-100"},j={key:0};function q(e,t,u,w,a,m){return n(),f(v,null,[s(T,{elevation:"1"},{prepend:i(()=>[s(r,{icon:"mdi-arrow-left",variant:"text",onClick:t[0]||(t[0]=l=>e.$router.push("/"))})]),default:i(()=>[s(S,{class:"text-h6"},{default:i(()=>[...t[5]||(t[5]=[o(" 列表 ",-1)])]),_:1})]),_:1}),s(K,null,{default:i(()=>[s(k,{border:"",class:"mb-5",rounded:"xl"},{default:i(()=>[s(g,null,{default:i(()=>[...t[6]||(t[6]=[o("现有列表",-1)])]),_:1}),a.lists.length===0?(n(),h(V,{key:0},{default:i(()=>[...t[7]||(t[7]=[o(" 暂无列表,请创建新列表 ",-1)])]),_:1})):(n(),h(b,{key:1},{default:i(()=>[(n(!0),f(v,null,N(a.lists,l=>(n(),h(_,{key:l.id,active:l.id===a.editingListId,to:l.id!==a.editingListId?`/list/${l.id}`:void 0},{append:i(()=>[l.id!==a.editingListId?(n(),f("div",j,[s(r,{border:"",class:"mr-2",icon:"",onClick:L(c=>m.startEditing(l.id),["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[10]||(t[10]=[o("mdi-pencil",-1)])]),_:1})]),_:1},8,["onClick"]),s(r,{border:"",icon:"",onClick:L(c=>m.confirmDeleteList(l.id),["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[11]||(t[11]=[o("mdi-delete",-1)])]),_:1})]),_:1},8,["onClick"])])):x("",!0)]),default:i(()=>[l.id!==a.editingListId?(n(),f("div",U,[s(A,null,{default:i(()=>[o(y(l.name),1)]),_:2},1024)])):(n(),f("div",P,[s(D,{modelValue:a.editListName,"onUpdate:modelValue":t[1]||(t[1]=c=>a.editListName=c),autofocus:"",class:"mr-2",density:"compact","hide-details":"",label:"列表名称",onKeyup:C(m.saveListName,["enter"])},null,8,["modelValue","onKeyup"]),s(r,{border:"",class:"mr-2",color:"primary",icon:"",onClick:L(m.saveListName,["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[8]||(t[8]=[o("mdi-check",-1)])]),_:1})]),_:1},8,["onClick"]),s(r,{border:"",color:"error",icon:"",onClick:L(m.cancelEditing,["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[9]||(t[9]=[o("mdi-close",-1)])]),_:1})]),_:1},8,["onClick"])]))]),_:2},1032,["active","to"]))),128))]),_:1}))]),_:1}),s(k,{border:"",class:"mb-5",rounded:"xl"},{default:i(()=>[s(g,null,{default:i(()=>[...t[12]||(t[12]=[o("创建新列表",-1)])]),_:1}),s(V,null,{default:i(()=>[s(D,{modelValue:a.newListName,"onUpdate:modelValue":t[2]||(t[2]=l=>a.newListName=l),rules:[l=>!!l||"名称不能为空"],label:"列表名称"},null,8,["modelValue","rules"]),s(r,{disabled:!a.newListName,color:"primary",onClick:m.createNewList},{default:i(()=>[...t[13]||(t[13]=[o(" 创建列表 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),s(B,{modelValue:a.deleteDialog.show,"onUpdate:modelValue":t[4]||(t[4]=l=>a.deleteDialog.show=l),"max-width":"500"},{default:i(()=>[s(k,{border:""},{default:i(()=>[s(g,null,{default:i(()=>[...t[14]||(t[14]=[o("删除列表",-1)])]),_:1}),s(V,null,{default:i(()=>[o(y(a.deleteDialog.text),1)]),_:1}),s(E,null,{default:i(()=>[s(F),s(r,{color:"primary",variant:"text",onClick:t[3]||(t[3]=l=>a.deleteDialog.show=!1)},{default:i(()=>[...t[15]||(t[15]=[o(" 取消 ",-1)])]),_:1}),s(r,{color:"error",variant:"text",onClick:m.confirmDelete},{default:i(()=>[...t[16]||(t[16]=[o(" 确认删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const R=I(M,[["render",q]]);export{R as default}; +import{d}from"./dataProvider-GWPC-0Vt.js";import{X as n,_ as f,j as s,Z as i,a1 as o,Y as h,F as v,a2 as N,S as y,ae as C,aa as L,$ as x}from"./vendor-vue-BiQC5iF7.js";import{_ as I,h as r,e as k,c as g,d as V,p as b,q as _,r as A,f as p,k as B,l as E,g as F}from"./index-DGIAsv4W.js";import{V as S,a as T}from"./VAppBarTitle-DheyIZnb.js";import{V as D}from"./VTextField-BurlcggD.js";import{V as K}from"./VContainer-DZyPrcqa.js";import"./vendor-utils-DwALrQNc.js";import"./serverRotation-BtcwvdZJ.js";import"./vendor-vuetify-DsKlzgKp.js";const M={data(){return{lists:[],newListName:"",studentList:[],deleteDialog:{show:!1,text:"",listId:null},editingListId:null,editListName:""}},async created(){await Promise.all([this.loadLists(),this.loadStudentList()])},methods:{async loadLists(){try{let e=await d.loadData("classworks-list-info");(!e||!Array.isArray(e))&&(e=[],await d.saveData("classworks-list-info",e)),this.lists=e}catch(e){console.error("Failed to load lists",e),this.lists=[],await d.saveData("classworks-list-info",[])}},async loadStudentList(){try{const e=await d.loadData("classworks-list-main");e&&Array.isArray(e)?this.studentList=e:this.studentList=[]}catch(e){console.error("Failed to load student list",e),this.studentList=[]}},async createNewList(){if(!this.newListName)return;const e=Date.now().toString(),t={id:e,name:this.newListName};this.lists.push(t),await d.saveData("classworks-list-info",this.lists);const u=[];this.studentList&&this.studentList.length>0&&this.studentList.forEach(w=>{u.push({id:w.id||Date.now()+Math.floor(Math.random()*1e3),name:w.name,completed:!1})}),await d.saveData(`classworks-list-${e}`,u),this.newListName="",this.$router.push(`/list/${e}`)},startEditing(e){const t=this.lists.find(u=>u.id===e);t&&(this.editingListId=e,this.editListName=t.name)},cancelEditing(){this.editingListId=null,this.editListName=""},async saveListName(){if(!(!this.editListName.trim()||!this.editingListId))try{const e=this.lists.findIndex(t=>t.id===this.editingListId);e!==-1&&(this.lists[e].name=this.editListName.trim(),await d.saveData("classworks-list-info",this.lists)),this.editingListId=null,this.editListName=""}catch(e){console.error("Failed to update list name",e)}},confirmDeleteList(e){const t=this.lists.find(u=>u.id===e);t&&(this.deleteDialog={show:!0,text:`确定要删除列表 "${t.name}" 吗?`,listId:e})},confirmDelete(){this.deleteDialog.listId&&this.deleteList(this.deleteDialog.listId),this.deleteDialog.show=!1},async deleteList(e){this.lists=this.lists.filter(t=>t.id!==e),await d.saveData("classworks-list-info",this.lists)}}},U={key:0},P={key:1,class:"d-flex align-center w-100"},j={key:0};function q(e,t,u,w,a,m){return n(),f(v,null,[s(T,{elevation:"1"},{prepend:i(()=>[s(r,{icon:"mdi-arrow-left",variant:"text",onClick:t[0]||(t[0]=l=>e.$router.push("/"))})]),default:i(()=>[s(S,{class:"text-h6"},{default:i(()=>[...t[5]||(t[5]=[o(" 列表 ",-1)])]),_:1})]),_:1}),s(K,null,{default:i(()=>[s(k,{border:"",class:"mb-5",rounded:"xl"},{default:i(()=>[s(g,null,{default:i(()=>[...t[6]||(t[6]=[o("现有列表",-1)])]),_:1}),a.lists.length===0?(n(),h(V,{key:0},{default:i(()=>[...t[7]||(t[7]=[o(" 暂无列表,请创建新列表 ",-1)])]),_:1})):(n(),h(b,{key:1},{default:i(()=>[(n(!0),f(v,null,N(a.lists,l=>(n(),h(_,{key:l.id,active:l.id===a.editingListId,to:l.id!==a.editingListId?`/list/${l.id}`:void 0},{append:i(()=>[l.id!==a.editingListId?(n(),f("div",j,[s(r,{border:"",class:"mr-2",icon:"",onClick:L(c=>m.startEditing(l.id),["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[10]||(t[10]=[o("mdi-pencil",-1)])]),_:1})]),_:1},8,["onClick"]),s(r,{border:"",icon:"",onClick:L(c=>m.confirmDeleteList(l.id),["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[11]||(t[11]=[o("mdi-delete",-1)])]),_:1})]),_:1},8,["onClick"])])):x("",!0)]),default:i(()=>[l.id!==a.editingListId?(n(),f("div",U,[s(A,null,{default:i(()=>[o(y(l.name),1)]),_:2},1024)])):(n(),f("div",P,[s(D,{modelValue:a.editListName,"onUpdate:modelValue":t[1]||(t[1]=c=>a.editListName=c),autofocus:"",class:"mr-2",density:"compact","hide-details":"",label:"列表名称",onKeyup:C(m.saveListName,["enter"])},null,8,["modelValue","onKeyup"]),s(r,{border:"",class:"mr-2",color:"primary",icon:"",onClick:L(m.saveListName,["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[8]||(t[8]=[o("mdi-check",-1)])]),_:1})]),_:1},8,["onClick"]),s(r,{border:"",color:"error",icon:"",onClick:L(m.cancelEditing,["stop","prevent"])},{default:i(()=>[s(p,null,{default:i(()=>[...t[9]||(t[9]=[o("mdi-close",-1)])]),_:1})]),_:1},8,["onClick"])]))]),_:2},1032,["active","to"]))),128))]),_:1}))]),_:1}),s(k,{border:"",class:"mb-5",rounded:"xl"},{default:i(()=>[s(g,null,{default:i(()=>[...t[12]||(t[12]=[o("创建新列表",-1)])]),_:1}),s(V,null,{default:i(()=>[s(D,{modelValue:a.newListName,"onUpdate:modelValue":t[2]||(t[2]=l=>a.newListName=l),rules:[l=>!!l||"名称不能为空"],label:"列表名称"},null,8,["modelValue","rules"]),s(r,{disabled:!a.newListName,color:"primary",onClick:m.createNewList},{default:i(()=>[...t[13]||(t[13]=[o(" 创建列表 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),s(B,{modelValue:a.deleteDialog.show,"onUpdate:modelValue":t[4]||(t[4]=l=>a.deleteDialog.show=l),"max-width":"500"},{default:i(()=>[s(k,{border:""},{default:i(()=>[s(g,null,{default:i(()=>[...t[14]||(t[14]=[o("删除列表",-1)])]),_:1}),s(V,null,{default:i(()=>[o(y(a.deleteDialog.text),1)]),_:1}),s(E,null,{default:i(()=>[s(F),s(r,{color:"primary",variant:"text",onClick:t[3]||(t[3]=l=>a.deleteDialog.show=!1)},{default:i(()=>[...t[15]||(t[15]=[o(" 取消 ",-1)])]),_:1}),s(r,{color:"error",variant:"text",onClick:m.confirmDelete},{default:i(()=>[...t[16]||(t[16]=[o(" 确认删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const R=I(M,[["render",q]]);export{R as default}; diff --git a/assets/index-Kr7NEaRJ.js b/assets/index-DCuIjJC4.js similarity index 97% rename from assets/index-Kr7NEaRJ.js rename to assets/index-DCuIjJC4.js index 2110f9b..2f96c53 100644 --- a/assets/index-Kr7NEaRJ.js +++ b/assets/index-DCuIjJC4.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CzpSlHRw.js","./vendor-vuetify-95axeNJO.js","./vendor-vue-28M5UGz3.js","./index-Yfd4JoUB.css","./dataProvider-DBZnFcYO.js","./vendor-utils-B_Y_1aLs.js","./serverRotation-xQe1elLG.js","./MessageLog-92n2iU1x.js","./VAppBarTitle-C1UGCJHo.js","./VAppBarTitle-CczdD-Q2.css","./MessageLog-BGkFwivK.css","./RandomPicker-MbeqZgNJ.js","./VTextField-BxdS2D7S.js","./VTextField-DTDEIDq0.css","./VTooltip-C8vChj8G.js","./VTooltip-D7EaNDeY.css","./VChip-B3whZF-S.js","./VChip-Dmz_1Lnv.css","./RandomPicker-CU-edGvg.css","./FloatingToolbar-Di0zKY20.js","./VSheet-ZjkOR-Oc.js","./VSheet-DxsDksIw.css","./VDatePicker-BJ3ukfdk.js","./VPicker-199veasp.js","./VPicker-Dm9DplUc.css","./VDatePicker-zglzEVGT.css","./FloatingToolbar-5gVX85mk.css","./ChatWidget-DKseinU1.js","./socketClient-pOSoE2ci.js","./vendor-socket-dm1FmSOd.js","./soundList-D9U-Grcp.js","./deviceEvents-CH859Fwr.js","./VRow-sd4d6eNi.js","./VRow-D2ArqUC2.css","./VPagination-CwVL3tMR.js","./VPagination-BF2MZmld.css","./VTextarea-zDVNnlPQ.js","./VTextarea-_xVwaw_z.css","./ChatWidget-ChgL-O5B.css","./HomeworkEditDialog-CbH0TGxK.js","./VAlert-DaoJAibO.js","./VAlert-D_OX1cfW.css","./HomeworkEditDialog-DSAcf9mw.css","./InitServiceChooser-CG7kcSTF.js","./VExpansionPanels-CQt43P3v.js","./VExpansionPanels-kEj4ZJQK.css","./InitServiceChooser-BSZJBnhr.css","./StudentNameManager-DSeAWOCU.js","./VAutocomplete-D8Wr7ywO.js","./VSelect-DZBjiB3J.js","./VCheckboxBtn-BLxCsxXE.js","./VSwitch-DcxT6NgQ.js","./VSwitch-Bk42mIwg.css","./VSelect-DHZViySU.css","./VAutocomplete-Ygy_KjMW.css","./VCombobox-DqiaU_M6.js","./VCombobox-r6cc1Iy_.css","./StudentNameManager-tn0RQdqM.css","./UrgentTestDialog-7IGcZhxC.js","./VContainer-BIFGURze.js","./VContainer-B1KSavhG.css","./VForm-DIiMelbi.js","./VCheckbox-tGn5q60R.js","./VCheckbox-ZL-u1kGB.css","./UrgentTestDialog-65OEJ5uz.css","./AttendanceSidebar-B0h29tbH.js","./AttendanceManagementDialog-Dr2Al4zj.js","./AttendanceManagementDialog-D0prZwJd.css","./PwaInstallCard-C2z5JzJd.js","./ExamScheduleCard-CNAe4BGo.js","./VTabs-DxZkDLgQ.js","./VTable-D9zIyrqQ.js","./VTable-CNLJxQof.css","./VTabs-566n5b08.css","./ExamScheduleCard-BJuKYvRa.css","./ExamConfigEditor-Dw1BoZRS.js","./VSkeletonLoader-Bqlz0ln3.js","./VSkeletonLoader-C11ZEozu.css","./VTimePicker-DvAq_vLK.js","./VTimePicker-BkWY3_8P.css","./ExamConfigEditor-HgNV6CVV.css"])))=>i.map(i=>d[i]); -var et=Object.defineProperty;var tt=(t,e,i)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var C=(t,e,i)=>tt(t,typeof e!="symbol"?e+"":e,i);import{_ as H,V as Ce,c as I,d as T,e as _,S as ne,w as Te,f as x,g as E,h as b,i as F,j as re,k as B,l as j,s as K,n as D,o as st,p as ee,q as X,r as oe,t as ae,v as it,x as P,y as Fe,z as nt,A as Z}from"./index-CzpSlHRw.js";import{X as c,_ as f,j as o,N,S as m,a6 as ot,a7 as at,a8 as rt,Y as v,Z as a,k as r,F as k,a2 as M,n as O,$ as w,a1 as u,a9 as z,aa as Re,P as lt,R as dt,V as ct,U as Ie,e as ut,a4 as V}from"./vendor-vue-28M5UGz3.js";import{d as R,a as ht,k as mt,s as Ve}from"./dataProvider-DBZnFcYO.js";import{a as ye,g as Be}from"./vendor-utils-B_Y_1aLs.js";import{V as L}from"./VChip-B3whZF-S.js";import{V as Oe,a as Q}from"./VTabs-DxZkDLgQ.js";import{V as Ue,a as $,b as ft}from"./VTable-D9zIyrqQ.js";import{V as le}from"./VAlert-DaoJAibO.js";import{V as gt,a as pt}from"./VTooltip-C8vChj8G.js";import{V as se}from"./VTextField-BxdS2D7S.js";import{p as yt,d as bt}from"./soundList-D9U-Grcp.js";import{V as be}from"./VSwitch-DcxT6NgQ.js";import{a0 as De}from"./vendor-vuetify-95axeNJO.js";import{V as je}from"./VContainer-BIFGURze.js";import{g as vt,j as Ne,o as wt,a as Pe,l as St}from"./socketClient-pOSoE2ci.js";import{c as Dt}from"./deviceEvents-CH859Fwr.js";import{V as xt,a as kt}from"./VAppBarTitle-C1UGCJHo.js";import{V as Ct,a as Tt}from"./VRow-sd4d6eNi.js";const _t={__name:"AsyncLoadingPlaceholder",props:{height:{type:String,default:"120px"}},setup(t){return(e,i)=>(c(),f("div",{class:"async-loading-placeholder d-flex justify-center align-center",style:N({minHeight:t.height})},[o(Ce,{indeterminate:"",color:"primary",size:"28",width:"2"})],4))}},he=H(_t,[["__scopeId","data-v-c297c78c"]]),Mt={name:"RelativeTimeDisplay",props:{time:{type:[String,Date,Number],required:!0}},computed:{displayTime(){if(!this.time)return"";const t=new Date(this.time),e=new Date,i=new Date(t.getFullYear(),t.getMonth(),t.getDate()),l=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=i.getTime()-l.getTime(),n=Math.round(s/(1e3*60*60*24));if(n===0)return"今天";if(n===1)return"明天";if(n===2)return"后天";if(n===-1)return"昨天";if(n===-2)return"前天";const d=l.getDay()||7,h=new Date(l);h.setDate(l.getDate()-d+1);const p=new Date(l);if(p.setDate(l.getDate()+(7-d)),i>=h&&i<=p)return["周日","周一","周二","周三","周四","周五","周六"][t.getDay()];const g=t.getMonth()+1,S=t.getDate();return`${g}月${S}日`}}};function Et(t,e,i,l,s,n){return c(),f("span",null,m(n.displayTime),1)}const He=H(Mt,[["render",Et]]),xe=ot("exam",{state:()=>({examList:[],exams:{},loadingList:!1,loadingDetails:{}}),actions:{async fetchExamList(){if(!this.loadingList){this.loadingList=!0;try{const t=await R.loadData("es_list");Array.isArray(t)?this.examList=t:this.examList=[]}catch(t){console.error("Failed to load exam list:",t)}finally{this.loadingList=!1}}},async fetchExam(t){if(this.exams[t])return this.exams[t];if(!this.loadingDetails[t]){this.loadingDetails[t]=!0;try{const e=await R.loadData(`es_${t}`);return e&&(this.exams[t]=e),e}catch(e){console.error(`Failed to load exam details for ${t}:`,e)}finally{this.loadingDetails[t]=!1}}},async getUpcomingExams(t=25){await this.fetchExamList();const e=[],i=new Date,l=new Date(i.getTime()+2*24*60*60*1e3),s=this.examList.slice(0,t);for(const n of s){let d=this.exams[n.id];d||(d=await this.fetchExam(n.id)),d&&d.examInfos&&Array.isArray(d.examInfos)&&d.examInfos.some(p=>{const g=new Date(p.start);return g>=i&&g<=l})&&e.push({id:n.id,...d})}return e}}}),Rt={name:"ConciseExamCard",components:{RelativeTimeDisplay:He},props:{examId:{type:String,required:!0},contentStyle:{type:Object,default:()=>({})},readonly:{type:Boolean,default:!1}},computed:{...rt(xe,["exams","loadingDetails"]),exam(){return this.exams[this.examId]},loading(){return this.loadingDetails[this.examId]},groupedExamInfos(){if(!this.exam||!this.exam.examInfos)return[];const t=[...this.exam.examInfos].sort((l,s)=>new Date(l.start)-new Date(s.start)),e=[];let i=null;return t.forEach(l=>{const n=new Date(l.start).toDateString();(!i||i.key!==n)&&(i={key:n,date:l.start,infos:[]},e.push(i)),i.infos.push(l)}),e}},mounted(){this.fetchExam(this.examId)},methods:{...at(xe,["fetchExam"]),formatTimeOnly(t){if(!t)return"";try{const e=new Date(t),i=e.getHours().toString().padStart(2,"0"),l=e.getMinutes().toString().padStart(2,"0");return`${i}:${l}`}catch{return""}},isPast(t){return t?new Date(t)t.$emit("click"))},{default:a(()=>[o(I,{class:"d-flex align-center py-2 px-3 bg-primary-lighten-5 text-subtitle-1 font-weight-bold"},{default:a(()=>{var h;return[r("span",It,m(((h=n.exam)==null?void 0:h.examName)||"加载中..."),1)]}),_:1}),o(T,{class:"flex-grow-1 pa-4 overflow-y-auto",style:N(i.contentStyle)},{default:a(()=>[n.loading?(c(),f("div",Vt,[o(Ce,{indeterminate:"",size:"24",color:"primary"})])):n.exam?(c(),f("div",Nt,[(c(!0),f(k,null,M(n.groupedExamInfos,(h,p)=>(c(),f("div",{key:p,class:"mb-3"},[r("div",Pt,[o(d,{time:h.date},null,8,["time"])]),(c(!0),f(k,null,M(h.infos,(g,S)=>(c(),f("div",{key:S,class:O(["d-flex align-center justify-space-between py-1 border-b-sm",{"border-none":S===h.infos.length-1,"text-grey":n.isPast(g.end)}])},[r("div",At,m(g.name),1),r("div",Lt,m(n.formatTimeOnly(g.start))+" - "+m(n.formatTimeOnly(g.end)),1)],2))),128))]))),128))])):(c(),f("div",zt," 无法加载 "))]),_:1},8,["style"])]),_:1})}const We=H(Rt,[["render",Ft],["__scopeId","data-v-cb5c226a"]]),Bt=["6IO4","5Lmz","6JCd6I6J","5rer","5aW4"],Ot=Bt.map(t=>Be.decode(t)),Ae=.75,Ut={name:"HitokotoCard",data(){return{enabled:!1,refreshInterval:60,kvConfig:{sources:["zhaoyu"],sensitiveWords:[],hitokotoCategories:[]},sentence:"",author:"",origin:"",loading:!1,timer:null,unwatch:null,fontSize:28}},computed:{contentStyle(){return{"font-size":`${this.fontSize*Ae}px`,"white-space":"pre-wrap","line-height":"1.6","text-align":"left"}},authorStyle(){return{"font-size":`${this.fontSize*Ae*.6}px`,"text-align":"left"}}},async mounted(){this.loadLocalSettings(),await this.loadKvSettings(),this.fetchSentence(),this.startTimer(),this.unwatch=Te(()=>{this.loadLocalSettings(),this.startTimer()})},beforeUnmount(){this.stopTimer(),this.unwatch&&this.unwatch()},methods:{loadLocalSettings(){this.enabled=ne.getSetting("hitokoto.enabled"),this.refreshInterval=ne.getSetting("hitokoto.refreshInterval"),this.fontSize=ne.getSetting("font.size")},async loadKvSettings(){try{const t=await R.loadData("sentence-info");let e=t;t&&t.data&&(e=t.data),e&&(this.kvConfig={sources:Array.isArray(e.sources)&&e.sources.length>0?e.sources:["zhaoyu"],sensitiveWords:e.sensitiveWords?e.sensitiveWords.split(/[,,]/).map(i=>i.trim()).filter(i=>i):[],jinrishiciToken:e.jinrishiciToken,hitokotoCategories:Array.isArray(e.hitokotoCategories)?e.hitokotoCategories:[]})}catch(t){console.error("Failed to load sentence-info",t)}},startTimer(){this.timer&&clearInterval(this.timer),this.refreshInterval>0&&(this.timer=setInterval(this.fetchSentence,this.refreshInterval*1e3))},stopTimer(){this.timer&&clearInterval(this.timer)},async fetchSentence(){if(!this.loading){this.loading=!0;try{const t=this.kvConfig.sources,e=t[Math.floor(Math.random()*t.length)];let i=null,l="",s="",n="";if(e==="hitokoto"){const d=new URLSearchParams,h=this.kvConfig.hitokotoCategories;Array.isArray(h)&&h.length>0&&h.forEach(S=>d.append("c",S));const p="https://v1.hitokoto.cn/"+(d.toString()?"?"+d.toString():"");i=(await ye.get(p)).data,l=i.hitokoto,s=i.from_who,n=i.from}else if(e==="zhaoyu"){const d=await ye.get("https://hub.saintic.com/openservice/sentence/all.json");d.data.success&&(i=d.data.data,l=i.sentence||i.content||i.name,s=i.author,n=i.name||i.origin)}else if(e==="jinrishici")if(this.kvConfig.jinrishiciToken){const d=await ye.get("https://v2.jinrishici.com/one.json?client=npm-sdk/1.0&X-User-Token="+encodeURIComponent(this.kvConfig.jinrishiciToken),{});d.data.status==="success"&&(i=d.data.data,l=i.content,s=i.origin.author,n=i.origin.title)}else return console.warn("Jinrishici token missing. Please enable it in settings to generate a token."),this.loading=!1,this.fetchSentence();if(l){if([...Ot,...this.kvConfig.sensitiveWords].some(p=>p&&l.includes(p)))return this.loading=!1,this.fetchSentence();this.sentence=l,this.author=s||"",this.origin=n||"未知"}}catch(t){console.error("Failed to fetch sentence",t),this.sentence="获取失败",this.author="",this.origin=""}finally{this.loading=!1}}}}},jt={key:0,class:"mr-2"},Ht={key:1};function Wt(t,e,i,l,s,n){return c(),v(_,{class:"hitokoto-card",elevation:"2",border:"",rounded:"xl",loading:s.loading,height:"100%",onClick:n.fetchSentence},{default:a(()=>[o(T,{class:"pa-6 d-flex flex-column justify-center",style:{height:"100%"}},{default:a(()=>[r("div",{class:"font-weight-medium mb-4 serif-font",style:N(n.contentStyle)},m(s.sentence),5),r("div",{class:"text-medium-emphasis serif-font",style:N(n.authorStyle)},[s.author?(c(),f("span",jt,m(s.author),1)):w("",!0),s.origin?(c(),f("span",Ht,"《"+m(s.origin)+"》",1)):w("",!0)],4)]),_:1})]),_:1},8,["loading","onClick"])}const Ge=H(Ut,[["render",Wt],["__scopeId","data-v-84a0a110"]]),_e=30,q=50,te=-50,me=500,de=6,ce=-100,Ke=0,Gt=-90,Kt=40;function qt(t){let e=0,i=0;for(let s=0;si&&(i=d),e+=n*n}return{rms:Math.sqrt(e/Math.max(1,t.length)),peak:i}}function Yt(t){const e=Math.max(1e-12,t),i=20*Math.log10(e);return Math.max(ce,Math.min(Ke,i))}function ve(t){const e=Math.max(1e-12,t.rms),i=Math.max(1e-12,t.baselineRms),l=t.baselineDb+20*Math.log10(e/i);return Math.max(20,Math.min(100,l))}function Le(t){if(t.length===0)return ce;const i=t.reduce((s,n)=>s+Math.pow(10,n/10),0)/t.length,l=10*Math.log10(Math.max(i,1e-12));return Math.max(ce,Math.min(Ke,l))}function ie(t,e){if(t.length===0)return ce;const i=t.map(p=>Math.pow(10,p/20));i.sort((p,g)=>p-g);const l=(i.length-1)*e,s=Math.floor(l),n=Math.ceil(l),d=l-s,h=s===n?i[s]:i[s]*(1-d)+i[n]*d;return 20*Math.log10(Math.max(h,1e-12))}function we(t){return Math.max(0,Math.min(1,t))}const ke={maxLevelDb:55,baselineDb:Kt,showRealtimeDb:!0,avgWindowSec:1,sliceSec:_e,frameMs:q,scoreThresholdDbfs:te,segmentMergeGapMs:me,maxSegmentsPerMin:de,alertSoundEnabled:!1},Me="noise-control-settings",ue="NoiseControlSettingsUpdated";function Ee(){try{const t=localStorage.getItem(Me);if(t)return{...ke,...JSON.parse(t)}}catch(t){console.warn("Failed to load settings",t)}return{...ke}}function qe(t){const i={...Ee(),...t};i.sliceSec=_e,i.frameMs=q,i.scoreThresholdDbfs=te,i.segmentMergeGapMs=me,i.maxSegmentsPerMin=de,localStorage.setItem(Me,JSON.stringify(i)),window.dispatchEvent(new CustomEvent(ue,{detail:i}))}function Jt(){localStorage.removeItem(Me),window.dispatchEvent(new CustomEvent(ue,{detail:ke}))}function Xt(t){const e=i=>t(i);return window.addEventListener(ue,e),()=>window.removeEventListener(ue,e)}function ze(t,e){const i=Math.max(0,t.p50Dbfs-te),l=we(i/6),s=we(t.overRatioDbfs/.3),n=t.sampledDurationMs&&t.sampledDurationMs>0?t.sampledDurationMs:e,d=Math.max(1e-6,n/6e4),h=t.segmentCount/d,p=we(h/Math.max(1e-6,de)),S=100*(1-(.4*l+.3*s+.3*p));return{score:Math.max(0,Math.min(100,Math.round(S*10)/10)),scoreDetail:{sustainedPenalty:l,timePenalty:s,segmentPenalty:p,thresholdsUsed:{scoreThresholdDbfs:te,segmentMergeGapMs:me,maxSegmentsPerMin:de},sustainedLevelDbfs:t.p50Dbfs,overRatioDbfs:t.overRatioDbfs,segmentCount:t.segmentCount,minutes:d,durationMs:e,sampledDurationMs:t.sampledDurationMs,coverageRatio:t.sampledDurationMs?t.sampledDurationMs/e:1}}}const Zt=()=>Math.random().toString(36).substring(2,15);class Qt{constructor(){C(this,"audioContext",null);C(this,"analyser",null);C(this,"stream",null);C(this,"sourceNode",null);C(this,"status","initializing");C(this,"listeners",new Set);C(this,"animationFrameId",null);C(this,"lastFrameTime",0);C(this,"baselineDb",40);C(this,"baselineRms",Math.pow(10,-60/20));C(this,"lastRms",0);C(this,"calibrationBuffer",[]);C(this,"isCalibrating",!1);C(this,"calibrationTargetDb",0);C(this,"calibrationCallback",null);C(this,"settingsUnsubscribe",null);C(this,"warmupFramesRemaining",0);C(this,"ringBuffer",[]);C(this,"ringBufferCapacity",200);C(this,"currentSliceStart",0);C(this,"sliceDbfsValues",[]);C(this,"sliceAboveThresholdDuration",0);C(this,"sliceFramesTotal",0);C(this,"sliceSampledDuration",0);C(this,"isAboveThreshold",!1);C(this,"segmentCount",0);C(this,"lastSegmentEndTs",0);C(this,"lastProcessedFrameTs",null);C(this,"gapCount",0);C(this,"maxGapMs",0);C(this,"cachedCurrentScore");C(this,"cachedCurrentScoreDetail");C(this,"lastScoreCalcTime",0);C(this,"lastCompletedSlice",null);C(this,"loop",()=>{if(this.status!=="active"||!this.analyser)return;const e=performance.now();e-this.lastFrameTime>=q&&(this.processFrame(e),this.lastFrameTime=e),this.animationFrameId=requestAnimationFrame(this.loop)});this.status="paused";const e=Ee();this.updateLocalSettings(e),this.settingsUnsubscribe=Xt(i=>{this.updateLocalSettings(i.detail)})}updateLocalSettings(e){this.baselineDb=e.baselineDb,e.baselineRms&&e.baselineRms>0&&(this.baselineRms=e.baselineRms)}calibrate(e,i){if(this.status!=="active"){i==null||i(!1,"请先启动监测");return}this.isCalibrating=!0,this.calibrationTargetDb=e,this.calibrationBuffer=[],this.calibrationCallback=i||null,console.log(`Starting calibration to ${e}dB...`)}processCalibrationFrame(e){var l;if(!this.isCalibrating)return;this.calibrationBuffer.push(e);const i=3e3/q;if(this.calibrationBuffer.length>=i){const n=this.calibrationBuffer.reduce((d,h)=>d+h,0)/this.calibrationBuffer.length;this.isCalibrating=!1,this.baselineRms=n,this.baselineDb=this.calibrationTargetDb,qe({baselineDb:this.calibrationTargetDb,baselineRms:n}),console.log(`Calibration complete: RMS ${n.toFixed(6)} -> ${this.calibrationTargetDb}dB`),(l=this.calibrationCallback)==null||l.call(this,!0,`校准完成!平均RMS: ${n.toFixed(6)}`),this.calibrationCallback=null}}subscribe(e){return this.listeners.add(e),this.emit(),()=>this.listeners.delete(e)}emit(){const e=this.ringBuffer.length>0?this.ringBuffer[this.ringBuffer.length-1]:null,i={status:this.status,currentDbfs:(e==null?void 0:e.dbfs)??-100,currentDisplayDb:(e==null?void 0:e.displayDb)??20,ringBuffer:[...this.ringBuffer],lastSlice:this.lastCompletedSlice,currentScore:this.cachedCurrentScore,currentScoreDetail:this.cachedCurrentScoreDetail};this.listeners.forEach(l=>l(i))}async start(){if(this.status!=="active")try{this.status="initializing",this.warmupFramesRemaining=10,this.emit(),this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1}}),this.sourceNode=this.audioContext.createMediaStreamSource(this.stream);const e=this.audioContext.createBiquadFilter();e.type="highpass",e.frequency.value=80;const i=this.audioContext.createBiquadFilter();i.type="lowpass",i.frequency.value=8e3,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=0,this.sourceNode.connect(e),e.connect(i),i.connect(this.analyser),this.status="active",this.resetSlice(),this.loop()}catch(e){console.error("Mic Error",e),this.status="permission-denied",this.emit()}}stop(){var e,i;this.status!=="paused"&&(this.sliceDbfsValues.length>0&&this.finalizeSlice(),this.status="paused",this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),(e=this.stream)==null||e.getTracks().forEach(l=>l.stop()),(i=this.audioContext)==null||i.close(),this.audioContext=null,this.analyser=null,this.stream=null,this.emit())}processFrame(e){if(!this.analyser)return;if(this.warmupFramesRemaining>0){this.warmupFramesRemaining--;return}const i=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(i);const l=Date.now(),{rms:s}=qt(i);this.lastRms=s,this.isCalibrating&&this.processCalibrationFrame(s);const n=Yt(s),d=ve({rms:s,baselineRms:this.baselineRms,baselineDb:this.baselineDb});this.ringBuffer.push({t:l,dbfs:n,displayDb:d}),this.ringBuffer.length>this.ringBufferCapacity&&this.ringBuffer.shift();let h=q;if(this.lastProcessedFrameTs!==null){const p=l-this.lastProcessedFrameTs,g=Math.max(1e3,q*5);p>g?(this.gapCount++,this.maxGapMs=Math.max(this.maxGapMs,p),h=q):h=p}if(this.lastProcessedFrameTs=l,n>=Gt){this.sliceDbfsValues.push(n),this.sliceFramesTotal++,this.sliceSampledDuration+=h;const p=n>te;if(p&&(this.sliceAboveThresholdDuration+=h),p){if(!this.isAboveThreshold){const g=Date.now()-this.lastSegmentEndTs;(this.lastSegmentEndTs===0||g>me)&&this.segmentCount++,this.isAboveThreshold=!0}}else this.isAboveThreshold&&(this.isAboveThreshold=!1,this.lastSegmentEndTs=Date.now())}e-this.lastScoreCalcTime>250&&(this.updateInterimScore(),this.lastScoreCalcTime=e),this.emit(),Date.now()-this.currentSliceStart>=_e*1e3&&this.finalizeSlice()}updateInterimScore(){if(this.sliceDbfsValues.length<10){this.cachedCurrentScore=100,this.cachedCurrentScoreDetail=void 0;return}Le(this.sliceDbfsValues),Math.max(...this.sliceDbfsValues);const e=ie(this.sliceDbfsValues,.5);ie(this.sliceDbfsValues,.95);const i=this.sliceSampledDuration>0?this.sliceAboveThresholdDuration/this.sliceSampledDuration:0,l={p50Dbfs:e,overRatioDbfs:i,segmentCount:this.segmentCount,sampledDurationMs:this.sliceSampledDuration,gapCount:this.gapCount,maxGapMs:this.maxGapMs},s=Date.now()-this.currentSliceStart,{score:n,scoreDetail:d}=ze(l,s);this.cachedCurrentScore=n,this.cachedCurrentScoreDetail=d}resetSlice(){this.currentSliceStart=Date.now(),this.sliceDbfsValues=[],this.sliceAboveThresholdDuration=0,this.sliceFramesTotal=0,this.sliceSampledDuration=0,this.segmentCount=0,this.isAboveThreshold=!1,this.lastSegmentEndTs=0,this.gapCount=0,this.maxGapMs=0,this.lastProcessedFrameTs=null,this.cachedCurrentScore=100,this.cachedCurrentScoreDetail=void 0}finalizeSlice(){if(this.sliceDbfsValues.length===0){this.resetSlice();return}const e=Le(this.sliceDbfsValues),i=Math.max(...this.sliceDbfsValues),l=ie(this.sliceDbfsValues,.5),s=ie(this.sliceDbfsValues,.95),n=this.sliceSampledDuration>0?this.sliceAboveThresholdDuration/this.sliceSampledDuration:0,d=ve({rms:Math.pow(10,e/20),baselineRms:this.baselineRms,baselineDb:this.baselineDb}),h=ve({rms:Math.pow(10,s/20),baselineRms:this.baselineRms,baselineDb:this.baselineDb}),p={avgDbfs:e,maxDbfs:i,p50Dbfs:l,p95Dbfs:s,overRatioDbfs:n,segmentCount:this.segmentCount,sampledDurationMs:this.sliceSampledDuration,gapCount:this.gapCount,maxGapMs:this.maxGapMs},g=Date.now()-this.currentSliceStart,{score:S,scoreDetail:U}=ze(p,g),A={id:Zt(),start:this.currentSliceStart,end:Date.now(),frames:this.sliceFramesTotal,raw:p,display:{avgDb:d,p95Db:h},score:S,scoreDetail:U};this.lastCompletedSlice=A,this.saveSlice(A),this.resetSlice()}saveSlice(e){try{const i=localStorage.getItem("noise-slices-v2"),l=i?JSON.parse(i):[];l.push(e);const s=14*24*60*60*1e3,n=Date.now(),d=l.filter(h=>n-h.end1e3&&d.shift(),localStorage.setItem("noise-slices-v2",JSON.stringify(d))}catch(i){console.warn("Storage Full",i)}}getHistory(){try{const e=localStorage.getItem("noise-slices-v2");return e?JSON.parse(e):[]}catch{return[]}}clearHistory(){localStorage.removeItem("noise-slices-v2")}}const G=new Qt,$t={name:"NoiseMonitorDetail",props:{modelValue:{type:Boolean,default:!1},status:{type:String,default:""},currentDb:{type:[Number,String],default:"--"},currentDbfs:{type:Number,default:0},noiseLevel:{type:String,default:"未知"},dbColor:{type:String,default:"grey"},currentScore:{type:Number,default:null},scoreDetail:{type:Object,default:null},ringBuffer:{type:Array,default:()=>[]},lastSlice:{type:Object,default:null},history:{type:Array,default:()=>[]},isMonitoring:{type:Boolean,default:!1},micPermissionState:{type:String,default:""},sessionActive:{type:Boolean,default:!1},sessionData:{type:Object,default:null},reportMeta:{type:Object,default:()=>({dates:{}})},selectedDate:{type:String,default:""},dateReports:{type:Array,default:()=>[]}},emits:["update:modelValue","start","stop","clear-history","select-date","clear-date-reports","clear-all-reports"],data(){return{activeTab:"realtime",confirmClearMode:"",waveformWidth:600,reportChartWidth:600,selectedReportIndex:0,showCalibrateDialog:!1,calibrationSettings:{},calibrateTargetDb:40,isCalibrating:!1,calibrateMessage:"",calibrateSuccess:!1,editBaselineDb:40,editBaselineRms:"",editMaxLevelDb:100}},computed:{scoreColor(){return this.currentScore===null?"grey":this.currentScore>=80?"success":this.currentScore>=60?"warning":"error"},scoreLabel(){return this.currentScore===null?"暂无评分":this.currentScore>=90?"非常安静":this.currentScore>=80?"环境良好":this.currentScore>=60?"需要注意":this.currentScore>=40?"比较嘈杂":"极度嘈杂"},alertThreshold(){var t;return((t=this.sessionConfig)==null?void 0:t.alertThresholdDb)||55},scorePenaltyItems(){if(!this.scoreDetail)return[];const t=100;return[{label:"持续",icon:"mdi-volume-high",color:"amber",percent:Math.round(this.scoreDetail.sustainedPenalty/t*100)},{label:"时长",icon:"mdi-clock-alert",color:"orange",percent:Math.round(this.scoreDetail.timePenalty/t*100)},{label:"打断",icon:"mdi-flash-alert",color:"pink",percent:Math.round(this.scoreDetail.segmentPenalty/t*100)}]},gridLines(){return[20,40,60,80].map(t=>({val:t,y:this.dbToY(t)}))},reportGridLines(){return[20,40,60,80].map(t=>({val:t,y:this.reportDbToY(t)}))},waveformPath(){if(!this.ringBuffer||this.ringBuffer.length<2)return null;const t=this.waveformWidth,e=this.ringBuffer.slice(-120),i=t/(e.length-1);return e.map((l,s)=>{const n=s*i,d=this.dbToY(l.displayDb??0);return`${s===0?"M":"L"}${n.toFixed(1)},${d.toFixed(1)}`}).join(" ")},waveformFillPath(){return this.waveformPath?`${this.waveformPath} L${this.waveformWidth},120 L0,120 Z`:null},showConfirmClear(){return this.confirmClearMode!==""},sortedDateKeys(){var t;return(t=this.reportMeta)!=null&&t.dates?Object.keys(this.reportMeta.dates).sort().reverse():[]},selectedReport(){return this.dateReports[this.selectedReportIndex]||null},reportCoverage(){var t,e,i;return!((e=(t=this.selectedReport)==null?void 0:t.samples)!=null&&e.length)||!((i=this.selectedReport)!=null&&i.duration)?0:(this.selectedReport.samples.length*2/(this.selectedReport.duration/1e3)*100).toFixed(1)},reportWaveformPath(){var l,s;if(!((s=(l=this.selectedReport)==null?void 0:l.samples)!=null&&s.length))return null;const t=this.selectedReport.samples;if(t.length<2)return null;const i=this.reportChartWidth/(t.length-1);return t.map((n,d)=>{const h=d*i,p=this.reportDbToY(n.db);return`${d===0?"M":"L"}${h.toFixed(1)},${p.toFixed(1)}`}).join(" ")},reportWaveformFillPath(){return this.reportWaveformPath?`${this.reportWaveformPath} L${this.reportChartWidth},140 L0,140 Z`:null},levelDistribution(){var d,h;if(!((h=(d=this.selectedReport)==null?void 0:d.samples)!=null&&h.length))return[{label:"安静",percent:0,color:"#4caf50"},{label:"正常",percent:0,color:"#8bc34a"},{label:"吵闹",percent:0,color:"#ff9800"},{label:"极吵",percent:0,color:"#f44336"}];const t=this.selectedReport.samples.map(p=>p.db),e=t.length;let i=0,l=0,s=0,n=0;return t.forEach(p=>{p<45?i++:p<60?l++:p<75?s++:n++}),[{label:"安静",percent:Math.round(i/e*100),color:"#4caf50"},{label:"正常",percent:Math.round(l/e*100),color:"#8bc34a"},{label:"吵闹",percent:Math.round(s/e*100),color:"#ff9800"},{label:"极吵",percent:Math.round(n/e*100),color:"#f44336"}]},reportPenaltyItems(){var e;if(!((e=this.selectedReport)!=null&&e.scorePenalties))return[];const t=this.selectedReport.scorePenalties;return[{label:"持续",color:"amber",percent:Math.min(100,Math.round(t.sustained/40*100))},{label:"时长",color:"orange",percent:Math.min(100,Math.round(t.time/30*100))},{label:"打断",color:"pink",percent:Math.min(100,Math.round(t.segment/30*100))}]}},watch:{modelValue(t){t&&this.$nextTick(()=>{this.updateWaveformWidth(),this.updateReportChartWidth()})},activeTab(){this.$nextTick(()=>{this.updateWaveformWidth(),this.updateReportChartWidth()})},selectedReportIndex(){this.$nextTick(()=>this.updateReportChartWidth())},selectedDate(){this.selectedReportIndex=0}},mounted(){this.updateWaveformWidth(),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize(){this.updateWaveformWidth(),this.updateReportChartWidth()},updateWaveformWidth(){this.$refs.waveformContainer&&(this.waveformWidth=this.$refs.waveformContainer.offsetWidth||600)},updateReportChartWidth(){this.$refs.reportChartContainer&&(this.reportChartWidth=this.$refs.reportChartContainer.offsetWidth||600)},dbToY(t){return 120-Math.max(0,Math.min(100,t))/100*120},reportDbToY(t){return 140-Math.max(0,Math.min(100,t))/100*140},doClearReports(){this.confirmClearMode==="all"?this.$emit("clear-all-reports"):this.confirmClearMode==="date"&&this.$emit("clear-date-reports",this.selectedDate),this.confirmClearMode="",this.selectedReportIndex=0},formatDateLabel(t){if(!t)return"";const e=new Date,i=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,l=new Date(e);l.setDate(l.getDate()-1);const s=`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`;if(t===i)return"今天";if(t===s)return"昨天";const n=t.split("-");return`${parseInt(n[1])}月${parseInt(n[2])}日`},formatTime(t){const e=new Date(t);return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`},metaScoreColor(t){return t>=80?"success":t>=60?"warning":"error"},formatFullTime(t){if(!t)return"--";const e=new Date(t);return`${e.getFullYear()}/${e.getMonth()+1}/${e.getDate()} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`},formatDuration(t){if(!t)return"0 分钟";const e=Math.floor(t/6e4),i=Math.floor(e/60),l=e%60;return i>0?`${i} 小时 ${l} 分钟`:`${l} 分钟`},formatSeconds(t){if(!t||t<0)return"0秒";const e=Math.floor(t/60),i=t%60;return e>0?`${e}分${i}秒`:`${i}秒`},reportScoreLabel(t){return t>=90?"优秀":t>=80?"良好":t>=60?"一般":t>=40?"较差":"极差"},openCalibrateDialog(){this.refreshCalibrationSettings(),this.showCalibrateDialog=!0},refreshCalibrationSettings(){const t=Ee();this.calibrationSettings=t,this.editBaselineDb=t.baselineDb,this.editBaselineRms=t.baselineRms!=null?String(t.baselineRms):"",this.editMaxLevelDb=t.maxLevelDb},doAutoCalibrate(){this.isCalibrating=!0,this.calibrateMessage="",G.calibrate(this.calibrateTargetDb,(t,e)=>{this.isCalibrating=!1,this.calibrateSuccess=t,this.calibrateMessage=e,t&&this.refreshCalibrationSettings(),setTimeout(()=>{this.calibrateMessage=""},5e3)})},saveManualCalibration(){const t={baselineDb:this.editBaselineDb,maxLevelDb:this.editMaxLevelDb},e=parseFloat(this.editBaselineRms);!isNaN(e)&&e>0&&(t.baselineRms=e),qe(t),this.refreshCalibrationSettings()},resetCalibration(){Jt(),this.refreshCalibrationSettings()}}},es={class:"noise-dashboard pa-5"},ts={class:"d-flex align-center justify-center"},ss={class:"text-center"},is={class:"noise-gauge-inner d-flex flex-column align-center justify-center"},ns={class:"noise-level-bar mt-5 mx-auto",style:{"max-width":"500px"}},os={class:"noise-gradient-bar"},as={class:"pa-5"},rs={class:"d-flex align-center mb-3"},ls={class:"text-caption text-medium-emphasis"},ds={ref:"waveformContainer",class:"noise-waveform"},cs=["viewBox"],us=["y1","x2","y2"],hs=["y1","x2","y2"],ms=["d"],fs=["d"],gs={class:"pa-5"},ps={class:"d-flex align-center mb-3"},ys={key:0,class:"d-flex flex-wrap ga-4"},bs={class:"text-h6 font-weight-bold"},vs={class:"text-subtitle-1 font-weight-bold"},ws={class:"d-flex align-center"},Ss={class:"text-body-2"},Ds={class:"d-flex align-center",style:{"min-width":"140px"}},xs={class:"text-caption font-weight-medium",style:{"min-width":"36px","text-align":"right"}},ks={key:1,class:"text-center text-medium-emphasis py-4"},Cs={class:"pa-4 d-flex align-center"},Ts={key:0,class:"text-center text-medium-emphasis py-12"},_s={class:"pa-4"},Ms={class:"d-flex align-center flex-wrap ga-2 mb-3"},Es={class:"d-flex flex-wrap ga-2"},Rs={key:0,class:"pa-4 pb-0"},Is={class:"d-flex align-center ga-3 flex-wrap"},Vs={class:"text-h6 font-weight-bold"},Ns={key:1,class:"text-center text-medium-emphasis py-8"},Ps={key:2,class:"pa-4 pt-3 d-flex flex-wrap ga-2"},As={class:"text-caption ml-1"},Ls={key:4,class:"report-content"},zs={class:"pa-5 pb-0"},Fs={class:"text-h6 font-weight-bold d-flex align-center"},Bs={class:"pa-5"},Os={class:"report-grid"},Us={class:"report-stat-card"},js={class:"text-h6 font-weight-bold"},Hs={class:"report-stat-card"},Ws={class:"text-h6 font-weight-bold"},Gs={class:"text-caption"},Ks={class:"report-stat-card"},qs={class:"text-h6 font-weight-bold"},Ys={class:"report-stat-card"},Js={class:"text-h6 font-weight-bold"},Xs={class:"report-stat-card"},Zs={class:"text-h6 font-weight-bold"},Qs={class:"report-stat-card"},$s={class:"text-h6 font-weight-bold"},ei={class:"pa-5"},ti={ref:"reportChartContainer",class:"noise-waveform"},si=["viewBox"],ii=["y1","x2","y2"],ni=["y1","x2","y2"],oi=["d"],ai=["d"],ri={class:"text-caption text-medium-emphasis mt-2"},li={class:"pa-5"},di={class:"d-flex flex-wrap ga-4"},ci={class:"noise-level-distribution"},ui={class:"d-flex",style:{height:"16px","border-radius":"8px",overflow:"hidden"}},hi={class:"d-flex flex-wrap ga-3 mt-3 justify-center"},mi={class:"text-caption text-medium-emphasis"},fi={class:"text-body-2 mr-3",style:{"min-width":"32px"}},gi={class:"text-body-2 font-weight-bold",style:{"min-width":"40px","text-align":"right"}},pi={class:"d-flex align-center ga-6 flex-wrap"},yi={class:"text-body-1 font-weight-bold"},bi={class:"text-body-1 font-weight-bold font-monospace"},vi={class:"text-body-1 font-weight-bold"},wi={class:"d-flex align-center mb-2"},Si={class:"d-flex align-center ga-3 mb-5 flex-wrap"},Di={key:0,class:"text-caption text-warning"},xi={class:"d-flex align-center mb-2"},ki={class:"d-flex align-center ga-3 mb-4 flex-wrap"};function Ci(t,e,i,l,s,n){return c(),v(B,{"model-value":i.modelValue,"max-width":"900",scrollable:"","onUpdate:modelValue":e[15]||(e[15]=d=>t.$emit("update:modelValue",d))},{default:a(()=>[o(_,{class:"rounded-xl noise-detail-card"},{default:a(()=>[o(I,{class:"d-flex align-center pa-4"},{default:a(()=>[o(x,{class:"mr-2",color:"primary"},{default:a(()=>[...e[16]||(e[16]=[u(" mdi-waveform ",-1)])]),_:1}),e[18]||(e[18]=r("span",{class:"text-h6 font-weight-bold"},"环境噪音监测",-1)),o(E),i.sessionActive?(c(),v(L,{key:0,color:"teal",size:"small",variant:"tonal",class:"mr-2"},{default:a(()=>{var d;return[o(x,{start:"",size:"12"},{default:a(()=>[...e[17]||(e[17]=[u(" mdi-record-circle ",-1)])]),_:1}),u(" "+m(((d=i.sessionData)==null?void 0:d.sessionName)||"自习中"),1)]}),_:1})):w("",!0),o(L,{color:i.isMonitoring?"success":"grey",size:"small",variant:"tonal",class:"mr-2"},{default:a(()=>[u(m(i.isMonitoring?"监测中":"已停止"),1)]),_:1},8,["color"]),o(b,{icon:"mdi-close",size:"small",variant:"text",onClick:e[0]||(e[0]=d=>t.$emit("update:modelValue",!1))})]),_:1}),o(Oe,{modelValue:s.activeTab,"onUpdate:modelValue":e[1]||(e[1]=d=>s.activeTab=d),color:"primary",density:"compact",grow:""},{default:a(()=>[o(Q,{value:"realtime"},{default:a(()=>[o(x,{start:"",size:"18"},{default:a(()=>[...e[19]||(e[19]=[u(" mdi-pulse ",-1)])]),_:1}),e[20]||(e[20]=u(" 实时监测 ",-1))]),_:1}),o(Q,{value:"reports"},{default:a(()=>[o(x,{start:"",size:"18"},{default:a(()=>[...e[21]||(e[21]=[u(" mdi-chart-bar ",-1)])]),_:1}),e[22]||(e[22]=u(" 统计报告 ",-1))]),_:1})]),_:1},8,["modelValue"]),o(F),o(T,{class:"pa-0",style:{"max-height":"70vh"}},{default:a(()=>[o(Ue,{modelValue:s.activeTab,"onUpdate:modelValue":e[6]||(e[6]=d=>s.activeTab=d)},{default:a(()=>[o($,{value:"realtime"},{default:a(()=>[i.micPermissionState==="denied"?(c(),v(le,{key:0,type:"error",variant:"tonal",class:"ma-4 mb-0",prominent:""},{prepend:a(()=>[o(x,{icon:"mdi-microphone-off",size:"28"})]),default:a(()=>[e[23]||(e[23]=r("div",{class:"text-subtitle-2 font-weight-bold mb-1"}," 麦克风权限被拒绝 ",-1)),e[24]||(e[24]=r("div",{class:"text-body-2"}," 浏览器已拒绝麦克风访问,无法进行噪音监测。请在浏览器地址栏左侧的锁图标中重新授予麦克风权限,然后刷新页面。 ",-1))]),_:1})):i.micPermissionState==="unavailable"?(c(),v(le,{key:1,type:"warning",variant:"tonal",class:"ma-4 mb-0",prominent:""},{prepend:a(()=>[o(x,{icon:"mdi-microphone-question",size:"28"})]),default:a(()=>[e[25]||(e[25]=r("div",{class:"text-subtitle-2 font-weight-bold mb-1"}," 未检测到麦克风 ",-1)),e[26]||(e[26]=r("div",{class:"text-body-2"}," 当前设备未检测到麦克风硬件,无法进行噪音监测。请连接麦克风后刷新页面重试。 ",-1))]),_:1})):w("",!0),r("div",es,[r("div",ts,[r("div",ss,[r("div",{class:O(["noise-gauge-ring",`ring-${i.dbColor}`])},[r("div",is,[r("span",{class:O(["noise-gauge-value font-weight-bold",`text-${i.dbColor}`])},m(i.currentDb),3),e[27]||(e[27]=r("span",{class:"text-caption text-medium-emphasis"},"dB",-1))])],2),r("div",{class:O(["text-subtitle-1 font-weight-medium mt-3",`text-${i.dbColor}`])},m(i.noiseLevel),3)])]),r("div",ns,[e[28]||(e[28]=r("div",{class:"d-flex justify-space-between text-caption text-medium-emphasis mb-1"},[r("span",null,"0 dB"),r("span",null,"50"),r("span",null,"100 dB")],-1)),r("div",os,[i.isMonitoring&&typeof i.currentDb=="number"?(c(),f("div",{key:0,class:"noise-indicator",style:N({left:`${Math.min(100,Math.max(0,i.currentDb))}%`})},null,4)):w("",!0)])])]),o(F),r("div",as,[r("div",rs,[o(x,{class:"mr-2",size:"18",color:"primary"},{default:a(()=>[...e[29]||(e[29]=[u(" mdi-chart-line ",-1)])]),_:1}),e[30]||(e[30]=r("span",{class:"text-subtitle-2 font-weight-medium"},"噪音走势",-1)),o(E),r("span",ls," 最近 "+m(i.ringBuffer.length)+" 个采样 ",1)]),r("div",ds,[(c(),f("svg",{width:"100%",height:"120",viewBox:`0 0 ${s.waveformWidth} 120`,preserveAspectRatio:"none"},[(c(!0),f(k,null,M(n.gridLines,d=>(c(),f("line",{key:`grid-${d.val}`,x1:"0",y1:d.y,x2:s.waveformWidth,y2:d.y,stroke:"currentColor","stroke-opacity":"0.08","stroke-dasharray":"4,4"},null,8,us))),128)),n.alertThreshold?(c(),f("line",{key:0,x1:"0",y1:n.dbToY(n.alertThreshold),x2:s.waveformWidth,y2:n.dbToY(n.alertThreshold),stroke:"rgb(var(--v-theme-error))","stroke-opacity":"0.5","stroke-dasharray":"6,3","stroke-width":"1.5"},null,8,hs)):w("",!0),n.waveformPath?(c(),f("path",{key:1,d:n.waveformFillPath,fill:"url(#waveGradient-rt)",opacity:"0.3"},null,8,ms)):w("",!0),n.waveformPath?(c(),f("path",{key:2,d:n.waveformPath,fill:"none",stroke:"rgb(var(--v-theme-primary))","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,fs)):w("",!0),e[31]||(e[31]=r("defs",null,[r("linearGradient",{id:"waveGradient-rt",x1:"0",y1:"0",x2:"0",y2:"1"},[r("stop",{offset:"0%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.4"}),r("stop",{offset:"100%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.02"})])],-1))],8,cs))],512)]),o(F),r("div",gs,[r("div",ps,[o(x,{class:"mr-2",size:"18",color:"amber"},{default:a(()=>[...e[32]||(e[32]=[u(" mdi-star-circle ",-1)])]),_:1}),e[33]||(e[33]=r("span",{class:"text-subtitle-2 font-weight-medium"},"实时评分",-1))]),i.currentScore!==null?(c(),f("div",ys,[o(_,{variant:"tonal",color:n.scoreColor,rounded:"xl",class:"flex-grow-1","min-width":"200"},{default:a(()=>[o(T,{class:"d-flex align-center pa-4"},{default:a(()=>[o(Ce,{"model-value":i.currentScore,color:n.scoreColor,size:56,width:5,class:"mr-4"},{default:a(()=>[r("span",bs,m(i.currentScore),1)]),_:1},8,["model-value","color"]),r("div",null,[r("div",vs,m(n.scoreLabel),1),e[34]||(e[34]=r("div",{class:"text-caption text-medium-emphasis"}," 综合评分 (0-100) ",-1))])]),_:1})]),_:1},8,["color"]),i.scoreDetail?(c(),v(_,{key:0,variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"200"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[35]||(e[35]=r("div",{class:"text-subtitle-2 font-weight-medium mb-2"}," 扣分扣因 ",-1)),(c(!0),f(k,null,M(n.scorePenaltyItems,d=>(c(),f("div",{key:d.label,class:"d-flex align-center justify-space-between mb-1"},[r("div",ws,[o(x,{color:d.color,size:"14",class:"mr-2"},{default:a(()=>[u(m(d.icon),1)]),_:2},1032,["color"]),r("span",Ss,m(d.label),1)]),r("div",Ds,[o(re,{"model-value":d.percent,color:d.color,height:"6",rounded:"",class:"mr-2"},null,8,["model-value","color"]),r("span",xs,m(d.percent)+"% ",1)])]))),128))]),_:1})]),_:1})):w("",!0)])):(c(),f("div",ks,[o(x,{size:"32",class:"mb-2"},{default:a(()=>[...e[36]||(e[36]=[u(" mdi-chart-arc ",-1)])]),_:1}),e[37]||(e[37]=r("div",{class:"text-body-2"}," 开始监测后将显示评分 ",-1))]))]),o(F),r("div",Cs,[i.isMonitoring?(c(),v(b,{key:1,color:"error",variant:"tonal","prepend-icon":"mdi-stop",size:"large",class:"px-6",onClick:e[3]||(e[3]=d=>t.$emit("stop"))},{default:a(()=>[...e[39]||(e[39]=[u(" 停止监测 ",-1)])]),_:1})):(c(),v(b,{key:0,color:"success",variant:"elevated","prepend-icon":"mdi-play",size:"large",class:"px-6",disabled:i.micPermissionState==="denied"||i.micPermissionState==="unavailable",onClick:e[2]||(e[2]=d=>t.$emit("start"))},{default:a(()=>[...e[38]||(e[38]=[u(" 开始监测 ",-1)])]),_:1},8,["disabled"])),o(E),o(b,{variant:"tonal",color:"deep-purple","prepend-icon":"mdi-crosshairs-gps",onClick:n.openCalibrateDialog},{default:a(()=>[...e[40]||(e[40]=[u(" 校准 ",-1)])]),_:1},8,["onClick"])])]),_:1}),o($,{value:"reports"},{default:a(()=>[n.sortedDateKeys.length===0?(c(),f("div",Ts,[o(x,{size:"48",class:"mb-3"},{default:a(()=>[...e[41]||(e[41]=[u(" mdi-chart-box-outline ",-1)])]),_:1}),e[42]||(e[42]=r("div",{class:"text-body-1"}," 暂无统计报告 ",-1)),e[43]||(e[43]=r("div",{class:"text-caption mt-1"}," 在配置的晚自习时间段内,系统会自动记录并生成报告 ",-1))])):(c(),f(k,{key:1},[r("div",_s,[r("div",Ms,[o(x,{size:"18",color:"teal",class:"mr-1"},{default:a(()=>[...e[44]||(e[44]=[u(" mdi-calendar ",-1)])]),_:1}),e[46]||(e[46]=r("span",{class:"text-subtitle-2 font-weight-medium"},"选择日期",-1)),o(E),o(b,{color:"error",size:"x-small",variant:"text","prepend-icon":"mdi-delete-sweep",onClick:e[4]||(e[4]=d=>s.confirmClearMode="all")},{default:a(()=>[...e[45]||(e[45]=[u(" 清空全部 ",-1)])]),_:1})]),r("div",Es,[(c(!0),f(k,null,M(n.sortedDateKeys,d=>(c(),v(L,{key:d,color:i.selectedDate===d?"primary":void 0,variant:i.selectedDate===d?"elevated":"tonal",size:"small",onClick:h=>t.$emit("select-date",d)},{default:a(()=>[o(x,{start:"",size:"14"},{default:a(()=>[...e[47]||(e[47]=[u(" mdi-calendar-blank ",-1)])]),_:1}),u(" "+m(n.formatDateLabel(d))+" ",1),o(gt,{content:i.reportMeta.dates[d].count,color:"primary",inline:"",class:"ml-1"},null,8,["content"])]),_:2},1032,["color","variant","onClick"]))),128))])]),o(F),i.selectedDate&&i.reportMeta.dates[i.selectedDate]?(c(),f("div",Rs,[r("div",Is,[r("div",Vs,m(n.formatDateLabel(i.selectedDate)),1),o(L,{size:"small",color:n.metaScoreColor(i.reportMeta.dates[i.selectedDate].avgScore),variant:"tonal"},{default:a(()=>[u(" 均分 "+m(i.reportMeta.dates[i.selectedDate].avgScore),1)]),_:1},8,["color"]),o(L,{size:"small",variant:"tonal"},{default:a(()=>[u(m(i.reportMeta.dates[i.selectedDate].count)+" 条记录 ",1)]),_:1}),o(E),o(b,{color:"error",size:"x-small",variant:"text","prepend-icon":"mdi-delete",onClick:e[5]||(e[5]=d=>s.confirmClearMode="date")},{default:a(()=>[...e[48]||(e[48]=[u(" 清空当日 ",-1)])]),_:1})])])):w("",!0),i.dateReports.length===0&&i.selectedDate?(c(),f("div",Ns,[o(x,{size:"32"},{default:a(()=>[...e[49]||(e[49]=[u(" mdi-file-document-outline ",-1)])]),_:1}),e[50]||(e[50]=r("div",{class:"text-body-2 mt-1"}," 该日期暂无报告数据 ",-1))])):w("",!0),i.dateReports.length>0?(c(),f("div",Ps,[(c(!0),f(k,null,M(i.dateReports,(d,h)=>(c(),v(L,{key:d.startTime,color:s.selectedReportIndex===h?"teal":void 0,variant:s.selectedReportIndex===h?"elevated":"outlined",size:"small",onClick:p=>s.selectedReportIndex=h},{default:a(()=>[u(m(d.sessionName)+" ",1),r("span",As,m(n.formatTime(d.startTime)),1)]),_:2},1032,["color","variant","onClick"]))),128))])):w("",!0),n.selectedReport?(c(),v(F,{key:3})):w("",!0),n.selectedReport?(c(),f("div",Ls,[r("div",zs,[r("div",Fs,m(n.selectedReport.sessionName)+" 统计报告 ",1)]),r("div",Bs,[e[57]||(e[57]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"报告概览")],-1)),r("div",Os,[r("div",Us,[e[51]||(e[51]=r("div",{class:"text-caption text-medium-emphasis"}," 时长 ",-1)),r("div",js,m(n.formatDuration(n.selectedReport.duration)),1)]),r("div",Hs,[e[52]||(e[52]=r("div",{class:"text-caption text-medium-emphasis"}," 表现 ",-1)),r("div",Ws,[u(m(n.selectedReport.score)+" 分 ",1),r("span",Gs,"("+m(n.reportScoreLabel(n.selectedReport.score))+")",1)])]),r("div",Ks,[e[53]||(e[53]=r("div",{class:"text-caption text-medium-emphasis"}," 峰值 ",-1)),r("div",qs,m(n.selectedReport.maxDb)+" dB ",1)]),r("div",Ys,[e[54]||(e[54]=r("div",{class:"text-caption text-medium-emphasis"}," 平均 ",-1)),r("div",Js,m(n.selectedReport.avgDb)+" dB ",1)]),r("div",Xs,[e[55]||(e[55]=r("div",{class:"text-caption text-medium-emphasis"}," 超阈时长 ",-1)),r("div",Zs,m(n.formatSeconds(n.selectedReport.overThresholdDuration)),1)]),r("div",Qs,[e[56]||(e[56]=r("div",{class:"text-caption text-medium-emphasis"}," 打断次数 ",-1)),r("div",$s,m(n.selectedReport.segmentCount),1)])])]),r("div",ei,[e[59]||(e[59]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"噪音走势")],-1)),r("div",ti,[(c(),f("svg",{width:"100%",height:"140",viewBox:`0 0 ${s.reportChartWidth} 140`,preserveAspectRatio:"none"},[(c(!0),f(k,null,M(n.reportGridLines,d=>(c(),f("line",{key:`rg-${d.val}`,x1:"0",y1:d.y,x2:s.reportChartWidth,y2:d.y,stroke:"currentColor","stroke-opacity":"0.1","stroke-dasharray":"4,4"},null,8,ii))),128)),r("line",{x1:"0",y1:n.reportDbToY(n.selectedReport.alertThresholdDb||55),x2:s.reportChartWidth,y2:n.reportDbToY(n.selectedReport.alertThresholdDb||55),stroke:"rgb(var(--v-theme-error))","stroke-opacity":"0.6","stroke-dasharray":"6,3","stroke-width":"1.5"},null,8,ni),n.reportWaveformPath?(c(),f("path",{key:0,d:n.reportWaveformFillPath,fill:"url(#reportGrad)",opacity:"0.3"},null,8,oi)):w("",!0),n.reportWaveformPath?(c(),f("path",{key:1,d:n.reportWaveformPath,fill:"none",stroke:"rgb(var(--v-theme-primary))","stroke-width":"1.5","stroke-linejoin":"round"},null,8,ai)):w("",!0),e[58]||(e[58]=r("defs",null,[r("linearGradient",{id:"reportGrad",x1:"0",y1:"0",x2:"0",y2:"1"},[r("stop",{offset:"0%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.3"}),r("stop",{offset:"100%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.02"})])],-1))],8,si))],512),r("div",ri," 统计范围:"+m(n.formatFullTime(n.selectedReport.startTime))+" - "+m(n.formatFullTime(n.selectedReport.endTime))+"; 噪音报警阈值: "+m(n.selectedReport.alertThresholdDb||55)+" dB; 覆盖率: "+m(n.reportCoverage)+"% ",1)]),r("div",li,[e[62]||(e[62]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"更多统计")],-1)),r("div",di,[o(_,{variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"280"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[60]||(e[60]=r("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 噪音等级分布 ",-1)),r("div",ci,[r("div",ui,[(c(!0),f(k,null,M(n.levelDistribution,d=>(c(),f("div",{key:d.label,style:N({width:`${d.percent}%`,backgroundColor:d.color,minWidth:d.percent>0?"4px":"0"})},null,4))),128))]),r("div",hi,[(c(!0),f(k,null,M(n.levelDistribution,d=>(c(),f("div",{key:`leg-${d.label}`,class:"d-flex align-center"},[r("span",{class:"d-inline-block mr-1",style:N({width:"10px",height:"10px",borderRadius:"2px",backgroundColor:d.color})},null,4),r("span",mi,m(d.label)+" ("+m(d.percent)+"%) ",1)]))),128))])])]),_:1})]),_:1}),o(_,{variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"280"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[61]||(e[61]=r("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 扣分扣因 (越长扣分越多) ",-1)),(c(!0),f(k,null,M(n.reportPenaltyItems,d=>(c(),f("div",{key:d.label,class:"d-flex align-center mb-2"},[r("span",fi,m(d.label),1),o(re,{"model-value":d.percent,color:d.color,height:"10",rounded:"",class:"flex-grow-1 mr-2"},null,8,["model-value","color"]),r("span",gi,m(d.percent)+"%",1)]))),128))]),_:1})]),_:1})])])])):w("",!0)],64))]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),o(B,{modelValue:s.showCalibrateDialog,"onUpdate:modelValue":e[12]||(e[12]=d=>s.showCalibrateDialog=d),"max-width":"560",scrollable:""},{default:a(()=>[o(_,{class:"rounded-xl"},{default:a(()=>[o(I,{class:"d-flex align-center pa-4"},{default:a(()=>[o(x,{class:"mr-2",color:"deep-purple"},{default:a(()=>[...e[63]||(e[63]=[u(" mdi-crosshairs-gps ",-1)])]),_:1}),e[64]||(e[64]=r("span",{class:"text-h6 font-weight-bold"},"分贝校准",-1)),o(E),o(b,{icon:"mdi-close",size:"small",variant:"text",onClick:e[7]||(e[7]=d=>s.showCalibrateDialog=!1)})]),_:1}),o(F),o(T,{class:"pa-5"},{default:a(()=>[o(_,{variant:"outlined",class:"mb-5"},{default:a(()=>[o(T,{class:"py-3"},{default:a(()=>[e[68]||(e[68]=r("div",{class:"text-caption text-medium-emphasis mb-1"}," 当前校准值 ",-1)),r("div",pi,[r("div",null,[e[65]||(e[65]=r("span",{class:"text-body-2 text-medium-emphasis"},"基准分贝:",-1)),r("span",yi,m(s.calibrationSettings.baselineDb)+" dB ",1)]),r("div",null,[e[66]||(e[66]=r("span",{class:"text-body-2 text-medium-emphasis"},"基准 RMS:",-1)),r("span",bi,m(s.calibrationSettings.baselineRms!=null?s.calibrationSettings.baselineRms.toFixed(6):"未校准"),1)]),r("div",null,[e[67]||(e[67]=r("span",{class:"text-body-2 text-medium-emphasis"},"最大分贝:",-1)),r("span",vi,m(s.calibrationSettings.maxLevelDb)+" dB ",1)])])]),_:1})]),_:1}),r("div",wi,[o(x,{size:"18",class:"mr-2",color:"primary"},{default:a(()=>[...e[69]||(e[69]=[u(" mdi-auto-fix ",-1)])]),_:1}),e[70]||(e[70]=r("span",{class:"text-subtitle-2 font-weight-medium"},"自动校准",-1))]),e[74]||(e[74]=r("div",{class:"text-caption text-medium-emphasis mb-3"}," 在已知环境分贝的场景下,输入当前环境的真实分贝值,点击开始后保持环境安静 3 秒。 ",-1)),r("div",Si,[o(se,{modelValue:s.calibrateTargetDb,"onUpdate:modelValue":e[8]||(e[8]=d=>s.calibrateTargetDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"目标分贝",suffix:"dB","hide-details":"",style:{"max-width":"160px"},min:20,max:80},null,8,["modelValue"]),o(b,{color:"deep-purple",variant:"tonal","prepend-icon":"mdi-crosshairs-gps",loading:s.isCalibrating,disabled:!i.isMonitoring,onClick:n.doAutoCalibrate},{default:a(()=>[...e[71]||(e[71]=[u(" 开始校准 ",-1)])]),_:1},8,["loading","disabled","onClick"]),i.isMonitoring?w("",!0):(c(),f("span",Di," 需先开启监测 ")),s.calibrateMessage?(c(),f("span",{key:1,class:O(["text-caption",s.calibrateSuccess?"text-success":"text-error"])},m(s.calibrateMessage),3)):w("",!0)]),o(F,{class:"mb-5"}),r("div",xi,[o(x,{size:"18",class:"mr-2",color:"orange"},{default:a(()=>[...e[72]||(e[72]=[u(" mdi-pencil-ruler ",-1)])]),_:1}),e[73]||(e[73]=r("span",{class:"text-subtitle-2 font-weight-medium"},"手动校准 / 参数调整",-1))]),e[75]||(e[75]=r("div",{class:"text-caption text-medium-emphasis mb-3"}," 直接输入校准参数。修改后点击保存生效。 ",-1)),r("div",ki,[o(se,{modelValue:s.editBaselineDb,"onUpdate:modelValue":e[9]||(e[9]=d=>s.editBaselineDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"基准分贝",suffix:"dB","hide-details":"",style:{"max-width":"160px"},min:20,max:80},null,8,["modelValue"]),o(se,{modelValue:s.editBaselineRms,"onUpdate:modelValue":e[10]||(e[10]=d=>s.editBaselineRms=d),density:"compact",variant:"outlined",label:"基准 RMS","hide-details":"",style:{"max-width":"200px"},placeholder:"如 0.003200"},null,8,["modelValue"]),o(se,{modelValue:s.editMaxLevelDb,"onUpdate:modelValue":e[11]||(e[11]=d=>s.editMaxLevelDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"最大显示分贝",suffix:"dB","hide-details":"",style:{"max-width":"180px"},min:40,max:120},null,8,["modelValue"])])]),_:1}),o(j,{class:"px-4 pb-4"},{default:a(()=>[o(b,{variant:"text","prepend-icon":"mdi-restore",onClick:n.resetCalibration},{default:a(()=>[...e[76]||(e[76]=[u(" 恢复默认 ",-1)])]),_:1},8,["onClick"]),o(E),o(b,{color:"primary",variant:"elevated","prepend-icon":"mdi-content-save",onClick:n.saveManualCalibration},{default:a(()=>[...e[77]||(e[77]=[u(" 保存校准 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:n.showConfirmClear,"onUpdate:modelValue":e[14]||(e[14]=d=>n.showConfirmClear=d),"max-width":"360"},{default:a(()=>[o(_,null,{default:a(()=>[o(I,null,{default:a(()=>[...e[78]||(e[78]=[u("确认清空",-1)])]),_:1}),o(T,null,{default:a(()=>[u(m(s.confirmClearMode==="all"?"确定要清空所有日期的统计报告吗?此操作不可撤销。":`确定要清空 ${n.formatDateLabel(i.selectedDate)} 的统计报告吗?此操作不可撤销。`),1)]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{variant:"text",onClick:e[13]||(e[13]=d=>s.confirmClearMode="")},{default:a(()=>[...e[79]||(e[79]=[u(" 取消 ",-1)])]),_:1}),o(b,{color:"error",onClick:n.doClearReports},{default:a(()=>[...e[80]||(e[80]=[u(" 确认清空 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["model-value"])}const Ye=H($t,[["render",Ci],["__scopeId","data-v-5d732295"]]),Ti=Object.freeze(Object.defineProperty({__proto__:null,default:Ye},Symbol.toStringTag,{value:"Module"})),_i=z(()=>P(()=>Promise.resolve().then(()=>Ti),void 0,import.meta.url)),Mi=2,Ei=.9,Ri=.6,Ii={name:"TimeCard",components:{NoiseMonitorDetail:_i},data(){return{now:new Date,timer:null,unwatch:null,fontSize:28,showFullscreen:!1,showSettings:!1,timeCardEnabled:!0,use12hClock:!1,fullscreenMode:"clock",toolbarVisible:!0,toolbarTimer:null,countdownHours:0,countdownMinutes:5,countdownSeconds:0,countdownRunning:!1,countdownRemaining:0,countdownTotal:0,countdownTimer:null,countdownLastTick:null,countdownPresets:[{label:"1 分钟",h:0,m:1,s:0},{label:"3 分钟",h:0,m:3,s:0},{label:"5 分钟",h:0,m:5,s:0},{label:"10 分钟",h:0,m:10,s:0},{label:"15 分钟",h:0,m:15,s:0},{label:"30 分钟",h:0,m:30,s:0},{label:"1 小时",h:1,m:0,s:0}],countdownEndedDialog:!1,overtimeElapsed:0,overtimeTimer:null,overtimeLastTick:null,stopwatchRunning:!1,stopwatchElapsed:0,stopwatchTimer:null,stopwatchLastTick:null,laps:[],lastLapElapsed:0,noiseEnabled:!1,noiseMonitoring:!1,noiseStatus:"initializing",noiseCurrentDbfs:-100,noiseCurrentDisplayDb:0,noiseSmoothedDb:0,noiseScore:null,noiseScoreDetail:null,noiseRingBuffer:[],noiseLastSlice:null,noiseHistory:[],noiseUnsubscribe:null,showNoiseDetail:!1,noiseSessionConfig:null,noiseSessionActive:!1,noiseSessionData:null,noiseSessionCheckTimer:null,noiseReportMeta:{},noiseSelectedDate:"",noiseCurrentDateReports:[],showMicPermissionDialog:!1,micPermissionState:""}},computed:{timeString(){const t=this.now.getHours(),e=String(this.now.getMinutes()).padStart(2,"0");return this.use12hClock?`${t%12||12}:${e}`:`${String(t).padStart(2,"0")}:${e}`},amPmString(){return this.now.getHours()<12?"AM":"PM"},secondsString(){return`:${String(this.now.getSeconds()).padStart(2,"0")}`},dateString(){const t=this.now.getFullYear(),e=this.now.getMonth()+1,i=this.now.getDate();return`${t}年${e}月${i}日`},weekdayString(){return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][this.now.getDay()]},periodOfDay(){const t=this.now.getHours();return t<6?"凌晨":t<8?"早晨":t<11?"上午":t<13?"中午":t<17?"下午":t<19?"傍晚":t<22?"晚上":"深夜"},dayProgressPercent(){const t=this.now.getHours(),e=this.now.getMinutes(),i=this.now.getSeconds();return((t*3600+e*60+i)/86400*100).toFixed(1)},timeStyle(){return{"font-size":`${this.fontSize*Mi}px`,"font-weight":"700","line-height":"1","letter-spacing":"4px","font-variant-numeric":"tabular-nums"}},secondsStyle(){return{"font-size":`${this.fontSize*Ei}px`,"font-variant-numeric":"tabular-nums","vertical-align":"baseline","margin-left":"4px",opacity:"0.6"}},dateStyle(){return{"font-size":`${this.fontSize*Ri}px`,"letter-spacing":"1px"}},countdownTotalSetSeconds(){return this.countdownHours*3600+this.countdownMinutes*60+this.countdownSeconds},countdownDisplay(){const t=Math.max(0,Math.ceil(this.countdownRemaining/1e3)),e=Math.floor(t/3600),i=Math.floor(t%3600/60),l=t%60;return e>0?`${String(e).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`:`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`},countdownProgressPercent(){return this.countdownTotal<=0?0:(this.countdownTotal-this.countdownRemaining)/this.countdownTotal*100},overtimeDisplay(){const t=Math.floor(this.overtimeElapsed/1e3),e=Math.floor(t/3600),i=Math.floor(t%3600/60),l=t%60;return e>0?`${e}小时${i}分${l}秒`:i>0?`${i}分${l}秒`:`${l}秒`},stopwatchDisplay(){const t=this.stopwatchElapsed,e=Math.floor(t/1e3),i=Math.floor(e/3600),l=Math.floor(e%3600/60),s=e%60,n=Math.floor(t%1e3/10);return i>0?`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}:${String(s).padStart(2,"0")}.${String(n).padStart(2,"0")}`:`${String(l).padStart(2,"0")}:${String(s).padStart(2,"0")}.${String(n).padStart(2,"0")}`},noiseDisplayDb(){return!this.noiseMonitoring||this.noiseStatus!=="active"?"--":Math.round(this.noiseSmoothedDb)},noiseDbColor(){const t=typeof this.noiseDisplayDb=="number"?this.noiseDisplayDb:0;return t<40?"success":t<55?"light-green":t<70?"warning":t<85?"orange":"error"},noiseIconColor(){return this.noiseMonitoring?this.noiseDbColor:"grey"},noiseStatusText(){if(!this.noiseMonitoring||this.noiseStatus!=="active")return"未监测";const t=typeof this.noiseDisplayDb=="number"?this.noiseDisplayDb:0;return t<30?"极其安静":t<40?"非常安静":t<50?"安静":t<60?"正常交谈":t<70?"较为嘈杂":t<80?"嘈杂":t<90?"非常嘈杂":"极度嘈杂"}},watch:{showFullscreen(t){t?(this.handleKeydown=e=>{e.key==="Escape"&&(this.showSettings?this.showSettings=!1:this.countdownEndedDialog&&this.dismissCountdownDialog(),e.preventDefault(),e.stopPropagation())},window.addEventListener("keydown",this.handleKeydown,!0),this.showToolbar()):(this.handleKeydown&&(window.removeEventListener("keydown",this.handleKeydown,!0),this.handleKeydown=null),this.clearToolbarTimer())}},async mounted(){if(this.loadSettings(),this.startTimer(),this.unwatch=Te(()=>{this.loadSettings()}),this.noiseEnabled=D("noiseMonitor.enabled"),this.noiseEnabled){this.noiseHistory=G.getHistory();const t=await this.checkMicPermission();this.micPermissionState=t,t==="granted"?this.loadNoiseSessionConfig().then(()=>{this.startSessionCheck(),D("noiseMonitor.autoStart")&&!this.noiseMonitoring&&this.startNoise()}):t==="prompt"&&(D("noiseMonitor.permissionDismissed")||(this.showMicPermissionDialog=!0))}},beforeUnmount(){this.stopTimer(),this.clearCountdownTimer(),this.clearStopwatchTimer(),this.clearToolbarTimer(),this.dismissCountdownDialog(),this.stopNoise(),this.stopSessionCheck(),this.unwatch&&this.unwatch(),this.handleKeydown&&window.removeEventListener("keydown",this.handleKeydown,!0)},methods:{loadSettings(){this.fontSize=ne.getSetting("font.size"),this.timeCardEnabled=D("timeCard.enabled"),this.use12hClock=D("timeCard.use12h"),this.noiseEnabled=D("noiseMonitor.enabled")},setTimeCardEnabled(t){this.timeCardEnabled=t,K("timeCard.enabled",t)},setUse12hClock(t){this.use12hClock=t,K("timeCard.use12h",t)},startTimer(){this.timer=setInterval(()=>{this.now=new Date},1e3)},stopTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)},showToolbar(){this.toolbarVisible=!0,this.clearToolbarTimer(),this.toolbarTimer=setTimeout(()=>{this.toolbarVisible=!1},3e3)},clearToolbarTimer(){this.toolbarTimer&&(clearTimeout(this.toolbarTimer),this.toolbarTimer=null)},applyCountdownPreset(t){this.countdownHours=t.h,this.countdownMinutes=t.m,this.countdownSeconds=t.s},startCountdown(){const t=this.countdownTotalSetSeconds*1e3;t<=0||(this.countdownTotal=t,this.countdownRemaining=t,this.countdownRunning=!0,this.countdownLastTick=Date.now(),this.countdownTimer=setInterval(()=>{this.tickCountdown()},50))},tickCountdown(){const t=Date.now(),e=t-this.countdownLastTick;this.countdownLastTick=t,this.countdownRemaining=Math.max(0,this.countdownRemaining-e),this.countdownRemaining<=0&&(this.countdownRunning=!1,this.clearCountdownTimer(),yt(bt),this.showCountdownEndedDialog())},toggleCountdown(){this.countdownRunning?(this.countdownRunning=!1,this.clearCountdownTimer()):(this.countdownRunning=!0,this.countdownLastTick=Date.now(),this.countdownTimer=setInterval(()=>{this.tickCountdown()},50))},resetCountdown(){this.countdownRunning=!1,this.countdownRemaining=0,this.countdownTotal=0,this.clearCountdownTimer(),this.dismissCountdownDialog()},showCountdownEndedDialog(){this.countdownEndedDialog=!0,this.overtimeElapsed=0,this.overtimeLastTick=Date.now(),this.overtimeTimer=setInterval(()=>{const t=Date.now();this.overtimeElapsed+=t-this.overtimeLastTick,this.overtimeLastTick=t},200)},dismissCountdownDialog(){this.countdownEndedDialog=!1,this.overtimeElapsed=0,this.overtimeTimer&&(clearInterval(this.overtimeTimer),this.overtimeTimer=null)},formatCountdownTotal(t){const e=Math.round(t/1e3),i=Math.floor(e/3600),l=Math.floor(e%3600/60),s=e%60,n=[];return i>0&&n.push(`${i}小时`),l>0&&n.push(`${l}分钟`),s>0&&n.push(`${s}秒`),n.join("")||"0秒"},clearCountdownTimer(){this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null)},toggleStopwatch(){this.stopwatchRunning?(this.stopwatchRunning=!1,this.clearStopwatchTimer()):(this.stopwatchRunning=!0,this.stopwatchLastTick=Date.now(),this.stopwatchTimer=setInterval(()=>{this.tickStopwatch()},30))},tickStopwatch(){const t=Date.now();this.stopwatchElapsed+=t-this.stopwatchLastTick,this.stopwatchLastTick=t},addLap(){const t=this.stopwatchElapsed-this.lastLapElapsed;this.laps.unshift({split:t,total:this.stopwatchElapsed}),this.lastLapElapsed=this.stopwatchElapsed},resetStopwatch(){this.stopwatchRunning=!1,this.stopwatchElapsed=0,this.lastLapElapsed=0,this.laps=[],this.clearStopwatchTimer()},clearStopwatchTimer(){this.stopwatchTimer&&(clearInterval(this.stopwatchTimer),this.stopwatchTimer=null)},formatMs(t){const e=Math.floor(t/1e3),i=Math.floor(e/60),l=e%60,s=Math.floor(t%1e3/10);return`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}.${String(s).padStart(2,"0")}`},async checkMicPermission(){try{return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices&&!(await navigator.mediaDevices.enumerateDevices()).some(l=>l.kind==="audioinput")?"unavailable":!navigator.permissions||!navigator.permissions.query?"granted":(await navigator.permissions.query({name:"microphone"})).state}catch{return"prompt"}},async grantMicPermission(){this.showMicPermissionDialog=!1,await this.loadNoiseSessionConfig(),this.startSessionCheck(),await this.startNoise(),this.micPermissionState=await this.checkMicPermission()},dismissMicPermission(){this.showMicPermissionDialog=!1,K("noiseMonitor.permissionDismissed",!0)},onPermissionDialogToggle(t){this.noiseEnabled=t,K("noiseMonitor.enabled",t),t||(this.showMicPermissionDialog=!1,K("noiseMonitor.permissionDismissed",!0))},async startNoise(){try{await G.start(),this.noiseMonitoring=!0,this.noiseUnsubscribe=G.subscribe(t=>{this.noiseStatus=t.status,this.noiseCurrentDbfs=t.currentDbfs,this.noiseCurrentDisplayDb=t.currentDisplayDb;const e=.25,i=t.currentDisplayDb;this.noiseSmoothedDb=this.noiseSmoothedDb===0?i:this.noiseSmoothedDb*(1-e)+i*e,this.noiseRingBuffer=t.ringBuffer||[],this.noiseLastSlice=t.lastSlice||null,this.noiseScore=t.currentScore??null,this.noiseScoreDetail=t.currentScoreDetail??null,this.noiseHistory=G.getHistory(),this.noiseSessionActive&&this.noiseSessionData&&this.collectSessionSample(t)})}catch(t){console.error("噪音监测启动失败:",t),this.noiseStatus="error"}},stopNoise(){this.noiseUnsubscribe&&(this.noiseUnsubscribe(),this.noiseUnsubscribe=null),this.noiseMonitoring&&G.stop(),this.noiseMonitoring=!1,this.noiseStatus="initializing",this.noiseSmoothedDb=0,this.noiseScore=null,this.noiseScoreDetail=null},clearNoiseHistory(){G.clearHistory(),this.noiseHistory=[]},onNoiseClick(){if(this.micPermissionState==="denied"||this.micPermissionState==="unavailable"){this.showNoiseDetail=!0;return}this.noiseMonitoring?this.showNoiseDetail=!0:this.startNoise()},async loadNoiseSessionConfig(){try{const t=await R.loadData("noise-session-config"),e=(t==null?void 0:t.data)||t;e&&e.sessions?this.noiseSessionConfig=e:this.noiseSessionConfig={sessions:[{name:"第1节晚自习",start:"19:20",duration:70,enabled:!0},{name:"第2节晚自习",start:"20:20",duration:110,enabled:!0}],alertThresholdDb:55},await this.loadSessionReports()}catch(t){console.error("加载噪音会话配置失败:",t),this.noiseSessionConfig={sessions:[{name:"第1节晚自习",start:"19:20",duration:70,enabled:!0},{name:"第2节晚自习",start:"20:20",duration:110,enabled:!0}],alertThresholdDb:55}}},async saveNoiseSessionConfig(){try{await R.saveData("noise-session-config",this.noiseSessionConfig)}catch(t){console.error("保存噪音会话配置失败:",t)}},formatDateKey(t){const e=new Date(t);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`},async loadReportMeta(){try{const t=await R.loadData("noise-reports-meta"),e=(t==null?void 0:t.data)||t;if(e&&e.dates){const i=new Date;i.setDate(i.getDate()-30);const l=this.formatDateKey(i.getTime()),s={};for(const[n,d]of Object.entries(e.dates))n>=l&&(s[n]=d);this.noiseReportMeta={dates:s}}else this.noiseReportMeta={dates:{}}}catch{this.noiseReportMeta={dates:{}}}},async saveReportMeta(){try{await R.saveData("noise-reports-meta",this.noiseReportMeta)}catch{console.error("保存报告元数据失败")}},async loadReportsForDate(t){this.noiseSelectedDate=t;try{const e=await R.loadData(`noise-reports-${t}`),i=(e==null?void 0:e.data)||e;this.noiseCurrentDateReports=Array.isArray(i)?i:[]}catch{this.noiseCurrentDateReports=[]}},async saveReportToDate(t){const e=this.formatDateKey(t.startTime);let i=[];try{const s=await R.loadData(`noise-reports-${e}`),n=(s==null?void 0:s.data)||s;Array.isArray(n)&&(i=n)}catch{}i.push(t),await R.saveData(`noise-reports-${e}`,i),this.noiseReportMeta.dates||(this.noiseReportMeta.dates={});const l=i.map(s=>s.score);this.noiseReportMeta.dates[e]={count:i.length,avgScore:Math.round(l.reduce((s,n)=>s+n,0)/l.length),sessions:i.map(s=>s.sessionName),lastUpdated:Date.now()},await this.saveReportMeta(),this.noiseSelectedDate===e&&(this.noiseCurrentDateReports=i)},async loadSessionReports(){await this.loadReportMeta();const t=this.formatDateKey(Date.now());await this.loadReportsForDate(t)},startSessionCheck(){this.checkSessionTime(),this.noiseSessionCheckTimer=setInterval(()=>{this.checkSessionTime()},3e4)},stopSessionCheck(){this.noiseSessionCheckTimer&&(clearInterval(this.noiseSessionCheckTimer),this.noiseSessionCheckTimer=null)},checkSessionTime(){var l;if(!((l=this.noiseSessionConfig)!=null&&l.sessions))return;const t=new Date,e=t.getHours()*60+t.getMinutes(),i=this.noiseSessionConfig.sessions.find(s=>{if(!s.enabled)return!1;const[n,d]=s.start.split(":").map(Number),h=n*60+d,p=h+(s.duration||70);return e>=h&&e0){const i=this.noiseSessionData.samples,l=i.length>0?i[i.length-1].t:0;Date.now()-l>=2e3&&i.push({t:Date.now(),db:Math.round(e*10)/10})}},generateSessionReport(t){const e=t.samples,i=e.map(W=>W.db),l=t.alertThresholdDb,s=t.endTime-t.startTime;if(i.length===0)return{sessionName:t.sessionName,startTime:t.startTime,endTime:t.endTime,duration:s,avgDb:0,maxDb:0,score:100,overThresholdDuration:0,overThresholdRatio:0,segmentCount:0,samples:[],scorePenalties:{sustained:0,time:0,segment:0}};const n=Math.round(i.reduce((W,ge)=>W+ge,0)/i.length*10)/10,d=Math.round(Math.max(...i)*10)/10;let h=0;i.forEach(W=>{W>l&&h++});const p=h/i.length,g=Math.round(p*s/1e3);let S=0,U=!1;i.forEach(W=>{W>l&&!U&&(S++,U=!0),W<=l&&(U=!1)});const A=Math.min(40,Math.max(0,(n-l)/30*40)),Y=Math.min(30,p*30),J=Math.min(30,S/Math.max(1,s/6e4)/6*30),fe=Math.max(0,Math.round(100-A-Y-J));return{sessionName:t.sessionName,startTime:t.startTime,endTime:t.endTime,duration:s,avgDb:n,maxDb:d,score:fe,overThresholdDuration:g,overThresholdRatio:Math.round(p*1e3)/10,segmentCount:S,samples:e.length>500?this.downsampleArray(e,500):e,scorePenalties:{sustained:Math.round(A),time:Math.round(Y),segment:Math.round(J)},alertThresholdDb:l}},downsampleArray(t,e){const i=t.length/e,l=[];for(let s=0;ss.showFullscreen=!0)},{default:a(()=>[o(T,{class:"pa-6 d-flex flex-column",style:{height:"100%"}},{default:a(()=>[r("div",Vi,[r("div",Ni,[r("div",{class:"time-display",style:N(n.timeStyle)},[u(m(n.timeString),1),r("span",{class:"seconds-text",style:N(n.secondsStyle)},m(n.secondsString),5),s.use12hClock?(c(),f("span",{key:0,class:"ampm-text",style:N(n.secondsStyle)},m(n.amPmString),5)):w("",!0)],4),r("div",{class:"date-line mt-3",style:N(n.dateStyle)},m(n.dateString)+" "+m(n.weekdayString)+" "+m(n.periodOfDay),5)]),s.noiseEnabled?(c(),f("div",{key:0,class:"d-flex flex-column align-center justify-center",style:{"min-width":"80px"},onClick:e[0]||(e[0]=Re((...h)=>n.onNoiseClick&&n.onNoiseClick(...h),["stop"]))},[s.micPermissionState==="denied"?(c(),f(k,{key:0},[o(x,{color:"error",size:"24"},{default:a(()=>[...e[18]||(e[18]=[u(" mdi-microphone-off ",-1)])]),_:1}),e[19]||(e[19]=r("div",{class:"text-caption text-error mt-1",style:{"white-space":"nowrap","font-size":"10px"}}," 权限被拒绝 ",-1))],64)):s.micPermissionState==="unavailable"?(c(),f(k,{key:1},[o(x,{color:"warning",size:"24"},{default:a(()=>[...e[20]||(e[20]=[u(" mdi-microphone-question ",-1)])]),_:1}),e[21]||(e[21]=r("div",{class:"text-caption text-warning mt-1",style:{"white-space":"nowrap","font-size":"10px"}}," 无麦克风 ",-1))],64)):(c(),f(k,{key:2},[r("div",{class:O(["noise-side-db font-weight-bold",`text-${n.noiseDbColor}`]),style:N({fontSize:`${s.fontSize*.9}px`,lineHeight:1,fontVariantNumeric:"tabular-nums"})},m(n.noiseDisplayDb),7),r("div",{class:O(["text-caption mt-1",`text-${n.noiseDbColor}`]),style:{"white-space":"nowrap","font-size":"11px"}},m(n.noiseStatusText),3),s.noiseMonitoring?w("",!0):(c(),f("div",Pi," 点击开启 "))],64))])):w("",!0)])]),_:1}),s.noiseEnabled?(c(),v(d,{key:0,modelValue:s.showNoiseDetail,"onUpdate:modelValue":e[1]||(e[1]=h=>s.showNoiseDetail=h),status:s.noiseStatus,"current-db":n.noiseDisplayDb,"current-dbfs":s.noiseCurrentDbfs,"noise-level":n.noiseStatusText,"db-color":n.noiseDbColor,"current-score":s.noiseScore,"score-detail":s.noiseScoreDetail,"ring-buffer":s.noiseRingBuffer,"last-slice":s.noiseLastSlice,history:s.noiseHistory,"is-monitoring":s.noiseMonitoring,"mic-permission-state":s.micPermissionState,"session-active":s.noiseSessionActive,"session-data":s.noiseSessionData,"report-meta":s.noiseReportMeta,"selected-date":s.noiseSelectedDate,"date-reports":s.noiseCurrentDateReports,onStart:n.startNoise,onStop:n.stopNoise,onClearHistory:n.clearNoiseHistory,onSelectDate:n.onSelectReportDate,onClearDateReports:n.onClearDateReports,onClearAllReports:n.onClearAllReports},null,8,["modelValue","status","current-db","current-dbfs","noise-level","db-color","current-score","score-detail","ring-buffer","last-slice","history","is-monitoring","mic-permission-state","session-active","session-data","report-meta","selected-date","date-reports","onStart","onStop","onClearHistory","onSelectDate","onClearDateReports","onClearAllReports"])):w("",!0),o(B,{modelValue:s.showMicPermissionDialog,"onUpdate:modelValue":e[2]||(e[2]=h=>s.showMicPermissionDialog=h),"max-width":"480",persistent:""},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[r("div",Ai,[o(st,{color:"primary",size:"72"},{default:a(()=>[o(x,{icon:"mdi-microphone-outline",size:"36"})]),_:1})]),o(I,{class:"text-center text-h6 pt-4"},{default:a(()=>[...e[22]||(e[22]=[u(" 开启环境噪音监测 ",-1)])]),_:1}),o(T,{class:"text-body-2 text-medium-emphasis px-6"},{default:a(()=>[e[27]||(e[27]=r("p",{class:"mb-3"}," 该功能可以实时监测教室环境噪音,帮助营造安静的学习氛围: ",-1)),r("div",Li,[o(x,{icon:"mdi-chart-line",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[23]||(e[23]=r("span",null,"实时显示环境分贝数与噪音等级评估",-1))]),r("div",zi,[o(x,{icon:"mdi-clock-check-outline",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[24]||(e[24]=r("span",null,"在晚自习时段自动记录并生成统计报告",-1))]),r("div",Fi,[o(x,{icon:"mdi-shield-check-outline",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[25]||(e[25]=r("span",null,"音频数据仅在本地处理,不会上传或存储录音",-1))]),o(le,{type:"info",variant:"tonal",density:"compact",class:"mb-2"},{default:a(()=>[...e[26]||(e[26]=[u(" 需要授予麦克风权限才能使用此功能。浏览器将弹出权限请求,请点击「允许」。 ",-1)])]),_:1})]),_:1}),o(F),o(T,{class:"px-6 py-3"},{default:a(()=>[o(ee,{density:"compact",class:"pa-0"},{default:a(()=>[o(X,{class:"px-0"},{prepend:a(()=>[o(x,{icon:"mdi-microphone",class:"mr-3"})]),append:a(()=>[o(be,{"model-value":s.noiseEnabled,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.onPermissionDialogToggle},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[28]||(e[28]=[u("启用噪音监测",-1)])]),_:1}),o(ae,{class:"text-caption"},{default:a(()=>[...e[29]||(e[29]=[u(" 关闭后将不再提醒 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),o(j,{class:"px-6 pb-5"},{default:a(()=>[o(b,{variant:"text",onClick:n.dismissMicPermission},{default:a(()=>[...e[30]||(e[30]=[u(" 暂不开启 ",-1)])]),_:1},8,["onClick"]),o(E),o(b,{color:"primary",variant:"elevated","prepend-icon":"mdi-microphone",disabled:!s.noiseEnabled,onClick:n.grantMicPermission},{default:a(()=>[...e[31]||(e[31]=[u(" 授权并开始 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(B,{modelValue:s.showFullscreen,"onUpdate:modelValue":e[14]||(e[14]=h=>s.showFullscreen=h),fullscreen:"",scrim:!1,persistent:"",transition:"dialog-bottom-transition"},{default:a(()=>[o(_,{class:"fullscreen-time-card d-flex flex-column",onMousemove:n.showToolbar,onTouchstart:n.showToolbar},{default:a(()=>[o(lt,{name:"toolbar-fade"},{default:a(()=>[dt(r("div",Bi,[o(Oe,{modelValue:s.fullscreenMode,"onUpdate:modelValue":e[4]||(e[4]=h=>s.fullscreenMode=h),density:"comfortable",color:"primary","align-tabs":"center",class:"fullscreen-tabs"},{default:a(()=>[o(Q,{value:"clock"},{default:a(()=>[o(x,{start:"",icon:"mdi-clock-outline"}),e[32]||(e[32]=u(" 时钟 ",-1))]),_:1}),o(Q,{value:"countdown"},{default:a(()=>[o(x,{start:"",icon:"mdi-timer-sand"}),e[33]||(e[33]=u(" 倒计时 ",-1))]),_:1}),o(Q,{value:"stopwatch"},{default:a(()=>[o(x,{start:"",icon:"mdi-timer-outline"}),e[34]||(e[34]=u(" 秒表 ",-1))]),_:1})]),_:1},8,["modelValue"])],512),[[ct,s.toolbarVisible]])]),_:1}),r("div",Oi,[o(Ue,{modelValue:s.fullscreenMode,"onUpdate:modelValue":e[11]||(e[11]=h=>s.fullscreenMode=h),class:"fullscreen-tabs-window"},{default:a(()=>[o($,{value:"clock"},{default:a(()=>[r("div",Ui,[r("div",ji,[u(m(n.timeString),1),r("span",Hi,m(n.secondsString),1),s.use12hClock?(c(),f("span",Wi,m(n.amPmString),1)):w("",!0)]),r("div",Gi,m(n.dateString)+" "+m(n.weekdayString)+" "+m(n.periodOfDay),1),r("div",Ki,[r("div",qi," 今日已过 "+m(n.dayProgressPercent)+"% ",1),o(re,{"model-value":n.dayProgressPercent,color:"primary",height:"6",rounded:"",style:{"max-width":"400px",width:"80vw"}},null,8,["model-value"])]),e[35]||(e[35]=r("div",{class:"fullscreen-extra mt-8 text-medium-emphasis d-flex ga-8"},null,-1))])]),_:1}),o($,{value:"countdown"},{default:a(()=>[r("div",Yi,[!s.countdownRunning&&s.countdownRemaining<=0?(c(),f(k,{key:0},[r("div",Ji,[r("div",Xi,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[5]||(e[5]=h=>s.countdownHours=Math.min(s.countdownHours+1,99))}),r("div",Zi,m(String(s.countdownHours).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[6]||(e[6]=h=>s.countdownHours=Math.max(s.countdownHours-1,0))}),e[36]||(e[36]=r("div",{class:"text-caption text-medium-emphasis"}," 时 ",-1))]),e[39]||(e[39]=r("div",{class:"countdown-sep"}," : ",-1)),r("div",Qi,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[7]||(e[7]=h=>s.countdownMinutes=Math.min(s.countdownMinutes+1,59))}),r("div",$i,m(String(s.countdownMinutes).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[8]||(e[8]=h=>s.countdownMinutes=Math.max(s.countdownMinutes-1,0))}),e[37]||(e[37]=r("div",{class:"text-caption text-medium-emphasis"}," 分 ",-1))]),e[40]||(e[40]=r("div",{class:"countdown-sep"}," : ",-1)),r("div",en,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[9]||(e[9]=h=>s.countdownSeconds=Math.min(s.countdownSeconds+1,59))}),r("div",tn,m(String(s.countdownSeconds).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[10]||(e[10]=h=>s.countdownSeconds=Math.max(s.countdownSeconds-1,0))}),e[38]||(e[38]=r("div",{class:"text-caption text-medium-emphasis"}," 秒 ",-1))])]),r("div",sn,[(c(!0),f(k,null,M(s.countdownPresets,h=>(c(),v(b,{key:h.label,variant:"tonal",rounded:"xl",onClick:p=>n.applyCountdownPreset(h)},{default:a(()=>[u(m(h.label),1)]),_:2},1032,["onClick"]))),128))]),r("div",nn,[o(b,{color:"primary",size:"x-large",rounded:"xl",disabled:n.countdownTotalSetSeconds<=0,"prepend-icon":"mdi-play",onClick:n.startCountdown},{default:a(()=>[...e[41]||(e[41]=[u(" 开始 ",-1)])]),_:1},8,["disabled","onClick"])])],64)):(c(),f(k,{key:1},[r("div",{class:O(["fullscreen-time-display",{"countdown-ended":s.countdownRemaining<=0&&!s.countdownRunning}])},m(n.countdownDisplay),3),r("div",on,m(s.countdownRunning?"倒计时进行中":s.countdownRemaining<=0?"时间到!":"已暂停"),1),o(re,{"model-value":n.countdownProgressPercent,color:s.countdownRemaining<=0?"error":"primary",class:"mt-8",height:"6",rounded:"",style:{"max-width":"400px",width:"80vw"}},null,8,["model-value","color"]),r("div",an,[s.countdownRemaining>0?(c(),v(b,{key:0,icon:s.countdownRunning?"mdi-pause":"mdi-play",color:s.countdownRunning?"warning":"primary",size:"x-large",variant:"tonal",onClick:n.toggleCountdown},null,8,["icon","color","onClick"])):w("",!0),o(b,{icon:"mdi-stop",color:"error",size:"x-large",variant:"tonal",onClick:n.resetCountdown},null,8,["onClick"])])],64))])]),_:1}),o($,{value:"stopwatch"},{default:a(()=>[r("div",rn,[r("div",ln,m(n.stopwatchDisplay),1),r("div",dn,m(s.stopwatchRunning?"计时中":s.stopwatchElapsed>0?"已暂停":"秒表"),1),r("div",cn,[o(b,{icon:s.stopwatchRunning?"mdi-pause":"mdi-play",color:s.stopwatchRunning?"warning":"primary",size:"x-large",variant:"tonal",onClick:n.toggleStopwatch},null,8,["icon","color","onClick"]),s.stopwatchRunning?(c(),v(b,{key:0,icon:"mdi-flag",color:"info",size:"x-large",variant:"tonal",onClick:n.addLap},null,8,["onClick"])):w("",!0),!s.stopwatchRunning&&s.stopwatchElapsed>0?(c(),v(b,{key:1,icon:"mdi-stop",color:"error",size:"x-large",variant:"tonal",onClick:n.resetStopwatch},null,8,["onClick"])):w("",!0)]),o(it,null,{default:a(()=>[s.laps.length>0?(c(),f("div",un,[o(ft,{density:"compact",class:"stopwatch-laps-table"},{default:a(()=>[e[42]||(e[42]=r("thead",null,[r("tr",null,[r("th",null," # "),r("th",null," 计次 "),r("th",null," 总计 ")])],-1)),r("tbody",null,[(c(!0),f(k,null,M(s.laps,(h,p)=>(c(),f("tr",{key:p},[r("td",null,m(s.laps.length-p),1),r("td",null,m(n.formatMs(h.split)),1),r("td",null,m(n.formatMs(h.total)),1)]))),128))])]),_:1})])):w("",!0)]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),r("div",hn,[o(b,{icon:"mdi-cog",variant:"text",size:"large",onClick:e[12]||(e[12]=Re(h=>s.showSettings=!0,["stop"]))}),o(b,{icon:"mdi-close",variant:"text",size:"large",class:"ml-2",onClick:e[13]||(e[13]=h=>s.showFullscreen=!1)})])]),_:1},8,["onMousemove","onTouchstart"])]),_:1},8,["modelValue"]),o(B,{modelValue:s.countdownEndedDialog,"onUpdate:modelValue":e[15]||(e[15]=h=>s.countdownEndedDialog=h),"max-width":"480",persistent:""},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[o(I,{class:"d-flex align-center justify-center pt-6"},{default:a(()=>[o(x,{color:"error",size:"32",class:"mr-2",icon:"mdi-alarm"}),e[43]||(e[43]=u(" 时间到! ",-1))]),_:1}),o(T,{class:"text-center pb-2"},{default:a(()=>[r("div",mn,m(n.formatCountdownTotal(s.countdownTotal)),1),e[44]||(e[44]=r("div",{class:"text-body-1 text-medium-emphasis"}," 设定的倒计时已结束 ",-1)),s.overtimeElapsed>0?(c(),f("div",fn,[o(L,{color:"error",variant:"tonal",size:"large","prepend-icon":"mdi-clock-alert-outline"},{default:a(()=>[u(" 已超时 "+m(n.overtimeDisplay),1)]),_:1})])):w("",!0)]),_:1}),o(j,{class:"justify-center pb-6"},{default:a(()=>[o(b,{color:"primary",variant:"tonal",size:"large",rounded:"xl","prepend-icon":"mdi-check",onClick:n.dismissCountdownDialog},{default:a(()=>[...e[45]||(e[45]=[u(" 知道了 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:s.showSettings,"onUpdate:modelValue":e[17]||(e[17]=h=>s.showSettings=h),"max-width":"420",scrim:!0},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[o(I,{class:"d-flex align-center"},{default:a(()=>[o(x,{class:"mr-2",icon:"mdi-cog"}),e[46]||(e[46]=u(" 时间卡片设置 ",-1))]),_:1}),o(T,null,{default:a(()=>[o(ee,null,{default:a(()=>[o(X,null,{prepend:a(()=>[o(x,{class:"mr-3",icon:"mdi-clock-outline"})]),append:a(()=>[o(be,{"model-value":s.timeCardEnabled,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.setTimeCardEnabled},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[47]||(e[47]=[u("显示时间卡片",-1)])]),_:1}),o(ae,null,{default:a(()=>[...e[48]||(e[48]=[u("在首页显示时间卡片,刷新后生效。",-1)])]),_:1})]),_:1}),o(X,null,{prepend:a(()=>[o(x,{class:"mr-3",icon:"mdi-clock-time-six-outline"})]),append:a(()=>[o(be,{"model-value":s.use12hClock,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.setUse12hClock},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[49]||(e[49]=[u("12 小时制",-1)])]),_:1}),o(ae,null,{default:a(()=>[...e[50]||(e[50]=[u("以 12 小时制(AM/PM)显示时间。",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{variant:"text",onClick:e[16]||(e[16]=h=>s.showSettings=!1)},{default:a(()=>[...e[51]||(e[51]=[u(" 完成 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}const Je=H(Ii,[["render",gn],["__scopeId","data-v-d5fb9d74"]]),pn={name:"HomeworkGrid",components:{HitokotoCard:Ge,TimeCard:Je,ConciseExamCard:We},props:{sortedItems:{type:Array,required:!0},unusedSubjects:{type:Array,required:!0},emptySubjectDisplay:{type:String,default:"button"},isMobile:{type:Boolean,default:!1},isEditingDisabled:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})},highlightedCards:{type:Object,default:()=>({})}},emits:["open-dialog","open-attendance","disabled-click"],data(){return{isReadOnlyToken:!1}},computed:{settings(){return settings}},async mounted(){this.resizeObserver=new ResizeObserver(()=>{this.resizeAllGridItems()}),this.$refs.gridContainer&&this.resizeObserver.observe(this.$refs.gridContainer),this.$nextTick(()=>{this.resizeAllGridItems(),this.$refs.items&&this.$refs.items.forEach(t=>{t.firstElementChild&&this.resizeObserver.observe(t.firstElementChild)})}),await this.checkReadOnlyStatus()},updated(){this.$nextTick(()=>{this.resizeAllGridItems(),this.$refs.items&&this.$refs.items.forEach(t=>{t.firstElementChild&&this.resizeObserver.observe(t.firstElementChild)})})},beforeUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()},methods:{getSetting:D,async checkReadOnlyStatus(){try{let t=null;if(this.$parent&&this.$parent.$refs&&this.$parent.$refs.studentNameManager?t=this.$parent.$refs.studentNameManager:this.$root&&this.$root.$refs&&this.$root.$refs.studentNameManager&&(t=this.$root.$refs.studentNameManager),t&&typeof t.isReadOnly<"u")this.isReadOnlyToken=t.isReadOnly;else{const{getSetting:e}=await P(async()=>{const{getSetting:l}=await import("./index-CzpSlHRw.js").then(s=>s.aI);return{getSetting:l}},__vite__mapDeps([0,1,2,3]),import.meta.url),i=e("server.kvToken");if(i){const{default:l}=await P(async()=>{const{default:n}=await import("./dataProvider-DBZnFcYO.js").then(d=>d.c);return{default:n}},__vite__mapDeps([4,5,0,1,2,3,6]),import.meta.url),s=e("server.domain");if(s)try{const n=await l.get(`${s}/kv/_token`,{headers:{Authorization:`Bearer ${i}`}});n.data&&typeof n.data.isReadOnly<"u"&&(this.isReadOnlyToken=n.data.isReadOnly)}catch(n){console.error("获取Token信息失败:",n)}}}}catch(t){console.error("检查只读状态失败:",t)}},resizeGridItem(t){const e=this.$refs.gridContainer;if(!e)return;const i=parseInt(window.getComputedStyle(e).getPropertyValue("grid-auto-rows")),l=parseInt(window.getComputedStyle(e).getPropertyValue("gap")),s=t.firstElementChild;if(!s)return;const n=s.getBoundingClientRect().height,d=Math.ceil((n+l)/(i+l));t.style.gridRowEnd=`span ${d}`},resizeAllGridItems(){const t=this.$refs.items;t&&t.forEach(e=>this.resizeGridItem(e))},handleCardClick(t,e){if(this.isEditingDisabled){this.$emit("disabled-click");return}t==="attendance"?this.$emit("open-attendance"):t==="dialog"&&this.$emit("open-dialog",e)},splitPoint(t){return t.split(` -`).filter(e=>e.trim())},handleMouseMove(t){const e=t.currentTarget,i=e.getBoundingClientRect(),l=(t.clientX-i.left)/i.width*100,s=(t.clientY-i.top)/i.height*100;e.style.setProperty("--x",`${l}%`),e.style.setProperty("--y",`${s}%`)},handleTouchMove(t){if(t.touches.length===1){const e=t.touches[0],i=t.currentTarget,l=i.getBoundingClientRect(),s=(e.clientX-l.left)/l.width*100,n=(e.clientY-l.top)/l.height*100;i.style.setProperty("--x",`${s}%`),i.style.setProperty("--y",`${n}%`)}}}},yn={ref:"gridContainer",class:"grid-masonry"},bn=["data-key"],vn={key:0,style:{height:"100%"}},wn={key:1,style:{height:"100%"}},Sn={key:2,style:{height:"100%"}},Dn={class:"d-flex justify-space-between align-center mb-2"},xn={class:"text-h6"},kn={key:0,class:"mb-2"},Cn={class:"text-error text-caption mb-1"},Tn={class:"d-flex flex-wrap",style:{gap:"4px"}},_n={key:1,class:"mb-2"},Mn={class:"text-warning text-caption mb-1"},En={class:"d-flex flex-wrap",style:{gap:"4px"}},Rn={key:2,class:"mb-2"},In={class:"text-grey text-caption mb-1"},Vn={class:"d-flex flex-wrap",style:{gap:"4px"}},Nn={key:3,class:"text-success text-center mt-2"},Pn={class:"empty-subjects mt-4"},An={key:0,class:"d-flex flex-wrap justify-center"},Ln={key:2,class:"empty-subjects-grid"};function zn(t,e,i,l,s,n){const d=Je,h=Ge,p=We;return c(),f(k,null,[r("div",yn,[o(Ie,{name:"grid"},{default:a(()=>[(c(!0),f(k,null,M(i.sortedItems,g=>(c(),f("div",{key:g.key,ref_for:!0,ref:"items","data-key":g.key,style:N({order:g.order}),class:"grid-item"},[g.type==="time"?(c(),f("div",vn,[o(d)])):g.type==="hitokoto"?(c(),f("div",wn,[o(h)])):g.type==="exam"?(c(),f("div",Sn,[o(p,{"exam-id":g.data.examId,"content-style":i.contentStyle,onClick:S=>t.$emit("open-exam-detail",g.data.examId)},null,8,["exam-id","content-style","onClick"])])):g.type==="attendance"?(c(),v(_,{key:3,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",onClick:e[0]||(e[0]=S=>n.handleCardClick("attendance",null)),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,{class:"d-flex align-center"},{default:a(()=>[o(x,{class:"mr-2",color:"primary",icon:"mdi-account-group"}),e[1]||(e[1]=u(" 出勤统计 ",-1))]),_:1}),o(T,null,{default:a(()=>[r("div",Dn,[e[2]||(e[2]=r("span",null,"应到/实到",-1)),r("span",xn,m(g.data.total-g.data.exclude.length)+"/"+m(g.data.total-g.data.absent.length-!n.getSetting("display.lateStudentsArePresent")*g.data.late.length-g.data.exclude.length),1)]),o(F,{class:"mb-2"}),g.data.absent.length>0?(c(),f("div",kn,[r("div",Cn," 请假 ("+m(g.data.absent.length)+") ",1),r("div",Tn,[(c(!0),f(k,null,M(g.data.absent,S=>(c(),v(L,{key:S,color:"error",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.late.length>0?(c(),f("div",_n,[r("div",Mn," 迟到 ("+m(g.data.late.length)+") ",1),r("div",En,[(c(!0),f(k,null,M(g.data.late,S=>(c(),v(L,{key:S,color:"warning",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.exclude.length>0?(c(),f("div",Rn,[r("div",In," 不参与 ("+m(g.data.exclude.length)+") ",1),r("div",Vn,[(c(!0),f(k,null,M(g.data.exclude,S=>(c(),v(L,{key:S,color:"grey",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.absent.length===0&&g.data.late.length===0&&g.data.exclude.length===0?(c(),f("div",Nn," 全勤 ")):w("",!0)]),_:2},1024)]),_:2},1032,["class","onMousemove","onTouchmove"])):g.type==="custom"?(c(),v(_,{key:4,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",onClick:S=>n.handleCardClick("dialog",g.key),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,{class:"text-primary"},{default:a(()=>[o(x,{class:"mr-2",icon:"mdi-card-text-outline",size:"small"}),u(" "+m(g.name),1)]),_:2},1024),o(T,{style:N(i.contentStyle)},{default:a(()=>[u(m(g.content),1)]),_:2},1032,["style"])]),_:2},1032,["class","onClick","onMousemove","onTouchmove"])):(c(),v(_,{key:5,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",rounded:"xl",onClick:S=>n.handleCardClick("dialog",g.key),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,null,{default:a(()=>[u(m(g.name),1)]),_:2},1024),o(T,{style:N(i.contentStyle)},{default:a(()=>[o(ee,null,{default:a(()=>[(c(!0),f(k,null,M(n.splitPoint(g.content),S=>(c(),v(X,{key:S},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["style"])]),_:2},1032,["class","onClick","onMousemove","onTouchmove"]))],12,bn))),128))]),_:1})],512),r("div",Pn,[i.isMobile?(c(),f("div",An,[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(L,{key:g.name,class:"ma-1",color:"primary",variant:"tonal",onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(x,{start:"",size:"small"},{default:a(()=>[u(m(s.isReadOnlyToken?"mdi-cancel":"mdi-plus"),1)]),_:1}),u(" "+m(g.name),1)]),_:2},1032,["onClick"]))),128))])):i.emptySubjectDisplay==="button"?(c(),v(Fe,{key:1,divided:"",variant:"tonal"},{default:a(()=>[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(b,{key:g.name,onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(x,{start:""},{default:a(()=>[u(m(s.isReadOnlyToken?"mdi-cancel":"mdi-plus"),1)]),_:1}),u(" "+m(g.name),1)]),_:2},1032,["onClick"]))),128))]),_:1})):(c(),f("div",Ln,[o(Ie,{name:"v-list"},{default:a(()=>[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(_,{key:g.name,border:"",rounded:"xl",class:"empty-subject-card",onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(I,{class:"text-subtitle-1"},{default:a(()=>[u(m(g.name),1)]),_:2},1024),o(T,{class:"text-center"},{default:a(()=>[s.isReadOnlyToken?(c(),f(k,{key:0},[o(x,{color:"grey",size:"small"},{default:a(()=>[...e[3]||(e[3]=[u(" mdi-cancel ",-1)])]),_:1}),e[4]||(e[4]=r("div",{class:"text-caption text-grey"}," 当日无作业 ",-1))],64)):(c(),f(k,{key:1},[o(x,{color:"grey",size:"small"},{default:a(()=>[...e[5]||(e[5]=[u(" mdi-plus ",-1)])]),_:1}),e[6]||(e[6]=r("div",{class:"text-caption text-grey"}," 点击添加作业 ",-1))],64))]),_:1})]),_:2},1032,["onClick"]))),128))]),_:1})]))])],64)}const Fn=H(pn,[["render",zn],["__scopeId","data-v-65991b74"]]),Bn={name:"HomeActions",props:{synced:Boolean,loadingUpload:Boolean,showRandomPickerButton:Boolean,showExamScheduleButton:Boolean,showListCardButton:Boolean,showFullscreenButton:Boolean,isFullscreen:Boolean,showAntiScreenBurnCard:Boolean,showTestCardButton:Boolean},emits:["upload","show-sync-message","open-random-picker","toggle-fullscreen","add-test-card"]},On={class:"d-flex flex-wrap align-center mt-4"};function Un(t,e,i,l,s,n){return c(),f(k,null,[r("div",On,[i.synced?(c(),v(b,{key:1,color:"success",size:"large",rounded:"xl",onClick:e[1]||(e[1]=d=>t.$emit("show-sync-message"))},{default:a(()=>[...e[9]||(e[9]=[u(" 同步完成 ",-1)])]),_:1})):(c(),v(b,{key:0,loading:i.loadingUpload,class:"ml-2",color:"error",size:"large",rounded:"xl",onClick:e[0]||(e[0]=d=>t.$emit("upload"))},{default:a(()=>[...e[8]||(e[8]=[u(" 上传 ",-1)])]),_:1},8,["loading"])),i.showRandomPickerButton?(c(),v(b,{key:2,"append-icon":"mdi-dice-multiple",class:"ml-2",color:"amber","prepend-icon":"mdi-account-question",size:"large",onClick:e[2]||(e[2]=d=>t.$emit("open-random-picker"))},{default:a(()=>[...e[10]||(e[10]=[u(" 随机点名 ",-1)])]),_:1})):w("",!0),i.showExamScheduleButton?(c(),v(Fe,{key:3,class:"ml-2",color:"green",variant:"elevated",divided:""},{default:a(()=>[o(b,{"prepend-icon":"mdi-calendar-check",size:"large",onClick:e[3]||(e[3]=d=>t.$router.push("/examschedule"))},{default:a(()=>[...e[11]||(e[11]=[u(" 考试看板 ",-1)])]),_:1}),o(b,{icon:"mdi-plus",size:"large",onClick:e[4]||(e[4]=d=>t.$emit("add-exam-card"))})]),_:1})):w("",!0),i.showListCardButton?(c(),v(b,{key:4,class:"ml-2",color:"primary-darken-1","prepend-icon":"mdi-list-box",size:"large",onClick:e[5]||(e[5]=d=>t.$router.push("/list"))},{default:a(()=>[...e[12]||(e[12]=[u(" 列表 ",-1)])]),_:1})):w("",!0),i.showFullscreenButton?(c(),v(b,{key:5,color:i.isFullscreen?"blue-grey":"blue","prepend-icon":i.isFullscreen?"mdi-fullscreen-exit":"mdi-fullscreen",class:"ml-2",size:"large",onClick:e[6]||(e[6]=d=>t.$emit("toggle-fullscreen"))},{default:a(()=>[u(m(i.isFullscreen?"退出全屏":"全屏显示"),1)]),_:1},8,["color","prepend-icon"])):w("",!0),i.showTestCardButton?(c(),v(b,{key:6,class:"ml-2",color:"purple","prepend-icon":"mdi-test-tube",size:"large",onClick:e[7]||(e[7]=d=>t.$emit("add-test-card"))},{default:a(()=>[...e[13]||(e[13]=[u(" 添加测试卡片 ",-1)])]),_:1})):w("",!0)]),i.showAntiScreenBurnCard?(c(),v(_,{key:0,border:"",class:"mt-4 anti-burn-card",color:"primary",variant:"tonal"},{default:a(()=>[o(I,{class:"text-subtitle-1"},{default:a(()=>[o(x,{icon:"mdi-shield-check",size:"small",start:""}),e[14]||(e[14]=u(" 屏幕保护技术已启用 ",-1))]),_:1}),o(T,{class:"text-body-2"},{default:a(()=>[...e[15]||(e[15]=[r("p",null," 为防止OLED/LCD屏幕烧屏,界面元素会定期微调位置。 ",-1),r("p",{class:"text-caption text-grey"}," 此功能不会影响正常使用,仅在长时间静止显示时生效。 ",-1),r("p",{class:"text-caption text-grey"}," 建议在放学后关闭显示器以节约能源。 ",-1)])]),_:1})]),_:1})):w("",!0)],64)}const jn=H(Bn,[["render",Un]]),Hn={name:"FloatingICP"},Wn={"aria-label":"xICP备x号",class:"floating-icp-link",href:"https://beian.miit.gov.cn/",rel:"noopener noreferrer",target:"_blank",style:{display:"none"}};function Gn(t,e,i,l,s,n){return c(),f("a",Wn," xICP备x号 ")}const Kn=H(Hn,[["render",Gn],["__scopeId","data-v-fa73670f"]]),qn={class:"skeleton-grid"},Yn={__name:"HomeSkeleton",setup(t){const{mobile:e}=De(),i=ut(()=>e.value?3:6);return(l,s)=>(c(),v(je,{class:"main-window",fluid:""},{default:a(()=>[r("div",qn,[(c(!0),f(k,null,M(i.value,n=>(c(),f("div",{key:n,class:"skeleton-card"},[...s[0]||(s[0]=[r("div",{class:"skeleton-heading skeleton-pulse"},null,-1),r("div",{class:"skeleton-line skeleton-pulse"},null,-1),r("div",{class:"skeleton-line skeleton-line--short skeleton-pulse"},null,-1)])]))),128))]),s[1]||(s[1]=r("div",{class:"d-flex justify-center mt-6 ga-3"},[r("div",{class:"skeleton-btn skeleton-pulse"}),r("div",{class:"skeleton-btn skeleton-pulse"})],-1))]),_:1}))}},Jn=H(Yn,[["__scopeId","data-v-c545dbe3"]]);function Se(t,e){let i=null;return function(...l){i&&clearTimeout(i),i=setTimeout(()=>{t.apply(this,l)},e)}}function Xn(t,e){let i=null,l=0;return function(...s){const n=Date.now();n-l{l=n,t.apply(this,s)},e)):(l=n,t.apply(this,s))}}const Zn=z({loader:()=>P(()=>import("./MessageLog-92n2iU1x.js").then(t=>t.M),__vite__mapDeps([7,0,1,2,3,8,9,10]),import.meta.url),loadingComponent:he,delay:200}),Qn=z({loader:()=>P(()=>import("./RandomPicker-MbeqZgNJ.js"),__vite__mapDeps([11,0,1,2,3,12,13,14,15,16,17,18]),import.meta.url),delay:0}),$n=z({loader:()=>P(()=>import("./FloatingToolbar-Di0zKY20.js"),__vite__mapDeps([19,0,1,2,3,20,21,22,14,15,23,24,25,26]),import.meta.url),delay:200}),eo=z({loader:()=>P(()=>import("./ChatWidget-DKseinU1.js").then(t=>t.C),__vite__mapDeps([27,28,29,0,1,2,3,6,30,16,17,31,14,15,32,33,34,35,36,12,13,37,38]),import.meta.url),delay:0}),to=z({loader:()=>P(()=>import("./HomeworkEditDialog-CbH0TGxK.js"),__vite__mapDeps([39,4,5,0,1,2,3,6,36,12,13,37,16,17,40,41,42]),import.meta.url),delay:0}),so=z({loader:()=>P(()=>import("./InitServiceChooser-CG7kcSTF.js"),__vite__mapDeps([43,0,1,2,3,4,5,6,12,13,40,41,36,37,16,17,44,45,32,33,46]),import.meta.url),loadingComponent:he,delay:200}),io=z({loader:()=>P(()=>import("./StudentNameManager-DSeAWOCU.js"),__vite__mapDeps([47,0,1,2,3,4,5,6,48,12,13,49,20,21,50,51,52,16,17,53,54,55,56,40,41,57]),import.meta.url),delay:200}),no=z({loader:()=>P(()=>import("./UrgentTestDialog-7IGcZhxC.js"),__vite__mapDeps([58,27,28,29,0,1,2,3,6,30,16,17,31,14,15,32,33,34,35,36,12,13,37,38,4,5,8,9,59,60,61,51,52,62,50,63,64]),import.meta.url),delay:0}),oo=z({loader:()=>P(()=>import("./AttendanceSidebar-B0h29tbH.js"),__vite__mapDeps([65,0,1,2,3,32,33,57]),import.meta.url),loadingComponent:he,delay:200}),ao=z({loader:()=>P(()=>import("./AttendanceManagementDialog-Dr2Al4zj.js"),__vite__mapDeps([66,0,1,2,3,16,17,32,33,12,13,67]),import.meta.url),delay:0}),ro=z({loader:()=>P(()=>import("./PwaInstallCard-C2z5JzJd.js"),__vite__mapDeps([68,2,0,1,3,16,17]),import.meta.url),delay:200}),lo=z({loader:()=>P(()=>import("./ExamScheduleCard-CNAe4BGo.js"),__vite__mapDeps([69,2,0,1,3,40,41,4,5,6,16,17,70,71,72,73,14,15,12,13,30,51,52,59,60,28,29,31,8,9,32,33,74]),import.meta.url),loadingComponent:he,delay:200}),co=z({loader:()=>P(()=>import("./ExamConfigEditor-Dw1BoZRS.js"),__vite__mapDeps([75,4,5,0,1,2,3,6,40,41,76,77,14,15,16,17,32,33,12,13,36,37,51,52,48,49,20,21,50,53,54,22,23,24,25,78,79,80]),import.meta.url),delay:0}),uo={name:"Classworks 作业板",components:{MessageLog:Zn,RandomPicker:Qn,FloatingToolbar:$n,FloatingICP:Kn,HomeworkEditDialog:to,InitServiceChooser:so,ChatWidget:eo,StudentNameManager:io,UrgentTestDialog:no,AttendanceSidebar:oo,AttendanceManagementDialog:ao,HomeworkGrid:Fn,HomeActions:jn,PwaInstallCard:ro,ExamScheduleCard:lo,ExamConfigEditor:co,HomeSkeleton:Jn},setup(){const{mobile:t}=De(),e=xe();return{mobile:t,examStore:e}},data(){const t=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8},{name:"其他",order:9}];return{showAddExamDialog:!1,showExamDetailDialog:!1,selectedExamId:null,upcomingExams:[],dataKey:"",provider:"",useDisplay:De,state:{classNumber:"",namespaceInfo:null,deviceName:"",studentList:[],boardData:{homework:{},attendance:{absent:[],late:[],exclude:[]}},dialogVisible:!1,dialogTitle:"",textarea:"",dateString:"",synced:!1,attendDialogVisible:!1,contentStyle:{"font-size":`${D("font.size")}px`},uploadLoading:!1,downloadLoading:!1,snackbar:!1,snackbarText:"",fontSize:D("font.size"),datePickerDialog:!1,selectedDate:new Date().toISOString().split("T")[0].replace(/-/g,""),selectedDateObj:new Date,refreshInterval:null,showNoDataMessage:!1,noDataMessage:"",isToday:!1,attendanceDialog:!1,availableSubjects:t,isFullscreen:!1},loading:{download:!1,upload:!1,students:!1,copyToToday:!1},dataReady:!1,debouncedUpload:null,debouncedAttendanceSave:null,throttledReflow:null,sortedItemsCache:{key:"",value:[]},confirmDialog:{show:!1,resolve:null,reject:null},urlConfigDialog:{show:!1,config:null,changes:[],validSettings:{},confirmHandler:null,cancelHandler:null,icons:{}},settingsTick:0,isChatOpen:!1,highlightedCards:{},tokenDisplayInfo:{show:!1,readonly:!1,text:"",color:"primary",variant:"tonal",icon:"mdi-account",disabled:!1},realtimeInfo:{show:!1,time:"",key:""},$offKvChanged:null,$offConnect:null,debouncedRealtimeRefresh:null,preconfigData:{namespace:null,authCode:null,autoOpen:!1,autoExecute:!1},urgentTestDialog:!1,tokenInfo:null,persistentNotifications:[],notificationDetailDialog:!1,currentNotification:null}},computed:{isMobile(){return D("display.forceDesktopMode")?!1:this.mobile},titleText(){var p,g,S;const t=D("server.provider"),e=t==="kv-server"||t==="classworkscloud";let i;e&&this.state.namespaceInfo?i=((p=this.state.namespaceInfo)==null?void 0:p.name)||((S=(g=this.state.namespaceInfo)==null?void 0:g.device)==null?void 0:S.name)||this.state.classNumber||"高三八班":i=this.state.classNumber||"高三八班";const l=this.getToday(),s=new Date(l);s.setDate(s.getDate()-1);const n=this.state.dateString,d=this.formatDate(l),h=this.formatDate(s);return n===d?i+" - 今天的作业":n===h?i+" - 昨天的作业":`${i} - ${n}的作业`},sortedItems(){const t=[];this.isMobile&&t.push({key:"attendance-card",name:"出勤统计",type:"attendance",data:{total:this.state.studentList.length,absent:this.state.boardData.attendance.absent,late:this.state.boardData.attendance.late,exclude:this.state.boardData.attendance.exclude}});for(const e in this.state.boardData.homework)if(e.startsWith("exam-")){const i=this.state.boardData.homework[e];t.push({key:e,name:"考试安排",type:"exam",data:{examId:i.examId},order:-100,rowSpan:200})}for(const e of this.state.availableSubjects){const i=e.name,l=this.state.boardData.homework[i];if(l&&l.content){const n=100+l.content.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DGIAsv4W.js","./vendor-vuetify-DsKlzgKp.js","./vendor-vue-BiQC5iF7.js","./index-Yfd4JoUB.css","./dataProvider-GWPC-0Vt.js","./vendor-utils-DwALrQNc.js","./serverRotation-BtcwvdZJ.js","./MessageLog-CZsTVP4i.js","./VAppBarTitle-DheyIZnb.js","./VAppBarTitle-CczdD-Q2.css","./MessageLog-BGkFwivK.css","./RandomPicker-CsXS_sbB.js","./VTextField-BurlcggD.js","./VTextField-DTDEIDq0.css","./VTooltip-2IUjfpCS.js","./VTooltip-D7EaNDeY.css","./VChip-mRzIPuM0.js","./VChip-Dmz_1Lnv.css","./RandomPicker-CU-edGvg.css","./FloatingToolbar-BZD3ZR8B.js","./VSheet-BBnSA_kJ.js","./VSheet-DxsDksIw.css","./VDatePicker-CuGF0KeL.js","./VPicker-SM18M-iq.js","./VPicker-Dm9DplUc.css","./VDatePicker-zglzEVGT.css","./FloatingToolbar-5gVX85mk.css","./ChatWidget-BXhjl6gS.js","./socketClient-BKHEsaLg.js","./vendor-socket-dm1FmSOd.js","./soundList-D9U-Grcp.js","./deviceEvents-HN9RDua9.js","./VRow-Cjhiymuu.js","./VRow-D2ArqUC2.css","./VPagination-DLzhjdaP.js","./VPagination-BF2MZmld.css","./VTextarea-vGWmTJww.js","./VTextarea-_xVwaw_z.css","./ChatWidget-ChgL-O5B.css","./HomeworkEditDialog-BpaBTmY_.js","./VAlert-BZ4-f-hy.js","./VAlert-D_OX1cfW.css","./HomeworkEditDialog-DSAcf9mw.css","./InitServiceChooser-Cm36vuZZ.js","./VExpansionPanels-BDI8gHu5.js","./VExpansionPanels-kEj4ZJQK.css","./InitServiceChooser-BSZJBnhr.css","./StudentNameManager-DB-P5C67.js","./VAutocomplete-N0zTUlyj.js","./VSelect-oxA0t9CG.js","./VCheckboxBtn-BKcSogH0.js","./VSwitch-k6hfPfa2.js","./VSwitch-Bk42mIwg.css","./VSelect-DHZViySU.css","./VAutocomplete-Ygy_KjMW.css","./VCombobox-BGa7K58w.js","./VCombobox-r6cc1Iy_.css","./StudentNameManager-tn0RQdqM.css","./UrgentTestDialog-BqTcJt8c.js","./VContainer-DZyPrcqa.js","./VContainer-B1KSavhG.css","./VForm-ObW_L7SS.js","./VCheckbox-BRi_fHJs.js","./VCheckbox-ZL-u1kGB.css","./UrgentTestDialog-65OEJ5uz.css","./AttendanceSidebar-DmtvE998.js","./AttendanceManagementDialog-BpjEre5P.js","./AttendanceManagementDialog-D0prZwJd.css","./PwaInstallCard-DM1cBO1c.js","./ExamScheduleCard-DhbbmO7J.js","./VTabs-DqmvmKGK.js","./VTable-Cq72iBVc.js","./VTable-CNLJxQof.css","./VTabs-566n5b08.css","./ExamScheduleCard-BJuKYvRa.css","./ExamConfigEditor-BVwEXehR.js","./VSkeletonLoader-DwE_iqTb.js","./VSkeletonLoader-C11ZEozu.css","./VTimePicker-BApLLZ8X.js","./VTimePicker-BkWY3_8P.css","./ExamConfigEditor-HgNV6CVV.css"])))=>i.map(i=>d[i]); +var et=Object.defineProperty;var tt=(t,e,i)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var C=(t,e,i)=>tt(t,typeof e!="symbol"?e+"":e,i);import{_ as H,V as Ce,c as I,d as T,e as _,S as ne,w as Te,f as x,g as E,h as b,i as F,j as re,k as B,l as j,s as K,n as D,o as st,p as ee,q as X,r as oe,t as ae,v as it,x as P,y as Fe,z as nt,A as Z}from"./index-DGIAsv4W.js";import{X as c,_ as f,j as o,N,S as m,a6 as ot,a7 as at,a8 as rt,Y as v,Z as a,k as r,F as k,a2 as M,n as O,$ as w,a1 as u,a9 as z,aa as Re,P as lt,R as dt,V as ct,U as Ie,e as ut,a4 as V}from"./vendor-vue-BiQC5iF7.js";import{d as R,a as ht,k as mt,s as Ve}from"./dataProvider-GWPC-0Vt.js";import{a as ye,g as Be}from"./vendor-utils-DwALrQNc.js";import{V as L}from"./VChip-mRzIPuM0.js";import{V as Oe,a as Q}from"./VTabs-DqmvmKGK.js";import{V as Ue,a as $,b as ft}from"./VTable-Cq72iBVc.js";import{V as le}from"./VAlert-BZ4-f-hy.js";import{V as gt,a as pt}from"./VTooltip-2IUjfpCS.js";import{V as se}from"./VTextField-BurlcggD.js";import{p as yt,d as bt}from"./soundList-D9U-Grcp.js";import{V as be}from"./VSwitch-k6hfPfa2.js";import{a0 as De}from"./vendor-vuetify-DsKlzgKp.js";import{V as je}from"./VContainer-DZyPrcqa.js";import{g as vt,j as Ne,o as wt,a as Pe,l as St}from"./socketClient-BKHEsaLg.js";import{c as Dt}from"./deviceEvents-HN9RDua9.js";import{V as xt,a as kt}from"./VAppBarTitle-DheyIZnb.js";import{V as Ct,a as Tt}from"./VRow-Cjhiymuu.js";const _t={__name:"AsyncLoadingPlaceholder",props:{height:{type:String,default:"120px"}},setup(t){return(e,i)=>(c(),f("div",{class:"async-loading-placeholder d-flex justify-center align-center",style:N({minHeight:t.height})},[o(Ce,{indeterminate:"",color:"primary",size:"28",width:"2"})],4))}},he=H(_t,[["__scopeId","data-v-c297c78c"]]),Mt={name:"RelativeTimeDisplay",props:{time:{type:[String,Date,Number],required:!0}},computed:{displayTime(){if(!this.time)return"";const t=new Date(this.time),e=new Date,i=new Date(t.getFullYear(),t.getMonth(),t.getDate()),l=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=i.getTime()-l.getTime(),n=Math.round(s/(1e3*60*60*24));if(n===0)return"今天";if(n===1)return"明天";if(n===2)return"后天";if(n===-1)return"昨天";if(n===-2)return"前天";const d=l.getDay()||7,h=new Date(l);h.setDate(l.getDate()-d+1);const p=new Date(l);if(p.setDate(l.getDate()+(7-d)),i>=h&&i<=p)return["周日","周一","周二","周三","周四","周五","周六"][t.getDay()];const g=t.getMonth()+1,S=t.getDate();return`${g}月${S}日`}}};function Et(t,e,i,l,s,n){return c(),f("span",null,m(n.displayTime),1)}const He=H(Mt,[["render",Et]]),xe=ot("exam",{state:()=>({examList:[],exams:{},loadingList:!1,loadingDetails:{}}),actions:{async fetchExamList(){if(!this.loadingList){this.loadingList=!0;try{const t=await R.loadData("es_list");Array.isArray(t)?this.examList=t:this.examList=[]}catch(t){console.error("Failed to load exam list:",t)}finally{this.loadingList=!1}}},async fetchExam(t){if(this.exams[t])return this.exams[t];if(!this.loadingDetails[t]){this.loadingDetails[t]=!0;try{const e=await R.loadData(`es_${t}`);return e&&(this.exams[t]=e),e}catch(e){console.error(`Failed to load exam details for ${t}:`,e)}finally{this.loadingDetails[t]=!1}}},async getUpcomingExams(t=25){await this.fetchExamList();const e=[],i=new Date,l=new Date(i.getTime()+2*24*60*60*1e3),s=this.examList.slice(0,t);for(const n of s){let d=this.exams[n.id];d||(d=await this.fetchExam(n.id)),d&&d.examInfos&&Array.isArray(d.examInfos)&&d.examInfos.some(p=>{const g=new Date(p.start);return g>=i&&g<=l})&&e.push({id:n.id,...d})}return e}}}),Rt={name:"ConciseExamCard",components:{RelativeTimeDisplay:He},props:{examId:{type:String,required:!0},contentStyle:{type:Object,default:()=>({})},readonly:{type:Boolean,default:!1}},computed:{...rt(xe,["exams","loadingDetails"]),exam(){return this.exams[this.examId]},loading(){return this.loadingDetails[this.examId]},groupedExamInfos(){if(!this.exam||!this.exam.examInfos)return[];const t=[...this.exam.examInfos].sort((l,s)=>new Date(l.start)-new Date(s.start)),e=[];let i=null;return t.forEach(l=>{const n=new Date(l.start).toDateString();(!i||i.key!==n)&&(i={key:n,date:l.start,infos:[]},e.push(i)),i.infos.push(l)}),e}},mounted(){this.fetchExam(this.examId)},methods:{...at(xe,["fetchExam"]),formatTimeOnly(t){if(!t)return"";try{const e=new Date(t),i=e.getHours().toString().padStart(2,"0"),l=e.getMinutes().toString().padStart(2,"0");return`${i}:${l}`}catch{return""}},isPast(t){return t?new Date(t)t.$emit("click"))},{default:a(()=>[o(I,{class:"d-flex align-center py-2 px-3 bg-primary-lighten-5 text-subtitle-1 font-weight-bold"},{default:a(()=>{var h;return[r("span",It,m(((h=n.exam)==null?void 0:h.examName)||"加载中..."),1)]}),_:1}),o(T,{class:"flex-grow-1 pa-4 overflow-y-auto",style:N(i.contentStyle)},{default:a(()=>[n.loading?(c(),f("div",Vt,[o(Ce,{indeterminate:"",size:"24",color:"primary"})])):n.exam?(c(),f("div",Nt,[(c(!0),f(k,null,M(n.groupedExamInfos,(h,p)=>(c(),f("div",{key:p,class:"mb-3"},[r("div",Pt,[o(d,{time:h.date},null,8,["time"])]),(c(!0),f(k,null,M(h.infos,(g,S)=>(c(),f("div",{key:S,class:O(["d-flex align-center justify-space-between py-1 border-b-sm",{"border-none":S===h.infos.length-1,"text-grey":n.isPast(g.end)}])},[r("div",At,m(g.name),1),r("div",Lt,m(n.formatTimeOnly(g.start))+" - "+m(n.formatTimeOnly(g.end)),1)],2))),128))]))),128))])):(c(),f("div",zt," 无法加载 "))]),_:1},8,["style"])]),_:1})}const We=H(Rt,[["render",Ft],["__scopeId","data-v-cb5c226a"]]),Bt=["6IO4","5Lmz","6JCd6I6J","5rer","5aW4"],Ot=Bt.map(t=>Be.decode(t)),Ae=.75,Ut={name:"HitokotoCard",data(){return{enabled:!1,refreshInterval:60,kvConfig:{sources:["zhaoyu"],sensitiveWords:[],hitokotoCategories:[]},sentence:"",author:"",origin:"",loading:!1,timer:null,unwatch:null,fontSize:28}},computed:{contentStyle(){return{"font-size":`${this.fontSize*Ae}px`,"white-space":"pre-wrap","line-height":"1.6","text-align":"left"}},authorStyle(){return{"font-size":`${this.fontSize*Ae*.6}px`,"text-align":"left"}}},async mounted(){this.loadLocalSettings(),await this.loadKvSettings(),this.fetchSentence(),this.startTimer(),this.unwatch=Te(()=>{this.loadLocalSettings(),this.startTimer()})},beforeUnmount(){this.stopTimer(),this.unwatch&&this.unwatch()},methods:{loadLocalSettings(){this.enabled=ne.getSetting("hitokoto.enabled"),this.refreshInterval=ne.getSetting("hitokoto.refreshInterval"),this.fontSize=ne.getSetting("font.size")},async loadKvSettings(){try{const t=await R.loadData("sentence-info");let e=t;t&&t.data&&(e=t.data),e&&(this.kvConfig={sources:Array.isArray(e.sources)&&e.sources.length>0?e.sources:["zhaoyu"],sensitiveWords:e.sensitiveWords?e.sensitiveWords.split(/[,,]/).map(i=>i.trim()).filter(i=>i):[],jinrishiciToken:e.jinrishiciToken,hitokotoCategories:Array.isArray(e.hitokotoCategories)?e.hitokotoCategories:[]})}catch(t){console.error("Failed to load sentence-info",t)}},startTimer(){this.timer&&clearInterval(this.timer),this.refreshInterval>0&&(this.timer=setInterval(this.fetchSentence,this.refreshInterval*1e3))},stopTimer(){this.timer&&clearInterval(this.timer)},async fetchSentence(){if(!this.loading){this.loading=!0;try{const t=this.kvConfig.sources,e=t[Math.floor(Math.random()*t.length)];let i=null,l="",s="",n="";if(e==="hitokoto"){const d=new URLSearchParams,h=this.kvConfig.hitokotoCategories;Array.isArray(h)&&h.length>0&&h.forEach(S=>d.append("c",S));const p="https://v1.hitokoto.cn/"+(d.toString()?"?"+d.toString():"");i=(await ye.get(p)).data,l=i.hitokoto,s=i.from_who,n=i.from}else if(e==="zhaoyu"){const d=await ye.get("https://hub.saintic.com/openservice/sentence/all.json");d.data.success&&(i=d.data.data,l=i.sentence||i.content||i.name,s=i.author,n=i.name||i.origin)}else if(e==="jinrishici")if(this.kvConfig.jinrishiciToken){const d=await ye.get("https://v2.jinrishici.com/one.json?client=npm-sdk/1.0&X-User-Token="+encodeURIComponent(this.kvConfig.jinrishiciToken),{});d.data.status==="success"&&(i=d.data.data,l=i.content,s=i.origin.author,n=i.origin.title)}else return console.warn("Jinrishici token missing. Please enable it in settings to generate a token."),this.loading=!1,this.fetchSentence();if(l){if([...Ot,...this.kvConfig.sensitiveWords].some(p=>p&&l.includes(p)))return this.loading=!1,this.fetchSentence();this.sentence=l,this.author=s||"",this.origin=n||"未知"}}catch(t){console.error("Failed to fetch sentence",t),this.sentence="获取失败",this.author="",this.origin=""}finally{this.loading=!1}}}}},jt={key:0,class:"mr-2"},Ht={key:1};function Wt(t,e,i,l,s,n){return c(),v(_,{class:"hitokoto-card",elevation:"2",border:"",rounded:"xl",loading:s.loading,height:"100%",onClick:n.fetchSentence},{default:a(()=>[o(T,{class:"pa-6 d-flex flex-column justify-center",style:{height:"100%"}},{default:a(()=>[r("div",{class:"font-weight-medium mb-4 serif-font",style:N(n.contentStyle)},m(s.sentence),5),r("div",{class:"text-medium-emphasis serif-font",style:N(n.authorStyle)},[s.author?(c(),f("span",jt,m(s.author),1)):w("",!0),s.origin?(c(),f("span",Ht,"《"+m(s.origin)+"》",1)):w("",!0)],4)]),_:1})]),_:1},8,["loading","onClick"])}const Ge=H(Ut,[["render",Wt],["__scopeId","data-v-84a0a110"]]),_e=30,q=50,te=-50,me=500,de=6,ce=-100,Ke=0,Gt=-90,Kt=40;function qt(t){let e=0,i=0;for(let s=0;si&&(i=d),e+=n*n}return{rms:Math.sqrt(e/Math.max(1,t.length)),peak:i}}function Yt(t){const e=Math.max(1e-12,t),i=20*Math.log10(e);return Math.max(ce,Math.min(Ke,i))}function ve(t){const e=Math.max(1e-12,t.rms),i=Math.max(1e-12,t.baselineRms),l=t.baselineDb+20*Math.log10(e/i);return Math.max(20,Math.min(100,l))}function Le(t){if(t.length===0)return ce;const i=t.reduce((s,n)=>s+Math.pow(10,n/10),0)/t.length,l=10*Math.log10(Math.max(i,1e-12));return Math.max(ce,Math.min(Ke,l))}function ie(t,e){if(t.length===0)return ce;const i=t.map(p=>Math.pow(10,p/20));i.sort((p,g)=>p-g);const l=(i.length-1)*e,s=Math.floor(l),n=Math.ceil(l),d=l-s,h=s===n?i[s]:i[s]*(1-d)+i[n]*d;return 20*Math.log10(Math.max(h,1e-12))}function we(t){return Math.max(0,Math.min(1,t))}const ke={maxLevelDb:55,baselineDb:Kt,showRealtimeDb:!0,avgWindowSec:1,sliceSec:_e,frameMs:q,scoreThresholdDbfs:te,segmentMergeGapMs:me,maxSegmentsPerMin:de,alertSoundEnabled:!1},Me="noise-control-settings",ue="NoiseControlSettingsUpdated";function Ee(){try{const t=localStorage.getItem(Me);if(t)return{...ke,...JSON.parse(t)}}catch(t){console.warn("Failed to load settings",t)}return{...ke}}function qe(t){const i={...Ee(),...t};i.sliceSec=_e,i.frameMs=q,i.scoreThresholdDbfs=te,i.segmentMergeGapMs=me,i.maxSegmentsPerMin=de,localStorage.setItem(Me,JSON.stringify(i)),window.dispatchEvent(new CustomEvent(ue,{detail:i}))}function Jt(){localStorage.removeItem(Me),window.dispatchEvent(new CustomEvent(ue,{detail:ke}))}function Xt(t){const e=i=>t(i);return window.addEventListener(ue,e),()=>window.removeEventListener(ue,e)}function ze(t,e){const i=Math.max(0,t.p50Dbfs-te),l=we(i/6),s=we(t.overRatioDbfs/.3),n=t.sampledDurationMs&&t.sampledDurationMs>0?t.sampledDurationMs:e,d=Math.max(1e-6,n/6e4),h=t.segmentCount/d,p=we(h/Math.max(1e-6,de)),S=100*(1-(.4*l+.3*s+.3*p));return{score:Math.max(0,Math.min(100,Math.round(S*10)/10)),scoreDetail:{sustainedPenalty:l,timePenalty:s,segmentPenalty:p,thresholdsUsed:{scoreThresholdDbfs:te,segmentMergeGapMs:me,maxSegmentsPerMin:de},sustainedLevelDbfs:t.p50Dbfs,overRatioDbfs:t.overRatioDbfs,segmentCount:t.segmentCount,minutes:d,durationMs:e,sampledDurationMs:t.sampledDurationMs,coverageRatio:t.sampledDurationMs?t.sampledDurationMs/e:1}}}const Zt=()=>Math.random().toString(36).substring(2,15);class Qt{constructor(){C(this,"audioContext",null);C(this,"analyser",null);C(this,"stream",null);C(this,"sourceNode",null);C(this,"status","initializing");C(this,"listeners",new Set);C(this,"animationFrameId",null);C(this,"lastFrameTime",0);C(this,"baselineDb",40);C(this,"baselineRms",Math.pow(10,-60/20));C(this,"lastRms",0);C(this,"calibrationBuffer",[]);C(this,"isCalibrating",!1);C(this,"calibrationTargetDb",0);C(this,"calibrationCallback",null);C(this,"settingsUnsubscribe",null);C(this,"warmupFramesRemaining",0);C(this,"ringBuffer",[]);C(this,"ringBufferCapacity",200);C(this,"currentSliceStart",0);C(this,"sliceDbfsValues",[]);C(this,"sliceAboveThresholdDuration",0);C(this,"sliceFramesTotal",0);C(this,"sliceSampledDuration",0);C(this,"isAboveThreshold",!1);C(this,"segmentCount",0);C(this,"lastSegmentEndTs",0);C(this,"lastProcessedFrameTs",null);C(this,"gapCount",0);C(this,"maxGapMs",0);C(this,"cachedCurrentScore");C(this,"cachedCurrentScoreDetail");C(this,"lastScoreCalcTime",0);C(this,"lastCompletedSlice",null);C(this,"loop",()=>{if(this.status!=="active"||!this.analyser)return;const e=performance.now();e-this.lastFrameTime>=q&&(this.processFrame(e),this.lastFrameTime=e),this.animationFrameId=requestAnimationFrame(this.loop)});this.status="paused";const e=Ee();this.updateLocalSettings(e),this.settingsUnsubscribe=Xt(i=>{this.updateLocalSettings(i.detail)})}updateLocalSettings(e){this.baselineDb=e.baselineDb,e.baselineRms&&e.baselineRms>0&&(this.baselineRms=e.baselineRms)}calibrate(e,i){if(this.status!=="active"){i==null||i(!1,"请先启动监测");return}this.isCalibrating=!0,this.calibrationTargetDb=e,this.calibrationBuffer=[],this.calibrationCallback=i||null,console.log(`Starting calibration to ${e}dB...`)}processCalibrationFrame(e){var l;if(!this.isCalibrating)return;this.calibrationBuffer.push(e);const i=3e3/q;if(this.calibrationBuffer.length>=i){const n=this.calibrationBuffer.reduce((d,h)=>d+h,0)/this.calibrationBuffer.length;this.isCalibrating=!1,this.baselineRms=n,this.baselineDb=this.calibrationTargetDb,qe({baselineDb:this.calibrationTargetDb,baselineRms:n}),console.log(`Calibration complete: RMS ${n.toFixed(6)} -> ${this.calibrationTargetDb}dB`),(l=this.calibrationCallback)==null||l.call(this,!0,`校准完成!平均RMS: ${n.toFixed(6)}`),this.calibrationCallback=null}}subscribe(e){return this.listeners.add(e),this.emit(),()=>this.listeners.delete(e)}emit(){const e=this.ringBuffer.length>0?this.ringBuffer[this.ringBuffer.length-1]:null,i={status:this.status,currentDbfs:(e==null?void 0:e.dbfs)??-100,currentDisplayDb:(e==null?void 0:e.displayDb)??20,ringBuffer:[...this.ringBuffer],lastSlice:this.lastCompletedSlice,currentScore:this.cachedCurrentScore,currentScoreDetail:this.cachedCurrentScoreDetail};this.listeners.forEach(l=>l(i))}async start(){if(this.status!=="active")try{this.status="initializing",this.warmupFramesRemaining=10,this.emit(),this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1}}),this.sourceNode=this.audioContext.createMediaStreamSource(this.stream);const e=this.audioContext.createBiquadFilter();e.type="highpass",e.frequency.value=80;const i=this.audioContext.createBiquadFilter();i.type="lowpass",i.frequency.value=8e3,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=0,this.sourceNode.connect(e),e.connect(i),i.connect(this.analyser),this.status="active",this.resetSlice(),this.loop()}catch(e){console.error("Mic Error",e),this.status="permission-denied",this.emit()}}stop(){var e,i;this.status!=="paused"&&(this.sliceDbfsValues.length>0&&this.finalizeSlice(),this.status="paused",this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),(e=this.stream)==null||e.getTracks().forEach(l=>l.stop()),(i=this.audioContext)==null||i.close(),this.audioContext=null,this.analyser=null,this.stream=null,this.emit())}processFrame(e){if(!this.analyser)return;if(this.warmupFramesRemaining>0){this.warmupFramesRemaining--;return}const i=new Float32Array(this.analyser.fftSize);this.analyser.getFloatTimeDomainData(i);const l=Date.now(),{rms:s}=qt(i);this.lastRms=s,this.isCalibrating&&this.processCalibrationFrame(s);const n=Yt(s),d=ve({rms:s,baselineRms:this.baselineRms,baselineDb:this.baselineDb});this.ringBuffer.push({t:l,dbfs:n,displayDb:d}),this.ringBuffer.length>this.ringBufferCapacity&&this.ringBuffer.shift();let h=q;if(this.lastProcessedFrameTs!==null){const p=l-this.lastProcessedFrameTs,g=Math.max(1e3,q*5);p>g?(this.gapCount++,this.maxGapMs=Math.max(this.maxGapMs,p),h=q):h=p}if(this.lastProcessedFrameTs=l,n>=Gt){this.sliceDbfsValues.push(n),this.sliceFramesTotal++,this.sliceSampledDuration+=h;const p=n>te;if(p&&(this.sliceAboveThresholdDuration+=h),p){if(!this.isAboveThreshold){const g=Date.now()-this.lastSegmentEndTs;(this.lastSegmentEndTs===0||g>me)&&this.segmentCount++,this.isAboveThreshold=!0}}else this.isAboveThreshold&&(this.isAboveThreshold=!1,this.lastSegmentEndTs=Date.now())}e-this.lastScoreCalcTime>250&&(this.updateInterimScore(),this.lastScoreCalcTime=e),this.emit(),Date.now()-this.currentSliceStart>=_e*1e3&&this.finalizeSlice()}updateInterimScore(){if(this.sliceDbfsValues.length<10){this.cachedCurrentScore=100,this.cachedCurrentScoreDetail=void 0;return}Le(this.sliceDbfsValues),Math.max(...this.sliceDbfsValues);const e=ie(this.sliceDbfsValues,.5);ie(this.sliceDbfsValues,.95);const i=this.sliceSampledDuration>0?this.sliceAboveThresholdDuration/this.sliceSampledDuration:0,l={p50Dbfs:e,overRatioDbfs:i,segmentCount:this.segmentCount,sampledDurationMs:this.sliceSampledDuration,gapCount:this.gapCount,maxGapMs:this.maxGapMs},s=Date.now()-this.currentSliceStart,{score:n,scoreDetail:d}=ze(l,s);this.cachedCurrentScore=n,this.cachedCurrentScoreDetail=d}resetSlice(){this.currentSliceStart=Date.now(),this.sliceDbfsValues=[],this.sliceAboveThresholdDuration=0,this.sliceFramesTotal=0,this.sliceSampledDuration=0,this.segmentCount=0,this.isAboveThreshold=!1,this.lastSegmentEndTs=0,this.gapCount=0,this.maxGapMs=0,this.lastProcessedFrameTs=null,this.cachedCurrentScore=100,this.cachedCurrentScoreDetail=void 0}finalizeSlice(){if(this.sliceDbfsValues.length===0){this.resetSlice();return}const e=Le(this.sliceDbfsValues),i=Math.max(...this.sliceDbfsValues),l=ie(this.sliceDbfsValues,.5),s=ie(this.sliceDbfsValues,.95),n=this.sliceSampledDuration>0?this.sliceAboveThresholdDuration/this.sliceSampledDuration:0,d=ve({rms:Math.pow(10,e/20),baselineRms:this.baselineRms,baselineDb:this.baselineDb}),h=ve({rms:Math.pow(10,s/20),baselineRms:this.baselineRms,baselineDb:this.baselineDb}),p={avgDbfs:e,maxDbfs:i,p50Dbfs:l,p95Dbfs:s,overRatioDbfs:n,segmentCount:this.segmentCount,sampledDurationMs:this.sliceSampledDuration,gapCount:this.gapCount,maxGapMs:this.maxGapMs},g=Date.now()-this.currentSliceStart,{score:S,scoreDetail:U}=ze(p,g),A={id:Zt(),start:this.currentSliceStart,end:Date.now(),frames:this.sliceFramesTotal,raw:p,display:{avgDb:d,p95Db:h},score:S,scoreDetail:U};this.lastCompletedSlice=A,this.saveSlice(A),this.resetSlice()}saveSlice(e){try{const i=localStorage.getItem("noise-slices-v2"),l=i?JSON.parse(i):[];l.push(e);const s=14*24*60*60*1e3,n=Date.now(),d=l.filter(h=>n-h.end1e3&&d.shift(),localStorage.setItem("noise-slices-v2",JSON.stringify(d))}catch(i){console.warn("Storage Full",i)}}getHistory(){try{const e=localStorage.getItem("noise-slices-v2");return e?JSON.parse(e):[]}catch{return[]}}clearHistory(){localStorage.removeItem("noise-slices-v2")}}const G=new Qt,$t={name:"NoiseMonitorDetail",props:{modelValue:{type:Boolean,default:!1},status:{type:String,default:""},currentDb:{type:[Number,String],default:"--"},currentDbfs:{type:Number,default:0},noiseLevel:{type:String,default:"未知"},dbColor:{type:String,default:"grey"},currentScore:{type:Number,default:null},scoreDetail:{type:Object,default:null},ringBuffer:{type:Array,default:()=>[]},lastSlice:{type:Object,default:null},history:{type:Array,default:()=>[]},isMonitoring:{type:Boolean,default:!1},micPermissionState:{type:String,default:""},sessionActive:{type:Boolean,default:!1},sessionData:{type:Object,default:null},reportMeta:{type:Object,default:()=>({dates:{}})},selectedDate:{type:String,default:""},dateReports:{type:Array,default:()=>[]}},emits:["update:modelValue","start","stop","clear-history","select-date","clear-date-reports","clear-all-reports"],data(){return{activeTab:"realtime",confirmClearMode:"",waveformWidth:600,reportChartWidth:600,selectedReportIndex:0,showCalibrateDialog:!1,calibrationSettings:{},calibrateTargetDb:40,isCalibrating:!1,calibrateMessage:"",calibrateSuccess:!1,editBaselineDb:40,editBaselineRms:"",editMaxLevelDb:100}},computed:{scoreColor(){return this.currentScore===null?"grey":this.currentScore>=80?"success":this.currentScore>=60?"warning":"error"},scoreLabel(){return this.currentScore===null?"暂无评分":this.currentScore>=90?"非常安静":this.currentScore>=80?"环境良好":this.currentScore>=60?"需要注意":this.currentScore>=40?"比较嘈杂":"极度嘈杂"},alertThreshold(){var t;return((t=this.sessionConfig)==null?void 0:t.alertThresholdDb)||55},scorePenaltyItems(){if(!this.scoreDetail)return[];const t=100;return[{label:"持续",icon:"mdi-volume-high",color:"amber",percent:Math.round(this.scoreDetail.sustainedPenalty/t*100)},{label:"时长",icon:"mdi-clock-alert",color:"orange",percent:Math.round(this.scoreDetail.timePenalty/t*100)},{label:"打断",icon:"mdi-flash-alert",color:"pink",percent:Math.round(this.scoreDetail.segmentPenalty/t*100)}]},gridLines(){return[20,40,60,80].map(t=>({val:t,y:this.dbToY(t)}))},reportGridLines(){return[20,40,60,80].map(t=>({val:t,y:this.reportDbToY(t)}))},waveformPath(){if(!this.ringBuffer||this.ringBuffer.length<2)return null;const t=this.waveformWidth,e=this.ringBuffer.slice(-120),i=t/(e.length-1);return e.map((l,s)=>{const n=s*i,d=this.dbToY(l.displayDb??0);return`${s===0?"M":"L"}${n.toFixed(1)},${d.toFixed(1)}`}).join(" ")},waveformFillPath(){return this.waveformPath?`${this.waveformPath} L${this.waveformWidth},120 L0,120 Z`:null},showConfirmClear(){return this.confirmClearMode!==""},sortedDateKeys(){var t;return(t=this.reportMeta)!=null&&t.dates?Object.keys(this.reportMeta.dates).sort().reverse():[]},selectedReport(){return this.dateReports[this.selectedReportIndex]||null},reportCoverage(){var t,e,i;return!((e=(t=this.selectedReport)==null?void 0:t.samples)!=null&&e.length)||!((i=this.selectedReport)!=null&&i.duration)?0:(this.selectedReport.samples.length*2/(this.selectedReport.duration/1e3)*100).toFixed(1)},reportWaveformPath(){var l,s;if(!((s=(l=this.selectedReport)==null?void 0:l.samples)!=null&&s.length))return null;const t=this.selectedReport.samples;if(t.length<2)return null;const i=this.reportChartWidth/(t.length-1);return t.map((n,d)=>{const h=d*i,p=this.reportDbToY(n.db);return`${d===0?"M":"L"}${h.toFixed(1)},${p.toFixed(1)}`}).join(" ")},reportWaveformFillPath(){return this.reportWaveformPath?`${this.reportWaveformPath} L${this.reportChartWidth},140 L0,140 Z`:null},levelDistribution(){var d,h;if(!((h=(d=this.selectedReport)==null?void 0:d.samples)!=null&&h.length))return[{label:"安静",percent:0,color:"#4caf50"},{label:"正常",percent:0,color:"#8bc34a"},{label:"吵闹",percent:0,color:"#ff9800"},{label:"极吵",percent:0,color:"#f44336"}];const t=this.selectedReport.samples.map(p=>p.db),e=t.length;let i=0,l=0,s=0,n=0;return t.forEach(p=>{p<45?i++:p<60?l++:p<75?s++:n++}),[{label:"安静",percent:Math.round(i/e*100),color:"#4caf50"},{label:"正常",percent:Math.round(l/e*100),color:"#8bc34a"},{label:"吵闹",percent:Math.round(s/e*100),color:"#ff9800"},{label:"极吵",percent:Math.round(n/e*100),color:"#f44336"}]},reportPenaltyItems(){var e;if(!((e=this.selectedReport)!=null&&e.scorePenalties))return[];const t=this.selectedReport.scorePenalties;return[{label:"持续",color:"amber",percent:Math.min(100,Math.round(t.sustained/40*100))},{label:"时长",color:"orange",percent:Math.min(100,Math.round(t.time/30*100))},{label:"打断",color:"pink",percent:Math.min(100,Math.round(t.segment/30*100))}]}},watch:{modelValue(t){t&&this.$nextTick(()=>{this.updateWaveformWidth(),this.updateReportChartWidth()})},activeTab(){this.$nextTick(()=>{this.updateWaveformWidth(),this.updateReportChartWidth()})},selectedReportIndex(){this.$nextTick(()=>this.updateReportChartWidth())},selectedDate(){this.selectedReportIndex=0}},mounted(){this.updateWaveformWidth(),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize(){this.updateWaveformWidth(),this.updateReportChartWidth()},updateWaveformWidth(){this.$refs.waveformContainer&&(this.waveformWidth=this.$refs.waveformContainer.offsetWidth||600)},updateReportChartWidth(){this.$refs.reportChartContainer&&(this.reportChartWidth=this.$refs.reportChartContainer.offsetWidth||600)},dbToY(t){return 120-Math.max(0,Math.min(100,t))/100*120},reportDbToY(t){return 140-Math.max(0,Math.min(100,t))/100*140},doClearReports(){this.confirmClearMode==="all"?this.$emit("clear-all-reports"):this.confirmClearMode==="date"&&this.$emit("clear-date-reports",this.selectedDate),this.confirmClearMode="",this.selectedReportIndex=0},formatDateLabel(t){if(!t)return"";const e=new Date,i=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,l=new Date(e);l.setDate(l.getDate()-1);const s=`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`;if(t===i)return"今天";if(t===s)return"昨天";const n=t.split("-");return`${parseInt(n[1])}月${parseInt(n[2])}日`},formatTime(t){const e=new Date(t);return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`},metaScoreColor(t){return t>=80?"success":t>=60?"warning":"error"},formatFullTime(t){if(!t)return"--";const e=new Date(t);return`${e.getFullYear()}/${e.getMonth()+1}/${e.getDate()} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`},formatDuration(t){if(!t)return"0 分钟";const e=Math.floor(t/6e4),i=Math.floor(e/60),l=e%60;return i>0?`${i} 小时 ${l} 分钟`:`${l} 分钟`},formatSeconds(t){if(!t||t<0)return"0秒";const e=Math.floor(t/60),i=t%60;return e>0?`${e}分${i}秒`:`${i}秒`},reportScoreLabel(t){return t>=90?"优秀":t>=80?"良好":t>=60?"一般":t>=40?"较差":"极差"},openCalibrateDialog(){this.refreshCalibrationSettings(),this.showCalibrateDialog=!0},refreshCalibrationSettings(){const t=Ee();this.calibrationSettings=t,this.editBaselineDb=t.baselineDb,this.editBaselineRms=t.baselineRms!=null?String(t.baselineRms):"",this.editMaxLevelDb=t.maxLevelDb},doAutoCalibrate(){this.isCalibrating=!0,this.calibrateMessage="",G.calibrate(this.calibrateTargetDb,(t,e)=>{this.isCalibrating=!1,this.calibrateSuccess=t,this.calibrateMessage=e,t&&this.refreshCalibrationSettings(),setTimeout(()=>{this.calibrateMessage=""},5e3)})},saveManualCalibration(){const t={baselineDb:this.editBaselineDb,maxLevelDb:this.editMaxLevelDb},e=parseFloat(this.editBaselineRms);!isNaN(e)&&e>0&&(t.baselineRms=e),qe(t),this.refreshCalibrationSettings()},resetCalibration(){Jt(),this.refreshCalibrationSettings()}}},es={class:"noise-dashboard pa-5"},ts={class:"d-flex align-center justify-center"},ss={class:"text-center"},is={class:"noise-gauge-inner d-flex flex-column align-center justify-center"},ns={class:"noise-level-bar mt-5 mx-auto",style:{"max-width":"500px"}},os={class:"noise-gradient-bar"},as={class:"pa-5"},rs={class:"d-flex align-center mb-3"},ls={class:"text-caption text-medium-emphasis"},ds={ref:"waveformContainer",class:"noise-waveform"},cs=["viewBox"],us=["y1","x2","y2"],hs=["y1","x2","y2"],ms=["d"],fs=["d"],gs={class:"pa-5"},ps={class:"d-flex align-center mb-3"},ys={key:0,class:"d-flex flex-wrap ga-4"},bs={class:"text-h6 font-weight-bold"},vs={class:"text-subtitle-1 font-weight-bold"},ws={class:"d-flex align-center"},Ss={class:"text-body-2"},Ds={class:"d-flex align-center",style:{"min-width":"140px"}},xs={class:"text-caption font-weight-medium",style:{"min-width":"36px","text-align":"right"}},ks={key:1,class:"text-center text-medium-emphasis py-4"},Cs={class:"pa-4 d-flex align-center"},Ts={key:0,class:"text-center text-medium-emphasis py-12"},_s={class:"pa-4"},Ms={class:"d-flex align-center flex-wrap ga-2 mb-3"},Es={class:"d-flex flex-wrap ga-2"},Rs={key:0,class:"pa-4 pb-0"},Is={class:"d-flex align-center ga-3 flex-wrap"},Vs={class:"text-h6 font-weight-bold"},Ns={key:1,class:"text-center text-medium-emphasis py-8"},Ps={key:2,class:"pa-4 pt-3 d-flex flex-wrap ga-2"},As={class:"text-caption ml-1"},Ls={key:4,class:"report-content"},zs={class:"pa-5 pb-0"},Fs={class:"text-h6 font-weight-bold d-flex align-center"},Bs={class:"pa-5"},Os={class:"report-grid"},Us={class:"report-stat-card"},js={class:"text-h6 font-weight-bold"},Hs={class:"report-stat-card"},Ws={class:"text-h6 font-weight-bold"},Gs={class:"text-caption"},Ks={class:"report-stat-card"},qs={class:"text-h6 font-weight-bold"},Ys={class:"report-stat-card"},Js={class:"text-h6 font-weight-bold"},Xs={class:"report-stat-card"},Zs={class:"text-h6 font-weight-bold"},Qs={class:"report-stat-card"},$s={class:"text-h6 font-weight-bold"},ei={class:"pa-5"},ti={ref:"reportChartContainer",class:"noise-waveform"},si=["viewBox"],ii=["y1","x2","y2"],ni=["y1","x2","y2"],oi=["d"],ai=["d"],ri={class:"text-caption text-medium-emphasis mt-2"},li={class:"pa-5"},di={class:"d-flex flex-wrap ga-4"},ci={class:"noise-level-distribution"},ui={class:"d-flex",style:{height:"16px","border-radius":"8px",overflow:"hidden"}},hi={class:"d-flex flex-wrap ga-3 mt-3 justify-center"},mi={class:"text-caption text-medium-emphasis"},fi={class:"text-body-2 mr-3",style:{"min-width":"32px"}},gi={class:"text-body-2 font-weight-bold",style:{"min-width":"40px","text-align":"right"}},pi={class:"d-flex align-center ga-6 flex-wrap"},yi={class:"text-body-1 font-weight-bold"},bi={class:"text-body-1 font-weight-bold font-monospace"},vi={class:"text-body-1 font-weight-bold"},wi={class:"d-flex align-center mb-2"},Si={class:"d-flex align-center ga-3 mb-5 flex-wrap"},Di={key:0,class:"text-caption text-warning"},xi={class:"d-flex align-center mb-2"},ki={class:"d-flex align-center ga-3 mb-4 flex-wrap"};function Ci(t,e,i,l,s,n){return c(),v(B,{"model-value":i.modelValue,"max-width":"900",scrollable:"","onUpdate:modelValue":e[15]||(e[15]=d=>t.$emit("update:modelValue",d))},{default:a(()=>[o(_,{class:"rounded-xl noise-detail-card"},{default:a(()=>[o(I,{class:"d-flex align-center pa-4"},{default:a(()=>[o(x,{class:"mr-2",color:"primary"},{default:a(()=>[...e[16]||(e[16]=[u(" mdi-waveform ",-1)])]),_:1}),e[18]||(e[18]=r("span",{class:"text-h6 font-weight-bold"},"环境噪音监测",-1)),o(E),i.sessionActive?(c(),v(L,{key:0,color:"teal",size:"small",variant:"tonal",class:"mr-2"},{default:a(()=>{var d;return[o(x,{start:"",size:"12"},{default:a(()=>[...e[17]||(e[17]=[u(" mdi-record-circle ",-1)])]),_:1}),u(" "+m(((d=i.sessionData)==null?void 0:d.sessionName)||"自习中"),1)]}),_:1})):w("",!0),o(L,{color:i.isMonitoring?"success":"grey",size:"small",variant:"tonal",class:"mr-2"},{default:a(()=>[u(m(i.isMonitoring?"监测中":"已停止"),1)]),_:1},8,["color"]),o(b,{icon:"mdi-close",size:"small",variant:"text",onClick:e[0]||(e[0]=d=>t.$emit("update:modelValue",!1))})]),_:1}),o(Oe,{modelValue:s.activeTab,"onUpdate:modelValue":e[1]||(e[1]=d=>s.activeTab=d),color:"primary",density:"compact",grow:""},{default:a(()=>[o(Q,{value:"realtime"},{default:a(()=>[o(x,{start:"",size:"18"},{default:a(()=>[...e[19]||(e[19]=[u(" mdi-pulse ",-1)])]),_:1}),e[20]||(e[20]=u(" 实时监测 ",-1))]),_:1}),o(Q,{value:"reports"},{default:a(()=>[o(x,{start:"",size:"18"},{default:a(()=>[...e[21]||(e[21]=[u(" mdi-chart-bar ",-1)])]),_:1}),e[22]||(e[22]=u(" 统计报告 ",-1))]),_:1})]),_:1},8,["modelValue"]),o(F),o(T,{class:"pa-0",style:{"max-height":"70vh"}},{default:a(()=>[o(Ue,{modelValue:s.activeTab,"onUpdate:modelValue":e[6]||(e[6]=d=>s.activeTab=d)},{default:a(()=>[o($,{value:"realtime"},{default:a(()=>[i.micPermissionState==="denied"?(c(),v(le,{key:0,type:"error",variant:"tonal",class:"ma-4 mb-0",prominent:""},{prepend:a(()=>[o(x,{icon:"mdi-microphone-off",size:"28"})]),default:a(()=>[e[23]||(e[23]=r("div",{class:"text-subtitle-2 font-weight-bold mb-1"}," 麦克风权限被拒绝 ",-1)),e[24]||(e[24]=r("div",{class:"text-body-2"}," 浏览器已拒绝麦克风访问,无法进行噪音监测。请在浏览器地址栏左侧的锁图标中重新授予麦克风权限,然后刷新页面。 ",-1))]),_:1})):i.micPermissionState==="unavailable"?(c(),v(le,{key:1,type:"warning",variant:"tonal",class:"ma-4 mb-0",prominent:""},{prepend:a(()=>[o(x,{icon:"mdi-microphone-question",size:"28"})]),default:a(()=>[e[25]||(e[25]=r("div",{class:"text-subtitle-2 font-weight-bold mb-1"}," 未检测到麦克风 ",-1)),e[26]||(e[26]=r("div",{class:"text-body-2"}," 当前设备未检测到麦克风硬件,无法进行噪音监测。请连接麦克风后刷新页面重试。 ",-1))]),_:1})):w("",!0),r("div",es,[r("div",ts,[r("div",ss,[r("div",{class:O(["noise-gauge-ring",`ring-${i.dbColor}`])},[r("div",is,[r("span",{class:O(["noise-gauge-value font-weight-bold",`text-${i.dbColor}`])},m(i.currentDb),3),e[27]||(e[27]=r("span",{class:"text-caption text-medium-emphasis"},"dB",-1))])],2),r("div",{class:O(["text-subtitle-1 font-weight-medium mt-3",`text-${i.dbColor}`])},m(i.noiseLevel),3)])]),r("div",ns,[e[28]||(e[28]=r("div",{class:"d-flex justify-space-between text-caption text-medium-emphasis mb-1"},[r("span",null,"0 dB"),r("span",null,"50"),r("span",null,"100 dB")],-1)),r("div",os,[i.isMonitoring&&typeof i.currentDb=="number"?(c(),f("div",{key:0,class:"noise-indicator",style:N({left:`${Math.min(100,Math.max(0,i.currentDb))}%`})},null,4)):w("",!0)])])]),o(F),r("div",as,[r("div",rs,[o(x,{class:"mr-2",size:"18",color:"primary"},{default:a(()=>[...e[29]||(e[29]=[u(" mdi-chart-line ",-1)])]),_:1}),e[30]||(e[30]=r("span",{class:"text-subtitle-2 font-weight-medium"},"噪音走势",-1)),o(E),r("span",ls," 最近 "+m(i.ringBuffer.length)+" 个采样 ",1)]),r("div",ds,[(c(),f("svg",{width:"100%",height:"120",viewBox:`0 0 ${s.waveformWidth} 120`,preserveAspectRatio:"none"},[(c(!0),f(k,null,M(n.gridLines,d=>(c(),f("line",{key:`grid-${d.val}`,x1:"0",y1:d.y,x2:s.waveformWidth,y2:d.y,stroke:"currentColor","stroke-opacity":"0.08","stroke-dasharray":"4,4"},null,8,us))),128)),n.alertThreshold?(c(),f("line",{key:0,x1:"0",y1:n.dbToY(n.alertThreshold),x2:s.waveformWidth,y2:n.dbToY(n.alertThreshold),stroke:"rgb(var(--v-theme-error))","stroke-opacity":"0.5","stroke-dasharray":"6,3","stroke-width":"1.5"},null,8,hs)):w("",!0),n.waveformPath?(c(),f("path",{key:1,d:n.waveformFillPath,fill:"url(#waveGradient-rt)",opacity:"0.3"},null,8,ms)):w("",!0),n.waveformPath?(c(),f("path",{key:2,d:n.waveformPath,fill:"none",stroke:"rgb(var(--v-theme-primary))","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,fs)):w("",!0),e[31]||(e[31]=r("defs",null,[r("linearGradient",{id:"waveGradient-rt",x1:"0",y1:"0",x2:"0",y2:"1"},[r("stop",{offset:"0%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.4"}),r("stop",{offset:"100%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.02"})])],-1))],8,cs))],512)]),o(F),r("div",gs,[r("div",ps,[o(x,{class:"mr-2",size:"18",color:"amber"},{default:a(()=>[...e[32]||(e[32]=[u(" mdi-star-circle ",-1)])]),_:1}),e[33]||(e[33]=r("span",{class:"text-subtitle-2 font-weight-medium"},"实时评分",-1))]),i.currentScore!==null?(c(),f("div",ys,[o(_,{variant:"tonal",color:n.scoreColor,rounded:"xl",class:"flex-grow-1","min-width":"200"},{default:a(()=>[o(T,{class:"d-flex align-center pa-4"},{default:a(()=>[o(Ce,{"model-value":i.currentScore,color:n.scoreColor,size:56,width:5,class:"mr-4"},{default:a(()=>[r("span",bs,m(i.currentScore),1)]),_:1},8,["model-value","color"]),r("div",null,[r("div",vs,m(n.scoreLabel),1),e[34]||(e[34]=r("div",{class:"text-caption text-medium-emphasis"}," 综合评分 (0-100) ",-1))])]),_:1})]),_:1},8,["color"]),i.scoreDetail?(c(),v(_,{key:0,variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"200"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[35]||(e[35]=r("div",{class:"text-subtitle-2 font-weight-medium mb-2"}," 扣分扣因 ",-1)),(c(!0),f(k,null,M(n.scorePenaltyItems,d=>(c(),f("div",{key:d.label,class:"d-flex align-center justify-space-between mb-1"},[r("div",ws,[o(x,{color:d.color,size:"14",class:"mr-2"},{default:a(()=>[u(m(d.icon),1)]),_:2},1032,["color"]),r("span",Ss,m(d.label),1)]),r("div",Ds,[o(re,{"model-value":d.percent,color:d.color,height:"6",rounded:"",class:"mr-2"},null,8,["model-value","color"]),r("span",xs,m(d.percent)+"% ",1)])]))),128))]),_:1})]),_:1})):w("",!0)])):(c(),f("div",ks,[o(x,{size:"32",class:"mb-2"},{default:a(()=>[...e[36]||(e[36]=[u(" mdi-chart-arc ",-1)])]),_:1}),e[37]||(e[37]=r("div",{class:"text-body-2"}," 开始监测后将显示评分 ",-1))]))]),o(F),r("div",Cs,[i.isMonitoring?(c(),v(b,{key:1,color:"error",variant:"tonal","prepend-icon":"mdi-stop",size:"large",class:"px-6",onClick:e[3]||(e[3]=d=>t.$emit("stop"))},{default:a(()=>[...e[39]||(e[39]=[u(" 停止监测 ",-1)])]),_:1})):(c(),v(b,{key:0,color:"success",variant:"elevated","prepend-icon":"mdi-play",size:"large",class:"px-6",disabled:i.micPermissionState==="denied"||i.micPermissionState==="unavailable",onClick:e[2]||(e[2]=d=>t.$emit("start"))},{default:a(()=>[...e[38]||(e[38]=[u(" 开始监测 ",-1)])]),_:1},8,["disabled"])),o(E),o(b,{variant:"tonal",color:"deep-purple","prepend-icon":"mdi-crosshairs-gps",onClick:n.openCalibrateDialog},{default:a(()=>[...e[40]||(e[40]=[u(" 校准 ",-1)])]),_:1},8,["onClick"])])]),_:1}),o($,{value:"reports"},{default:a(()=>[n.sortedDateKeys.length===0?(c(),f("div",Ts,[o(x,{size:"48",class:"mb-3"},{default:a(()=>[...e[41]||(e[41]=[u(" mdi-chart-box-outline ",-1)])]),_:1}),e[42]||(e[42]=r("div",{class:"text-body-1"}," 暂无统计报告 ",-1)),e[43]||(e[43]=r("div",{class:"text-caption mt-1"}," 在配置的晚自习时间段内,系统会自动记录并生成报告 ",-1))])):(c(),f(k,{key:1},[r("div",_s,[r("div",Ms,[o(x,{size:"18",color:"teal",class:"mr-1"},{default:a(()=>[...e[44]||(e[44]=[u(" mdi-calendar ",-1)])]),_:1}),e[46]||(e[46]=r("span",{class:"text-subtitle-2 font-weight-medium"},"选择日期",-1)),o(E),o(b,{color:"error",size:"x-small",variant:"text","prepend-icon":"mdi-delete-sweep",onClick:e[4]||(e[4]=d=>s.confirmClearMode="all")},{default:a(()=>[...e[45]||(e[45]=[u(" 清空全部 ",-1)])]),_:1})]),r("div",Es,[(c(!0),f(k,null,M(n.sortedDateKeys,d=>(c(),v(L,{key:d,color:i.selectedDate===d?"primary":void 0,variant:i.selectedDate===d?"elevated":"tonal",size:"small",onClick:h=>t.$emit("select-date",d)},{default:a(()=>[o(x,{start:"",size:"14"},{default:a(()=>[...e[47]||(e[47]=[u(" mdi-calendar-blank ",-1)])]),_:1}),u(" "+m(n.formatDateLabel(d))+" ",1),o(gt,{content:i.reportMeta.dates[d].count,color:"primary",inline:"",class:"ml-1"},null,8,["content"])]),_:2},1032,["color","variant","onClick"]))),128))])]),o(F),i.selectedDate&&i.reportMeta.dates[i.selectedDate]?(c(),f("div",Rs,[r("div",Is,[r("div",Vs,m(n.formatDateLabel(i.selectedDate)),1),o(L,{size:"small",color:n.metaScoreColor(i.reportMeta.dates[i.selectedDate].avgScore),variant:"tonal"},{default:a(()=>[u(" 均分 "+m(i.reportMeta.dates[i.selectedDate].avgScore),1)]),_:1},8,["color"]),o(L,{size:"small",variant:"tonal"},{default:a(()=>[u(m(i.reportMeta.dates[i.selectedDate].count)+" 条记录 ",1)]),_:1}),o(E),o(b,{color:"error",size:"x-small",variant:"text","prepend-icon":"mdi-delete",onClick:e[5]||(e[5]=d=>s.confirmClearMode="date")},{default:a(()=>[...e[48]||(e[48]=[u(" 清空当日 ",-1)])]),_:1})])])):w("",!0),i.dateReports.length===0&&i.selectedDate?(c(),f("div",Ns,[o(x,{size:"32"},{default:a(()=>[...e[49]||(e[49]=[u(" mdi-file-document-outline ",-1)])]),_:1}),e[50]||(e[50]=r("div",{class:"text-body-2 mt-1"}," 该日期暂无报告数据 ",-1))])):w("",!0),i.dateReports.length>0?(c(),f("div",Ps,[(c(!0),f(k,null,M(i.dateReports,(d,h)=>(c(),v(L,{key:d.startTime,color:s.selectedReportIndex===h?"teal":void 0,variant:s.selectedReportIndex===h?"elevated":"outlined",size:"small",onClick:p=>s.selectedReportIndex=h},{default:a(()=>[u(m(d.sessionName)+" ",1),r("span",As,m(n.formatTime(d.startTime)),1)]),_:2},1032,["color","variant","onClick"]))),128))])):w("",!0),n.selectedReport?(c(),v(F,{key:3})):w("",!0),n.selectedReport?(c(),f("div",Ls,[r("div",zs,[r("div",Fs,m(n.selectedReport.sessionName)+" 统计报告 ",1)]),r("div",Bs,[e[57]||(e[57]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"报告概览")],-1)),r("div",Os,[r("div",Us,[e[51]||(e[51]=r("div",{class:"text-caption text-medium-emphasis"}," 时长 ",-1)),r("div",js,m(n.formatDuration(n.selectedReport.duration)),1)]),r("div",Hs,[e[52]||(e[52]=r("div",{class:"text-caption text-medium-emphasis"}," 表现 ",-1)),r("div",Ws,[u(m(n.selectedReport.score)+" 分 ",1),r("span",Gs,"("+m(n.reportScoreLabel(n.selectedReport.score))+")",1)])]),r("div",Ks,[e[53]||(e[53]=r("div",{class:"text-caption text-medium-emphasis"}," 峰值 ",-1)),r("div",qs,m(n.selectedReport.maxDb)+" dB ",1)]),r("div",Ys,[e[54]||(e[54]=r("div",{class:"text-caption text-medium-emphasis"}," 平均 ",-1)),r("div",Js,m(n.selectedReport.avgDb)+" dB ",1)]),r("div",Xs,[e[55]||(e[55]=r("div",{class:"text-caption text-medium-emphasis"}," 超阈时长 ",-1)),r("div",Zs,m(n.formatSeconds(n.selectedReport.overThresholdDuration)),1)]),r("div",Qs,[e[56]||(e[56]=r("div",{class:"text-caption text-medium-emphasis"}," 打断次数 ",-1)),r("div",$s,m(n.selectedReport.segmentCount),1)])])]),r("div",ei,[e[59]||(e[59]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"噪音走势")],-1)),r("div",ti,[(c(),f("svg",{width:"100%",height:"140",viewBox:`0 0 ${s.reportChartWidth} 140`,preserveAspectRatio:"none"},[(c(!0),f(k,null,M(n.reportGridLines,d=>(c(),f("line",{key:`rg-${d.val}`,x1:"0",y1:d.y,x2:s.reportChartWidth,y2:d.y,stroke:"currentColor","stroke-opacity":"0.1","stroke-dasharray":"4,4"},null,8,ii))),128)),r("line",{x1:"0",y1:n.reportDbToY(n.selectedReport.alertThresholdDb||55),x2:s.reportChartWidth,y2:n.reportDbToY(n.selectedReport.alertThresholdDb||55),stroke:"rgb(var(--v-theme-error))","stroke-opacity":"0.6","stroke-dasharray":"6,3","stroke-width":"1.5"},null,8,ni),n.reportWaveformPath?(c(),f("path",{key:0,d:n.reportWaveformFillPath,fill:"url(#reportGrad)",opacity:"0.3"},null,8,oi)):w("",!0),n.reportWaveformPath?(c(),f("path",{key:1,d:n.reportWaveformPath,fill:"none",stroke:"rgb(var(--v-theme-primary))","stroke-width":"1.5","stroke-linejoin":"round"},null,8,ai)):w("",!0),e[58]||(e[58]=r("defs",null,[r("linearGradient",{id:"reportGrad",x1:"0",y1:"0",x2:"0",y2:"1"},[r("stop",{offset:"0%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.3"}),r("stop",{offset:"100%","stop-color":"rgb(var(--v-theme-primary))","stop-opacity":"0.02"})])],-1))],8,si))],512),r("div",ri," 统计范围:"+m(n.formatFullTime(n.selectedReport.startTime))+" - "+m(n.formatFullTime(n.selectedReport.endTime))+"; 噪音报警阈值: "+m(n.selectedReport.alertThresholdDb||55)+" dB; 覆盖率: "+m(n.reportCoverage)+"% ",1)]),r("div",li,[e[62]||(e[62]=r("div",{class:"d-flex align-center mb-3"},[r("span",{class:"report-section-line bg-teal"}),r("span",{class:"text-subtitle-2 font-weight-bold ml-2"},"更多统计")],-1)),r("div",di,[o(_,{variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"280"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[60]||(e[60]=r("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 噪音等级分布 ",-1)),r("div",ci,[r("div",ui,[(c(!0),f(k,null,M(n.levelDistribution,d=>(c(),f("div",{key:d.label,style:N({width:`${d.percent}%`,backgroundColor:d.color,minWidth:d.percent>0?"4px":"0"})},null,4))),128))]),r("div",hi,[(c(!0),f(k,null,M(n.levelDistribution,d=>(c(),f("div",{key:`leg-${d.label}`,class:"d-flex align-center"},[r("span",{class:"d-inline-block mr-1",style:N({width:"10px",height:"10px",borderRadius:"2px",backgroundColor:d.color})},null,4),r("span",mi,m(d.label)+" ("+m(d.percent)+"%) ",1)]))),128))])])]),_:1})]),_:1}),o(_,{variant:"outlined",rounded:"xl",class:"flex-grow-1","min-width":"280"},{default:a(()=>[o(T,{class:"pa-4"},{default:a(()=>[e[61]||(e[61]=r("div",{class:"text-subtitle-2 font-weight-medium mb-3"}," 扣分扣因 (越长扣分越多) ",-1)),(c(!0),f(k,null,M(n.reportPenaltyItems,d=>(c(),f("div",{key:d.label,class:"d-flex align-center mb-2"},[r("span",fi,m(d.label),1),o(re,{"model-value":d.percent,color:d.color,height:"10",rounded:"",class:"flex-grow-1 mr-2"},null,8,["model-value","color"]),r("span",gi,m(d.percent)+"%",1)]))),128))]),_:1})]),_:1})])])])):w("",!0)],64))]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),o(B,{modelValue:s.showCalibrateDialog,"onUpdate:modelValue":e[12]||(e[12]=d=>s.showCalibrateDialog=d),"max-width":"560",scrollable:""},{default:a(()=>[o(_,{class:"rounded-xl"},{default:a(()=>[o(I,{class:"d-flex align-center pa-4"},{default:a(()=>[o(x,{class:"mr-2",color:"deep-purple"},{default:a(()=>[...e[63]||(e[63]=[u(" mdi-crosshairs-gps ",-1)])]),_:1}),e[64]||(e[64]=r("span",{class:"text-h6 font-weight-bold"},"分贝校准",-1)),o(E),o(b,{icon:"mdi-close",size:"small",variant:"text",onClick:e[7]||(e[7]=d=>s.showCalibrateDialog=!1)})]),_:1}),o(F),o(T,{class:"pa-5"},{default:a(()=>[o(_,{variant:"outlined",class:"mb-5"},{default:a(()=>[o(T,{class:"py-3"},{default:a(()=>[e[68]||(e[68]=r("div",{class:"text-caption text-medium-emphasis mb-1"}," 当前校准值 ",-1)),r("div",pi,[r("div",null,[e[65]||(e[65]=r("span",{class:"text-body-2 text-medium-emphasis"},"基准分贝:",-1)),r("span",yi,m(s.calibrationSettings.baselineDb)+" dB ",1)]),r("div",null,[e[66]||(e[66]=r("span",{class:"text-body-2 text-medium-emphasis"},"基准 RMS:",-1)),r("span",bi,m(s.calibrationSettings.baselineRms!=null?s.calibrationSettings.baselineRms.toFixed(6):"未校准"),1)]),r("div",null,[e[67]||(e[67]=r("span",{class:"text-body-2 text-medium-emphasis"},"最大分贝:",-1)),r("span",vi,m(s.calibrationSettings.maxLevelDb)+" dB ",1)])])]),_:1})]),_:1}),r("div",wi,[o(x,{size:"18",class:"mr-2",color:"primary"},{default:a(()=>[...e[69]||(e[69]=[u(" mdi-auto-fix ",-1)])]),_:1}),e[70]||(e[70]=r("span",{class:"text-subtitle-2 font-weight-medium"},"自动校准",-1))]),e[74]||(e[74]=r("div",{class:"text-caption text-medium-emphasis mb-3"}," 在已知环境分贝的场景下,输入当前环境的真实分贝值,点击开始后保持环境安静 3 秒。 ",-1)),r("div",Si,[o(se,{modelValue:s.calibrateTargetDb,"onUpdate:modelValue":e[8]||(e[8]=d=>s.calibrateTargetDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"目标分贝",suffix:"dB","hide-details":"",style:{"max-width":"160px"},min:20,max:80},null,8,["modelValue"]),o(b,{color:"deep-purple",variant:"tonal","prepend-icon":"mdi-crosshairs-gps",loading:s.isCalibrating,disabled:!i.isMonitoring,onClick:n.doAutoCalibrate},{default:a(()=>[...e[71]||(e[71]=[u(" 开始校准 ",-1)])]),_:1},8,["loading","disabled","onClick"]),i.isMonitoring?w("",!0):(c(),f("span",Di," 需先开启监测 ")),s.calibrateMessage?(c(),f("span",{key:1,class:O(["text-caption",s.calibrateSuccess?"text-success":"text-error"])},m(s.calibrateMessage),3)):w("",!0)]),o(F,{class:"mb-5"}),r("div",xi,[o(x,{size:"18",class:"mr-2",color:"orange"},{default:a(()=>[...e[72]||(e[72]=[u(" mdi-pencil-ruler ",-1)])]),_:1}),e[73]||(e[73]=r("span",{class:"text-subtitle-2 font-weight-medium"},"手动校准 / 参数调整",-1))]),e[75]||(e[75]=r("div",{class:"text-caption text-medium-emphasis mb-3"}," 直接输入校准参数。修改后点击保存生效。 ",-1)),r("div",ki,[o(se,{modelValue:s.editBaselineDb,"onUpdate:modelValue":e[9]||(e[9]=d=>s.editBaselineDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"基准分贝",suffix:"dB","hide-details":"",style:{"max-width":"160px"},min:20,max:80},null,8,["modelValue"]),o(se,{modelValue:s.editBaselineRms,"onUpdate:modelValue":e[10]||(e[10]=d=>s.editBaselineRms=d),density:"compact",variant:"outlined",label:"基准 RMS","hide-details":"",style:{"max-width":"200px"},placeholder:"如 0.003200"},null,8,["modelValue"]),o(se,{modelValue:s.editMaxLevelDb,"onUpdate:modelValue":e[11]||(e[11]=d=>s.editMaxLevelDb=d),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"最大显示分贝",suffix:"dB","hide-details":"",style:{"max-width":"180px"},min:40,max:120},null,8,["modelValue"])])]),_:1}),o(j,{class:"px-4 pb-4"},{default:a(()=>[o(b,{variant:"text","prepend-icon":"mdi-restore",onClick:n.resetCalibration},{default:a(()=>[...e[76]||(e[76]=[u(" 恢复默认 ",-1)])]),_:1},8,["onClick"]),o(E),o(b,{color:"primary",variant:"elevated","prepend-icon":"mdi-content-save",onClick:n.saveManualCalibration},{default:a(()=>[...e[77]||(e[77]=[u(" 保存校准 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:n.showConfirmClear,"onUpdate:modelValue":e[14]||(e[14]=d=>n.showConfirmClear=d),"max-width":"360"},{default:a(()=>[o(_,null,{default:a(()=>[o(I,null,{default:a(()=>[...e[78]||(e[78]=[u("确认清空",-1)])]),_:1}),o(T,null,{default:a(()=>[u(m(s.confirmClearMode==="all"?"确定要清空所有日期的统计报告吗?此操作不可撤销。":`确定要清空 ${n.formatDateLabel(i.selectedDate)} 的统计报告吗?此操作不可撤销。`),1)]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{variant:"text",onClick:e[13]||(e[13]=d=>s.confirmClearMode="")},{default:a(()=>[...e[79]||(e[79]=[u(" 取消 ",-1)])]),_:1}),o(b,{color:"error",onClick:n.doClearReports},{default:a(()=>[...e[80]||(e[80]=[u(" 确认清空 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["model-value"])}const Ye=H($t,[["render",Ci],["__scopeId","data-v-5d732295"]]),Ti=Object.freeze(Object.defineProperty({__proto__:null,default:Ye},Symbol.toStringTag,{value:"Module"})),_i=z(()=>P(()=>Promise.resolve().then(()=>Ti),void 0,import.meta.url)),Mi=2,Ei=.9,Ri=.6,Ii={name:"TimeCard",components:{NoiseMonitorDetail:_i},data(){return{now:new Date,timer:null,unwatch:null,fontSize:28,showFullscreen:!1,showSettings:!1,timeCardEnabled:!0,use12hClock:!1,fullscreenMode:"clock",toolbarVisible:!0,toolbarTimer:null,countdownHours:0,countdownMinutes:5,countdownSeconds:0,countdownRunning:!1,countdownRemaining:0,countdownTotal:0,countdownTimer:null,countdownLastTick:null,countdownPresets:[{label:"1 分钟",h:0,m:1,s:0},{label:"3 分钟",h:0,m:3,s:0},{label:"5 分钟",h:0,m:5,s:0},{label:"10 分钟",h:0,m:10,s:0},{label:"15 分钟",h:0,m:15,s:0},{label:"30 分钟",h:0,m:30,s:0},{label:"1 小时",h:1,m:0,s:0}],countdownEndedDialog:!1,overtimeElapsed:0,overtimeTimer:null,overtimeLastTick:null,stopwatchRunning:!1,stopwatchElapsed:0,stopwatchTimer:null,stopwatchLastTick:null,laps:[],lastLapElapsed:0,noiseEnabled:!1,noiseMonitoring:!1,noiseStatus:"initializing",noiseCurrentDbfs:-100,noiseCurrentDisplayDb:0,noiseSmoothedDb:0,noiseScore:null,noiseScoreDetail:null,noiseRingBuffer:[],noiseLastSlice:null,noiseHistory:[],noiseUnsubscribe:null,showNoiseDetail:!1,noiseSessionConfig:null,noiseSessionActive:!1,noiseSessionData:null,noiseSessionCheckTimer:null,noiseReportMeta:{},noiseSelectedDate:"",noiseCurrentDateReports:[],showMicPermissionDialog:!1,micPermissionState:""}},computed:{timeString(){const t=this.now.getHours(),e=String(this.now.getMinutes()).padStart(2,"0");return this.use12hClock?`${t%12||12}:${e}`:`${String(t).padStart(2,"0")}:${e}`},amPmString(){return this.now.getHours()<12?"AM":"PM"},secondsString(){return`:${String(this.now.getSeconds()).padStart(2,"0")}`},dateString(){const t=this.now.getFullYear(),e=this.now.getMonth()+1,i=this.now.getDate();return`${t}年${e}月${i}日`},weekdayString(){return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][this.now.getDay()]},periodOfDay(){const t=this.now.getHours();return t<6?"凌晨":t<8?"早晨":t<11?"上午":t<13?"中午":t<17?"下午":t<19?"傍晚":t<22?"晚上":"深夜"},dayProgressPercent(){const t=this.now.getHours(),e=this.now.getMinutes(),i=this.now.getSeconds();return((t*3600+e*60+i)/86400*100).toFixed(1)},timeStyle(){return{"font-size":`${this.fontSize*Mi}px`,"font-weight":"700","line-height":"1","letter-spacing":"4px","font-variant-numeric":"tabular-nums"}},secondsStyle(){return{"font-size":`${this.fontSize*Ei}px`,"font-variant-numeric":"tabular-nums","vertical-align":"baseline","margin-left":"4px",opacity:"0.6"}},dateStyle(){return{"font-size":`${this.fontSize*Ri}px`,"letter-spacing":"1px"}},countdownTotalSetSeconds(){return this.countdownHours*3600+this.countdownMinutes*60+this.countdownSeconds},countdownDisplay(){const t=Math.max(0,Math.ceil(this.countdownRemaining/1e3)),e=Math.floor(t/3600),i=Math.floor(t%3600/60),l=t%60;return e>0?`${String(e).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`:`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`},countdownProgressPercent(){return this.countdownTotal<=0?0:(this.countdownTotal-this.countdownRemaining)/this.countdownTotal*100},overtimeDisplay(){const t=Math.floor(this.overtimeElapsed/1e3),e=Math.floor(t/3600),i=Math.floor(t%3600/60),l=t%60;return e>0?`${e}小时${i}分${l}秒`:i>0?`${i}分${l}秒`:`${l}秒`},stopwatchDisplay(){const t=this.stopwatchElapsed,e=Math.floor(t/1e3),i=Math.floor(e/3600),l=Math.floor(e%3600/60),s=e%60,n=Math.floor(t%1e3/10);return i>0?`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}:${String(s).padStart(2,"0")}.${String(n).padStart(2,"0")}`:`${String(l).padStart(2,"0")}:${String(s).padStart(2,"0")}.${String(n).padStart(2,"0")}`},noiseDisplayDb(){return!this.noiseMonitoring||this.noiseStatus!=="active"?"--":Math.round(this.noiseSmoothedDb)},noiseDbColor(){const t=typeof this.noiseDisplayDb=="number"?this.noiseDisplayDb:0;return t<40?"success":t<55?"light-green":t<70?"warning":t<85?"orange":"error"},noiseIconColor(){return this.noiseMonitoring?this.noiseDbColor:"grey"},noiseStatusText(){if(!this.noiseMonitoring||this.noiseStatus!=="active")return"未监测";const t=typeof this.noiseDisplayDb=="number"?this.noiseDisplayDb:0;return t<30?"极其安静":t<40?"非常安静":t<50?"安静":t<60?"正常交谈":t<70?"较为嘈杂":t<80?"嘈杂":t<90?"非常嘈杂":"极度嘈杂"}},watch:{showFullscreen(t){t?(this.handleKeydown=e=>{e.key==="Escape"&&(this.showSettings?this.showSettings=!1:this.countdownEndedDialog&&this.dismissCountdownDialog(),e.preventDefault(),e.stopPropagation())},window.addEventListener("keydown",this.handleKeydown,!0),this.showToolbar()):(this.handleKeydown&&(window.removeEventListener("keydown",this.handleKeydown,!0),this.handleKeydown=null),this.clearToolbarTimer())}},async mounted(){if(this.loadSettings(),this.startTimer(),this.unwatch=Te(()=>{this.loadSettings()}),this.noiseEnabled=D("noiseMonitor.enabled"),this.noiseEnabled){this.noiseHistory=G.getHistory();const t=await this.checkMicPermission();this.micPermissionState=t,t==="granted"?this.loadNoiseSessionConfig().then(()=>{this.startSessionCheck(),D("noiseMonitor.autoStart")&&!this.noiseMonitoring&&this.startNoise()}):t==="prompt"&&(D("noiseMonitor.permissionDismissed")||(this.showMicPermissionDialog=!0))}},beforeUnmount(){this.stopTimer(),this.clearCountdownTimer(),this.clearStopwatchTimer(),this.clearToolbarTimer(),this.dismissCountdownDialog(),this.stopNoise(),this.stopSessionCheck(),this.unwatch&&this.unwatch(),this.handleKeydown&&window.removeEventListener("keydown",this.handleKeydown,!0)},methods:{loadSettings(){this.fontSize=ne.getSetting("font.size"),this.timeCardEnabled=D("timeCard.enabled"),this.use12hClock=D("timeCard.use12h"),this.noiseEnabled=D("noiseMonitor.enabled")},setTimeCardEnabled(t){this.timeCardEnabled=t,K("timeCard.enabled",t)},setUse12hClock(t){this.use12hClock=t,K("timeCard.use12h",t)},startTimer(){this.timer=setInterval(()=>{this.now=new Date},1e3)},stopTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)},showToolbar(){this.toolbarVisible=!0,this.clearToolbarTimer(),this.toolbarTimer=setTimeout(()=>{this.toolbarVisible=!1},3e3)},clearToolbarTimer(){this.toolbarTimer&&(clearTimeout(this.toolbarTimer),this.toolbarTimer=null)},applyCountdownPreset(t){this.countdownHours=t.h,this.countdownMinutes=t.m,this.countdownSeconds=t.s},startCountdown(){const t=this.countdownTotalSetSeconds*1e3;t<=0||(this.countdownTotal=t,this.countdownRemaining=t,this.countdownRunning=!0,this.countdownLastTick=Date.now(),this.countdownTimer=setInterval(()=>{this.tickCountdown()},50))},tickCountdown(){const t=Date.now(),e=t-this.countdownLastTick;this.countdownLastTick=t,this.countdownRemaining=Math.max(0,this.countdownRemaining-e),this.countdownRemaining<=0&&(this.countdownRunning=!1,this.clearCountdownTimer(),yt(bt),this.showCountdownEndedDialog())},toggleCountdown(){this.countdownRunning?(this.countdownRunning=!1,this.clearCountdownTimer()):(this.countdownRunning=!0,this.countdownLastTick=Date.now(),this.countdownTimer=setInterval(()=>{this.tickCountdown()},50))},resetCountdown(){this.countdownRunning=!1,this.countdownRemaining=0,this.countdownTotal=0,this.clearCountdownTimer(),this.dismissCountdownDialog()},showCountdownEndedDialog(){this.countdownEndedDialog=!0,this.overtimeElapsed=0,this.overtimeLastTick=Date.now(),this.overtimeTimer=setInterval(()=>{const t=Date.now();this.overtimeElapsed+=t-this.overtimeLastTick,this.overtimeLastTick=t},200)},dismissCountdownDialog(){this.countdownEndedDialog=!1,this.overtimeElapsed=0,this.overtimeTimer&&(clearInterval(this.overtimeTimer),this.overtimeTimer=null)},formatCountdownTotal(t){const e=Math.round(t/1e3),i=Math.floor(e/3600),l=Math.floor(e%3600/60),s=e%60,n=[];return i>0&&n.push(`${i}小时`),l>0&&n.push(`${l}分钟`),s>0&&n.push(`${s}秒`),n.join("")||"0秒"},clearCountdownTimer(){this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null)},toggleStopwatch(){this.stopwatchRunning?(this.stopwatchRunning=!1,this.clearStopwatchTimer()):(this.stopwatchRunning=!0,this.stopwatchLastTick=Date.now(),this.stopwatchTimer=setInterval(()=>{this.tickStopwatch()},30))},tickStopwatch(){const t=Date.now();this.stopwatchElapsed+=t-this.stopwatchLastTick,this.stopwatchLastTick=t},addLap(){const t=this.stopwatchElapsed-this.lastLapElapsed;this.laps.unshift({split:t,total:this.stopwatchElapsed}),this.lastLapElapsed=this.stopwatchElapsed},resetStopwatch(){this.stopwatchRunning=!1,this.stopwatchElapsed=0,this.lastLapElapsed=0,this.laps=[],this.clearStopwatchTimer()},clearStopwatchTimer(){this.stopwatchTimer&&(clearInterval(this.stopwatchTimer),this.stopwatchTimer=null)},formatMs(t){const e=Math.floor(t/1e3),i=Math.floor(e/60),l=e%60,s=Math.floor(t%1e3/10);return`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}.${String(s).padStart(2,"0")}`},async checkMicPermission(){try{return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices&&!(await navigator.mediaDevices.enumerateDevices()).some(l=>l.kind==="audioinput")?"unavailable":!navigator.permissions||!navigator.permissions.query?"granted":(await navigator.permissions.query({name:"microphone"})).state}catch{return"prompt"}},async grantMicPermission(){this.showMicPermissionDialog=!1,await this.loadNoiseSessionConfig(),this.startSessionCheck(),await this.startNoise(),this.micPermissionState=await this.checkMicPermission()},dismissMicPermission(){this.showMicPermissionDialog=!1,K("noiseMonitor.permissionDismissed",!0)},onPermissionDialogToggle(t){this.noiseEnabled=t,K("noiseMonitor.enabled",t),t||(this.showMicPermissionDialog=!1,K("noiseMonitor.permissionDismissed",!0))},async startNoise(){try{await G.start(),this.noiseMonitoring=!0,this.noiseUnsubscribe=G.subscribe(t=>{this.noiseStatus=t.status,this.noiseCurrentDbfs=t.currentDbfs,this.noiseCurrentDisplayDb=t.currentDisplayDb;const e=.25,i=t.currentDisplayDb;this.noiseSmoothedDb=this.noiseSmoothedDb===0?i:this.noiseSmoothedDb*(1-e)+i*e,this.noiseRingBuffer=t.ringBuffer||[],this.noiseLastSlice=t.lastSlice||null,this.noiseScore=t.currentScore??null,this.noiseScoreDetail=t.currentScoreDetail??null,this.noiseHistory=G.getHistory(),this.noiseSessionActive&&this.noiseSessionData&&this.collectSessionSample(t)})}catch(t){console.error("噪音监测启动失败:",t),this.noiseStatus="error"}},stopNoise(){this.noiseUnsubscribe&&(this.noiseUnsubscribe(),this.noiseUnsubscribe=null),this.noiseMonitoring&&G.stop(),this.noiseMonitoring=!1,this.noiseStatus="initializing",this.noiseSmoothedDb=0,this.noiseScore=null,this.noiseScoreDetail=null},clearNoiseHistory(){G.clearHistory(),this.noiseHistory=[]},onNoiseClick(){if(this.micPermissionState==="denied"||this.micPermissionState==="unavailable"){this.showNoiseDetail=!0;return}this.noiseMonitoring?this.showNoiseDetail=!0:this.startNoise()},async loadNoiseSessionConfig(){try{const t=await R.loadData("noise-session-config"),e=(t==null?void 0:t.data)||t;e&&e.sessions?this.noiseSessionConfig=e:this.noiseSessionConfig={sessions:[{name:"第1节晚自习",start:"19:20",duration:70,enabled:!0},{name:"第2节晚自习",start:"20:20",duration:110,enabled:!0}],alertThresholdDb:55},await this.loadSessionReports()}catch(t){console.error("加载噪音会话配置失败:",t),this.noiseSessionConfig={sessions:[{name:"第1节晚自习",start:"19:20",duration:70,enabled:!0},{name:"第2节晚自习",start:"20:20",duration:110,enabled:!0}],alertThresholdDb:55}}},async saveNoiseSessionConfig(){try{await R.saveData("noise-session-config",this.noiseSessionConfig)}catch(t){console.error("保存噪音会话配置失败:",t)}},formatDateKey(t){const e=new Date(t);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`},async loadReportMeta(){try{const t=await R.loadData("noise-reports-meta"),e=(t==null?void 0:t.data)||t;if(e&&e.dates){const i=new Date;i.setDate(i.getDate()-30);const l=this.formatDateKey(i.getTime()),s={};for(const[n,d]of Object.entries(e.dates))n>=l&&(s[n]=d);this.noiseReportMeta={dates:s}}else this.noiseReportMeta={dates:{}}}catch{this.noiseReportMeta={dates:{}}}},async saveReportMeta(){try{await R.saveData("noise-reports-meta",this.noiseReportMeta)}catch{console.error("保存报告元数据失败")}},async loadReportsForDate(t){this.noiseSelectedDate=t;try{const e=await R.loadData(`noise-reports-${t}`),i=(e==null?void 0:e.data)||e;this.noiseCurrentDateReports=Array.isArray(i)?i:[]}catch{this.noiseCurrentDateReports=[]}},async saveReportToDate(t){const e=this.formatDateKey(t.startTime);let i=[];try{const s=await R.loadData(`noise-reports-${e}`),n=(s==null?void 0:s.data)||s;Array.isArray(n)&&(i=n)}catch{}i.push(t),await R.saveData(`noise-reports-${e}`,i),this.noiseReportMeta.dates||(this.noiseReportMeta.dates={});const l=i.map(s=>s.score);this.noiseReportMeta.dates[e]={count:i.length,avgScore:Math.round(l.reduce((s,n)=>s+n,0)/l.length),sessions:i.map(s=>s.sessionName),lastUpdated:Date.now()},await this.saveReportMeta(),this.noiseSelectedDate===e&&(this.noiseCurrentDateReports=i)},async loadSessionReports(){await this.loadReportMeta();const t=this.formatDateKey(Date.now());await this.loadReportsForDate(t)},startSessionCheck(){this.checkSessionTime(),this.noiseSessionCheckTimer=setInterval(()=>{this.checkSessionTime()},3e4)},stopSessionCheck(){this.noiseSessionCheckTimer&&(clearInterval(this.noiseSessionCheckTimer),this.noiseSessionCheckTimer=null)},checkSessionTime(){var l;if(!((l=this.noiseSessionConfig)!=null&&l.sessions))return;const t=new Date,e=t.getHours()*60+t.getMinutes(),i=this.noiseSessionConfig.sessions.find(s=>{if(!s.enabled)return!1;const[n,d]=s.start.split(":").map(Number),h=n*60+d,p=h+(s.duration||70);return e>=h&&e0){const i=this.noiseSessionData.samples,l=i.length>0?i[i.length-1].t:0;Date.now()-l>=2e3&&i.push({t:Date.now(),db:Math.round(e*10)/10})}},generateSessionReport(t){const e=t.samples,i=e.map(W=>W.db),l=t.alertThresholdDb,s=t.endTime-t.startTime;if(i.length===0)return{sessionName:t.sessionName,startTime:t.startTime,endTime:t.endTime,duration:s,avgDb:0,maxDb:0,score:100,overThresholdDuration:0,overThresholdRatio:0,segmentCount:0,samples:[],scorePenalties:{sustained:0,time:0,segment:0}};const n=Math.round(i.reduce((W,ge)=>W+ge,0)/i.length*10)/10,d=Math.round(Math.max(...i)*10)/10;let h=0;i.forEach(W=>{W>l&&h++});const p=h/i.length,g=Math.round(p*s/1e3);let S=0,U=!1;i.forEach(W=>{W>l&&!U&&(S++,U=!0),W<=l&&(U=!1)});const A=Math.min(40,Math.max(0,(n-l)/30*40)),Y=Math.min(30,p*30),J=Math.min(30,S/Math.max(1,s/6e4)/6*30),fe=Math.max(0,Math.round(100-A-Y-J));return{sessionName:t.sessionName,startTime:t.startTime,endTime:t.endTime,duration:s,avgDb:n,maxDb:d,score:fe,overThresholdDuration:g,overThresholdRatio:Math.round(p*1e3)/10,segmentCount:S,samples:e.length>500?this.downsampleArray(e,500):e,scorePenalties:{sustained:Math.round(A),time:Math.round(Y),segment:Math.round(J)},alertThresholdDb:l}},downsampleArray(t,e){const i=t.length/e,l=[];for(let s=0;ss.showFullscreen=!0)},{default:a(()=>[o(T,{class:"pa-6 d-flex flex-column",style:{height:"100%"}},{default:a(()=>[r("div",Vi,[r("div",Ni,[r("div",{class:"time-display",style:N(n.timeStyle)},[u(m(n.timeString),1),r("span",{class:"seconds-text",style:N(n.secondsStyle)},m(n.secondsString),5),s.use12hClock?(c(),f("span",{key:0,class:"ampm-text",style:N(n.secondsStyle)},m(n.amPmString),5)):w("",!0)],4),r("div",{class:"date-line mt-3",style:N(n.dateStyle)},m(n.dateString)+" "+m(n.weekdayString)+" "+m(n.periodOfDay),5)]),s.noiseEnabled?(c(),f("div",{key:0,class:"d-flex flex-column align-center justify-center",style:{"min-width":"80px"},onClick:e[0]||(e[0]=Re((...h)=>n.onNoiseClick&&n.onNoiseClick(...h),["stop"]))},[s.micPermissionState==="denied"?(c(),f(k,{key:0},[o(x,{color:"error",size:"24"},{default:a(()=>[...e[18]||(e[18]=[u(" mdi-microphone-off ",-1)])]),_:1}),e[19]||(e[19]=r("div",{class:"text-caption text-error mt-1",style:{"white-space":"nowrap","font-size":"10px"}}," 权限被拒绝 ",-1))],64)):s.micPermissionState==="unavailable"?(c(),f(k,{key:1},[o(x,{color:"warning",size:"24"},{default:a(()=>[...e[20]||(e[20]=[u(" mdi-microphone-question ",-1)])]),_:1}),e[21]||(e[21]=r("div",{class:"text-caption text-warning mt-1",style:{"white-space":"nowrap","font-size":"10px"}}," 无麦克风 ",-1))],64)):(c(),f(k,{key:2},[r("div",{class:O(["noise-side-db font-weight-bold",`text-${n.noiseDbColor}`]),style:N({fontSize:`${s.fontSize*.9}px`,lineHeight:1,fontVariantNumeric:"tabular-nums"})},m(n.noiseDisplayDb),7),r("div",{class:O(["text-caption mt-1",`text-${n.noiseDbColor}`]),style:{"white-space":"nowrap","font-size":"11px"}},m(n.noiseStatusText),3),s.noiseMonitoring?w("",!0):(c(),f("div",Pi," 点击开启 "))],64))])):w("",!0)])]),_:1}),s.noiseEnabled?(c(),v(d,{key:0,modelValue:s.showNoiseDetail,"onUpdate:modelValue":e[1]||(e[1]=h=>s.showNoiseDetail=h),status:s.noiseStatus,"current-db":n.noiseDisplayDb,"current-dbfs":s.noiseCurrentDbfs,"noise-level":n.noiseStatusText,"db-color":n.noiseDbColor,"current-score":s.noiseScore,"score-detail":s.noiseScoreDetail,"ring-buffer":s.noiseRingBuffer,"last-slice":s.noiseLastSlice,history:s.noiseHistory,"is-monitoring":s.noiseMonitoring,"mic-permission-state":s.micPermissionState,"session-active":s.noiseSessionActive,"session-data":s.noiseSessionData,"report-meta":s.noiseReportMeta,"selected-date":s.noiseSelectedDate,"date-reports":s.noiseCurrentDateReports,onStart:n.startNoise,onStop:n.stopNoise,onClearHistory:n.clearNoiseHistory,onSelectDate:n.onSelectReportDate,onClearDateReports:n.onClearDateReports,onClearAllReports:n.onClearAllReports},null,8,["modelValue","status","current-db","current-dbfs","noise-level","db-color","current-score","score-detail","ring-buffer","last-slice","history","is-monitoring","mic-permission-state","session-active","session-data","report-meta","selected-date","date-reports","onStart","onStop","onClearHistory","onSelectDate","onClearDateReports","onClearAllReports"])):w("",!0),o(B,{modelValue:s.showMicPermissionDialog,"onUpdate:modelValue":e[2]||(e[2]=h=>s.showMicPermissionDialog=h),"max-width":"480",persistent:""},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[r("div",Ai,[o(st,{color:"primary",size:"72"},{default:a(()=>[o(x,{icon:"mdi-microphone-outline",size:"36"})]),_:1})]),o(I,{class:"text-center text-h6 pt-4"},{default:a(()=>[...e[22]||(e[22]=[u(" 开启环境噪音监测 ",-1)])]),_:1}),o(T,{class:"text-body-2 text-medium-emphasis px-6"},{default:a(()=>[e[27]||(e[27]=r("p",{class:"mb-3"}," 该功能可以实时监测教室环境噪音,帮助营造安静的学习氛围: ",-1)),r("div",Li,[o(x,{icon:"mdi-chart-line",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[23]||(e[23]=r("span",null,"实时显示环境分贝数与噪音等级评估",-1))]),r("div",zi,[o(x,{icon:"mdi-clock-check-outline",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[24]||(e[24]=r("span",null,"在晚自习时段自动记录并生成统计报告",-1))]),r("div",Fi,[o(x,{icon:"mdi-shield-check-outline",size:"18",color:"primary",class:"mr-2 mt-1 flex-shrink-0"}),e[25]||(e[25]=r("span",null,"音频数据仅在本地处理,不会上传或存储录音",-1))]),o(le,{type:"info",variant:"tonal",density:"compact",class:"mb-2"},{default:a(()=>[...e[26]||(e[26]=[u(" 需要授予麦克风权限才能使用此功能。浏览器将弹出权限请求,请点击「允许」。 ",-1)])]),_:1})]),_:1}),o(F),o(T,{class:"px-6 py-3"},{default:a(()=>[o(ee,{density:"compact",class:"pa-0"},{default:a(()=>[o(X,{class:"px-0"},{prepend:a(()=>[o(x,{icon:"mdi-microphone",class:"mr-3"})]),append:a(()=>[o(be,{"model-value":s.noiseEnabled,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.onPermissionDialogToggle},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[28]||(e[28]=[u("启用噪音监测",-1)])]),_:1}),o(ae,{class:"text-caption"},{default:a(()=>[...e[29]||(e[29]=[u(" 关闭后将不再提醒 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),o(j,{class:"px-6 pb-5"},{default:a(()=>[o(b,{variant:"text",onClick:n.dismissMicPermission},{default:a(()=>[...e[30]||(e[30]=[u(" 暂不开启 ",-1)])]),_:1},8,["onClick"]),o(E),o(b,{color:"primary",variant:"elevated","prepend-icon":"mdi-microphone",disabled:!s.noiseEnabled,onClick:n.grantMicPermission},{default:a(()=>[...e[31]||(e[31]=[u(" 授权并开始 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(B,{modelValue:s.showFullscreen,"onUpdate:modelValue":e[14]||(e[14]=h=>s.showFullscreen=h),fullscreen:"",scrim:!1,persistent:"",transition:"dialog-bottom-transition"},{default:a(()=>[o(_,{class:"fullscreen-time-card d-flex flex-column",onMousemove:n.showToolbar,onTouchstart:n.showToolbar},{default:a(()=>[o(lt,{name:"toolbar-fade"},{default:a(()=>[dt(r("div",Bi,[o(Oe,{modelValue:s.fullscreenMode,"onUpdate:modelValue":e[4]||(e[4]=h=>s.fullscreenMode=h),density:"comfortable",color:"primary","align-tabs":"center",class:"fullscreen-tabs"},{default:a(()=>[o(Q,{value:"clock"},{default:a(()=>[o(x,{start:"",icon:"mdi-clock-outline"}),e[32]||(e[32]=u(" 时钟 ",-1))]),_:1}),o(Q,{value:"countdown"},{default:a(()=>[o(x,{start:"",icon:"mdi-timer-sand"}),e[33]||(e[33]=u(" 倒计时 ",-1))]),_:1}),o(Q,{value:"stopwatch"},{default:a(()=>[o(x,{start:"",icon:"mdi-timer-outline"}),e[34]||(e[34]=u(" 秒表 ",-1))]),_:1})]),_:1},8,["modelValue"])],512),[[ct,s.toolbarVisible]])]),_:1}),r("div",Oi,[o(Ue,{modelValue:s.fullscreenMode,"onUpdate:modelValue":e[11]||(e[11]=h=>s.fullscreenMode=h),class:"fullscreen-tabs-window"},{default:a(()=>[o($,{value:"clock"},{default:a(()=>[r("div",Ui,[r("div",ji,[u(m(n.timeString),1),r("span",Hi,m(n.secondsString),1),s.use12hClock?(c(),f("span",Wi,m(n.amPmString),1)):w("",!0)]),r("div",Gi,m(n.dateString)+" "+m(n.weekdayString)+" "+m(n.periodOfDay),1),r("div",Ki,[r("div",qi," 今日已过 "+m(n.dayProgressPercent)+"% ",1),o(re,{"model-value":n.dayProgressPercent,color:"primary",height:"6",rounded:"",style:{"max-width":"400px",width:"80vw"}},null,8,["model-value"])]),e[35]||(e[35]=r("div",{class:"fullscreen-extra mt-8 text-medium-emphasis d-flex ga-8"},null,-1))])]),_:1}),o($,{value:"countdown"},{default:a(()=>[r("div",Yi,[!s.countdownRunning&&s.countdownRemaining<=0?(c(),f(k,{key:0},[r("div",Ji,[r("div",Xi,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[5]||(e[5]=h=>s.countdownHours=Math.min(s.countdownHours+1,99))}),r("div",Zi,m(String(s.countdownHours).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[6]||(e[6]=h=>s.countdownHours=Math.max(s.countdownHours-1,0))}),e[36]||(e[36]=r("div",{class:"text-caption text-medium-emphasis"}," 时 ",-1))]),e[39]||(e[39]=r("div",{class:"countdown-sep"}," : ",-1)),r("div",Qi,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[7]||(e[7]=h=>s.countdownMinutes=Math.min(s.countdownMinutes+1,59))}),r("div",$i,m(String(s.countdownMinutes).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[8]||(e[8]=h=>s.countdownMinutes=Math.max(s.countdownMinutes-1,0))}),e[37]||(e[37]=r("div",{class:"text-caption text-medium-emphasis"}," 分 ",-1))]),e[40]||(e[40]=r("div",{class:"countdown-sep"}," : ",-1)),r("div",en,[o(b,{icon:"mdi-chevron-up",variant:"text",size:"small",onClick:e[9]||(e[9]=h=>s.countdownSeconds=Math.min(s.countdownSeconds+1,59))}),r("div",tn,m(String(s.countdownSeconds).padStart(2,"0")),1),o(b,{icon:"mdi-chevron-down",variant:"text",size:"small",onClick:e[10]||(e[10]=h=>s.countdownSeconds=Math.max(s.countdownSeconds-1,0))}),e[38]||(e[38]=r("div",{class:"text-caption text-medium-emphasis"}," 秒 ",-1))])]),r("div",sn,[(c(!0),f(k,null,M(s.countdownPresets,h=>(c(),v(b,{key:h.label,variant:"tonal",rounded:"xl",onClick:p=>n.applyCountdownPreset(h)},{default:a(()=>[u(m(h.label),1)]),_:2},1032,["onClick"]))),128))]),r("div",nn,[o(b,{color:"primary",size:"x-large",rounded:"xl",disabled:n.countdownTotalSetSeconds<=0,"prepend-icon":"mdi-play",onClick:n.startCountdown},{default:a(()=>[...e[41]||(e[41]=[u(" 开始 ",-1)])]),_:1},8,["disabled","onClick"])])],64)):(c(),f(k,{key:1},[r("div",{class:O(["fullscreen-time-display",{"countdown-ended":s.countdownRemaining<=0&&!s.countdownRunning}])},m(n.countdownDisplay),3),r("div",on,m(s.countdownRunning?"倒计时进行中":s.countdownRemaining<=0?"时间到!":"已暂停"),1),o(re,{"model-value":n.countdownProgressPercent,color:s.countdownRemaining<=0?"error":"primary",class:"mt-8",height:"6",rounded:"",style:{"max-width":"400px",width:"80vw"}},null,8,["model-value","color"]),r("div",an,[s.countdownRemaining>0?(c(),v(b,{key:0,icon:s.countdownRunning?"mdi-pause":"mdi-play",color:s.countdownRunning?"warning":"primary",size:"x-large",variant:"tonal",onClick:n.toggleCountdown},null,8,["icon","color","onClick"])):w("",!0),o(b,{icon:"mdi-stop",color:"error",size:"x-large",variant:"tonal",onClick:n.resetCountdown},null,8,["onClick"])])],64))])]),_:1}),o($,{value:"stopwatch"},{default:a(()=>[r("div",rn,[r("div",ln,m(n.stopwatchDisplay),1),r("div",dn,m(s.stopwatchRunning?"计时中":s.stopwatchElapsed>0?"已暂停":"秒表"),1),r("div",cn,[o(b,{icon:s.stopwatchRunning?"mdi-pause":"mdi-play",color:s.stopwatchRunning?"warning":"primary",size:"x-large",variant:"tonal",onClick:n.toggleStopwatch},null,8,["icon","color","onClick"]),s.stopwatchRunning?(c(),v(b,{key:0,icon:"mdi-flag",color:"info",size:"x-large",variant:"tonal",onClick:n.addLap},null,8,["onClick"])):w("",!0),!s.stopwatchRunning&&s.stopwatchElapsed>0?(c(),v(b,{key:1,icon:"mdi-stop",color:"error",size:"x-large",variant:"tonal",onClick:n.resetStopwatch},null,8,["onClick"])):w("",!0)]),o(it,null,{default:a(()=>[s.laps.length>0?(c(),f("div",un,[o(ft,{density:"compact",class:"stopwatch-laps-table"},{default:a(()=>[e[42]||(e[42]=r("thead",null,[r("tr",null,[r("th",null," # "),r("th",null," 计次 "),r("th",null," 总计 ")])],-1)),r("tbody",null,[(c(!0),f(k,null,M(s.laps,(h,p)=>(c(),f("tr",{key:p},[r("td",null,m(s.laps.length-p),1),r("td",null,m(n.formatMs(h.split)),1),r("td",null,m(n.formatMs(h.total)),1)]))),128))])]),_:1})])):w("",!0)]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),r("div",hn,[o(b,{icon:"mdi-cog",variant:"text",size:"large",onClick:e[12]||(e[12]=Re(h=>s.showSettings=!0,["stop"]))}),o(b,{icon:"mdi-close",variant:"text",size:"large",class:"ml-2",onClick:e[13]||(e[13]=h=>s.showFullscreen=!1)})])]),_:1},8,["onMousemove","onTouchstart"])]),_:1},8,["modelValue"]),o(B,{modelValue:s.countdownEndedDialog,"onUpdate:modelValue":e[15]||(e[15]=h=>s.countdownEndedDialog=h),"max-width":"480",persistent:""},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[o(I,{class:"d-flex align-center justify-center pt-6"},{default:a(()=>[o(x,{color:"error",size:"32",class:"mr-2",icon:"mdi-alarm"}),e[43]||(e[43]=u(" 时间到! ",-1))]),_:1}),o(T,{class:"text-center pb-2"},{default:a(()=>[r("div",mn,m(n.formatCountdownTotal(s.countdownTotal)),1),e[44]||(e[44]=r("div",{class:"text-body-1 text-medium-emphasis"}," 设定的倒计时已结束 ",-1)),s.overtimeElapsed>0?(c(),f("div",fn,[o(L,{color:"error",variant:"tonal",size:"large","prepend-icon":"mdi-clock-alert-outline"},{default:a(()=>[u(" 已超时 "+m(n.overtimeDisplay),1)]),_:1})])):w("",!0)]),_:1}),o(j,{class:"justify-center pb-6"},{default:a(()=>[o(b,{color:"primary",variant:"tonal",size:"large",rounded:"xl","prepend-icon":"mdi-check",onClick:n.dismissCountdownDialog},{default:a(()=>[...e[45]||(e[45]=[u(" 知道了 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:s.showSettings,"onUpdate:modelValue":e[17]||(e[17]=h=>s.showSettings=h),"max-width":"420",scrim:!0},{default:a(()=>[o(_,{rounded:"xl"},{default:a(()=>[o(I,{class:"d-flex align-center"},{default:a(()=>[o(x,{class:"mr-2",icon:"mdi-cog"}),e[46]||(e[46]=u(" 时间卡片设置 ",-1))]),_:1}),o(T,null,{default:a(()=>[o(ee,null,{default:a(()=>[o(X,null,{prepend:a(()=>[o(x,{class:"mr-3",icon:"mdi-clock-outline"})]),append:a(()=>[o(be,{"model-value":s.timeCardEnabled,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.setTimeCardEnabled},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[47]||(e[47]=[u("显示时间卡片",-1)])]),_:1}),o(ae,null,{default:a(()=>[...e[48]||(e[48]=[u("在首页显示时间卡片,刷新后生效。",-1)])]),_:1})]),_:1}),o(X,null,{prepend:a(()=>[o(x,{class:"mr-3",icon:"mdi-clock-time-six-outline"})]),append:a(()=>[o(be,{"model-value":s.use12hClock,"hide-details":"",density:"comfortable","onUpdate:modelValue":n.setUse12hClock},null,8,["model-value","onUpdate:modelValue"])]),default:a(()=>[o(oe,null,{default:a(()=>[...e[49]||(e[49]=[u("12 小时制",-1)])]),_:1}),o(ae,null,{default:a(()=>[...e[50]||(e[50]=[u("以 12 小时制(AM/PM)显示时间。",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{variant:"text",onClick:e[16]||(e[16]=h=>s.showSettings=!1)},{default:a(()=>[...e[51]||(e[51]=[u(" 完成 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}const Je=H(Ii,[["render",gn],["__scopeId","data-v-d5fb9d74"]]),pn={name:"HomeworkGrid",components:{HitokotoCard:Ge,TimeCard:Je,ConciseExamCard:We},props:{sortedItems:{type:Array,required:!0},unusedSubjects:{type:Array,required:!0},emptySubjectDisplay:{type:String,default:"button"},isMobile:{type:Boolean,default:!1},isEditingDisabled:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})},highlightedCards:{type:Object,default:()=>({})}},emits:["open-dialog","open-attendance","disabled-click"],data(){return{isReadOnlyToken:!1}},computed:{settings(){return settings}},async mounted(){this.resizeObserver=new ResizeObserver(()=>{this.resizeAllGridItems()}),this.$refs.gridContainer&&this.resizeObserver.observe(this.$refs.gridContainer),this.$nextTick(()=>{this.resizeAllGridItems(),this.$refs.items&&this.$refs.items.forEach(t=>{t.firstElementChild&&this.resizeObserver.observe(t.firstElementChild)})}),await this.checkReadOnlyStatus()},updated(){this.$nextTick(()=>{this.resizeAllGridItems(),this.$refs.items&&this.$refs.items.forEach(t=>{t.firstElementChild&&this.resizeObserver.observe(t.firstElementChild)})})},beforeUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()},methods:{getSetting:D,async checkReadOnlyStatus(){try{let t=null;if(this.$parent&&this.$parent.$refs&&this.$parent.$refs.studentNameManager?t=this.$parent.$refs.studentNameManager:this.$root&&this.$root.$refs&&this.$root.$refs.studentNameManager&&(t=this.$root.$refs.studentNameManager),t&&typeof t.isReadOnly<"u")this.isReadOnlyToken=t.isReadOnly;else{const{getSetting:e}=await P(async()=>{const{getSetting:l}=await import("./index-DGIAsv4W.js").then(s=>s.aI);return{getSetting:l}},__vite__mapDeps([0,1,2,3]),import.meta.url),i=e("server.kvToken");if(i){const{default:l}=await P(async()=>{const{default:n}=await import("./dataProvider-GWPC-0Vt.js").then(d=>d.c);return{default:n}},__vite__mapDeps([4,5,0,1,2,3,6]),import.meta.url),s=e("server.domain");if(s)try{const n=await l.get(`${s}/kv/_token`,{headers:{Authorization:`Bearer ${i}`}});n.data&&typeof n.data.isReadOnly<"u"&&(this.isReadOnlyToken=n.data.isReadOnly)}catch(n){console.error("获取Token信息失败:",n)}}}}catch(t){console.error("检查只读状态失败:",t)}},resizeGridItem(t){const e=this.$refs.gridContainer;if(!e)return;const i=parseInt(window.getComputedStyle(e).getPropertyValue("grid-auto-rows")),l=parseInt(window.getComputedStyle(e).getPropertyValue("gap")),s=t.firstElementChild;if(!s)return;const n=s.getBoundingClientRect().height,d=Math.ceil((n+l)/(i+l));t.style.gridRowEnd=`span ${d}`},resizeAllGridItems(){const t=this.$refs.items;t&&t.forEach(e=>this.resizeGridItem(e))},handleCardClick(t,e){if(this.isEditingDisabled){this.$emit("disabled-click");return}t==="attendance"?this.$emit("open-attendance"):t==="dialog"&&this.$emit("open-dialog",e)},splitPoint(t){return t.split(` +`).filter(e=>e.trim())},handleMouseMove(t){const e=t.currentTarget,i=e.getBoundingClientRect(),l=(t.clientX-i.left)/i.width*100,s=(t.clientY-i.top)/i.height*100;e.style.setProperty("--x",`${l}%`),e.style.setProperty("--y",`${s}%`)},handleTouchMove(t){if(t.touches.length===1){const e=t.touches[0],i=t.currentTarget,l=i.getBoundingClientRect(),s=(e.clientX-l.left)/l.width*100,n=(e.clientY-l.top)/l.height*100;i.style.setProperty("--x",`${s}%`),i.style.setProperty("--y",`${n}%`)}}}},yn={ref:"gridContainer",class:"grid-masonry"},bn=["data-key"],vn={key:0,style:{height:"100%"}},wn={key:1,style:{height:"100%"}},Sn={key:2,style:{height:"100%"}},Dn={class:"d-flex justify-space-between align-center mb-2"},xn={class:"text-h6"},kn={key:0,class:"mb-2"},Cn={class:"text-error text-caption mb-1"},Tn={class:"d-flex flex-wrap",style:{gap:"4px"}},_n={key:1,class:"mb-2"},Mn={class:"text-warning text-caption mb-1"},En={class:"d-flex flex-wrap",style:{gap:"4px"}},Rn={key:2,class:"mb-2"},In={class:"text-grey text-caption mb-1"},Vn={class:"d-flex flex-wrap",style:{gap:"4px"}},Nn={key:3,class:"text-success text-center mt-2"},Pn={class:"empty-subjects mt-4"},An={key:0,class:"d-flex flex-wrap justify-center"},Ln={key:2,class:"empty-subjects-grid"};function zn(t,e,i,l,s,n){const d=Je,h=Ge,p=We;return c(),f(k,null,[r("div",yn,[o(Ie,{name:"grid"},{default:a(()=>[(c(!0),f(k,null,M(i.sortedItems,g=>(c(),f("div",{key:g.key,ref_for:!0,ref:"items","data-key":g.key,style:N({order:g.order}),class:"grid-item"},[g.type==="time"?(c(),f("div",vn,[o(d)])):g.type==="hitokoto"?(c(),f("div",wn,[o(h)])):g.type==="exam"?(c(),f("div",Sn,[o(p,{"exam-id":g.data.examId,"content-style":i.contentStyle,onClick:S=>t.$emit("open-exam-detail",g.data.examId)},null,8,["exam-id","content-style","onClick"])])):g.type==="attendance"?(c(),v(_,{key:3,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",onClick:e[0]||(e[0]=S=>n.handleCardClick("attendance",null)),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,{class:"d-flex align-center"},{default:a(()=>[o(x,{class:"mr-2",color:"primary",icon:"mdi-account-group"}),e[1]||(e[1]=u(" 出勤统计 ",-1))]),_:1}),o(T,null,{default:a(()=>[r("div",Dn,[e[2]||(e[2]=r("span",null,"应到/实到",-1)),r("span",xn,m(g.data.total-g.data.exclude.length)+"/"+m(g.data.total-g.data.absent.length-!n.getSetting("display.lateStudentsArePresent")*g.data.late.length-g.data.exclude.length),1)]),o(F,{class:"mb-2"}),g.data.absent.length>0?(c(),f("div",kn,[r("div",Cn," 请假 ("+m(g.data.absent.length)+") ",1),r("div",Tn,[(c(!0),f(k,null,M(g.data.absent,S=>(c(),v(L,{key:S,color:"error",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.late.length>0?(c(),f("div",_n,[r("div",Mn," 迟到 ("+m(g.data.late.length)+") ",1),r("div",En,[(c(!0),f(k,null,M(g.data.late,S=>(c(),v(L,{key:S,color:"warning",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.exclude.length>0?(c(),f("div",Rn,[r("div",In," 不参与 ("+m(g.data.exclude.length)+") ",1),r("div",Vn,[(c(!0),f(k,null,M(g.data.exclude,S=>(c(),v(L,{key:S,color:"grey",size:"x-small",variant:"flat"},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))])])):w("",!0),g.data.absent.length===0&&g.data.late.length===0&&g.data.exclude.length===0?(c(),f("div",Nn," 全勤 ")):w("",!0)]),_:2},1024)]),_:2},1032,["class","onMousemove","onTouchmove"])):g.type==="custom"?(c(),v(_,{key:4,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",onClick:S=>n.handleCardClick("dialog",g.key),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,{class:"text-primary"},{default:a(()=>[o(x,{class:"mr-2",icon:"mdi-card-text-outline",size:"small"}),u(" "+m(g.name),1)]),_:2},1024),o(T,{style:N(i.contentStyle)},{default:a(()=>[u(m(g.content),1)]),_:2},1032,["style"])]),_:2},1032,["class","onClick","onMousemove","onTouchmove"])):(c(),v(_,{key:5,class:O([{"glow-highlight":i.highlightedCards[g.key],"cursor-not-allowed":i.isEditingDisabled,"cursor-pointer":!i.isEditingDisabled},"glow-track"]),border:"",height:"100%",rounded:"xl",onClick:S=>n.handleCardClick("dialog",g.key),onMousemove:n.handleMouseMove,onTouchmove:n.handleTouchMove},{default:a(()=>[o(I,null,{default:a(()=>[u(m(g.name),1)]),_:2},1024),o(T,{style:N(i.contentStyle)},{default:a(()=>[o(ee,null,{default:a(()=>[(c(!0),f(k,null,M(n.splitPoint(g.content),S=>(c(),v(X,{key:S},{default:a(()=>[u(m(S),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["style"])]),_:2},1032,["class","onClick","onMousemove","onTouchmove"]))],12,bn))),128))]),_:1})],512),r("div",Pn,[i.isMobile?(c(),f("div",An,[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(L,{key:g.name,class:"ma-1",color:"primary",variant:"tonal",onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(x,{start:"",size:"small"},{default:a(()=>[u(m(s.isReadOnlyToken?"mdi-cancel":"mdi-plus"),1)]),_:1}),u(" "+m(g.name),1)]),_:2},1032,["onClick"]))),128))])):i.emptySubjectDisplay==="button"?(c(),v(Fe,{key:1,divided:"",variant:"tonal"},{default:a(()=>[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(b,{key:g.name,onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(x,{start:""},{default:a(()=>[u(m(s.isReadOnlyToken?"mdi-cancel":"mdi-plus"),1)]),_:1}),u(" "+m(g.name),1)]),_:2},1032,["onClick"]))),128))]),_:1})):(c(),f("div",Ln,[o(Ie,{name:"v-list"},{default:a(()=>[(c(!0),f(k,null,M(i.unusedSubjects,g=>(c(),v(_,{key:g.name,border:"",rounded:"xl",class:"empty-subject-card",onClick:S=>n.handleCardClick("dialog",g.name)},{default:a(()=>[o(I,{class:"text-subtitle-1"},{default:a(()=>[u(m(g.name),1)]),_:2},1024),o(T,{class:"text-center"},{default:a(()=>[s.isReadOnlyToken?(c(),f(k,{key:0},[o(x,{color:"grey",size:"small"},{default:a(()=>[...e[3]||(e[3]=[u(" mdi-cancel ",-1)])]),_:1}),e[4]||(e[4]=r("div",{class:"text-caption text-grey"}," 当日无作业 ",-1))],64)):(c(),f(k,{key:1},[o(x,{color:"grey",size:"small"},{default:a(()=>[...e[5]||(e[5]=[u(" mdi-plus ",-1)])]),_:1}),e[6]||(e[6]=r("div",{class:"text-caption text-grey"}," 点击添加作业 ",-1))],64))]),_:1})]),_:2},1032,["onClick"]))),128))]),_:1})]))])],64)}const Fn=H(pn,[["render",zn],["__scopeId","data-v-65991b74"]]),Bn={name:"HomeActions",props:{synced:Boolean,loadingUpload:Boolean,showRandomPickerButton:Boolean,showExamScheduleButton:Boolean,showListCardButton:Boolean,showFullscreenButton:Boolean,isFullscreen:Boolean,showAntiScreenBurnCard:Boolean,showTestCardButton:Boolean},emits:["upload","show-sync-message","open-random-picker","toggle-fullscreen","add-test-card"]},On={class:"d-flex flex-wrap align-center mt-4"};function Un(t,e,i,l,s,n){return c(),f(k,null,[r("div",On,[i.synced?(c(),v(b,{key:1,color:"success",size:"large",rounded:"xl",onClick:e[1]||(e[1]=d=>t.$emit("show-sync-message"))},{default:a(()=>[...e[9]||(e[9]=[u(" 同步完成 ",-1)])]),_:1})):(c(),v(b,{key:0,loading:i.loadingUpload,class:"ml-2",color:"error",size:"large",rounded:"xl",onClick:e[0]||(e[0]=d=>t.$emit("upload"))},{default:a(()=>[...e[8]||(e[8]=[u(" 上传 ",-1)])]),_:1},8,["loading"])),i.showRandomPickerButton?(c(),v(b,{key:2,"append-icon":"mdi-dice-multiple",class:"ml-2",color:"amber","prepend-icon":"mdi-account-question",size:"large",onClick:e[2]||(e[2]=d=>t.$emit("open-random-picker"))},{default:a(()=>[...e[10]||(e[10]=[u(" 随机点名 ",-1)])]),_:1})):w("",!0),i.showExamScheduleButton?(c(),v(Fe,{key:3,class:"ml-2",color:"green",variant:"elevated",divided:""},{default:a(()=>[o(b,{"prepend-icon":"mdi-calendar-check",size:"large",onClick:e[3]||(e[3]=d=>t.$router.push("/examschedule"))},{default:a(()=>[...e[11]||(e[11]=[u(" 考试看板 ",-1)])]),_:1}),o(b,{icon:"mdi-plus",size:"large",onClick:e[4]||(e[4]=d=>t.$emit("add-exam-card"))})]),_:1})):w("",!0),i.showListCardButton?(c(),v(b,{key:4,class:"ml-2",color:"primary-darken-1","prepend-icon":"mdi-list-box",size:"large",onClick:e[5]||(e[5]=d=>t.$router.push("/list"))},{default:a(()=>[...e[12]||(e[12]=[u(" 列表 ",-1)])]),_:1})):w("",!0),i.showFullscreenButton?(c(),v(b,{key:5,color:i.isFullscreen?"blue-grey":"blue","prepend-icon":i.isFullscreen?"mdi-fullscreen-exit":"mdi-fullscreen",class:"ml-2",size:"large",onClick:e[6]||(e[6]=d=>t.$emit("toggle-fullscreen"))},{default:a(()=>[u(m(i.isFullscreen?"退出全屏":"全屏显示"),1)]),_:1},8,["color","prepend-icon"])):w("",!0),i.showTestCardButton?(c(),v(b,{key:6,class:"ml-2",color:"purple","prepend-icon":"mdi-test-tube",size:"large",onClick:e[7]||(e[7]=d=>t.$emit("add-test-card"))},{default:a(()=>[...e[13]||(e[13]=[u(" 添加测试卡片 ",-1)])]),_:1})):w("",!0)]),i.showAntiScreenBurnCard?(c(),v(_,{key:0,border:"",class:"mt-4 anti-burn-card",color:"primary",variant:"tonal"},{default:a(()=>[o(I,{class:"text-subtitle-1"},{default:a(()=>[o(x,{icon:"mdi-shield-check",size:"small",start:""}),e[14]||(e[14]=u(" 屏幕保护技术已启用 ",-1))]),_:1}),o(T,{class:"text-body-2"},{default:a(()=>[...e[15]||(e[15]=[r("p",null," 为防止OLED/LCD屏幕烧屏,界面元素会定期微调位置。 ",-1),r("p",{class:"text-caption text-grey"}," 此功能不会影响正常使用,仅在长时间静止显示时生效。 ",-1),r("p",{class:"text-caption text-grey"}," 建议在放学后关闭显示器以节约能源。 ",-1)])]),_:1})]),_:1})):w("",!0)],64)}const jn=H(Bn,[["render",Un]]),Hn={name:"FloatingICP"},Wn={"aria-label":"xICP备x号",class:"floating-icp-link",href:"https://beian.miit.gov.cn/",rel:"noopener noreferrer",target:"_blank",style:{display:"none"}};function Gn(t,e,i,l,s,n){return c(),f("a",Wn," xICP备x号 ")}const Kn=H(Hn,[["render",Gn],["__scopeId","data-v-fa73670f"]]),qn={class:"skeleton-grid"},Yn={__name:"HomeSkeleton",setup(t){const{mobile:e}=De(),i=ut(()=>e.value?3:6);return(l,s)=>(c(),v(je,{class:"main-window",fluid:""},{default:a(()=>[r("div",qn,[(c(!0),f(k,null,M(i.value,n=>(c(),f("div",{key:n,class:"skeleton-card"},[...s[0]||(s[0]=[r("div",{class:"skeleton-heading skeleton-pulse"},null,-1),r("div",{class:"skeleton-line skeleton-pulse"},null,-1),r("div",{class:"skeleton-line skeleton-line--short skeleton-pulse"},null,-1)])]))),128))]),s[1]||(s[1]=r("div",{class:"d-flex justify-center mt-6 ga-3"},[r("div",{class:"skeleton-btn skeleton-pulse"}),r("div",{class:"skeleton-btn skeleton-pulse"})],-1))]),_:1}))}},Jn=H(Yn,[["__scopeId","data-v-c545dbe3"]]);function Se(t,e){let i=null;return function(...l){i&&clearTimeout(i),i=setTimeout(()=>{t.apply(this,l)},e)}}function Xn(t,e){let i=null,l=0;return function(...s){const n=Date.now();n-l{l=n,t.apply(this,s)},e)):(l=n,t.apply(this,s))}}const Zn=z({loader:()=>P(()=>import("./MessageLog-CZsTVP4i.js").then(t=>t.M),__vite__mapDeps([7,0,1,2,3,8,9,10]),import.meta.url),loadingComponent:he,delay:200}),Qn=z({loader:()=>P(()=>import("./RandomPicker-CsXS_sbB.js"),__vite__mapDeps([11,0,1,2,3,12,13,14,15,16,17,18]),import.meta.url),delay:0}),$n=z({loader:()=>P(()=>import("./FloatingToolbar-BZD3ZR8B.js"),__vite__mapDeps([19,0,1,2,3,20,21,22,14,15,23,24,25,26]),import.meta.url),delay:200}),eo=z({loader:()=>P(()=>import("./ChatWidget-BXhjl6gS.js").then(t=>t.C),__vite__mapDeps([27,28,29,0,1,2,3,6,30,16,17,31,14,15,32,33,34,35,36,12,13,37,38]),import.meta.url),delay:0}),to=z({loader:()=>P(()=>import("./HomeworkEditDialog-BpaBTmY_.js"),__vite__mapDeps([39,4,5,0,1,2,3,6,36,12,13,37,16,17,40,41,42]),import.meta.url),delay:0}),so=z({loader:()=>P(()=>import("./InitServiceChooser-Cm36vuZZ.js"),__vite__mapDeps([43,0,1,2,3,4,5,6,12,13,40,41,36,37,16,17,44,45,32,33,46]),import.meta.url),loadingComponent:he,delay:200}),io=z({loader:()=>P(()=>import("./StudentNameManager-DB-P5C67.js"),__vite__mapDeps([47,0,1,2,3,4,5,6,48,12,13,49,20,21,50,51,52,16,17,53,54,55,56,40,41,57]),import.meta.url),delay:200}),no=z({loader:()=>P(()=>import("./UrgentTestDialog-BqTcJt8c.js"),__vite__mapDeps([58,27,28,29,0,1,2,3,6,30,16,17,31,14,15,32,33,34,35,36,12,13,37,38,4,5,8,9,59,60,61,51,52,62,50,63,64]),import.meta.url),delay:0}),oo=z({loader:()=>P(()=>import("./AttendanceSidebar-DmtvE998.js"),__vite__mapDeps([65,0,1,2,3,32,33,57]),import.meta.url),loadingComponent:he,delay:200}),ao=z({loader:()=>P(()=>import("./AttendanceManagementDialog-BpjEre5P.js"),__vite__mapDeps([66,0,1,2,3,16,17,32,33,12,13,67]),import.meta.url),delay:0}),ro=z({loader:()=>P(()=>import("./PwaInstallCard-DM1cBO1c.js"),__vite__mapDeps([68,2,0,1,3,16,17]),import.meta.url),delay:200}),lo=z({loader:()=>P(()=>import("./ExamScheduleCard-DhbbmO7J.js"),__vite__mapDeps([69,2,0,1,3,40,41,4,5,6,16,17,70,71,72,73,14,15,12,13,30,51,52,59,60,28,29,31,8,9,32,33,74]),import.meta.url),loadingComponent:he,delay:200}),co=z({loader:()=>P(()=>import("./ExamConfigEditor-BVwEXehR.js"),__vite__mapDeps([75,4,5,0,1,2,3,6,40,41,76,77,14,15,16,17,32,33,12,13,36,37,51,52,48,49,20,21,50,53,54,22,23,24,25,78,79,80]),import.meta.url),delay:0}),uo={name:"Classworks 作业板",components:{MessageLog:Zn,RandomPicker:Qn,FloatingToolbar:$n,FloatingICP:Kn,HomeworkEditDialog:to,InitServiceChooser:so,ChatWidget:eo,StudentNameManager:io,UrgentTestDialog:no,AttendanceSidebar:oo,AttendanceManagementDialog:ao,HomeworkGrid:Fn,HomeActions:jn,PwaInstallCard:ro,ExamScheduleCard:lo,ExamConfigEditor:co,HomeSkeleton:Jn},setup(){const{mobile:t}=De(),e=xe();return{mobile:t,examStore:e}},data(){const t=[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8},{name:"其他",order:9}];return{showAddExamDialog:!1,showExamDetailDialog:!1,selectedExamId:null,upcomingExams:[],dataKey:"",provider:"",useDisplay:De,state:{classNumber:"",namespaceInfo:null,deviceName:"",studentList:[],boardData:{homework:{},attendance:{absent:[],late:[],exclude:[]}},dialogVisible:!1,dialogTitle:"",textarea:"",dateString:"",synced:!1,attendDialogVisible:!1,contentStyle:{"font-size":`${D("font.size")}px`},uploadLoading:!1,downloadLoading:!1,snackbar:!1,snackbarText:"",fontSize:D("font.size"),datePickerDialog:!1,selectedDate:new Date().toISOString().split("T")[0].replace(/-/g,""),selectedDateObj:new Date,refreshInterval:null,showNoDataMessage:!1,noDataMessage:"",isToday:!1,attendanceDialog:!1,availableSubjects:t,isFullscreen:!1},loading:{download:!1,upload:!1,students:!1,copyToToday:!1},dataReady:!1,debouncedUpload:null,debouncedAttendanceSave:null,throttledReflow:null,sortedItemsCache:{key:"",value:[]},confirmDialog:{show:!1,resolve:null,reject:null},urlConfigDialog:{show:!1,config:null,changes:[],validSettings:{},confirmHandler:null,cancelHandler:null,icons:{}},settingsTick:0,isChatOpen:!1,highlightedCards:{},tokenDisplayInfo:{show:!1,readonly:!1,text:"",color:"primary",variant:"tonal",icon:"mdi-account",disabled:!1},realtimeInfo:{show:!1,time:"",key:""},$offKvChanged:null,$offConnect:null,debouncedRealtimeRefresh:null,preconfigData:{namespace:null,authCode:null,autoOpen:!1,autoExecute:!1},urgentTestDialog:!1,tokenInfo:null,persistentNotifications:[],notificationDetailDialog:!1,currentNotification:null}},computed:{isMobile(){return D("display.forceDesktopMode")?!1:this.mobile},titleText(){var p,g,S;const t=D("server.provider"),e=t==="kv-server"||t==="classworkscloud";let i;e&&this.state.namespaceInfo?i=((p=this.state.namespaceInfo)==null?void 0:p.name)||((S=(g=this.state.namespaceInfo)==null?void 0:g.device)==null?void 0:S.name)||this.state.classNumber||"高三八班":i=this.state.classNumber||"高三八班";const l=this.getToday(),s=new Date(l);s.setDate(s.getDate()-1);const n=this.state.dateString,d=this.formatDate(l),h=this.formatDate(s);return n===d?i+" - 今天的作业":n===h?i+" - 昨天的作业":`${i} - ${n}的作业`},sortedItems(){const t=[];this.isMobile&&t.push({key:"attendance-card",name:"出勤统计",type:"attendance",data:{total:this.state.studentList.length,absent:this.state.boardData.attendance.absent,late:this.state.boardData.attendance.late,exclude:this.state.boardData.attendance.exclude}});for(const e in this.state.boardData.homework)if(e.startsWith("exam-")){const i=this.state.boardData.homework[e];t.push({key:e,name:"考试安排",type:"exam",data:{examId:i.examId},order:-100,rowSpan:200})}for(const e of this.state.availableSubjects){const i=e.name,l=this.state.boardData.homework[i];if(l&&l.content){const n=100+l.content.split(` `).filter(d=>d.trim()).length*24;t.push({key:i,name:i,type:"homework",content:l.content,order:e.order,rowSpan:n})}}D("timeCard.enabled")&&t.push({key:"time-card",name:"时间",type:"time",order:9997,rowSpan:150}),D("hitokoto.enabled")&&t.push({key:"hitokoto-card",name:"一言",type:"hitokoto",order:9998,rowSpan:150});for(const e in this.state.boardData.homework)if(e.startsWith("custom-")){const i=this.state.boardData.homework[e],s=100+i.content.split(` `).filter(n=>n.trim()).length*24;t.push({key:e,name:i.name,type:"custom",content:i.content,order:9999,rowSpan:s})}return t.sort((e,i)=>e.order-i.order),t},unusedSubjects(){const t=Object.keys(this.state.boardData.homework).filter(e=>{var i;return(i=this.state.boardData.homework[e].content)==null?void 0:i.trim()});return this.state.availableSubjects.filter(e=>!t.includes(e.name)).sort((e,i)=>e.order-i.order)},emptySubjects(){return this.emptySubjectDisplay!=="button"?[]:this.unusedSubjects},autoSave(){return D("edit.autoSave")},blockNonTodayAutoSave(){return D("edit.blockNonTodayAutoSave")},isToday(){const t=(()=>{const e=new Date,i=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${i}${l}${s}`})();return this.state.dateString===t},canAutoSave(){return this.autoSave&&(!this.blockNonTodayAutoSave||this.isToday)},needConfirmSave(){return!this.isToday&&this.confirmNonTodaySave},shouldShowBlockedMessage(){return!this.isToday&&this.autoSave&&this.blockNonTodayAutoSave},refreshBeforeEdit(){return D("edit.refreshBeforeEdit")},emptySubjectDisplay(){return D("display.emptySubjectDisplay")},dynamicSort(){return D("display.dynamicSort")},isEditingDisabled(){if(this.state.uploadLoading||this.state.downloadLoading)return!0;const t=this.$refs.studentNameManager;return!!(t!=null&&t.isReadOnly||!this.canEditCurrentDate)},unreadCount(){var t;return((t=this.$refs.messageLog)==null?void 0:t.unreadCount)||0},showRandomPickerButton(){return D("randomPicker.enabled")},showListCardButton(){return D("display.showListCard")},confirmNonTodaySave(){return D("edit.confirmNonTodaySave")},blockPastDataEdit(){return D("edit.blockPastDataEdit")},shouldShowSaveConfirm(){return!this.isToday&&this.confirmNonTodaySave},shouldBlockAutoSave(){return!this.isToday&&this.autoSave&&this.blockNonTodayAutoSave},canEditCurrentDate(){return this.isToday?!0:!this.blockPastDataEdit},isEditingPastData(){return!this.isToday},showFullscreenButton(){return D("display.showFullscreenButton")},showExamScheduleButton(){return D("display.showExamScheduleButton")},showAntiScreenBurnCard(){return D("display.showAntiScreenBurnCard")},showTestCardButton(){return D("developer.enabled")},shouldShowInit(){var s;const t=D("server.provider"),e=t==="kv-server"||t==="classworkscloud",i=D("server.kvToken"),l=((s=this.$route)==null?void 0:s.path)==="/";return this.settingsTick,l&&e&&(!i||i==="")},hasExamCard(){for(const t in this.state.boardData.homework)if(t.startsWith("exam-"))return!0;return!1},shouldShowUrgentTestButton(){const t=D("server.provider");return!(t==="kv-server"||t==="classworkscloud")||!D("server.kvToken")||!this.tokenInfo?!1:this.tokenInfo.deviceType==="teacher"||this.tokenInfo.deviceType==="classroom"},subjectOrder(){return[...this.state.availableSubjects].sort((t,e)=>t.order-e.order).map(t=>t.name)}},watch:{homeworkData:{handler(){this.$nextTick(()=>{this.$refs.waterfall&&this.$refs.waterfall.reflow()})},deep:!0},"$vuetify.display.width":{handler(){this.throttledReflow()},deep:!0},"state.attendanceDialog":{handler(t){this.handleAttendanceDialogClose(t)}}},created(){this.debouncedUpload=Se(this.uploadData,2e3),this.debouncedAttendanceSave=Se(async()=>{this.autoSave&&await this.trySave(!0)},2e3),this.throttledReflow=Xn(()=>{this.$refs.gridContainer&&this.optimizeGridLayout(this.sortedItems)},200)},async mounted(){try{this.updateBackendUrl(),await this.initializeData(),this.dataReady=!0,await this.loadDeviceInfo(),this.setupAutoRefresh(),this.unwatchSettings=Te(()=>{this.updateSettings()}),this.$nextTick(()=>{const t=this.$refs.studentNameManager;t&&(this.studentNameInfo.name=t.currentStudentName||t.currentTeacherName||"",this.studentNameInfo.isStudent=t.isStudentToken,this.studentNameInfo.isTeacher=t.isTeacherToken,this.studentNameInfo.openDialog=()=>t.openDialog(),this.$watch(()=>t.currentStudentName,e=>{this.studentNameInfo.name=e,this.updateTokenDisplayInfo()}),this.$watch(()=>t.currentTeacherName,e=>{t.isTeacherToken&&(this.studentNameInfo.name=e,this.updateTokenDisplayInfo())}),this.$watch(()=>t.isStudentToken,e=>{this.studentNameInfo.isStudent=e,this.updateTokenDisplayInfo()}),this.$watch(()=>t.isTeacherToken,e=>{this.studentNameInfo.isTeacher=e,this.updateTokenDisplayInfo()}))}),document.addEventListener("fullscreenchange",this.fullscreenChangeHandler),document.addEventListener("webkitfullscreenchange",this.fullscreenChangeHandler),document.addEventListener("mozfullscreenchange",this.fullscreenChangeHandler),document.addEventListener("MSFullscreenChange",this.fullscreenChangeHandler),this.checkHashForRandomPicker(),window.addEventListener("hashchange",this.checkHashForRandomPicker),this.setupRealtimeChannel(),Ve.init(),this.$nextTick(()=>{this.updateTokenDisplayInfo()}),await this.loadTokenInfo(),this.loadPersistentNotifications()}catch(t){console.error("初始化失败:",t),this.showError("初始化失败,请刷新页面重试")}},beforeUnmount(){Ve.destroy(),this.unwatchSettings&&this.unwatchSettings(),this.state.refreshInterval&&clearInterval(this.state.refreshInterval),document.removeEventListener("fullscreenchange",this.fullscreenChangeHandler),document.removeEventListener("webkitfullscreenchange",this.fullscreenChangeHandler),document.removeEventListener("mozfullscreenchange",this.fullscreenChangeHandler),document.removeEventListener("MSFullscreenChange",this.fullscreenChangeHandler),window.removeEventListener("hashchange",this.checkHashForRandomPicker);try{this.$offKvChanged&&typeof this.$offKvChanged=="function"&&(this.$offKvChanged(),this.$offKvChanged=null),this.$offDeviceEvent&&typeof this.$offDeviceEvent=="function"&&(this.$offDeviceEvent(),this.$offDeviceEvent=null),this.$offConnect&&typeof this.$offConnect=="function"&&(this.$offConnect(),this.$offConnect=null),St()}catch(t){console.warn("主页面事件清理失败:",t)}},methods:{async loadDeviceInfo(){var t;try{const e=D("server.provider");if(!(e==="kv-server"||e==="classworkscloud"))return;const l=await mt.loadNamespaceInfo();if(l&&l.success===!1)return;this.state.namespaceInfo=l||null,this.state.deviceName=((t=l==null?void 0:l.account)==null?void 0:t.deviceName)||""}catch(e){console.warn("加载设备信息失败:",e)}},async loadTokenInfo(){try{const t=D("server.provider");if(!(t==="kv-server"||t==="classworkscloud"))return;const i=D("server.kvToken");if(!i)return;const l=D("server.domain");if(!l)return;const s=await ht.get(`${l}/kv/_token`,{headers:{Authorization:`Bearer ${i}`}});this.tokenInfo=s.data,console.log("Token info loaded:",this.tokenInfo)}catch(t){console.warn("Failed to load token info:",t),this.tokenInfo=null}},updateTokenDisplayInfo(){const t=this.$refs.studentNameManager;if(!t||!t.hasToken){this.tokenDisplayInfo.show=!1,this.tokenDisplayInfo.readonly=!1;return}const e=t.displayName,i=t.isReadOnly,l=t.isStudentToken,s=t.isTeacherToken;if(this.tokenDisplayInfo.readonly=i,!l&&!s){this.tokenDisplayInfo.show=!1;return}this.tokenDisplayInfo.text=e,this.tokenDisplayInfo.color="primary",this.tokenDisplayInfo.icon=s?"mdi-school":"mdi-account",this.tokenDisplayInfo.disabled=i,this.tokenDisplayInfo.show=!0},handleTokenChipClick(){console.log("Token chip clicked");const t=this.$refs.studentNameManager;console.log("Manager:",t),console.log("Is student token:",t==null?void 0:t.isStudentToken),console.log("Is teacher token:",t==null?void 0:t.isTeacherToken),t&&(t.isStudentToken||t.isTeacherToken)?(console.log("Opening dialog..."),t.openDialog()):console.log("Cannot open dialog - conditions not met")},ensureDate(t){if(t instanceof Date)return t;if(typeof t=="string"){const e=new Date(t);if(!isNaN(e.getTime()))return e}return new Date},formatDate(t){const e=this.ensureDate(t),i=e.getFullYear(),l=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${i}${l}${s}`},formatTime(t){return t?new Date(t).toLocaleString():""},getToday(){return new Date},async initializeData(){this.parsePreconfigData();const t=await this.parseUrlConfig(),i=new URLSearchParams(window.location.search).get("date"),l=this.getToday();let s=l;if(i){if(/^\d{8}$/.test(i)){const n=i.substring(0,4),d=i.substring(4,6),h=i.substring(6,8);s=new Date(`${n}-${d}-${h}`)}else s=new Date(i);isNaN(s.getTime())&&(s=l)}if(this.state.dateString=this.formatDate(s),this.state.selectedDate=this.state.dateString,this.state.selectedDateObj=s,this.state.isToday=this.formatDate(s)===this.formatDate(l),!t){this.provider=D("server.provider");const n=D("server.classNumber");this.state.classNumber=n}await Promise.all([this.downloadData(),this.loadConfig()]),await this.examStore.fetchExamList();for(const n of this.examStore.examList)this.examStore.fetchExam(n.id);this.checkUpcomingExams()},async checkUpcomingExams(){this.upcomingExams=await this.examStore.getUpcomingExams()},loadExamCards(){},saveExamCards(){},addExamCard(t,e=!1,i=!1){const l=`exam-${t}`;!e&&this.state.boardData.homework[l]?delete this.state.boardData.homework[l]:this.state.boardData.homework[l]={type:"exam",examId:t,name:"考试安排",content:""},this.state.synced=!1,i||this.trySave(!0)},openExamDetail(t){this.selectedExamId=t,this.showExamDetailDialog=!0},removeCurrentExamCard(){this.selectedExamId&&(this.addExamCard(this.selectedExamId),this.showExamDetailDialog=!1)},async onExamConfigSaved(){this.selectedExamId&&(delete this.examStore.exams[this.selectedExamId],await this.examStore.fetchExam(this.selectedExamId),this.$message.success("保存成功","考试配置已更新"))},onExamConfigDeleted(){this.removeCurrentExamCard(),this.$message.success("删除成功","考试配置已删除")},isExamCardAdded(t){return!!this.state.boardData.homework[`exam-${t}`]},removeExamCard(t){},addAllUpcomingExams(){let t=0;for(const e of this.upcomingExams)this.isExamCardAdded(e.id)||(this.addExamCard(e.id,!0,!0),t++);t>0?(this.trySave(!0),this.$message.success("添加成功",`已添加 ${t} 个考试安排`)):this.$message.info("提示","所有考试已添加")},async downloadData(t=!1){var e,i,l;if(!this.loading.download)try{this.loading.download=!0;const s=await R.loadData("classworks-data-"+this.state.dateString);if(s.success==!1)if(s.error.code==="NOT_FOUND")this.state.showNoDataMessage=!0,this.state.noDataMessage=s.error.message,(t||!this.state.boardData||!this.state.boardData.homework&&!this.state.boardData.attendance)&&(this.state.boardData={homework:{},attendance:{absent:[],late:[],exclude:[]}});else throw new Error(s.error.message);else this.state.boardData={homework:s.homework||{},attendance:{absent:((e=s.attendance)==null?void 0:e.absent)||[],late:((i=s.attendance)==null?void 0:i.late)||[],exclude:((l=s.attendance)==null?void 0:l.exclude)||[]}},this.state.synced=!0,this.state.showNoDataMessage=!1,s.fromCache?this.$message.warning("离线模式","显示缓存数据,联网后将自动同步"):this.$message.success("下载成功","数据已更新")}catch(s){console.error("数据加载失败:",s),this.$message.error("下载失败",s.message),(t||!this.state.boardData||!this.state.boardData.homework&&!this.state.boardData.attendance)&&(this.state.boardData={homework:{},attendance:{absent:[],late:[],exclude:[]}})}finally{this.loading.download=!1}},async trySave(t=!1){if(t&&!this.canAutoSave)return this.shouldShowBlockedMessage&&this.showMessage("需要手动保存","已禁止自动保存非当天数据","warning"),!1;if(!t&&this.needConfirmSave)try{await this.showConfirmDialog()}catch{return!1}try{return await this.uploadData(),!0}catch(e){return this.$message.error("保存失败",e.message||"请重试"),!1}},async handleClose(){var i;if(!this.currentEditSubject)return;const t=this.state.textarea.trim(),e=((i=this.state.boardData.homework[this.currentEditSubject])==null?void 0:i.content)||"";if(t!==e.trim()){if(!t&&this.currentEditSubject.startsWith("custom-")){delete this.state.boardData.homework[this.currentEditSubject],this.state.synced=!1,this.autoSave&&await this.trySave(!0),this.state.dialogVisible=!1;return}this.state.boardData.homework[this.currentEditSubject].type==="custom"?this.state.boardData.homework[this.currentEditSubject].content=t:this.state.boardData.homework[this.currentEditSubject]={content:t},this.state.synced=!1,this.autoSave&&await this.trySave(!0)}this.state.dialogVisible=!1},async uploadData(){if(!this.loading.upload)try{this.loading.upload=!0;const t=await R.saveData("classworks-data-"+this.state.dateString,this.state.boardData);if(t.success==!1)throw new Error(t.error.message);this.state.synced=!0,t.queuedForSync?this.$message.warning("已保存到本地","网络恢复后将自动同步到服务器"):this.$message.success(t.message||"保存成功")}finally{this.loading.upload=!1}},async loadConfig(){try{try{const t=await R.loadData("classworks-list-main");t.success!=!1&&Array.isArray(t)&&(this.state.studentList=t.map(e=>e.name))}catch(t){console.warn("Failed to load student list from dedicated key, falling back to config",t)}await this.loadSubjects()}catch(t){console.error("加载配置失败:",t),this.$message.error("加载配置失败",t.message)}},async loadSubjects(){try{const t=await R.loadData("classworks-config-subject");t&&Array.isArray(t)&&(this.state.availableSubjects=t)}catch(t){console.warn("Failed to load subject configuration:",t)}},showSyncMessage(){this.$message.success("数据已同步","数据已完成与服务器同步")},async openDialog(t){var e;if(this.isEditingDisabled){const i=this.$refs.studentNameManager;i!=null&&i.isReadOnly?this.$message.warning("无法编辑","当前使用的是只读令牌"):this.canEditCurrentDate?this.$message.warning("无法编辑","数据加载中,请稍候"):this.$message.warning("无法编辑","已禁止编辑过往数据");return}if(t.startsWith("custom-")){this.currentEditSubject=t,this.state.dialogTitle=this.state.boardData.homework[t].name,this.state.textarea=this.state.boardData.homework[t].content,this.state.dialogVisible=!0;return}if(this.refreshBeforeEdit)try{await this.downloadData()}catch(i){console.error("刷新数据失败:",i),this.$message.error("刷新数据失败,可能显示的不是最新数据")}this.currentEditSubject=t,this.state.boardData.homework[t]||(this.state.boardData.homework[t]={content:""}),this.state.dialogTitle=((e=this.state.availableSubjects.find(i=>i.name===t))==null?void 0:e.name)||t,this.state.textarea=this.state.boardData.homework[t].content,this.state.dialogVisible=!0},async handleHomeworkSave(t){this.currentEditSubject&&(this.state.boardData.homework[this.currentEditSubject].type==="custom"?this.state.boardData.homework[this.currentEditSubject].content=t:this.state.boardData.homework[this.currentEditSubject]={content:t},this.state.synced=!1,this.autoSave&&await this.trySave(!0))},setAttendanceArea(){if(this.isEditingDisabled){this.handleDisabledClick();return}this.state.attendanceDialog=!0},handleDisabledClick(){const t=this.$refs.studentNameManager;t!=null&&t.isReadOnly?this.$message.warning("无法编辑","当前使用的是只读令牌"):this.canEditCurrentDate?this.$message.warning("无法编辑","数据加载中,请稍候"):this.$message.warning("无法编辑","已禁止编辑过往数据")},zoom(t){t==="up"&&this.state.fontSize<100?this.state.fontSize+=2:t==="out"&&this.state.fontSize>16&&(this.state.fontSize-=2),this.state.contentStyle={"font-size":`${this.state.fontSize}px`},K("font.size",this.state.fontSize)},updateBackendUrl(){const t=D("server.provider"),e=D("server.classNumber");this.provider=t,this.state.classNumber=e},setupAutoRefresh(){const t=D("refresh.auto"),e=D("refresh.interval");this.state.refreshInterval&&clearInterval(this.state.refreshInterval),t&&(this.state.refreshInterval=setInterval(()=>{this.shouldSkipRefresh()||(this.downloadData(),this.loadPersistentNotifications())},e*1e3))},shouldSkipRefresh(){return!!(this.state.dialogVisible||this.state.attendanceDialog||this.confirmDialog.show||this.state.datePickerDialog||this.loading.upload||this.loading.download||!this.state.synced)},updateSettings(){this.state.fontSize=D("font.size"),this.state.contentStyle={"font-size":`${this.state.fontSize}px`},this.setupAutoRefresh(),this.updateBackendUrl(),this.loadDeviceInfo(),this.loadTokenInfo(),this.settingsTick++},async handleDateSelect(t){if(t)try{const e=this.ensureDate(t),i=this.formatDate(e);if(i===this.state.dateString)return;this.state.dateString=i,this.state.selectedDate=i,this.state.selectedDateObj=e,this.state.isToday=i===this.formatDate(this.getToday()),await Promise.all([this.downloadData(!0),this.loadSubjects()])}catch(e){console.error("Date processing error:",e),this.$message.error("日期处理错误","请重新选择日期")}},setupRealtimeChannel(){try{const t=D("server.kvToken");if(!t){console.warn("未配置 KV Token,无法加入实时频道");return}vt(),Ne(t),this.$offConnect=wt(()=>Ne(t)),this.debouncedRealtimeRefresh||(this.debouncedRealtimeRefresh=Se(async()=>{var g,S,U;const l=JSON.parse(JSON.stringify(this.state.boardData.homework));await this.downloadData();const s=new Date,n=String(s.getHours()).padStart(2,"0"),d=String(s.getMinutes()).padStart(2,"0"),h=String(s.getSeconds()).padStart(2,"0");(g=this.$message)==null||g.info("数据已更新",`已于 ${n}:${d}:${h} 自动刷新`);const p={};for(const A in this.state.boardData.homework){const Y=((S=l[A])==null?void 0:S.content)||"",J=((U=this.state.boardData.homework[A])==null?void 0:U.content)||"";Y!==J&&(p[A]=!0)}for(const A in l)this.state.boardData.homework[A]||(p[A]=!0);this.highlightedCards=p,setTimeout(()=>{this.highlightedCards={}},1e4)},800));const e=l=>{var n;if(!l)return;if(l.key==="notification-list"){this.loadPersistentNotifications();return}const s=`classworks-data-${this.state.dateString}`;l.key===s&&(l.action!=="upsert"&&l.action!=="delete"||(n=this.debouncedRealtimeRefresh)==null||n.call(this,l.key))},i=l=>{let s=l;l.content&&l.timestamp&&(s={uuid:l.senderId||"realtime",key:l.content.key,action:l.content.action,created:l.content.created,updatedAt:l.content.updatedAt||l.timestamp,deletedAt:l.content.deletedAt,batch:l.content.batch}),e(s)};this.$offKvChanged=Pe("kv-key-changed",i),this.deviceEventHandler=Dt({onKvChanged:e,enableLegacySupport:!0}),this.$offDeviceEvent=Pe("device-event",this.deviceEventHandler)}catch(t){console.warn("实时频道初始化失败",t)}},async saveAttendance(){try{await this.trySave(!0),this.state.attendanceDialog=!1}catch(t){console.error("保存出勤状态失败:",t),this.$message.error("保存失败","请重试")}},showMessage(t,e="",i="success"){this.$message[i](t,e)},updateSortedItemsCache(t,e){this._sortedItemsCache={key:t,value:e}},addTestCard(){const t=Date.now().toString();this.state.boardData.homework[`custom-${t}`]={name:"测试卡片",content:`这是一个测试卡片 可以用来测试布局`,type:"custom"},this.state.synced=!1},showConfirmDialog(){return new Promise((t,e)=>{this.confirmDialog={show:!0,resolve:()=>{this.confirmDialog.show=!1,t()},reject:()=>{this.confirmDialog.show=!1,e(new Error("用户取消保存"))}}})},confirmSave(){this.confirmDialog.show=!1,this.confirmDialog.resolve&&this.confirmDialog.resolve(!0)},cancelSave(){this.confirmDialog.show=!1,this.confirmDialog.reject&&this.confirmDialog.reject(new Error("用户取消保存"))},async manualUpload(){return this.trySave(!1)},handleAttendanceChange(){this.state.synced=!1,this.debouncedAttendanceSave()},async handleAttendanceDialogClose(t){!t&&!this.state.synced&&await this.trySave(!0)},toggleFullscreen(){this.state.isFullscreen?this.exitFullscreen():this.enterFullscreen()},enterFullscreen(){const t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},fullscreenChangeHandler(){this.state.isFullscreen=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},openRandomPicker(){this.$refs.randomPicker&&this.$refs.randomPicker.open()},checkHashForRandomPicker(){window.location.hash==="#random-picker"&&this.$nextTick(()=>{console.log("打开随机点名"),window.location.hash="",this.openRandomPicker()})},parseUrlConfig(){try{const e=new URLSearchParams(window.location.search).get("config");if(!e)return!1;try{const i=atob(e),l=Uint8Array.from(i,g=>g.charCodeAt(0)),s=new TextDecoder().decode(l),n=JSON.parse(s);console.log("从URL读取配置:",n);const d=[],h={},p={};return this.processSpecialSettings(n,d,h),this.processStandardSettings(n,d,h,p),Object.keys(h).length===0?(console.log("URL配置与当前配置相同,无需应用"),!1):new Promise(g=>{this.urlConfigDialog={show:!0,config:n,changes:d,validSettings:h,icons:p,confirmHandler:()=>{this.urlConfigDialog.show=!1,this.applyUrlConfig(h),g(!0)},cancelHandler:()=>{this.urlConfigDialog.show=!1,g(!1)}}})}catch(i){return console.error("解析URL配置错误:",i),this.$message.error("URL配置错误","无法解析配置数据"),!1}}catch(t){return console.error("处理URL配置错误:",t),!1}},processSpecialSettings(t,e,i){var l,s;if(t.classNumber!==void 0){const n=D("server.classNumber");t.classNumber!==n&&(e.push({key:"server.classNumber",name:"班级",oldValue:n,newValue:t.classNumber,description:((l=Z["server.classNumber"])==null?void 0:l.description)||"班级编号",icon:((s=Z["server.classNumber"])==null?void 0:s.icon)||"mdi-account-group"}),i["server.classNumber"]=t.classNumber)}t.date!==void 0&&t.date!==this.state.dateString&&(e.push({key:"date",name:"日期",oldValue:this.state.dateString,newValue:t.date,description:"查看的日期",icon:"mdi-calendar"}),i.date=t.date),t.subjects&&Array.isArray(t.subjects)&&(e.push({key:"subjects",name:"科目列表",oldValue:`${this.state.availableSubjects.length}个科目`,newValue:`${t.subjects.length}个科目`,description:"可用科目列表",icon:"mdi-notebook"}),i.subjects=t.subjects)},processStandardSettings(t,e,i,l){Object.entries(t).forEach(([s,n])=>{if(["classNumber","date","subjects"].includes(s))return;let d=s,h=Z[s];if(!h&&!s.includes(".")){const p=["server.","display.","theme.","edit.","refresh.","font.","randomPicker."];for(const g of p){const S=`${g}${s}`;if(Z[S]){d=S,h=Z[S];break}}}if(h){let p=this.convertValueToCorrectType(n,h.type);if(h.validate&&!h.validate(p)){console.warn(`URL配置项 ${d} 的值无效: ${n}`);return}const g=D(d);p!==g&&(e.push({key:d,name:this.getSettingDisplayName(d),oldValue:this.formatSettingValue(g),newValue:this.formatSettingValue(p),description:h.description||d,icon:h.icon||"mdi-cog"}),i[d]=p,l[d]=h.icon||"mdi-cog")}else e.push({key:s,name:this.getSettingDisplayName(s),oldValue:"未知",newValue:this.formatSettingValue(n),description:"自定义配置项",icon:"mdi-cog-outline"}),i[s]=n,l[s]="mdi-cog-outline"})},convertValueToCorrectType(t,e){return e==="boolean"?!!t:e==="number"?Number(t):String(t)},formatSettingValue(t){return typeof t=="boolean"?t?"开启":"关闭":t===""||t===null||t===void 0?"空":t.toString()},getSettingDisplayName(t){const e=t.split("."),i=e[e.length-1];return{provider:"数据提供方",domain:"服务器域名",classNumber:"班级编号",emptySubjectDisplay:"空科目显示方式",dynamicSort:"动态排序",showRandomButton:"随机按钮",showFullscreenButton:"全屏按钮",cardHoverEffect:"卡片悬浮效果",enhancedTouchMode:"增强触摸模式",showAntiScreenBurnCard:"防烧屏卡片",mode:"主题模式",size:"字体大小",autoSave:"自动保存",blockNonTodayAutoSave:"禁止自动保存非当日",refreshBeforeEdit:"编辑前刷新",confirmNonTodaySave:"非当日保存确认",auto:"自动刷新",interval:"刷新间隔"}[i]||i},safeBase64Decode(t){try{return Be.decode(t)}catch(e){throw console.error("Base64解码错误:",e),new Error("无法解码配置数据")}},applyUrlConfig(t){for(const[e,i]of Object.entries(t)){if(e==="date"){this.handleDateSelect(i);continue}if(e==="subjects"){this.state.availableSubjects=i;continue}K(e,i),e==="server.classNumber"&&(this.state.classNumber=i)}return this.updateBackendUrl(),this.$message.success("URL配置已应用","已从URL加载配置"),!0},navigateDay(t){const e=new Date(this.state.selectedDateObj);e.setDate(e.getDate()+t),this.handleDateSelect(e)},async copyHomeworkToToday(){if(!this.loading.copyToToday)try{this.loading.copyToToday=!0;const t=this.state.dateString,e=JSON.parse(JSON.stringify(this.state.boardData.homework)),i=this.getToday(),l=this.formatDate(i);this.state.dateString=l,await this.downloadData();const s={};for(const d in e)e[d]&&e[d].content&&(e[d].type==="custom"?s[d]=JSON.parse(JSON.stringify(e[d])):s[d]={content:e[d].content});this.state.boardData.homework=s,this.state.synced=!1,await this.uploadData(),this.state.selectedDate=l,this.state.selectedDateObj=i,this.state.isToday=!0;const n=new URL(window.location);n.searchParams.delete("date"),window.history.pushState({},"",n),this.$message.success("复制成功",`已将 ${t} 的作业内容复制到今天(已替换原有作业)`)}catch(t){console.error("复制作业失败:",t),this.$message.error("复制失败",t.message||"请重试")}finally{this.loading.copyToToday=!1}},parsePreconfigData(){try{const t=new URLSearchParams(window.location.search),e=t.get("namespace"),i=t.get("authCode")||t.get("auth_code"),l=t.get("autoExecute")||t.get("auto_execute");e&&(this.preconfigData.namespace=e,this.preconfigData.authCode=i,this.preconfigData.autoOpen=!0,this.preconfigData.autoExecute=this.parseBoolean(l),console.log("检测到预配数据:",{namespace:this.preconfigData.namespace,hasAuthCode:!!this.preconfigData.authCode,autoExecute:this.preconfigData.autoExecute}),this.cleanupUrlParams(["namespace","authCode","auth_code","autoExecute","auto_execute"]))}catch(t){console.error("解析预配数据失败:",t)}},parseBoolean(t){if(!t)return!1;const e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"},cleanupUrlParams(t){try{const e=new URL(window.location);let i=!1;t.forEach(l=>{e.searchParams.has(l)&&(e.searchParams.delete(l),i=!0)}),i&&window.history.replaceState({},document.title,e.toString())}catch(e){console.error("清理URL参数失败:",e)}},async loadPersistentNotifications(){try{const t=await R.loadData("notification-list");t&&Array.isArray(t)?this.persistentNotifications=t:t&&t.success!==!1&&Array.isArray(t.data)?this.persistentNotifications=t.data:this.persistentNotifications=[]}catch(t){console.error("加载常驻通知失败",t)}},showNotificationDetail(t){this.currentNotification=t,this.notificationDetailDialog=!0},async removePersistentNotification(t){this.persistentNotifications=this.persistentNotifications.filter(i=>i.id!==t);const e=this.persistentNotifications.length>0?this.persistentNotifications:{};await R.saveData("notification-list",e),this.notificationDetailDialog=!1}}},ho={key:3,class:"d-flex"},mo={class:"text-h6 text-truncate font-weight-bold"},fo={class:"text-h4 font-weight-medium mb-4",style:{"line-height":"1.5"}},go={class:"text-subtitle-1 text-grey"},po={class:"d-flex align-center flex-wrap"},yo={class:"text-subtitle-1"},bo={class:"text-grey-darken-1"},vo={class:"text-primary font-weight-medium"},wo={key:1,class:"text-center py-4 text-grey"};function So(t,e,i,l,s,n){const d=V("init-service-chooser"),h=V("StudentNameManager"),p=V("HomeSkeleton"),g=V("homework-grid"),S=V("home-actions"),U=V("pwa-install-card"),A=V("attendance-sidebar"),Y=V("homework-edit-dialog"),J=V("attendance-management-dialog"),fe=V("message-log"),W=V("floating-toolbar"),ge=V("FloatingICP"),Xe=V("ChatWidget"),Ze=V("UrgentTestDialog"),Qe=V("random-picker"),$e=V("exam-config-editor");return c(),f(k,null,[o(kt,{class:"no-select"},{append:a(()=>[s.tokenDisplayInfo.readonly?(c(),v(L,{key:0,class:"mx-2",color:"warning","prepend-icon":"mdi-lock-alert",variant:"tonal"},{default:a(()=>[...e[29]||(e[29]=[u(" 只读 ",-1)])]),_:1})):w("",!0),s.tokenDisplayInfo.show?(c(),v(L,{key:1,style:N({cursor:s.tokenDisplayInfo.disabled?"default":"pointer"}),class:"mx-2",color:"primary","prepend-icon":"mdi-account",variant:"tonal",onClick:n.handleTokenChipClick},{default:a(()=>[u(m(s.tokenDisplayInfo.text),1)]),_:1},8,["style","onClick"])):w("",!0),n.shouldShowUrgentTestButton?(c(),v(b,{key:2,"prepend-icon":"mdi-chat",variant:"tonal",onClick:e[0]||(e[0]=y=>s.urgentTestDialog=!0)},{default:a(()=>[...e[30]||(e[30]=[u(" 发送通知 ",-1)])]),_:1})):w("",!0),o(b,{icon:"mdi-chat",variant:"text",onClick:e[1]||(e[1]=y=>s.isChatOpen=!0)}),o(b,{badge:n.unreadCount||void 0,"badge-color":n.unreadCount?"error":void 0,icon:"mdi-bell",variant:"text",onClick:e[2]||(e[2]=y=>t.$refs.messageLog.drawer=!0)},null,8,["badge","badge-color"]),o(b,{icon:"mdi-cog",variant:"text",onClick:e[3]||(e[3]=y=>t.$router.push("/settings"))})]),default:a(()=>[o(xt,null,{default:a(()=>[u(m(n.titleText),1)]),_:1}),o(E)]),_:1}),n.shouldShowInit?(c(),v(d,{key:0,preconfig:s.preconfigData,onDone:e[4]||(e[4]=y=>s.settingsTick++)},null,8,["preconfig"])):w("",!0),n.shouldShowInit?w("",!0):(c(),v(h,{key:1,ref:"studentNameManager",onTokenInfoUpdated:n.updateTokenDisplayInfo},null,8,["onTokenInfoUpdated"])),!n.shouldShowInit&&!s.dataReady?(c(),v(p,{key:2})):w("",!0),!n.shouldShowInit&&s.dataReady?(c(),f("div",ho,[o(je,{class:"main-window flex-grow-1 no-select bloom-container",fluid:""},{default:a(()=>[s.persistentNotifications.length>0?(c(),v(Ct,{key:0,class:"mb-4"},{default:a(()=>[o(Tt,{cols:"12"},{default:a(()=>[(c(!0),f(k,null,M(s.persistentNotifications,y=>(c(),v(_,{key:y.id,color:y.isUrgent?"error":"primary",class:"mb-2 cursor-pointer",variant:"tonal",onClick:pe=>n.showNotificationDetail(y)},{default:a(()=>[o(T,{class:"d-flex align-center py-3"},{default:a(()=>[r("span",mo,m(y.message),1),o(E),o(b,{icon:"mdi-chevron-right",variant:"text"})]),_:2},1024)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):w("",!0),o(B,{modelValue:s.notificationDetailDialog,"onUpdate:modelValue":e[8]||(e[8]=y=>s.notificationDetailDialog=y),"max-width":"700",scrollable:""},{default:a(()=>[s.currentNotification?(c(),v(_,{key:0,class:"rounded-xl"},{default:a(()=>[o(I,{class:"d-flex align-center pa-4 text-h5"},{default:a(()=>[r("span",{class:O([s.currentNotification.isUrgent?"text-error":"","font-weight-bold"])},m(s.currentNotification.isUrgent?"强调通知":"通知详情"),3),o(E),o(b,{icon:"mdi-close",variant:"text",onClick:e[5]||(e[5]=y=>s.notificationDetailDialog=!1)})]),_:1}),o(F),o(T,{class:"pa-6"},{default:a(()=>[r("div",fo,m(s.currentNotification.message),1),r("div",go," 发布时间:"+m(n.formatTime(s.currentNotification.timestamp)),1)]),_:1}),o(F),o(j,{class:"pa-4"},{default:a(()=>[o(b,{color:"error","prepend-icon":"mdi-delete",size:"x-large",variant:"tonal",class:"px-6",onClick:e[6]||(e[6]=y=>n.removePersistentNotification(s.currentNotification.id))},{default:a(()=>[...e[31]||(e[31]=[u(" 删除通知 ",-1)])]),_:1}),o(E),o(b,{color:"primary",size:"x-large",variant:"elevated",class:"px-8",onClick:e[7]||(e[7]=y=>s.notificationDetailDialog=!1)},{default:a(()=>[...e[32]||(e[32]=[u(" 关闭 ",-1)])]),_:1})]),_:1})]),_:1})):w("",!0)]),_:1},8,["modelValue"]),o(g,{"sorted-items":n.sortedItems,"unused-subjects":n.unusedSubjects,"empty-subject-display":n.emptySubjectDisplay,"is-mobile":n.isMobile,"is-editing-disabled":n.isEditingDisabled,"content-style":s.state.contentStyle,"highlighted-cards":s.highlightedCards,onOpenDialog:n.openDialog,onOpenAttendance:n.setAttendanceArea,onDisabledClick:n.handleDisabledClick,onOpenExamDetail:n.openExamDetail},null,8,["sorted-items","unused-subjects","empty-subject-display","is-mobile","is-editing-disabled","content-style","highlighted-cards","onOpenDialog","onOpenAttendance","onDisabledClick","onOpenExamDetail"]),o(S,{synced:s.state.synced,"loading-upload":s.loading.upload,"show-random-picker-button":n.showRandomPickerButton,"show-exam-schedule-button":n.showExamScheduleButton,"show-list-card-button":n.showListCardButton,"show-fullscreen-button":n.showFullscreenButton,"is-fullscreen":s.state.isFullscreen,"show-anti-screen-burn-card":n.showAntiScreenBurnCard,"show-test-card-button":n.showTestCardButton,onUpload:n.manualUpload,onShowSyncMessage:n.showSyncMessage,onOpenRandomPicker:n.openRandomPicker,onToggleFullscreen:n.toggleFullscreen,onAddTestCard:n.addTestCard,onAddExamCard:e[9]||(e[9]=y=>s.showAddExamDialog=!0)},null,8,["synced","loading-upload","show-random-picker-button","show-exam-schedule-button","show-list-card-button","show-fullscreen-button","is-fullscreen","show-anti-screen-burn-card","show-test-card-button","onUpload","onShowSyncMessage","onOpenRandomPicker","onToggleFullscreen","onAddTestCard"]),o(U),s.upcomingExams.length>0&&!n.hasExamCard?(c(),v(le,{key:1,class:"mt-4",color:"info",variant:"tonal",closable:"",icon:"mdi-calendar-clock",title:"近期有考试安排"},{append:a(()=>[o(b,{color:"primary",variant:"text",onClick:n.addAllUpcomingExams},{default:a(()=>[...e[34]||(e[34]=[u(" 一键添加 ",-1)])]),_:1},8,["onClick"])]),default:a(()=>[r("div",po,[e[33]||(e[33]=r("span",{class:"mr-2"},"检测到未来两天内有以下考试:",-1)),(c(!0),f(k,null,M(s.upcomingExams,y=>(c(),v(L,{key:y.id,size:"small",class:"mr-1 mb-1",color:"primary"},{default:a(()=>[u(m(y.examName),1)]),_:2},1024))),128))])]),_:1})):w("",!0)]),_:1}),n.isMobile?w("",!0):(c(),v(A,{key:0,"student-list":s.state.studentList,attendance:s.state.boardData.attendance,"is-editing-disabled":n.isEditingDisabled,onClick:n.setAttendanceArea,onDisabledClick:n.handleDisabledClick},null,8,["student-list","attendance","is-editing-disabled","onClick","onDisabledClick"]))])):w("",!0),o(Y,{modelValue:s.state.dialogVisible,"onUpdate:modelValue":e[10]||(e[10]=y=>s.state.dialogVisible=y),"auto-save":n.autoSave,"initial-content":s.state.textarea,title:s.state.dialogTitle,"is-editing-past-data":n.isEditingPastData,"current-date-string":s.state.dateString,onSave:n.handleHomeworkSave},null,8,["modelValue","auto-save","initial-content","title","is-editing-past-data","current-date-string","onSave"]),o(nt,{modelValue:s.state.snackbar,"onUpdate:modelValue":e[11]||(e[11]=y=>s.state.snackbar=y),timeout:2e3},{default:a(()=>[u(m(s.state.snackbarText),1)]),_:1},8,["modelValue"]),o(J,{modelValue:s.state.attendanceDialog,"onUpdate:modelValue":e[12]||(e[12]=y=>s.state.attendanceDialog=y),"student-list":s.state.studentList,attendance:s.state.boardData.attendance,"date-string":s.state.dateString,onSave:n.saveAttendance,onChange:n.handleAttendanceChange},null,8,["modelValue","student-list","attendance","date-string","onSave","onChange"]),o(fe,{ref:"messageLog"},null,512),o(W,{"is-today":n.isToday,loading:s.loading.download,"copy-to-today-loading":s.loading.copyToToday,"selected-date":s.state.selectedDateObj,"unread-count":n.unreadCount,onRefresh:n.downloadData,onZoom:n.zoom,onOpenMessages:e[13]||(e[13]=y=>t.$refs.messageLog.drawer=!0),onOpenSettings:e[14]||(e[14]=y=>t.$router.push("/settings")),onDateSelect:n.handleDateSelect,onPrevDay:e[15]||(e[15]=y=>n.navigateDay(-1)),onNextDay:e[16]||(e[16]=y=>n.navigateDay(1)),onCopyToToday:n.copyHomeworkToToday},null,8,["is-today","loading","copy-to-today-loading","selected-date","unread-count","onRefresh","onZoom","onDateSelect","onCopyToToday"]),o(ge),o(Xe,{modelValue:s.isChatOpen,"onUpdate:modelValue":e[17]||(e[17]=y=>s.isChatOpen=y),"show-button":!1},null,8,["modelValue"]),o(Ze,{modelValue:s.urgentTestDialog,"onUpdate:modelValue":e[18]||(e[18]=y=>s.urgentTestDialog=y)},null,8,["modelValue"]),o(B,{modelValue:s.confirmDialog.show,"onUpdate:modelValue":e[19]||(e[19]=y=>s.confirmDialog.show=y),"max-width":"400"},{default:a(()=>[o(_,null,{default:a(()=>[o(I,{class:"text-h6"},{default:a(()=>[...e[35]||(e[35]=[u(" 确认保存 ",-1)])]),_:1}),o(T,null,{default:a(()=>[u(" 您正在修改 "+m(s.state.dateString)+" 的数据,确定要保存吗? ",1)]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{color:"grey",variant:"text",onClick:s.confirmDialog.reject},{default:a(()=>[...e[36]||(e[36]=[u(" 取消 ",-1)])]),_:1},8,["onClick"]),o(b,{color:"primary",onClick:s.confirmDialog.resolve},{default:a(()=>[...e[37]||(e[37]=[u(" 确认保存 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(Qe,{ref:"randomPicker",attendance:s.state.boardData.attendance,"student-list":s.state.studentList},null,8,["attendance","student-list"]),o(B,{modelValue:s.urlConfigDialog.show,"onUpdate:modelValue":e[20]||(e[20]=y=>s.urlConfigDialog.show=y),"max-width":"500"},{default:a(()=>[o(_,null,{default:a(()=>[o(I,{class:"text-h6"},{default:a(()=>[...e[38]||(e[38]=[u(" 确认应用URL配置 ",-1)])]),_:1}),o(T,null,{default:a(()=>[e[39]||(e[39]=r("p",null,"以下配置将应用于当前班级:",-1)),o(ee,{density:"compact"},{default:a(()=>[(c(!0),f(k,null,M(s.urlConfigDialog.changes,y=>(c(),v(X,{key:y.key},{prepend:a(()=>[o(x,{icon:y.icon,class:"mr-2",size:"small"},null,8,["icon"])]),default:a(()=>[o(oe,{class:"d-flex align-center"},{default:a(()=>[r("span",yo,m(y.name),1),o(pt,{activator:"parent",location:"top"},{default:a(()=>[u(m(y.description||y.key),1)]),_:2},1024)]),_:2},1024),o(ae,null,{default:a(()=>[r("span",bo,m(y.oldValue),1),o(x,{class:"mx-1",icon:"mdi-arrow-right",size:"small"}),r("span",vo,m(y.newValue),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{color:"grey",variant:"text",onClick:s.urlConfigDialog.cancelHandler},{default:a(()=>[...e[40]||(e[40]=[u(" 取消 ",-1)])]),_:1},8,["onClick"]),o(b,{color:"primary",onClick:s.urlConfigDialog.confirmHandler},{default:a(()=>[...e[41]||(e[41]=[u(" 确认应用 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:s.showExamDetailDialog,"onUpdate:modelValue":e[23]||(e[23]=y=>s.showExamDetailDialog=y),persistent:"",fullscreen:""},{default:a(()=>[s.selectedExamId?(c(),v(_,{key:0},{default:a(()=>[o(I,{class:"d-flex align-center pa-4"},{default:a(()=>[e[42]||(e[42]=u(" 编辑考试配置 ",-1)),o(E),o(b,{icon:"mdi-close",variant:"text",onClick:e[21]||(e[21]=y=>s.showExamDetailDialog=!1)})]),_:1}),o(T,{class:"pa-4",style:{"max-height":"70vh","overflow-y":"auto"}},{default:a(()=>[o($e,{"config-id":s.selectedExamId,"dialog-mode":!0,onSaved:n.onExamConfigSaved,onDeleted:n.onExamConfigDeleted},null,8,["config-id","onSaved","onDeleted"])]),_:1}),o(F),o(j,{class:"pa-4"},{default:a(()=>[o(b,{color:"error","prepend-icon":"mdi-delete",variant:"tonal",onClick:n.removeCurrentExamCard},{default:a(()=>[...e[43]||(e[43]=[u(" 移除卡片 ",-1)])]),_:1},8,["onClick"]),o(E),o(b,{color:"primary",variant:"text",onClick:e[22]||(e[22]=y=>s.showExamDetailDialog=!1)},{default:a(()=>[...e[44]||(e[44]=[u(" 关闭 ",-1)])]),_:1})]),_:1})]),_:1})):w("",!0)]),_:1},8,["modelValue"]),o(B,{modelValue:s.showAddExamDialog,"onUpdate:modelValue":e[25]||(e[25]=y=>s.showAddExamDialog=y),"max-width":"500"},{default:a(()=>[o(_,null,{default:a(()=>[o(I,{class:"text-h6"},{default:a(()=>[...e[45]||(e[45]=[u(" 预览考试看板 ",-1)])]),_:1}),o(T,null,{default:a(()=>[l.examStore.examList.length>0?(c(),v(ee,{key:0},{default:a(()=>[(c(!0),f(k,null,M(l.examStore.examList,y=>{var pe;return c(),v(X,{key:y.id,title:((pe=l.examStore.exams[y.id])==null?void 0:pe.examName)||y.id,subtitle:y.id,onClick:xo=>n.addExamCard(y.id)},{prepend:a(()=>[o(x,{color:"primary"},{default:a(()=>[...e[46]||(e[46]=[u(" mdi-calendar-text ",-1)])]),_:1})]),append:a(()=>[o(b,{icon:n.isExamCardAdded(y.id)?"mdi-check":"mdi-plus",color:n.isExamCardAdded(y.id)?"success":"grey",variant:"text"},null,8,["icon","color"])]),_:2},1032,["title","subtitle","onClick"])}),128))]),_:1})):(c(),f("div",wo," 暂无考试配置 "))]),_:1}),o(j,null,{default:a(()=>[o(E),o(b,{color:"primary",variant:"text",onClick:e[24]||(e[24]=y=>s.showAddExamDialog=!1)},{default:a(()=>[...e[47]||(e[47]=[u(" 关闭 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(B,{modelValue:s.notificationDetailDialog,"onUpdate:modelValue":e[28]||(e[28]=y=>s.notificationDetailDialog=y),"max-width":"600"},{default:a(()=>[s.currentNotification?(c(),v(_,{key:0},{default:a(()=>[o(I,{class:O(["headline",s.currentNotification.isUrgent?"text-error":"text-primary"])},{default:a(()=>[u(m(s.currentNotification.isUrgent?"强调通知":"通知详情"),1)]),_:1},8,["class"]),o(T,{class:"text-h5 py-4"},{default:a(()=>[u(m(s.currentNotification.message),1)]),_:1}),o(j,null,{default:a(()=>[o(b,{color:"error",variant:"text",onClick:e[26]||(e[26]=y=>n.removePersistentNotification(s.currentNotification.id))},{default:a(()=>[...e[48]||(e[48]=[u(" 删除 ",-1)])]),_:1}),o(E),o(b,{color:"primary",onClick:e[27]||(e[27]=y=>s.notificationDetailDialog=!1)},{default:a(()=>[...e[49]||(e[49]=[u(" 关闭 ",-1)])]),_:1})]),_:1})]),_:1})):w("",!0)]),_:1},8,["modelValue"]),e[50]||(e[50]=r("br",null,null,-1)),e[51]||(e[51]=r("br",null,null,-1)),e[52]||(e[52]=r("br",null,null,-1))],64)}const Do=H(uo,[["render",So]]),Ho=Object.freeze(Object.defineProperty({__proto__:null,default:Do},Symbol.toStringTag,{value:"Module"}));export{Ho as i,xe as u}; diff --git a/assets/index-CzpSlHRw.js b/assets/index-DGIAsv4W.js similarity index 82% rename from assets/index-CzpSlHRw.js rename to assets/index-DGIAsv4W.js index 6df3f2c..b20b532 100644 --- a/assets/index-CzpSlHRw.js +++ b/assets/index-DGIAsv4W.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./default-BFwhCf_0.js","./vendor-vuetify-95axeNJO.js","./vendor-vue-28M5UGz3.js","./default-CmdaPMSp.css","./index-Kr7NEaRJ.js","./dataProvider-DBZnFcYO.js","./vendor-utils-B_Y_1aLs.js","./serverRotation-xQe1elLG.js","./VChip-B3whZF-S.js","./VChip-Dmz_1Lnv.css","./VTabs-DxZkDLgQ.js","./VTable-D9zIyrqQ.js","./VTable-CNLJxQof.css","./VTabs-566n5b08.css","./VAlert-DaoJAibO.js","./VAlert-D_OX1cfW.css","./VTooltip-C8vChj8G.js","./VTooltip-D7EaNDeY.css","./VTextField-BxdS2D7S.js","./VTextField-DTDEIDq0.css","./soundList-D9U-Grcp.js","./VSwitch-DcxT6NgQ.js","./VSwitch-Bk42mIwg.css","./VContainer-BIFGURze.js","./VContainer-B1KSavhG.css","./socketClient-pOSoE2ci.js","./vendor-socket-dm1FmSOd.js","./deviceEvents-CH859Fwr.js","./VAppBarTitle-C1UGCJHo.js","./VAppBarTitle-CczdD-Q2.css","./VRow-sd4d6eNi.js","./VRow-D2ArqUC2.css","./index-BFmbztHq.css","./404-BvsG34tD.js","./authorize-BU2NVavn.js","./CacheManagement-DY4pjQFw.js","./VExpansionPanels-CQt43P3v.js","./VExpansionPanels-kEj4ZJQK.css","./VSkeletonLoader-Bqlz0ln3.js","./VSkeletonLoader-C11ZEozu.css","./cses2wakeup-CJGIn7lz.js","./VTextarea-zDVNnlPQ.js","./VTextarea-_xVwaw_z.css","./VDataTable-Bg4qcCRf.js","./VPagination-CwVL3tMR.js","./VPagination-BF2MZmld.css","./VSelect-DZBjiB3J.js","./VSheet-ZjkOR-Oc.js","./VSheet-DxsDksIw.css","./VCheckboxBtn-BLxCsxXE.js","./VSelect-DHZViySU.css","./VDataTable-Cl7qiDOP.css","./VCheckbox-tGn5q60R.js","./VCheckbox-ZL-u1kGB.css","./cses2wakeup-DFUa6tSq.css","./debug-D_ZM-0TG.js","./visitorId-2IHCmkCy.js","./debug-CbS14biG.css","./debug-init-CsSxd_OS.js","./VForm-DIiMelbi.js","./debug-socket-BtS3Wegp.js","./_id_-B-ldZLO0.js","./ExamConfigEditor-Dw1BoZRS.js","./VAutocomplete-D8Wr7ywO.js","./VAutocomplete-Ygy_KjMW.css","./VDatePicker-BJ3ukfdk.js","./VPicker-199veasp.js","./VPicker-Dm9DplUc.css","./VDatePicker-zglzEVGT.css","./VTimePicker-DvAq_vLK.js","./VTimePicker-BkWY3_8P.css","./ExamConfigEditor-HgNV6CVV.css","./examschedule-DnYIE-2I.js","./examschedule-D7wPNFui.css","./index-DLFytbG5.js","./_id_-Dn7o9q7x.js","./settings--8H57vu-.js","./MessageLog-92n2iU1x.js","./MessageLog-BGkFwivK.css","./VCombobox-DqiaU_M6.js","./VCombobox-r6cc1Iy_.css","./settings-BxfdCqX7.css","./socket-debugger-BgOyS6q7.js","./socket-debugger-B22H3Il3.css"])))=>i.map(i=>d[i]); -import{c as bi,g as qe,p as T,d as bn,i as jn,a as pi,b as Si,e as wi,f as G,h as ye,j as Ft,u as Z,m as fe,k as ee,l as Ee,n as Pe,o as Je,w as pn,q as ki,r as Ci,s as B,t as Sa,v as _i,x as xi,I as oe,S as Sn,y as wa,P as Tt,z as et,A as zt,B as an,C as ht,D as Gn,E as Ae,F as sn,G as Et,H as wn,J as Ei,K as Ii,L as Ot,M as Pi,N as Un,O as Kn,Q as Kt,R as Xt,T as ka,U as Xn,V as Ai,W as Vi,X as Yn,Y as Li,Z as Ti,_ as Oi,$ as It,a0 as Bi,a1 as Ri,a2 as Ca,a3 as Ni,a4 as Fe,a5 as at,a6 as on,a7 as $i,a8 as Di,a9 as Mi,aa as kn,ab as Jn,ac as Qn,ad as Fi,ae as zi,af as Wi,ag as ft,ah as ln,ai as ke,aj as _a,ak as qi,al as Hi,am as ji}from"./vendor-vuetify-95axeNJO.js";import{J as Gi,K as Ui,L as Ki,e as C,t as k,M as rn,l as se,k as I,n as j,F as Ve,j as b,N as X,E as Cn,p as He,d as Le,A as je,o as W,D as it,O as Xi,r as vt,u as Yi,m as Q,y as Ji,T as Qi,s as z,q as ve,b as M,w as Ne,P as $e,Q as xa,I as de,R as We,S as _e,v as Ea,x as ne,B as Ia,U as _n,h as xn,V as En,W as Zi,X as Ce,Y as ze,Z as ie,f as es,_ as In,$ as Bt,a0 as Pn,a1 as Ct,a2 as ts,a3 as ns,a4 as as,a5 as is}from"./vendor-vue-28M5UGz3.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const ss="modulepreload",os=function(e,t){return new URL(e,t).href},Zn={},ae=function(t,n,a){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),r=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=os(u,a),u in Zn)return;Zn[u]=!0;const c=u.endsWith(".css"),m=c?'[rel="stylesheet"]':"";if(!!a)for(let g=o.length-1;g>=0;g--){const f=o[g];if(f.href===u&&(!c||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":ss,c||(d.as="script"),d.crossOrigin="",d.href=u,r&&d.setAttribute("nonce",r),document.head.appendChild(d),c)return new Promise((g,f)=>{d.addEventListener("load",g),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},ls=bi({theme:{defaultTheme:"dark"}}),rs=Gi(),us=e=>{const t={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>ae(()=>import("./default-BFwhCf_0.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)})).forEach(([i,s])=>{let o=i.replace("/src/layouts/","").replace(".vue","");t[o]=s});function a(i,s=!0){return i.map(o=>{var l,r,u,c,m,v;if(((l=o.children)==null?void 0:l.length)>0&&(o.children=a(o.children,!1)),s){if(!o.component&&((r=o.children)==null?void 0:r.find(g=>{var f;return(g.path===""||g.path==="/")&&((f=g.meta)==null?void 0:f.isLayout)})))return o;if(((u=o.meta)==null?void 0:u.layout)!==!1)return{path:o.path,component:t[((c=o.meta)==null?void 0:c.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(m=o.meta)!=null&&m.layout?{path:o.path,component:t[(v=o.meta)==null?void 0:v.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return a(e)},cs=[{path:"/",name:"/",component:()=>ae(()=>import("./index-Kr7NEaRJ.js").then(e=>e.i),__vite__mapDeps([4,2,5,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)},{path:"/404",name:"/404",component:()=>ae(()=>import("./404-BvsG34tD.js"),__vite__mapDeps([33,30,1,2,31,23,24]),import.meta.url)},{path:"/authorize",name:"/authorize",component:()=>ae(()=>import("./authorize-BU2NVavn.js"),__vite__mapDeps([34,2,30,1,31,23,24]),import.meta.url)},{path:"/CacheManagement",name:"/CacheManagement",component:()=>ae(()=>import("./CacheManagement-DY4pjQFw.js"),__vite__mapDeps([35,14,1,2,15,36,37,8,9,38,39,30,31,23,24]),import.meta.url)},{path:"/cses2wakeup",name:"/cses2wakeup",component:()=>ae(()=>import("./cses2wakeup-CJGIn7lz.js"),__vite__mapDeps([40,30,1,2,31,14,15,10,11,12,8,9,13,16,17,41,18,19,42,21,22,38,39,43,44,45,46,47,48,49,50,51,52,53,23,24,54]),import.meta.url)},{path:"/debug",name:"/debug",component:()=>ae(()=>import("./debug-D_ZM-0TG.js"),__vite__mapDeps([55,56,1,2,23,24,57]),import.meta.url)},{path:"/debug-init",name:"/debug-init",component:()=>ae(()=>import("./debug-init-CsSxd_OS.js"),__vite__mapDeps([58,5,6,7,30,1,2,31,59,18,19,23,24]),import.meta.url)},{path:"/debug-socket",name:"/debug-socket",component:()=>ae(()=>import("./debug-socket-BtS3Wegp.js"),__vite__mapDeps([60,25,26,7,27,30,1,2,31,8,9,18,19,41,42,23,24]),import.meta.url)},{path:"/exam-editor",children:[{path:":id",name:"/exam-editor/[id]",component:()=>ae(()=>import("./_id_-B-ldZLO0.js"),__vite__mapDeps([61,62,5,6,7,2,14,1,15,38,39,16,17,8,9,30,31,18,19,41,42,21,22,63,46,47,48,49,50,64,65,66,67,68,69,70,71,28,29,23,24]),import.meta.url)}]},{path:"/examschedule",name:"/examschedule",component:()=>ae(()=>import("./examschedule-DnYIE-2I.js"),__vite__mapDeps([72,62,5,6,7,2,14,1,15,38,39,16,17,8,9,30,31,18,19,41,42,21,22,63,46,47,48,49,50,64,65,66,67,68,69,70,71,23,24,73]),import.meta.url)},{path:"/list",children:[{path:"",name:"/list/",component:()=>ae(()=>import("./index-DLFytbG5.js"),__vite__mapDeps([74,5,6,7,2,28,1,29,18,19,23,24]),import.meta.url)},{path:":id",name:"/list/[id]",component:()=>ae(()=>import("./_id_-Dn7o9q7x.js"),__vite__mapDeps([75,5,6,7,2,28,1,29,18,19,49,21,22,8,9,41,42,23,24]),import.meta.url)}]},{path:"/settings",name:"/settings",component:()=>ae(()=>import("./settings--8H57vu-.js"),__vite__mapDeps([76,77,28,1,2,29,78,8,9,21,18,19,22,46,47,48,49,50,14,15,5,6,7,30,31,23,24,52,53,41,42,20,38,39,69,66,67,70,59,36,37,43,44,45,11,12,51,79,80,56,81]),import.meta.url)},{path:"/socket-debugger",name:"/socket-debugger",component:()=>ae(()=>import("./socket-debugger-BgOyS6q7.js"),__vite__mapDeps([82,25,26,7,30,1,2,31,8,9,18,19,41,42,21,22,14,15,23,24,83]),import.meta.url)}],An=Ui({history:Ki("./"),routes:us(cs)});An.onError((e,t)=>{var n,a;(a=(n=e==null?void 0:e.message)==null?void 0:n.includes)!=null&&a.call(n,"Failed to fetch dynamically imported module")?localStorage.getItem("vuetify:dynamic-reload")?console.error("Dynamic import error, reloading page did not fix it",e):(console.log("Reloading page to fix dynamic import error"),localStorage.setItem("vuetify:dynamic-reload","true"),location.assign(t.fullPath)):console.error(e)});An.isReady().then(()=>{localStorage.removeItem("vuetify:dynamic-reload")});function ds(e){e.use(ls).use(An).use(rs)}async function fs(){return typeof Notification<"u"&&Notification.requestPermission?await Notification.requestPermission()==="granted"?(console.log("通知权限已授予"),!0):(console.warn("通知权限被拒绝"),!1):(console.warn("浏览器不支持通知权限请求"),!1)}async function vs(){var e;try{return(e=navigator.storage)!=null&&e.persist?await navigator.storage.persist():!1}catch(t){return console.warn("请求持久性存储失败:",t),!1}}const Yt="Classworks_settings",_t="classworks:settings:changed",ea={"server.domain":"https://kv-service.houlang.cloud","server.siteKey":""},Re={"device.uuid":{type:"string",default:"00000000-0000-4000-8000-000000000000",description:"设备唯一标识符",icon:"mdi-identifier"},"storage.persistOnLoad":{type:"boolean",default:!0,description:"是否在页面加载时自动请求持久性存储",icon:"mdi-database-sync"},"display.emptySubjectDisplay":{type:"string",default:"card",validate:e=>["card","button"].includes(e),description:"空科目的显示方式",icon:"mdi-card-outline"},"noiseMonitor.enabled":{type:"boolean",default:!0,description:"启用环境噪音监测",icon:"mdi-microphone"},"noiseMonitor.autoStart":{type:"boolean",default:!0,description:"打开页面时自动开始监测",icon:"mdi-play-circle-outline"},"noiseMonitor.permissionDismissed":{type:"boolean",default:!1,description:"已跳过麦克风权限引导(不再弹出介绍弹框)",icon:"mdi-microphone-off"},"timeCard.enabled":{type:"boolean",default:!0,description:"启用时间卡片",icon:"mdi-clock-outline"},"timeCard.use12h":{type:"boolean",default:!1,description:"使用 12 小时制显示时间",icon:"mdi-clock-time-six-outline"},"hitokoto.enabled":{type:"boolean",default:!0,description:"启用一言",icon:"mdi-comment-quote"},"hitokoto.refreshInterval":{type:"number",default:300,description:"刷新时间(秒,0为不自动刷新)",icon:"mdi-timer-refresh"},"display.dynamicSort":{type:"boolean",default:!0,description:"是否启用动态排序",icon:"mdi-sort-variant"},"display.showRandomButton":{type:"boolean",default:!1,description:"是否显示随机点人按钮",icon:"mdi-shuffle-variant"},"display.showFullscreenButton":{type:"boolean",default:!0,description:"是否显示全屏按钮",icon:"mdi-fullscreen"},"display.cardHoverEffect":{type:"boolean",default:!0,description:"是否启用卡片悬浮效果",icon:"mdi-gesture-tap"},"display.enhancedTouchMode":{type:"boolean",default:!0,description:"是否启用增强触摸模式",icon:"mdi-gesture-tap-button"},"display.showAntiScreenBurnCard":{type:"boolean",default:!1,description:"是否显示防烧屏忽悠卡片",icon:"mdi-monitor-shimmer"},"display.showListCard":{type:"boolean",default:!0,description:"是否显示列表卡片",icon:"mdi-list-box"},"display.showExamScheduleButton":{type:"boolean",default:!0,description:"是否显示考试看板",icon:"mdi-calendar-check"},"display.showQuickTools":{type:"boolean",default:!0,description:"是否显示快捷键盘",icon:"mdi-dialpad"},"display.forceDesktopMode":{type:"boolean",default:!1,description:"强制使用一体机UI模式",icon:"mdi-monitor"},"display.lateStudentsArePresent":{type:"boolean",default:!1,description:"将迟到人数算入出勤人数",icon:"mdi-clock-fast"},"server.domain":{type:"string",default:"",validate:e=>{if(!e)return!0;try{return new URL(e),!0}catch(t){return console.error("域名格式无效:",t),!1}},description:"后端服务器域名",icon:"mdi-web"},"server.classNumber":{type:"string",default:"高三八班",validate:e=>/.*/.test(e),description:"班级编号",icon:"mdi-account-group"},"server.siteKey":{type:"string",default:"",description:"网站令牌",icon:"mdi-key-chain"},"server.kvToken":{type:"string",default:"",description:"KV授权令牌",icon:"mdi-shield-key"},"server.authDomain":{type:"string",default:"https://kv.houlang.cloud",description:"授权服务器域名",icon:"mdi-shield-account",validate:e=>{if(!e)return!0;try{return new URL(e),!0}catch(t){return console.error("授权域名格式无效:",t),!1}}},"server.provider":{type:"string",default:"classworkscloud",validate:e=>["kv-local","kv-server","classworkscloud"].includes(e),description:"数据提供者",icon:"mdi-database"},"refresh.auto":{type:"boolean",default:!1,description:"是否启用自动刷新",icon:"mdi-refresh-auto"},"refresh.interval":{type:"number",default:300,validate:e=>e>=10&&e<=3600,description:"自动刷新间隔(秒)",icon:"mdi-timer-outline"},"font.size":{type:"number",default:28,validate:e=>e>=16&&e<=100,description:"字体大小",icon:"mdi-format-size"},"edit.autoSave":{type:"boolean",default:!0,description:"是否启用自动保存",icon:"mdi-content-save-outline"},"edit.blockNonTodayAutoSave":{type:"boolean",default:!0,description:"禁止自动保存非当天数据",icon:"mdi-calendar-lock"},"edit.refreshBeforeEdit":{type:"boolean",default:!0,description:"编辑前是否自动刷新",icon:"mdi-refresh"},"edit.confirmNonTodaySave":{type:"boolean",default:!0,description:"保存非当天数据需确认",icon:"mdi-calendar-alert"},"edit.blockPastDataEdit":{type:"boolean",default:!1,description:"禁止编辑过往数据",icon:"mdi-lock-clock"},"edit.autoSavePromptText":{type:"string",default:"喵?喵呜!",description:"自动保存模式提示文本",icon:"mdi-text-box-outline"},"edit.manualSavePromptText":{type:"string",default:"写完后点击上传谢谢喵",description:"手动保存模式提示文本",icon:"mdi-text-box-outline"},"developer.enabled":{type:"boolean",default:!1,description:"是否启用开发者选项",icon:"mdi-developer-board"},"developer.showDebugConfig":{type:"boolean",default:!1,description:"是否显示调试配置",icon:"mdi-bug-outline"},"developer.disableMessageLog":{type:"boolean",default:!1,description:"禁用消息日志记录",requireDeveloper:!0,icon:"mdi-message-off-outline"},"message.showSidebar":{type:"boolean",default:!0,description:"是否显示消息记录侧栏",requireDeveloper:!0,icon:"mdi-message-text-outline"},"message.maxActiveMessages":{type:"number",default:5,validate:e=>e>=1&&e<=10,description:"同时显示的最大消息数量",requireDeveloper:!0,icon:"mdi-message-badge-outline"},"message.timeout":{type:"number",default:5e3,validate:e=>e>=1e3&&e<=3e4,description:"消息自动关闭时间(毫秒)",requireDeveloper:!0,icon:"mdi-timer-sand"},"message.saveHistory":{type:"boolean",default:!0,description:"是否保存消息历史记录",requireDeveloper:!0,icon:"mdi-history"},"theme.mode":{type:"string",default:"dark",validate:e=>["light","dark"].includes(e),description:"主题模式",icon:"mdi-theme-light-dark"},"background.enabled":{type:"boolean",default:!1,description:"启用自定义背景",icon:"mdi-image"},"background.url":{type:"string",default:"",description:"背景图片地址",icon:"mdi-link"},"background.imageData":{type:"string",default:"",description:"本地背景图片(Base64)",icon:"mdi-image-area"},"background.blur":{type:"number",default:10,validate:e=>e>=0&&e<=50,description:"毛玻璃模糊幅度(px)",icon:"mdi-blur"},"background.opacity":{type:"number",default:30,validate:e=>e>=0&&e<=80,description:"遮罩暗色程度(%)",icon:"mdi-circle-half-full"},"notification.singleSound":{type:"string",default:"Teams 默认.mp3",description:"单次通知铃声",icon:"mdi-bell-ring"},"notification.urgentSound":{type:"string",default:"Teams 默认通话铃.mp3",description:"持续通知铃声",icon:"mdi-bell-alert"},"randomPicker.enabled":{type:"boolean",default:!0,description:"是否启用随机点名功能",icon:"mdi-account-question"},"randomPicker.animation":{type:"boolean",default:!0,description:"是否启用随机点名动画效果",icon:"mdi-animation-play"},"randomPicker.defaultCount":{type:"number",default:1,validate:e=>e>=1&&e,description:"默认抽取人数",icon:"mdi-counter"},"randomPicker.excludeAbsent":{type:"boolean",default:!0,description:"是否排除请假学生",icon:"mdi-account-off"},"randomPicker.excludeLate":{type:"boolean",default:!1,description:"是否排除迟到学生",icon:"mdi-clock-alert"},"randomPicker.excludeExcluded":{type:"boolean",default:!0,description:"是否排除不参与学生",icon:"mdi-account-cancel"},"randomPicker.mode":{type:"string",default:"name",validate:e=>["name","number"].includes(e),description:"随机点名模式",icon:"mdi-format-list-numbered"},"randomPicker.maxNumber":{type:"number",default:60,validate:e=>e>=1&&e,description:"学号模式最大值",icon:"mdi-numeric"},"randomPicker.minNumber":{type:"number",default:1,validate:e=>e>=1&&e,description:"学号模式最小值",icon:"mdi-numeric-negative-1"},"pwa.hideInstallCard":{type:"boolean",default:!1,description:"不显示PWA安装卡片",icon:"mdi-download-off"}};class ms{constructor(){this.settingsCache=null,this.isInitialized=!1}init(){this.isInitialized||(this.loadSettings(),this.isInitialized=!0)}loadSettings(){this.settingsCache={};try{const t=typeof localStorage<"u"?localStorage.getItem(Yt):null;t&&(this.settingsCache=JSON.parse(t))}catch(t){console.error("加载设置失败:",t)}for(const[t,n]of Object.entries(Re))t in this.settingsCache||(this.settingsCache[t]=n.default);return this.settingsCache}saveSettings(){if(!(typeof localStorage>"u"))try{localStorage.setItem(Yt,JSON.stringify(this.settingsCache))}catch(t){console.error("保存设置失败:",t)}}getSetting(t){this.isInitialized||this.init();const n=Re[t];if(!n)return console.warn(`未定义的设置项: ${t}`),null;if(n.requireDeveloper&&!this.settingsCache["developer.enabled"])return n.default;if(this.settingsCache["server.provider"]==="classworkscloud"&&ea[t]!==void 0)return ea[t];const a=this.settingsCache[t];return a!==void 0?a:n.default}setSetting(t,n){this.isInitialized||this.init();const a=Re[t];if(!a)return console.warn(`未定义的设置项: ${t}`),!1;if(a.requireDeveloper&&!this.settingsCache["developer.enabled"])return console.warn(`设置项 ${t} 需要启用开发者选项`),!1;try{const i=this.settingsCache[t];if(typeof n!==a.type&&(n=a.type==="boolean"?!!n:a.type==="number"?Number(n):String(n)),a.validate&&!a.validate(n))return console.warn(`设置项 ${t} 的值无效`),!1;this.settingsCache[t]=n,this.saveSettings(),this.logSettingsChange(t,i,n),typeof window<"u"&&window.dispatchEvent(new CustomEvent(_t,{detail:{key:t,value:n}}));const s=a.legacyKey;return s&&typeof localStorage<"u"&&localStorage.setItem(s,n.toString()),!0}catch(i){return console.error(`设置配置项 ${t} 失败:`,i),!1}}logSettingsChange(t,n,a){this.settingsCache["developer.enabled"]&&this.settingsCache["developer.showDebugConfig"]&&console.log(`[Settings] ${t}:`,{old:n,new:a,time:new Date().toLocaleTimeString()})}resetSetting(t){this.isInitialized||this.init();const n=Re[t];if(!n){console.warn(`未定义的设置项: ${t}`);return}this.settingsCache[t]=n.default,this.saveSettings(),typeof window<"u"&&window.dispatchEvent(new CustomEvent(_t,{detail:{key:t,value:n.default}}))}resetAllSettings(){this.settingsCache={};for(const[t,n]of Object.entries(Re))this.settingsCache[t]=n.default;this.saveSettings()}watchSettings(t){if(typeof window>"u")return()=>{};const n=i=>{i.key===Yt&&(this.settingsCache=JSON.parse(i.newValue),t(this.settingsCache,null))},a=i=>{t(this.settingsCache,i)};return window.addEventListener("storage",n),window.addEventListener(_t,a),()=>{window.removeEventListener("storage",n),window.removeEventListener(_t,a)}}getSettingDefinition(t){return Re[t]||null}exportSettingsAsKeyValue(){this.isInitialized||this.init();const t={};for(const n in Re)t[n]=this.getSetting(n);return t}}const Te=new ms;typeof window<"u"&&Te.init();const Ie=e=>Te.getSetting(e),gs=(e,t)=>Te.setSetting(e,t),ys=e=>Te.resetSetting(e),hs=()=>Te.resetAllSettings(),Pa=e=>Te.watchSettings(e),bs=e=>Te.getSettingDefinition(e),ps=()=>Te.exportSettingsAsKeyValue(),zl=Object.freeze(Object.defineProperty({__proto__:null,SettingsManager:Te,exportSettingsAsKeyValue:ps,getSetting:Ie,getSettingDefinition:bs,requestNotificationPermission:fs,requestPersistentStorage:vs,resetAllSettings:hs,resetSetting:ys,setSetting:gs,settingsDefinitions:Re,watchSettings:Pa},Symbol.toStringTag,{value:"Module"}));class Ss{constructor(){this.logs=[]}async addLog(t){return this.logs.push(t),this.logs.length>100&&this.logs.shift(),!0}async getLogs(t=20){return this.logs.slice(-t).reverse()}}const Pt=new Ss,we=[];let At=null,Se=null;const ct={SUCCESS:"success",ERROR:"error",INFO:"info",WARNING:"warning"},ws={timeout:3e3,showSnackbar:!0,addToLog:!0};async function xt(e,t,n="",a={}){const i={...ws,...a},s={id:Date.now()+Math.random(),type:e,title:t,content:n.substring(0,500),timestamp:new Date};if(i.addToLog)try{for(await Pt.addLog(s),we.unshift(s);we.length>Ie("message.maxActiveMessages");)we.pop();Se==null||Se(we)}catch(o){console.error("保存日志失败:",o)}return i.showSnackbar&&(At==null||At(s)),s}function ks(e,t){let n=null;return function(...a){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,a)},t)}}const Xe={install:e=>{e.config.globalProperties.$message={success:(t,n,a)=>xt(ct.SUCCESS,t,n,a),error:(t,n,a)=>xt(ct.ERROR,t,n,a),info:(t,n,a)=>xt(ct.INFO,t,n,a),warning:(t,n,a)=>xt(ct.WARNING,t,n,a)}},onSnackbar:e=>{At=e},onLog:e=>{Se=e},getMessages:async()=>{try{return await Pt.getLogs()}catch(e){return console.error("获取日志失败:",e),[...we]}},clearMessages:async()=>{try{await Pt.clearLogs(),we.length=0,Se==null||Se(we)}catch(e){console.error("清除日志失败:",e)}},MessageType:ct,markAsRead:()=>{},deleteMessage:async e=>{try{await Pt.deleteLog(e);const t=we.findIndex(n=>n.id===e);t!==-1&&we.splice(t,1),Se==null||Se(we)}catch(t){console.error("删除消息失败:",t)}},getUnreadCount:()=>0,debounce:ks},Aa=(e,t)=>{const n=e.__vccOpts||e;for(const[a,i]of t)n[a]=i;return n},st=T({border:[Boolean,Number,String]},"border");function ot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{borderClasses:C(()=>{const a=e.border;return a===!0||a===""?`${t}--border`:typeof a=="string"||a===0?String(a).split(" ").map(i=>`border-${i}`):[]})}}const Cs=[null,"default","comfortable","compact"],Ge=T({density:{type:String,default:"default",validator:e=>Cs.includes(e)}},"density");function lt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{densityClasses:k(()=>`${t}--density-${e.density}`)}}const bt=T({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function pt(e){return{elevationClasses:k(()=>{const n=rn(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Oe=T({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Be(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{roundedClasses:C(()=>{const a=rn(e)?e.value:e.rounded,i=rn(e)?!1:e.tile,s=[];if(i||a===!1)s.push("rounded-0");else if(a===!0||a==="")s.push(`${t}--rounded`);else if(typeof a=="string"||a===0)for(const o of String(a).split(" "))s.push(`rounded-${o}`);return s})}}const le=T({tag:{type:[String,Object,Function],default:"div"}},"tag");function Vn(e){return bn(()=>{const{class:t,style:n}=xs(e);return{colorClasses:t,colorStyles:n}})}function tt(e){const{colorClasses:t,colorStyles:n}=Vn(()=>({text:se(e)}));return{textColorClasses:t,textColorStyles:n}}function Qe(e){const{colorClasses:t,colorStyles:n}=Vn(()=>({background:se(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function _s(e){return{text:typeof e.text=="string"?e.text.replace(/^text-/,""):e.text,background:typeof e.background=="string"?e.background.replace(/^bg-/,""):e.background}}function xs(e){const t=_s(se(e)),n=[],a={};if(t.background)if(jn(t.background)){if(a.backgroundColor=t.background,!t.text&&pi(t.background)){const i=Si(t.background);if(i.a==null||i.a===1){const s=wi(i);a.color=s,a.caretColor=s}}}else n.push(`bg-${t.background}`);return t.text&&(jn(t.text)?(a.color=t.text,a.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:a}}const Es=["elevated","flat","tonal","outlined","text","plain"];function St(e,t){return I(Ve,null,[e&&I("span",{key:"overlay",class:j(`${t}__overlay`)},null),I("span",{key:"underlay",class:j(`${t}__underlay`)},null)])}const Ue=T({color:String,variant:{type:String,default:"elevated",validator:e=>Es.includes(e)}},"variant");function wt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();const n=k(()=>{const{variant:s}=se(e);return`${t}--variant-${s}`}),{colorClasses:a,colorStyles:i}=Vn(()=>{const{variant:s,color:o}=se(e);return{[["elevated","flat"].includes(s)?"background":"text"]:o}});return{colorClasses:a,colorStyles:i,variantClasses:n}}const Va=T({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...st(),...ee(),...Ge(),...bt(),...Oe(),...le(),...fe(),...Ue()},"VBtnGroup"),ta=G()({name:"VBtnGroup",props:Va(),setup(e,t){let{slots:n}=t;const{themeClasses:a}=ye(e),{densityClasses:i}=lt(e),{borderClasses:s}=ot(e),{elevationClasses:o}=pt(e),{roundedClasses:l}=Be(e);Ft({VBtn:{height:k(()=>e.direction==="horizontal"?"auto":null),baseColor:k(()=>e.baseColor),color:k(()=>e.color),density:k(()=>e.density),flat:!0,variant:k(()=>e.variant)}}),Z(()=>b(e.tag,{class:j(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided},a.value,s.value,i.value,o.value,l.value,e.class]),style:X(e.style)},n))}}),Is=T({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Ps=T({value:null,disabled:Boolean,selectedClass:String},"group-item");function As(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const a=Ee("useGroupItem");if(!a)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const i=Cn();He(Symbol.for(`${t.description}:id`),i);const s=Le(t,null);if(!s){if(!n)return s;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=k(()=>e.value),l=C(()=>!!(s.disabled.value||e.disabled));function r(){s==null||s.register({id:i,value:o,disabled:l},a)}function u(){s==null||s.unregister(i)}r(),je(()=>u());const c=C(()=>s.isSelected(i)),m=C(()=>s.items.value[0].id===i),v=C(()=>s.items.value[s.items.value.length-1].id===i),d=C(()=>c.value&&[s.selectedClass.value,e.selectedClass]);return W(c,g=>{a.emit("group:selected",{value:g})},{flush:"sync"}),{id:i,isSelected:c,isFirst:m,isLast:v,toggle:()=>s.select(i,!c.value),select:g=>s.select(i,g),selectedClass:d,value:o,disabled:l,group:s,register:r,unregister:u}}function Vs(e,t){let n=!1;const a=vt([]),i=Pe(e,"modelValue",[],v=>v===void 0?[]:La(a,v===null?[null]:pn(v)),v=>{const d=Ts(a,v);return e.multiple?d:d[0]}),s=Ee("useGroup");function o(v,d){const g=v,f=Symbol.for(`${t.description}:id`),p=ki(f,s==null?void 0:s.vnode).indexOf(d);Yi(g.value)===void 0&&(g.value=p,g.useIndexAsValue=!0),p>-1?a.splice(p,0,g):a.push(g)}function l(v){if(n)return;r();const d=a.findIndex(g=>g.id===v);a.splice(d,1)}function r(){const v=a.find(d=>!d.disabled);v&&e.mandatory==="force"&&!i.value.length&&(i.value=[v.id])}it(()=>{r()}),je(()=>{n=!0}),Xi(()=>{for(let v=0;vf.id===v);if(!(d&&(g!=null&&g.disabled)))if(e.multiple){const f=i.value.slice(),S=f.findIndex(E=>E===v),p=~S;if(d=d??!p,p&&e.mandatory&&f.length<=1||!p&&e.max!=null&&f.length+1>e.max)return;S<0&&d?f.push(v):S>=0&&!d&&f.splice(S,1),i.value=f}else{const f=i.value.includes(v);if(e.mandatory&&f||!f&&!d)return;i.value=d??!f?[v]:[]}}function c(v){if(e.multiple,i.value.length){const d=i.value[0],g=a.findIndex(p=>p.id===d);let f=(g+v)%a.length,S=a[f];for(;S.disabled&&f!==g;)f=(f+v)%a.length,S=a[f];if(S.disabled)return;i.value=[a[f].id]}else{const d=a.find(g=>!g.disabled);d&&(i.value=[d.id])}}const m={register:o,unregister:l,selected:i,select:u,disabled:k(()=>e.disabled),prev:()=>c(a.length-1),next:()=>c(1),isSelected:v=>i.value.includes(v),selectedClass:k(()=>e.selectedClass),items:k(()=>a),getItemIndex:v=>Ls(a,v)};return He(t,m),m}function Ls(e,t){const n=La(e,[t]);return n.length?e.findIndex(a=>a.id===n[0]):-1}function La(e,t){const n=[];return t.forEach(a=>{const i=e.find(o=>Je(a,o.value)),s=e[a];(i==null?void 0:i.value)!==void 0?n.push(i.id):s!=null&&s.useIndexAsValue&&n.push(s.id)}),n}function Ts(e,t){const n=[];return t.forEach(a=>{const i=e.findIndex(s=>s.id===a);if(~i){const s=e[i];n.push(s.value!==void 0?s.value:i)}}),n}const Ta=Symbol.for("vuetify:v-btn-toggle"),Os=T({...Va(),...Is()},"VBtnToggle"),Wl=G()({name:"VBtnToggle",props:Os(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:a,next:i,prev:s,select:o,selected:l}=Vs(e,Ta);return Z(()=>{const r=ta.filterProps(e);return b(ta,Q({class:["v-btn-toggle",e.class]},r,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:a,next:i,prev:s,select:o,selected:l})]}})}),{next:i,prev:s,select:o}}}),Bs=T({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),ge=G(!1)({name:"VDefaultsProvider",props:Bs(),setup(e,t){let{slots:n}=t;const{defaults:a,disabled:i,reset:s,root:o,scoped:l}=Ji(e);return Ft(a,{reset:s,root:o,scoped:l,disabled:i}),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),Rs=["x-small","small","default","large","x-large"],Wt=T({size:{type:[String,Number],default:"default"}},"size");function qt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return bn(()=>{const n=e.size;let a,i;return Ci(Rs,n)?a=`${t}--size-${n}`:n&&(i={width:B(n),height:B(n)}),{sizeClasses:a,sizeStyles:i}})}const Ns=T({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:oe,opacity:[String,Number],...ee(),...Wt(),...le({tag:"i"}),...fe()},"VIcon"),xe=G()({name:"VIcon",props:Ns(),setup(e,t){let{attrs:n,slots:a}=t;const i=z(),{themeClasses:s}=Sa(),{iconData:o}=_i(()=>i.value||e.icon),{sizeClasses:l}=qt(e),{textColorClasses:r,textColorStyles:u}=tt(()=>e.color);return Z(()=>{var v,d;const c=(v=a.default)==null?void 0:v.call(a);c&&(i.value=(d=xi(c).filter(g=>g.type===Qi&&g.children&&typeof g.children=="string")[0])==null?void 0:d.children);const m=!!(n.onClick||n.onClickOnce);return b(o.value.component,{tag:e.tag,icon:o.value.icon,class:j(["v-icon","notranslate",s.value,l.value,r.value,{"v-icon--clickable":m,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:X([{"--v-icon-opacity":e.opacity},l.value?void 0:{fontSize:B(e.size),height:B(e.size),width:B(e.size)},u.value,e.style]),role:m?"button":void 0,"aria-hidden":!m,tabindex:m?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function Oa(e,t){const n=M(),a=z(!1);if(Sn){const i=new IntersectionObserver(s=>{a.value=!!s.find(o=>o.isIntersecting)},t);ve(()=>{i.disconnect()}),W(n,(s,o)=>{o&&(i.unobserve(o),a.value=!1),s&&i.observe(s)},{flush:"post"})}return{intersectionRef:n,isIntersecting:a}}const $s=T({reveal:{type:[Boolean,Object],default:!1}},"reveal");function Ds(e){const n=k(()=>typeof e.reveal=="object"?Math.max(0,Number(e.reveal.duration??900)):900),a=z(e.reveal?"initial":"disabled");return it(async()=>{e.reveal&&(a.value="initial",await new Promise(i=>requestAnimationFrame(i)),a.value="pending",await new Promise(i=>setTimeout(i,n.value)),a.value="done")}),{duration:n,state:a}}const Ms=T({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...ee(),...$s(),...Wt(),...le({tag:"div"}),...fe()},"VProgressCircular"),Fs=G()({name:"VProgressCircular",props:Ms(),setup(e,t){let{slots:n}=t;const a=20,i=2*Math.PI*a,s=M(),{themeClasses:o}=ye(e),{sizeClasses:l,sizeStyles:r}=qt(e),{textColorClasses:u,textColorStyles:c}=tt(()=>e.color),{textColorClasses:m,textColorStyles:v}=tt(()=>e.bgColor),{intersectionRef:d,isIntersecting:g}=Oa(),{resizeRef:f,contentRect:S}=wa(),{state:p,duration:E}=Ds(e),L=k(()=>p.value==="initial"?0:et(parseFloat(e.modelValue),0,100)),w=k(()=>Number(e.width)),h=k(()=>r.value?Number(e.size):S.value?S.value.width:Math.max(w.value,32)),_=k(()=>a/(1-w.value/h.value)*2),x=k(()=>w.value/h.value*_.value),y=k(()=>{const F=(100-L.value)/100*i;return e.rounded&&L.value>0&&L.value<100?B(Math.min(i-.01,F+x.value)):B(F)}),R=C(()=>{const F=Number(e.rotate);return e.rounded?F+x.value/2/i*360:F});return Ne(()=>{d.value=s.value,f.value=s.value}),Z(()=>b(e.tag,{ref:s,class:j(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||Tt()),"v-progress-circular--revealing":["initial","pending"].includes(p.value)},o.value,l.value,u.value,e.class]),style:X([r.value,c.value,{"--progress-reveal-duration":`${E.value}ms`},e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:L.value},{default:()=>[I("svg",{style:{transform:`rotate(calc(-90deg + ${R.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${_.value} ${_.value}`},[I("circle",{class:j(["v-progress-circular__underlay",m.value]),style:X(v.value),fill:"transparent",cx:"50%",cy:"50%",r:a,"stroke-width":x.value,"stroke-dasharray":i,"stroke-dashoffset":0},null),I("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:a,"stroke-width":x.value,"stroke-dasharray":i,"stroke-dashoffset":y.value,"stroke-linecap":e.rounded?"round":void 0},null)]),n.default&&I("div",{class:"v-progress-circular__content"},[n.default({value:L.value})])]})),{}}}),rt=T({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function ut(e){return{dimensionStyles:C(()=>{const n={},a=B(e.height),i=B(e.maxHeight),s=B(e.maxWidth),o=B(e.minHeight),l=B(e.minWidth),r=B(e.width);return a!=null&&(n.height=a),i!=null&&(n.maxHeight=i),s!=null&&(n.maxWidth=s),o!=null&&(n.minHeight=o),l!=null&&(n.minWidth=l),r!=null&&(n.width=r),n})}}const na={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Ht=T({location:String},"location");function Ln(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:a}=zt();return{locationStyles:C(()=>{if(!e.location)return{};const{side:s,align:o}=an(e.location.split(" ").length>1?e.location:`${e.location} center`,a.value);function l(u){return n?n(u):0}const r={};return s!=="center"&&(t?r[na[s]]=`calc(100% - ${l(s)}px)`:r[s]=0),o!=="center"?t?r[na[o]]=`calc(100% - ${l(o)}px)`:r[o]=0:(s==="center"?r.top=r.left="50%":r[{top:"left",bottom:"left",left:"top",right:"top"}[s]]="50%",r.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[s]),r})}}const zs=T({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function Ws(e,t){const n=k(()=>!!e.chunkCount||!!e.chunkWidth),a=C(()=>{const l=se(t);if(!l)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const r=Number(e.chunkCount);return(l-Number(e.chunkGap)*(r-1))/r}),i=k(()=>Number(e.chunkGap)),s=C(()=>{if(!n.value)return{};const l=B(i.value),r=B(a.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${r}, transparent ${r}, transparent)`,maskSize:`calc(${r} + ${l}) 100%`}});function o(l){const r=se(t);if(!r)return l;const u=100*i.value/r,c=100*(a.value+i.value)/r,m=Math.floor((l+u)/c+1e-9);return et(m*c-u/2,0,100)}return{hasChunks:n,chunksMaskStyles:s,snapValueToChunk:o}}const qs=T({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...zs(),...ee(),...Ht({location:"top"}),...Oe(),...le(),...fe()},"VProgressLinear"),Ba=G()({name:"VProgressLinear",props:qs(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const a=M(),i=Pe(e,"modelValue"),{isRtl:s,rtlClasses:o}=zt(),{themeClasses:l}=ye(e),{locationStyles:r}=Ln(e),{textColorClasses:u,textColorStyles:c}=tt(()=>e.color),{backgroundColorClasses:m,backgroundColorStyles:v}=Qe(()=>e.bgColor||e.color),{backgroundColorClasses:d,backgroundColorStyles:g}=Qe(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:f,backgroundColorStyles:S}=Qe(()=>e.color),{roundedClasses:p}=Be(e),{intersectionRef:E,isIntersecting:L}=Oa(),w=C(()=>parseFloat(e.max)),h=C(()=>parseFloat(e.height)),_=C(()=>et(parseFloat(e.bufferValue)/w.value*100,0,100)),x=C(()=>et(parseFloat(i.value)/w.value*100,0,100)),y=C(()=>s.value!==e.reverse),R=C(()=>e.indeterminate?"fade-transition":"slide-x-transition"),F=z(0),{hasChunks:A,chunksMaskStyles:V,snapValueToChunk:P}=Ws(e,F);ht(A,()=>{const{resizeRef:Y}=wa(te=>F.value=te[0].contentRect.width);Ne(()=>Y.value=a.value)});const N=C(()=>A.value?P(_.value):_.value),O=C(()=>A.value?P(x.value):x.value);function U(Y){if(!E.value)return;const{left:te,right:he,width:K}=E.value.getBoundingClientRect(),$=y.value?K-Y.clientX+(he-K):Y.clientX-te;i.value=Math.round($/K*w.value)}return Ne(()=>{E.value=a.value}),Z(()=>b(e.tag,{ref:a,class:j(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&L.value,"v-progress-linear--reverse":y.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},p.value,l.value,o.value,e.class]),style:X([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?B(h.value):0,"--v-progress-linear-height":B(h.value),...e.absolute?r.value:{}},V.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(i.value),w.value),onClick:e.clickable&&U},{default:()=>[e.stream&&I("div",{key:"stream",class:j(["v-progress-linear__stream",u.value]),style:{...c.value,[y.value?"left":"right"]:B(-h.value),borderTop:`${B(h.value/2)} dotted`,opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,top:`calc(50% - ${B(h.value/4)})`,width:B(100-_.value,"%"),"--v-progress-linear-stream-to":B(h.value*(y.value?1:-1))}},null),I("div",{class:j(["v-progress-linear__background",m.value]),style:X([v.value,{opacity:e.bgOpacity!=null?parseFloat(e.bgOpacity):void 0,width:e.stream?0:void 0}])},null),I("div",{class:j(["v-progress-linear__buffer",d.value]),style:X([g.value,{opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,width:B(N.value,"%")}])},null),b($e,{name:R.value},{default:()=>[e.indeterminate?I("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(Y=>I("div",{key:Y,class:j(["v-progress-linear__indeterminate",Y,f.value]),style:X(S.value)},null))]):I("div",{class:j(["v-progress-linear__determinate",f.value]),style:X([S.value,{width:B(O.value,"%")}])},null)]}),n.default&&I("div",{class:"v-progress-linear__content"},[n.default({value:x.value,buffer:_.value})])]})),{}}}),Ra=T({loading:[Boolean,String]},"loader");function Na(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{loaderClasses:k(()=>({[`${t}--loading`]:e.loading}))}}function Hs(e,t){var a;let{slots:n}=t;return I("div",{class:j(`${e.name}__loader`)},[((a=n.default)==null?void 0:a.call(n,{color:e.color,isActive:e.active}))||b(Ba,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const js=["static","relative","fixed","absolute","sticky"],Tn=T({position:{type:String,validator:e=>js.includes(e)}},"position");function On(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{positionClasses:k(()=>e.position?`${t}--${e.position}`:void 0)}}function Gs(){const e=Ee("useRoute");return C(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function Us(){var e,t;return(t=(e=Ee("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Bn(e,t){const n=xa("RouterLink"),a=k(()=>!!(e.href||e.to)),i=C(()=>(a==null?void 0:a.value)||Gn(t,"click")||Gn(e,"click"));if(typeof n=="string"||!("useLink"in n)){const m=k(()=>e.href);return{isLink:a,isRouterLink:k(()=>!1),isClickable:i,href:m,linkProps:vt({href:m}),route:k(()=>{}),navigate:k(()=>{})}}const s=n.useLink({to:k(()=>e.to||""),replace:k(()=>e.replace)}),o=C(()=>e.to?s:void 0),l=Gs(),r=C(()=>{var m,v,d;return o.value?e.exact?l.value?((d=o.value.isExactActive)==null?void 0:d.value)&&Je(o.value.route.value.query,l.value.query):((v=o.value.isExactActive)==null?void 0:v.value)??!1:((m=o.value.isActive)==null?void 0:m.value)??!1:!1}),u=C(()=>{var m;return e.to?(m=o.value)==null?void 0:m.route.value.href:e.href}),c=k(()=>!!e.to);return{isLink:a,isRouterLink:c,isClickable:i,isActive:r,route:k(()=>{var m;return(m=o.value)==null?void 0:m.route.value}),navigate:k(()=>{var m;return(m=o.value)==null?void 0:m.navigate}),href:u,linkProps:vt({href:u,"aria-current":k(()=>r.value?"page":void 0),"aria-disabled":k(()=>e.disabled&&a.value?"true":void 0),tabindex:k(()=>e.disabled&&a.value?"-1":void 0)})}}const Rn=T({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Jt=!1;function Ks(e,t){let n=!1,a,i;Ae&&(e!=null&&e.beforeEach)&&(de(()=>{window.addEventListener("popstate",s),a=e.beforeEach(()=>Jt?n?t():void 0:(Jt=!0,new Promise(o=>{setTimeout(()=>o(n?t():void 0))}))),i=e==null?void 0:e.afterEach(()=>{Jt=!1})}),ve(()=>{window.removeEventListener("popstate",s),a==null||a(),i==null||i()}));function s(o){var l;(l=o.state)!=null&&l.replaced||(n=!0,setTimeout(()=>n=!1))}}function Xs(e,t){W(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n!=null&&t&&de(()=>{t(n)})},{immediate:!0})}const un=Symbol("rippleStop"),Ys=80;function aa(e,t){e.style.transform=t,e.style.webkitTransform=t}function cn(e){return e.constructor.name==="TouchEvent"}function $a(e){return e.constructor.name==="KeyboardEvent"}const Js=function(e,t){var m;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=0,i=0;if(!$a(e)){const v=new Et(t),d=cn(e)?e.touches[e.touches.length-1]:e,g=wn([d.clientX,d.clientY]);a=g.x-v.left,i=g.y-v.top}let s=0,o=.3;(m=t._ripple)!=null&&m.circle?(o=.15,s=t.clientWidth/2,s=n.center?s:s+Math.sqrt((a-s)**2+(i-s)**2)/4):s=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const l=`${(t.clientWidth-s*2)/2}px`,r=`${(t.clientHeight-s*2)/2}px`,u=n.center?l:`${a-s}px`,c=n.center?r:`${i-s}px`;return{radius:s,scale:o,x:u,y:c,centerX:l,centerY:r}},Rt={show(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((d=t==null?void 0:t._ripple)!=null&&d.enabled))return;const a=document.createElement("span"),i=document.createElement("span");a.appendChild(i),a.className="v-ripple__container",n.class&&(a.className+=` ${n.class}`);const{radius:s,scale:o,x:l,y:r,centerX:u,centerY:c}=Js(e,t,n),m=`${s*2}px`;i.className="v-ripple__animation",i.style.width=m,i.style.height=m,t.appendChild(a);const v=window.getComputedStyle(t);v&&v.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),i.classList.add("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--visible"),aa(i,`translate(${l}, ${r}) scale3d(${o},${o},${o})`),i.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.classList.remove("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--in"),aa(i,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var s;if(!((s=e==null?void 0:e._ripple)!=null&&s.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(o=>!o.dataset.isHiding);if(n)n.dataset.isHiding="true";else return;const a=performance.now()-Number(n.dataset.activated),i=Math.max(250-a,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var l;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((l=n.parentNode)==null?void 0:l.parentNode)===e&&e.removeChild(n.parentNode)},300)},i)}};function Da(e){return typeof e>"u"||!!e}function mt(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[un])){if(e[un]=!0,cn(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||$a(e),n._ripple.class&&(t.class=n._ripple.class),cn(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Rt.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var a;(a=n==null?void 0:n._ripple)!=null&&a.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},Ys)}else Rt.show(e,n,t)}}function Nt(e){e[un]=!0}function ce(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{ce(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Rt.hide(t)}}function Ma(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let gt=!1;function Qs(e,t){!gt&&t.includes(e.key)&&(gt=!0,mt(e))}function Fa(e){gt=!1,ce(e)}function za(e){gt&&(gt=!1,ce(e))}function Wa(e,t,n){const{value:a,modifiers:i}=t,s=Da(a);s||Rt.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=s,e._ripple.centered=i.center,e._ripple.circle=i.circle;const o=sn(a)?a:{};o.class&&(e._ripple.class=o.class);const l=o.keys??["Enter","Space"];if(e._ripple.keyDownHandler=r=>Qs(r,l),s&&!n){if(i.stop){e.addEventListener("touchstart",Nt,{passive:!0}),e.addEventListener("mousedown",Nt);return}e.addEventListener("touchstart",mt,{passive:!0}),e.addEventListener("touchend",ce,{passive:!0}),e.addEventListener("touchmove",Ma,{passive:!0}),e.addEventListener("touchcancel",ce),e.addEventListener("mousedown",mt),e.addEventListener("mouseup",ce),e.addEventListener("mouseleave",ce),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",Fa),e.addEventListener("blur",za),e.addEventListener("dragstart",ce,{passive:!0})}else!s&&n&&qa(e)}function qa(e){var t;e.removeEventListener("touchstart",Nt),e.removeEventListener("mousedown",Nt),e.removeEventListener("touchstart",mt),e.removeEventListener("touchend",ce),e.removeEventListener("touchmove",Ma),e.removeEventListener("touchcancel",ce),e.removeEventListener("mousedown",mt),e.removeEventListener("mouseup",ce),e.removeEventListener("mouseleave",ce),(t=e._ripple)!=null&&t.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",Fa),e.removeEventListener("blur",za),e.removeEventListener("dragstart",ce)}function Zs(e,t){Wa(e,t,!1)}function eo(e){qa(e),delete e._ripple}function to(e,t){if(t.value===t.oldValue)return;const n=Da(t.oldValue);Wa(e,t,n)}const yt={mounted:Zs,unmounted:eo,updated:to},no=T({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:Ta},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:oe,appendIcon:oe,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...st(),...ee(),...Ge(),...rt(),...bt(),...Ps(),...Ra(),...Ht(),...Tn(),...Oe(),...Rn(),...Wt(),...le({tag:"button"}),...fe(),...Ue({variant:"elevated"})},"VBtn"),Ha=G()({name:"VBtn",props:no(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{borderClasses:s}=ot(e),{densityClasses:o}=lt(e),{dimensionStyles:l}=ut(e),{elevationClasses:r}=pt(e),{loaderClasses:u}=Na(e),{locationStyles:c}=Ln(e),{positionClasses:m}=On(e),{roundedClasses:v}=Be(e),{sizeClasses:d,sizeStyles:g}=qt(e),f=As(e,e.symbol,!1),S=Bn(e,n),p=C(()=>{var A;return e.active!==void 0?e.active:S.isRouterLink.value?(A=S.isActive)==null?void 0:A.value:f==null?void 0:f.isSelected.value}),E=k(()=>p.value?e.activeColor??e.color:e.color),L=C(()=>{var V,P;return{color:(f==null?void 0:f.isSelected.value)&&(!S.isLink.value||((V=S.isActive)==null?void 0:V.value))||!f||((P=S.isActive)==null?void 0:P.value)?E.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:w,colorStyles:h,variantClasses:_}=wt(L),x=C(()=>(f==null?void 0:f.disabled.value)||e.disabled),y=k(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),R=C(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function F(A){var V,P;x.value||S.isLink.value&&(A.metaKey||A.ctrlKey||A.shiftKey||A.button!==0||n.target==="_blank")||(S.isRouterLink.value?(P=(V=S.navigate).value)==null||P.call(V,A):f==null||f.toggle())}return Xs(S,f==null?void 0:f.select),Z(()=>{const A=S.isLink.value?"a":e.tag,V=!!(e.prependIcon||a.prepend),P=!!(e.appendIcon||a.append),N=!!(e.icon&&e.icon!==!0);return We(b(A,Q(S.linkProps,{type:A==="a"?void 0:"button",class:["v-btn",f==null?void 0:f.selectedClass.value,{"v-btn--active":p.value,"v-btn--block":e.block,"v-btn--disabled":x.value,"v-btn--elevated":y.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],i.value,s.value,w.value,o.value,r.value,u.value,m.value,v.value,d.value,_.value,e.class],style:[h.value,l.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:x.value&&A!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:F,value:R.value}),{default:()=>{var O;return[St(!0,"v-btn"),!e.icon&&V&&I("span",{key:"prepend",class:"v-btn__prepend"},[a.prepend?b(ge,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},a.prepend):b(xe,{key:"prepend-icon",icon:e.prependIcon},null)]),I("span",{class:"v-btn__content","data-no-activator":""},[!a.default&&N?b(xe,{key:"content-icon",icon:e.icon},null):b(ge,{key:"content-defaults",disabled:!N,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var U;return[((U=a.default)==null?void 0:U.call(a))??_e(e.text)]}})]),!e.icon&&P&&I("span",{key:"append",class:"v-btn__append"},[a.append?b(ge,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},a.append):b(xe,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&I("span",{key:"loader",class:"v-btn__loader"},[((O=a.loader)==null?void 0:O.call(a))??b(Fs,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[yt,!x.value&&e.ripple,"",{center:!!e.icon}]])}),{group:f}}});function Qt(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ao(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ia(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:a}=e,i=a==="left"?0:a==="center"?t.width/2:a==="right"?t.width:a,s=n==="top"?0:n==="bottom"?t.height:n;return Qt({x:i,y:s},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:a}=e,i=n==="left"?0:n==="right"?t.width:n,s=a==="top"?0:a==="center"?t.height/2:a==="bottom"?t.height:a;return Qt({x:i,y:s},t)}return Qt({x:t.width/2,y:t.height/2},t)}const ja={static:oo,connected:ro},io=T({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in ja},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array],stickToTarget:Boolean,viewportMargin:{type:[Number,String],default:12}},"VOverlay-location-strategies");function so(e,t){const n=M({}),a=M();Ae&&ht(()=>!!(t.isActive.value&&e.locationStrategy),l=>{var r,u;W(()=>e.locationStrategy,l),ve(()=>{window.removeEventListener("resize",i),visualViewport==null||visualViewport.removeEventListener("resize",s),visualViewport==null||visualViewport.removeEventListener("scroll",o),a.value=void 0}),window.addEventListener("resize",i,{passive:!0}),visualViewport==null||visualViewport.addEventListener("resize",s,{passive:!0}),visualViewport==null||visualViewport.addEventListener("scroll",o,{passive:!0}),typeof e.locationStrategy=="function"?a.value=(r=e.locationStrategy(t,e,n))==null?void 0:r.updateLocation:a.value=(u=ja[e.locationStrategy](t,e,n))==null?void 0:u.updateLocation});function i(l){var r;(r=a.value)==null||r.call(a,l)}function s(l){var r;(r=a.value)==null||r.call(a,l)}function o(l){var r;(r=a.value)==null||r.call(a,l)}return{contentStyles:n,updateLocation:a}}function oo(){}function lo(e,t){const n=ka(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function ro(e,t,n){(Array.isArray(e.target.value)||Ei(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:i,preferredOrigin:s}=bn(()=>{const p=an(t.location,e.isRtl.value),E=t.origin==="overlap"?p:t.origin==="auto"?Xt(p):an(t.origin,e.isRtl.value);return p.side===E.side&&p.align===Kt(E).align?{preferredAnchor:Xn(p),preferredOrigin:Xn(E)}:{preferredAnchor:p,preferredOrigin:E}}),[o,l,r,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(p=>C(()=>{const E=parseFloat(t[p]);return isNaN(E)?1/0:E})),c=C(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const p=t.offset.split(" ").map(parseFloat);return p.length<2&&p.push(0),p}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let m=!1,v=-1;const d=new Ii(4),g=new ResizeObserver(()=>{if(!m)return;if(requestAnimationFrame(E=>{E!==v&&d.clear(),requestAnimationFrame(L=>{v=L})}),d.isFull){const E=d.values();if(Je(E.at(-1),E.at(-3))&&!Je(E.at(-1),E.at(-2)))return}const p=S();p&&d.push(p.flipped)});let f=new Et({x:0,y:0,width:0,height:0});W(e.target,(p,E)=>{E&&!Array.isArray(E)&&g.unobserve(E),Array.isArray(p)?Je(p,E)||S():p&&g.observe(p)},{immediate:!0}),W(e.contentEl,(p,E)=>{E&&g.unobserve(E),p&&g.observe(p)},{immediate:!0}),ve(()=>{g.disconnect()});function S(){if(m=!1,requestAnimationFrame(()=>m=!0),!e.target.value||!e.contentEl.value)return;(Array.isArray(e.target.value)||e.target.value.offsetParent||e.target.value.getClientRects().length)&&(f=wn(e.target.value));const p=lo(e.contentEl.value,e.isRtl.value),E=Ot(e.contentEl.value),L=Number(t.viewportMargin);E.length||(E.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(p.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),p.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const w=E.reduce((P,N)=>{const O=Pi(N);return P?new Et({x:Math.max(P.left,O.left),y:Math.max(P.top,O.top),width:Math.min(P.right,O.right)-Math.max(P.left,O.left),height:Math.min(P.bottom,O.bottom)-Math.max(P.top,O.top)}):O},void 0);t.stickToTarget?(w.x+=Math.min(L,f.x),w.y+=Math.min(L,f.y),w.width=Math.max(w.width-L*2,f.x+f.width-L),w.height=Math.max(w.height-L*2,f.y+f.height-L)):(w.x+=L,w.y+=L,w.width-=L*2,w.height-=L*2);let h={anchor:i.value,origin:s.value};function _(P){const N=new Et(p),O=ia(P.anchor,f),U=ia(P.origin,N);let{x:Y,y:te}=ao(O,U);switch(P.anchor.side){case"top":te-=c.value[0];break;case"bottom":te+=c.value[0];break;case"left":Y-=c.value[0];break;case"right":Y+=c.value[0];break}switch(P.anchor.align){case"top":te-=c.value[1];break;case"bottom":te+=c.value[1];break;case"left":Y-=c.value[1];break;case"right":Y+=c.value[1];break}return N.x+=Y,N.y+=te,N.width=Math.min(N.width,r.value),N.height=Math.min(N.height,u.value),{overflows:Kn(N,w),x:Y,y:te}}let x=0,y=0;const R={x:0,y:0},F={x:!1,y:!1};let A=-1;for(;!(A++>10);){const{x:P,y:N,overflows:O}=_(h);x+=P,y+=N,p.x+=P,p.y+=N;{const U=Un(h.anchor),Y=O.x.before||O.x.after,te=O.y.before||O.y.after;let he=!1;if(["x","y"].forEach(K=>{if(K==="x"&&Y&&!F.x||K==="y"&&te&&!F.y){const $={anchor:{...h.anchor},origin:{...h.origin}},J=K==="x"?U==="y"?Kt:Xt:U==="y"?Xt:Kt;$.anchor=J($.anchor),$.origin=J($.origin);const{overflows:q}=_($);(q[K].before<=O[K].before&&q[K].after<=O[K].after||q[K].before+q[K].after<(O[K].before+O[K].after)/2)&&(h=$,he=F[K]=!0)}}),he)continue}O.x.before&&(x+=O.x.before,p.x+=O.x.before),O.x.after&&(x-=O.x.after,p.x-=O.x.after),O.y.before&&(y+=O.y.before,p.y+=O.y.before),O.y.after&&(y-=O.y.after,p.y-=O.y.after);{const U=Kn(p,w);R.x=w.width-U.x.before-U.x.after,R.y=w.height-U.y.before-U.y.after,x+=U.x.before,p.x+=U.x.before,y+=U.y.before,p.y+=U.y.before}break}const V=Un(h.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${h.anchor.side} ${h.anchor.align}`,transformOrigin:`${h.origin.side} ${h.origin.align}`,top:B(Zt(y)),left:e.isRtl.value?void 0:B(Zt(x)),right:e.isRtl.value?B(Zt(-x)):void 0,minWidth:B(V==="y"?Math.min(o.value,f.width):o.value),maxWidth:B(sa(et(R.x,o.value===1/0?0:o.value,r.value))),maxHeight:B(sa(et(R.y,l.value===1/0?0:l.value,u.value)))}),{available:R,contentBox:p,flipped:F}}return W(()=>[i.value,s.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>S()),de(()=>{const p=S();if(!p)return;const{available:E,contentBox:L}=p;L.height>E.y&&requestAnimationFrame(()=>{S(),requestAnimationFrame(()=>{S()})})}),{updateLocation:S}}function Zt(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function sa(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let dn=!0;const $t=[];function uo(e){!dn||$t.length?($t.push(e),fn()):(dn=!1,e(),fn())}let oa=-1;function fn(){cancelAnimationFrame(oa),oa=requestAnimationFrame(()=>{const e=$t.shift();e&&e(),$t.length?fn():dn=!0})}const Vt={none:null,close:vo,block:mo,reposition:go},co=T({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Vt}},"VOverlay-scroll-strategies");function fo(e,t){if(!Ae)return;let n;Ne(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=Ea(),await new Promise(a=>setTimeout(a)),n.active&&n.run(()=>{var a;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(a=Vt[e.scrollStrategy])==null||a.call(Vt,t,e,n)}))}),ve(()=>{n==null||n.stop()})}function vo(e){function t(n){e.isActive.value=!1}Ga(Nn(e.target.value,e.contentEl.value),t)}function mo(e,t){var l;const n=(l=e.root.value)==null?void 0:l.offsetParent,a=Nn(e.target.value,e.contentEl.value),i=[...new Set([...Ot(a,t.contained?n:void 0),...Ot(e.contentEl.value,t.contained?n:void 0)])].filter(r=>!r.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,o=(r=>Ai(r)&&r)(n||document.documentElement);o&&e.root.value.classList.add("v-overlay--scroll-blocked"),i.forEach((r,u)=>{r.style.setProperty("--v-body-scroll-x",B(-r.scrollLeft)),r.style.setProperty("--v-body-scroll-y",B(-r.scrollTop)),r!==document.documentElement&&r.style.setProperty("--v-scrollbar-offset",B(s)),r.classList.add("v-overlay-scroll-blocked")}),ve(()=>{i.forEach((r,u)=>{const c=parseFloat(r.style.getPropertyValue("--v-body-scroll-x")),m=parseFloat(r.style.getPropertyValue("--v-body-scroll-y")),v=r.style.scrollBehavior;r.style.scrollBehavior="auto",r.style.removeProperty("--v-body-scroll-x"),r.style.removeProperty("--v-body-scroll-y"),r.style.removeProperty("--v-scrollbar-offset"),r.classList.remove("v-overlay-scroll-blocked"),r.scrollLeft=-c,r.scrollTop=-m,r.style.scrollBehavior=v}),o&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function go(e,t,n){let a=!1,i=-1,s=-1;function o(l){uo(()=>{var c,m;const r=performance.now();(m=(c=e.updateLocation).value)==null||m.call(c,l),a=(performance.now()-r)/(1e3/60)>2})}s=(typeof requestIdleCallback>"u"?l=>l():requestIdleCallback)(()=>{n.run(()=>{Ga(Nn(e.target.value,e.contentEl.value),l=>{a?(cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{o(l)})})):o(l)})})}),ve(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(s),cancelAnimationFrame(i)})}function Nn(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!(t!=null&&t.contains(n))):e??t}function Ga(e,t){const n=[document,...Ot(e)];n.forEach(a=>{a.addEventListener("scroll",t,{passive:!0})}),ve(()=>{n.forEach(a=>{a.removeEventListener("scroll",t)})})}const yo=Symbol.for("vuetify:v-menu"),ho=T({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function bo(e,t){let n=()=>{};function a(o,l){n==null||n();const r=o?e.openDelay:e.closeDelay,u=Math.max((l==null?void 0:l.minDelay)??0,Number(r??0));return new Promise(c=>{n=Vi(u,()=>{t==null||t(o),c(o)})})}function i(){return a(!0)}function s(o){return a(!1,o)}return{clearDelay:n,runOpenDelay:i,runCloseDelay:s}}const po=T({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...ho()},"VOverlay-activator");function So(e,t){let{isActive:n,isTop:a,contentEl:i}=t;const s=Ee("useActivator"),o=M();let l=!1,r=!1,u=!0;const c=C(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),m=C(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:v,runCloseDelay:d}=bo(e,y=>{y===(e.openOnHover&&l||c.value&&r)&&!(e.openOnHover&&n.value&&!a.value)&&(n.value!==y&&(u=!0),n.value=y)}),g=M(),f={onClick:y=>{y.stopPropagation(),o.value=y.currentTarget||y.target,n.value||(g.value=[y.clientX,y.clientY]),n.value=!n.value},onMouseenter:y=>{l=!0,o.value=y.currentTarget||y.target,v()},onMouseleave:y=>{l=!1,d()},onFocus:y=>{Oi(y.target,":focus-visible")!==!1&&(r=!0,y.stopPropagation(),o.value=y.currentTarget||y.target,v())},onBlur:y=>{r=!1,y.stopPropagation(),d({minDelay:1})}},S=C(()=>{const y={};return m.value&&(y.onClick=f.onClick),e.openOnHover&&(y.onMouseenter=f.onMouseenter,y.onMouseleave=f.onMouseleave),c.value&&(y.onFocus=f.onFocus,y.onBlur=f.onBlur),y}),p=C(()=>{const y={};if(e.openOnHover&&(y.onMouseenter=()=>{l=!0,v()},y.onMouseleave=()=>{l=!1,d()}),c.value&&(y.onFocusin=R=>{R.target.matches(":focus-visible")&&(r=!0,v())},y.onFocusout=()=>{r=!1,d({minDelay:1})}),e.closeOnContentClick){const R=Le(yo,null);y.onClick=()=>{n.value=!1,R==null||R.closeParents()}}return y}),E=C(()=>{const y={};return e.openOnHover&&(y.onMouseenter=()=>{u&&(l=!0,u=!1,v())},y.onMouseleave=()=>{l=!1,d()}),y});W(a,y=>{var R;y&&(e.openOnHover&&!l&&(!c.value||!r)||c.value&&!r&&(!e.openOnHover||!l))&&!((R=i.value)!=null&&R.contains(document.activeElement))&&d()}),W(n,y=>{y||setTimeout(()=>{g.value=void 0})},{flush:"post"});const L=Yn();Ne(()=>{L.value&&de(()=>{o.value=L.el})});const w=Yn(),h=C(()=>e.target==="cursor"&&g.value?g.value:w.value?w.el:Ua(e.target,s)||o.value),_=C(()=>Array.isArray(h.value)?void 0:h.value);let x;return W(()=>!!e.activator,y=>{y&&Ae?(x=Ea(),x.run(()=>{wo(e,s,{activatorEl:o,activatorEvents:S})})):x&&x.stop()},{flush:"post",immediate:!0}),ve(()=>{x==null||x.stop()}),{activatorEl:o,activatorRef:L,target:h,targetEl:_,targetRef:w,activatorEvents:S,contentEvents:p,scrimEvents:E}}function wo(e,t,n){let{activatorEl:a,activatorEvents:i}=n;W(()=>e.activator,(r,u)=>{if(u&&r!==u){const c=l(u);c&&o(c)}r&&de(()=>s())},{immediate:!0}),W(()=>e.activatorProps,()=>{s()}),ve(()=>{o()});function s(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;r&&Li(r,Q(i.value,u))}function o(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;r&&Ti(r,Q(i.value,u))}function l(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=Ua(r,t);return a.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,a.value}}function Ua(e,t){var a,i;if(!e)return;let n;if(e==="parent"){let s=(i=(a=t==null?void 0:t.proxy)==null?void 0:a.$el)==null?void 0:i.parentNode;for(;s!=null&&s.hasAttribute("data-no-activator");)s=s.parentNode;n=s}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const ko=T({retainFocus:Boolean,captureFocus:Boolean,disableInitialFocus:Boolean},"focusTrap"),Lt=new Map;let la=0;function ra(e){const t=document.activeElement;if(e.key!=="Tab"||!t)return;const n=Array.from(Lt.values()).filter(u=>{var v;let{isActive:c,contentEl:m}=u;return c.value&&((v=m.value)==null?void 0:v.contains(t))}).map(u=>u.contentEl.value);let a,i=t.parentElement;for(;i;){if(n.includes(i)){a=i;break}i=i.parentElement}if(!a)return;const s=It(a).filter(u=>u.tabIndex>=0);if(!s.length)return;const o=document.activeElement;if(s.length===1&&s[0].classList.contains("v-list")&&s[0].contains(o)){e.preventDefault();return}const l=s[0],r=s[s.length-1];e.shiftKey&&(o===l||l.classList.contains("v-list")&&l.contains(o))&&(e.preventDefault(),r.focus()),!e.shiftKey&&(o===r||r.classList.contains("v-list")&&r.contains(o))&&(e.preventDefault(),l.focus())}function Co(e,t){let{isActive:n,localTop:a,activatorEl:i,contentEl:s}=t;const o=Symbol("trap");let l=!1,r=-1;async function u(){l=!0,r=window.setTimeout(()=>{l=!1},100)}async function c(d){var S;const g=d.relatedTarget,f=d.target;document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",m),await new Promise(p=>requestAnimationFrame(p)),n.value&&!l&&g!==f&&s.value&&se(a)&&![document,s.value].includes(f)&&!s.value.contains(f)&&((S=It(s.value)[0])==null||S.focus())}function m(d){if(d.key==="Tab"&&(document.removeEventListener("keydown",m),n.value&&s.value&&d.target&&!s.value.contains(d.target))){const g=It(document.documentElement);if(d.shiftKey&&d.target===g.at(0)||!d.shiftKey&&d.target===g.at(-1)){const f=It(s.value);f.length>0&&(d.preventDefault(),f[0].focus())}}}const v=k(()=>n.value&&e.captureFocus&&!e.disableInitialFocus);Ae&&(W(()=>e.retainFocus,d=>{d?Lt.set(o,{isActive:n,contentEl:s}):Lt.delete(o)},{immediate:!0}),W(v,d=>{d?(document.addEventListener("pointerdown",u),document.addEventListener("focusin",c,{once:!0}),document.addEventListener("keydown",m)):(document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",m))},{immediate:!0}),la++<1&&document.addEventListener("keydown",ra)),ve(()=>{Lt.delete(o),clearTimeout(r),document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",m),--la<1&&document.removeEventListener("keydown",ra)})}function _o(){if(!Ae)return z(!1);const{ssr:e}=Bi();if(e){const t=z(!1);return it(()=>{t.value=!0}),t}else return z(!0)}const xo=T({eager:Boolean},"lazy");function Eo(e,t){const n=z(!1),a=k(()=>n.value||e.eager||t.value);W(t,()=>n.value=!0);function i(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:a,onAfterLeave:i}}function $n(){const t=Ee("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const ua=Symbol.for("vuetify:stack"),dt=vt([]);function Io(e,t,n){const a=Ee("useStack"),i=!n,s=Le(ua,void 0),o=vt({activeChildren:new Set});He(ua,o);const l=z(Number(se(t)));ht(e,()=>{var m;const c=(m=dt.at(-1))==null?void 0:m[1];l.value=c?c+10:Number(se(t)),i&&dt.push([a.uid,l.value]),s==null||s.activeChildren.add(a.uid),ve(()=>{if(i){const v=ne(dt).findIndex(d=>d[0]===a.uid);dt.splice(v,1)}s==null||s.activeChildren.delete(a.uid)})});const r=z(!0);i&&Ne(()=>{var m;const c=((m=dt.at(-1))==null?void 0:m[0])===a.uid;setTimeout(()=>r.value=c)});const u=k(()=>!o.activeChildren.size);return{globalTop:Ia(r),localTop:u,stackStyles:k(()=>({zIndex:l.value}))}}function Po(e){return{teleportTarget:C(()=>{const n=e();if(n===!0||!Ae)return;const a=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(a==null)return;let i=[...a.children].find(s=>s.matches(".v-overlay-container"));return i||(i=document.createElement("div"),i.className="v-overlay-container",a.appendChild(i)),i})}}const Ka=T({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),Ye=(e,t)=>{let{slots:n}=t;const{transition:a,disabled:i,group:s,...o}=e,{component:l=s?_n:$e,...r}=sn(a)?a:{};let u;return sn(a)?u=Q(r,Ri({disabled:i,group:s}),o):u=Q({name:i||!a?"":a},o),xn(l,u,n)};function Ao(){return!0}function Xa(e,t,n){if(!e||Ya(e,n)===!1)return!1;const a=Ca(t);if(typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&a.host===e.target)return!1;const i=(typeof n.value=="object"&&n.value.include||(()=>[]))();return i.push(t),!i.some(s=>s==null?void 0:s.contains(e.target))}function Ya(e,t){return(typeof t.value=="object"&&t.value.closeConditional||Ao)(e)}function Vo(e,t,n){const a=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&Xa(e,t,n)&&setTimeout(()=>{Ya(e,n)&&a&&a(e)},0)}function ca(e,t){const n=Ca(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const da={mounted(e,t){const n=i=>Vo(i,e,t),a=i=>{e._clickOutside.lastMousedownWasOutside=Xa(i,e,t)};ca(e,i=>{i.addEventListener("click",n,!0),i.addEventListener("mousedown",a,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:a}},beforeUnmount(e,t){e._clickOutside&&(ca(e,n=>{var s;if(!n||!((s=e._clickOutside)!=null&&s[t.instance.$.uid]))return;const{onClick:a,onMousedown:i}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",a,!0),n.removeEventListener("mousedown",i,!0)}),delete e._clickOutside[t.instance.$.uid])}};function Lo(e){const{modelValue:t,color:n,...a}=e;return b($e,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&I("div",Q({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},a),null)]})}const Dn=T({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...po(),...ee(),...rt(),...xo(),...io(),...co(),...ko(),...fe(),...Ka()},"VOverlay"),Dt=G()({name:"VOverlay",directives:{vClickOutside:da},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...at(Dn(),["disableInitialFocus"])},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:a,emit:i}=t;const s=Ee("VOverlay"),o=M(),l=M(),r=M(),u=Pe(e,"modelValue"),c=C({get:()=>u.value,set:H=>{H&&e.disabled||(u.value=H)}}),{themeClasses:m}=ye(e),{rtlClasses:v,isRtl:d}=zt(),{hasContent:g,onAfterLeave:f}=Eo(e,c),S=Qe(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:p,localTop:E,stackStyles:L}=Io(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:w,activatorRef:h,target:_,targetEl:x,targetRef:y,activatorEvents:R,contentEvents:F,scrimEvents:A}=So(e,{isActive:c,isTop:E,contentEl:r}),{teleportTarget:V}=Po(()=>{var Me,D,re;const H=e.attach||e.contained;if(H)return H;const ue=((Me=w==null?void 0:w.value)==null?void 0:Me.getRootNode())||((re=(D=s.proxy)==null?void 0:D.$el)==null?void 0:re.getRootNode());return ue instanceof ShadowRoot?ue:!1}),{dimensionStyles:P}=ut(e),N=_o(),{scopeId:O}=$n();W(()=>e.disabled,H=>{H&&(c.value=!1)});const{contentStyles:U,updateLocation:Y}=so(e,{isRtl:d,contentEl:r,target:_,isActive:c});fo(e,{root:o,contentEl:r,targetEl:x,target:_,isActive:c,updateLocation:Y});function te(H){i("click:outside",H),e.persistent?be():c.value=!1}function he(H){return c.value&&E.value&&(!e.scrim||H.target===l.value||H instanceof MouseEvent&&H.shadowTarget===l.value)}Co(e,{isActive:c,localTop:E,contentEl:r,activatorEl:w}),Ae&&W(c,H=>{H?window.addEventListener("keydown",K):window.removeEventListener("keydown",K)},{immediate:!0}),je(()=>{Ae&&window.removeEventListener("keydown",K)});function K(H){var ue,Me,D;H.key==="Escape"&&p.value&&((ue=r.value)!=null&&ue.contains(document.activeElement)||i("keydown",H),e.persistent?be():(c.value=!1,(Me=r.value)!=null&&Me.contains(document.activeElement)&&((D=w.value)==null||D.focus())))}function $(H){H.key==="Escape"&&!p.value||i("keydown",H)}const J=Us();ht(()=>e.closeOnBack,()=>{Ks(J,()=>{if(p.value&&c.value)return e.persistent?be():c.value=!1,!1})});const q=M();W(()=>c.value&&(e.absolute||e.contained)&&V.value==null,H=>{if(H){const ue=Ni(o.value);ue&&ue!==document.scrollingElement&&(q.value=ue.scrollTop)}});function be(){e.noClickAnimation||r.value&&Fe(r.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:on})}function Ke(){i("afterEnter")}function De(){f(),i("afterLeave")}return Z(()=>{var H;return I(Ve,null,[(H=n.activator)==null?void 0:H.call(n,{isActive:c.value,targetRef:y,props:Q({ref:h},R.value,e.activatorProps)}),N.value&&g.value&&b(Zi,{disabled:!V.value,to:V.value},{default:()=>[I("div",Q({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},m.value,v.value,e.class],style:[L.value,{"--v-overlay-opacity":e.opacity,top:B(q.value)},e.style],ref:o,onKeydown:$},O,a),[b(Lo,Q({color:S,modelValue:c.value&&!!e.scrim,ref:l},A.value),null),b(Ye,{appear:!0,persisted:!0,transition:e.transition,target:_.value,onAfterEnter:Ke,onAfterLeave:De},{default:()=>{var ue;return[We(I("div",Q({ref:r,class:["v-overlay__content",e.contentClass],style:[P.value,U.value]},F.value,e.contentProps),[(ue=n.default)==null?void 0:ue.call(n,{isActive:c})]),[[En,c.value],[da,{handler:te,closeConditional:he,include:()=>[w.value]}]])]}})])]})])}),{activatorEl:w,scrimEl:l,target:_,animateClick:be,contentEl:r,rootEl:o,globalTop:p,localTop:E,updateLocation:Y}}}),en=Symbol("Forwarded refs");function tn(e,t){let n=e;for(;n;){const a=Reflect.getOwnPropertyDescriptor(n,t);if(a)return a;n=Object.getPrototypeOf(n)}}function Ja(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;at.value=e())}function s(o){const l=o?getComputedStyle(o):{transitionDuration:.2},r=parseFloat(l.transitionDuration)*1e3||200;if(a(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+r;t.value=Math.max(e()-c,0),t.value<=0&&a()},r)}return ve(a),{clear:a,time:t,start:s,reset:i}}const Oo=T({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Ht({location:"bottom"}),...Tn(),...Oe(),...Ue(),...fe(),...at(Dn({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","retainFocus","captureFocus","disableInitialFocus","scrim","scrollStrategy","stickToTarget","viewportMargin"])},"VSnackbar"),Bo=G()({name:"VSnackbar",props:Oo(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const a=Pe(e,"modelValue"),{positionClasses:i}=On(e),{scopeId:s}=$n(),{themeClasses:o}=ye(e),{colorClasses:l,colorStyles:r,variantClasses:u}=wt(e),{roundedClasses:c}=Be(e),m=To(()=>Number(e.timeout)),v=M(),d=M(),g=z(!1),f=z(0),S=M(),p=Le(Mi,void 0);ht(()=>!!p,()=>{const A=$i();Ne(()=>{S.value=A.mainStyles.value})}),W(a,L),W(()=>e.timeout,L),it(()=>{a.value&&L()});let E=-1;function L(){m.reset(),window.clearTimeout(E);const A=Number(e.timeout);if(!a.value||A===-1)return;const V=Di(d.value);m.start(V),E=window.setTimeout(()=>{a.value=!1},A)}function w(){m.reset(),window.clearTimeout(E)}function h(){g.value=!0,w()}function _(){g.value=!1,L()}function x(A){f.value=A.touches[0].clientY}function y(A){Math.abs(f.value-A.changedTouches[0].clientY)>50&&(a.value=!1)}function R(){g.value&&_()}const F=C(()=>e.location.split(" ").reduce((A,V)=>(A[`v-snackbar--${V}`]=!0,A),{}));return Z(()=>{const A=Dt.filterProps(e),V=!!(n.default||n.text||e.text);return b(Dt,Q({ref:v,class:["v-snackbar",{"v-snackbar--active":a.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},F.value,i.value,e.class],style:[S.value,e.style]},A,{modelValue:a.value,"onUpdate:modelValue":P=>a.value=P,contentProps:Q({class:["v-snackbar__wrapper",o.value,l.value,c.value,u.value],style:[r.value],onPointerenter:h,onPointerleave:_},A.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:x,onTouchend:y,onAfterLeave:R},s),{default:()=>{var P,N;return[St(!1,"v-snackbar"),e.timer&&!g.value&&I("div",{key:"timer",class:"v-snackbar__timer"},[b(Ba,{ref:d,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:m.time.value},null)]),V&&I("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((P=n.text)==null?void 0:P.call(n))??e.text,(N=n.default)==null?void 0:N.call(n)]),n.actions&&b(ge,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[I("div",{class:"v-snackbar__actions"},[n.actions({isActive:a})])]})]},activator:n.activator})}),Ja({},v)}}),Ro=es({name:"GlobalMessage",setup(){var s;const e=M(!1),t=M(null),n={success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"},a={success:"success",error:"error",warning:"warning",info:"info"},i=(s=Xe==null?void 0:Xe.onSnackbar)==null?void 0:s.call(Xe,async o=>{o&&(e.value&&(e.value=!1,await de()),t.value=o,e.value=!0)});return je(()=>i==null?void 0:i()),{snackbar:e,message:t,icons:n,colors:a}}}),No={class:"d-flex align-center"},$o={class:"text-subtitle-2 font-weight-medium"},Do={key:0,class:"text-body-2"};function Mo(e,t,n,a,i,s){var o;return Ce(),ze(Bo,{modelValue:e.snackbar,"onUpdate:modelValue":t[1]||(t[1]=l=>e.snackbar=l),color:e.colors[(o=e.message)==null?void 0:o.type]||e.colors.info,timeout:2e3,location:"top right","multi-line":"",variant:"tonal"},{actions:ie(()=>[b(Ha,{icon:"mdi-close",variant:"text",onClick:t[0]||(t[0]=l=>e.snackbar=!1)})]),default:ie(()=>{var l,r,u,c;return[I("div",No,[b(xe,{icon:e.icons[(l=e.message)==null?void 0:l.type]||e.icons.info,class:"mr-2"},null,8,["icon"]),I("div",null,[I("div",$o,_e((r=e.message)==null?void 0:r.title),1),(u=e.message)!=null&&u.content?(Ce(),In("div",Do,_e((c=e.message)==null?void 0:c.content),1)):Bt("",!0)])])]}),_:1},8,["modelValue","color"])}const Qa=Aa(Ro,[["render",Mo]]),Fo=T({...ee(),...le()},"VCardActions"),Za=G()({name:"VCardActions",props:Fo(),setup(e,t){let{slots:n}=t;return Ft({VBtn:{slim:!0,variant:"text"}}),Z(()=>b(e.tag,{class:j(["v-card-actions",e.class]),style:X(e.style)},n)),{}}}),zo=T({opacity:[Number,String],...ee(),...le()},"VCardSubtitle"),Wo=G()({name:"VCardSubtitle",props:zo(),setup(e,t){let{slots:n}=t;return Z(()=>b(e.tag,{class:j(["v-card-subtitle",e.class]),style:X([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),ei=kn("v-card-title");function qo(e){return{aspectStyles:C(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const ti=T({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...ee(),...rt()},"VResponsive"),fa=G()({name:"VResponsive",props:ti(),setup(e,t){let{slots:n}=t;const{aspectStyles:a}=qo(e),{dimensionStyles:i}=ut(e);return Z(()=>{var s;return I("div",{class:j(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:X([i.value,e.style])},[I("div",{class:"v-responsive__sizer",style:X(a.value)},null),(s=n.additional)==null?void 0:s.call(n),n.default&&I("div",{class:j(["v-responsive__content",e.contentClass])},[n.default()])])}),{}}});function va(e,t){if(!Sn)return;const n=t.modifiers||{},a=t.value,{handler:i,options:s}=typeof a=="object"?a:{handler:a,options:{}},o=new IntersectionObserver(function(){var m;let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;const u=(m=e._observe)==null?void 0:m[t.instance.$.uid];if(!u)return;const c=l.some(v=>v.isIntersecting);i&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&i(c,l,r),c&&n.once?vn(e,t):u.init=!0},s);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function vn(e,t){var a;const n=(a=e._observe)==null?void 0:a[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const ma={mounted:va,unmounted:vn,updated:(e,t)=>{var n;(n=e._observe)!=null&&n[t.instance.$.uid]&&(vn(e,t),va(e,t))}},Ho=T({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,imageClass:null,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...ti(),...ee(),...Oe(),...Ka()},"VImg"),ni=G()({name:"VImg",directives:{vIntersect:ma},props:Ho(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:a}=t;const{backgroundColorClasses:i,backgroundColorStyles:s}=Qe(()=>e.color),{roundedClasses:o}=Be(e),l=Ee("VImg"),r=z(""),u=M(),c=z(e.eager?"loading":"idle"),m=z(),v=z(),d=C(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=C(()=>d.value.aspect||m.value/v.value||0);W(()=>e.src,()=>{f(c.value!=="idle")}),W(g,(V,P)=>{!V&&P&&u.value&&w(u.value)}),Pn(()=>f());function f(V){if(!(e.eager&&V)&&!(Sn&&!V&&!e.eager)){if(c.value="loading",d.value.lazySrc){const P=new Image;P.src=d.value.lazySrc,w(P,null)}d.value.src&&de(()=>{var P;n("loadstart",((P=u.value)==null?void 0:P.currentSrc)||d.value.src),setTimeout(()=>{var N;if(!l.isUnmounted)if((N=u.value)!=null&&N.complete){if(u.value.naturalWidth||p(),c.value==="error")return;g.value||w(u.value,null),c.value==="loading"&&S()}else g.value||w(u.value),E()})})}}function S(){var V;l.isUnmounted||(E(),w(u.value),c.value="loaded",n("load",((V=u.value)==null?void 0:V.currentSrc)||d.value.src))}function p(){var V;l.isUnmounted||(c.value="error",n("error",((V=u.value)==null?void 0:V.currentSrc)||d.value.src))}function E(){const V=u.value;V&&(r.value=V.currentSrc||V.src)}let L=-1;je(()=>{clearTimeout(L)});function w(V){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const N=()=>{if(clearTimeout(L),l.isUnmounted)return;const{naturalHeight:O,naturalWidth:U}=V;O||U?(m.value=U,v.value=O):!V.complete&&c.value==="loading"&&P!=null?L=window.setTimeout(N,P):(V.currentSrc.endsWith(".svg")||V.currentSrc.startsWith("data:image/svg+xml"))&&(m.value=1,v.value=1)};N()}const h=k(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),_=()=>{var N;if(!d.value.src||c.value==="idle")return null;const V=I("img",{class:j(["v-img__img",h.value,e.imageClass]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:d.value.src,srcset:d.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:S,onError:p},null),P=(N=a.sources)==null?void 0:N.call(a);return b(Ye,{transition:e.transition,appear:!0},{default:()=>[We(P?I("picture",{class:"v-img__picture"},[P,V]):V,[[En,c.value==="loaded"]])]})},x=()=>b(Ye,{transition:e.transition},{default:()=>[d.value.lazySrc&&c.value!=="loaded"&&I("img",{class:j(["v-img__img","v-img__img--preload",h.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:d.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),y=()=>a.placeholder?b(Ye,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!a.error)&&I("div",{class:"v-img__placeholder"},[a.placeholder()])]}):null,R=()=>a.error?b(Ye,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&I("div",{class:"v-img__error"},[a.error()])]}):null,F=()=>e.gradient?I("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,A=z(!1);{const V=W(g,P=>{P&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.value=!0})}),V())})}return Z(()=>{const V=fa.filterProps(e);return We(b(fa,Q({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!A.value,"v-img--fit-content":e.width==="fit-content"},i.value,o.value,e.class],style:[{width:B(e.width==="auto"?m.value:e.width)},s.value,e.style]},V,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>I(Ve,null,[b(_,null,null),b(x,null,null),b(F,null,null),b(y,null,null),b(R,null,null)]),default:a.default}),[[ma,{handler:f,options:e.options},null,{once:!0}]])}),{currentSrc:r,image:u,state:c,naturalWidth:m,naturalHeight:v}}}),jo=T({start:Boolean,end:Boolean,icon:oe,image:String,text:String,...st(),...ee(),...Ge(),...Oe(),...Wt(),...le(),...fe(),...Ue({variant:"flat"})},"VAvatar"),Mt=G()({name:"VAvatar",props:jo(),setup(e,t){let{slots:n}=t;const{themeClasses:a}=ye(e),{borderClasses:i}=ot(e),{colorClasses:s,colorStyles:o,variantClasses:l}=wt(e),{densityClasses:r}=lt(e),{roundedClasses:u}=Be(e),{sizeClasses:c,sizeStyles:m}=qt(e);return Z(()=>b(e.tag,{class:j(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},a.value,i.value,s.value,r.value,u.value,c.value,l.value,e.class]),style:X([o.value,m.value,e.style])},{default:()=>[n.default?b(ge,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?b(ni,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?b(xe,{key:"icon",icon:e.icon},null):e.text,St(!1,"v-avatar")]})),{}}}),Go=T({appendAvatar:String,appendIcon:oe,prependAvatar:String,prependIcon:oe,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...ee(),...Ge(),...le()},"VCardItem"),Uo=G()({name:"VCardItem",props:Go(),setup(e,t){let{slots:n}=t;return Z(()=>{const a=!!(e.prependAvatar||e.prependIcon),i=!!(a||n.prepend),s=!!(e.appendAvatar||e.appendIcon),o=!!(s||n.append),l=!!(e.title!=null||n.title),r=!!(e.subtitle!=null||n.subtitle);return b(e.tag,{class:j(["v-card-item",e.class]),style:X(e.style)},{default:()=>{var u;return[i&&I("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?b(ge,{key:"prepend-defaults",disabled:!a,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):I(Ve,null,[e.prependAvatar&&b(Mt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&b(xe,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),I("div",{class:"v-card-item__content"},[l&&b(ei,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??_e(e.title)]}}),r&&b(Wo,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??_e(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&I("div",{key:"append",class:"v-card-item__append"},[n.append?b(ge,{key:"append-defaults",disabled:!s,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):I(Ve,null,[e.appendIcon&&b(xe,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&b(Mt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]}})}),{}}}),Ko=T({opacity:[Number,String],...ee(),...le()},"VCardText"),mn=G()({name:"VCardText",props:Ko(),setup(e,t){let{slots:n}=t;return Z(()=>b(e.tag,{class:j(["v-card-text",e.class]),style:X([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),Xo=T({appendAvatar:String,appendIcon:oe,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:oe,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...st(),...ee(),...Ge(),...rt(),...bt(),...Ra(),...Ht(),...Tn(),...Oe(),...Rn(),...le(),...fe(),...Ue({variant:"elevated"})},"VCard"),ga=G()({name:"VCard",directives:{vRipple:yt},props:Xo(),setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{borderClasses:s}=ot(e),{colorClasses:o,colorStyles:l,variantClasses:r}=wt(e),{densityClasses:u}=lt(e),{dimensionStyles:c}=ut(e),{elevationClasses:m}=pt(e),{loaderClasses:v}=Na(e),{locationStyles:d}=Ln(e),{positionClasses:g}=On(e),{roundedClasses:f}=Be(e),S=Bn(e,n),p=z(void 0);return W(()=>e.loading,(E,L)=>{p.value=!E&&typeof L=="string"?L:typeof E=="boolean"?void 0:E},{immediate:!0}),Z(()=>{const E=e.link!==!1&&S.isLink.value,L=!e.disabled&&e.link!==!1&&(e.link||S.isClickable.value),w=E?"a":e.tag,h=!!(a.title||e.title!=null),_=!!(a.subtitle||e.subtitle!=null),x=h||_,y=!!(a.append||e.appendAvatar||e.appendIcon),R=!!(a.prepend||e.prependAvatar||e.prependIcon),F=!!(a.image||e.image),A=x||R||y,V=!!(a.text||e.text!=null);return We(b(w,Q(S.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":L},i.value,s.value,o.value,u.value,m.value,v.value,g.value,f.value,r.value,e.class],style:[l.value,c.value,d.value,{"--v-card-height":B(e.height)},e.style],onClick:L&&S.navigate.value,tabindex:e.disabled?-1:void 0}),{default:()=>{var P;return[F&&I("div",{key:"image",class:"v-card__image"},[a.image?b(ge,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},a.image):b(ni,{key:"image-img",cover:!0,src:e.image},null)]),b(Hs,{name:"v-card",active:!!e.loading,color:p.value},{default:a.loader}),A&&b(Uo,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:a.item,prepend:a.prepend,title:a.title,subtitle:a.subtitle,append:a.append}),V&&b(mn,{key:"text"},{default:()=>{var N;return[((N=a.text)==null?void 0:N.call(a))??e.text]}}),(P=a.default)==null?void 0:P.call(a),a.actions&&b(Za,null,{default:a.actions}),St(L,"v-card")]}}),[[yt,L&&e.ripple]])}),{}}}),Yo=T({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function me(e,t,n){return G()({name:e,props:Yo({mode:n,origin:t}),setup(a,i){let{slots:s}=i;const o={onBeforeEnter(l){a.origin&&(l.style.transformOrigin=a.origin)},onLeave(l){if(a.leaveAbsolute){const{offsetTop:r,offsetLeft:u,offsetWidth:c,offsetHeight:m}=l;l._transitionInitialStyles={position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width,height:l.style.height},l.style.position="absolute",l.style.top=`${r}px`,l.style.left=`${u}px`,l.style.width=`${c}px`,l.style.height=`${m}px`}a.hideOnLeave&&l.style.setProperty("display","none","important")},onAfterLeave(l){if(a.leaveAbsolute&&(l!=null&&l._transitionInitialStyles)){const{position:r,top:u,left:c,width:m,height:v}=l._transitionInitialStyles;delete l._transitionInitialStyles,l.style.position=r||"",l.style.top=u||"",l.style.left=c||"",l.style.width=m||"",l.style.height=v||""}}};return()=>{const l=a.group?_n:$e;return xn(l,{name:a.disabled?"":e,css:!a.disabled,...a.group?void 0:{mode:a.mode},...a.disabled?{}:o},s.default)}}})}function Mn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return G()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:Tt()},group:Boolean,hideOnLeave:Boolean},setup(a,i){let{slots:s}=i;const o=a.group?_n:$e;return()=>xn(o,{name:a.disabled?"":e,css:!a.disabled,...a.disabled?{}:{...t,onLeave:l=>{var r;a.hideOnLeave?l.style.setProperty("display","none","important"):(r=t.onLeave)==null||r.call(t,l)}}},s.default)}})}function Fn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(i){i._parent=i.parentNode,i._initialStyle={transition:i.style.transition,overflow:i.style.overflow,width:i.style.width,height:i.style.height}},onEnter(i){const s=i._initialStyle;if(!s)return;i.style.setProperty("transition","none","important"),i.style.overflow="hidden";const o=`${i.offsetWidth}px`,l=`${i.offsetHeight}px`;["x","both"].includes(t)&&(i.style.width="0"),["y","both"].includes(t)&&(i.style.height="0"),i.offsetHeight,i.style.transition=s.transition,e&&i._parent&&i._parent.classList.add(e),requestAnimationFrame(()=>{["x","both"].includes(t)&&(i.style.width=o),["y","both"].includes(t)&&(i.style.height=l)})},onAfterEnter:a,onEnterCancelled:a,onLeave(i){i._initialStyle={transition:"",overflow:i.style.overflow,width:i.style.width,height:i.style.height},i.style.overflow="hidden",["x","both"].includes(t)&&(i.style.width=`${i.offsetWidth}px`),["y","both"].includes(t)&&(i.style.height=`${i.offsetHeight}px`),i.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(t)&&(i.style.width="0"),["y","both"].includes(t)&&(i.style.height="0")})},onAfterLeave:n,onLeaveCancelled:n};function n(i){e&&i._parent&&i._parent.classList.remove(e),a(i)}function a(i){if(!i._initialStyle)return;const{width:s,height:o}=i._initialStyle;i.style.overflow=i._initialStyle.overflow,s!=null&&["x","both"].includes(t)&&(i.style.width=s),o!=null&&["y","both"].includes(t)&&(i.style.height=o),delete i._initialStyle}}const Jo=T({target:[Object,Array]},"v-dialog-transition"),nn=new WeakMap,Qo=G()({name:"VDialogTransition",props:Jo(),setup(e,t){let{slots:n}=t;const a={onBeforeEnter(i){i.style.pointerEvents="none",i.style.visibility="hidden"},async onEnter(i,s){var v;await new Promise(d=>requestAnimationFrame(d)),await new Promise(d=>requestAnimationFrame(d)),i.style.visibility="";const o=ha(e.target,i),{x:l,y:r,sx:u,sy:c,speed:m}=o;if(nn.set(i,o),Tt())Fe(i,[{opacity:0},{}],{duration:125*m,easing:Qn}).finished.then(()=>s());else{const d=Fe(i,[{transform:`translate(${l}px, ${r}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*m,easing:Qn});(v=ya(i))==null||v.forEach(g=>{Fe(g,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*m,easing:on})}),d.finished.then(()=>s())}},onAfterEnter(i){i.style.removeProperty("pointer-events")},onBeforeLeave(i){i.style.pointerEvents="none"},async onLeave(i,s){var v;await new Promise(d=>requestAnimationFrame(d));let o;!nn.has(i)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=ha(e.target,i):o=nn.get(i);const{x:l,y:r,sx:u,sy:c,speed:m}=o;Tt()?Fe(i,[{},{opacity:0}],{duration:85*m,easing:Jn}).finished.then(()=>s()):(Fe(i,[{},{transform:`translate(${l}px, ${r}px) scale(${u}, ${c})`,opacity:0}],{duration:125*m,easing:Jn}).finished.then(()=>s()),(v=ya(i))==null||v.forEach(g=>{Fe(g,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*m,easing:on})}))},onAfterLeave(i){i.style.removeProperty("pointer-events")}};return()=>e.target?b($e,Q({name:"dialog-transition"},a,{css:!1}),n):b($e,{name:"dialog-transition"},n)}});function ya(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function ha(e,t){const n=wn(e),a=ka(t),[i,s]=getComputedStyle(t).transformOrigin.split(" ").map(p=>parseFloat(p)),[o,l]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let r=n.left+n.width/2;o==="left"||l==="left"?r-=n.width/2:(o==="right"||l==="right")&&(r+=n.width/2);let u=n.top+n.height/2;o==="top"||l==="top"?u-=n.height/2:(o==="bottom"||l==="bottom")&&(u+=n.height/2);const c=n.width/a.width,m=n.height/a.height,v=Math.max(1,c,m),d=c/v||0,g=m/v||0,f=a.width*a.height/(window.innerWidth*window.innerHeight),S=f>.12?Math.min(1.5,(f-.12)*10+1):1;return{x:r-(i+a.left),y:u-(s+a.top),sx:d,sy:g,speed:S}}me("fab-transition","center center","out-in");me("dialog-bottom-transition");me("dialog-top-transition");const ql=me("fade-transition"),Hl=me("scale-transition");me("scroll-x-transition");me("scroll-x-reverse-transition");me("scroll-y-transition");me("scroll-y-reverse-transition");me("slide-x-transition");const jl=me("slide-x-reverse-transition"),Gl=me("slide-y-transition");me("slide-y-reverse-transition");const Zo=Mn("expand-transition",Fn()),Ul=Mn("expand-x-transition",Fn("","x"));Mn("expand-both-transition",Fn("","both"));const el=T({fullscreen:Boolean,scrollable:Boolean,...at(Dn({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:Qo},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),tl=G()({name:"VDialog",props:el(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:a}=t;const i=Pe(e,"modelValue"),{scopeId:s}=$n(),o=M();function l(){var u;n("afterEnter"),(e.scrim||e.retainFocus)&&((u=o.value)!=null&&u.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function r(){n("afterLeave")}return W(i,async u=>{var c;u||(await de(),(c=o.value.activatorEl)==null||c.focus({preventScroll:!0}))}),Z(()=>{const u=Dt.filterProps(e),c=Q({"aria-haspopup":"dialog"},e.activatorProps),m=Q({tabindex:-1},e.contentProps);return b(Dt,Q({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},u,{modelValue:i.value,"onUpdate:modelValue":v=>i.value=v,"aria-modal":"true",activatorProps:c,contentProps:m,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:l,onAfterLeave:r},s),{activator:a.activator,default:function(){for(var v=arguments.length,d=new Array(v),g=0;g{var f;return[(f=a.default)==null?void 0:f.call(a,...d)]}})}})}),Ja({},o)}}),nl=["dotted","dashed","solid","double"],al=T({color:String,contentOffset:[Number,String,Array],gradient:Boolean,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,variant:{type:String,default:"solid",validator:e=>nl.includes(e)},...ee(),...fe()},"VDivider"),ai=G()({name:"VDivider",props:al(),setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{textColorClasses:s,textColorStyles:o}=tt(()=>e.color),l=C(()=>{const u={};return e.length&&(u[e.vertical?"height":"width"]=B(e.length)),e.thickness&&(u[e.vertical?"borderRightWidth":"borderTopWidth"]=B(e.thickness)),u}),r=k(()=>{const u=Array.isArray(e.contentOffset)?e.contentOffset[0]:e.contentOffset,c=Array.isArray(e.contentOffset)?e.contentOffset[1]:0;return{marginBlock:e.vertical&&u?B(u):void 0,marginInline:!e.vertical&&u?B(u):void 0,transform:c?`translate${e.vertical?"X":"Y"}(${B(c)})`:void 0}});return Z(()=>{const u=I("hr",{class:j([{"v-divider":!0,"v-divider--gradient":e.gradient&&!a.default,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},i.value,s.value,e.class]),style:X([l.value,o.value,{"--v-border-opacity":e.opacity},{"border-style":e.variant},e.style]),"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return a.default?I("div",{class:j(["v-divider__wrapper",{"v-divider__wrapper--gradient":e.gradient,"v-divider__wrapper--inset":e.inset,"v-divider__wrapper--vertical":e.vertical}])},[u,I("div",{class:"v-divider__content",style:X(r.value)},[a.default()]),u]):u}),{}}}),il=kn("v-spacer","div","VSpacer"),gn=Symbol.for("vuetify:list");function ii(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=Le(gn,{filterable:!1,hasPrepend:z(!1),updateHasPrepend:()=>null,trackingIndex:z(-1),navigationStrategy:z("focus"),uid:""}),{filterable:n,trackingIndex:a=t.trackingIndex,navigationStrategy:i=t.navigationStrategy,uid:s=t.uid||Cn()}=e,o={filterable:t.filterable||n,hasPrepend:z(!1),updateHasPrepend:l=>{l&&(o.hasPrepend.value=l)},trackingIndex:a,navigationStrategy:i,uid:s};return He(gn,o),t}function si(){return Le(gn,null)}const zn=e=>{const t={activate:n=>{let{id:a,value:i,activated:s}=n;return a=ne(a),e&&!i&&s.size===1&&s.has(a)||(i?s.add(a):s.delete(a)),s},in:(n,a,i)=>{let s=new Set;if(n!=null)for(const o of pn(n))s=t.activate({id:o,value:!0,activated:new Set(s),children:a,parents:i});return s},out:n=>Array.from(n)};return t},oi=e=>{const t=zn(e);return{activate:a=>{let{activated:i,id:s,...o}=a;s=ne(s);const l=i.has(s)?new Set([s]):new Set;return t.activate({...o,id:s,activated:l})},in:(a,i,s)=>{let o=new Set;if(a!=null){const l=pn(a);l.length&&(o=t.in(l.slice(0,1),i,s))}return o},out:(a,i,s)=>t.out(a,i,s)}},sl=e=>{const t=zn(e);return{activate:a=>{let{id:i,activated:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.activate({id:i,activated:s,children:o,...l})},in:t.in,out:t.out}},ol=e=>{const t=oi(e);return{activate:a=>{let{id:i,activated:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.activate({id:i,activated:s,children:o,...l})},in:t.in,out:t.out}},ll={open:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(n){const s=new Set;s.add(t);let o=i.get(t);for(;o!=null;)s.add(o),o=i.get(o);return s}else return a.delete(t),a},select:()=>null},li={open:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(n){let s=i.get(t);for(a.add(t);s!=null&&s!==t;)a.add(s),s=i.get(s);return a}else a.delete(t);return a},select:()=>null},rl={open:li.open,select:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(!n)return a;const s=[];let o=i.get(t);for(;o!=null;)s.push(o),o=i.get(o);return new Set(s)}},Wn=e=>{const t={select:n=>{let{id:a,value:i,selected:s}=n;if(a=ne(a),e&&!i){const o=Array.from(s.entries()).reduce((l,r)=>{let[u,c]=r;return c==="on"&&l.push(u),l},[]);if(o.length===1&&o[0]===a)return s}return s.set(a,i?"on":"off"),s},in:(n,a,i,s)=>{const o=new Map;for(const l of n||[])t.select({id:l,value:!0,selected:o,children:a,parents:i,disabled:s});return o},out:n=>{const a=[];for(const[i,s]of n.entries())s==="on"&&a.push(i);return a}};return t},ri=e=>{const t=Wn(e);return{select:a=>{let{selected:i,id:s,...o}=a;s=ne(s);const l=i.has(s)?new Map([[s,i.get(s)]]):new Map;return t.select({...o,id:s,selected:l})},in:(a,i,s,o)=>a!=null&&a.length?t.in(a.slice(0,1),i,s,o):new Map,out:(a,i,s)=>t.out(a,i,s)}},ul=e=>{const t=Wn(e);return{select:a=>{let{id:i,selected:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.select({id:i,selected:s,children:o,...l})},in:t.in,out:t.out}},cl=e=>{const t=ri(e);return{select:a=>{let{id:i,selected:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.select({id:i,selected:s,children:o,...l})},in:t.in,out:t.out}},qn=e=>{const t={select:n=>{let{id:a,value:i,selected:s,children:o,parents:l,disabled:r}=n;a=ne(a);const u=new Map(s),c=[a];for(;c.length;){const v=c.shift();r.has(v)||s.set(ne(v),i?"on":"off"),o.has(v)&&c.push(...o.get(v))}let m=ne(l.get(a));for(;m;){let v=!0,d=!0;for(const g of o.get(m)){const f=ne(g);if(!r.has(f)&&(s.get(f)!=="on"&&(v=!1),s.has(f)&&s.get(f)!=="off"&&(d=!1),!v&&!d))break}s.set(m,v?"on":d?"off":"indeterminate"),m=ne(l.get(m))}return e&&!i&&Array.from(s.entries()).reduce((d,g)=>{let[f,S]=g;return S==="on"&&d.push(f),d},[]).length===0?u:s},in:(n,a,i)=>{let s=new Map;for(const o of n||[])s=t.select({id:o,value:!0,selected:s,children:a,parents:i,disabled:new Set});return s},out:(n,a)=>{const i=[];for(const[s,o]of n.entries())o==="on"&&!a.has(s)&&i.push(s);return i}};return t},dl=e=>{const t=qn(e);return{select:t.select,in:t.in,out:(a,i,s)=>{const o=[];for(const[l,r]of a.entries())if(r==="on"){if(s.has(l)){const u=s.get(l);if(a.get(u)==="on")continue}o.push(l)}return o}}},fl=e=>{const n={select:qn(e).select,in:(a,i,s,o)=>{let l=new Map;for(const r of a||[])i.has(r)||(l=n.select({id:r,value:!0,selected:l,children:i,parents:s,disabled:o}));return l},out:a=>{const i=[];for(const[s,o]of a.entries())(o==="on"||o==="indeterminate")&&i.push(s);return i}};return n},nt=Symbol.for("vuetify:nested"),ui={id:z(),root:{itemsRegistration:M("render"),register:()=>null,unregister:()=>null,updateDisabled:()=>null,children:M(new Map),parents:M(new Map),disabled:M(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:M(!1),scrollToActive:M(!1),selectable:M(!1),opened:M(new Set),activated:M(new Set),selected:M(new Map),selectedValues:M([]),getPath:()=>[]}},vl=T({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean,itemsRegistration:{type:String,default:"render"}},"nested"),ml=(e,t)=>{let{items:n,returnObject:a,scrollToActive:i}=t,s=!1;const o=z(new Map),l=z(new Map),r=z(new Set),u=Pe(e,"opened",e.opened,h=>new Set(Array.isArray(h)?h.map(_=>ne(_)):h),h=>[...h.values()]),c=C(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return sl(e.mandatory);case"single-leaf":return ol(e.mandatory);case"independent":return zn(e.mandatory);case"single-independent":default:return oi(e.mandatory)}}),m=C(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return cl(e.mandatory);case"leaf":return ul(e.mandatory);case"independent":return Wn(e.mandatory);case"single-independent":return ri(e.mandatory);case"trunk":return dl(e.mandatory);case"branch":return fl(e.mandatory);case"classic":default:return qn(e.mandatory)}}),v=C(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return rl;case"single":return ll;case"multiple":default:return li}}),d=Pe(e,"activated",e.activated,h=>c.value.in(h,o.value,l.value),h=>c.value.out(h,o.value,l.value)),g=Pe(e,"selected",e.selected,h=>m.value.in(h,o.value,l.value,r.value),h=>m.value.out(h,o.value,l.value));je(()=>{s=!0});function f(h){const _=[];let x=ne(h);for(;x!==void 0;)_.unshift(x),x=l.value.get(x);return _}const S=Ee("nested"),p=new Set,E=Fi(()=>{de(()=>{o.value=new Map(o.value),l.value=new Map(l.value)})},100);W(()=>[n.value,se(a)],()=>{e.itemsRegistration==="props"&&L()},{immediate:!0});function L(){const h=new Map,_=new Map,x=new Set,y=se(a)?A=>ne(A.raw):A=>A.value,R=[...n.value];let F=0;for(;Fe.activatable),scrollToActive:k(()=>se(i)),selectable:k(()=>e.selectable),activated:d,selected:g,selectedValues:C(()=>{const h=[];for(const[_,x]of g.value.entries())x==="on"&&h.push(_);return h}),itemsRegistration:k(()=>e.itemsRegistration),register:(h,_,x,y)=>{if(p.has(h)){f(h).map(String).join(" -> "),f(_).concat(h).map(String).join(" -> ");return}else p.add(h);_&&h!==_&&l.value.set(h,_),x&&r.value.add(h),y&&o.value.set(h,[]),_!=null&&o.value.set(_,[...o.value.get(_)||[],h]),E()},unregister:h=>{if(s)return;p.delete(h),o.value.delete(h),r.value.delete(h);const _=l.value.get(h);if(_){const x=o.value.get(_)??[];o.value.set(_,x.filter(y=>y!==h))}l.value.delete(h),E()},updateDisabled:(h,_)=>{_?r.value.add(h):r.value.delete(h)},open:(h,_,x)=>{S.emit("click:open",{id:h,value:_,path:f(h),event:x});const y=v.value.open({id:h,value:_,opened:new Set(u.value),children:o.value,parents:l.value,event:x});y&&(u.value=y)},openOnSelect:(h,_,x)=>{const y=v.value.select({id:h,value:_,selected:new Map(g.value),opened:new Set(u.value),children:o.value,parents:l.value,event:x});y&&(u.value=y)},select:(h,_,x)=>{S.emit("click:select",{id:h,value:_,path:f(h),event:x});const y=m.value.select({id:h,value:_,selected:new Map(g.value),children:o.value,parents:l.value,disabled:r.value,event:x});y&&(g.value=y),w.root.openOnSelect(h,_,x)},activate:(h,_,x)=>{if(!e.activatable)return w.root.select(h,!0,x);S.emit("click:activate",{id:h,value:_,path:f(h),event:x});const y=c.value.activate({id:h,value:_,activated:new Set(d.value),children:o.value,parents:l.value,event:x});if(y.size!==d.value.size)d.value=y;else{for(const R of y)if(!d.value.has(R)){d.value=y;return}for(const R of d.value)if(!y.has(R)){d.value=y;return}}},children:o,parents:l,disabled:r,getPath:f}};return He(nt,w),w.root},ci=(e,t,n)=>{const a=Le(nt,ui),i=Symbol("nested item"),s=C(()=>{const l=ne(se(e));return l!==void 0?l:i}),o={...a,id:s,open:(l,r)=>a.root.open(s.value,l,r),openOnSelect:(l,r)=>a.root.openOnSelect(s.value,l,r),isOpen:C(()=>a.root.opened.value.has(s.value)),parent:C(()=>a.root.parents.value.get(s.value)),activate:(l,r)=>a.root.activate(s.value,l,r),isActivated:C(()=>a.root.activated.value.has(s.value)),scrollToActive:a.root.scrollToActive,select:(l,r)=>a.root.select(s.value,l,r),isSelected:C(()=>a.root.selected.value.get(s.value)==="on"),isIndeterminate:C(()=>a.root.selected.value.get(s.value)==="indeterminate"),isLeaf:C(()=>!a.root.children.value.get(s.value)),isGroupActivator:a.isGroupActivator};return Pn(()=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||de(()=>{a.root.register(s.value,a.id.value,se(t),n)})}),je(()=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||a.root.unregister(s.value)}),W(s,(l,r)=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||(a.root.unregister(r),de(()=>{a.root.register(l,a.id.value,se(t),n)}))}),W(()=>se(t),l=>{a.root.updateDisabled(s.value,l)}),n&&He(nt,o),o},gl=()=>{const e=Le(nt,ui);He(nt,{...e,isGroupActivator:!0})};function yl(){const e=z(!1);return it(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:k(()=>e.value?void 0:{transition:"none !important"}),isBooted:Ia(e)}}const hl=zi({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return gl(),()=>{var a;return(a=n.default)==null?void 0:a.call(n)}}}),bl=T({activeColor:String,baseColor:String,color:String,collapseIcon:{type:oe,default:"$collapse"},disabled:Boolean,expandIcon:{type:oe,default:"$expand"},rawId:[String,Number],prependIcon:oe,appendIcon:oe,fluid:Boolean,subgroup:Boolean,title:String,value:null,...ee(),...le()},"VListGroup"),ba=G()({name:"VListGroup",props:bl(),setup(e,t){let{slots:n}=t;const{isOpen:a,open:i,id:s}=ci(()=>e.value,()=>e.disabled,!0),o=C(()=>`v-list-group--id-${String(e.rawId??s.value)}`),l=si(),{isBooted:r}=yl(),u=Le(nt),c=k(()=>{var f;return((f=u==null?void 0:u.root)==null?void 0:f.itemsRegistration.value)==="render"});function m(f){var S;["INPUT","TEXTAREA"].includes((S=f.target)==null?void 0:S.tagName)||i(!a.value,f)}const v=C(()=>({onClick:m,class:"v-list-group__header",id:o.value})),d=C(()=>a.value?e.collapseIcon:e.expandIcon),g=C(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Z(()=>b(e.tag,{class:j(["v-list-group",{"v-list-group--prepend":l==null?void 0:l.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":a.value},e.class]),style:X(e.style)},{default:()=>[n.activator&&b(ge,{defaults:g.value},{default:()=>[b(hl,null,{default:()=>[n.activator({props:v.value,isOpen:a.value})]})]}),b(Ye,{transition:{component:Zo},disabled:!r.value},{default:()=>{var f,S;return[c.value?We(I("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(f=n.default)==null?void 0:f.call(n)]),[[En,a.value]]):a.value&&I("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(S=n.default)==null?void 0:S.call(n)])]}})]})),{isOpen:a}}}),pl=T({opacity:[Number,String],...ee(),...le()},"VListItemSubtitle"),di=G()({name:"VListItemSubtitle",props:pl(),setup(e,t){let{slots:n}=t;return Z(()=>b(e.tag,{class:j(["v-list-item-subtitle",e.class]),style:X([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),fi=kn("v-list-item-title"),Sl=T({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:oe,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:oe,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,prependGap:[Number,String],subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,index:Number,tabindex:[Number,String],onClick:ft(),onClickOnce:ft(),...st(),...ee(),...Ge(),...rt(),...bt(),...Oe(),...Rn(),...le(),...fe(),...Ue({variant:"text"})},"VListItem"),yn=G()({name:"VListItem",directives:{vRipple:yt},props:Sl(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:a,emit:i}=t;const s=Bn(e,n),o=M(),l=C(()=>e.value===void 0?s.href.value:e.value),{activate:r,isActivated:u,select:c,isOpen:m,isSelected:v,isIndeterminate:d,isGroupActivator:g,root:f,parent:S,openOnSelect:p,scrollToActive:E,id:L}=ci(l,()=>e.disabled,!1),w=si(),h=C(()=>{var D;return e.active!==!1&&(e.active||((D=s.isActive)==null?void 0:D.value)||(f.activatable.value?u.value:v.value))}),_=k(()=>e.link!==!1&&s.isLink.value),x=C(()=>!!w&&(f.selectable.value||f.activatable.value||e.value!=null)),y=C(()=>!e.disabled&&e.link!==!1&&(e.link||s.isClickable.value||x.value)),R=C(()=>w&&w.navigationStrategy.value==="track"&&e.index!==void 0&&w.trackingIndex.value===e.index),F=C(()=>w?_.value?"link":x.value?"option":"listitem":void 0),A=C(()=>{if(x.value)return f.activatable.value?u.value:f.selectable.value?v.value:h.value}),V=k(()=>e.rounded||e.nav),P=k(()=>e.color??e.activeColor),N=k(()=>({color:h.value?P.value??e.baseColor:e.baseColor,variant:e.variant}));W(()=>{var D;return(D=s.isActive)==null?void 0:D.value},D=>{D&&O()}),W(u,D=>{var re;!D||!E||(re=o.value)==null||re.scrollIntoView({block:"nearest",behavior:"instant"})}),W(R,D=>{var re;D&&((re=o.value)==null||re.scrollIntoView({block:"nearest",behavior:"instant"}))}),Pn(()=>{var D;(D=s.isActive)!=null&&D.value&&de(()=>O())});function O(){S.value!=null&&f.open(S.value,!0),p(!0)}const{themeClasses:U}=ye(e),{borderClasses:Y}=ot(e),{colorClasses:te,colorStyles:he,variantClasses:K}=wt(N),{densityClasses:$}=lt(e),{dimensionStyles:J}=ut(e),{elevationClasses:q}=pt(e),{roundedClasses:be}=Be(V),Ke=k(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),De=k(()=>e.ripple!==void 0&&e.ripple&&(w!=null&&w.filterable)?{keys:["Enter"]}:e.ripple),H=C(()=>({isActive:h.value,select:c,isOpen:m.value,isSelected:v.value,isIndeterminate:d.value,isDisabled:e.disabled}));function ue(D){var re,kt,Gt;i("click",D),!["INPUT","TEXTAREA"].includes((re=D.target)==null?void 0:re.tagName)&&y.value&&((Gt=(kt=s.navigate).value)==null||Gt.call(kt,D),!g&&(f.activatable.value?r(!u.value,D):(f.selectable.value||e.value!=null&&!_.value)&&c(!v.value,D)))}function Me(D){const re=D.target;["INPUT","TEXTAREA"].includes(re.tagName)||(D.key==="Enter"||D.key===" "&&!(w!=null&&w.filterable))&&(D.preventDefault(),D.stopPropagation(),D.target.dispatchEvent(new MouseEvent("click",D)))}return Z(()=>{const D=_.value?"a":e.tag,re=a.title||e.title!=null,kt=a.subtitle||e.subtitle!=null,hi=!!(!!(e.appendAvatar||e.appendIcon)||a.append),Ut=!!(!!(e.prependAvatar||e.prependIcon)||a.prepend);return w==null||w.updateHasPrepend(Ut),e.activeColor&&Wi("active-color",["color","base-color"]),We(b(D,Q(s.linkProps,{ref:o,id:e.index!==void 0&&w?`v-list-item-${w.uid}-${e.index}`:void 0,class:["v-list-item",{"v-list-item--active":h.value,"v-list-item--disabled":e.disabled,"v-list-item--link":y.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!Ut&&(w==null?void 0:w.hasPrepend.value),"v-list-item--slim":e.slim,"v-list-item--focus-visible":R.value,[`${e.activeClass}`]:e.activeClass&&h.value},U.value,Y.value,te.value,$.value,q.value,Ke.value,be.value,K.value,e.class],style:[{"--v-list-prepend-gap":B(e.prependGap)},he.value,J.value,e.style],tabindex:e.tabindex??(y.value?w?-2:0:void 0),"aria-selected":A.value,role:F.value,onClick:ue,onKeydown:y.value&&!_.value&&Me}),{default:()=>{var Hn;return[St(y.value||h.value,"v-list-item"),Ut&&I("div",{key:"prepend",class:"v-list-item__prepend"},[a.prepend?b(ge,{key:"prepend-defaults",defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0},VCheckboxBtn:{density:e.density}}},{default:()=>{var pe;return[(pe=a.prepend)==null?void 0:pe.call(a,H.value)]}}):I(Ve,null,[e.prependAvatar&&b(Mt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&b(xe,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),I("div",{class:"v-list-item__spacer"},null)]),I("div",{class:"v-list-item__content","data-no-activator":""},[re&&b(fi,{key:"title"},{default:()=>{var pe;return[((pe=a.title)==null?void 0:pe.call(a,{title:e.title}))??_e(e.title)]}}),kt&&b(di,{key:"subtitle"},{default:()=>{var pe;return[((pe=a.subtitle)==null?void 0:pe.call(a,{subtitle:e.subtitle}))??_e(e.subtitle)]}}),(Hn=a.default)==null?void 0:Hn.call(a,H.value)]),hi&&I("div",{key:"append",class:"v-list-item__append"},[a.append?b(ge,{key:"append-defaults",defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0},VCheckboxBtn:{density:e.density}}},{default:()=>{var pe;return[(pe=a.append)==null?void 0:pe.call(a,H.value)]}}):I(Ve,null,[e.appendIcon&&b(xe,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&b(Mt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),I("div",{class:"v-list-item__spacer"},null)])]}}),[[yt,y.value&&De.value]])}),{activate:r,isActivated:u,isGroupActivator:g,isSelected:v,list:w,select:c,root:f,id:L,link:s}}}),wl=T({color:String,inset:Boolean,sticky:Boolean,title:String,...ee(),...le()},"VListSubheader"),kl=G()({name:"VListSubheader",props:wl(),setup(e,t){let{slots:n}=t;const{textColorClasses:a,textColorStyles:i}=tt(()=>e.color);return Z(()=>{const s=!!(n.default||e.title);return b(e.tag,{class:j(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},a.value,e.class]),style:X([{textColorStyles:i},e.style])},{default:()=>{var o;return[s&&I("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),Cl=T({items:Array,returnObject:Boolean},"VListChildren"),vi=G()({name:"VListChildren",props:Cl(),setup(e,t){let{slots:n}=t;return ii(),()=>{var a,i;return((a=n.default)==null?void 0:a.call(n))??((i=e.items)==null?void 0:i.map((s,o)=>{var d,g;let{children:l,props:r,type:u,raw:c}=s;if(u==="divider")return((d=n.divider)==null?void 0:d.call(n,{props:r}))??b(ai,r,null);if(u==="subheader")return((g=n.subheader)==null?void 0:g.call(n,{props:r}))??b(kl,r,null);const m={subtitle:n.subtitle?f=>{var S;return(S=n.subtitle)==null?void 0:S.call(n,{...f,item:c})}:void 0,prepend:n.prepend?f=>{var S;return(S=n.prepend)==null?void 0:S.call(n,{...f,item:c})}:void 0,append:n.append?f=>{var S;return(S=n.append)==null?void 0:S.call(n,{...f,item:c})}:void 0,title:n.title?f=>{var S;return(S=n.title)==null?void 0:S.call(n,{...f,item:c})}:void 0},v=ba.filterProps(r);return l?b(ba,Q(v,{value:e.returnObject?c:r==null?void 0:r.value,rawId:r==null?void 0:r.value}),{activator:f=>{let{props:S}=f;const p=Q(r,S,{value:e.returnObject?c:r.value});return n.header?n.header({props:p}):b(yn,Q(p,{index:o}),m)},default:()=>b(vi,{items:l,returnObject:e.returnObject},n)}):n.item?n.item({props:{...r,index:o}}):b(yn,Q(r,{index:o,value:e.returnObject?c:r.value}),m)}))}}}),_l=T({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},itemType:{type:[Boolean,String,Array,Function],default:"type"},returnObject:Boolean,valueComparator:Function},"list-items"),xl=new Set(["item","divider","subheader"]);function Ze(e,t){const n=ke(t,e.itemTitle,t),a=ke(t,e.itemValue,n),i=ke(t,e.itemChildren),s=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?at(t,["children"]):t:void 0:ke(t,e.itemProps);let o=ke(t,e.itemType,"item");xl.has(o)||(o="item");const l={title:n,value:a,...s};return{type:o,title:String(l.title??""),value:l.value,props:l,children:o==="item"&&Array.isArray(i)?mi(e,i):void 0,raw:t}}Ze.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function mi(e,t){const n=_a(e,Ze.neededProps),a=[];for(const i of t)a.push(Ze(n,i));return a}function Kl(e){const t=C(()=>mi(e,e.items)),n=C(()=>t.value.some(l=>l.value===null)),a=z(new Map),i=z([]);Ne(()=>{const l=t.value,r=new Map,u=[];for(let c=0;c{let{raw:u}=r;return u}):l.map(r=>{let{value:u}=r;return u})}return{items:t,transformIn:s,transformOut:o}}const El=new Set(["item","divider","subheader"]);function Il(e,t){const n=ln(t)?t:ke(t,e.itemTitle),a=ln(t)?t:ke(t,e.itemValue,void 0),i=ke(t,e.itemChildren),s=e.itemProps===!0?at(t,["children"]):ke(t,e.itemProps);let o=ke(t,e.itemType,"item");El.has(o)||(o="item");const l={title:n,value:a,...s};return{type:o,title:l.title,value:l.value,props:l,children:o==="item"&&i?gi(e,i):void 0,raw:t}}function gi(e,t){const n=[];for(const a of t)n.push(Il(e,a));return n}function Pl(e){return{items:C(()=>gi(e,e.items))}}const Al=T({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:oe,collapseIcon:oe,lines:{type:[Boolean,String],default:"one"},slim:Boolean,prependGap:[Number,String],indent:[Number,String],nav:Boolean,navigationStrategy:{type:String,default:"focus"},navigationIndex:Number,"onClick:open":ft(),"onClick:select":ft(),"onUpdate:opened":ft(),...vl({selectStrategy:"single-leaf",openStrategy:"list"}),...st(),...ee(),...Ge(),...rt(),...bt(),..._l(),...Oe(),...le(),...fe(),...Ue({variant:"text"})},"VList"),Vl=G()({name:"VList",props:Al(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"update:navigationIndex":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{attrs:n,slots:a,emit:i}=t;const{items:s}=Pl(e),{themeClasses:o}=ye(e),{backgroundColorClasses:l,backgroundColorStyles:r}=Qe(()=>e.bgColor),{borderClasses:u}=ot(e),{densityClasses:c}=lt(e),{dimensionStyles:m}=ut(e),{elevationClasses:v}=pt(e),{roundedClasses:d}=Be(e),{children:g,open:f,parents:S,select:p,getPath:E}=ml(e,{items:s,returnObject:k(()=>e.returnObject),scrollToActive:k(()=>e.navigationStrategy==="track")}),L=k(()=>e.lines?`v-list--${e.lines}-line`:void 0),w=k(()=>e.activeColor),h=k(()=>e.baseColor),_=k(()=>e.color),x=k(()=>e.selectable||e.activatable),y=Pe(e,"navigationIndex",-1,$=>$??-1),R=Cn();ii({filterable:e.filterable,trackingIndex:y,navigationStrategy:k(()=>e.navigationStrategy),uid:R}),W(s,()=>{e.navigationStrategy==="track"&&(y.value=-1)}),Ft({VListGroup:{activeColor:w,baseColor:h,color:_,expandIcon:k(()=>e.expandIcon),collapseIcon:k(()=>e.collapseIcon)},VListItem:{activeClass:k(()=>e.activeClass),activeColor:w,baseColor:h,color:_,density:k(()=>e.density),disabled:k(()=>e.disabled),lines:k(()=>e.lines),nav:k(()=>e.nav),slim:k(()=>e.slim),variant:k(()=>e.variant),tabindex:k(()=>e.navigationStrategy==="track"?-1:void 0)}});const F=z(!1),A=M();function V($){F.value=!0}function P($){F.value=!1}function N($){var J;e.navigationStrategy==="track"?~y.value||(y.value=Y("first")):!F.value&&!($.relatedTarget&&((J=A.value)!=null&&J.contains($.relatedTarget)))&&K()}function O(){e.navigationStrategy==="track"&&(y.value=-1)}function U($){switch($){case"ArrowDown":return"next";case"ArrowUp":return"prev";case"Home":return"first";case"End":return"last";default:return null}}function Y($){const J=s.value.length;if(J===0)return-1;let q;$==="first"?q=0:$==="last"?q=J-1:(q=y.value+($==="next"?1:-1),q<0&&(q=J-1),q>=J&&(q=0));const be=q;let Ke=0;for(;Ke=J&&(q=0),q===be)return-1;Ke++}return-1}function te($){const J=$.target;if(!A.value||J.tagName==="INPUT"&&["Home","End"].includes($.key)||J.tagName==="TEXTAREA")return;const q=U($.key);if(q!==null)if($.preventDefault(),e.navigationStrategy==="track"){const be=Y(q);be!==-1&&(y.value=be)}else K(q)}function he($){F.value=!0}function K($,J){if(A.value)return qi(A.value,$,J)}return Z(()=>{const $=e.indent??(e.prependGap?Number(e.prependGap)+24:void 0),J=x.value?n.ariaMultiselectable??!String(e.selectStrategy).startsWith("single-"):void 0;return b(e.tag,{ref:A,class:j(["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},o.value,l.value,u.value,c.value,v.value,L.value,d.value,e.class]),style:X([{"--v-list-indent":B($),"--v-list-group-prepend":$?"0px":void 0,"--v-list-prepend-gap":B(e.prependGap)},r.value,m.value,e.style]),tabindex:e.disabled?-1:0,role:x.value?"listbox":"list","aria-activedescendant":e.navigationStrategy==="track"&&y.value>=0?`v-list-item-${R}-${y.value}`:void 0,"aria-multiselectable":J,onFocusin:V,onFocusout:P,onFocus:N,onBlur:O,onKeydown:te,onMousedown:he},{default:()=>[b(vi,{items:s.value,returnObject:e.returnObject},a)]})}),{open:f,select:p,focus:K,children:g,parents:S,getPath:E,navigationIndex:y}}});let hn=null;const yi={name:"RateLimitModal",data(){return{isVisible:!1,activeRequests:[]}},computed:{hasActiveRequests(){return this.activeRequests.length>0}},watch:{hasActiveRequests(e){this.isVisible=e}},methods:{close(){this.isVisible=!1},show(e,t,n){const a=Date.now()+Math.random().toString(36).substring(2,9),i=Math.max(0,Math.floor((new Date(e)-new Date)/1e3)),s={id:a,resetTime:e,path:t,method:n,remainingSeconds:i};this.activeRequests.push(s),this.startCountdown(a),this.isVisible=!0},startCountdown(e){const t=this.activeRequests.find(a=>a.id===e);if(!t)return;const n=setInterval(()=>{const a=this.activeRequests.findIndex(i=>i.id===e);if(a===-1){clearInterval(n);return}this.activeRequests[a].remainingSeconds--,this.activeRequests[a].remainingSeconds<=0&&(clearInterval(n),this.activeRequests.splice(a,1))},1e3);t.intervalId=n},clearAllCountdowns(){this.activeRequests.forEach(e=>{e.intervalId&&clearInterval(e.intervalId)}),this.activeRequests=[]}},beforeUnmount(){this.clearAllCountdowns()},created(){hn=this}};yi.show=function(e,t,n){hn&&hn.show(e,t,n)};const Ll=yi,Tl={class:"text-primary font-weight-bold"};function Ol(e,t,n,a,i,s){return Ce(),ze(tl,{modelValue:e.isVisible,"onUpdate:modelValue":t[0]||(t[0]=o=>e.isVisible=o),"max-width":"500",persistent:""},{default:ie(()=>[b(ga,{class:"rate-limit-modal"},{default:ie(()=>[b(ei,{class:"text-center pa-4 bg-error text-white"},{default:ie(()=>[b(xe,{class:"mr-2",icon:"mdi-clock-alert-outline",size:"large"}),t[1]||(t[1]=Ct(" 请求频率超限 ",-1))]),_:1}),b(mn,{class:"pa-6"},{default:ie(()=>[t[3]||(t[3]=I("div",{class:"text-body-1 mb-4"}," 您的请求过于频繁,请稍后再试。 ",-1)),e.activeRequests.length>0?(Ce(),ze(ga,{key:0,class:"mb-4",flat:""},{default:ie(()=>[b(mn,null,{default:ie(()=>[(Ce(!0),In(Ve,null,ts(e.activeRequests,(o,l)=>(Ce(),ze(Vl,{key:l,class:"mb-4"},{default:ie(()=>[b(yn,{color:"primary","prepend-icon":"mdi-web"},{default:ie(()=>[b(fi,null,{default:ie(()=>[t[2]||(t[2]=Ct(" 等待时间: ",-1)),I("span",Tl,_e(o.remainingSeconds),1)]),_:2},1024),b(di,null,{default:ie(()=>[Ct(_e(o.method)+" "+_e(o.path),1)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),e.index[b(il),b(Ha,{color:"primary",variant:"tonal",onClick:e.close},{default:ie(()=>[...t[5]||(t[5]=[Ct(" 我知道了 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Bl=Aa(Ll,[["render",Ol]]),Rl=T({...ee(),...at(ji(),["fullHeight"]),...fe()},"VApp"),Nl=G()({name:"VApp",props:Rl(),setup(e,t){let{slots:n}=t;const a=ye(e),{layoutClasses:i,getLayoutItem:s,items:o,layoutRef:l}=Hi({...e,fullHeight:!0}),{rtlClasses:r}=zt();return Z(()=>{var u;return I("div",{ref:l,class:j(["v-application",a.themeClasses.value,i.value,r.value,e.class]),style:X([e.style])},[I("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:s,items:o,theme:a}}}),$l={__name:"App",setup(e){const t=Sa(),n=M(!1),a=M(""),i=M(10),s=M(30);function o(){n.value=Ie("background.enabled")||!1;const m=Ie("background.imageData")||"",v=Ie("background.url")||"";a.value=m||v,i.value=Ie("background.blur")??10,s.value=Ie("background.opacity")??30}const l=C(()=>!n.value||!a.value?{}:{background:"transparent"}),r=C(()=>({backgroundImage:`url(${a.value})`,backgroundSize:"cover",backgroundPosition:"center",filter:`blur(${i.value}px)`,transform:"scale(1.05)"})),u=C(()=>({background:`rgba(0, 0, 0, ${s.value/100})`}));let c=null;return it(()=>{const m=Ie("theme.mode");t.global.name.value=m,o(),c=Pa((v,d)=>{var f;const g=(f=d==null?void 0:d.detail)==null?void 0:f.key;(!g||g.startsWith("background.")||g==="theme.mode")&&(o(),t.global.name.value=Ie("theme.mode"))}),window.addEventListener("beforeinstallprompt",v=>{v.preventDefault(),window.deferredPwaPrompt=v,window.dispatchEvent(new Event("pwa-prompt-ready"))})}),ns(()=>{c&&c()}),(m,v)=>{const d=as("router-view"),g=Qa;return Ce(),ze(Nl,{style:X(l.value)},{default:ie(()=>[n.value?(Ce(),In(Ve,{key:0},[I("div",{class:"app-background-image",style:X(r.value)},null,4),I("div",{class:"app-background-overlay",style:X(u.value)},null,4)],64)):Bt("",!0),b(d,null,{default:ie(({Component:f,route:S})=>[b($e,{mode:"out-in",name:"md3"},{default:ie(()=>[(Ce(),ze(xa(f),{key:S.path}))]),_:2},1024)]),_:1}),b(g),b(Bl)]),_:1},8,["style"])}}},jt=is($l);ds(jt);jt.use(Xe);jt.component("GlobalMessage",Qa);jt.mount("#app");const pa=async()=>{try{const{getVisitorId:e}=await ae(async()=>{const{getVisitorId:a}=await import("./visitorId-2IHCmkCy.js");return{getVisitorId:a}},__vite__mapDeps([56,1,2]),import.meta.url),t=(await ae(async()=>{const{default:a}=await import("./index-ghQi_28l.js");return{default:a}},[],import.meta.url)).default;t.init("rhp8uqoc3l");const n=await e();console.log("Visitor ID:",n),t.identify(n),t.setTag("fingerprintjs",n)}catch(e){console.warn("Clarity 加载或标识设置失败:",e)}};document.readyState==="complete"?pa():window.addEventListener("load",pa,{once:!0});export{bt as $,Re as A,fa as B,ni as C,Dt as D,Ja as E,Wo as F,Wl as G,tt as H,Qe as I,no as J,lt as K,$n as L,Ge as M,Be as N,Ln as O,Ye as P,Ka as Q,Oe as R,Te as S,Ht as T,Dn as U,Fs as V,Uo as W,ys as X,bs as Y,ps as Z,Aa as _,rt as a,yt as a0,Hl as a1,pt as a2,bo as a3,ho as a4,Zo as a5,kl as a6,Na as a7,Hs as a8,Ra as a9,jl as aA,Kl as aB,Ze as aC,Qo as aD,_l as aE,yo as aF,fs as aG,vs as aH,zl as aI,Vs as aa,As as ab,Eo as ac,xo as ad,Ps as ae,ot as af,ge as ag,st as ah,Bl as ai,wt as aj,On as ak,St as al,Ue as am,Tn as an,ql as ao,Is as ap,qt as aq,Bn as ar,Ul as as,Wt as at,Rn as au,ma as av,Us as aw,Co as ax,ko as ay,Xe as az,ut as b,ei as c,mn as d,ga as e,xe as f,il as g,Ha as h,ai as i,Ba as j,tl as k,Za as l,le as m,Ie as n,Mt as o,Vl as p,yn as q,fi as r,gs as s,di as t,yl as u,Gl as v,Pa as w,ae as x,ta as y,Bo as z}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./default-VxHjJPAZ.js","./vendor-vuetify-DsKlzgKp.js","./vendor-vue-BiQC5iF7.js","./default-CmdaPMSp.css","./index-DCuIjJC4.js","./dataProvider-GWPC-0Vt.js","./vendor-utils-DwALrQNc.js","./serverRotation-BtcwvdZJ.js","./VChip-mRzIPuM0.js","./VChip-Dmz_1Lnv.css","./VTabs-DqmvmKGK.js","./VTable-Cq72iBVc.js","./VTable-CNLJxQof.css","./VTabs-566n5b08.css","./VAlert-BZ4-f-hy.js","./VAlert-D_OX1cfW.css","./VTooltip-2IUjfpCS.js","./VTooltip-D7EaNDeY.css","./VTextField-BurlcggD.js","./VTextField-DTDEIDq0.css","./soundList-D9U-Grcp.js","./VSwitch-k6hfPfa2.js","./VSwitch-Bk42mIwg.css","./VContainer-DZyPrcqa.js","./VContainer-B1KSavhG.css","./socketClient-BKHEsaLg.js","./vendor-socket-dm1FmSOd.js","./deviceEvents-HN9RDua9.js","./VAppBarTitle-DheyIZnb.js","./VAppBarTitle-CczdD-Q2.css","./VRow-Cjhiymuu.js","./VRow-D2ArqUC2.css","./index-BFmbztHq.css","./404-D89xq0CT.js","./authorize-CZL9tEmI.js","./CacheManagement-3L-v8_PB.js","./VExpansionPanels-BDI8gHu5.js","./VExpansionPanels-kEj4ZJQK.css","./VSkeletonLoader-DwE_iqTb.js","./VSkeletonLoader-C11ZEozu.css","./cses2wakeup-DRhHxOpY.js","./VTextarea-vGWmTJww.js","./VTextarea-_xVwaw_z.css","./VDataTable-DmTCHg4b.js","./VPagination-DLzhjdaP.js","./VPagination-BF2MZmld.css","./VSelect-oxA0t9CG.js","./VSheet-BBnSA_kJ.js","./VSheet-DxsDksIw.css","./VCheckboxBtn-BKcSogH0.js","./VSelect-DHZViySU.css","./VDataTable-Cl7qiDOP.css","./VCheckbox-BRi_fHJs.js","./VCheckbox-ZL-u1kGB.css","./cses2wakeup-DFUa6tSq.css","./debug-DCZMB0S_.js","./visitorId-D_nwlNzA.js","./debug-CbS14biG.css","./debug-init-57thZXh2.js","./VForm-ObW_L7SS.js","./debug-socket-iwz8uZ6l.js","./_id_-DMpTK4Oz.js","./ExamConfigEditor-BVwEXehR.js","./VAutocomplete-N0zTUlyj.js","./VAutocomplete-Ygy_KjMW.css","./VDatePicker-CuGF0KeL.js","./VPicker-SM18M-iq.js","./VPicker-Dm9DplUc.css","./VDatePicker-zglzEVGT.css","./VTimePicker-BApLLZ8X.js","./VTimePicker-BkWY3_8P.css","./ExamConfigEditor-HgNV6CVV.css","./examschedule-BZ-idwf4.js","./examschedule-D7wPNFui.css","./index-7Awvo4-J.js","./_id_-DjPmieQy.js","./settings-DjXlifwc.js","./MessageLog-CZsTVP4i.js","./MessageLog-BGkFwivK.css","./VCombobox-BGa7K58w.js","./VCombobox-r6cc1Iy_.css","./settings-BxfdCqX7.css","./socket-debugger-AgrQ1Sap.js","./socket-debugger-B22H3Il3.css"])))=>i.map(i=>d[i]); +import{c as bi,g as qe,p as T,d as bn,i as jn,a as pi,b as Si,e as wi,f as G,h as ye,j as Ft,u as Z,m as fe,k as ee,l as Ee,n as Pe,o as Je,w as pn,q as ki,r as Ci,s as B,t as Sa,v as _i,x as xi,I as oe,S as Sn,y as wa,P as Tt,z as et,A as zt,B as an,C as ht,D as Gn,E as Ae,F as sn,G as Et,H as wn,J as Ei,K as Ii,L as Ot,M as Pi,N as Un,O as Kn,Q as Kt,R as Xt,T as ka,U as Xn,V as Ai,W as Vi,X as Yn,Y as Li,Z as Ti,_ as Oi,$ as It,a0 as Bi,a1 as Ri,a2 as Ca,a3 as Ni,a4 as Fe,a5 as at,a6 as on,a7 as $i,a8 as Di,a9 as Mi,aa as kn,ab as Jn,ac as Qn,ad as Fi,ae as zi,af as Wi,ag as ft,ah as ln,ai as ke,aj as _a,ak as qi,al as Hi,am as ji}from"./vendor-vuetify-DsKlzgKp.js";import{J as Gi,K as Ui,L as Ki,e as C,t as k,M as rn,l as se,k as I,n as j,F as Ve,j as S,N as X,E as Cn,p as He,d as Le,A as je,o as W,D as it,O as Xi,r as vt,u as Yi,m as Q,y as Ji,T as Qi,s as z,q as ve,b as M,w as Ne,P as $e,Q as xa,I as de,R as We,S as _e,v as Ea,x as ne,B as Ia,U as _n,h as xn,V as En,W as Zi,X as Ce,Y as ze,Z as ie,f as es,_ as In,$ as Bt,a0 as Pn,a1 as Ct,a2 as ts,a3 as ns,a4 as as,a5 as is}from"./vendor-vue-BiQC5iF7.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const ss="modulepreload",os=function(e,t){return new URL(e,t).href},Zn={},ae=function(t,n,a){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),r=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=os(u,a),u in Zn)return;Zn[u]=!0;const c=u.endsWith(".css"),m=c?'[rel="stylesheet"]':"";if(!!a)for(let g=o.length-1;g>=0;g--){const f=o[g];if(f.href===u&&(!c||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":ss,c||(d.as="script"),d.crossOrigin="",d.href=u,r&&d.setAttribute("nonce",r),document.head.appendChild(d),c)return new Promise((g,f)=>{d.addEventListener("load",g),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},ls=bi({theme:{defaultTheme:"dark"}}),rs=Gi(),us=e=>{const t={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>ae(()=>import("./default-VxHjJPAZ.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)})).forEach(([i,s])=>{let o=i.replace("/src/layouts/","").replace(".vue","");t[o]=s});function a(i,s=!0){return i.map(o=>{var l,r,u,c,m,v;if(((l=o.children)==null?void 0:l.length)>0&&(o.children=a(o.children,!1)),s){if(!o.component&&((r=o.children)==null?void 0:r.find(g=>{var f;return(g.path===""||g.path==="/")&&((f=g.meta)==null?void 0:f.isLayout)})))return o;if(((u=o.meta)==null?void 0:u.layout)!==!1)return{path:o.path,component:t[((c=o.meta)==null?void 0:c.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(m=o.meta)!=null&&m.layout?{path:o.path,component:t[(v=o.meta)==null?void 0:v.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return a(e)},cs=[{path:"/",name:"/",component:()=>ae(()=>import("./index-DCuIjJC4.js").then(e=>e.i),__vite__mapDeps([4,2,5,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)},{path:"/404",name:"/404",component:()=>ae(()=>import("./404-D89xq0CT.js"),__vite__mapDeps([33,30,1,2,31,23,24]),import.meta.url)},{path:"/authorize",name:"/authorize",component:()=>ae(()=>import("./authorize-CZL9tEmI.js"),__vite__mapDeps([34,2,30,1,31,23,24]),import.meta.url)},{path:"/CacheManagement",name:"/CacheManagement",component:()=>ae(()=>import("./CacheManagement-3L-v8_PB.js"),__vite__mapDeps([35,14,1,2,15,36,37,8,9,38,39,30,31,23,24]),import.meta.url)},{path:"/cses2wakeup",name:"/cses2wakeup",component:()=>ae(()=>import("./cses2wakeup-DRhHxOpY.js"),__vite__mapDeps([40,30,1,2,31,14,15,10,11,12,8,9,13,16,17,41,18,19,42,21,22,38,39,43,44,45,46,47,48,49,50,51,52,53,23,24,54]),import.meta.url)},{path:"/debug",name:"/debug",component:()=>ae(()=>import("./debug-DCZMB0S_.js"),__vite__mapDeps([55,56,1,2,23,24,57]),import.meta.url)},{path:"/debug-init",name:"/debug-init",component:()=>ae(()=>import("./debug-init-57thZXh2.js"),__vite__mapDeps([58,5,6,7,30,1,2,31,59,18,19,23,24]),import.meta.url)},{path:"/debug-socket",name:"/debug-socket",component:()=>ae(()=>import("./debug-socket-iwz8uZ6l.js"),__vite__mapDeps([60,25,26,7,27,30,1,2,31,8,9,18,19,41,42,23,24]),import.meta.url)},{path:"/exam-editor",children:[{path:":id",name:"/exam-editor/[id]",component:()=>ae(()=>import("./_id_-DMpTK4Oz.js"),__vite__mapDeps([61,62,5,6,7,2,14,1,15,38,39,16,17,8,9,30,31,18,19,41,42,21,22,63,46,47,48,49,50,64,65,66,67,68,69,70,71,28,29,23,24]),import.meta.url)}]},{path:"/examschedule",name:"/examschedule",component:()=>ae(()=>import("./examschedule-BZ-idwf4.js"),__vite__mapDeps([72,62,5,6,7,2,14,1,15,38,39,16,17,8,9,30,31,18,19,41,42,21,22,63,46,47,48,49,50,64,65,66,67,68,69,70,71,23,24,73]),import.meta.url)},{path:"/list",children:[{path:"",name:"/list/",component:()=>ae(()=>import("./index-7Awvo4-J.js"),__vite__mapDeps([74,5,6,7,2,28,1,29,18,19,23,24]),import.meta.url)},{path:":id",name:"/list/[id]",component:()=>ae(()=>import("./_id_-DjPmieQy.js"),__vite__mapDeps([75,5,6,7,2,28,1,29,18,19,49,21,22,8,9,41,42,23,24]),import.meta.url)}]},{path:"/settings",name:"/settings",component:()=>ae(()=>import("./settings-DjXlifwc.js"),__vite__mapDeps([76,77,28,1,2,29,78,8,9,21,18,19,22,46,47,48,49,50,14,15,5,6,7,30,31,23,24,52,53,41,42,20,38,39,69,66,67,70,59,36,37,43,44,45,11,12,51,79,80,56,81]),import.meta.url)},{path:"/socket-debugger",name:"/socket-debugger",component:()=>ae(()=>import("./socket-debugger-AgrQ1Sap.js"),__vite__mapDeps([82,25,26,7,30,1,2,31,8,9,18,19,41,42,21,22,14,15,23,24,83]),import.meta.url)}],An=Ui({history:Ki("./"),routes:us(cs)});An.onError((e,t)=>{var n,a;(a=(n=e==null?void 0:e.message)==null?void 0:n.includes)!=null&&a.call(n,"Failed to fetch dynamically imported module")?localStorage.getItem("vuetify:dynamic-reload")?console.error("Dynamic import error, reloading page did not fix it",e):(console.log("Reloading page to fix dynamic import error"),localStorage.setItem("vuetify:dynamic-reload","true"),location.assign(t.fullPath)):console.error(e)});An.isReady().then(()=>{localStorage.removeItem("vuetify:dynamic-reload")});function ds(e){e.use(ls).use(An).use(rs)}async function fs(){return typeof Notification<"u"&&Notification.requestPermission?await Notification.requestPermission()==="granted"?(console.log("通知权限已授予"),!0):(console.warn("通知权限被拒绝"),!1):(console.warn("浏览器不支持通知权限请求"),!1)}async function vs(){var e;try{return(e=navigator.storage)!=null&&e.persist?await navigator.storage.persist():!1}catch(t){return console.warn("请求持久性存储失败:",t),!1}}const Yt="Classworks_settings",_t="classworks:settings:changed",ea={"server.domain":"https://kv-service.houlang.cloud","server.siteKey":""},Re={"device.uuid":{type:"string",default:"00000000-0000-4000-8000-000000000000",description:"设备唯一标识符",icon:"mdi-identifier"},"storage.persistOnLoad":{type:"boolean",default:!0,description:"是否在页面加载时自动请求持久性存储",icon:"mdi-database-sync"},"display.emptySubjectDisplay":{type:"string",default:"card",validate:e=>["card","button"].includes(e),description:"空科目的显示方式",icon:"mdi-card-outline"},"noiseMonitor.enabled":{type:"boolean",default:!0,description:"启用环境噪音监测",icon:"mdi-microphone"},"noiseMonitor.autoStart":{type:"boolean",default:!0,description:"打开页面时自动开始监测",icon:"mdi-play-circle-outline"},"noiseMonitor.permissionDismissed":{type:"boolean",default:!1,description:"已跳过麦克风权限引导(不再弹出介绍弹框)",icon:"mdi-microphone-off"},"timeCard.enabled":{type:"boolean",default:!0,description:"启用时间卡片",icon:"mdi-clock-outline"},"timeCard.use12h":{type:"boolean",default:!1,description:"使用 12 小时制显示时间",icon:"mdi-clock-time-six-outline"},"hitokoto.enabled":{type:"boolean",default:!0,description:"启用一言",icon:"mdi-comment-quote"},"hitokoto.refreshInterval":{type:"number",default:300,description:"刷新时间(秒,0为不自动刷新)",icon:"mdi-timer-refresh"},"display.dynamicSort":{type:"boolean",default:!0,description:"是否启用动态排序",icon:"mdi-sort-variant"},"display.showRandomButton":{type:"boolean",default:!1,description:"是否显示随机点人按钮",icon:"mdi-shuffle-variant"},"display.showFullscreenButton":{type:"boolean",default:!0,description:"是否显示全屏按钮",icon:"mdi-fullscreen"},"display.cardHoverEffect":{type:"boolean",default:!0,description:"是否启用卡片悬浮效果",icon:"mdi-gesture-tap"},"display.enhancedTouchMode":{type:"boolean",default:!0,description:"是否启用增强触摸模式",icon:"mdi-gesture-tap-button"},"display.showAntiScreenBurnCard":{type:"boolean",default:!1,description:"是否显示防烧屏忽悠卡片",icon:"mdi-monitor-shimmer"},"display.showListCard":{type:"boolean",default:!0,description:"是否显示列表卡片",icon:"mdi-list-box"},"display.showExamScheduleButton":{type:"boolean",default:!0,description:"是否显示考试看板",icon:"mdi-calendar-check"},"display.showQuickTools":{type:"boolean",default:!0,description:"是否显示快捷键盘",icon:"mdi-dialpad"},"display.forceDesktopMode":{type:"boolean",default:!1,description:"强制使用一体机UI模式",icon:"mdi-monitor"},"display.lateStudentsArePresent":{type:"boolean",default:!1,description:"将迟到人数算入出勤人数",icon:"mdi-clock-fast"},"server.domain":{type:"string",default:"",validate:e=>{if(!e)return!0;try{return new URL(e),!0}catch(t){return console.error("域名格式无效:",t),!1}},description:"后端服务器域名",icon:"mdi-web"},"server.classNumber":{type:"string",default:"高三八班",validate:e=>/.*/.test(e),description:"班级编号",icon:"mdi-account-group"},"server.siteKey":{type:"string",default:"",description:"网站令牌",icon:"mdi-key-chain"},"server.kvToken":{type:"string",default:"",description:"KV授权令牌",icon:"mdi-shield-key"},"server.authDomain":{type:"string",default:"https://kv.houlang.cloud",description:"授权服务器域名",icon:"mdi-shield-account",validate:e=>{if(!e)return!0;try{return new URL(e),!0}catch(t){return console.error("授权域名格式无效:",t),!1}}},"server.provider":{type:"string",default:"classworkscloud",validate:e=>["kv-local","kv-server","classworkscloud"].includes(e),description:"数据提供者",icon:"mdi-database"},"refresh.auto":{type:"boolean",default:!1,description:"是否启用自动刷新",icon:"mdi-refresh-auto"},"refresh.interval":{type:"number",default:300,validate:e=>e>=10&&e<=3600,description:"自动刷新间隔(秒)",icon:"mdi-timer-outline"},"font.size":{type:"number",default:28,validate:e=>e>=16&&e<=100,description:"字体大小",icon:"mdi-format-size"},"edit.autoSave":{type:"boolean",default:!0,description:"是否启用自动保存",icon:"mdi-content-save-outline"},"edit.blockNonTodayAutoSave":{type:"boolean",default:!0,description:"禁止自动保存非当天数据",icon:"mdi-calendar-lock"},"edit.refreshBeforeEdit":{type:"boolean",default:!0,description:"编辑前是否自动刷新",icon:"mdi-refresh"},"edit.confirmNonTodaySave":{type:"boolean",default:!0,description:"保存非当天数据需确认",icon:"mdi-calendar-alert"},"edit.blockPastDataEdit":{type:"boolean",default:!1,description:"禁止编辑过往数据",icon:"mdi-lock-clock"},"edit.autoSavePromptText":{type:"string",default:"喵?喵呜!",description:"自动保存模式提示文本",icon:"mdi-text-box-outline"},"edit.manualSavePromptText":{type:"string",default:"写完后点击上传谢谢喵",description:"手动保存模式提示文本",icon:"mdi-text-box-outline"},"developer.enabled":{type:"boolean",default:!1,description:"是否启用开发者选项",icon:"mdi-developer-board"},"developer.showDebugConfig":{type:"boolean",default:!1,description:"是否显示调试配置",icon:"mdi-bug-outline"},"developer.disableMessageLog":{type:"boolean",default:!1,description:"禁用消息日志记录",requireDeveloper:!0,icon:"mdi-message-off-outline"},"message.showSidebar":{type:"boolean",default:!0,description:"是否显示消息记录侧栏",requireDeveloper:!0,icon:"mdi-message-text-outline"},"message.maxActiveMessages":{type:"number",default:5,validate:e=>e>=1&&e<=10,description:"同时显示的最大消息数量",requireDeveloper:!0,icon:"mdi-message-badge-outline"},"message.timeout":{type:"number",default:5e3,validate:e=>e>=1e3&&e<=3e4,description:"消息自动关闭时间(毫秒)",requireDeveloper:!0,icon:"mdi-timer-sand"},"message.saveHistory":{type:"boolean",default:!0,description:"是否保存消息历史记录",requireDeveloper:!0,icon:"mdi-history"},"theme.mode":{type:"string",default:"dark",validate:e=>["light","dark"].includes(e),description:"主题模式",icon:"mdi-theme-light-dark"},"background.enabled":{type:"boolean",default:!1,description:"启用自定义背景",icon:"mdi-image"},"background.url":{type:"string",default:"",description:"背景图片地址",icon:"mdi-link"},"background.imageData":{type:"string",default:"",description:"本地背景图片(Base64)",icon:"mdi-image-area"},"background.blur":{type:"number",default:10,validate:e=>e>=0&&e<=50,description:"毛玻璃模糊幅度(px)",icon:"mdi-blur"},"background.opacity":{type:"number",default:30,validate:e=>e>=0&&e<=80,description:"遮罩暗色程度(%)",icon:"mdi-circle-half-full"},"notification.singleSound":{type:"string",default:"Teams 默认.mp3",description:"单次通知铃声",icon:"mdi-bell-ring"},"notification.urgentSound":{type:"string",default:"Teams 默认通话铃.mp3",description:"持续通知铃声",icon:"mdi-bell-alert"},"randomPicker.enabled":{type:"boolean",default:!0,description:"是否启用随机点名功能",icon:"mdi-account-question"},"randomPicker.animation":{type:"boolean",default:!0,description:"是否启用随机点名动画效果",icon:"mdi-animation-play"},"randomPicker.defaultCount":{type:"number",default:1,validate:e=>e>=1&&e,description:"默认抽取人数",icon:"mdi-counter"},"randomPicker.excludeAbsent":{type:"boolean",default:!0,description:"是否排除请假学生",icon:"mdi-account-off"},"randomPicker.excludeLate":{type:"boolean",default:!1,description:"是否排除迟到学生",icon:"mdi-clock-alert"},"randomPicker.excludeExcluded":{type:"boolean",default:!0,description:"是否排除不参与学生",icon:"mdi-account-cancel"},"randomPicker.mode":{type:"string",default:"name",validate:e=>["name","number"].includes(e),description:"随机点名模式",icon:"mdi-format-list-numbered"},"randomPicker.maxNumber":{type:"number",default:60,validate:e=>e>=1&&e,description:"学号模式最大值",icon:"mdi-numeric"},"randomPicker.minNumber":{type:"number",default:1,validate:e=>e>=1&&e,description:"学号模式最小值",icon:"mdi-numeric-negative-1"},"pwa.hideInstallCard":{type:"boolean",default:!1,description:"不显示PWA安装卡片",icon:"mdi-download-off"}};class ms{constructor(){this.settingsCache=null,this.isInitialized=!1}init(){this.isInitialized||(this.loadSettings(),this.isInitialized=!0)}loadSettings(){this.settingsCache={};try{const t=typeof localStorage<"u"?localStorage.getItem(Yt):null;t&&(this.settingsCache=JSON.parse(t))}catch(t){console.error("加载设置失败:",t)}for(const[t,n]of Object.entries(Re))t in this.settingsCache||(this.settingsCache[t]=n.default);return this.settingsCache}saveSettings(){if(!(typeof localStorage>"u"))try{localStorage.setItem(Yt,JSON.stringify(this.settingsCache))}catch(t){console.error("保存设置失败:",t)}}getSetting(t){this.isInitialized||this.init();const n=Re[t];if(!n)return console.warn(`未定义的设置项: ${t}`),null;if(n.requireDeveloper&&!this.settingsCache["developer.enabled"])return n.default;if(this.settingsCache["server.provider"]==="classworkscloud"&&ea[t]!==void 0)return ea[t];const a=this.settingsCache[t];return a!==void 0?a:n.default}setSetting(t,n){this.isInitialized||this.init();const a=Re[t];if(!a)return console.warn(`未定义的设置项: ${t}`),!1;if(a.requireDeveloper&&!this.settingsCache["developer.enabled"])return console.warn(`设置项 ${t} 需要启用开发者选项`),!1;try{const i=this.settingsCache[t];if(typeof n!==a.type&&(n=a.type==="boolean"?!!n:a.type==="number"?Number(n):String(n)),a.validate&&!a.validate(n))return console.warn(`设置项 ${t} 的值无效`),!1;this.settingsCache[t]=n,this.saveSettings(),this.logSettingsChange(t,i,n),typeof window<"u"&&window.dispatchEvent(new CustomEvent(_t,{detail:{key:t,value:n}}));const s=a.legacyKey;return s&&typeof localStorage<"u"&&localStorage.setItem(s,n.toString()),!0}catch(i){return console.error(`设置配置项 ${t} 失败:`,i),!1}}logSettingsChange(t,n,a){this.settingsCache["developer.enabled"]&&this.settingsCache["developer.showDebugConfig"]&&console.log(`[Settings] ${t}:`,{old:n,new:a,time:new Date().toLocaleTimeString()})}resetSetting(t){this.isInitialized||this.init();const n=Re[t];if(!n){console.warn(`未定义的设置项: ${t}`);return}this.settingsCache[t]=n.default,this.saveSettings(),typeof window<"u"&&window.dispatchEvent(new CustomEvent(_t,{detail:{key:t,value:n.default}}))}resetAllSettings(){this.settingsCache={};for(const[t,n]of Object.entries(Re))this.settingsCache[t]=n.default;this.saveSettings()}watchSettings(t){if(typeof window>"u")return()=>{};const n=i=>{i.key===Yt&&(this.settingsCache=JSON.parse(i.newValue),t(this.settingsCache,null))},a=i=>{t(this.settingsCache,i)};return window.addEventListener("storage",n),window.addEventListener(_t,a),()=>{window.removeEventListener("storage",n),window.removeEventListener(_t,a)}}getSettingDefinition(t){return Re[t]||null}exportSettingsAsKeyValue(){this.isInitialized||this.init();const t={};for(const n in Re)t[n]=this.getSetting(n);return t}}const Te=new ms;typeof window<"u"&&Te.init();const Ie=e=>Te.getSetting(e),gs=(e,t)=>Te.setSetting(e,t),ys=e=>Te.resetSetting(e),hs=()=>Te.resetAllSettings(),Pa=e=>Te.watchSettings(e),bs=e=>Te.getSettingDefinition(e),ps=()=>Te.exportSettingsAsKeyValue(),zl=Object.freeze(Object.defineProperty({__proto__:null,SettingsManager:Te,exportSettingsAsKeyValue:ps,getSetting:Ie,getSettingDefinition:bs,requestNotificationPermission:fs,requestPersistentStorage:vs,resetAllSettings:hs,resetSetting:ys,setSetting:gs,settingsDefinitions:Re,watchSettings:Pa},Symbol.toStringTag,{value:"Module"}));class Ss{constructor(){this.logs=[]}async addLog(t){return this.logs.push(t),this.logs.length>100&&this.logs.shift(),!0}async getLogs(t=20){return this.logs.slice(-t).reverse()}}const Pt=new Ss,we=[];let At=null,Se=null;const ct={SUCCESS:"success",ERROR:"error",INFO:"info",WARNING:"warning"},ws={timeout:3e3,showSnackbar:!0,addToLog:!0};async function xt(e,t,n="",a={}){const i={...ws,...a},s={id:Date.now()+Math.random(),type:e,title:t,content:n.substring(0,500),timestamp:new Date};if(i.addToLog)try{for(await Pt.addLog(s),we.unshift(s);we.length>Ie("message.maxActiveMessages");)we.pop();Se==null||Se(we)}catch(o){console.error("保存日志失败:",o)}return i.showSnackbar&&(At==null||At(s)),s}function ks(e,t){let n=null;return function(...a){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,a)},t)}}const Xe={install:e=>{e.config.globalProperties.$message={success:(t,n,a)=>xt(ct.SUCCESS,t,n,a),error:(t,n,a)=>xt(ct.ERROR,t,n,a),info:(t,n,a)=>xt(ct.INFO,t,n,a),warning:(t,n,a)=>xt(ct.WARNING,t,n,a)}},onSnackbar:e=>{At=e},onLog:e=>{Se=e},getMessages:async()=>{try{return await Pt.getLogs()}catch(e){return console.error("获取日志失败:",e),[...we]}},clearMessages:async()=>{try{await Pt.clearLogs(),we.length=0,Se==null||Se(we)}catch(e){console.error("清除日志失败:",e)}},MessageType:ct,markAsRead:()=>{},deleteMessage:async e=>{try{await Pt.deleteLog(e);const t=we.findIndex(n=>n.id===e);t!==-1&&we.splice(t,1),Se==null||Se(we)}catch(t){console.error("删除消息失败:",t)}},getUnreadCount:()=>0,debounce:ks},Aa=(e,t)=>{const n=e.__vccOpts||e;for(const[a,i]of t)n[a]=i;return n},st=T({border:[Boolean,Number,String]},"border");function ot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{borderClasses:C(()=>{const a=e.border;return a===!0||a===""?`${t}--border`:typeof a=="string"||a===0?String(a).split(" ").map(i=>`border-${i}`):[]})}}const Cs=[null,"default","comfortable","compact"],Ge=T({density:{type:String,default:"default",validator:e=>Cs.includes(e)}},"density");function lt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{densityClasses:k(()=>`${t}--density-${e.density}`)}}const bt=T({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function pt(e){return{elevationClasses:k(()=>{const n=rn(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Oe=T({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Be(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{roundedClasses:C(()=>{const a=rn(e)?e.value:e.rounded,i=rn(e)?!1:e.tile,s=[];if(i||a===!1)s.push("rounded-0");else if(a===!0||a==="")s.push(`${t}--rounded`);else if(typeof a=="string"||a===0)for(const o of String(a).split(" "))s.push(`rounded-${o}`);return s})}}const le=T({tag:{type:[String,Object,Function],default:"div"}},"tag");function Vn(e){return bn(()=>{const{class:t,style:n}=xs(e);return{colorClasses:t,colorStyles:n}})}function tt(e){const{colorClasses:t,colorStyles:n}=Vn(()=>({text:se(e)}));return{textColorClasses:t,textColorStyles:n}}function Qe(e){const{colorClasses:t,colorStyles:n}=Vn(()=>({background:se(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function _s(e){return{text:typeof e.text=="string"?e.text.replace(/^text-/,""):e.text,background:typeof e.background=="string"?e.background.replace(/^bg-/,""):e.background}}function xs(e){const t=_s(se(e)),n=[],a={};if(t.background)if(jn(t.background)){if(a.backgroundColor=t.background,!t.text&&pi(t.background)){const i=Si(t.background);if(i.a==null||i.a===1){const s=wi(i);a.color=s,a.caretColor=s}}}else n.push(`bg-${t.background}`);return t.text&&(jn(t.text)?(a.color=t.text,a.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:a}}const Es=["elevated","flat","tonal","outlined","text","plain"];function St(e,t){return I(Ve,null,[e&&I("span",{key:"overlay",class:j(`${t}__overlay`)},null),I("span",{key:"underlay",class:j(`${t}__underlay`)},null)])}const Ue=T({color:String,variant:{type:String,default:"elevated",validator:e=>Es.includes(e)}},"variant");function wt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();const n=k(()=>{const{variant:s}=se(e);return`${t}--variant-${s}`}),{colorClasses:a,colorStyles:i}=Vn(()=>{const{variant:s,color:o}=se(e);return{[["elevated","flat"].includes(s)?"background":"text"]:o}});return{colorClasses:a,colorStyles:i,variantClasses:n}}const Va=T({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...st(),...ee(),...Ge(),...bt(),...Oe(),...le(),...fe(),...Ue()},"VBtnGroup"),ta=G()({name:"VBtnGroup",props:Va(),setup(e,t){let{slots:n}=t;const{themeClasses:a}=ye(e),{densityClasses:i}=lt(e),{borderClasses:s}=ot(e),{elevationClasses:o}=pt(e),{roundedClasses:l}=Be(e);Ft({VBtn:{height:k(()=>e.direction==="horizontal"?"auto":null),baseColor:k(()=>e.baseColor),color:k(()=>e.color),density:k(()=>e.density),flat:!0,variant:k(()=>e.variant)}}),Z(()=>S(e.tag,{class:j(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided},a.value,s.value,i.value,o.value,l.value,e.class]),style:X(e.style)},n))}}),Is=T({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Ps=T({value:null,disabled:Boolean,selectedClass:String},"group-item");function As(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const a=Ee("useGroupItem");if(!a)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const i=Cn();He(Symbol.for(`${t.description}:id`),i);const s=Le(t,null);if(!s){if(!n)return s;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=k(()=>e.value),l=C(()=>!!(s.disabled.value||e.disabled));function r(){s==null||s.register({id:i,value:o,disabled:l},a)}function u(){s==null||s.unregister(i)}r(),je(()=>u());const c=C(()=>s.isSelected(i)),m=C(()=>s.items.value[0].id===i),v=C(()=>s.items.value[s.items.value.length-1].id===i),d=C(()=>c.value&&[s.selectedClass.value,e.selectedClass]);return W(c,g=>{a.emit("group:selected",{value:g})},{flush:"sync"}),{id:i,isSelected:c,isFirst:m,isLast:v,toggle:()=>s.select(i,!c.value),select:g=>s.select(i,g),selectedClass:d,value:o,disabled:l,group:s,register:r,unregister:u}}function Vs(e,t){let n=!1;const a=vt([]),i=Pe(e,"modelValue",[],v=>v===void 0?[]:La(a,v===null?[null]:pn(v)),v=>{const d=Ts(a,v);return e.multiple?d:d[0]}),s=Ee("useGroup");function o(v,d){const g=v,f=Symbol.for(`${t.description}:id`),b=ki(f,s==null?void 0:s.vnode).indexOf(d);Yi(g.value)===void 0&&(g.value=b,g.useIndexAsValue=!0),b>-1?a.splice(b,0,g):a.push(g)}function l(v){if(n)return;r();const d=a.findIndex(g=>g.id===v);a.splice(d,1)}function r(){const v=a.find(d=>!d.disabled);v&&e.mandatory==="force"&&!i.value.length&&(i.value=[v.id])}it(()=>{r()}),je(()=>{n=!0}),Xi(()=>{for(let v=0;vf.id===v);if(!(d&&(g!=null&&g.disabled)))if(e.multiple){const f=i.value.slice(),p=f.findIndex(x=>x===v),b=~p;if(d=d??!b,b&&e.mandatory&&f.length<=1||!b&&e.max!=null&&f.length+1>e.max)return;p<0&&d?f.push(v):p>=0&&!d&&f.splice(p,1),i.value=f}else{const f=i.value.includes(v);if(e.mandatory&&f||!f&&!d)return;i.value=d??!f?[v]:[]}}function c(v){if(e.multiple,i.value.length){const d=i.value[0],g=a.findIndex(b=>b.id===d);let f=(g+v)%a.length,p=a[f];for(;p.disabled&&f!==g;)f=(f+v)%a.length,p=a[f];if(p.disabled)return;i.value=[a[f].id]}else{const d=a.find(g=>!g.disabled);d&&(i.value=[d.id])}}const m={register:o,unregister:l,selected:i,select:u,disabled:k(()=>e.disabled),prev:()=>c(a.length-1),next:()=>c(1),isSelected:v=>i.value.includes(v),selectedClass:k(()=>e.selectedClass),items:k(()=>a),getItemIndex:v=>Ls(a,v)};return He(t,m),m}function Ls(e,t){const n=La(e,[t]);return n.length?e.findIndex(a=>a.id===n[0]):-1}function La(e,t){const n=[];return t.forEach(a=>{const i=e.find(o=>Je(a,o.value)),s=e[a];(i==null?void 0:i.value)!==void 0?n.push(i.id):s!=null&&s.useIndexAsValue&&n.push(s.id)}),n}function Ts(e,t){const n=[];return t.forEach(a=>{const i=e.findIndex(s=>s.id===a);if(~i){const s=e[i];n.push(s.value!==void 0?s.value:i)}}),n}const Ta=Symbol.for("vuetify:v-btn-toggle"),Os=T({...Va(),...Is()},"VBtnToggle"),Wl=G()({name:"VBtnToggle",props:Os(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:a,next:i,prev:s,select:o,selected:l}=Vs(e,Ta);return Z(()=>{const r=ta.filterProps(e);return S(ta,Q({class:["v-btn-toggle",e.class]},r,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:a,next:i,prev:s,select:o,selected:l})]}})}),{next:i,prev:s,select:o}}}),Bs=T({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),ge=G(!1)({name:"VDefaultsProvider",props:Bs(),setup(e,t){let{slots:n}=t;const{defaults:a,disabled:i,reset:s,root:o,scoped:l}=Ji(e);return Ft(a,{reset:s,root:o,scoped:l,disabled:i}),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),Rs=["x-small","small","default","large","x-large"],Wt=T({size:{type:[String,Number],default:"default"}},"size");function qt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return bn(()=>{const n=e.size;let a,i;return Ci(Rs,n)?a=`${t}--size-${n}`:n&&(i={width:B(n),height:B(n)}),{sizeClasses:a,sizeStyles:i}})}const Ns=T({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:oe,opacity:[String,Number],...ee(),...Wt(),...le({tag:"i"}),...fe()},"VIcon"),xe=G()({name:"VIcon",props:Ns(),setup(e,t){let{attrs:n,slots:a}=t;const i=z(),{themeClasses:s}=Sa(),{iconData:o}=_i(()=>i.value||e.icon),{sizeClasses:l}=qt(e),{textColorClasses:r,textColorStyles:u}=tt(()=>e.color);return Z(()=>{var v,d;const c=(v=a.default)==null?void 0:v.call(a);c&&(i.value=(d=xi(c).filter(g=>g.type===Qi&&g.children&&typeof g.children=="string")[0])==null?void 0:d.children);const m=!!(n.onClick||n.onClickOnce);return S(o.value.component,{tag:e.tag,icon:o.value.icon,class:j(["v-icon","notranslate",s.value,l.value,r.value,{"v-icon--clickable":m,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:X([{"--v-icon-opacity":e.opacity},l.value?void 0:{fontSize:B(e.size),height:B(e.size),width:B(e.size)},u.value,e.style]),role:m?"button":void 0,"aria-hidden":!m,tabindex:m?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function Oa(e,t){const n=M(),a=z(!1);if(Sn){const i=new IntersectionObserver(s=>{a.value=!!s.find(o=>o.isIntersecting)},t);ve(()=>{i.disconnect()}),W(n,(s,o)=>{o&&(i.unobserve(o),a.value=!1),s&&i.observe(s)},{flush:"post"})}return{intersectionRef:n,isIntersecting:a}}const $s=T({reveal:{type:[Boolean,Object],default:!1}},"reveal");function Ds(e){const n=k(()=>typeof e.reveal=="object"?Math.max(0,Number(e.reveal.duration??900)):900),a=z(e.reveal?"initial":"disabled");return it(async()=>{e.reveal&&(a.value="initial",await new Promise(i=>requestAnimationFrame(i)),a.value="pending",await new Promise(i=>setTimeout(i,n.value)),a.value="done")}),{duration:n,state:a}}const Ms=T({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...ee(),...$s(),...Wt(),...le({tag:"div"}),...fe()},"VProgressCircular"),Fs=G()({name:"VProgressCircular",props:Ms(),setup(e,t){let{slots:n}=t;const a=20,i=2*Math.PI*a,s=M(),{themeClasses:o}=ye(e),{sizeClasses:l,sizeStyles:r}=qt(e),{textColorClasses:u,textColorStyles:c}=tt(()=>e.color),{textColorClasses:m,textColorStyles:v}=tt(()=>e.bgColor),{intersectionRef:d,isIntersecting:g}=Oa(),{resizeRef:f,contentRect:p}=wa(),{state:b,duration:x}=Ds(e),L=k(()=>b.value==="initial"?0:et(parseFloat(e.modelValue),0,100)),w=k(()=>Number(e.width)),h=k(()=>r.value?Number(e.size):p.value?p.value.width:Math.max(w.value,32)),_=k(()=>a/(1-w.value/h.value)*2),E=k(()=>w.value/h.value*_.value),y=k(()=>{const F=(100-L.value)/100*i;return e.rounded&&L.value>0&&L.value<100?B(Math.min(i-.01,F+E.value)):B(F)}),R=C(()=>{const F=Number(e.rotate);return e.rounded?F+E.value/2/i*360:F});return Ne(()=>{d.value=s.value,f.value=s.value}),Z(()=>S(e.tag,{ref:s,class:j(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||Tt()),"v-progress-circular--revealing":["initial","pending"].includes(b.value)},o.value,l.value,u.value,e.class]),style:X([r.value,c.value,{"--progress-reveal-duration":`${x.value}ms`},e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:L.value},{default:()=>[I("svg",{style:{transform:`rotate(calc(-90deg + ${R.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${_.value} ${_.value}`},[I("circle",{class:j(["v-progress-circular__underlay",m.value]),style:X(v.value),fill:"transparent",cx:"50%",cy:"50%",r:a,"stroke-width":E.value,"stroke-dasharray":i,"stroke-dashoffset":0},null),I("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:a,"stroke-width":E.value,"stroke-dasharray":i,"stroke-dashoffset":y.value,"stroke-linecap":e.rounded?"round":void 0},null)]),n.default&&I("div",{class:"v-progress-circular__content"},[n.default({value:L.value})])]})),{}}}),rt=T({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function ut(e){return{dimensionStyles:C(()=>{const n={},a=B(e.height),i=B(e.maxHeight),s=B(e.maxWidth),o=B(e.minHeight),l=B(e.minWidth),r=B(e.width);return a!=null&&(n.height=a),i!=null&&(n.maxHeight=i),s!=null&&(n.maxWidth=s),o!=null&&(n.minHeight=o),l!=null&&(n.minWidth=l),r!=null&&(n.width=r),n})}}const na={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Ht=T({location:String},"location");function Ln(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:a}=zt();return{locationStyles:C(()=>{if(!e.location)return{};const{side:s,align:o}=an(e.location.split(" ").length>1?e.location:`${e.location} center`,a.value);function l(u){return n?n(u):0}const r={};return s!=="center"&&(t?r[na[s]]=`calc(100% - ${l(s)}px)`:r[s]=0),o!=="center"?t?r[na[o]]=`calc(100% - ${l(o)}px)`:r[o]=0:(s==="center"?r.top=r.left="50%":r[{top:"left",bottom:"left",left:"top",right:"top"}[s]]="50%",r.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[s]),r})}}const zs=T({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function Ws(e,t){const n=k(()=>!!e.chunkCount||!!e.chunkWidth),a=C(()=>{const l=se(t);if(!l)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const r=Number(e.chunkCount);return(l-Number(e.chunkGap)*(r-1))/r}),i=k(()=>Number(e.chunkGap)),s=C(()=>{if(!n.value)return{};const l=B(i.value),r=B(a.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${r}, transparent ${r}, transparent)`,maskSize:`calc(${r} + ${l}) 100%`}});function o(l){const r=se(t);if(!r)return l;const u=100*i.value/r,c=100*(a.value+i.value)/r,m=Math.floor((l+u)/c+1e-9);return et(m*c-u/2,0,100)}return{hasChunks:n,chunksMaskStyles:s,snapValueToChunk:o}}const qs=T({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...zs(),...ee(),...Ht({location:"top"}),...Oe(),...le(),...fe()},"VProgressLinear"),Ba=G()({name:"VProgressLinear",props:qs(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const a=M(),i=Pe(e,"modelValue"),{isRtl:s,rtlClasses:o}=zt(),{themeClasses:l}=ye(e),{locationStyles:r}=Ln(e),{textColorClasses:u,textColorStyles:c}=tt(()=>e.color),{backgroundColorClasses:m,backgroundColorStyles:v}=Qe(()=>e.bgColor||e.color),{backgroundColorClasses:d,backgroundColorStyles:g}=Qe(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:f,backgroundColorStyles:p}=Qe(()=>e.color),{roundedClasses:b}=Be(e),{intersectionRef:x,isIntersecting:L}=Oa(),w=C(()=>parseFloat(e.max)),h=C(()=>parseFloat(e.height)),_=C(()=>et(parseFloat(e.bufferValue)/w.value*100,0,100)),E=C(()=>et(parseFloat(i.value)/w.value*100,0,100)),y=C(()=>s.value!==e.reverse),R=C(()=>e.indeterminate?"fade-transition":"slide-x-transition"),F=z(0),{hasChunks:A,chunksMaskStyles:V,snapValueToChunk:P}=Ws(e,F);ht(A,()=>{const{resizeRef:Y}=wa(te=>F.value=te[0].contentRect.width);Ne(()=>Y.value=a.value)});const N=C(()=>A.value?P(_.value):_.value),O=C(()=>A.value?P(E.value):E.value);function U(Y){if(!x.value)return;const{left:te,right:he,width:K}=x.value.getBoundingClientRect(),$=y.value?K-Y.clientX+(he-K):Y.clientX-te;i.value=Math.round($/K*w.value)}return Ne(()=>{x.value=a.value}),Z(()=>S(e.tag,{ref:a,class:j(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&L.value,"v-progress-linear--reverse":y.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},b.value,l.value,o.value,e.class]),style:X([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?B(h.value):0,"--v-progress-linear-height":B(h.value),...e.absolute?r.value:{}},V.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(i.value),w.value),onClick:e.clickable&&U},{default:()=>[e.stream&&I("div",{key:"stream",class:j(["v-progress-linear__stream",u.value]),style:{...c.value,[y.value?"left":"right"]:B(-h.value),borderTop:`${B(h.value/2)} dotted`,opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,top:`calc(50% - ${B(h.value/4)})`,width:B(100-_.value,"%"),"--v-progress-linear-stream-to":B(h.value*(y.value?1:-1))}},null),I("div",{class:j(["v-progress-linear__background",m.value]),style:X([v.value,{opacity:e.bgOpacity!=null?parseFloat(e.bgOpacity):void 0,width:e.stream?0:void 0}])},null),I("div",{class:j(["v-progress-linear__buffer",d.value]),style:X([g.value,{opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,width:B(N.value,"%")}])},null),S($e,{name:R.value},{default:()=>[e.indeterminate?I("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(Y=>I("div",{key:Y,class:j(["v-progress-linear__indeterminate",Y,f.value]),style:X(p.value)},null))]):I("div",{class:j(["v-progress-linear__determinate",f.value]),style:X([p.value,{width:B(O.value,"%")}])},null)]}),n.default&&I("div",{class:"v-progress-linear__content"},[n.default({value:E.value,buffer:_.value})])]})),{}}}),Ra=T({loading:[Boolean,String]},"loader");function Na(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{loaderClasses:k(()=>({[`${t}--loading`]:e.loading}))}}function Hs(e,t){var a;let{slots:n}=t;return I("div",{class:j(`${e.name}__loader`)},[((a=n.default)==null?void 0:a.call(n,{color:e.color,isActive:e.active}))||S(Ba,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const js=["static","relative","fixed","absolute","sticky"],Tn=T({position:{type:String,validator:e=>js.includes(e)}},"position");function On(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qe();return{positionClasses:k(()=>e.position?`${t}--${e.position}`:void 0)}}function Gs(){const e=Ee("useRoute");return C(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function Us(){var e,t;return(t=(e=Ee("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Bn(e,t){const n=xa("RouterLink"),a=k(()=>!!(e.href||e.to)),i=C(()=>(a==null?void 0:a.value)||Gn(t,"click")||Gn(e,"click"));if(typeof n=="string"||!("useLink"in n)){const m=k(()=>e.href);return{isLink:a,isRouterLink:k(()=>!1),isClickable:i,href:m,linkProps:vt({href:m}),route:k(()=>{}),navigate:k(()=>{})}}const s=n.useLink({to:k(()=>e.to||""),replace:k(()=>e.replace)}),o=C(()=>e.to?s:void 0),l=Gs(),r=C(()=>{var m,v,d;return o.value?e.exact?l.value?((d=o.value.isExactActive)==null?void 0:d.value)&&Je(o.value.route.value.query,l.value.query):((v=o.value.isExactActive)==null?void 0:v.value)??!1:((m=o.value.isActive)==null?void 0:m.value)??!1:!1}),u=C(()=>{var m;return e.to?(m=o.value)==null?void 0:m.route.value.href:e.href}),c=k(()=>!!e.to);return{isLink:a,isRouterLink:c,isClickable:i,isActive:r,route:k(()=>{var m;return(m=o.value)==null?void 0:m.route.value}),navigate:k(()=>{var m;return(m=o.value)==null?void 0:m.navigate}),href:u,linkProps:vt({href:u,"aria-current":k(()=>r.value?"page":void 0),"aria-disabled":k(()=>e.disabled&&a.value?"true":void 0),tabindex:k(()=>e.disabled&&a.value?"-1":void 0)})}}const Rn=T({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Jt=!1;function Ks(e,t){let n=!1,a,i;Ae&&(e!=null&&e.beforeEach)&&(de(()=>{window.addEventListener("popstate",s),a=e.beforeEach(()=>Jt?n?t():void 0:(Jt=!0,new Promise(o=>{setTimeout(()=>o(n?t():void 0))}))),i=e==null?void 0:e.afterEach(()=>{Jt=!1})}),ve(()=>{window.removeEventListener("popstate",s),a==null||a(),i==null||i()}));function s(o){var l;(l=o.state)!=null&&l.replaced||(n=!0,setTimeout(()=>n=!1))}}function Xs(e,t){W(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n!=null&&t&&de(()=>{t(n)})},{immediate:!0})}const un=Symbol("rippleStop"),Ys=80;function aa(e,t){e.style.transform=t,e.style.webkitTransform=t}function cn(e){return e.constructor.name==="TouchEvent"}function $a(e){return e.constructor.name==="KeyboardEvent"}const Js=function(e,t){var m;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=0,i=0;if(!$a(e)){const v=new Et(t),d=cn(e)?e.touches[e.touches.length-1]:e,g=wn([d.clientX,d.clientY]);a=g.x-v.left,i=g.y-v.top}let s=0,o=.3;(m=t._ripple)!=null&&m.circle?(o=.15,s=t.clientWidth/2,s=n.center?s:s+Math.sqrt((a-s)**2+(i-s)**2)/4):s=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const l=`${(t.clientWidth-s*2)/2}px`,r=`${(t.clientHeight-s*2)/2}px`,u=n.center?l:`${a-s}px`,c=n.center?r:`${i-s}px`;return{radius:s,scale:o,x:u,y:c,centerX:l,centerY:r}},Rt={show(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((d=t==null?void 0:t._ripple)!=null&&d.enabled))return;const a=document.createElement("span"),i=document.createElement("span");a.appendChild(i),a.className="v-ripple__container",n.class&&(a.className+=` ${n.class}`);const{radius:s,scale:o,x:l,y:r,centerX:u,centerY:c}=Js(e,t,n),m=`${s*2}px`;i.className="v-ripple__animation",i.style.width=m,i.style.height=m,t.appendChild(a);const v=window.getComputedStyle(t);v&&v.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),i.classList.add("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--visible"),aa(i,`translate(${l}, ${r}) scale3d(${o},${o},${o})`),i.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.classList.remove("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--in"),aa(i,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var s;if(!((s=e==null?void 0:e._ripple)!=null&&s.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(o=>!o.dataset.isHiding);if(n)n.dataset.isHiding="true";else return;const a=performance.now()-Number(n.dataset.activated),i=Math.max(250-a,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var l;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((l=n.parentNode)==null?void 0:l.parentNode)===e&&e.removeChild(n.parentNode)},300)},i)}};function Da(e){return typeof e>"u"||!!e}function mt(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[un])){if(e[un]=!0,cn(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||$a(e),n._ripple.class&&(t.class=n._ripple.class),cn(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Rt.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var a;(a=n==null?void 0:n._ripple)!=null&&a.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},Ys)}else Rt.show(e,n,t)}}function Nt(e){e[un]=!0}function ce(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{ce(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Rt.hide(t)}}function Ma(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let gt=!1;function Qs(e,t){!gt&&t.includes(e.key)&&(gt=!0,mt(e))}function Fa(e){gt=!1,ce(e)}function za(e){gt&&(gt=!1,ce(e))}function Wa(e,t,n){const{value:a,modifiers:i}=t,s=Da(a);s||Rt.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=s,e._ripple.centered=i.center,e._ripple.circle=i.circle;const o=sn(a)?a:{};o.class&&(e._ripple.class=o.class);const l=o.keys??["Enter","Space"];if(e._ripple.keyDownHandler=r=>Qs(r,l),s&&!n){if(i.stop){e.addEventListener("touchstart",Nt,{passive:!0}),e.addEventListener("mousedown",Nt);return}e.addEventListener("touchstart",mt,{passive:!0}),e.addEventListener("touchend",ce,{passive:!0}),e.addEventListener("touchmove",Ma,{passive:!0}),e.addEventListener("touchcancel",ce),e.addEventListener("mousedown",mt),e.addEventListener("mouseup",ce),e.addEventListener("mouseleave",ce),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",Fa),e.addEventListener("blur",za),e.addEventListener("dragstart",ce,{passive:!0})}else!s&&n&&qa(e)}function qa(e){var t;e.removeEventListener("touchstart",Nt),e.removeEventListener("mousedown",Nt),e.removeEventListener("touchstart",mt),e.removeEventListener("touchend",ce),e.removeEventListener("touchmove",Ma),e.removeEventListener("touchcancel",ce),e.removeEventListener("mousedown",mt),e.removeEventListener("mouseup",ce),e.removeEventListener("mouseleave",ce),(t=e._ripple)!=null&&t.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",Fa),e.removeEventListener("blur",za),e.removeEventListener("dragstart",ce)}function Zs(e,t){Wa(e,t,!1)}function eo(e){qa(e),delete e._ripple}function to(e,t){if(t.value===t.oldValue)return;const n=Da(t.oldValue);Wa(e,t,n)}const yt={mounted:Zs,unmounted:eo,updated:to},no=T({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:Ta},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:oe,appendIcon:oe,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...st(),...ee(),...Ge(),...rt(),...bt(),...Ps(),...Ra(),...Ht(),...Tn(),...Oe(),...Rn(),...Wt(),...le({tag:"button"}),...fe(),...Ue({variant:"elevated"})},"VBtn"),Ha=G()({name:"VBtn",props:no(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{borderClasses:s}=ot(e),{densityClasses:o}=lt(e),{dimensionStyles:l}=ut(e),{elevationClasses:r}=pt(e),{loaderClasses:u}=Na(e),{locationStyles:c}=Ln(e),{positionClasses:m}=On(e),{roundedClasses:v}=Be(e),{sizeClasses:d,sizeStyles:g}=qt(e),f=As(e,e.symbol,!1),p=Bn(e,n),b=C(()=>{var A;return e.active!==void 0?e.active:p.isRouterLink.value?(A=p.isActive)==null?void 0:A.value:f==null?void 0:f.isSelected.value}),x=k(()=>b.value?e.activeColor??e.color:e.color),L=C(()=>{var V,P;return{color:(f==null?void 0:f.isSelected.value)&&(!p.isLink.value||((V=p.isActive)==null?void 0:V.value))||!f||((P=p.isActive)==null?void 0:P.value)?x.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:w,colorStyles:h,variantClasses:_}=wt(L),E=C(()=>(f==null?void 0:f.disabled.value)||e.disabled),y=k(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),R=C(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function F(A){var V,P;E.value||p.isLink.value&&(A.metaKey||A.ctrlKey||A.shiftKey||A.button!==0||n.target==="_blank")||(p.isRouterLink.value?(P=(V=p.navigate).value)==null||P.call(V,A):f==null||f.toggle())}return Xs(p,f==null?void 0:f.select),Z(()=>{const A=p.isLink.value?"a":e.tag,V=!!(e.prependIcon||a.prepend),P=!!(e.appendIcon||a.append),N=!!(e.icon&&e.icon!==!0);return We(S(A,Q(p.linkProps,{type:A==="a"?void 0:"button",class:["v-btn",f==null?void 0:f.selectedClass.value,{"v-btn--active":b.value,"v-btn--block":e.block,"v-btn--disabled":E.value,"v-btn--elevated":y.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],i.value,s.value,w.value,o.value,r.value,u.value,m.value,v.value,d.value,_.value,e.class],style:[h.value,l.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:E.value&&A!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:F,value:R.value}),{default:()=>{var O;return[St(!0,"v-btn"),!e.icon&&V&&I("span",{key:"prepend",class:"v-btn__prepend"},[a.prepend?S(ge,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},a.prepend):S(xe,{key:"prepend-icon",icon:e.prependIcon},null)]),I("span",{class:"v-btn__content","data-no-activator":""},[!a.default&&N?S(xe,{key:"content-icon",icon:e.icon},null):S(ge,{key:"content-defaults",disabled:!N,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var U;return[((U=a.default)==null?void 0:U.call(a))??_e(e.text)]}})]),!e.icon&&P&&I("span",{key:"append",class:"v-btn__append"},[a.append?S(ge,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},a.append):S(xe,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&I("span",{key:"loader",class:"v-btn__loader"},[((O=a.loader)==null?void 0:O.call(a))??S(Fs,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[yt,!E.value&&e.ripple,"",{center:!!e.icon}]])}),{group:f}}});function Qt(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ao(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ia(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:a}=e,i=a==="left"?0:a==="center"?t.width/2:a==="right"?t.width:a,s=n==="top"?0:n==="bottom"?t.height:n;return Qt({x:i,y:s},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:a}=e,i=n==="left"?0:n==="right"?t.width:n,s=a==="top"?0:a==="center"?t.height/2:a==="bottom"?t.height:a;return Qt({x:i,y:s},t)}return Qt({x:t.width/2,y:t.height/2},t)}const ja={static:oo,connected:ro},io=T({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in ja},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array],stickToTarget:Boolean,viewportMargin:{type:[Number,String],default:12}},"VOverlay-location-strategies");function so(e,t){const n=M({}),a=M();Ae&&ht(()=>!!(t.isActive.value&&e.locationStrategy),l=>{var r,u;W(()=>e.locationStrategy,l),ve(()=>{window.removeEventListener("resize",i),visualViewport==null||visualViewport.removeEventListener("resize",s),visualViewport==null||visualViewport.removeEventListener("scroll",o),a.value=void 0}),window.addEventListener("resize",i,{passive:!0}),visualViewport==null||visualViewport.addEventListener("resize",s,{passive:!0}),visualViewport==null||visualViewport.addEventListener("scroll",o,{passive:!0}),typeof e.locationStrategy=="function"?a.value=(r=e.locationStrategy(t,e,n))==null?void 0:r.updateLocation:a.value=(u=ja[e.locationStrategy](t,e,n))==null?void 0:u.updateLocation});function i(l){var r;(r=a.value)==null||r.call(a,l)}function s(l){var r;(r=a.value)==null||r.call(a,l)}function o(l){var r;(r=a.value)==null||r.call(a,l)}return{contentStyles:n,updateLocation:a}}function oo(){}function lo(e,t){const n=ka(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function ro(e,t,n){(Array.isArray(e.target.value)||Ei(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:i,preferredOrigin:s}=bn(()=>{const b=an(t.location,e.isRtl.value),x=t.origin==="overlap"?b:t.origin==="auto"?Xt(b):an(t.origin,e.isRtl.value);return b.side===x.side&&b.align===Kt(x).align?{preferredAnchor:Xn(b),preferredOrigin:Xn(x)}:{preferredAnchor:b,preferredOrigin:x}}),[o,l,r,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(b=>C(()=>{const x=parseFloat(t[b]);return isNaN(x)?1/0:x})),c=C(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const b=t.offset.split(" ").map(parseFloat);return b.length<2&&b.push(0),b}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let m=!1,v=-1;const d=new Ii(4),g=new ResizeObserver(()=>{if(!m)return;if(requestAnimationFrame(x=>{x!==v&&d.clear(),requestAnimationFrame(L=>{v=L})}),d.isFull){const x=d.values();if(Je(x.at(-1),x.at(-3))&&!Je(x.at(-1),x.at(-2)))return}const b=p();b&&d.push(b.flipped)});let f=new Et({x:0,y:0,width:0,height:0});W(e.target,(b,x)=>{x&&!Array.isArray(x)&&g.unobserve(x),Array.isArray(b)?Je(b,x)||p():b&&g.observe(b)},{immediate:!0}),W(e.contentEl,(b,x)=>{x&&g.unobserve(x),b&&g.observe(b)},{immediate:!0}),ve(()=>{g.disconnect()});function p(){if(m=!1,requestAnimationFrame(()=>m=!0),!e.target.value||!e.contentEl.value)return;(Array.isArray(e.target.value)||e.target.value.offsetParent||e.target.value.getClientRects().length)&&(f=wn(e.target.value));const b=lo(e.contentEl.value,e.isRtl.value),x=Ot(e.contentEl.value),L=Number(t.viewportMargin);x.length||(x.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(b.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),b.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const w=x.reduce((P,N)=>{const O=Pi(N);return P?new Et({x:Math.max(P.left,O.left),y:Math.max(P.top,O.top),width:Math.min(P.right,O.right)-Math.max(P.left,O.left),height:Math.min(P.bottom,O.bottom)-Math.max(P.top,O.top)}):O},void 0);t.stickToTarget?(w.x+=Math.min(L,f.x),w.y+=Math.min(L,f.y),w.width=Math.max(w.width-L*2,f.x+f.width-L),w.height=Math.max(w.height-L*2,f.y+f.height-L)):(w.x+=L,w.y+=L,w.width-=L*2,w.height-=L*2);let h={anchor:i.value,origin:s.value};function _(P){const N=new Et(b),O=ia(P.anchor,f),U=ia(P.origin,N);let{x:Y,y:te}=ao(O,U);switch(P.anchor.side){case"top":te-=c.value[0];break;case"bottom":te+=c.value[0];break;case"left":Y-=c.value[0];break;case"right":Y+=c.value[0];break}switch(P.anchor.align){case"top":te-=c.value[1];break;case"bottom":te+=c.value[1];break;case"left":Y-=c.value[1];break;case"right":Y+=c.value[1];break}return N.x+=Y,N.y+=te,N.width=Math.min(N.width,r.value),N.height=Math.min(N.height,u.value),{overflows:Kn(N,w),x:Y,y:te}}let E=0,y=0;const R={x:0,y:0},F={x:!1,y:!1};let A=-1;for(;!(A++>10);){const{x:P,y:N,overflows:O}=_(h);E+=P,y+=N,b.x+=P,b.y+=N;{const U=Un(h.anchor),Y=O.x.before||O.x.after,te=O.y.before||O.y.after;let he=!1;if(["x","y"].forEach(K=>{if(K==="x"&&Y&&!F.x||K==="y"&&te&&!F.y){const $={anchor:{...h.anchor},origin:{...h.origin}},J=K==="x"?U==="y"?Kt:Xt:U==="y"?Xt:Kt;$.anchor=J($.anchor),$.origin=J($.origin);const{overflows:q}=_($);(q[K].before<=O[K].before&&q[K].after<=O[K].after||q[K].before+q[K].after<(O[K].before+O[K].after)/2)&&(h=$,he=F[K]=!0)}}),he)continue}O.x.before&&(E+=O.x.before,b.x+=O.x.before),O.x.after&&(E-=O.x.after,b.x-=O.x.after),O.y.before&&(y+=O.y.before,b.y+=O.y.before),O.y.after&&(y-=O.y.after,b.y-=O.y.after);{const U=Kn(b,w);R.x=w.width-U.x.before-U.x.after,R.y=w.height-U.y.before-U.y.after,E+=U.x.before,b.x+=U.x.before,y+=U.y.before,b.y+=U.y.before}break}const V=Un(h.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${h.anchor.side} ${h.anchor.align}`,transformOrigin:`${h.origin.side} ${h.origin.align}`,top:B(Zt(y)),left:e.isRtl.value?void 0:B(Zt(E)),right:e.isRtl.value?B(Zt(-E)):void 0,minWidth:B(V==="y"?Math.min(o.value,f.width):o.value),maxWidth:B(sa(et(R.x,o.value===1/0?0:o.value,r.value))),maxHeight:B(sa(et(R.y,l.value===1/0?0:l.value,u.value)))}),{available:R,contentBox:b,flipped:F}}return W(()=>[i.value,s.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>p()),de(()=>{const b=p();if(!b)return;const{available:x,contentBox:L}=b;L.height>x.y&&requestAnimationFrame(()=>{p(),requestAnimationFrame(()=>{p()})})}),{updateLocation:p}}function Zt(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function sa(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let dn=!0;const $t=[];function uo(e){!dn||$t.length?($t.push(e),fn()):(dn=!1,e(),fn())}let oa=-1;function fn(){cancelAnimationFrame(oa),oa=requestAnimationFrame(()=>{const e=$t.shift();e&&e(),$t.length?fn():dn=!0})}const Vt={none:null,close:vo,block:mo,reposition:go},co=T({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Vt}},"VOverlay-scroll-strategies");function fo(e,t){if(!Ae)return;let n;Ne(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=Ea(),await new Promise(a=>setTimeout(a)),n.active&&n.run(()=>{var a;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(a=Vt[e.scrollStrategy])==null||a.call(Vt,t,e,n)}))}),ve(()=>{n==null||n.stop()})}function vo(e){function t(n){e.isActive.value=!1}Ga(Nn(e.target.value,e.contentEl.value),t)}function mo(e,t){var l;const n=(l=e.root.value)==null?void 0:l.offsetParent,a=Nn(e.target.value,e.contentEl.value),i=[...new Set([...Ot(a,t.contained?n:void 0),...Ot(e.contentEl.value,t.contained?n:void 0)])].filter(r=>!r.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,o=(r=>Ai(r)&&r)(n||document.documentElement);o&&e.root.value.classList.add("v-overlay--scroll-blocked"),i.forEach((r,u)=>{r.style.setProperty("--v-body-scroll-x",B(-r.scrollLeft)),r.style.setProperty("--v-body-scroll-y",B(-r.scrollTop)),r!==document.documentElement&&r.style.setProperty("--v-scrollbar-offset",B(s)),r.classList.add("v-overlay-scroll-blocked")}),ve(()=>{i.forEach((r,u)=>{const c=parseFloat(r.style.getPropertyValue("--v-body-scroll-x")),m=parseFloat(r.style.getPropertyValue("--v-body-scroll-y")),v=r.style.scrollBehavior;r.style.scrollBehavior="auto",r.style.removeProperty("--v-body-scroll-x"),r.style.removeProperty("--v-body-scroll-y"),r.style.removeProperty("--v-scrollbar-offset"),r.classList.remove("v-overlay-scroll-blocked"),r.scrollLeft=-c,r.scrollTop=-m,r.style.scrollBehavior=v}),o&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function go(e,t,n){let a=!1,i=-1,s=-1;function o(l){uo(()=>{var c,m;const r=performance.now();(m=(c=e.updateLocation).value)==null||m.call(c,l),a=(performance.now()-r)/(1e3/60)>2})}s=(typeof requestIdleCallback>"u"?l=>l():requestIdleCallback)(()=>{n.run(()=>{Ga(Nn(e.target.value,e.contentEl.value),l=>{a?(cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{o(l)})})):o(l)})})}),ve(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(s),cancelAnimationFrame(i)})}function Nn(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!(t!=null&&t.contains(n))):e??t}function Ga(e,t){const n=[document,...Ot(e)];n.forEach(a=>{a.addEventListener("scroll",t,{passive:!0})}),ve(()=>{n.forEach(a=>{a.removeEventListener("scroll",t)})})}const yo=Symbol.for("vuetify:v-menu"),ho=T({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function bo(e,t){let n=()=>{};function a(o,l){n==null||n();const r=o?e.openDelay:e.closeDelay,u=Math.max((l==null?void 0:l.minDelay)??0,Number(r??0));return new Promise(c=>{n=Vi(u,()=>{t==null||t(o),c(o)})})}function i(){return a(!0)}function s(o){return a(!1,o)}return{clearDelay:n,runOpenDelay:i,runCloseDelay:s}}const po=T({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...ho()},"VOverlay-activator");function So(e,t){let{isActive:n,isTop:a,contentEl:i}=t;const s=Ee("useActivator"),o=M();let l=!1,r=!1,u=!0;const c=C(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),m=C(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:v,runCloseDelay:d}=bo(e,y=>{y===(e.openOnHover&&l||c.value&&r)&&!(e.openOnHover&&n.value&&!a.value)&&(n.value!==y&&(u=!0),n.value=y)}),g=M(),f={onClick:y=>{y.stopPropagation(),o.value=y.currentTarget||y.target,n.value||(g.value=[y.clientX,y.clientY]),n.value=!n.value},onMouseenter:y=>{l=!0,o.value=y.currentTarget||y.target,v()},onMouseleave:y=>{l=!1,d()},onFocus:y=>{Oi(y.target,":focus-visible")!==!1&&(r=!0,y.stopPropagation(),o.value=y.currentTarget||y.target,v())},onBlur:y=>{r=!1,y.stopPropagation(),d({minDelay:1})}},p=C(()=>{const y={};return m.value&&(y.onClick=f.onClick),e.openOnHover&&(y.onMouseenter=f.onMouseenter,y.onMouseleave=f.onMouseleave),c.value&&(y.onFocus=f.onFocus,y.onBlur=f.onBlur),y}),b=C(()=>{const y={};if(e.openOnHover&&(y.onMouseenter=()=>{l=!0,v()},y.onMouseleave=()=>{l=!1,d()}),c.value&&(y.onFocusin=R=>{R.target.matches(":focus-visible")&&(r=!0,v())},y.onFocusout=()=>{r=!1,d({minDelay:1})}),e.closeOnContentClick){const R=Le(yo,null);y.onClick=()=>{n.value=!1,R==null||R.closeParents()}}return y}),x=C(()=>{const y={};return e.openOnHover&&(y.onMouseenter=()=>{u&&(l=!0,u=!1,v())},y.onMouseleave=()=>{l=!1,d()}),y});W(a,y=>{var R;y&&(e.openOnHover&&!l&&(!c.value||!r)||c.value&&!r&&(!e.openOnHover||!l))&&!((R=i.value)!=null&&R.contains(document.activeElement))&&d()}),W(n,y=>{y||setTimeout(()=>{g.value=void 0})},{flush:"post"});const L=Yn();Ne(()=>{L.value&&de(()=>{o.value=L.el})});const w=Yn(),h=C(()=>e.target==="cursor"&&g.value?g.value:w.value?w.el:Ua(e.target,s)||o.value),_=C(()=>Array.isArray(h.value)?void 0:h.value);let E;return W(()=>!!e.activator,y=>{y&&Ae?(E=Ea(),E.run(()=>{wo(e,s,{activatorEl:o,activatorEvents:p})})):E&&E.stop()},{flush:"post",immediate:!0}),ve(()=>{E==null||E.stop()}),{activatorEl:o,activatorRef:L,target:h,targetEl:_,targetRef:w,activatorEvents:p,contentEvents:b,scrimEvents:x}}function wo(e,t,n){let{activatorEl:a,activatorEvents:i}=n;W(()=>e.activator,(r,u)=>{if(u&&r!==u){const c=l(u);c&&o(c)}r&&de(()=>s())},{immediate:!0}),W(()=>e.activatorProps,()=>{s()}),ve(()=>{o()});function s(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;r&&Li(r,Q(i.value,u))}function o(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;r&&Ti(r,Q(i.value,u))}function l(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=Ua(r,t);return a.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,a.value}}function Ua(e,t){var a,i;if(!e)return;let n;if(e==="parent"){let s=(i=(a=t==null?void 0:t.proxy)==null?void 0:a.$el)==null?void 0:i.parentNode;for(;s!=null&&s.hasAttribute("data-no-activator");)s=s.parentNode;n=s}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const ko=T({retainFocus:Boolean,captureFocus:Boolean,disableInitialFocus:Boolean},"focusTrap"),Lt=new Map;let la=0;function ra(e){const t=document.activeElement;if(e.key!=="Tab"||!t)return;const n=Array.from(Lt.values()).filter(u=>{var v;let{isActive:c,contentEl:m}=u;return c.value&&((v=m.value)==null?void 0:v.contains(t))}).map(u=>u.contentEl.value);let a,i=t.parentElement;for(;i;){if(n.includes(i)){a=i;break}i=i.parentElement}if(!a)return;const s=It(a).filter(u=>u.tabIndex>=0);if(!s.length)return;const o=document.activeElement;if(s.length===1&&s[0].classList.contains("v-list")&&s[0].contains(o)){e.preventDefault();return}const l=s[0],r=s[s.length-1];e.shiftKey&&(o===l||l.classList.contains("v-list")&&l.contains(o))&&(e.preventDefault(),r.focus()),!e.shiftKey&&(o===r||r.classList.contains("v-list")&&r.contains(o))&&(e.preventDefault(),l.focus())}function Co(e,t){let{isActive:n,localTop:a,activatorEl:i,contentEl:s}=t;const o=Symbol("trap");let l=!1,r=-1;async function u(){l=!0,r=window.setTimeout(()=>{l=!1},100)}async function c(d){var p;const g=d.relatedTarget,f=d.target;document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",m),await new Promise(b=>requestAnimationFrame(b)),n.value&&!l&&g!==f&&s.value&&se(a)&&![document,s.value].includes(f)&&!s.value.contains(f)&&((p=It(s.value)[0])==null||p.focus())}function m(d){if(d.key==="Tab"&&(document.removeEventListener("keydown",m),n.value&&s.value&&d.target&&!s.value.contains(d.target))){const g=It(document.documentElement);if(d.shiftKey&&d.target===g.at(0)||!d.shiftKey&&d.target===g.at(-1)){const f=It(s.value);f.length>0&&(d.preventDefault(),f[0].focus())}}}const v=k(()=>n.value&&e.captureFocus&&!e.disableInitialFocus);Ae&&(W(()=>e.retainFocus,d=>{d?Lt.set(o,{isActive:n,contentEl:s}):Lt.delete(o)},{immediate:!0}),W(v,d=>{d?(document.addEventListener("pointerdown",u),document.addEventListener("focusin",c,{once:!0}),document.addEventListener("keydown",m)):(document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",m))},{immediate:!0}),la++<1&&document.addEventListener("keydown",ra)),ve(()=>{Lt.delete(o),clearTimeout(r),document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",m),--la<1&&document.removeEventListener("keydown",ra)})}function _o(){if(!Ae)return z(!1);const{ssr:e}=Bi();if(e){const t=z(!1);return it(()=>{t.value=!0}),t}else return z(!0)}const xo=T({eager:Boolean},"lazy");function Eo(e,t){const n=z(!1),a=k(()=>n.value||e.eager||t.value);W(t,()=>n.value=!0);function i(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:a,onAfterLeave:i}}function $n(){const t=Ee("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const ua=Symbol.for("vuetify:stack"),dt=vt([]);function Io(e,t,n){const a=Ee("useStack"),i=!n,s=Le(ua,void 0),o=vt({activeChildren:new Set});He(ua,o);const l=z(Number(se(t)));ht(e,()=>{var m;const c=(m=dt.at(-1))==null?void 0:m[1];l.value=c?c+10:Number(se(t)),i&&dt.push([a.uid,l.value]),s==null||s.activeChildren.add(a.uid),ve(()=>{if(i){const v=ne(dt).findIndex(d=>d[0]===a.uid);dt.splice(v,1)}s==null||s.activeChildren.delete(a.uid)})});const r=z(!0);i&&Ne(()=>{var m;const c=((m=dt.at(-1))==null?void 0:m[0])===a.uid;setTimeout(()=>r.value=c)});const u=k(()=>!o.activeChildren.size);return{globalTop:Ia(r),localTop:u,stackStyles:k(()=>({zIndex:l.value}))}}function Po(e){return{teleportTarget:C(()=>{const n=e();if(n===!0||!Ae)return;const a=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(a==null)return;let i=[...a.children].find(s=>s.matches(".v-overlay-container"));return i||(i=document.createElement("div"),i.className="v-overlay-container",a.appendChild(i)),i})}}const Ka=T({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),Ye=(e,t)=>{let{slots:n}=t;const{transition:a,disabled:i,group:s,...o}=e,{component:l=s?_n:$e,...r}=sn(a)?a:{};let u;return sn(a)?u=Q(r,Ri({disabled:i,group:s}),o):u=Q({name:i||!a?"":a},o),xn(l,u,n)};function Ao(){return!0}function Xa(e,t,n){if(!e||Ya(e,n)===!1)return!1;const a=Ca(t);if(typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&a.host===e.target)return!1;const i=(typeof n.value=="object"&&n.value.include||(()=>[]))();return i.push(t),!i.some(s=>s==null?void 0:s.contains(e.target))}function Ya(e,t){return(typeof t.value=="object"&&t.value.closeConditional||Ao)(e)}function Vo(e,t,n){const a=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&Xa(e,t,n)&&setTimeout(()=>{Ya(e,n)&&a&&a(e)},0)}function ca(e,t){const n=Ca(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const da={mounted(e,t){const n=i=>Vo(i,e,t),a=i=>{e._clickOutside.lastMousedownWasOutside=Xa(i,e,t)};ca(e,i=>{i.addEventListener("click",n,!0),i.addEventListener("mousedown",a,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:a}},beforeUnmount(e,t){e._clickOutside&&(ca(e,n=>{var s;if(!n||!((s=e._clickOutside)!=null&&s[t.instance.$.uid]))return;const{onClick:a,onMousedown:i}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",a,!0),n.removeEventListener("mousedown",i,!0)}),delete e._clickOutside[t.instance.$.uid])}};function Lo(e){const{modelValue:t,color:n,...a}=e;return S($e,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&I("div",Q({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},a),null)]})}const Dn=T({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...po(),...ee(),...rt(),...xo(),...io(),...co(),...ko(),...fe(),...Ka()},"VOverlay"),Dt=G()({name:"VOverlay",directives:{vClickOutside:da},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...at(Dn(),["disableInitialFocus"])},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:a,emit:i}=t;const s=Ee("VOverlay"),o=M(),l=M(),r=M(),u=Pe(e,"modelValue"),c=C({get:()=>u.value,set:H=>{H&&e.disabled||(u.value=H)}}),{themeClasses:m}=ye(e),{rtlClasses:v,isRtl:d}=zt(),{hasContent:g,onAfterLeave:f}=Eo(e,c),p=Qe(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:b,localTop:x,stackStyles:L}=Io(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:w,activatorRef:h,target:_,targetEl:E,targetRef:y,activatorEvents:R,contentEvents:F,scrimEvents:A}=So(e,{isActive:c,isTop:x,contentEl:r}),{teleportTarget:V}=Po(()=>{var Me,D,re;const H=e.attach||e.contained;if(H)return H;const ue=((Me=w==null?void 0:w.value)==null?void 0:Me.getRootNode())||((re=(D=s.proxy)==null?void 0:D.$el)==null?void 0:re.getRootNode());return ue instanceof ShadowRoot?ue:!1}),{dimensionStyles:P}=ut(e),N=_o(),{scopeId:O}=$n();W(()=>e.disabled,H=>{H&&(c.value=!1)});const{contentStyles:U,updateLocation:Y}=so(e,{isRtl:d,contentEl:r,target:_,isActive:c});fo(e,{root:o,contentEl:r,targetEl:E,target:_,isActive:c,updateLocation:Y});function te(H){i("click:outside",H),e.persistent?be():c.value=!1}function he(H){return c.value&&x.value&&(!e.scrim||H.target===l.value||H instanceof MouseEvent&&H.shadowTarget===l.value)}Co(e,{isActive:c,localTop:x,contentEl:r,activatorEl:w}),Ae&&W(c,H=>{H?window.addEventListener("keydown",K):window.removeEventListener("keydown",K)},{immediate:!0}),je(()=>{Ae&&window.removeEventListener("keydown",K)});function K(H){var ue,Me,D;H.key==="Escape"&&b.value&&((ue=r.value)!=null&&ue.contains(document.activeElement)||i("keydown",H),e.persistent?be():(c.value=!1,(Me=r.value)!=null&&Me.contains(document.activeElement)&&((D=w.value)==null||D.focus())))}function $(H){H.key==="Escape"&&!b.value||i("keydown",H)}const J=Us();ht(()=>e.closeOnBack,()=>{Ks(J,()=>{if(b.value&&c.value)return e.persistent?be():c.value=!1,!1})});const q=M();W(()=>c.value&&(e.absolute||e.contained)&&V.value==null,H=>{if(H){const ue=Ni(o.value);ue&&ue!==document.scrollingElement&&(q.value=ue.scrollTop)}});function be(){e.noClickAnimation||r.value&&Fe(r.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:on})}function Ke(){i("afterEnter")}function De(){f(),i("afterLeave")}return Z(()=>{var H;return I(Ve,null,[(H=n.activator)==null?void 0:H.call(n,{isActive:c.value,targetRef:y,props:Q({ref:h},R.value,e.activatorProps)}),N.value&&g.value&&S(Zi,{disabled:!V.value,to:V.value},{default:()=>[I("div",Q({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},m.value,v.value,e.class],style:[L.value,{"--v-overlay-opacity":e.opacity,top:B(q.value)},e.style],ref:o,onKeydown:$},O,a),[S(Lo,Q({color:p,modelValue:c.value&&!!e.scrim,ref:l},A.value),null),S(Ye,{appear:!0,persisted:!0,transition:e.transition,target:_.value,onAfterEnter:Ke,onAfterLeave:De},{default:()=>{var ue;return[We(I("div",Q({ref:r,class:["v-overlay__content",e.contentClass],style:[P.value,U.value]},F.value,e.contentProps),[(ue=n.default)==null?void 0:ue.call(n,{isActive:c})]),[[En,c.value],[da,{handler:te,closeConditional:he,include:()=>[w.value]}]])]}})])]})])}),{activatorEl:w,scrimEl:l,target:_,animateClick:be,contentEl:r,rootEl:o,globalTop:b,localTop:x,updateLocation:Y}}}),en=Symbol("Forwarded refs");function tn(e,t){let n=e;for(;n;){const a=Reflect.getOwnPropertyDescriptor(n,t);if(a)return a;n=Object.getPrototypeOf(n)}}function Ja(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;at.value=e())}function s(o){const l=o?getComputedStyle(o):{transitionDuration:.2},r=parseFloat(l.transitionDuration)*1e3||200;if(a(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+r;t.value=Math.max(e()-c,0),t.value<=0&&a()},r)}return ve(a),{clear:a,time:t,start:s,reset:i}}const Oo=T({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Ht({location:"bottom"}),...Tn(),...Oe(),...Ue(),...fe(),...at(Dn({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","retainFocus","captureFocus","disableInitialFocus","scrim","scrollStrategy","stickToTarget","viewportMargin"])},"VSnackbar"),Bo=G()({name:"VSnackbar",props:Oo(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const a=Pe(e,"modelValue"),{positionClasses:i}=On(e),{scopeId:s}=$n(),{themeClasses:o}=ye(e),{colorClasses:l,colorStyles:r,variantClasses:u}=wt(e),{roundedClasses:c}=Be(e),m=To(()=>Number(e.timeout)),v=M(),d=M(),g=z(!1),f=z(0),p=M(),b=Le(Mi,void 0);ht(()=>!!b,()=>{const A=$i();Ne(()=>{p.value=A.mainStyles.value})}),W(a,L),W(()=>e.timeout,L),it(()=>{a.value&&L()});let x=-1;function L(){m.reset(),window.clearTimeout(x);const A=Number(e.timeout);if(!a.value||A===-1)return;const V=Di(d.value);m.start(V),x=window.setTimeout(()=>{a.value=!1},A)}function w(){m.reset(),window.clearTimeout(x)}function h(){g.value=!0,w()}function _(){g.value=!1,L()}function E(A){f.value=A.touches[0].clientY}function y(A){Math.abs(f.value-A.changedTouches[0].clientY)>50&&(a.value=!1)}function R(){g.value&&_()}const F=C(()=>e.location.split(" ").reduce((A,V)=>(A[`v-snackbar--${V}`]=!0,A),{}));return Z(()=>{const A=Dt.filterProps(e),V=!!(n.default||n.text||e.text);return S(Dt,Q({ref:v,class:["v-snackbar",{"v-snackbar--active":a.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},F.value,i.value,e.class],style:[p.value,e.style]},A,{modelValue:a.value,"onUpdate:modelValue":P=>a.value=P,contentProps:Q({class:["v-snackbar__wrapper",o.value,l.value,c.value,u.value],style:[r.value],onPointerenter:h,onPointerleave:_},A.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:E,onTouchend:y,onAfterLeave:R},s),{default:()=>{var P,N;return[St(!1,"v-snackbar"),e.timer&&!g.value&&I("div",{key:"timer",class:"v-snackbar__timer"},[S(Ba,{ref:d,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:m.time.value},null)]),V&&I("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((P=n.text)==null?void 0:P.call(n))??e.text,(N=n.default)==null?void 0:N.call(n)]),n.actions&&S(ge,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[I("div",{class:"v-snackbar__actions"},[n.actions({isActive:a})])]})]},activator:n.activator})}),Ja({},v)}}),Ro=es({name:"GlobalMessage",setup(){var s;const e=M(!1),t=M(null),n={success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"},a={success:"success",error:"error",warning:"warning",info:"info"},i=(s=Xe==null?void 0:Xe.onSnackbar)==null?void 0:s.call(Xe,async o=>{o&&(e.value&&(e.value=!1,await de()),t.value=o,e.value=!0)});return je(()=>i==null?void 0:i()),{snackbar:e,message:t,icons:n,colors:a}}}),No={class:"d-flex align-center"},$o={class:"text-subtitle-2 font-weight-medium"},Do={key:0,class:"text-body-2"};function Mo(e,t,n,a,i,s){var o;return Ce(),ze(Bo,{modelValue:e.snackbar,"onUpdate:modelValue":t[1]||(t[1]=l=>e.snackbar=l),color:e.colors[(o=e.message)==null?void 0:o.type]||e.colors.info,timeout:2e3,location:"top right","multi-line":"",variant:"tonal"},{actions:ie(()=>[S(Ha,{icon:"mdi-close",variant:"text",onClick:t[0]||(t[0]=l=>e.snackbar=!1)})]),default:ie(()=>{var l,r,u,c;return[I("div",No,[S(xe,{icon:e.icons[(l=e.message)==null?void 0:l.type]||e.icons.info,class:"mr-2"},null,8,["icon"]),I("div",null,[I("div",$o,_e((r=e.message)==null?void 0:r.title),1),(u=e.message)!=null&&u.content?(Ce(),In("div",Do,_e((c=e.message)==null?void 0:c.content),1)):Bt("",!0)])])]}),_:1},8,["modelValue","color"])}const Qa=Aa(Ro,[["render",Mo]]),Fo=T({...ee(),...le()},"VCardActions"),Za=G()({name:"VCardActions",props:Fo(),setup(e,t){let{slots:n}=t;return Ft({VBtn:{slim:!0,variant:"text"}}),Z(()=>S(e.tag,{class:j(["v-card-actions",e.class]),style:X(e.style)},n)),{}}}),zo=T({opacity:[Number,String],...ee(),...le()},"VCardSubtitle"),Wo=G()({name:"VCardSubtitle",props:zo(),setup(e,t){let{slots:n}=t;return Z(()=>S(e.tag,{class:j(["v-card-subtitle",e.class]),style:X([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),ei=kn("v-card-title");function qo(e){return{aspectStyles:C(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const ti=T({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...ee(),...rt()},"VResponsive"),fa=G()({name:"VResponsive",props:ti(),setup(e,t){let{slots:n}=t;const{aspectStyles:a}=qo(e),{dimensionStyles:i}=ut(e);return Z(()=>{var s;return I("div",{class:j(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:X([i.value,e.style])},[I("div",{class:"v-responsive__sizer",style:X(a.value)},null),(s=n.additional)==null?void 0:s.call(n),n.default&&I("div",{class:j(["v-responsive__content",e.contentClass])},[n.default()])])}),{}}});function va(e,t){if(!Sn)return;const n=t.modifiers||{},a=t.value,{handler:i,options:s}=typeof a=="object"?a:{handler:a,options:{}},o=new IntersectionObserver(function(){var m;let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;const u=(m=e._observe)==null?void 0:m[t.instance.$.uid];if(!u)return;const c=l.some(v=>v.isIntersecting);i&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&i(c,l,r),c&&n.once?vn(e,t):u.init=!0},s);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function vn(e,t){var a;const n=(a=e._observe)==null?void 0:a[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const ma={mounted:va,unmounted:vn,updated:(e,t)=>{var n;(n=e._observe)!=null&&n[t.instance.$.uid]&&(vn(e,t),va(e,t))}},Ho=T({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,imageClass:null,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...ti(),...ee(),...Oe(),...Ka()},"VImg"),ni=G()({name:"VImg",directives:{vIntersect:ma},props:Ho(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:a}=t;const{backgroundColorClasses:i,backgroundColorStyles:s}=Qe(()=>e.color),{roundedClasses:o}=Be(e),l=Ee("VImg"),r=z(""),u=M(),c=z(e.eager?"loading":"idle"),m=z(),v=z(),d=C(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=C(()=>d.value.aspect||m.value/v.value||0);W(()=>e.src,()=>{f(c.value!=="idle")}),W(g,(V,P)=>{!V&&P&&u.value&&w(u.value)}),Pn(()=>f());function f(V){if(!(e.eager&&V)&&!(Sn&&!V&&!e.eager)){if(c.value="loading",d.value.lazySrc){const P=new Image;P.src=d.value.lazySrc,w(P,null)}d.value.src&&de(()=>{var P;n("loadstart",((P=u.value)==null?void 0:P.currentSrc)||d.value.src),setTimeout(()=>{var N;if(!l.isUnmounted)if((N=u.value)!=null&&N.complete){if(u.value.naturalWidth||b(),c.value==="error")return;g.value||w(u.value,null),c.value==="loading"&&p()}else g.value||w(u.value),x()})})}}function p(){var V;l.isUnmounted||(x(),w(u.value),c.value="loaded",n("load",((V=u.value)==null?void 0:V.currentSrc)||d.value.src))}function b(){var V;l.isUnmounted||(c.value="error",n("error",((V=u.value)==null?void 0:V.currentSrc)||d.value.src))}function x(){const V=u.value;V&&(r.value=V.currentSrc||V.src)}let L=-1;je(()=>{clearTimeout(L)});function w(V){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const N=()=>{if(clearTimeout(L),l.isUnmounted)return;const{naturalHeight:O,naturalWidth:U}=V;O||U?(m.value=U,v.value=O):!V.complete&&c.value==="loading"&&P!=null?L=window.setTimeout(N,P):(V.currentSrc.endsWith(".svg")||V.currentSrc.startsWith("data:image/svg+xml"))&&(m.value=1,v.value=1)};N()}const h=k(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),_=()=>{var N;if(!d.value.src||c.value==="idle")return null;const V=I("img",{class:j(["v-img__img",h.value,e.imageClass]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:d.value.src,srcset:d.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:p,onError:b},null),P=(N=a.sources)==null?void 0:N.call(a);return S(Ye,{transition:e.transition,appear:!0},{default:()=>[We(P?I("picture",{class:"v-img__picture"},[P,V]):V,[[En,c.value==="loaded"]])]})},E=()=>S(Ye,{transition:e.transition},{default:()=>[d.value.lazySrc&&c.value!=="loaded"&&I("img",{class:j(["v-img__img","v-img__img--preload",h.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:d.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),y=()=>a.placeholder?S(Ye,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!a.error)&&I("div",{class:"v-img__placeholder"},[a.placeholder()])]}):null,R=()=>a.error?S(Ye,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&I("div",{class:"v-img__error"},[a.error()])]}):null,F=()=>e.gradient?I("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,A=z(!1);{const V=W(g,P=>{P&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.value=!0})}),V())})}return Z(()=>{const V=fa.filterProps(e);return We(S(fa,Q({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!A.value,"v-img--fit-content":e.width==="fit-content"},i.value,o.value,e.class],style:[{width:B(e.width==="auto"?m.value:e.width)},s.value,e.style]},V,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>I(Ve,null,[S(_,null,null),S(E,null,null),S(F,null,null),S(y,null,null),S(R,null,null)]),default:a.default}),[[ma,{handler:f,options:e.options},null,{once:!0}]])}),{currentSrc:r,image:u,state:c,naturalWidth:m,naturalHeight:v}}}),jo=T({start:Boolean,end:Boolean,icon:oe,image:String,text:String,...st(),...ee(),...Ge(),...Oe(),...Wt(),...le(),...fe(),...Ue({variant:"flat"})},"VAvatar"),Mt=G()({name:"VAvatar",props:jo(),setup(e,t){let{slots:n}=t;const{themeClasses:a}=ye(e),{borderClasses:i}=ot(e),{colorClasses:s,colorStyles:o,variantClasses:l}=wt(e),{densityClasses:r}=lt(e),{roundedClasses:u}=Be(e),{sizeClasses:c,sizeStyles:m}=qt(e);return Z(()=>S(e.tag,{class:j(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},a.value,i.value,s.value,r.value,u.value,c.value,l.value,e.class]),style:X([o.value,m.value,e.style])},{default:()=>[n.default?S(ge,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?S(ni,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?S(xe,{key:"icon",icon:e.icon},null):e.text,St(!1,"v-avatar")]})),{}}}),Go=T({appendAvatar:String,appendIcon:oe,prependAvatar:String,prependIcon:oe,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...ee(),...Ge(),...le()},"VCardItem"),Uo=G()({name:"VCardItem",props:Go(),setup(e,t){let{slots:n}=t;return Z(()=>{const a=!!(e.prependAvatar||e.prependIcon),i=!!(a||n.prepend),s=!!(e.appendAvatar||e.appendIcon),o=!!(s||n.append),l=!!(e.title!=null||n.title),r=!!(e.subtitle!=null||n.subtitle);return S(e.tag,{class:j(["v-card-item",e.class]),style:X(e.style)},{default:()=>{var u;return[i&&I("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?S(ge,{key:"prepend-defaults",disabled:!a,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):I(Ve,null,[e.prependAvatar&&S(Mt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&S(xe,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),I("div",{class:"v-card-item__content"},[l&&S(ei,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??_e(e.title)]}}),r&&S(Wo,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??_e(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&I("div",{key:"append",class:"v-card-item__append"},[n.append?S(ge,{key:"append-defaults",disabled:!s,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):I(Ve,null,[e.appendIcon&&S(xe,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&S(Mt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]}})}),{}}}),Ko=T({opacity:[Number,String],...ee(),...le()},"VCardText"),mn=G()({name:"VCardText",props:Ko(),setup(e,t){let{slots:n}=t;return Z(()=>S(e.tag,{class:j(["v-card-text",e.class]),style:X([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),Xo=T({appendAvatar:String,appendIcon:oe,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:oe,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...st(),...ee(),...Ge(),...rt(),...bt(),...Ra(),...Ht(),...Tn(),...Oe(),...Rn(),...le(),...fe(),...Ue({variant:"elevated"})},"VCard"),ga=G()({name:"VCard",directives:{vRipple:yt},props:Xo(),setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{borderClasses:s}=ot(e),{colorClasses:o,colorStyles:l,variantClasses:r}=wt(e),{densityClasses:u}=lt(e),{dimensionStyles:c}=ut(e),{elevationClasses:m}=pt(e),{loaderClasses:v}=Na(e),{locationStyles:d}=Ln(e),{positionClasses:g}=On(e),{roundedClasses:f}=Be(e),p=Bn(e,n),b=z(void 0);return W(()=>e.loading,(x,L)=>{b.value=!x&&typeof L=="string"?L:typeof x=="boolean"?void 0:x},{immediate:!0}),Z(()=>{const x=e.link!==!1&&p.isLink.value,L=!e.disabled&&e.link!==!1&&(e.link||p.isClickable.value),w=x?"a":e.tag,h=!!(a.title||e.title!=null),_=!!(a.subtitle||e.subtitle!=null),E=h||_,y=!!(a.append||e.appendAvatar||e.appendIcon),R=!!(a.prepend||e.prependAvatar||e.prependIcon),F=!!(a.image||e.image),A=E||R||y,V=!!(a.text||e.text!=null);return We(S(w,Q(p.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":L},i.value,s.value,o.value,u.value,m.value,v.value,g.value,f.value,r.value,e.class],style:[l.value,c.value,d.value,{"--v-card-height":B(e.height)},e.style],onClick:L&&p.navigate.value,tabindex:e.disabled?-1:void 0}),{default:()=>{var P;return[F&&I("div",{key:"image",class:"v-card__image"},[a.image?S(ge,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},a.image):S(ni,{key:"image-img",cover:!0,src:e.image},null)]),S(Hs,{name:"v-card",active:!!e.loading,color:b.value},{default:a.loader}),A&&S(Uo,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:a.item,prepend:a.prepend,title:a.title,subtitle:a.subtitle,append:a.append}),V&&S(mn,{key:"text"},{default:()=>{var N;return[((N=a.text)==null?void 0:N.call(a))??e.text]}}),(P=a.default)==null?void 0:P.call(a),a.actions&&S(Za,null,{default:a.actions}),St(L,"v-card")]}}),[[yt,L&&e.ripple]])}),{}}}),Yo=T({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function me(e,t,n){return G()({name:e,props:Yo({mode:n,origin:t}),setup(a,i){let{slots:s}=i;const o={onBeforeEnter(l){a.origin&&(l.style.transformOrigin=a.origin)},onLeave(l){if(a.leaveAbsolute){const{offsetTop:r,offsetLeft:u,offsetWidth:c,offsetHeight:m}=l;l._transitionInitialStyles={position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width,height:l.style.height},l.style.position="absolute",l.style.top=`${r}px`,l.style.left=`${u}px`,l.style.width=`${c}px`,l.style.height=`${m}px`}a.hideOnLeave&&l.style.setProperty("display","none","important")},onAfterLeave(l){if(a.leaveAbsolute&&(l!=null&&l._transitionInitialStyles)){const{position:r,top:u,left:c,width:m,height:v}=l._transitionInitialStyles;delete l._transitionInitialStyles,l.style.position=r||"",l.style.top=u||"",l.style.left=c||"",l.style.width=m||"",l.style.height=v||""}}};return()=>{const l=a.group?_n:$e;return xn(l,{name:a.disabled?"":e,css:!a.disabled,...a.group?void 0:{mode:a.mode},...a.disabled?{}:o},s.default)}}})}function Mn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return G()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:Tt()},group:Boolean,hideOnLeave:Boolean},setup(a,i){let{slots:s}=i;const o=a.group?_n:$e;return()=>xn(o,{name:a.disabled?"":e,css:!a.disabled,...a.disabled?{}:{...t,onLeave:l=>{var r;a.hideOnLeave?l.style.setProperty("display","none","important"):(r=t.onLeave)==null||r.call(t,l)}}},s.default)}})}function Fn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(i){i._parent=i.parentNode,i._initialStyle={transition:i.style.transition,overflow:i.style.overflow,width:i.style.width,height:i.style.height}},onEnter(i){const s=i._initialStyle;if(!s)return;i.style.setProperty("transition","none","important"),i.style.overflow="hidden";const o=`${i.offsetWidth}px`,l=`${i.offsetHeight}px`;["x","both"].includes(t)&&(i.style.width="0"),["y","both"].includes(t)&&(i.style.height="0"),i.offsetHeight,i.style.transition=s.transition,e&&i._parent&&i._parent.classList.add(e),requestAnimationFrame(()=>{["x","both"].includes(t)&&(i.style.width=o),["y","both"].includes(t)&&(i.style.height=l)})},onAfterEnter:a,onEnterCancelled:a,onLeave(i){i._initialStyle={transition:"",overflow:i.style.overflow,width:i.style.width,height:i.style.height},i.style.overflow="hidden",["x","both"].includes(t)&&(i.style.width=`${i.offsetWidth}px`),["y","both"].includes(t)&&(i.style.height=`${i.offsetHeight}px`),i.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(t)&&(i.style.width="0"),["y","both"].includes(t)&&(i.style.height="0")})},onAfterLeave:n,onLeaveCancelled:n};function n(i){e&&i._parent&&i._parent.classList.remove(e),a(i)}function a(i){if(!i._initialStyle)return;const{width:s,height:o}=i._initialStyle;i.style.overflow=i._initialStyle.overflow,s!=null&&["x","both"].includes(t)&&(i.style.width=s),o!=null&&["y","both"].includes(t)&&(i.style.height=o),delete i._initialStyle}}const Jo=T({target:[Object,Array]},"v-dialog-transition"),nn=new WeakMap,Qo=G()({name:"VDialogTransition",props:Jo(),setup(e,t){let{slots:n}=t;const a={onBeforeEnter(i){i.style.pointerEvents="none",i.style.visibility="hidden"},async onEnter(i,s){var v;await new Promise(d=>requestAnimationFrame(d)),await new Promise(d=>requestAnimationFrame(d)),i.style.visibility="";const o=ha(e.target,i),{x:l,y:r,sx:u,sy:c,speed:m}=o;if(nn.set(i,o),Tt())Fe(i,[{opacity:0},{}],{duration:125*m,easing:Qn}).finished.then(()=>s());else{const d=Fe(i,[{transform:`translate(${l}px, ${r}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*m,easing:Qn});(v=ya(i))==null||v.forEach(g=>{Fe(g,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*m,easing:on})}),d.finished.then(()=>s())}},onAfterEnter(i){i.style.removeProperty("pointer-events")},onBeforeLeave(i){i.style.pointerEvents="none"},async onLeave(i,s){var v;await new Promise(d=>requestAnimationFrame(d));let o;!nn.has(i)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=ha(e.target,i):o=nn.get(i);const{x:l,y:r,sx:u,sy:c,speed:m}=o;Tt()?Fe(i,[{},{opacity:0}],{duration:85*m,easing:Jn}).finished.then(()=>s()):(Fe(i,[{},{transform:`translate(${l}px, ${r}px) scale(${u}, ${c})`,opacity:0}],{duration:125*m,easing:Jn}).finished.then(()=>s()),(v=ya(i))==null||v.forEach(g=>{Fe(g,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*m,easing:on})}))},onAfterLeave(i){i.style.removeProperty("pointer-events")}};return()=>e.target?S($e,Q({name:"dialog-transition"},a,{css:!1}),n):S($e,{name:"dialog-transition"},n)}});function ya(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function ha(e,t){const n=wn(e),a=ka(t),[i,s]=getComputedStyle(t).transformOrigin.split(" ").map(b=>parseFloat(b)),[o,l]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let r=n.left+n.width/2;o==="left"||l==="left"?r-=n.width/2:(o==="right"||l==="right")&&(r+=n.width/2);let u=n.top+n.height/2;o==="top"||l==="top"?u-=n.height/2:(o==="bottom"||l==="bottom")&&(u+=n.height/2);const c=n.width/a.width,m=n.height/a.height,v=Math.max(1,c,m),d=c/v||0,g=m/v||0,f=a.width*a.height/(window.innerWidth*window.innerHeight),p=f>.12?Math.min(1.5,(f-.12)*10+1):1;return{x:r-(i+a.left),y:u-(s+a.top),sx:d,sy:g,speed:p}}me("fab-transition","center center","out-in");me("dialog-bottom-transition");me("dialog-top-transition");const ql=me("fade-transition"),Hl=me("scale-transition");me("scroll-x-transition");me("scroll-x-reverse-transition");me("scroll-y-transition");me("scroll-y-reverse-transition");me("slide-x-transition");const jl=me("slide-x-reverse-transition"),Gl=me("slide-y-transition");me("slide-y-reverse-transition");const Zo=Mn("expand-transition",Fn()),Ul=Mn("expand-x-transition",Fn("","x"));Mn("expand-both-transition",Fn("","both"));const el=T({fullscreen:Boolean,scrollable:Boolean,...at(Dn({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:Qo},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),tl=G()({name:"VDialog",props:el(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:a}=t;const i=Pe(e,"modelValue"),{scopeId:s}=$n(),o=M();function l(){var u;n("afterEnter"),(e.scrim||e.retainFocus)&&((u=o.value)!=null&&u.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function r(){n("afterLeave")}return W(i,async u=>{var c;u||(await de(),(c=o.value.activatorEl)==null||c.focus({preventScroll:!0}))}),Z(()=>{const u=Dt.filterProps(e),c=Q({"aria-haspopup":"dialog"},e.activatorProps),m=Q({tabindex:-1},e.contentProps);return S(Dt,Q({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},u,{modelValue:i.value,"onUpdate:modelValue":v=>i.value=v,"aria-modal":"true",activatorProps:c,contentProps:m,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:l,onAfterLeave:r},s),{activator:a.activator,default:function(){for(var v=arguments.length,d=new Array(v),g=0;g{var f;return[(f=a.default)==null?void 0:f.call(a,...d)]}})}})}),Ja({},o)}}),nl=["dotted","dashed","solid","double"],al=T({color:String,contentOffset:[Number,String,Array],gradient:Boolean,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,variant:{type:String,default:"solid",validator:e=>nl.includes(e)},...ee(),...fe()},"VDivider"),ai=G()({name:"VDivider",props:al(),setup(e,t){let{attrs:n,slots:a}=t;const{themeClasses:i}=ye(e),{textColorClasses:s,textColorStyles:o}=tt(()=>e.color),l=C(()=>{const u={};return e.length&&(u[e.vertical?"height":"width"]=B(e.length)),e.thickness&&(u[e.vertical?"borderRightWidth":"borderTopWidth"]=B(e.thickness)),u}),r=k(()=>{const u=Array.isArray(e.contentOffset)?e.contentOffset[0]:e.contentOffset,c=Array.isArray(e.contentOffset)?e.contentOffset[1]:0;return{marginBlock:e.vertical&&u?B(u):void 0,marginInline:!e.vertical&&u?B(u):void 0,transform:c?`translate${e.vertical?"X":"Y"}(${B(c)})`:void 0}});return Z(()=>{const u=I("hr",{class:j([{"v-divider":!0,"v-divider--gradient":e.gradient&&!a.default,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},i.value,s.value,e.class]),style:X([l.value,o.value,{"--v-border-opacity":e.opacity},{"border-style":e.variant},e.style]),"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return a.default?I("div",{class:j(["v-divider__wrapper",{"v-divider__wrapper--gradient":e.gradient,"v-divider__wrapper--inset":e.inset,"v-divider__wrapper--vertical":e.vertical}])},[u,I("div",{class:"v-divider__content",style:X(r.value)},[a.default()]),u]):u}),{}}}),il=kn("v-spacer","div","VSpacer"),gn=Symbol.for("vuetify:list");function ii(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=Le(gn,{filterable:!1,hasPrepend:z(!1),updateHasPrepend:()=>null,trackingIndex:z(-1),navigationStrategy:z("focus"),uid:""}),{filterable:n,trackingIndex:a=t.trackingIndex,navigationStrategy:i=t.navigationStrategy,uid:s=t.uid||Cn()}=e,o={filterable:t.filterable||n,hasPrepend:z(!1),updateHasPrepend:l=>{l&&(o.hasPrepend.value=l)},trackingIndex:a,navigationStrategy:i,uid:s};return He(gn,o),t}function si(){return Le(gn,null)}const zn=e=>{const t={activate:n=>{let{id:a,value:i,activated:s}=n;return a=ne(a),e&&!i&&s.size===1&&s.has(a)||(i?s.add(a):s.delete(a)),s},in:(n,a,i)=>{let s=new Set;if(n!=null)for(const o of pn(n))s=t.activate({id:o,value:!0,activated:new Set(s),children:a,parents:i});return s},out:n=>Array.from(n)};return t},oi=e=>{const t=zn(e);return{activate:a=>{let{activated:i,id:s,...o}=a;s=ne(s);const l=i.has(s)?new Set([s]):new Set;return t.activate({...o,id:s,activated:l})},in:(a,i,s)=>{let o=new Set;if(a!=null){const l=pn(a);l.length&&(o=t.in(l.slice(0,1),i,s))}return o},out:(a,i,s)=>t.out(a,i,s)}},sl=e=>{const t=zn(e);return{activate:a=>{let{id:i,activated:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.activate({id:i,activated:s,children:o,...l})},in:t.in,out:t.out}},ol=e=>{const t=oi(e);return{activate:a=>{let{id:i,activated:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.activate({id:i,activated:s,children:o,...l})},in:t.in,out:t.out}},ll={open:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(n){const s=new Set;s.add(t);let o=i.get(t);for(;o!=null;)s.add(o),o=i.get(o);return s}else return a.delete(t),a},select:()=>null},li={open:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(n){let s=i.get(t);for(a.add(t);s!=null&&s!==t;)a.add(s),s=i.get(s);return a}else a.delete(t);return a},select:()=>null},rl={open:li.open,select:e=>{let{id:t,value:n,opened:a,parents:i}=e;if(!n)return a;const s=[];let o=i.get(t);for(;o!=null;)s.push(o),o=i.get(o);return new Set(s)}},Wn=e=>{const t={select:n=>{let{id:a,value:i,selected:s}=n;if(a=ne(a),e&&!i){const o=Array.from(s.entries()).reduce((l,r)=>{let[u,c]=r;return c==="on"&&l.push(u),l},[]);if(o.length===1&&o[0]===a)return s}return s.set(a,i?"on":"off"),s},in:(n,a,i,s)=>{const o=new Map;for(const l of n||[])t.select({id:l,value:!0,selected:o,children:a,parents:i,disabled:s});return o},out:n=>{const a=[];for(const[i,s]of n.entries())s==="on"&&a.push(i);return a}};return t},ri=e=>{const t=Wn(e);return{select:a=>{let{selected:i,id:s,...o}=a;s=ne(s);const l=i.has(s)?new Map([[s,i.get(s)]]):new Map;return t.select({...o,id:s,selected:l})},in:(a,i,s,o)=>a!=null&&a.length?t.in(a.slice(0,1),i,s,o):new Map,out:(a,i,s)=>t.out(a,i,s)}},ul=e=>{const t=Wn(e);return{select:a=>{let{id:i,selected:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.select({id:i,selected:s,children:o,...l})},in:t.in,out:t.out}},cl=e=>{const t=ri(e);return{select:a=>{let{id:i,selected:s,children:o,...l}=a;return i=ne(i),o.has(i)?s:t.select({id:i,selected:s,children:o,...l})},in:t.in,out:t.out}},qn=e=>{const t={select:n=>{let{id:a,value:i,selected:s,children:o,parents:l,disabled:r}=n;a=ne(a);const u=new Map(s),c=[a];for(;c.length;){const v=c.shift();r.has(v)||s.set(ne(v),i?"on":"off"),o.has(v)&&c.push(...o.get(v))}let m=ne(l.get(a));for(;m;){let v=!0,d=!0;for(const g of o.get(m)){const f=ne(g);if(!r.has(f)&&(s.get(f)!=="on"&&(v=!1),s.has(f)&&s.get(f)!=="off"&&(d=!1),!v&&!d))break}s.set(m,v?"on":d?"off":"indeterminate"),m=ne(l.get(m))}return e&&!i&&Array.from(s.entries()).reduce((d,g)=>{let[f,p]=g;return p==="on"&&d.push(f),d},[]).length===0?u:s},in:(n,a,i)=>{let s=new Map;for(const o of n||[])s=t.select({id:o,value:!0,selected:s,children:a,parents:i,disabled:new Set});return s},out:(n,a)=>{const i=[];for(const[s,o]of n.entries())o==="on"&&!a.has(s)&&i.push(s);return i}};return t},dl=e=>{const t=qn(e);return{select:t.select,in:t.in,out:(a,i,s)=>{const o=[];for(const[l,r]of a.entries())if(r==="on"){if(s.has(l)){const u=s.get(l);if(a.get(u)==="on")continue}o.push(l)}return o}}},fl=e=>{const n={select:qn(e).select,in:(a,i,s,o)=>{let l=new Map;for(const r of a||[])i.has(r)||(l=n.select({id:r,value:!0,selected:l,children:i,parents:s,disabled:o}));return l},out:a=>{const i=[];for(const[s,o]of a.entries())(o==="on"||o==="indeterminate")&&i.push(s);return i}};return n},nt=Symbol.for("vuetify:nested"),ui={id:z(),root:{itemsRegistration:M("render"),register:()=>null,unregister:()=>null,updateDisabled:()=>null,children:M(new Map),parents:M(new Map),disabled:M(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:M(!1),scrollToActive:M(!1),selectable:M(!1),opened:M(new Set),activated:M(new Set),selected:M(new Map),selectedValues:M([]),getPath:()=>[]}},vl=T({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean,itemsRegistration:{type:String,default:"render"}},"nested"),ml=(e,t)=>{let{items:n,returnObject:a,scrollToActive:i}=t,s=!1;const o=z(new Map),l=z(new Map),r=z(new Set),u=Pe(e,"opened",e.opened,h=>new Set(Array.isArray(h)?h.map(_=>ne(_)):h),h=>[...h.values()]),c=C(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return sl(e.mandatory);case"single-leaf":return ol(e.mandatory);case"independent":return zn(e.mandatory);case"single-independent":default:return oi(e.mandatory)}}),m=C(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return cl(e.mandatory);case"leaf":return ul(e.mandatory);case"independent":return Wn(e.mandatory);case"single-independent":return ri(e.mandatory);case"trunk":return dl(e.mandatory);case"branch":return fl(e.mandatory);case"classic":default:return qn(e.mandatory)}}),v=C(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return rl;case"single":return ll;case"multiple":default:return li}}),d=Pe(e,"activated",e.activated,h=>c.value.in(h,o.value,l.value),h=>c.value.out(h,o.value,l.value)),g=Pe(e,"selected",e.selected,h=>m.value.in(h,o.value,l.value,r.value),h=>m.value.out(h,o.value,l.value));je(()=>{s=!0});function f(h){const _=[];let E=ne(h);for(;E!==void 0;)_.unshift(E),E=l.value.get(E);return _}const p=Ee("nested"),b=new Set,x=Fi(()=>{de(()=>{o.value=new Map(o.value),l.value=new Map(l.value)})},100);W(()=>[n.value,se(a)],()=>{e.itemsRegistration==="props"&&L()},{immediate:!0});function L(){const h=new Map,_=new Map,E=new Set,y=se(a)?A=>ne(A.raw):A=>A.value,R=[...n.value];let F=0;for(;Fe.activatable),scrollToActive:k(()=>se(i)),selectable:k(()=>e.selectable),activated:d,selected:g,selectedValues:C(()=>{const h=[];for(const[_,E]of g.value.entries())E==="on"&&h.push(_);return h}),itemsRegistration:k(()=>e.itemsRegistration),register:(h,_,E,y)=>{if(b.has(h)){f(h).map(String).join(" -> "),f(_).concat(h).map(String).join(" -> ");return}else b.add(h);_&&h!==_&&l.value.set(h,_),E&&r.value.add(h),y&&o.value.set(h,[]),_!=null&&o.value.set(_,[...o.value.get(_)||[],h]),x()},unregister:h=>{if(s)return;b.delete(h),o.value.delete(h),r.value.delete(h);const _=l.value.get(h);if(_){const E=o.value.get(_)??[];o.value.set(_,E.filter(y=>y!==h))}l.value.delete(h),x()},updateDisabled:(h,_)=>{_?r.value.add(h):r.value.delete(h)},open:(h,_,E)=>{p.emit("click:open",{id:h,value:_,path:f(h),event:E});const y=v.value.open({id:h,value:_,opened:new Set(u.value),children:o.value,parents:l.value,event:E});y&&(u.value=y)},openOnSelect:(h,_,E)=>{const y=v.value.select({id:h,value:_,selected:new Map(g.value),opened:new Set(u.value),children:o.value,parents:l.value,event:E});y&&(u.value=y)},select:(h,_,E)=>{p.emit("click:select",{id:h,value:_,path:f(h),event:E});const y=m.value.select({id:h,value:_,selected:new Map(g.value),children:o.value,parents:l.value,disabled:r.value,event:E});y&&(g.value=y),w.root.openOnSelect(h,_,E)},activate:(h,_,E)=>{if(!e.activatable)return w.root.select(h,!0,E);p.emit("click:activate",{id:h,value:_,path:f(h),event:E});const y=c.value.activate({id:h,value:_,activated:new Set(d.value),children:o.value,parents:l.value,event:E});if(y.size!==d.value.size)d.value=y;else{for(const R of y)if(!d.value.has(R)){d.value=y;return}for(const R of d.value)if(!y.has(R)){d.value=y;return}}},children:o,parents:l,disabled:r,getPath:f}};return He(nt,w),w.root},ci=(e,t,n)=>{const a=Le(nt,ui),i=Symbol("nested item"),s=C(()=>{const l=ne(se(e));return l!==void 0?l:i}),o={...a,id:s,open:(l,r)=>a.root.open(s.value,l,r),openOnSelect:(l,r)=>a.root.openOnSelect(s.value,l,r),isOpen:C(()=>a.root.opened.value.has(s.value)),parent:C(()=>a.root.parents.value.get(s.value)),activate:(l,r)=>a.root.activate(s.value,l,r),isActivated:C(()=>a.root.activated.value.has(s.value)),scrollToActive:a.root.scrollToActive,select:(l,r)=>a.root.select(s.value,l,r),isSelected:C(()=>a.root.selected.value.get(s.value)==="on"),isIndeterminate:C(()=>a.root.selected.value.get(s.value)==="indeterminate"),isLeaf:C(()=>!a.root.children.value.get(s.value)),isGroupActivator:a.isGroupActivator};return Pn(()=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||de(()=>{a.root.register(s.value,a.id.value,se(t),n)})}),je(()=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||a.root.unregister(s.value)}),W(s,(l,r)=>{a.isGroupActivator||a.root.itemsRegistration.value==="props"||(a.root.unregister(r),de(()=>{a.root.register(l,a.id.value,se(t),n)}))}),W(()=>se(t),l=>{a.root.updateDisabled(s.value,l)}),n&&He(nt,o),o},gl=()=>{const e=Le(nt,ui);He(nt,{...e,isGroupActivator:!0})};function yl(){const e=z(!1);return it(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:k(()=>e.value?void 0:{transition:"none !important"}),isBooted:Ia(e)}}const hl=zi({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return gl(),()=>{var a;return(a=n.default)==null?void 0:a.call(n)}}}),bl=T({activeColor:String,baseColor:String,color:String,collapseIcon:{type:oe,default:"$collapse"},disabled:Boolean,expandIcon:{type:oe,default:"$expand"},rawId:[String,Number],prependIcon:oe,appendIcon:oe,fluid:Boolean,subgroup:Boolean,title:String,value:null,...ee(),...le()},"VListGroup"),ba=G()({name:"VListGroup",props:bl(),setup(e,t){let{slots:n}=t;const{isOpen:a,open:i,id:s}=ci(()=>e.value,()=>e.disabled,!0),o=C(()=>`v-list-group--id-${String(e.rawId??s.value)}`),l=si(),{isBooted:r}=yl(),u=Le(nt),c=k(()=>{var f;return((f=u==null?void 0:u.root)==null?void 0:f.itemsRegistration.value)==="render"});function m(f){var p;["INPUT","TEXTAREA"].includes((p=f.target)==null?void 0:p.tagName)||i(!a.value,f)}const v=C(()=>({onClick:m,class:"v-list-group__header",id:o.value})),d=C(()=>a.value?e.collapseIcon:e.expandIcon),g=C(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Z(()=>S(e.tag,{class:j(["v-list-group",{"v-list-group--prepend":l==null?void 0:l.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":a.value},e.class]),style:X(e.style)},{default:()=>[n.activator&&S(ge,{defaults:g.value},{default:()=>[S(hl,null,{default:()=>[n.activator({props:v.value,isOpen:a.value})]})]}),S(Ye,{transition:{component:Zo},disabled:!r.value},{default:()=>{var f,p;return[c.value?We(I("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(f=n.default)==null?void 0:f.call(n)]),[[En,a.value]]):a.value&&I("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(p=n.default)==null?void 0:p.call(n)])]}})]})),{isOpen:a}}}),pl=T({opacity:[Number,String],...ee(),...le()},"VListItemSubtitle"),di=G()({name:"VListItemSubtitle",props:pl(),setup(e,t){let{slots:n}=t;return Z(()=>S(e.tag,{class:j(["v-list-item-subtitle",e.class]),style:X([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),fi=kn("v-list-item-title"),Sl=T({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:oe,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:oe,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,prependGap:[Number,String],subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,index:Number,tabindex:[Number,String],onClick:ft(),onClickOnce:ft(),...st(),...ee(),...Ge(),...rt(),...bt(),...Oe(),...Rn(),...le(),...fe(),...Ue({variant:"text"})},"VListItem"),yn=G()({name:"VListItem",directives:{vRipple:yt},props:Sl(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:a,emit:i}=t;const s=Bn(e,n),o=M(),l=C(()=>e.value===void 0?s.href.value:e.value),{activate:r,isActivated:u,select:c,isOpen:m,isSelected:v,isIndeterminate:d,isGroupActivator:g,root:f,parent:p,openOnSelect:b,scrollToActive:x,id:L}=ci(l,()=>e.disabled,!1),w=si(),h=C(()=>{var D;return e.active!==!1&&(e.active||((D=s.isActive)==null?void 0:D.value)||(f.activatable.value?u.value:v.value))}),_=k(()=>e.link!==!1&&s.isLink.value),E=C(()=>!!w&&(f.selectable.value||f.activatable.value||e.value!=null)),y=C(()=>!e.disabled&&e.link!==!1&&(e.link||s.isClickable.value||E.value)),R=C(()=>w&&w.navigationStrategy.value==="track"&&e.index!==void 0&&w.trackingIndex.value===e.index),F=C(()=>w?_.value?"link":E.value?"option":"listitem":void 0),A=C(()=>{if(E.value)return f.activatable.value?u.value:f.selectable.value?v.value:h.value}),V=k(()=>e.rounded||e.nav),P=k(()=>e.color??e.activeColor),N=k(()=>({color:h.value?P.value??e.baseColor:e.baseColor,variant:e.variant}));W(()=>{var D;return(D=s.isActive)==null?void 0:D.value},D=>{D&&O()}),W(u,D=>{var re;!D||!x||(re=o.value)==null||re.scrollIntoView({block:"nearest",behavior:"instant"})}),W(R,D=>{var re;D&&((re=o.value)==null||re.scrollIntoView({block:"nearest",behavior:"instant"}))}),Pn(()=>{var D;(D=s.isActive)!=null&&D.value&&de(()=>O())});function O(){p.value!=null&&f.open(p.value,!0),b(!0)}const{themeClasses:U}=ye(e),{borderClasses:Y}=ot(e),{colorClasses:te,colorStyles:he,variantClasses:K}=wt(N),{densityClasses:$}=lt(e),{dimensionStyles:J}=ut(e),{elevationClasses:q}=pt(e),{roundedClasses:be}=Be(V),Ke=k(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),De=k(()=>e.ripple!==void 0&&e.ripple&&(w!=null&&w.filterable)?{keys:["Enter"]}:e.ripple),H=C(()=>({isActive:h.value,select:c,isOpen:m.value,isSelected:v.value,isIndeterminate:d.value,isDisabled:e.disabled}));function ue(D){var re,kt,Gt;i("click",D),!["INPUT","TEXTAREA"].includes((re=D.target)==null?void 0:re.tagName)&&y.value&&((Gt=(kt=s.navigate).value)==null||Gt.call(kt,D),!g&&(f.activatable.value?r(!u.value,D):(f.selectable.value||e.value!=null&&!_.value)&&c(!v.value,D)))}function Me(D){const re=D.target;["INPUT","TEXTAREA"].includes(re.tagName)||(D.key==="Enter"||D.key===" "&&!(w!=null&&w.filterable))&&(D.preventDefault(),D.stopPropagation(),D.target.dispatchEvent(new MouseEvent("click",D)))}return Z(()=>{const D=_.value?"a":e.tag,re=a.title||e.title!=null,kt=a.subtitle||e.subtitle!=null,hi=!!(!!(e.appendAvatar||e.appendIcon)||a.append),Ut=!!(!!(e.prependAvatar||e.prependIcon)||a.prepend);return w==null||w.updateHasPrepend(Ut),e.activeColor&&Wi("active-color",["color","base-color"]),We(S(D,Q(s.linkProps,{ref:o,id:e.index!==void 0&&w?`v-list-item-${w.uid}-${e.index}`:void 0,class:["v-list-item",{"v-list-item--active":h.value,"v-list-item--disabled":e.disabled,"v-list-item--link":y.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!Ut&&(w==null?void 0:w.hasPrepend.value),"v-list-item--slim":e.slim,"v-list-item--focus-visible":R.value,[`${e.activeClass}`]:e.activeClass&&h.value},U.value,Y.value,te.value,$.value,q.value,Ke.value,be.value,K.value,e.class],style:[{"--v-list-prepend-gap":B(e.prependGap)},he.value,J.value,e.style],tabindex:e.tabindex??(y.value?w?-2:0:void 0),"aria-selected":A.value,role:F.value,onClick:ue,onKeydown:y.value&&!_.value&&Me}),{default:()=>{var Hn;return[St(y.value||h.value,"v-list-item"),Ut&&I("div",{key:"prepend",class:"v-list-item__prepend"},[a.prepend?S(ge,{key:"prepend-defaults",defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0},VCheckboxBtn:{density:e.density}}},{default:()=>{var pe;return[(pe=a.prepend)==null?void 0:pe.call(a,H.value)]}}):I(Ve,null,[e.prependAvatar&&S(Mt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&S(xe,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),I("div",{class:"v-list-item__spacer"},null)]),I("div",{class:"v-list-item__content","data-no-activator":""},[re&&S(fi,{key:"title"},{default:()=>{var pe;return[((pe=a.title)==null?void 0:pe.call(a,{title:e.title}))??_e(e.title)]}}),kt&&S(di,{key:"subtitle"},{default:()=>{var pe;return[((pe=a.subtitle)==null?void 0:pe.call(a,{subtitle:e.subtitle}))??_e(e.subtitle)]}}),(Hn=a.default)==null?void 0:Hn.call(a,H.value)]),hi&&I("div",{key:"append",class:"v-list-item__append"},[a.append?S(ge,{key:"append-defaults",defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0},VCheckboxBtn:{density:e.density}}},{default:()=>{var pe;return[(pe=a.append)==null?void 0:pe.call(a,H.value)]}}):I(Ve,null,[e.appendIcon&&S(xe,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&S(Mt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),I("div",{class:"v-list-item__spacer"},null)])]}}),[[yt,y.value&&De.value]])}),{activate:r,isActivated:u,isGroupActivator:g,isSelected:v,list:w,select:c,root:f,id:L,link:s}}}),wl=T({color:String,inset:Boolean,sticky:Boolean,title:String,...ee(),...le()},"VListSubheader"),kl=G()({name:"VListSubheader",props:wl(),setup(e,t){let{slots:n}=t;const{textColorClasses:a,textColorStyles:i}=tt(()=>e.color);return Z(()=>{const s=!!(n.default||e.title);return S(e.tag,{class:j(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},a.value,e.class]),style:X([{textColorStyles:i},e.style])},{default:()=>{var o;return[s&&I("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),Cl=T({items:Array,returnObject:Boolean},"VListChildren"),vi=G()({name:"VListChildren",props:Cl(),setup(e,t){let{slots:n}=t;return ii(),()=>{var a,i;return((a=n.default)==null?void 0:a.call(n))??((i=e.items)==null?void 0:i.map((s,o)=>{var d,g;let{children:l,props:r,type:u,raw:c}=s;if(u==="divider")return((d=n.divider)==null?void 0:d.call(n,{props:r}))??S(ai,r,null);if(u==="subheader")return((g=n.subheader)==null?void 0:g.call(n,{props:r}))??S(kl,r,null);const m={subtitle:n.subtitle?f=>{var p;return(p=n.subtitle)==null?void 0:p.call(n,{...f,item:c})}:void 0,prepend:n.prepend?f=>{var p;return(p=n.prepend)==null?void 0:p.call(n,{...f,item:c})}:void 0,append:n.append?f=>{var p;return(p=n.append)==null?void 0:p.call(n,{...f,item:c})}:void 0,title:n.title?f=>{var p;return(p=n.title)==null?void 0:p.call(n,{...f,item:c})}:void 0},v=ba.filterProps(r);return l?S(ba,Q(v,{value:e.returnObject?c:r==null?void 0:r.value,rawId:r==null?void 0:r.value}),{activator:f=>{let{props:p}=f;const b=Q(r,p,{value:e.returnObject?c:r.value});return n.header?n.header({props:b}):S(yn,Q(b,{index:o}),m)},default:()=>S(vi,{items:l,returnObject:e.returnObject},n)}):n.item?n.item({props:{...r,index:o}}):S(yn,Q(r,{index:o,value:e.returnObject?c:r.value}),m)}))}}}),_l=T({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},itemType:{type:[Boolean,String,Array,Function],default:"type"},returnObject:Boolean,valueComparator:Function},"list-items"),xl=new Set(["item","divider","subheader"]);function Ze(e,t){const n=ke(t,e.itemTitle,t),a=ke(t,e.itemValue,n),i=ke(t,e.itemChildren),s=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?at(t,["children"]):t:void 0:ke(t,e.itemProps);let o=ke(t,e.itemType,"item");xl.has(o)||(o="item");const l={title:n,value:a,...s};return{type:o,title:String(l.title??""),value:l.value,props:l,children:o==="item"&&Array.isArray(i)?mi(e,i):void 0,raw:t}}Ze.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function mi(e,t){const n=_a(e,Ze.neededProps),a=[];for(const i of t)a.push(Ze(n,i));return a}function Kl(e){const t=C(()=>mi(e,e.items)),n=C(()=>t.value.some(l=>l.value===null)),a=z(new Map),i=z([]);Ne(()=>{const l=t.value,r=new Map,u=[];for(let c=0;c{let{raw:u}=r;return u}):l.map(r=>{let{value:u}=r;return u})}return{items:t,transformIn:s,transformOut:o}}const El=new Set(["item","divider","subheader"]);function Il(e,t){const n=ln(t)?t:ke(t,e.itemTitle),a=ln(t)?t:ke(t,e.itemValue,void 0),i=ke(t,e.itemChildren),s=e.itemProps===!0?at(t,["children"]):ke(t,e.itemProps);let o=ke(t,e.itemType,"item");El.has(o)||(o="item");const l={title:n,value:a,...s};return{type:o,title:l.title,value:l.value,props:l,children:o==="item"&&i?gi(e,i):void 0,raw:t}}function gi(e,t){const n=[];for(const a of t)n.push(Il(e,a));return n}function Pl(e){return{items:C(()=>gi(e,e.items))}}const Al=T({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:oe,collapseIcon:oe,lines:{type:[Boolean,String],default:"one"},slim:Boolean,prependGap:[Number,String],indent:[Number,String],nav:Boolean,navigationStrategy:{type:String,default:"focus"},navigationIndex:Number,"onClick:open":ft(),"onClick:select":ft(),"onUpdate:opened":ft(),...vl({selectStrategy:"single-leaf",openStrategy:"list"}),...st(),...ee(),...Ge(),...rt(),...bt(),..._l(),...Oe(),...le(),...fe(),...Ue({variant:"text"})},"VList"),Vl=G()({name:"VList",props:Al(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"update:navigationIndex":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{attrs:n,slots:a,emit:i}=t;const{items:s}=Pl(e),{themeClasses:o}=ye(e),{backgroundColorClasses:l,backgroundColorStyles:r}=Qe(()=>e.bgColor),{borderClasses:u}=ot(e),{densityClasses:c}=lt(e),{dimensionStyles:m}=ut(e),{elevationClasses:v}=pt(e),{roundedClasses:d}=Be(e),{children:g,open:f,parents:p,select:b,getPath:x}=ml(e,{items:s,returnObject:k(()=>e.returnObject),scrollToActive:k(()=>e.navigationStrategy==="track")}),L=k(()=>e.lines?`v-list--${e.lines}-line`:void 0),w=k(()=>e.activeColor),h=k(()=>e.baseColor),_=k(()=>e.color),E=k(()=>e.selectable||e.activatable),y=Pe(e,"navigationIndex",-1,$=>$??-1),R=Cn();ii({filterable:e.filterable,trackingIndex:y,navigationStrategy:k(()=>e.navigationStrategy),uid:R}),W(s,()=>{e.navigationStrategy==="track"&&(y.value=-1)}),Ft({VListGroup:{activeColor:w,baseColor:h,color:_,expandIcon:k(()=>e.expandIcon),collapseIcon:k(()=>e.collapseIcon)},VListItem:{activeClass:k(()=>e.activeClass),activeColor:w,baseColor:h,color:_,density:k(()=>e.density),disabled:k(()=>e.disabled),lines:k(()=>e.lines),nav:k(()=>e.nav),slim:k(()=>e.slim),variant:k(()=>e.variant),tabindex:k(()=>e.navigationStrategy==="track"?-1:void 0)}});const F=z(!1),A=M();function V($){F.value=!0}function P($){F.value=!1}function N($){var J;e.navigationStrategy==="track"?~y.value||(y.value=Y("first")):!F.value&&!($.relatedTarget&&((J=A.value)!=null&&J.contains($.relatedTarget)))&&K()}function O(){e.navigationStrategy==="track"&&(y.value=-1)}function U($){switch($){case"ArrowDown":return"next";case"ArrowUp":return"prev";case"Home":return"first";case"End":return"last";default:return null}}function Y($){const J=s.value.length;if(J===0)return-1;let q;$==="first"?q=0:$==="last"?q=J-1:(q=y.value+($==="next"?1:-1),q<0&&(q=J-1),q>=J&&(q=0));const be=q;let Ke=0;for(;Ke=J&&(q=0),q===be)return-1;Ke++}return-1}function te($){const J=$.target;if(!A.value||J.tagName==="INPUT"&&["Home","End"].includes($.key)||J.tagName==="TEXTAREA")return;const q=U($.key);if(q!==null)if($.preventDefault(),e.navigationStrategy==="track"){const be=Y(q);be!==-1&&(y.value=be)}else K(q)}function he($){F.value=!0}function K($,J){if(A.value)return qi(A.value,$,J)}return Z(()=>{const $=e.indent??(e.prependGap?Number(e.prependGap)+24:void 0),J=E.value?n.ariaMultiselectable??!String(e.selectStrategy).startsWith("single-"):void 0;return S(e.tag,{ref:A,class:j(["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},o.value,l.value,u.value,c.value,v.value,L.value,d.value,e.class]),style:X([{"--v-list-indent":B($),"--v-list-group-prepend":$?"0px":void 0,"--v-list-prepend-gap":B(e.prependGap)},r.value,m.value,e.style]),tabindex:e.disabled?-1:0,role:E.value?"listbox":"list","aria-activedescendant":e.navigationStrategy==="track"&&y.value>=0?`v-list-item-${R}-${y.value}`:void 0,"aria-multiselectable":J,onFocusin:V,onFocusout:P,onFocus:N,onBlur:O,onKeydown:te,onMousedown:he},{default:()=>[S(vi,{items:s.value,returnObject:e.returnObject},a)]})}),{open:f,select:b,focus:K,children:g,parents:p,getPath:x,navigationIndex:y}}});let hn=null;const yi={name:"RateLimitModal",data(){return{isVisible:!1,activeRequests:[]}},computed:{hasActiveRequests(){return this.activeRequests.length>0}},watch:{hasActiveRequests(e){this.isVisible=e}},methods:{close(){this.isVisible=!1},show(e,t,n){const a=Date.now()+Math.random().toString(36).substring(2,9),i=Math.max(0,Math.floor((new Date(e)-new Date)/1e3)),s={id:a,resetTime:e,path:t,method:n,remainingSeconds:i};this.activeRequests.push(s),this.startCountdown(a),this.isVisible=!0},startCountdown(e){const t=this.activeRequests.find(a=>a.id===e);if(!t)return;const n=setInterval(()=>{const a=this.activeRequests.findIndex(i=>i.id===e);if(a===-1){clearInterval(n);return}this.activeRequests[a].remainingSeconds--,this.activeRequests[a].remainingSeconds<=0&&(clearInterval(n),this.activeRequests.splice(a,1))},1e3);t.intervalId=n},clearAllCountdowns(){this.activeRequests.forEach(e=>{e.intervalId&&clearInterval(e.intervalId)}),this.activeRequests=[]}},beforeUnmount(){this.clearAllCountdowns()},created(){hn=this}};yi.show=function(e,t,n){hn&&hn.show(e,t,n)};const Ll=yi,Tl={class:"text-primary font-weight-bold"};function Ol(e,t,n,a,i,s){return Ce(),ze(tl,{modelValue:e.isVisible,"onUpdate:modelValue":t[0]||(t[0]=o=>e.isVisible=o),"max-width":"500",persistent:""},{default:ie(()=>[S(ga,{class:"rate-limit-modal"},{default:ie(()=>[S(ei,{class:"text-center pa-4 bg-error text-white"},{default:ie(()=>[S(xe,{class:"mr-2",icon:"mdi-clock-alert-outline",size:"large"}),t[1]||(t[1]=Ct(" 请求频率超限 ",-1))]),_:1}),S(mn,{class:"pa-6"},{default:ie(()=>[t[3]||(t[3]=I("div",{class:"text-body-1 mb-4"}," 您的请求过于频繁,请稍后再试。 ",-1)),e.activeRequests.length>0?(Ce(),ze(ga,{key:0,class:"mb-4",flat:""},{default:ie(()=>[S(mn,null,{default:ie(()=>[(Ce(!0),In(Ve,null,ts(e.activeRequests,(o,l)=>(Ce(),ze(Vl,{key:l,class:"mb-4"},{default:ie(()=>[S(yn,{color:"primary","prepend-icon":"mdi-web"},{default:ie(()=>[S(fi,null,{default:ie(()=>[t[2]||(t[2]=Ct(" 等待时间: ",-1)),I("span",Tl,_e(o.remainingSeconds),1)]),_:2},1024),S(di,null,{default:ie(()=>[Ct(_e(o.method)+" "+_e(o.path),1)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),e.index[S(il),S(Ha,{color:"primary",variant:"tonal",onClick:e.close},{default:ie(()=>[...t[5]||(t[5]=[Ct(" 我知道了 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Bl=Aa(Ll,[["render",Ol]]),Rl=T({...ee(),...at(ji(),["fullHeight"]),...fe()},"VApp"),Nl=G()({name:"VApp",props:Rl(),setup(e,t){let{slots:n}=t;const a=ye(e),{layoutClasses:i,getLayoutItem:s,items:o,layoutRef:l}=Hi({...e,fullHeight:!0}),{rtlClasses:r}=zt();return Z(()=>{var u;return I("div",{ref:l,class:j(["v-application",a.themeClasses.value,i.value,r.value,e.class]),style:X([e.style])},[I("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:s,items:o,theme:a}}}),$l={__name:"App",setup(e){const t=Sa(),n=M(!1),a=M(""),i=M(10),s=M(30);function o(){n.value=Ie("background.enabled")||!1;const d=Ie("background.imageData")||"",g=Ie("background.url")||"";a.value=d||g,i.value=Ie("background.blur")??10,s.value=Ie("background.opacity")??30}const l=C(()=>!n.value||!a.value?{}:{background:"transparent"}),r=C(()=>({backgroundImage:`url(${a.value})`,backgroundSize:"cover",backgroundPosition:"center",filter:`blur(${i.value}px)`,transform:"scale(1.05)"})),u=C(()=>({background:`rgba(0, 0, 0, ${s.value/100})`}));let c=null;const m=d=>{d.preventDefault(),window.deferredPwaPrompt=d,window.dispatchEvent(new Event("pwa-prompt-ready"))},v=()=>{window.deferredPwaPrompt=null,window.dispatchEvent(new Event("pwa-installed"))};return it(()=>{const d=Ie("theme.mode");t.global.name.value=d,o(),c=Pa((g,f)=>{var b;const p=(b=f==null?void 0:f.detail)==null?void 0:b.key;(!p||p.startsWith("background.")||p==="theme.mode")&&(o(),t.global.name.value=Ie("theme.mode"))}),window.addEventListener("beforeinstallprompt",m),window.addEventListener("appinstalled",v)}),ns(()=>{c&&c(),window.removeEventListener("beforeinstallprompt",m),window.removeEventListener("appinstalled",v)}),(d,g)=>{const f=as("router-view"),p=Qa;return Ce(),ze(Nl,{style:X(l.value)},{default:ie(()=>[n.value?(Ce(),In(Ve,{key:0},[I("div",{class:"app-background-image",style:X(r.value)},null,4),I("div",{class:"app-background-overlay",style:X(u.value)},null,4)],64)):Bt("",!0),S(f,null,{default:ie(({Component:b,route:x})=>[S($e,{mode:"out-in",name:"md3"},{default:ie(()=>[(Ce(),ze(xa(b),{key:x.path}))]),_:2},1024)]),_:1}),S(p),S(Bl)]),_:1},8,["style"])}}},jt=is($l);ds(jt);jt.use(Xe);jt.component("GlobalMessage",Qa);jt.mount("#app");const pa=async()=>{try{const{getVisitorId:e}=await ae(async()=>{const{getVisitorId:a}=await import("./visitorId-D_nwlNzA.js");return{getVisitorId:a}},__vite__mapDeps([56,1,2]),import.meta.url),t=(await ae(async()=>{const{default:a}=await import("./index-ghQi_28l.js");return{default:a}},[],import.meta.url)).default;t.init("rhp8uqoc3l");const n=await e();console.log("Visitor ID:",n),t.identify(n),t.setTag("fingerprintjs",n)}catch(e){console.warn("Clarity 加载或标识设置失败:",e)}};document.readyState==="complete"?pa():window.addEventListener("load",pa,{once:!0});export{bt as $,Re as A,fa as B,ni as C,Dt as D,Ja as E,Wo as F,Wl as G,tt as H,Qe as I,no as J,lt as K,$n as L,Ge as M,Be as N,Ln as O,Ye as P,Ka as Q,Oe as R,Te as S,Ht as T,Dn as U,Fs as V,Uo as W,ys as X,bs as Y,ps as Z,Aa as _,rt as a,yt as a0,Hl as a1,pt as a2,bo as a3,ho as a4,Zo as a5,kl as a6,Na as a7,Hs as a8,Ra as a9,jl as aA,Kl as aB,Ze as aC,Qo as aD,_l as aE,yo as aF,fs as aG,vs as aH,zl as aI,Vs as aa,As as ab,Eo as ac,xo as ad,Ps as ae,ot as af,ge as ag,st as ah,Bl as ai,wt as aj,On as ak,St as al,Ue as am,Tn as an,ql as ao,Is as ap,qt as aq,Bn as ar,Ul as as,Wt as at,Rn as au,ma as av,Us as aw,Co as ax,ko as ay,Xe as az,ut as b,ei as c,mn as d,ga as e,xe as f,il as g,Ha as h,ai as i,Ba as j,tl as k,Za as l,le as m,Ie as n,Mt as o,Vl as p,yn as q,fi as r,gs as s,di as t,yl as u,Gl as v,Pa as w,ae as x,ta as y,Bo as z}; diff --git a/assets/serverRotation-xQe1elLG.js b/assets/serverRotation-BtcwvdZJ.js similarity index 96% rename from assets/serverRotation-xQe1elLG.js rename to assets/serverRotation-BtcwvdZJ.js index b4b6e33..6ddfd02 100644 --- a/assets/serverRotation-xQe1elLG.js +++ b/assets/serverRotation-BtcwvdZJ.js @@ -1 +1 @@ -import{n as l}from"./index-CzpSlHRw.js";const a=["https://kv-service.houlang.cloud","https://kv-service.wuyuan.dev"],h=5*60*1e3,g=3e3,c={preferred:null,cachedAt:0,probing:!1};function v(t){c.preferred=t,c.cachedAt=Date.now()}function y(t){return t.response?t.response.status>=500:!0}async function S(t){const n=new AbortController,r=setTimeout(()=>n.abort(),g),s=Date.now();try{return await fetch(`${t}/`,{method:"HEAD",signal:n.signal}),Date.now()-s}catch{return 1/0}finally{clearTimeout(r)}}async function w(){if(!c.probing){c.probing=!0;try{const n=(await Promise.all(a.map(async r=>({url:r,latency:await S(r)})))).filter(r=>r.latency<1/0).sort((r,s)=>r.latency-s.latency);n.length>0&&v(n[0].url)}catch{}finally{c.probing=!1}}}function E(){Date.now()-c.cachedAt>h&&!c.probing&&w().catch(()=>{});const r=c.preferred;return r&&a.includes(r)?[r,...a.filter(s=>s!==r)]:[...a]}function m(t){if(t==="classworkscloud")return E();const n=l("server.domain");return n?[n]:[]}async function R(t,n={}){const r=n.provider||l("server.provider"),s=n.onServerTried,u=typeof s=="function",p=m(r),e=[];let f=null;for(const i of p){e.push({url:i,status:"trying"}),u&&s({url:i,status:"trying",tried:[...e]});try{const o=await t(i);return e[e.length-1].status="success",u&&s({url:i,status:"success",tried:[...e]}),r==="classworkscloud"&&v(i),o}catch(o){if(!y(o))throw e[e.length-1].status="client-error",u&&s({url:i,status:"client-error",error:o,tried:[...e]}),o;f=o,e[e.length-1].status="failed",e[e.length-1].error=o.message||String(o),u&&s({url:i,status:"failed",error:o,tried:[...e]}),console.warn(`Server ${i} failed, trying next:`,o.message)}}console.error("All servers failed. Tried:",e);const d=f||new Error("All servers failed");throw d.triedServers=e,d}function T(){return l("server.provider")==="classworkscloud"?c.preferred||a[0]:l("server.domain")||""}function A(){return l("server.provider")==="classworkscloud"}export{T as g,A as i,R as t}; +import{n as l}from"./index-DGIAsv4W.js";const a=["https://kv-service.houlang.cloud","https://kv-service.wuyuan.dev"],h=5*60*1e3,g=3e3,c={preferred:null,cachedAt:0,probing:!1};function v(t){c.preferred=t,c.cachedAt=Date.now()}function y(t){return t.response?t.response.status>=500:!0}async function S(t){const n=new AbortController,r=setTimeout(()=>n.abort(),g),s=Date.now();try{return await fetch(`${t}/`,{method:"HEAD",signal:n.signal}),Date.now()-s}catch{return 1/0}finally{clearTimeout(r)}}async function w(){if(!c.probing){c.probing=!0;try{const n=(await Promise.all(a.map(async r=>({url:r,latency:await S(r)})))).filter(r=>r.latency<1/0).sort((r,s)=>r.latency-s.latency);n.length>0&&v(n[0].url)}catch{}finally{c.probing=!1}}}function E(){Date.now()-c.cachedAt>h&&!c.probing&&w().catch(()=>{});const r=c.preferred;return r&&a.includes(r)?[r,...a.filter(s=>s!==r)]:[...a]}function m(t){if(t==="classworkscloud")return E();const n=l("server.domain");return n?[n]:[]}async function R(t,n={}){const r=n.provider||l("server.provider"),s=n.onServerTried,u=typeof s=="function",p=m(r),e=[];let f=null;for(const i of p){e.push({url:i,status:"trying"}),u&&s({url:i,status:"trying",tried:[...e]});try{const o=await t(i);return e[e.length-1].status="success",u&&s({url:i,status:"success",tried:[...e]}),r==="classworkscloud"&&v(i),o}catch(o){if(!y(o))throw e[e.length-1].status="client-error",u&&s({url:i,status:"client-error",error:o,tried:[...e]}),o;f=o,e[e.length-1].status="failed",e[e.length-1].error=o.message||String(o),u&&s({url:i,status:"failed",error:o,tried:[...e]}),console.warn(`Server ${i} failed, trying next:`,o.message)}}console.error("All servers failed. Tried:",e);const d=f||new Error("All servers failed");throw d.triedServers=e,d}function T(){return l("server.provider")==="classworkscloud"?c.preferred||a[0]:l("server.domain")||""}function A(){return l("server.provider")==="classworkscloud"}export{T as g,A as i,R as t}; diff --git a/assets/settings--8H57vu-.js b/assets/settings-DjXlifwc.js similarity index 96% rename from assets/settings--8H57vu-.js rename to assets/settings-DjXlifwc.js index 552ee52..ca88f2a 100644 --- a/assets/settings--8H57vu-.js +++ b/assets/settings-DjXlifwc.js @@ -1,4 +1,4 @@ -import{_ as Rt,V as Sn}from"./MessageLog-92n2iU1x.js";import{_ as Q,W as ze,c as K,f as g,d as j,j as $e,l as ue,e as M,o as et,C as Kt,x as Ft,X as Te,n as y,s as re,Y as Cn,r as z,h as p,p as O,q as D,i as U,z as ft,Z as Re,w as pt,A as ut,g as Z,$ as Vn,R as _n,a0 as Vt,H as Dn,I as dt,a1 as An,a2 as In,N as Tn,E as Un,G as Ot,F as Ke,k as we,V as Jt,t as ne,a3 as jn,a4 as Bn,a5 as Ht,a6 as Mn,y as _t}from"./index-CzpSlHRw.js";import{X as m,Y as h,Z as n,j as t,a1 as a,S as v,$ as b,af as Ye,k as c,P as Nn,_ as k,m as Ve,F as H,a2 as te,q as Pn,t as Ce,e as L,b as se,s as qe,I as zn,p as En,d as Qt,o as ct,N as De,n as pe,R as Dt,V as Ln,aa as Ae,r as Rn,ae as _e,ac as Kn,D as Fn,a4 as On}from"./vendor-vue-28M5UGz3.js";import{V as G}from"./VChip-B3whZF-S.js";import{V as ht}from"./VSwitch-DcxT6NgQ.js";import{V as Ze}from"./VSelect-DZBjiB3J.js";import{V as N,e as Jn,u as Hn,a as At,f as Qn,d as Gn,g as Wn}from"./VTextField-BxdS2D7S.js";import{V as gt,a as Yn}from"./VSheet-ZjkOR-Oc.js";import{V as Y,a as Ne}from"./VAlert-DaoJAibO.js";import{A as wt,z as mt,as as qn,p as Fe,at as It,f as tt,au as Zn,u as vt,s as Ue,k as Gt,n as Wt,ao as Xn,t as $n,a0 as es}from"./vendor-vuetify-95axeNJO.js";import{d as ie,b as Tt,a as ts,o as ns,k as ss}from"./dataProvider-DBZnFcYO.js";import{V as de,a as R}from"./VRow-sd4d6eNi.js";import{V as bt}from"./VContainer-BIFGURze.js";import{a as Xe}from"./vendor-utils-B_Y_1aLs.js";import{V as Se}from"./VCheckbox-tGn5q60R.js";import{V as Pe}from"./VTextarea-zDVNnlPQ.js";import{s as is,a as ls}from"./soundList-D9U-Grcp.js";import{V as os}from"./VSkeletonLoader-Bqlz0ln3.js";import{V as as}from"./VTimePicker-DvAq_vLK.js";import{V as Yt}from"./VForm-DIiMelbi.js";import{V as kt,a as yt,b as qt,c as xt}from"./VExpansionPanels-CQt43P3v.js";import{V as Zt}from"./VDataTable-Bg4qcCRf.js";import{V as Ut}from"./VCombobox-DqiaU_M6.js";import{V as jt}from"./VCheckboxBtn-BLxCsxXE.js";import{i as rs,t as us}from"./serverRotation-xQe1elLG.js";import{getVisitorId as ds}from"./visitorId-2IHCmkCy.js";import{b as Bt,c as Mt,V as cs,a as ms}from"./VAppBarTitle-C1UGCJHo.js";import{V as fs,a as fe}from"./VTable-D9zIyrqQ.js";import"./VPicker-199veasp.js";import"./VPagination-CwVL3tMR.js";const ps={name:"SettingsCard",props:{title:{type:String,required:!0},icon:{type:String,required:!0},loading:{type:Boolean,default:!1}}};function hs(s,e,o,u,i,l){return m(),h(M,{class:"settings-card rounded-lg",elevation:"2"},{default:n(()=>[t(ze,null,{prepend:n(()=>[t(g,{icon:o.icon,class:"mr-2",size:"large"},null,8,["icon"])]),default:n(()=>[t(K,{class:"text-h6"},{default:n(()=>[a(v(o.title),1)]),_:1})]),_:1}),t(j,null,{default:n(()=>[o.loading?(m(),h($e,{key:0,class:"mb-4",color:"primary",indeterminate:""})):b("",!0),Ye(s.$slots,"default",{},void 0,!0)]),_:3}),s.$slots.actions?(m(),h(ue,{key:0,class:"pa-4"},{default:n(()=>[Ye(s.$slots,"actions",{},void 0,!0)]),_:3})):b("",!0)]),_:3})}const W=Q(ps,[["render",hs],["__scopeId","data-v-cd0153ca"]]),gs=[{text:"帝高阳之苗裔兮,朕皇考曰伯庸。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"摄提贞于孟陬兮,惟庚寅吾以降。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇览揆余初度兮,肇锡余以嘉名。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"名余曰正则兮,字余曰灵均。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷吾既有此内美兮,又重之以修能。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"扈江离与辟芷兮,纫秋兰以为佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汩余若将不及兮,恐年岁之不吾与。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝搴阰之木兰兮,夕揽洲之宿莽。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"日月忽其不淹兮,春与秋其代序。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟草木之零落兮,恐美人之迟暮。(惟 通:唯)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不抚壮而弃秽兮,何不改此度?(改此度 一作:改乎此度)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"乘骐骥以驰骋兮,来吾道夫先路!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"昔三后之纯粹兮,固众芳之所在。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"杂申椒与菌桂兮,岂惟纫夫蕙茝!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"彼尧舜之耿介兮,既遵道而得路。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何桀纣之猖披兮,夫唯捷径以窘步。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟夫党人之偷乐兮,路幽昧以险隘。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"岂余身之惮殃兮,恐皇舆之败绩!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽奔走以先后兮,及前王之踵武。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"荃不查余之中情兮,反信谗而齌怒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余固知謇謇之为患兮,忍而不能舍也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"指九天以为正兮,夫唯灵修之故也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰黄昏以为期兮,羌中道而改路!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"初既与余成言兮,后悔遁而有他。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余既不难夫离别兮,伤灵修之数化。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余既滋兰之九畹兮,又树蕙之百亩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"畦留夷与揭车兮,杂杜衡与芳芷。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"冀枝叶之峻茂兮,愿俟时乎吾将刈。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽萎绝其亦何伤兮,哀众芳之芜秽。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众皆竞进以贪婪兮,凭不厌乎求索。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"羌内恕己以量人兮,各兴心而嫉妒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽驰骛以追逐兮,非余心之所急。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"老冉冉其将至兮,恐修名之不立。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝饮木兰之坠露兮,夕餐秋菊之落英。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苟余情其信姱以练要兮,长顑颔亦何伤。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"掔木根以结茝兮,贯薜荔之落蕊。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"矫菌桂以纫蕙兮,索胡绳之纚纚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"謇吾法夫前修兮,非世俗之所服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽不周于今之人兮,愿依彭咸之遗则。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"长太息以掩涕兮,哀民生之多艰。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余虽好修姱以鞿羁兮,謇朝谇而夕替。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既替余以蕙纕兮,又申之以揽茝。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"亦余心之所善兮,虽九死其犹未悔。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"怨灵修之浩荡兮,终不察夫民心。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众女嫉余之蛾眉兮,谣诼谓余以善淫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固时俗之工巧兮,偭规矩而改错。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"背绳墨以追曲兮,竞周容以为度。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忳郁邑余侘傺兮,吾独穷困乎此时也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"宁溘死以流亡兮,余不忍为此态也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鸷鸟之不群兮,自前世而固然。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何方圜之能周兮,夫孰异道而相安?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"屈心而抑志兮,忍尤而攘诟。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"伏清白以死直兮,固前圣之所厚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"悔相道之不察兮,延伫乎吾将反。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"回朕车以复路兮,及行迷之未远。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"步余马于兰皋兮,驰椒丘且焉止息。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"进不入以离尤兮,退将复修吾初服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"制芰荷以为衣兮,集芙蓉以为裳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不吾知其亦已兮,苟余情其信芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"高余冠之岌岌兮,长余佩之陆离。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"芳与泽其杂糅兮,唯昭质其犹未亏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽反顾以游目兮,将往观乎四荒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"佩缤纷其繁饰兮,芳菲菲其弥章。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"民生各有所乐兮,余独好修以为常。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽体解吾犹未变兮,岂余心之可惩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"女媭之婵媛兮,申申其詈予,曰:",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鲧婞直以亡身兮,终然夭乎羽之野。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汝何博謇而好修兮,纷独有此姱节?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"薋菉葹以盈室兮,判独离而不服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众不可户说兮,孰云察余之中情?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世并举而好朋兮,夫何茕独而不予听?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"依前圣以节中兮,喟凭心而历兹。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"济沅湘以南征兮,就重华而陈词:",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"启《九辩》与《九歌》兮,夏康娱以自纵。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不顾难以图后兮,五子用失乎家衖。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"羿淫游以佚畋兮,又好射夫封狐。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固乱流其鲜终兮,浞又贪夫厥家。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"浇身被服强圉兮,纵欲而不忍。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"日康娱而自忘兮,厥首用夫颠陨。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夏桀之常违兮,乃遂焉而逢殃。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"后辛之菹醢兮,殷宗用而不长。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汤禹俨而祗敬兮,周论道而莫差。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"举贤才而授能兮,循绳墨而不颇。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇天无私阿兮,览民德焉错辅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夫维圣哲以茂行兮,苟得用此下土。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"瞻前而顾后兮,相观民之计极。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夫孰非义而可用兮?孰非善而可服?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"阽余身而危死兮,览余初其犹未悔。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不量凿而正枘兮,固前修以菹醢。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曾歔欷余郁邑兮,哀朕时之不当。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"揽茹蕙以掩涕兮,沾余襟之浪浪。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"跪敷衽以陈辞兮,耿吾既得此中正。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"驷玉虬以椉鹥兮,溘埃风余上征。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝发轫于苍梧兮,夕余至乎县圃。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲少留此灵琐兮,日忽忽其将暮。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令羲和弭节兮,望崦嵫而勿迫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路曼曼其修远兮,吾将上下而求索。(曼曼 一作:漫漫)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"饮余马于咸池兮,总余辔乎扶桑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"折若木以拂日兮,聊逍遥以相羊。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"前望舒使先驱兮,后飞廉使奔属。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鸾皇为余先戒兮,雷师告余以未具。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令凤鸟飞腾兮,继之以日夜。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"飘风屯其相离兮,帅云霓而来御。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷总总其离合兮,斑陆离其上下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令帝阍开关兮,倚阊阖而望予。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"时暧暧其将罢兮,结幽兰而延伫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世溷浊而不分兮,好蔽美而嫉妒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝吾将济于白水兮,登阆风而绁马。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽反顾以流涕兮,哀高丘之无女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"溘吾游此春宫兮,折琼枝以继佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及荣华之未落兮,相下女之可诒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令丰隆乘云兮,求宓妃之所在。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"解佩纕以结言兮,吾令謇修以为理。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷总总其离合兮,忽纬繣其难迁。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夕归次于穷石兮,朝濯发乎洧盘。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"保厥美以骄傲兮,日康娱以淫游。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽信美而无礼兮,来违弃而改求。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览相观于四极兮,周流乎天余乃下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"望瑶台之偃蹇兮,见有娀之佚女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令鸩为媒兮,鸩告余以不好。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"雄鸠之鸣逝兮,余犹恶其佻巧。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"心犹豫而狐疑兮,欲自适而不可。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"凤皇既受诒兮,恐高辛之先我。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲远集而无所止兮,聊浮游以逍遥。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及少康之未家兮,留有虞之二姚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"理弱而媒拙兮,恐导言之不固。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世溷浊而嫉贤兮,好蔽美而称恶。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"闺中既以邃远兮,哲王又不寤。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"怀朕情而不发兮,余焉能忍而与此终古?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"索琼茅以筳篿兮,命灵氛为余占之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:两美其必合兮,孰信修而慕之?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"思九州之博大兮,岂惟是其有女?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:勉远逝而无狐疑兮,孰求美而释女?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何所独无芳草兮,尔何怀乎故宇?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世幽昧以昡曜兮,孰云察余之善恶?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"民好恶其不同兮,惟此党人其独异!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"户服艾以盈要兮,谓幽兰其不可佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览察草木其犹未得兮,岂珵美之能当?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苏粪壤以充帏兮,谓申椒其不芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲从灵氛之吉占兮,心犹豫而狐疑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"巫咸将夕降兮,怀椒糈而要之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"百神翳其备降兮,九疑缤其并迎。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇剡剡其扬灵兮,告余以吉故。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:勉升降以上下兮,求矩矱之所同。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汤禹俨而求合兮,挚咎繇而能调。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苟中情其好修兮,又何必用夫行媒?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"说操筑于傅岩兮,武丁用而不疑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吕望之鼓刀兮,遭周文而得举。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"宁戚之讴歌兮,齐桓闻以该辅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及年岁之未晏兮,时亦犹其未央。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"恐鹈鴂之先鸣兮,使夫百草为之不芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何琼佩之偃蹇兮,众薆然而蔽之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟此党人之不谅兮,恐嫉妒而折之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"时缤纷其变易兮,又何可以淹留?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"兰芷变而不芳兮,荃蕙化而为茅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何昔日之芳草兮,今直为此萧艾也?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"岂其有他故兮,莫好修之害也!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余以兰为可恃兮,羌无实而容长。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"委厥美以从俗兮,苟得列乎众芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"椒专佞以慢慆兮,樧又欲充夫佩帏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既干进而务入兮,又何芳之能祗?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固时俗之流从兮,又孰能无变化?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览椒兰其若兹兮,又况揭车与江离?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟兹佩之可贵兮,委厥美而历兹。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"芳菲菲而难亏兮,芬至今犹未沬。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"和调度以自娱兮,聊浮游而求女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及余饰之方壮兮,周流观乎上下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"灵氛既告余以吉占兮,历吉日乎吾将行。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"折琼枝以为羞兮,精琼爢以为粻。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"为余驾飞龙兮,杂瑶象以为车。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何离心之可同兮?吾将远逝以自疏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"邅吾道夫昆仑兮,路修远以周流。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"扬云霓之晻蔼兮,鸣玉鸾之啾啾。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝发轫于天津兮,夕余至乎西极。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"凤皇翼其承旗兮,高翱翔之翼翼。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽吾行此流沙兮,遵赤水而容与。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"麾蛟龙使梁津兮,诏西皇使涉予。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路修远以多艰兮,腾众车使径待。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路不周以左转兮,指西海以为期。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"屯余车其千乘兮,齐玉轪而并驰。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"驾八龙之婉婉兮,载云旗之委蛇。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"抑志而弭节兮,神高驰之邈邈。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"奏《九歌》而舞《韶》兮,聊假日以媮乐。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"陟升皇之赫戏兮,忽临睨夫旧乡。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"仆夫悲余马怀兮,蜷局顾而不行。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"乱曰:已矣哉!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"国无人莫我知兮,又何怀乎故都!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既莫足与为美政兮,吾将从彭咸之所居!",author:"离骚",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"}],Nt={quotes:gs};let ot=null;async function ws(){return ot||(ot=(await Ft(async()=>{const{default:s}=await import("./core-Cy2g3AD-.js").then(e=>e.c);return{default:s}},[],import.meta.url)).default),ot}const Pt={text:"点击此处可以查看 Classworks 用户群里沙雕群友们的发言",author:"点击后会复制当前句子到剪贴板中"},zt={main:{delay:50,deleteSpeed:100},source:{delay:10,deleteSpeed:10,cursor:""}},vs={name:"EchoChamberCard",components:{SettingsCard:W},data:()=>({typewriter:null,sourceWriter:null,currentQuote:Pt,hasClicked:!1}),mounted(){this.initTypewriters()},beforeUnmount(){[this.typewriter,this.sourceWriter].forEach(s=>s==null?void 0:s.stop())},methods:{async initTypewriters(){const s=await ws();this.typewriter=new s(this.$refs.typewriter,zt.main),this.sourceWriter=new s(this.$refs.sourceWriter,zt.source),this.typeQuote(Pt)},typeQuote(s){this.typewriter.deleteAll(30).typeString(s.text).start(),s.author&&this.sourceWriter.deleteAll(20).typeString(s.author).start()},async handleClick(){this.hasClicked||(this.hasClicked=!0),await this.copyToClipboard(),this.currentQuote=this.getRandomQuote(),this.typeQuote(this.currentQuote)},getRandomQuote(){return Nt.quotes[Math.floor(Math.random()*Nt.quotes.length)]},async copyToClipboard(){if(!this.currentQuote)return;const{text:s,author:e,contributor:o,link:u}=this.currentQuote,i=[s,e&&`作者:${e}`,o&&`贡献者:${o}`,(u||o)&&`来源:${u||`https://github.com/${o}`}`].filter(Boolean);try{await navigator.clipboard.writeText(i.join(` +import{_ as Rt,V as Sn}from"./MessageLog-CZsTVP4i.js";import{_ as Q,W as ze,c as K,f as g,d as j,j as $e,l as ue,e as M,o as et,C as Kt,x as Ft,X as Te,n as y,s as re,Y as Cn,r as z,h as p,p as O,q as D,i as U,z as ft,Z as Re,w as pt,A as ut,g as Z,$ as Vn,R as _n,a0 as Vt,H as Dn,I as dt,a1 as An,a2 as In,N as Tn,E as Un,G as Ot,F as Ke,k as we,V as Jt,t as ne,a3 as jn,a4 as Bn,a5 as Ht,a6 as Mn,y as _t}from"./index-DGIAsv4W.js";import{X as m,Y as h,Z as n,j as t,a1 as a,S as v,$ as b,af as Ye,k as c,P as Nn,_ as k,m as Ve,F as H,a2 as te,q as Pn,t as Ce,e as L,b as se,s as qe,I as zn,p as En,d as Qt,o as ct,N as De,n as pe,R as Dt,V as Ln,aa as Ae,r as Rn,ae as _e,ac as Kn,D as Fn,a4 as On}from"./vendor-vue-BiQC5iF7.js";import{V as G}from"./VChip-mRzIPuM0.js";import{V as ht}from"./VSwitch-k6hfPfa2.js";import{V as Ze}from"./VSelect-oxA0t9CG.js";import{V as N,e as Jn,u as Hn,a as At,f as Qn,d as Gn,g as Wn}from"./VTextField-BurlcggD.js";import{V as gt,a as Yn}from"./VSheet-BBnSA_kJ.js";import{V as Y,a as Ne}from"./VAlert-BZ4-f-hy.js";import{A as wt,z as mt,as as qn,p as Fe,at as It,f as tt,au as Zn,u as vt,s as Ue,k as Gt,n as Wt,ao as Xn,t as $n,a0 as es}from"./vendor-vuetify-DsKlzgKp.js";import{d as ie,b as Tt,a as ts,o as ns,k as ss}from"./dataProvider-GWPC-0Vt.js";import{V as de,a as R}from"./VRow-Cjhiymuu.js";import{V as bt}from"./VContainer-DZyPrcqa.js";import{a as Xe}from"./vendor-utils-DwALrQNc.js";import{V as Se}from"./VCheckbox-BRi_fHJs.js";import{V as Pe}from"./VTextarea-vGWmTJww.js";import{s as is,a as ls}from"./soundList-D9U-Grcp.js";import{V as os}from"./VSkeletonLoader-DwE_iqTb.js";import{V as as}from"./VTimePicker-BApLLZ8X.js";import{V as Yt}from"./VForm-ObW_L7SS.js";import{V as kt,a as yt,b as qt,c as xt}from"./VExpansionPanels-BDI8gHu5.js";import{V as Zt}from"./VDataTable-DmTCHg4b.js";import{V as Ut}from"./VCombobox-BGa7K58w.js";import{V as jt}from"./VCheckboxBtn-BKcSogH0.js";import{i as rs,t as us}from"./serverRotation-BtcwvdZJ.js";import{getVisitorId as ds}from"./visitorId-D_nwlNzA.js";import{b as Bt,c as Mt,V as cs,a as ms}from"./VAppBarTitle-DheyIZnb.js";import{V as fs,a as fe}from"./VTable-Cq72iBVc.js";import"./VPicker-SM18M-iq.js";import"./VPagination-DLzhjdaP.js";const ps={name:"SettingsCard",props:{title:{type:String,required:!0},icon:{type:String,required:!0},loading:{type:Boolean,default:!1}}};function hs(s,e,o,u,i,l){return m(),h(M,{class:"settings-card rounded-lg",elevation:"2"},{default:n(()=>[t(ze,null,{prepend:n(()=>[t(g,{icon:o.icon,class:"mr-2",size:"large"},null,8,["icon"])]),default:n(()=>[t(K,{class:"text-h6"},{default:n(()=>[a(v(o.title),1)]),_:1})]),_:1}),t(j,null,{default:n(()=>[o.loading?(m(),h($e,{key:0,class:"mb-4",color:"primary",indeterminate:""})):b("",!0),Ye(s.$slots,"default",{},void 0,!0)]),_:3}),s.$slots.actions?(m(),h(ue,{key:0,class:"pa-4"},{default:n(()=>[Ye(s.$slots,"actions",{},void 0,!0)]),_:3})):b("",!0)]),_:3})}const W=Q(ps,[["render",hs],["__scopeId","data-v-cd0153ca"]]),gs=[{text:"帝高阳之苗裔兮,朕皇考曰伯庸。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"摄提贞于孟陬兮,惟庚寅吾以降。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇览揆余初度兮,肇锡余以嘉名。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"名余曰正则兮,字余曰灵均。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷吾既有此内美兮,又重之以修能。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"扈江离与辟芷兮,纫秋兰以为佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汩余若将不及兮,恐年岁之不吾与。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝搴阰之木兰兮,夕揽洲之宿莽。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"日月忽其不淹兮,春与秋其代序。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟草木之零落兮,恐美人之迟暮。(惟 通:唯)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不抚壮而弃秽兮,何不改此度?(改此度 一作:改乎此度)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"乘骐骥以驰骋兮,来吾道夫先路!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"昔三后之纯粹兮,固众芳之所在。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"杂申椒与菌桂兮,岂惟纫夫蕙茝!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"彼尧舜之耿介兮,既遵道而得路。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何桀纣之猖披兮,夫唯捷径以窘步。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟夫党人之偷乐兮,路幽昧以险隘。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"岂余身之惮殃兮,恐皇舆之败绩!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽奔走以先后兮,及前王之踵武。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"荃不查余之中情兮,反信谗而齌怒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余固知謇謇之为患兮,忍而不能舍也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"指九天以为正兮,夫唯灵修之故也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰黄昏以为期兮,羌中道而改路!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"初既与余成言兮,后悔遁而有他。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余既不难夫离别兮,伤灵修之数化。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余既滋兰之九畹兮,又树蕙之百亩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"畦留夷与揭车兮,杂杜衡与芳芷。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"冀枝叶之峻茂兮,愿俟时乎吾将刈。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽萎绝其亦何伤兮,哀众芳之芜秽。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众皆竞进以贪婪兮,凭不厌乎求索。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"羌内恕己以量人兮,各兴心而嫉妒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽驰骛以追逐兮,非余心之所急。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"老冉冉其将至兮,恐修名之不立。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝饮木兰之坠露兮,夕餐秋菊之落英。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苟余情其信姱以练要兮,长顑颔亦何伤。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"掔木根以结茝兮,贯薜荔之落蕊。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"矫菌桂以纫蕙兮,索胡绳之纚纚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"謇吾法夫前修兮,非世俗之所服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽不周于今之人兮,愿依彭咸之遗则。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"长太息以掩涕兮,哀民生之多艰。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余虽好修姱以鞿羁兮,謇朝谇而夕替。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既替余以蕙纕兮,又申之以揽茝。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"亦余心之所善兮,虽九死其犹未悔。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"怨灵修之浩荡兮,终不察夫民心。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众女嫉余之蛾眉兮,谣诼谓余以善淫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固时俗之工巧兮,偭规矩而改错。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"背绳墨以追曲兮,竞周容以为度。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忳郁邑余侘傺兮,吾独穷困乎此时也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"宁溘死以流亡兮,余不忍为此态也。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鸷鸟之不群兮,自前世而固然。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何方圜之能周兮,夫孰异道而相安?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"屈心而抑志兮,忍尤而攘诟。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"伏清白以死直兮,固前圣之所厚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"悔相道之不察兮,延伫乎吾将反。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"回朕车以复路兮,及行迷之未远。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"步余马于兰皋兮,驰椒丘且焉止息。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"进不入以离尤兮,退将复修吾初服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"制芰荷以为衣兮,集芙蓉以为裳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不吾知其亦已兮,苟余情其信芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"高余冠之岌岌兮,长余佩之陆离。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"芳与泽其杂糅兮,唯昭质其犹未亏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽反顾以游目兮,将往观乎四荒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"佩缤纷其繁饰兮,芳菲菲其弥章。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"民生各有所乐兮,余独好修以为常。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽体解吾犹未变兮,岂余心之可惩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"女媭之婵媛兮,申申其詈予,曰:",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鲧婞直以亡身兮,终然夭乎羽之野。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汝何博謇而好修兮,纷独有此姱节?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"薋菉葹以盈室兮,判独离而不服。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"众不可户说兮,孰云察余之中情?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世并举而好朋兮,夫何茕独而不予听?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"依前圣以节中兮,喟凭心而历兹。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"济沅湘以南征兮,就重华而陈词:",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"启《九辩》与《九歌》兮,夏康娱以自纵。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不顾难以图后兮,五子用失乎家衖。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"羿淫游以佚畋兮,又好射夫封狐。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固乱流其鲜终兮,浞又贪夫厥家。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"浇身被服强圉兮,纵欲而不忍。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"日康娱而自忘兮,厥首用夫颠陨。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夏桀之常违兮,乃遂焉而逢殃。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"后辛之菹醢兮,殷宗用而不长。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汤禹俨而祗敬兮,周论道而莫差。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"举贤才而授能兮,循绳墨而不颇。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇天无私阿兮,览民德焉错辅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夫维圣哲以茂行兮,苟得用此下土。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"瞻前而顾后兮,相观民之计极。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夫孰非义而可用兮?孰非善而可服?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"阽余身而危死兮,览余初其犹未悔。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"不量凿而正枘兮,固前修以菹醢。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曾歔欷余郁邑兮,哀朕时之不当。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"揽茹蕙以掩涕兮,沾余襟之浪浪。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"跪敷衽以陈辞兮,耿吾既得此中正。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"驷玉虬以椉鹥兮,溘埃风余上征。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝发轫于苍梧兮,夕余至乎县圃。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲少留此灵琐兮,日忽忽其将暮。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令羲和弭节兮,望崦嵫而勿迫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路曼曼其修远兮,吾将上下而求索。(曼曼 一作:漫漫)",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"饮余马于咸池兮,总余辔乎扶桑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"折若木以拂日兮,聊逍遥以相羊。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"前望舒使先驱兮,后飞廉使奔属。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"鸾皇为余先戒兮,雷师告余以未具。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令凤鸟飞腾兮,继之以日夜。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"飘风屯其相离兮,帅云霓而来御。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷总总其离合兮,斑陆离其上下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令帝阍开关兮,倚阊阖而望予。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"时暧暧其将罢兮,结幽兰而延伫。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世溷浊而不分兮,好蔽美而嫉妒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝吾将济于白水兮,登阆风而绁马。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽反顾以流涕兮,哀高丘之无女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"溘吾游此春宫兮,折琼枝以继佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及荣华之未落兮,相下女之可诒。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令丰隆乘云兮,求宓妃之所在。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"解佩纕以结言兮,吾令謇修以为理。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"纷总总其离合兮,忽纬繣其难迁。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"夕归次于穷石兮,朝濯发乎洧盘。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"保厥美以骄傲兮,日康娱以淫游。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"虽信美而无礼兮,来违弃而改求。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览相观于四极兮,周流乎天余乃下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"望瑶台之偃蹇兮,见有娀之佚女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吾令鸩为媒兮,鸩告余以不好。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"雄鸠之鸣逝兮,余犹恶其佻巧。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"心犹豫而狐疑兮,欲自适而不可。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"凤皇既受诒兮,恐高辛之先我。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲远集而无所止兮,聊浮游以逍遥。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及少康之未家兮,留有虞之二姚。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"理弱而媒拙兮,恐导言之不固。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世溷浊而嫉贤兮,好蔽美而称恶。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"闺中既以邃远兮,哲王又不寤。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"怀朕情而不发兮,余焉能忍而与此终古?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"索琼茅以筳篿兮,命灵氛为余占之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:两美其必合兮,孰信修而慕之?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"思九州之博大兮,岂惟是其有女?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:勉远逝而无狐疑兮,孰求美而释女?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何所独无芳草兮,尔何怀乎故宇?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"世幽昧以昡曜兮,孰云察余之善恶?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"民好恶其不同兮,惟此党人其独异!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"户服艾以盈要兮,谓幽兰其不可佩。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览察草木其犹未得兮,岂珵美之能当?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苏粪壤以充帏兮,谓申椒其不芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"欲从灵氛之吉占兮,心犹豫而狐疑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"巫咸将夕降兮,怀椒糈而要之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"百神翳其备降兮,九疑缤其并迎。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"皇剡剡其扬灵兮,告余以吉故。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"曰:勉升降以上下兮,求矩矱之所同。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"汤禹俨而求合兮,挚咎繇而能调。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"苟中情其好修兮,又何必用夫行媒?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"说操筑于傅岩兮,武丁用而不疑。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"吕望之鼓刀兮,遭周文而得举。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"宁戚之讴歌兮,齐桓闻以该辅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及年岁之未晏兮,时亦犹其未央。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"恐鹈鴂之先鸣兮,使夫百草为之不芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何琼佩之偃蹇兮,众薆然而蔽之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟此党人之不谅兮,恐嫉妒而折之。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"时缤纷其变易兮,又何可以淹留?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"兰芷变而不芳兮,荃蕙化而为茅。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何昔日之芳草兮,今直为此萧艾也?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"岂其有他故兮,莫好修之害也!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"余以兰为可恃兮,羌无实而容长。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"委厥美以从俗兮,苟得列乎众芳。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"椒专佞以慢慆兮,樧又欲充夫佩帏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既干进而务入兮,又何芳之能祗?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"固时俗之流从兮,又孰能无变化?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"览椒兰其若兹兮,又况揭车与江离?",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"惟兹佩之可贵兮,委厥美而历兹。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"芳菲菲而难亏兮,芬至今犹未沬。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"和调度以自娱兮,聊浮游而求女。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"及余饰之方壮兮,周流观乎上下。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"灵氛既告余以吉占兮,历吉日乎吾将行。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"折琼枝以为羞兮,精琼爢以为粻。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"为余驾飞龙兮,杂瑶象以为车。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"何离心之可同兮?吾将远逝以自疏。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"邅吾道夫昆仑兮,路修远以周流。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"扬云霓之晻蔼兮,鸣玉鸾之啾啾。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"朝发轫于天津兮,夕余至乎西极。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"凤皇翼其承旗兮,高翱翔之翼翼。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"忽吾行此流沙兮,遵赤水而容与。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"麾蛟龙使梁津兮,诏西皇使涉予。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路修远以多艰兮,腾众车使径待。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"路不周以左转兮,指西海以为期。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"屯余车其千乘兮,齐玉轪而并驰。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"驾八龙之婉婉兮,载云旗之委蛇。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"抑志而弭节兮,神高驰之邈邈。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"奏《九歌》而舞《韶》兮,聊假日以媮乐。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"陟升皇之赫戏兮,忽临睨夫旧乡。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"仆夫悲余马怀兮,蜷局顾而不行。",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"乱曰:已矣哉!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"国无人莫我知兮,又何怀乎故都!",author:"屈原",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"},{text:"既莫足与为美政兮,吾将从彭咸之所居!",author:"离骚",contributor:"Sunwuyuan",link:"https://www.gushiwen.cn/shiwenv.aspx?id=f5714bcd33e3"}],Nt={quotes:gs};let ot=null;async function ws(){return ot||(ot=(await Ft(async()=>{const{default:s}=await import("./core-Cy2g3AD-.js").then(e=>e.c);return{default:s}},[],import.meta.url)).default),ot}const Pt={text:"点击此处可以查看 Classworks 用户群里沙雕群友们的发言",author:"点击后会复制当前句子到剪贴板中"},zt={main:{delay:50,deleteSpeed:100},source:{delay:10,deleteSpeed:10,cursor:""}},vs={name:"EchoChamberCard",components:{SettingsCard:W},data:()=>({typewriter:null,sourceWriter:null,currentQuote:Pt,hasClicked:!1}),mounted(){this.initTypewriters()},beforeUnmount(){[this.typewriter,this.sourceWriter].forEach(s=>s==null?void 0:s.stop())},methods:{async initTypewriters(){const s=await ws();this.typewriter=new s(this.$refs.typewriter,zt.main),this.sourceWriter=new s(this.$refs.sourceWriter,zt.source),this.typeQuote(Pt)},typeQuote(s){this.typewriter.deleteAll(30).typeString(s.text).start(),s.author&&this.sourceWriter.deleteAll(20).typeString(s.author).start()},async handleClick(){this.hasClicked||(this.hasClicked=!0),await this.copyToClipboard(),this.currentQuote=this.getRandomQuote(),this.typeQuote(this.currentQuote)},getRandomQuote(){return Nt.quotes[Math.floor(Math.random()*Nt.quotes.length)]},async copyToClipboard(){if(!this.currentQuote)return;const{text:s,author:e,contributor:o,link:u}=this.currentQuote,i=[s,e&&`作者:${e}`,o&&`贡献者:${o}`,(u||o)&&`来源:${u||`https://github.com/${o}`}`].filter(Boolean);try{await navigator.clipboard.writeText(i.join(` `))}catch(l){console.error("复制失败:",l)}}}},bs={ref:"typewriter",class:"typewriter-text"},ks={ref:"sourceWriter",class:"source-text"};function ys(s,e,o,u,i,l){const d=W;return m(),h(d,{border:"",icon:"mdi-thought-bubble",title:"回声洞",onClick:l.handleClick},{default:n(()=>[t(j,null,{default:n(()=>[c("div",bs,null,512),c("div",ks,null,512)]),_:1}),t(Nn,{name:"fade"},{default:n(()=>{var f;return[(f=s.currentQuote)!=null&&f.contributor?(m(),h(G,{key:0,class:"contributor"},{default:n(()=>[t(et,{start:""},{default:n(()=>[t(Kt,{src:`https://github.com/${s.currentQuote.contributor}.png`},null,8,["src"])]),_:1}),a(" "+v(s.currentQuote.contributor),1)]),_:1})):b("",!0)]}),_:1})]),_:1},8,["onClick"])}const Xt=Q(vs,[["render",ys],["__scopeId","data-v-c75e2e66"]]),xs={name:"SettingItem",props:{settingKey:{type:String,required:!0},icon:{type:String,default:null},disabled:{type:Boolean,default:!1},title:{type:String,default:null},description:{type:String,default:null}},data(){return{localValue:null,definition:null,type:null,selectOptions:[],hasOptions:!1,minValue:0,maxValue:100,stepValue:1,showSnackbar:!1,snackbarText:"",fontFamilies:[{title:"Arial",value:"Arial, sans-serif"},{title:"Calibri",value:"Calibri, sans-serif"},{title:"Cambria",value:"Cambria, serif"},{title:"Consolas",value:"Consolas, monospace"},{title:"Courier New",value:"Courier New, monospace"},{title:"Georgia",value:"Georgia, serif"},{title:"Helvetica",value:"Helvetica, sans-serif"},{title:"Segoe UI",value:"Segoe UI, sans-serif"},{title:"Times New Roman",value:"Times New Roman, serif"},{title:"Trebuchet MS",value:"Trebuchet MS, sans-serif"},{title:"Verdana",value:"Verdana, sans-serif"},{title:"Monospace",value:"monospace"},{title:"Sans-serif",value:"sans-serif"},{title:"Serif",value:"serif"}],displayValueMappings:{"display.emptySubjectDisplay":{card:"卡片",button:"按钮"},"theme.mode":{light:"浅色",dark:"深色"},"server.provider":{classworkscloud:"Classworks云端存储","kv-local":"KV本地存储","kv-server":"KV远程服务器"}},defaultIcons:{boolean:"mdi-toggle-switch-outline",number:"mdi-numeric",string:"mdi-form-textbox"}}},computed:{displayTitle(){if(this.title)return this.title;if(this.definition&&this.definition.description)return this.definition.description;const s=this.settingKey.split(".");return s[s.length-1]},displayDescription(){return this.description?this.description:this.settingKey},isFontFamily(){return this.settingKey.toLowerCase().includes("fontfamily")||this.settingKey.toLowerCase().includes("font.family")},isDefaultValue(){return this.definition?typeof this.localValue=="object"&&this.localValue!==null?JSON.stringify(this.localValue)===JSON.stringify(this.definition.default):this.localValue===this.definition.default:!0},settingIcon(){return this.icon?this.icon:this.definition&&this.definition.icon?this.definition.icon:this.defaultIcons[this.type]||"mdi-cog-outline"}},created(){this.loadSetting()},methods:{loadSetting(){if(this.definition=Cn(this.settingKey),!this.definition){console.error(`未找到设置项定义: ${this.settingKey}`);return}if(this.type=this.definition.type,this.localValue=y(this.settingKey),this.type==="string"){if(this.isFontFamily)this.selectOptions=this.fontFamilies,this.hasOptions=!0;else if(this.settingKey in this.displayValueMappings){const s=this.displayValueMappings[this.settingKey];this.selectOptions=Object.entries(s).map(([e,o])=>({title:o,value:e})),this.hasOptions=!0}else if(this.definition.validate){const e=this.definition.validate.toString().match(/\[(.*?)\]/);if(e){const u=e[1].split(",").map(i=>{const l=i.trim().replace(/['"]/g,"");return{title:this.getDisplayValue(l)||l,value:l}});u.length>0&&(this.selectOptions=u,this.hasOptions=!0)}}}if(this.type==="number"&&this.definition.validate){const s=this.definition.validate.toString(),e=s.match(/value\s*>=\s*(\d+)/);e&&(this.minValue=Number(e[1]));const o=s.match(/value\s*<=\s*(\d+)/);o&&(this.maxValue=Number(o[1]));const u=this.maxValue-this.minValue;u>100?this.stepValue=10:u>20?this.stepValue=5:u>10?this.stepValue=2:this.stepValue=1}},getDisplayValue(s){return this.settingKey in this.displayValueMappings&&this.displayValueMappings[this.settingKey][s]||s},updateSetting(s){let e=s;this.type==="boolean"?e=!!s:this.type==="number"&&(e=Number(s),ethis.maxValue&&(e=this.maxValue)),re(this.settingKey,e)?this.$emit("update",this.settingKey,e):(this.localValue=y(this.settingKey),this.$emit("error",this.settingKey))},adjustValue(s){if(this.type!=="number")return;const e=this.localValue+s;e>=this.minValue&&e<=this.maxValue&&(this.localValue=e,this.updateSetting(e))},copySettingId(){navigator.clipboard.writeText(this.settingKey).then(()=>{this.showSnackbarMessage("设置ID已复制到剪贴板")}).catch(s=>{console.error("复制失败:",s)})},copySettingValue(){let s="";typeof this.localValue=="object"&&this.localValue!==null?s=JSON.stringify(this.localValue):s=String(this.localValue),navigator.clipboard.writeText(s).then(()=>{this.showSnackbarMessage("设置值已复制到剪贴板")}).catch(e=>{console.error("复制失败:",e)})},resetToDefault(){this.definition&&(Te(this.settingKey),this.localValue=y(this.settingKey),this.showSnackbarMessage("已重置为默认值"),this.$emit("update",this.settingKey,this.localValue))},showSnackbarMessage(s){this.snackbarText=s,this.showSnackbar=!0}}},Ss={class:"d-flex flex-column flex-sm-row align-center"},Cs={key:0,class:"me-2"},Vs={key:2,class:"d-flex align-center"},_s={key:0,class:"px-4 pb-2 pt-0"};function Ds(s,e,o,u,i,l){return m(),k(H,null,[t(D,{disabled:o.disabled,class:"setting-item"},{prepend:n(()=>[t(g,{icon:l.settingIcon},null,8,["icon"])]),append:n(()=>[c("div",Ss,[i.type!=="string"||i.hasOptions?(m(),k("div",Cs,[i.type==="boolean"?(m(),h(ht,{key:0,modelValue:i.localValue,"onUpdate:modelValue":[e[0]||(e[0]=d=>i.localValue=d),l.updateSetting],disabled:o.disabled,density:"comfortable","hide-details":""},null,8,["modelValue","disabled","onUpdate:modelValue"])):i.type==="string"&&i.hasOptions?(m(),h(Ze,{key:1,modelValue:i.localValue,"onUpdate:modelValue":[e[1]||(e[1]=d=>i.localValue=d),l.updateSetting],disabled:o.disabled,items:i.selectOptions,"bg-color":"surface",class:"setting-select",density:"compact","hide-details":"","item-title":"title","item-value":"value",variant:"outlined"},null,8,["modelValue","disabled","items","onUpdate:modelValue"])):i.type==="number"?(m(),k("div",Vs,[t(p,{disabled:o.disabled||i.localValue<=i.minValue,icon:"mdi-minus",size:"small",variant:"text",onClick:e[2]||(e[2]=d=>l.adjustValue(-i.stepValue))},null,8,["disabled"]),t(N,{modelValue:i.localValue,"onUpdate:modelValue":[e[3]||(e[3]=d=>i.localValue=d),l.updateSetting],modelModifiers:{number:!0},disabled:o.disabled,max:i.maxValue,min:i.minValue,step:i.stepValue,"bg-color":"surface",class:"mx-2 setting-number-field",density:"compact","hide-details":"",style:{width:"80px"},type:"number",variant:"outlined"},null,8,["modelValue","disabled","max","min","step","onUpdate:modelValue"]),t(p,{disabled:o.disabled||i.localValue>=i.maxValue,icon:"mdi-plus",size:"small",variant:"text",onClick:e[4]||(e[4]=d=>l.adjustValue(i.stepValue))},null,8,["disabled"])])):b("",!0)])):b("",!0),t(gt,{location:"bottom"},{activator:n(({props:d})=>[t(p,Ve({disabled:o.disabled,class:"ml-2",icon:"mdi-dots-vertical",size:"small"},d,{variant:"text"}),null,16,["disabled"])]),default:n(()=>[t(O,{density:"compact"},{default:n(()=>[t(D,{onClick:l.copySettingId},{prepend:n(()=>[t(g,{icon:"mdi-key",size:"small"})]),default:n(()=>[t(z,null,{default:n(()=>[...e[7]||(e[7]=[a("复制设置ID",-1)])]),_:1})]),_:1},8,["onClick"]),t(D,{onClick:l.copySettingValue},{prepend:n(()=>[t(g,{icon:"mdi-content-copy",size:"small"})]),default:n(()=>[t(z,null,{default:n(()=>[...e[8]||(e[8]=[a("复制设置值",-1)])]),_:1})]),_:1},8,["onClick"]),t(U),t(D,{disabled:l.isDefaultValue,onClick:l.resetToDefault},{prepend:n(()=>[t(g,{icon:"mdi-restore",size:"small"})]),default:n(()=>[t(z,null,{default:n(()=>[...e[9]||(e[9]=[a("重置为默认值",-1)])]),_:1})]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})])]),default:n(()=>[t(z,{class:"text-wrap"},{default:n(()=>[a(v(l.displayTitle),1)]),_:1})]),_:1},8,["disabled"]),i.type==="string"&&!i.hasOptions?(m(),k("div",_s,[t(N,{modelValue:i.localValue,"onUpdate:modelValue":[e[5]||(e[5]=d=>i.localValue=d),l.updateSetting],disabled:o.disabled,"bg-color":"surface",class:"setting-text-field mt-1",density:"compact","hide-details":"",variant:"outlined"},null,8,["modelValue","disabled","onUpdate:modelValue"])])):b("",!0),t(ft,{modelValue:i.showSnackbar,"onUpdate:modelValue":e[6]||(e[6]=d=>i.showSnackbar=d),timeout:2e3,color:"success",location:"top"},{default:n(()=>[a(v(i.snackbarText),1)]),_:1},8,["modelValue"])],64)}const ve=Q(xs,[["render",Ds],["__scopeId","data-v-14c3ef9d"]]),As={name:"SettingsExplorer",components:{SettingItem:ve},data(){return{searchQuery:"",currentSettings:{},unwatchFunction:null}},computed:{isDeveloperMode(){return y("developer.enabled")},allSettings(){var e;const s=[];for(const[o,u]of Object.entries(ut))this.searchQuery&&!o.toLowerCase().includes(this.searchQuery.toLowerCase())&&!((e=u.description)!=null&&e.toLowerCase().includes(this.searchQuery.toLowerCase()))||s.push({key:o,...u});return s},formattedSettings(){return JSON.stringify(this.currentSettings,null,2)}},created(){this.updateCurrentSettings(),this.unwatchFunction=pt(()=>{this.updateCurrentSettings()})},beforeUnmount(){this.unwatchFunction&&this.unwatchFunction()},methods:{updateCurrentSettings(){this.currentSettings=Re()},onSettingUpdate(s,e){this.$emit("update",s,e),this.updateCurrentSettings()},onSettingError(s){this.$emit("error",s)},copySettingsToClipboard(){navigator.clipboard.writeText(JSON.stringify(this.currentSettings)).then(()=>{this.$emit("message",{type:"success",text:"设置已复制到剪贴板"})}).catch(s=>{console.error("复制到剪贴板失败:",s),this.$emit("message",{type:"error",text:"复制到剪贴板失败"})})}}},Is={class:"settings-explorer"},Ts={class:"settings-json"};function Us(s,e,o,u,i,l){const d=ve;return m(),k("div",Is,[c("div",null,[t(N,{modelValue:i.searchQuery,"onUpdate:modelValue":e[0]||(e[0]=f=>i.searchQuery=f),class:"mb-4",clearable:"",density:"comfortable",label:"搜索设置","prepend-inner-icon":"mdi-magnify",variant:"outlined"},null,8,["modelValue"]),t(O,null,{default:n(()=>[(m(!0),k(H,null,te(l.allSettings,f=>(m(),k("div",{key:f.key},[(m(),h(d,{key:f.key,disabled:f.requireDeveloper&&!l.isDeveloperMode,"setting-key":f.key,onError:l.onSettingError,onUpdate:l.onSettingUpdate},null,8,["disabled","setting-key","onError","onUpdate"])),t(U,{class:"my-2"})]))),128))]),_:1}),t(M,{border:""},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[...e[1]||(e[1]=[a(" 当前配置 ",-1)])]),_:1}),t(j,null,{default:n(()=>[c("pre",Ts,v(l.formattedSettings),1)]),_:1}),t(ue,null,{default:n(()=>[t(Z),t(p,{onClick:l.copySettingsToClipboard},{default:n(()=>[e[3]||(e[3]=a(" 复制到剪贴板 ",-1)),t(g,{right:""},{default:n(()=>[...e[2]||(e[2]=[a(" mdi-content-copy ",-1)])]),_:1})]),_:1},8,["onClick"])]),_:1})]),_:1})])])}const $t=Q(As,[["render",Us],["__scopeId","data-v-9750a84f"]]),St=Symbol.for("vuetify:v-slider");function js(s,e,o){const u=o==="vertical",i=e.getBoundingClientRect(),l="touches"in s?s.touches[0]:s;return u?l.clientY-(i.top+i.height/2):l.clientX-(i.left+i.width/2)}function Bs(s,e){return"touches"in s&&s.touches.length?s.touches[0][e]:"changedTouches"in s&&s.changedTouches.length?s.changedTouches[0][e]:s[e]}const Ms=Fe({disabled:{type:Boolean,default:null},error:Boolean,readonly:{type:Boolean,default:null},max:{type:[Number,String],default:100},min:{type:[Number,String],default:0},step:{type:[Number,String],default:0},thumbColor:String,thumbLabel:{type:[Boolean,String],default:void 0,validator:s=>typeof s=="boolean"||s==="always"||s==="hover"},thumbSize:{type:[Number,String],default:20},showTicks:{type:[Boolean,String],default:!1,validator:s=>typeof s=="boolean"||s==="always"},ticks:{type:[Array,Object]},tickSize:{type:[Number,String],default:2},color:String,trackColor:String,trackFillColor:String,trackSize:{type:[Number,String],default:4},direction:{type:String,default:"horizontal",validator:s=>["vertical","horizontal"].includes(s)},reverse:Boolean,noKeyboard:Boolean,..._n(),...Vn({elevation:2}),ripple:{type:Boolean,default:!0}},"Slider"),Ns=s=>{const e=L(()=>parseFloat(s.min)),o=L(()=>parseFloat(s.max)),u=L(()=>Number(s.step)>0?parseFloat(s.step):0),i=L(()=>Math.max(It(u.value),It(e.value)));function l(d){if(d=parseFloat(d),u.value<=0)return d;const f=mt(d,e.value,o.value),r=e.value%u.value;let w=Math.round((f-r)/u.value)*u.value+r;return f>w&&w+u.value>o.value&&(w=o.value),parseFloat(Math.min(w,o.value).toFixed(i.value))}return{min:e,max:o,step:u,decimals:i,roundValue:l}},Ps=s=>{let{props:e,steps:o,onSliderStart:u,onSliderMove:i,onSliderEnd:l,getActiveThumb:d}=s;const f=Jn(e),{isRtl:r}=wt(),w=Ce(()=>e.reverse),x=L(()=>e.direction==="vertical"),I=L(()=>x.value!==w.value),{min:F,max:$,step:J,decimals:he,roundValue:ae}=o,ce=L(()=>parseInt(e.thumbSize,10)),le=L(()=>parseInt(e.tickSize,10)),oe=L(()=>parseInt(e.trackSize,10)),C=L(()=>($.value-F.value)/J.value),V=L(()=>e.error||f.isDisabled.value?void 0:e.thumbColor??e.color),T=L(()=>e.error||f.isDisabled.value?void 0:e.thumbColor),_=L(()=>e.error||f.isDisabled.value?void 0:e.trackColor??e.color),E=L(()=>e.error||f.isDisabled.value?void 0:e.trackFillColor??e.color),q=qe(!1),P=qe(0),ee=se(),A=se();function X(S){var Ct;const B=(Ct=ee.value)==null?void 0:Ct.$el;if(!B)return;const me=e.direction==="vertical",Me=me?"top":"left",Qe=me?"height":"width",Ge=me?"clientY":"clientX",{[Me]:We,[Qe]:yn}=B.getBoundingClientRect(),xn=Bs(S,Ge);let lt=mt((xn-We-P.value)/yn)||0;return(me?I.value:I.value!==r.value)&&(lt=1-lt),ae(F.value+lt*($.value-F.value))}const be=S=>{const B=X(S);B!=null&&l({value:B}),q.value=!1,P.value=0},ge=S=>{const B=X(S);A.value=d(S),A.value&&(q.value=!0,A.value.contains(S.target)?P.value=js(S,A.value,e.direction):(P.value=0,B!=null&&i({value:B})),B!=null&&u({value:B}),zn(()=>{var me;return(me=A.value)==null?void 0:me.focus()}))},ke={passive:!0,capture:!0};function ye(S){const B=X(S);B!=null&&i({value:B})}function je(S){S.stopPropagation(),S.preventDefault(),be(S),window.removeEventListener("mousemove",ye,ke),window.removeEventListener("mouseup",je)}function Ie(S){var B;be(S),window.removeEventListener("touchmove",ye,ke),(B=S.target)==null||B.removeEventListener("touchend",Ie)}function Be(S){var B;ge(S),window.addEventListener("touchmove",ye,ke),(B=S.target)==null||B.addEventListener("touchend",Ie,{passive:!1})}function Ee(S){S.button===0&&(S.preventDefault(),ge(S),window.addEventListener("mousemove",ye,ke),window.addEventListener("mouseup",je,{passive:!1}))}Pn(()=>{window.removeEventListener("touchmove",ye),window.removeEventListener("mousemove",ye),window.removeEventListener("mouseup",je)});const xe=S=>{const B=(S-F.value)/($.value-F.value)*100;return mt(isNaN(B)?0:B,0,100)},Oe=Ce(()=>e.showTicks),Je=L(()=>Oe.value?e.ticks?Array.isArray(e.ticks)?e.ticks.map(S=>({value:S,position:xe(S),label:S.toString()})):Object.keys(e.ticks).map(S=>({value:parseFloat(S),position:xe(parseFloat(S)),label:e.ticks[S]})):C.value!==1/0?qn(C.value+1).map(S=>{const B=F.value+S*J.value;return{value:B,position:xe(B)}}):[]:[]),it=L(()=>Je.value.some(S=>{let{label:B}=S;return!!B})),He={activeThumbRef:A,color:Ce(()=>e.color),decimals:he,disabled:f.isDisabled,direction:Ce(()=>e.direction),elevation:Ce(()=>e.elevation),hasLabels:it,isReversed:w,indexFromEnd:I,min:F,max:$,mousePressed:q,noKeyboard:Ce(()=>e.noKeyboard),numTicks:C,onSliderMousedown:Ee,onSliderTouchstart:Be,parsedTicks:Je,parseMouseMove:X,position:xe,readonly:f.isReadonly,rounded:Ce(()=>e.rounded),roundValue:ae,showTicks:Oe,startOffset:P,step:J,thumbSize:ce,thumbColor:V,thumbLabelColor:T,thumbLabel:Ce(()=>e.thumbLabel),ticks:Ce(()=>e.ticks),tickSize:le,trackColor:_,trackContainerRef:ee,trackFillColor:E,trackSize:oe,vertical:x};return En(St,He),He},zs=Fe({focused:Boolean,max:{type:Number,required:!0},min:{type:Number,required:!0},modelValue:{type:Number,required:!0},position:{type:Number,required:!0},ripple:{type:[Boolean,Object],default:!0},name:String,noKeyboard:Boolean,...Gt()},"VSliderThumb"),Es=tt()({name:"VSliderThumb",directives:{vRipple:Vt},props:zs(),emits:{"update:modelValue":s=>!0},setup(s,e){let{slots:o,emit:u}=e;const i=Qt(St),{isRtl:l,rtlClasses:d}=wt();if(!i)throw new Error("[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider");const{min:f,max:r,thumbColor:w,thumbLabelColor:x,step:I,disabled:F,thumbSize:$,thumbLabel:J,direction:he,isReversed:ae,vertical:ce,readonly:le,elevation:oe,mousePressed:C,decimals:V,indexFromEnd:T}=i,_=qe(!1),E=qe(!1),q=L(()=>F.value?void 0:oe.value),{elevationClasses:P}=In(q),{textColorClasses:ee,textColorStyles:A}=Dn(w),{backgroundColorClasses:X,backgroundColorStyles:be}=dt(x),{pageup:ge,pagedown:ke,end:ye,home:je,left:Ie,right:Be,down:Ee,up:xe}=Zn,Oe=[ge,ke,ye,je,Ie,Be,Ee,xe],Je=L(()=>I.value?[1,2,3]:[1,5,10]);function it(S,B){if(s.noKeyboard||F.value||!Oe.includes(S.key))return;S.preventDefault();const me=I.value||.1,Me=(r.value-f.value)/me;if([Ie,Be,Ee,xe].includes(S.key)){const Ge=(ce.value?[l.value?Ie:Be,ae.value?Ee:xe]:T.value!==l.value?[Ie,xe]:[Be,xe]).includes(S.key)?1:-1,We=S.shiftKey?2:S.ctrlKey?1:0;Ge===-1&&B===r.value&&!We&&!Number.isInteger(Me)?B=B-Me%1*me:B=B+Ge*me*Je.value[We]}else if(S.key===je)B=f.value;else if(S.key===ye)B=r.value;else{const Qe=S.key===ke?1:-1;B=B-Qe*me*(Me>100?Me/10:10)}return Math.max(s.min,Math.min(s.max,B))}function He(S){const B=it(S,s.modelValue);B!=null&&(E.value=!1,u("update:modelValue",B))}return ct(()=>s.focused,S=>{S&&(E.value=!1)}),vt(()=>{const S=Ue(T.value?100-s.position:s.position,"%"),B=J.value==="always"||J.value===!0&&s.focused||J.value==="hover"&&(_.value||s.focused&&!E.value);return c("div",{class:pe(["v-slider-thumb",{"v-slider-thumb--focused":s.focused,"v-slider-thumb--pressed":s.focused&&C.value},s.class,d.value]),style:De([{"--v-slider-thumb-position":S,"--v-slider-thumb-size":Ue($.value)},s.style]),role:"slider",tabindex:F.value?-1:0,"aria-label":s.name,"aria-valuemin":f.value,"aria-valuemax":r.value,"aria-valuenow":s.modelValue,"aria-readonly":!!le.value,"aria-orientation":he.value,onKeydown:le.value?void 0:He,onMouseenter:()=>{_.value=!0},onMouseleave:()=>{_.value=!1,E.value=!0}},[c("div",{class:pe(["v-slider-thumb__surface",ee.value,P.value]),style:De(A.value)},null),Dt(c("div",{class:pe(["v-slider-thumb__ripple",ee.value]),style:De(A.value)},null),[[Vt,s.ripple,null,{circle:!0,center:!0}]]),t(An,{origin:"bottom center"},{default:()=>{var me;return[Dt(c("div",{class:"v-slider-thumb__label-container"},[c("div",{class:pe(["v-slider-thumb__label",X.value]),style:De(be.value)},[c("div",null,[((me=o["thumb-label"])==null?void 0:me.call(o,{modelValue:s.modelValue}))??s.modelValue.toFixed(I.value?V.value:1)]),c("div",{class:"v-slider-thumb__label-wedge"},null)])]),[[Ln,B]])]}})])}),{}}}),Ls=Fe({start:{type:Number,required:!0},stop:{type:Number,required:!0},...Gt()},"VSliderTrack"),Rs=tt()({name:"VSliderTrack",props:Ls(),emits:{},setup(s,e){let{slots:o}=e;const u=Qt(St);if(!u)throw new Error("[Vuetify] v-slider-track must be inside v-slider or v-range-slider");const{color:i,parsedTicks:l,rounded:d,showTicks:f,tickSize:r,trackColor:w,trackFillColor:x,trackSize:I,vertical:F,min:$,max:J,indexFromEnd:he}=u,{roundedClasses:ae}=Tn(d),{backgroundColorClasses:ce,backgroundColorStyles:le}=dt(x),{backgroundColorClasses:oe,backgroundColorStyles:C}=dt(w),V=L(()=>`inset-${F.value?"block":"inline"}-${he.value?"end":"start"}`),T=L(()=>F.value?"height":"width"),_=L(()=>({[V.value]:"0%",[T.value]:"100%"})),E=L(()=>s.stop-s.start),q=L(()=>({[V.value]:Ue(s.start,"%"),[T.value]:Ue(E.value,"%")})),P=L(()=>f.value?(F.value?l.value.slice().reverse():l.value).map((A,X)=>{var ge;const be=A.value!==$.value&&A.value!==J.value?Ue(A.position,"%"):void 0;return c("div",{key:A.value,class:pe(["v-slider-track__tick",{"v-slider-track__tick--filled":A.position>=s.start&&A.position<=s.stop,"v-slider-track__tick--first":A.value===$.value,"v-slider-track__tick--last":A.value===J.value}]),style:{[V.value]:be}},[(A.label||o["tick-label"])&&c("div",{class:"v-slider-track__tick-label"},[((ge=o["tick-label"])==null?void 0:ge.call(o,{tick:A,index:X}))??A.label])])}):[]);return vt(()=>c("div",{class:pe(["v-slider-track",ae.value,s.class]),style:De([{"--v-slider-track-size":Ue(I.value),"--v-slider-tick-size":Ue(r.value)},s.style])},[c("div",{class:pe(["v-slider-track__background",oe.value,{"v-slider-track__background--opacity":!!i.value||!x.value}]),style:{..._.value,...C.value}},null),c("div",{class:pe(["v-slider-track__fill",ce.value]),style:{...q.value,...le.value}},null),f.value&&c("div",{class:pe(["v-slider-track__ticks",{"v-slider-track__ticks--always-show":f.value==="always"}])},[P.value])])),{}}}),Ks=Fe({...Wn(),...Ms(),...Gn(),modelValue:{type:[Number,String],default:0}},"VSlider"),Et=tt()({name:"VSlider",inheritAttrs:!1,props:Ks(),emits:{"update:focused":s=>!0,"update:modelValue":s=>!0,start:s=>!0,end:s=>!0},setup(s,e){let{slots:o,emit:u,attrs:i}=e;const l=se(),d=se(),{rtlClasses:f}=wt(),r=Ns(s),w=Wt(s,"modelValue",void 0,P=>r.roundValue(P??r.min.value)),{min:x,max:I,mousePressed:F,roundValue:$,onSliderMousedown:J,onSliderTouchstart:he,trackContainerRef:ae,position:ce,hasLabels:le,disabled:oe,readonly:C,noKeyboard:V}=Ps({props:s,steps:r,onSliderStart:()=>{!oe.value&&!C.value&&u("start",w.value)},onSliderEnd:P=>{let{value:ee}=P;const A=$(ee);!oe.value&&!C.value&&(w.value=A),u("end",A)},onSliderMove:P=>{let{value:ee}=P;!oe.value&&!C.value&&(w.value=$(ee))},getActiveThumb:()=>{var P;return(P=l.value)==null?void 0:P.$el}}),{isFocused:T,focus:_,blur:E}=Hn(s),q=L(()=>ce(w.value));return vt(()=>{const P=At.filterProps(s),[ee,A]=Xn(i),X=!!(s.label||o.label||o.prepend);return t(At,Ve({ref:d,class:["v-slider",{"v-slider--has-labels":!!o["tick-label"]||le.value,"v-slider--focused":T.value,"v-slider--pressed":F.value,"v-slider--disabled":oe.value},f.value,s.class],style:s.style},P,ee,{focused:T.value}),{...o,prepend:X?be=>{var ge,ke;return c(H,null,[((ge=o.label)==null?void 0:ge.call(o,be))??(s.label?t(Qn,{id:be.id.value,class:"v-slider__label",text:s.label},null):void 0),(ke=o.prepend)==null?void 0:ke.call(o,be)])}:void 0,default:be=>{let{id:ge,messagesId:ke}=be;return c("div",{class:"v-slider__container",onMousedown:C.value?void 0:J,onTouchstartPassive:C.value?void 0:he},[c("input",{id:ge.value,name:s.name||ge.value,disabled:oe.value,readonly:C.value,tabindex:"-1",value:w.value},null),t(Rs,{ref:ae,start:0,stop:q.value},{"tick-label":o["tick-label"]}),t(Es,Ve({ref:l,"aria-describedby":ke.value,focused:T.value,noKeyboard:V.value,min:x.value,max:I.value,modelValue:w.value,"onUpdate:modelValue":ye=>w.value=ye,position:q.value,elevation:s.elevation,onFocus:_,onBlur:E,ripple:s.ripple,name:s.name},A),{"thumb-label":o["thumb-label"]})])}})}),Un({focus:()=>{var P;return(P=l.value)==null?void 0:P.$el.focus()}},d)}}),Fs=[{label:"Bing 随机壁纸",url:"https://bing.img.run/rand.php"},{label:"Bing 每日壁纸",url:"https://bing.img.run/1920x1080.php"},{label:"随机风景",url:"https://picsum.photos/1920/1080?random=1"},{label:"随机二次元",url:"https://uapis.cn/api/v1/random/image?category=acg&type=pc"}],at=10,Os={name:"BackgroundSettingsCard",components:{SettingsCard:W,SettingItem:ve},data(){const s=y("background.imageData")||"",e=y("background.url")||"";return{imageSource:s?"upload":"url",localUrl:e,localImageData:s,localBlur:y("background.blur")??10,localOpacity:y("background.opacity")??30,isDragging:!1,saving:!1,uploadWarning:"",urlPresets:Fs,settingItemKey:0,maxImageSizeMB:at}},computed:{activeImageSrc(){return this.imageSource==="upload"&&this.localImageData?this.localImageData:this.imageSource==="url"&&this.localUrl?this.localUrl:""},previewContainerStyle(){return{position:"relative",width:"100%",height:"160px",borderRadius:"12px",overflow:"hidden",border:"1px solid rgba(128,128,128,0.3)"}},previewBgStyle(){return this.activeImageSrc?{position:"absolute",inset:"0",backgroundImage:`url(${this.activeImageSrc})`,backgroundSize:"cover",backgroundPosition:"center",filter:`blur(${this.localBlur}px)`,transform:"scale(1.1)"}:{position:"absolute",inset:"0",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",filter:`blur(${this.localBlur}px)`,transform:"scale(1.1)"}},previewOverlayStyle(){return{position:"absolute",inset:"0",background:`rgba(0, 0, 0, ${this.localOpacity/100})`}}},methods:{validateUrl(s){if(!s)return!0;try{return new URL(s),!0}catch{return"请输入有效的图片地址"}},onUrlChange(s){this.localUrl=s||""},onBlurChange(s){this.localBlur=s},onOpacityChange(s){this.localOpacity=s},applyPreset(s){this.localUrl=s,this.imageSource="url"},triggerFileInput(){this.$refs.fileInput.click()},handleDrop(s){var o,u;this.isDragging=!1;const e=(u=(o=s.dataTransfer)==null?void 0:o.files)==null?void 0:u[0];e&&this.processFile(e)},handleFileChange(s){var o;const e=(o=s.target.files)==null?void 0:o[0];e&&this.processFile(e),s.target.value=""},processFile(s){if(this.uploadWarning="",!s.type.startsWith("image/")){this.uploadWarning="请选择图片文件";return}const e=s.size/1024/1024;if(e>at){this.uploadWarning=`图片大小为 ${e.toFixed(1)}MB,超过 ${at}MB 限制,请压缩后重试`;return}const o=new FileReader;o.onload=u=>{this.localImageData=u.target.result},o.readAsDataURL(s)},clearUploadedImage(){this.localImageData="",this.uploadWarning=""},async saveAll(){this.saving=!0;try{this.imageSource==="upload"?(re("background.imageData",this.localImageData||""),re("background.url","")):(re("background.url",this.localUrl||""),re("background.imageData","")),re("background.blur",this.localBlur),re("background.opacity",this.localOpacity)}finally{this.saving=!1}},resetAll(){Te("background.enabled"),Te("background.url"),Te("background.imageData"),Te("background.blur"),Te("background.opacity"),this.localUrl=y("background.url")||"",this.localImageData=y("background.imageData")||"",this.localBlur=y("background.blur")??10,this.localOpacity=y("background.opacity")??30,this.imageSource="url",this.uploadWarning="",this.settingItemKey++}}},Js={class:"px-4 pb-4"},Hs={class:"d-flex align-center mb-4"},Qs={key:0,class:"mb-4"},Gs={class:"d-flex flex-wrap gap-2 mt-2"},Ws={key:1,class:"mb-4"},Ys={class:"text-caption text-medium-emphasis mt-1"},qs={key:1,class:"d-flex align-center ga-2"},Zs={class:"d-flex align-center mb-4"},Xs={class:"mb-4"},$s={class:"d-flex justify-space-between align-center mb-1"},ei={class:"text-body-2 font-weight-bold"},ti={class:"mb-4"},ni={class:"d-flex justify-space-between align-center mb-1"},si={class:"text-body-2 font-weight-bold"},ii={class:"d-flex justify-end ga-3"};function li(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{border:"",icon:"mdi-image",title:"背景设置"},{default:n(()=>[t(O,null,{default:n(()=>[(m(),h(d,{key:i.settingItemKey,"setting-key":"background.enabled"}))]),_:1}),t(U,{class:"mb-4"}),c("div",Js,[c("div",{class:"preview-area mb-6",style:De(l.previewContainerStyle)},[c("div",{class:"preview-bg",style:De(l.previewBgStyle)},null,4),c("div",{class:"preview-overlay",style:De(l.previewOverlayStyle)},null,4),e[9]||(e[9]=c("div",{class:"preview-text"}," 背景预览 ",-1))],4),c("div",Hs,[t(g,{class:"mr-2",color:"primary"},{default:n(()=>[...e[10]||(e[10]=[a(" mdi-image-search ",-1)])]),_:1}),e[11]||(e[11]=c("span",{class:"text-subtitle-1 font-weight-bold"},"图片来源",-1))]),t(Ot,{modelValue:i.imageSource,"onUpdate:modelValue":e[0]||(e[0]=r=>i.imageSource=r),color:"primary",density:"comfortable",class:"mb-4",mandatory:"",rounded:"xl"},{default:n(()=>[t(p,{value:"url","prepend-icon":"mdi-link-variant"},{default:n(()=>[...e[12]||(e[12]=[a(" 网络地址 ",-1)])]),_:1}),t(p,{value:"upload","prepend-icon":"mdi-upload"},{default:n(()=>[...e[13]||(e[13]=[a(" 本地上传 ",-1)])]),_:1})]),_:1},8,["modelValue"]),i.imageSource==="url"?(m(),k("div",Qs,[t(N,{modelValue:i.localUrl,"onUpdate:modelValue":[e[1]||(e[1]=r=>i.localUrl=r),l.onUrlChange],label:"图片地址",placeholder:"https://example.com/background.jpg",variant:"outlined",density:"compact","prepend-inner-icon":"mdi-link",clearable:"","hide-details":"auto",rules:[l.validateUrl]},null,8,["modelValue","rules","onUpdate:modelValue"]),c("div",Gs,[(m(!0),k(H,null,te(i.urlPresets,r=>(m(),h(G,{key:r.label,size:"small",variant:"tonal",color:"primary",class:"cursor-pointer",onClick:w=>l.applyPreset(r.url)},{default:n(()=>[a(v(r.label),1)]),_:2},1032,["onClick"]))),128))])])):b("",!0),i.imageSource==="upload"?(m(),k("div",Ws,[c("div",{class:pe(["upload-area rounded-xl pa-6 text-center mb-3",{"upload-hover":i.isDragging}]),onDragover:e[3]||(e[3]=Ae(r=>i.isDragging=!0,["prevent"])),onDragleave:e[4]||(e[4]=r=>i.isDragging=!1),onDrop:e[5]||(e[5]=Ae((...r)=>l.handleDrop&&l.handleDrop(...r),["prevent"])),onClick:e[6]||(e[6]=(...r)=>l.triggerFileInput&&l.triggerFileInput(...r))},[t(g,{size:"40",color:"primary",class:"mb-2"},{default:n(()=>[...e[14]||(e[14]=[a(" mdi-image-plus ",-1)])]),_:1}),e[15]||(e[15]=c("div",{class:"text-body-2"}," 点击或拖拽图片到此处上传 ",-1)),c("div",Ys," 支持 JPG、PNG、WebP、GIF(建议小于 "+v(i.maxImageSizeMB)+"MB) ",1),c("input",{ref:"fileInput",type:"file",accept:"image/*",style:{display:"none"},onChange:e[2]||(e[2]=(...r)=>l.handleFileChange&&l.handleFileChange(...r))},null,544)],34),i.uploadWarning?(m(),h(Y,{key:0,type:"warning",variant:"tonal",density:"compact",class:"mb-2",icon:"mdi-alert"},{default:n(()=>[a(v(i.uploadWarning),1)]),_:1})):b("",!0),i.localImageData?(m(),k("div",qs,[t(G,{color:"success","prepend-icon":"mdi-check-circle",size:"small"},{default:n(()=>[...e[16]||(e[16]=[a(" 已上传本地图片 ",-1)])]),_:1}),t(p,{size:"small",variant:"text",color:"error","prepend-icon":"mdi-delete",onClick:l.clearUploadedImage},{default:n(()=>[...e[17]||(e[17]=[a(" 清除 ",-1)])]),_:1},8,["onClick"])])):b("",!0)])):b("",!0),t(U,{class:"my-5"}),c("div",Zs,[t(g,{class:"mr-2",color:"blue"},{default:n(()=>[...e[18]||(e[18]=[a(" mdi-blur ",-1)])]),_:1}),e[19]||(e[19]=c("span",{class:"text-subtitle-1 font-weight-bold"},"毛玻璃效果",-1))]),c("div",Xs,[c("div",$s,[e[20]||(e[20]=c("span",{class:"text-body-2 text-medium-emphasis"},"模糊幅度",-1)),c("span",ei,v(i.localBlur)+"px",1)]),t(Et,{modelValue:i.localBlur,"onUpdate:modelValue":[e[7]||(e[7]=r=>i.localBlur=r),l.onBlurChange],min:0,max:50,step:1,color:"primary","track-color":"grey-lighten-3","thumb-label":"","hide-details":""},{prepend:n(()=>[t(g,{size:"small",color:"grey"},{default:n(()=>[...e[21]||(e[21]=[a(" mdi-blur-off ",-1)])]),_:1})]),append:n(()=>[t(g,{size:"small",color:"primary"},{default:n(()=>[...e[22]||(e[22]=[a(" mdi-blur ",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])]),c("div",ti,[c("div",ni,[e[23]||(e[23]=c("span",{class:"text-body-2 text-medium-emphasis"},"遮罩暗色程度",-1)),c("span",si,v(i.localOpacity)+"%",1)]),t(Et,{modelValue:i.localOpacity,"onUpdate:modelValue":[e[8]||(e[8]=r=>i.localOpacity=r),l.onOpacityChange],min:0,max:80,step:1,color:"blue-grey","track-color":"grey-lighten-3","thumb-label":"","hide-details":""},{prepend:n(()=>[t(g,{size:"small",color:"grey"},{default:n(()=>[...e[24]||(e[24]=[a(" mdi-brightness-7 ",-1)])]),_:1})]),append:n(()=>[t(g,{size:"small",color:"blue-grey"},{default:n(()=>[...e[25]||(e[25]=[a(" mdi-brightness-2 ",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])]),t(U,{class:"my-5"}),c("div",ii,[t(p,{variant:"text","prepend-icon":"mdi-restore",onClick:l.resetAll},{default:n(()=>[...e[26]||(e[26]=[a(" 重置 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"primary",variant:"elevated","prepend-icon":"mdi-content-save",loading:i.saving,onClick:l.saveAll},{default:n(()=>[...e[27]||(e[27]=[a(" 保存设置 ",-1)])]),_:1},8,["loading","onClick"])])])]),_:1})}const en=Q(Os,[["render",li],["__scopeId","data-v-bb9183b0"]]),oi={name:"SettingGroup",props:{title:{type:String,default:null},description:{type:String,default:null},icon:{type:String,default:null},border:{type:Boolean,default:!1}},methods:{onSettingUpdate(s,e){this.$emit("update",s,e)},onSettingError(s){this.$emit("error",s)}}};function ai(s,e,o,u,i,l){return m(),h(M,{border:o.border,class:"setting-group"},{default:n(()=>[o.title?(m(),h(K,{key:0,class:"d-flex align-center"},{default:n(()=>[o.icon?(m(),h(g,{key:0,icon:o.icon,class:"mr-2"},null,8,["icon"])):b("",!0),a(" "+v(o.title),1)]),_:1})):b("",!0),o.description?(m(),h(Ke,{key:1},{default:n(()=>[a(v(o.description),1)]),_:1})):b("",!0),t(j,null,{default:n(()=>[t(O,null,{default:n(()=>[Ye(s.$slots,"default",{},void 0,!0)]),_:3})]),_:3}),s.$slots.actions?(m(),h(ue,{key:2},{default:n(()=>[Ye(s.$slots,"actions",{},void 0,!0)]),_:3})):b("",!0)]),_:3},8,["border"])}const nt=Q(oi,[["render",ai],["__scopeId","data-v-acac458a"]]),ri={subjects:{语文:{books:{课本:["第一单元","第二单元"],练习册:["第一章","第二章"]}},数学:{books:{课本:["第一章","第二章"],习题册:["基础练习","提高练习"]}},英语:{books:{课本:["Unit 1","Unit 2"],练习册:["Chapter 1","Chapter 2"]}}},commonSubject:{books:{试卷:["单元测试","期中测试","期末测试"],假期作业:["必做题","选做题"]}},actions:["写完","下一课","不交","明天交"]},ui={name:"HomeworkTemplateCard",components:{SettingsCard:W,SettingGroup:nt},data(){return{loading:!1,error:null,config:Rn(JSON.parse(JSON.stringify(ri))),originalConfig:null,newSubject:"",newCommonBook:"",newAction:"",newTask:"",editedSubjects:{},editedBookTypes:{},newBookTypes:{},newBooks:{},showSnackbar:!1,snackbarText:"",snackbarColor:"success",isNewConfig:!0,dialog:{show:!1,title:"",nameLabel:"",editedItem:{name:"",type:"",subject:"",bookType:"",originalName:"",tasks:[]}}}},computed:{subjectList(){return Object.keys(this.config.subjects)},hasChanges(){return this.isNewConfig?!0:this.originalConfig&&JSON.stringify(this.config)!==JSON.stringify(this.originalConfig)}},created(){this.loadConfig()},methods:{async loadConfig(){var s,e;this.loading=!0;try{const o=await ie.loadData("classworks-config-homework-template");if(o){const u=o;Object.assign(this.config,u),this.originalConfig=JSON.parse(JSON.stringify(u)),this.isNewConfig=!1,this.showMessage("配置已加载","success")}else if(((s=o.error)==null?void 0:s.code)==="NOT_FOUND")this.showMessage("使用默认配置","info"),this.isNewConfig=!0;else{const u=((e=o.error)==null?void 0:e.message)||"加载失败";this.showMessage(`加载失败: ${u},可继续编辑当前配置`,"warning")}}catch(o){console.error("Failed to load config:",o),this.showMessage("加载失败,可继续编辑当前配置","warning")}this.loading=!1},async saveConfig(){this.loading=!0;try{const s=await ie.saveData("classworks-config-homework-template",this.config);if(s)this.originalConfig=JSON.parse(JSON.stringify(this.config)),this.isNewConfig=!1,this.showMessage("配置已保存","success");else throw new Error(s||"保存失败")}catch(s){console.error("Failed to save config:",s),this.showMessage(`保存失败: ${s.message},请稍后重试`,"error")}this.loading=!1},showMessage(s,e="success"){this.snackbarText=s,this.snackbarColor=e,this.showSnackbar=!0},addSubject(){this.newSubject&&(this.config.subjects[this.newSubject]||(this.config.subjects[this.newSubject]={books:{}}),this.newSubject="")},updateSubject(s){const e=this.editedSubjects[s];if(e&&e!==s){const o=this.config.subjects[s];this.config.subjects[e]=o,delete this.config.subjects[s]}delete this.editedSubjects[s]},deleteSubject(s){delete this.config.subjects[s]},addBookType(s){const e=this.newBookTypes[s];e&&(this.config.subjects[s].books[e]||(this.config.subjects[s].books[e]=[]),this.newBookTypes[s]="")},updateBookType(s,e){const o=`${s}-${e}`,u=this.editedBookTypes[o];if(u&&u!==e){const i=this.config.subjects[s].books[e];this.config.subjects[s].books[u]=i,delete this.config.subjects[s].books[e]}delete this.editedBookTypes[o]},deleteBookType(s,e){s==="common"?delete this.config.commonSubject.books[e]:delete this.config.subjects[s].books[e]},addBook(s,e){const o=`${s}-${e}`,u=this.newBooks[o];u&&(this.config.subjects[s].books[e].includes(u)||this.config.subjects[s].books[e].push(u),this.newBooks[o]="")},removeBook(s,e,o){const u=this.config.subjects[s].books[e],i=u.indexOf(o);i>-1&&u.splice(i,1)},addCommonBook(){this.newCommonBook&&(this.config.commonSubject.books[this.newCommonBook]||(this.config.commonSubject.books[this.newCommonBook]=[]),this.newCommonBook="")},removeCommonBook(s){delete this.config.commonSubject.books[s]},addAction(){this.newAction&&(this.config.actions.includes(this.newAction)||this.config.actions.push(this.newAction),this.newAction="")},removeAction(s){const e=this.config.actions.indexOf(s);e>-1&&this.config.actions.splice(e,1)},openBookDialog(s,e,o){this.dialog.show=!0,this.dialog.title="编辑需完成部分",this.dialog.nameLabel="部分名称",this.dialog.editedItem={name:o,type:"book",subject:s,bookType:e,originalName:o,tasks:this.config.subjects[s].books[e]}},openCommonBookDialog(s){this.dialog.show=!0,this.dialog.title="编辑通用作业本",this.dialog.nameLabel="作业本名称",this.dialog.editedItem={name:s,type:"commonBook",originalName:s,tasks:Array.isArray(this.config.commonSubject.books[s])?[...this.config.commonSubject.books[s]]:[]}},openActionDialog(s){this.dialog={show:!0,title:"编辑操作",nameLabel:"操作名称",editedItem:{name:s,type:"action",originalName:s,tasks:[]}}},addTask(){this.newTask&&(this.dialog.editedItem.tasks||(this.dialog.editedItem.tasks=[]),this.dialog.editedItem.tasks.push(this.newTask),this.newTask="")},removeTask(s){this.dialog.editedItem.tasks.splice(s,1)},openSubjectBookDialog(s,e,o){this.dialog.show=!0,this.dialog.title=s==="common"?"编辑通用作业本":"编辑作业本",this.dialog.nameLabel="作业本名称",this.dialog.editedItem={name:e,type:"subjectBook",subject:s,originalName:e,tasks:Array.isArray(o)?[...o]:[]}},saveDialog(){const{type:s,name:e,subject:o,originalName:u,tasks:i}=this.dialog.editedItem;if(!e){this.showMessage("名称不能为空","error");return}let l;const d=o==="common"?this.config.commonSubject.books:o?this.config.subjects[o].books:null;switch(s){case"subjectBook":d&&(u!==e?(d[e]=i||[],delete d[u]):d[e]=i||[]);break;case"action":l=this.config.actions.indexOf(u),l>-1&&(this.config.actions[l]=e);break}this.closeDialog()},closeDialog(){this.dialog={show:!1,title:"",nameLabel:"",editedItem:{name:"",type:"",subject:"",originalName:"",tasks:[]}},this.newTask=""}}},di={class:"d-flex justify-space-between align-center mb-6"};function ci(s,e,o,u,i,l){const d=nt,f=W;return m(),h(f,{loading:i.loading,border:"",icon:"mdi-book-edit",title:"作业模板配置"},{default:n(()=>[i.error?(m(),h(Y,{key:0,class:"mb-4",closable:"",type:"error",variant:"tonal"},{default:n(()=>[a(v(i.error),1)]),_:1})):b("",!0),c("div",di,[c("div",null,[t(p,{loading:i.loading,class:"mr-2",color:"primary","prepend-icon":"mdi-refresh",size:"large",onClick:l.loadConfig},{default:n(()=>[...e[7]||(e[7]=[a(" 重新加载配置 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{loading:i.loading,color:"success","prepend-icon":"mdi-content-save",size:"large",onClick:l.saveConfig},{default:n(()=>[...e[8]||(e[8]=[a(" 保存所有更改 ",-1)])]),_:1},8,["loading","onClick"])]),l.hasChanges?(m(),h(G,{key:0,color:"warning",variant:"elevated"},{default:n(()=>[...e[9]||(e[9]=[a(" 有未保存的更改 ",-1)])]),_:1})):b("",!0)]),t(de,null,{default:n(()=>[t(R,{cols:"12",md:"6"},{default:n(()=>[t(d,{border:"",icon:"mdi-book",title:"科目配置"},{default:n(()=>[t(O,null,{default:n(()=>[t(D,null,{default:n(()=>[t(N,{modelValue:i.newSubject,"onUpdate:modelValue":e[0]||(e[0]=r=>i.newSubject=r),"append-inner-icon":"mdi-plus",density:"comfortable",label:"添加新科目",variant:"outlined","onClick:appendInner":l.addSubject,onKeyup:_e(l.addSubject,["enter"])},null,8,["modelValue","onClick:appendInner","onKeyup"])]),_:1}),(m(!0),k(H,null,te(l.subjectList,r=>(m(),h(D,{key:r},{default:n(()=>[t(M,{border:"",class:"w-100 mb-2"},{default:n(()=>[t(K,{class:"d-flex align-center"},{default:n(()=>[t(N,{modelValue:i.editedSubjects[r],"onUpdate:modelValue":w=>i.editedSubjects[r]=w,placeholder:r,density:"comfortable","hide-details":"",variant:"plain",onBlur:w=>l.updateSubject(r)},null,8,["modelValue","onUpdate:modelValue","placeholder","onBlur"]),t(Z),t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:w=>l.deleteSubject(r)},null,8,["onClick"])]),_:2},1024),t(j,null,{default:n(()=>[t(N,{modelValue:i.newBookTypes[r],"onUpdate:modelValue":w=>i.newBookTypes[r]=w,"append-inner-icon":"mdi-plus",class:"mb-2",density:"comfortable",label:"添加作业本名称",variant:"outlined","onClick:appendInner":()=>l.addBookType(r),onKeyup:_e(()=>l.addBookType(r),["enter"])},null,8,["modelValue","onUpdate:modelValue","onClick:appendInner","onKeyup"]),t(O,{border:"",density:"compact",rounded:""},{default:n(()=>[(m(!0),k(H,null,te(i.config.subjects[r].books,(w,x)=>(m(),h(D,{key:x,title:x,onClick:I=>l.openSubjectBookDialog(r,x,w)},{prepend:n(()=>[t(g,{class:"mr-2",icon:"mdi-book-open-variant"})]),append:n(()=>[t(G,{class:"mr-2",color:"info",size:"small"},{default:n(()=>[a(v(w.length)+"个部分 ",1)]),_:2},1024),t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:Ae(()=>l.deleteBookType(r,x),["stop"])},null,8,["onClick"])]),_:2},1032,["title","onClick"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),t(R,{cols:"12",md:"6"},{default:n(()=>[t(d,{border:"",icon:"mdi-cog",title:"通用配置"},{default:n(()=>[t(O,null,{default:n(()=>[t(D,null,{default:n(()=>[t(N,{modelValue:i.newCommonBook,"onUpdate:modelValue":e[1]||(e[1]=r=>i.newCommonBook=r),"append-inner-icon":"mdi-plus",density:"comfortable",label:"添加作业本名称",variant:"outlined","onClick:appendInner":l.addCommonBook,onKeyup:_e(l.addCommonBook,["enter"])},null,8,["modelValue","onClick:appendInner","onKeyup"])]),_:1}),t(D,null,{default:n(()=>[t(O,{border:"",density:"compact",rounded:""},{default:n(()=>[(m(!0),k(H,null,te(i.config.commonSubject.books,(r,w)=>(m(),h(D,{key:w,title:w,onClick:x=>l.openSubjectBookDialog("common",w,r)},{prepend:n(()=>[t(g,{class:"mr-2",icon:"mdi-book-multiple"})]),append:n(()=>[t(G,{class:"mr-2",color:"info",size:"small"},{default:n(()=>[a(v(r.length)+"个部分 ",1)]),_:2},1024),t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:Ae(()=>l.deleteBookType("common",w),["stop"])},null,8,["onClick"])]),_:2},1032,["title","onClick"]))),128))]),_:1})]),_:1}),t(U,{class:"my-2"}),t(D,null,{default:n(()=>[t(N,{modelValue:i.newAction,"onUpdate:modelValue":e[2]||(e[2]=r=>i.newAction=r),"append-inner-icon":"mdi-plus",density:"comfortable",label:"添加操作",variant:"outlined","onClick:appendInner":l.addAction,onKeyup:_e(l.addAction,["enter"])},null,8,["modelValue","onClick:appendInner","onKeyup"])]),_:1}),t(D,null,{default:n(()=>[t(O,{border:"",density:"compact",rounded:""},{default:n(()=>[(m(!0),k(H,null,te(i.config.actions,r=>(m(),h(D,{key:r,title:r,onClick:w=>l.openActionDialog(r)},{append:n(()=>[t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:Ae(w=>l.removeAction(r),["stop"])},null,8,["onClick"])]),_:2},1032,["title","onClick"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(we,{modelValue:i.dialog.show,"onUpdate:modelValue":e[5]||(e[5]=r=>i.dialog.show=r),"max-width":"600px"},{default:n(()=>[t(M,null,{default:n(()=>[t(K,{class:"text-h5 pa-4"},{default:n(()=>[a(v(i.dialog.title),1)]),_:1}),t(j,null,{default:n(()=>[t(bt,null,{default:n(()=>[t(de,null,{default:n(()=>[t(R,{cols:"12"},{default:n(()=>[t(N,{modelValue:i.dialog.editedItem.name,"onUpdate:modelValue":e[3]||(e[3]=r=>i.dialog.editedItem.name=r),label:i.dialog.nameLabel,rules:[r=>!!r||"名称不能为空"],density:"comfortable",variant:"outlined"},null,8,["modelValue","label","rules"])]),_:1}),i.dialog.editedItem.type==="subjectBook"?(m(),h(R,{key:0,cols:"12"},{default:n(()=>[e[10]||(e[10]=c("div",{class:"text-subtitle-2 mb-2"}," 所属科目 ",-1)),t(G,{color:"primary"},{default:n(()=>[a(v(i.dialog.editedItem.subject),1)]),_:1})]),_:1})):b("",!0),["subjectBook","commonBook"].includes(i.dialog.editedItem.type)?(m(),h(R,{key:1,cols:"12"},{default:n(()=>[t(M,{variant:"outlined"},{default:n(()=>[t(K,{class:"text-subtitle-1 py-2"},{default:n(()=>[...e[11]||(e[11]=[a(" 需完成部分 ",-1)])]),_:1}),t(j,{class:"pt-0"},{default:n(()=>[t(O,{border:"",class:"mb-2",density:"compact",rounded:""},{default:n(()=>[(m(!0),k(H,null,te(i.dialog.editedItem.tasks,(r,w)=>(m(),h(D,{key:w},{prepend:n(()=>[t(g,{class:"mr-2",icon:"mdi-checkbox-blank-circle-outline",size:"small"})]),append:n(()=>[t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:x=>l.removeTask(w)},null,8,["onClick"])]),default:n(()=>[t(N,{modelValue:i.dialog.editedItem.tasks[w],"onUpdate:modelValue":x=>i.dialog.editedItem.tasks[w]=x,density:"compact","hide-details":"",variant:"plain"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1}),t(N,{modelValue:i.newTask,"onUpdate:modelValue":e[4]||(e[4]=r=>i.newTask=r),"append-inner-icon":"mdi-plus",class:"mt-2",density:"comfortable",label:"添加需完成部分",variant:"outlined","onClick:appendInner":l.addTask,onKeyup:_e(l.addTask,["enter"])},null,8,["modelValue","onClick:appendInner","onKeyup"])]),_:1})]),_:1})]),_:1})):b("",!0)]),_:1})]),_:1})]),_:1}),t(ue,{class:"pa-4"},{default:n(()=>[t(Z),t(p,{color:"primary",variant:"elevated",onClick:l.saveDialog},{default:n(()=>[...e[12]||(e[12]=[a(" 关闭 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"error",variant:"text",onClick:l.closeDialog},{default:n(()=>[...e[13]||(e[13]=[a(" 取消 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),t(ft,{modelValue:i.showSnackbar,"onUpdate:modelValue":e[6]||(e[6]=r=>i.showSnackbar=r),color:i.snackbarColor,timeout:3e3},{default:n(()=>[a(v(i.snackbarText),1)]),_:1},8,["modelValue","color"])]),_:1},8,["loading"])}const tn=Q(ui,[["render",ci],["__scopeId","data-v-a2517340"]]),mi={name:"SubjectManagementCard",components:{SettingsCard:W},data(){return{loading:!1,error:null,subjects:[],originalSubjects:null,newSubjectName:"",showSnackbar:!1,snackbarText:"",snackbarColor:"success",defaultSubjects:[{name:"语文",order:0},{name:"数学",order:1},{name:"英语",order:2},{name:"物理",order:3},{name:"化学",order:4},{name:"生物",order:5},{name:"政治",order:6},{name:"历史",order:7},{name:"地理",order:8},{name:"其他",order:9}]}},computed:{hasChanges(){return this.originalSubjects&&JSON.stringify(this.subjects)!==JSON.stringify(this.originalSubjects)}},created(){this.loadConfig()},methods:{async loadConfig(){this.loading=!0;try{const s=await ie.loadData("classworks-config-subject");s?(this.subjects=s.map((e,o)=>({name:e.name,order:e.order??o})).sort((e,o)=>e.order-o.order),this.originalSubjects=JSON.parse(JSON.stringify(this.subjects)),this.showMessage("配置已加载","success")):(this.subjects=[],this.originalSubjects=[],this.showMessage("使用默认配置","info"))}catch(s){console.error("Failed to load config:",s),this.showMessage("加载失败,可继续编辑当前配置","warning")}this.loading=!1},async saveConfig(){this.loading=!0;try{const s=await ie.saveData("classworks-config-subject",this.subjects);if(s)this.originalSubjects=JSON.parse(JSON.stringify(this.subjects)),this.showMessage("配置已保存","success");else throw new Error(s||"保存失败")}catch(s){console.error("Failed to save config:",s),this.showMessage(`保存失败: ${s.message},请稍后重试`,"error")}this.loading=!1},showMessage(s,e="success"){this.snackbarText=s,this.snackbarColor=e,this.showSnackbar=!0},addSubject(){if(!this.newSubjectName)return;const s={name:this.newSubjectName,order:this.subjects.length};this.subjects.push(s),this.newSubjectName=""},updateSubject(s){const e=this.subjects.findIndex(o=>o.order===s.order);e>-1&&(this.subjects[e]={...s})},deleteSubject(s){const e=this.subjects.findIndex(o=>o.order===s.order);e>-1&&(this.subjects.splice(e,1),this.subjects.forEach((o,u)=>{o.order=u}))},moveSubject(s,e){const o=s+e;if(o>=0&&o{i.order=l})}},resetToDefault(){this.subjects=JSON.parse(JSON.stringify(this.defaultSubjects)),this.showMessage("已重置为默认科目列表","info")}}},fi={class:"d-flex justify-space-between align-center mb-6"},pi={class:"d-flex flex-column align-center mr-2"};function hi(s,e,o,u,i,l){const d=W;return m(),h(d,{loading:i.loading,border:"",icon:"mdi-book-multiple",title:"科目管理"},{default:n(()=>[i.error?(m(),h(Y,{key:0,class:"mb-4",closable:"",type:"error",variant:"tonal"},{default:n(()=>[a(v(i.error),1)]),_:1})):b("",!0),c("div",fi,[c("div",null,[t(p,{loading:i.loading,class:"mr-2",color:"primary","prepend-icon":"mdi-refresh",size:"large",variant:"text",onClick:l.loadConfig},{default:n(()=>[...e[2]||(e[2]=[a(" 重新加载 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{loading:i.loading,color:"success","prepend-icon":"mdi-content-save",size:"large",onClick:l.saveConfig},{default:n(()=>[...e[3]||(e[3]=[a(" 保存 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{loading:i.loading,class:"mr-2","prepend-icon":"mdi-restore",variant:"text",onClick:l.resetToDefault},{default:n(()=>[...e[4]||(e[4]=[a(" 重置为默认 ",-1)])]),_:1},8,["loading","onClick"])]),l.hasChanges?(m(),h(G,{key:0,color:"warning",variant:"elevated"},{default:n(()=>[...e[5]||(e[5]=[a(" 有未保存的更改 ",-1)])]),_:1})):b("",!0)]),t(M,{class:"mb-4",variant:"outlined"},{default:n(()=>[t(j,null,{default:n(()=>[t(de,null,{default:n(()=>[t(R,{cols:"12",sm:"6"},{default:n(()=>[t(N,{modelValue:i.newSubjectName,"onUpdate:modelValue":e[0]||(e[0]=f=>i.newSubjectName=f),rules:[f=>!!f||"科目名称不能为空"],"append-inner-icon":"mdi-plus",density:"comfortable",label:"科目名称",variant:"outlined",onKeyup:_e(l.addSubject,["enter"]),"onClick:appendInner":l.addSubject},null,8,["modelValue","rules","onKeyup","onClick:appendInner"])]),_:1})]),_:1})]),_:1})]),_:1}),t(M,{variant:"outlined"},{default:n(()=>[t(j,{class:"pa-0"},{default:n(()=>[t(O,{lines:"one"},{default:n(()=>[(m(!0),k(H,null,te(i.subjects,(f,r)=>(m(),h(D,{key:f.order},{prepend:n(()=>[c("div",pi,[t(p,{disabled:r===0,icon:"mdi-chevron-up",size:"small",variant:"text",onClick:w=>l.moveSubject(r,-1)},null,8,["disabled","onClick"]),t(p,{disabled:r===i.subjects.length-1,icon:"mdi-chevron-down",size:"small",variant:"text",onClick:w=>l.moveSubject(r,1)},null,8,["disabled","onClick"])])]),append:n(()=>[t(p,{color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:w=>l.deleteSubject(f)},null,8,["onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[t(N,{modelValue:f.name,"onUpdate:modelValue":w=>f.name=w,density:"compact","hide-details":"",variant:"plain",onBlur:w=>l.updateSubject(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),t(ft,{modelValue:i.showSnackbar,"onUpdate:modelValue":e[1]||(e[1]=f=>i.showSnackbar=f),color:i.snackbarColor,timeout:3e3},{default:n(()=>[a(v(i.snackbarText),1)]),_:1},8,["modelValue","color"])]),_:1},8,["loading"])}const nn=Q(mi,[["render",hi],["__scopeId","data-v-22202eda"]]),gi={};function wi(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{icon:"mdi-cog",title:"编辑设置"},{default:n(()=>[t(O,null,{default:n(()=>[t(d,{"setting-key":"randomPicker.enabled"}),t(U,{class:"my-2"}),t(d,{"setting-key":"randomPicker.mode"}),t(U,{class:"my-2"}),t(d,{"setting-key":"randomPicker.minNumber"}),t(U,{class:"my-2"}),t(d,{"setting-key":"randomPicker.maxNumber"}),t(U,{class:"my-2"}),t(d,{"setting-key":"randomPicker.defaultCount"}),t(U,{class:"my-2"}),t(d,{"setting-key":"randomPicker.animation"})]),_:1})]),_:1})}const sn=Q(gi,[["render",wi]]),vi={name:"HitokotoSettings",components:{SettingGroup:nt,SettingItem:ve},data(){return{kvConfig:{sources:["zhaoyu"],sensitiveWords:"",jinrishiciToken:null,hitokotoCategories:[]},hitokotoCategories:[{value:"a",label:"动画"},{value:"b",label:"漫画"},{value:"c",label:"游戏"},{value:"d",label:"文学"},{value:"e",label:"原创"},{value:"f",label:"来自网络"},{value:"g",label:"其他"},{value:"h",label:"影视"},{value:"i",label:"诗词"},{value:"j",label:"网易云"},{value:"k",label:"哲学"},{value:"l",label:"抖机灵"}],loading:!1,testLoading:!1,testMessage:"",testColor:"info",testResultDialog:!1,testResultData:null,enableCloudSensitiveWords:!0}},mounted(){this.loadKvSettings()},methods:{async loadKvSettings(){this.loading=!0;try{const s=await ie.loadData("sentence-info");let e=s;s&&s.data&&(e=s.data),e&&(this.kvConfig={sources:Array.isArray(e.sources)?e.sources:["zhaoyu"],sensitiveWords:e.sensitiveWords||"",jinrishiciToken:e.jinrishiciToken,hitokotoCategories:Array.isArray(e.hitokotoCategories)?e.hitokotoCategories:[]})}catch(s){console.error("Failed to load sentence-info",s)}finally{this.loading=!1}},async saveKvSettings(){this.loading=!0;try{if(this.kvConfig.sources.includes("jinrishici")&&!this.kvConfig.jinrishiciToken)try{const s=await Xe.get("https://v2.jinrishici.com/token");s.data.status==="success"&&(this.kvConfig.jinrishiciToken=s.data.data)}catch(s){console.error("Failed to get jinrishici token",s)}await ie.saveData("sentence-info",this.kvConfig)}catch(s){console.error("Failed to save sentence-info",s)}finally{this.loading=!1}},async testJinrishici(){var s,e;this.testLoading=!0,this.testMessage="",this.testColor="info";try{const o={};this.kvConfig.jinrishiciToken&&(o["X-User-Token"]=this.kvConfig.jinrishiciToken);const u=await Xe.get("https://v2.jinrishici.com/info?X-User-Token="+encodeURIComponent(this.kvConfig.jinrishiciToken));if(u.data&&u.data.status==="success"){this.testResultData=u.data,this.testResultDialog=!0;const i=(s=u.data.data)==null?void 0:s.token,l=(e=u.data.data)==null?void 0:e.region,d=this.kvConfig.jinrishiciToken?i===this.kvConfig.jinrishiciToken:!0;this.testColor=d?"success":"warning",this.testMessage=d?`接口正常,Token 一致:${i}${l?`,地区:${l}`:""}`:`接口返回 Token 与当前设置不一致:${i}${l?`,地区:${l}`:""}`}else this.testColor="error",this.testMessage="接口返回非 success,请检查网络或 Token 配置。"}catch(o){console.error("Failed to test jinrishici info",o),this.testColor="error",this.testMessage="接口测试失败,请检查网络或 Token。"}finally{this.testLoading=!1}}}},bi={class:"d-flex flex-wrap gap-2"},ki={class:"text-caption text-orange mt-2"},yi={class:"d-flex flex-wrap gap-2"},xi={class:"d-flex flex-column flex-sm-row align-center w-100"},Si={key:3,class:"text-center pb-4"},Ci={class:"d-flex align-center mb-2"},Vi={class:"text-body-1 font-weight-medium"},_i={class:"d-flex align-center mb-2"},Di={class:"text-body-1 font-weight-medium"},Ai={class:"d-flex align-center mb-2"},Ii={class:"text-body-1 font-weight-medium"},Ti={class:"d-flex align-center mb-2"},Ui={class:"text-body-2 font-weight-medium"},ji={class:"d-flex align-center mb-2"},Bi={class:"text-body-1 font-weight-medium"},Mi={class:"d-flex align-center mb-2"},Ni={class:"text-body-1 font-weight-medium"},Pi={class:"px-4 py-3"},zi={class:"d-flex flex-wrap gap-2"};function Ei(s,e,o,u,i,l){const d=ve,f=nt;return m(),k("div",null,[t(f,{title:"一言设置",icon:"mdi-comment-quote"},{default:n(()=>[t(d,{"setting-key":"hitokoto.enabled"}),t(d,{"setting-key":"hitokoto.refreshInterval"})]),_:1}),t(f,{title:"数据源配置",icon:"mdi-cloud-sync",class:"mt-4"},{default:n(()=>[e[16]||(e[16]=c("div",{class:"text-caption text-grey px-4 pt-2 pb-2"}," 以下配置将同步到云端,对所有连接此班级的设备生效。 ",-1)),t(D,null,{default:n(()=>[t(z,{class:"mb-2"},{default:n(()=>[...e[8]||(e[8]=[a(" 启用数据源 ",-1)])]),_:1}),c("div",bi,[t(Se,{modelValue:i.kvConfig.sources,"onUpdate:modelValue":[e[0]||(e[0]=r=>i.kvConfig.sources=r),l.saveKvSettings],label:"一言 (Hitokoto)",value:"hitokoto","hide-details":"",density:"compact",class:"mr-4",disabled:i.loading},null,8,["modelValue","disabled","onUpdate:modelValue"]),t(Se,{modelValue:i.kvConfig.sources,"onUpdate:modelValue":[e[1]||(e[1]=r=>i.kvConfig.sources=r),l.saveKvSettings],label:"诏预 (Zhaoyu)",value:"zhaoyu","hide-details":"",density:"compact",class:"mr-4",disabled:i.loading},null,8,["modelValue","disabled","onUpdate:modelValue"]),t(Se,{modelValue:i.kvConfig.sources,"onUpdate:modelValue":[e[2]||(e[2]=r=>i.kvConfig.sources=r),l.saveKvSettings],label:"今日诗词 (Jinrishici)",value:"jinrishici","hide-details":"",density:"compact",disabled:i.loading},null,8,["modelValue","disabled","onUpdate:modelValue"])]),c("div",ki,[t(g,{size:"x-small",color:"orange",class:"mr-1"},{default:n(()=>[...e[9]||(e[9]=[a(" mdi-alert ",-1)])]),_:1}),e[10]||(e[10]=a(" 一言(Hitokoto)数据源已收到关于存在负面内容的大量反馈,请用户谨慎启用。 ",-1))])]),_:1}),i.kvConfig.sources.includes("hitokoto")?(m(),h(D,{key:0},{default:n(()=>[t(z,{class:"mb-2"},{default:n(()=>[...e[11]||(e[11]=[a(" 一言句子类型 ",-1)])]),_:1}),e[12]||(e[12]=c("div",{class:"text-caption text-grey mb-2"}," 不选则返回所有类型;可多选。 ",-1)),c("div",yi,[(m(!0),k(H,null,te(i.hitokotoCategories,r=>(m(),h(Se,{key:r.value,modelValue:i.kvConfig.hitokotoCategories,"onUpdate:modelValue":[e[3]||(e[3]=w=>i.kvConfig.hitokotoCategories=w),l.saveKvSettings],label:r.label,value:r.value,"hide-details":"",density:"compact",class:"mr-4",disabled:i.loading},null,8,["modelValue","label","value","disabled","onUpdate:modelValue"]))),128))])]),_:1})):b("",!0),i.kvConfig.sources.includes("jinrishici")?(m(),h(D,{key:1},{default:n(()=>[t(N,{modelValue:i.kvConfig.jinrishiciToken,"onUpdate:modelValue":e[4]||(e[4]=r=>i.kvConfig.jinrishiciToken=r),label:"今日诗词 Token",variant:"outlined",density:"comfortable",disabled:i.loading,hint:"留空则自动获取,也可以手动输入已有 Token","persistent-hint":"",class:"mt-2",onChange:l.saveKvSettings},null,8,["modelValue","disabled","onChange"])]),_:1})):b("",!0),i.kvConfig.sources.includes("jinrishici")?(m(),h(D,{key:2},{default:n(()=>[c("div",xi,[t(p,{loading:i.testLoading,color:"primary",variant:"outlined",class:"mr-sm-4 mb-2 mb-sm-0",onClick:l.testJinrishici},{default:n(()=>[...e[13]||(e[13]=[a(" 测试今日诗词接口 ",-1)])]),_:1},8,["loading","onClick"]),i.testMessage?(m(),h(Y,{key:0,type:i.testColor,density:"comfortable",border:"start",class:"flex-grow-1"},{default:n(()=>[a(v(i.testMessage),1)]),_:1},8,["type"])):b("",!0)])]),_:1})):b("",!0),t(D,null,{default:n(()=>[t(Pe,{modelValue:i.kvConfig.sensitiveWords,"onUpdate:modelValue":e[5]||(e[5]=r=>i.kvConfig.sensitiveWords=r),disabled:i.loading,label:"敏感词过滤 (用逗号分隔)",variant:"outlined",rows:"3","auto-grow":"","hide-details":"",class:"mt-2 mb-2",onChange:l.saveKvSettings},null,8,["modelValue","disabled","onChange"])]),_:1}),t(D,null,{default:n(()=>[t(Se,{modelValue:i.enableCloudSensitiveWords,"onUpdate:modelValue":e[6]||(e[6]=r=>i.enableCloudSensitiveWords=r),label:"启用云端敏感词列表","hide-details":"",density:"compact",disabled:"",class:"mb-2"},null,8,["modelValue"]),e[14]||(e[14]=c("div",{class:"text-caption text-grey"},[a(" 已启用的数据源将在获取一言时随机尝试,直到成功获取内容为止。"),c("br"),a(" 敏感词过滤会将包含任意敏感词的句子过滤掉,避免显示不当内容。"),c("br")],-1))]),_:1}),i.loading?(m(),k("div",Si,[t(Jt,{indeterminate:"",size:"24",color:"primary"}),e[15]||(e[15]=c("span",{class:"ml-2 text-caption"},"正在同步配置...",-1))])):b("",!0)]),_:1}),t(we,{modelValue:i.testResultDialog,"onUpdate:modelValue":e[7]||(e[7]=r=>i.testResultDialog=r),"max-width":"600"},{default:n(()=>[i.testResultData?(m(),h(M,{key:0,class:"rounded-lg"},{default:n(()=>[t(j,{class:"pa-0"},{default:n(()=>[t(O,{lines:"two",class:"py-0"},{default:n(()=>[t(D,{class:"px-4 py-3"},{prepend:n(()=>[t(et,{color:"primary",variant:"tonal",class:"mr-2"},{default:n(()=>[t(g,{icon:"mdi-key-variant"})]),_:1})]),default:n(()=>[t(z,{class:"text-subtitle-2 font-weight-bold mb-1"},{default:n(()=>[...e[17]||(e[17]=[a(" Token ",-1)])]),_:1}),t(ne,{class:"text-body-2 text-high-emphasis",style:{"word-break":"break-all"}},{default:n(()=>[a(v(i.testResultData.data.token),1)]),_:1})]),_:1}),t(U),t(de,{"no-gutters":""},{default:n(()=>[t(R,{cols:"6"},{default:n(()=>[t(D,{class:"px-4 py-2"},{prepend:n(()=>[t(g,{icon:"mdi-ip-network",color:"grey-darken-1",class:"mr-2"})]),default:n(()=>[t(z,{class:"text-caption text-grey-darken-1"},{default:n(()=>[...e[18]||(e[18]=[a(" IP 地址 ",-1)])]),_:1}),t(ne,{class:"text-body-2"},{default:n(()=>[a(v(i.testResultData.data.ip),1)]),_:1})]),_:1})]),_:1}),t(R,{cols:"6"},{default:n(()=>[t(D,{class:"px-4 py-2"},{prepend:n(()=>[t(g,{icon:"mdi-map-marker-radius",color:"grey-darken-1",class:"mr-2"})]),default:n(()=>[t(z,{class:"text-caption text-grey-darken-1"},{default:n(()=>[...e[19]||(e[19]=[a(" 地区 ",-1)])]),_:1}),t(ne,{class:"text-body-2"},{default:n(()=>[a(v(i.testResultData.data.region),1)]),_:1})]),_:1})]),_:1})]),_:1}),t(U),t(bt,{class:"px-4 py-3"},{default:n(()=>[t(de,{dense:""},{default:n(()=>[t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",Ci,[t(g,{icon:"mdi-thermometer",color:"orange",class:"mr-2"}),c("div",null,[e[20]||(e[20]=c("div",{class:"text-caption text-grey"}," 温度 ",-1)),c("div",Vi,v(i.testResultData.data.weatherData.temperature)+"°C ",1)])])]),_:1}),t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",_i,[t(g,{icon:"mdi-weather-cloudy",color:"blue-grey",class:"mr-2"}),c("div",null,[e[21]||(e[21]=c("div",{class:"text-caption text-grey"}," 天气 ",-1)),c("div",Di,v(i.testResultData.data.weatherData.weather),1)])])]),_:1}),t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",Ai,[t(g,{icon:"mdi-water-percent",color:"blue",class:"mr-2"}),c("div",null,[e[22]||(e[22]=c("div",{class:"text-caption text-grey"}," 湿度 ",-1)),c("div",Ii,v(i.testResultData.data.weatherData.humidity)+"% ",1)])])]),_:1}),t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",Ti,[t(g,{icon:"mdi-weather-windy",color:"teal",class:"mr-2"}),c("div",null,[e[23]||(e[23]=c("div",{class:"text-caption text-grey"}," 风向/风力 ",-1)),c("div",Ui,v(i.testResultData.data.weatherData.windDirection)+" "+v(i.testResultData.data.weatherData.windPower)+"级 ",1)])])]),_:1}),t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",ji,[t(g,{icon:"mdi-blur",color:"grey",class:"mr-2"}),c("div",null,[e[24]||(e[24]=c("div",{class:"text-caption text-grey"}," PM2.5 ",-1)),c("div",Bi,v(i.testResultData.data.weatherData.pm25),1)])])]),_:1}),t(R,{cols:"6",sm:"4"},{default:n(()=>[c("div",Mi,[t(g,{icon:"mdi-eye",color:"indigo",class:"mr-2"}),c("div",null,[e[25]||(e[25]=c("div",{class:"text-caption text-grey"}," 能见度 ",-1)),c("div",Ni,v(i.testResultData.data.weatherData.visibility),1)])])]),_:1})]),_:1})]),_:1}),t(U),c("div",Pi,[e[26]||(e[26]=c("div",{class:"text-caption text-grey mb-2"}," 环境标签 ",-1)),c("div",zi,[(m(!0),k(H,null,te(i.testResultData.data.tags,r=>(m(),h(G,{key:r,size:"small",color:"primary",variant:"tonal",class:"mr-1 mb-1"},{default:n(()=>[a(v(r),1)]),_:2},1024))),128))])]),t(U),t(D,{class:"px-4 py-2"},{prepend:n(()=>[t(g,{icon:"mdi-clock-outline",size:"small",class:"mr-2"})]),default:n(()=>[t(z,{class:"text-caption text-grey-darken-1"},{default:n(()=>[a(" 北京时间: "+v(new Date(i.testResultData.data.beijingTime).toLocaleString()),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):b("",!0)]),_:1},8,["modelValue"])])}const ln=Q(vi,[["render",Ei]]),Li={name:"NotificationSoundSettings",data(){return{singleSound:"",urgentSound:"",currentAudio:null,showAutoplayWarning:!0}},computed:{soundOptions(){return ls.map(s=>({title:s.replace(".mp3",""),value:s}))}},mounted(){this.loadSettings()},beforeUnmount(){this.stopPreview()},methods:{loadSettings(){this.singleSound=y("notification.singleSound"),this.urgentSound=y("notification.urgentSound")},onSingleSoundChange(s){var e;re("notification.singleSound",s),(e=this.$message)==null||e.success("设置已保存",`单次通知铃声: ${s}`)},onUrgentSoundChange(s){var e;re("notification.urgentSound",s),(e=this.$message)==null||e.success("设置已保存",`紧急通知铃声: ${s}`)},async previewSound(s){var e,o;this.showAutoplayWarning=!1,this.stopPreview();try{const u=await this.playSoundWithPromise(s,!1);this.currentAudio=u,this.currentAudio&&this.currentAudio.addEventListener("ended",()=>{this.currentAudio=null},{once:!0})}catch(u){console.error("播放音频失败:",u),u.name==="NotAllowedError"?(e=this.$message)==null||e.warning("无法播放音频","浏览器阻止了自动播放,请再次点击试听按钮"):(o=this.$message)==null||o.error("播放失败","音频文件加载失败,请稍后重试")}},playSoundWithPromise(s,e=!1){return new Promise((o,u)=>{const i=this.getSoundPath(s);if(!i){u(new Error("音频文件不存在"));return}try{const l=new Audio(i);l.loop=e,l.play().then(()=>{o(l)}).catch(d=>{u(d)})}catch(l){u(l)}})},getSoundPath(s){if(!s)return null;try{return`/sounds/${s}`}catch{return null}},stopPreview(){this.currentAudio&&(is(this.currentAudio),this.currentAudio=null)},resetSingleSound(){var s;this.singleSound="Teams 默认.mp3",re("notification.singleSound",this.singleSound),(s=this.$message)==null||s.success("已恢复单次通知铃声默认设置")},resetUrgentSound(){var s;this.urgentSound="Teams 默认通话铃.mp3",re("notification.urgentSound",this.urgentSound),(s=this.$message)==null||s.success("已恢复紧急通知铃声默认设置")}}},Ri={class:"d-flex align-center"},Ki={class:"mt-3 d-flex gap-2"},Fi={class:"mt-3 d-flex gap-2"};function Oi(s,e,o,u,i,l){return m(),h(M,{class:"notification-sound-settings"},{default:n(()=>[t(K,null,{default:n(()=>[...e[5]||(e[5]=[a(" 通知铃声设置 ",-1)])]),_:1}),t(j,null,{default:n(()=>[i.showAutoplayWarning?(m(),h(Y,{key:0,type:"info",variant:"tonal",closable:"",class:"mb-4","onClick:close":e[0]||(e[0]=d=>i.showAutoplayWarning=!1)},{default:n(()=>[c("div",Ri,[t(g,{class:"mr-2"},{default:n(()=>[...e[6]||(e[6]=[a(" mdi-information ",-1)])]),_:1}),e[7]||(e[7]=c("span",null,"首次使用请点击试听按钮测试音频播放是否正常",-1))])]),_:1})):b("",!0),t(de,null,{default:n(()=>[t(R,{cols:"12"},{default:n(()=>[t(M,{border:""},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[t(g,{left:""},{default:n(()=>[...e[8]||(e[8]=[a(" mdi-bell-ring ",-1)])]),_:1}),e[9]||(e[9]=a(" 单次通知铃声 ",-1))]),_:1}),t(j,null,{default:n(()=>[t(Ze,{modelValue:i.singleSound,"onUpdate:modelValue":[e[1]||(e[1]=d=>i.singleSound=d),l.onSingleSoundChange],items:l.soundOptions,label:"选择铃声","prepend-icon":"mdi-music-note",variant:"outlined",density:"comfortable"},{item:n(({props:d,item:f})=>[t(D,Ve(d,{onClick:r=>l.previewSound(f.value)}),{prepend:n(()=>[t(g,null,{default:n(()=>[...e[10]||(e[10]=[a("mdi-music-note",-1)])]),_:1})]),append:n(()=>[t(p,{icon:"",size:"small",variant:"text",onClick:Ae(r=>l.previewSound(f.value),["stop"])},{default:n(()=>[t(g,null,{default:n(()=>[...e[11]||(e[11]=[a("mdi-play",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1040,["onClick"])]),_:1},8,["modelValue","items","onUpdate:modelValue"]),c("div",Ki,[t(p,{color:"primary",variant:"tonal",onClick:e[2]||(e[2]=d=>l.previewSound(i.singleSound))},{default:n(()=>[t(g,{left:""},{default:n(()=>[...e[12]||(e[12]=[a(" mdi-play ",-1)])]),_:1}),e[13]||(e[13]=a(" 试听 ",-1))]),_:1}),t(p,{onClick:l.resetSingleSound},{default:n(()=>[t(g,{left:""},{default:n(()=>[...e[14]||(e[14]=[a(" mdi-restore ",-1)])]),_:1}),e[15]||(e[15]=a(" 恢复 ",-1))]),_:1},8,["onClick"])])]),_:1})]),_:1})]),_:1}),t(R,{cols:"12"},{default:n(()=>[t(M,{border:""},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[t(g,{left:"",color:"error"},{default:n(()=>[...e[16]||(e[16]=[a(" mdi-bell-alert ",-1)])]),_:1}),e[17]||(e[17]=a(" 紧急通知铃声 ",-1))]),_:1}),t(j,null,{default:n(()=>[t(Ze,{modelValue:i.urgentSound,"onUpdate:modelValue":[e[3]||(e[3]=d=>i.urgentSound=d),l.onUrgentSoundChange],items:l.soundOptions,label:"选择铃声","prepend-icon":"mdi-music-note",variant:"outlined",density:"comfortable"},{item:n(({props:d,item:f})=>[t(D,Ve(d,{onClick:r=>l.previewSound(f.value)}),{prepend:n(()=>[t(g,null,{default:n(()=>[...e[18]||(e[18]=[a("mdi-music-note",-1)])]),_:1})]),append:n(()=>[t(p,{icon:"",size:"small",variant:"text",onClick:Ae(r=>l.previewSound(f.value),["stop"])},{default:n(()=>[t(g,null,{default:n(()=>[...e[19]||(e[19]=[a("mdi-play",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1040,["onClick"])]),_:1},8,["modelValue","items","onUpdate:modelValue"]),c("div",Fi,[t(p,{color:"error",variant:"tonal",onClick:e[4]||(e[4]=d=>l.previewSound(i.urgentSound))},{default:n(()=>[t(g,{left:""},{default:n(()=>[...e[20]||(e[20]=[a(" mdi-play ",-1)])]),_:1}),e[21]||(e[21]=a(" 试听 ",-1))]),_:1}),t(p,{onClick:l.resetUrgentSound},{default:n(()=>[t(g,{left:""},{default:n(()=>[...e[22]||(e[22]=[a(" mdi-restore ",-1)])]),_:1}),e[23]||(e[23]=a(" 恢复 ",-1))]),_:1},8,["onClick"])])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const on=Q(Li,[["render",Oi],["__scopeId","data-v-632dcdba"]]),Lt={sessions:[{name:"第1节晚自习",start:"19:20",duration:70,enabled:!0},{name:"第2节晚自习",start:"20:20",duration:110,enabled:!0}],alertThresholdDb:55},Ji={name:"NoiseSettingsCard",components:{SettingsCard:W,SettingItem:ve},data(){return{sessionLoading:!0,sessionSaving:!1,editSessions:[],editAlertThreshold:55,timePickerMenus:{}}},mounted(){this.loadSessionConfig()},methods:{async loadSessionConfig(){this.sessionLoading=!0;try{const s=await ie.loadData("noise-session-config"),e=(s==null?void 0:s.data)||s;e&&e.sessions?(this.editSessions=JSON.parse(JSON.stringify(e.sessions)),this.editAlertThreshold=e.alertThresholdDb||55):this.resetSessionConfig()}catch{this.resetSessionConfig()}finally{this.sessionLoading=!1}},async saveSessionConfig(){this.sessionSaving=!0;try{const s={sessions:this.editSessions,alertThresholdDb:this.editAlertThreshold};await ie.saveData("noise-session-config",s)}catch(s){console.error("保存自习配置失败:",s)}finally{this.sessionSaving=!1}},resetSessionConfig(){this.editSessions=JSON.parse(JSON.stringify(Lt.sessions)),this.editAlertThreshold=Lt.alertThresholdDb},addSession(){this.editSessions.push({name:`第${this.editSessions.length+1}节晚自习`,start:"19:00",duration:70,enabled:!0})},sessionEndTime(s){if(!(s!=null&&s.start)||!(s!=null&&s.duration))return"--:--";const[e,o]=s.start.split(":").map(Number),u=e*60+o+(s.duration||0),i=Math.floor(u/60)%24,l=u%60;return`${String(i).padStart(2,"0")}:${String(l).padStart(2,"0")}`}}},Hi={class:"px-4 pb-4"},Qi={class:"d-flex align-center mb-4"},Gi={class:"d-flex align-center ga-3 flex-wrap"},Wi={class:"text-caption text-medium-emphasis"},Yi={key:0,class:"text-center text-medium-emphasis py-4"},qi={class:"d-flex align-center mb-4"},Zi={class:"d-flex align-center flex-wrap ga-4 mb-4"},Xi={class:"d-flex justify-end ga-3 mb-2"};function $i(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{border:"",icon:"mdi-microphone",title:"噪音监测"},{default:n(()=>[t(O,null,{default:n(()=>[t(d,{"setting-key":"noiseMonitor.enabled"}),t(U,{class:"my-2"}),t(d,{"setting-key":"noiseMonitor.autoStart"}),t(U,{class:"my-2"}),t(d,{"setting-key":"noiseMonitor.permissionDismissed"})]),_:1}),t(U,{class:"mb-4"}),c("div",Hi,[c("div",Qi,[t(g,{class:"mr-2",color:"teal"},{default:n(()=>[...e[1]||(e[1]=[a(" mdi-clock-edit-outline ",-1)])]),_:1}),e[3]||(e[3]=c("span",{class:"text-subtitle-1 font-weight-bold"},"晚自习时间段",-1)),t(Z),t(p,{color:"primary",variant:"tonal",size:"small","prepend-icon":"mdi-plus",onClick:l.addSession},{default:n(()=>[...e[2]||(e[2]=[a(" 添加时段 ",-1)])]),_:1},8,["onClick"])]),e[10]||(e[10]=c("div",{class:"text-caption text-medium-emphasis mb-4"}," 配置晚自习时间段后,系统会在对应时段内自动开启噪音监测并记录统计报告。时间段外不会长期记录。 ",-1)),i.sessionLoading?(m(),h(os,{key:0,type:"card",class:"mb-4"})):(m(),k(H,{key:1},[(m(!0),k(H,null,te(i.editSessions,(r,w)=>(m(),k("div",{key:w,class:"mb-3"},[t(M,{variant:"outlined",rounded:"xl"},{default:n(()=>[t(j,{class:"pa-4"},{default:n(()=>[c("div",Gi,[t(N,{modelValue:r.name,"onUpdate:modelValue":x=>r.name=x,density:"compact",variant:"outlined",label:"名称","hide-details":"",style:{"max-width":"160px"}},null,8,["modelValue","onUpdate:modelValue"]),t(gt,{modelValue:i.timePickerMenus[w],"onUpdate:modelValue":x=>i.timePickerMenus[w]=x,"close-on-content-click":!1,location:"bottom"},{activator:n(({props:x})=>[t(N,Ve({ref_for:!0},x,{"model-value":r.start,density:"compact",variant:"outlined",label:"开始时间",readonly:"","hide-details":"","prepend-inner-icon":"mdi-clock-outline",style:{"max-width":"170px"}}),null,16,["model-value"])]),default:n(()=>[t(as,{modelValue:r.start,"onUpdate:modelValue":[x=>r.start=x,x=>i.timePickerMenus[w]=!1],color:"primary",format:"24hr",scrollable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"]),t(N,{modelValue:r.duration,"onUpdate:modelValue":x=>r.duration=x,modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"时长",suffix:"分钟","hide-details":"",style:{"max-width":"130px"},min:10,max:300},null,8,["modelValue","onUpdate:modelValue"]),c("span",Wi," 至 "+v(l.sessionEndTime(r)),1),t(ht,{modelValue:r.enabled,"onUpdate:modelValue":x=>r.enabled=x,density:"compact",color:"primary","hide-details":"",label:"启用"},null,8,["modelValue","onUpdate:modelValue"]),t(p,{icon:"mdi-delete",color:"error",size:"x-small",variant:"text",onClick:x=>i.editSessions.splice(w,1)},null,8,["onClick"])])]),_:2},1024)]),_:2},1024)]))),128)),i.editSessions.length===0?(m(),k("div",Yi,[t(g,{class:"mb-1"},{default:n(()=>[...e[4]||(e[4]=[a(" mdi-clock-outline ",-1)])]),_:1}),e[5]||(e[5]=c("div",{class:"text-caption"}," 暂无时间段,点击上方「添加时段」创建 ",-1))])):b("",!0)],64)),t(U,{class:"my-5"}),c("div",qi,[t(g,{class:"mr-2",color:"orange"},{default:n(()=>[...e[6]||(e[6]=[a(" mdi-alert-decagram ",-1)])]),_:1}),e[7]||(e[7]=c("span",{class:"text-subtitle-1 font-weight-bold"},"监测参数",-1))]),c("div",Zi,[t(N,{modelValue:i.editAlertThreshold,"onUpdate:modelValue":e[0]||(e[0]=r=>i.editAlertThreshold=r),modelModifiers:{number:!0},density:"compact",variant:"outlined",type:"number",label:"噪音报警阈值",suffix:"dB","hide-details":"",style:{"max-width":"200px"},min:30,max:90},null,8,["modelValue"])]),c("div",Xi,[t(p,{variant:"text","prepend-icon":"mdi-restore",onClick:l.resetSessionConfig},{default:n(()=>[...e[8]||(e[8]=[a(" 重置 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"primary",variant:"elevated","prepend-icon":"mdi-content-save",loading:i.sessionSaving,onClick:l.saveSessionConfig},{default:n(()=>[...e[9]||(e[9]=[a(" 保存配置 ",-1)])]),_:1},8,["loading","onClick"])])])]),_:1})}const an=Q(Ji,[["render",$i]]),el={name:"DisplaySettingsCard",components:{SettingsCard:W,SettingItem:ve},setup(){return{theme:$n()}},data(){return{localTheme:y("theme.mode")}},watch:{localTheme(s){re("theme.mode",s),this.theme.global.name.value=s}}};function tl(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{border:"",icon:"mdi-monitor",title:"显示设置"},{default:n(()=>[t(O,null,{default:n(()=>[t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-theme-light-dark"})]),append:n(()=>[t(Ot,{modelValue:i.localTheme,"onUpdate:modelValue":e[0]||(e[0]=r=>i.localTheme=r),color:"primary",density:"comfortable"},{default:n(()=>[t(p,{value:"light"},{default:n(()=>[t(g,{class:"mr-2",icon:"mdi-white-balance-sunny"}),e[3]||(e[3]=a(" 明亮 ",-1))]),_:1}),t(p,{value:"dark"},{default:n(()=>[t(g,{class:"mr-2",icon:"mdi-moon-waning-crescent"}),e[4]||(e[4]=a(" 暗黑 ",-1))]),_:1})]),_:1},8,["modelValue"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[1]||(e[1]=[a("主题模式",-1)])]),_:1}),t(ne,null,{default:n(()=>[...e[2]||(e[2]=[a("选择明亮或暗黑主题",-1)])]),_:1})]),_:1}),t(U,{class:"my-2"}),t(d,{"setting-key":"timeCard.enabled"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.emptySubjectDisplay"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.dynamicSort"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.showRandomButton"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.showFullscreenButton"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.cardHoverEffect"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.enhancedTouchMode"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.showQuickTools"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.showAntiScreenBurnCard"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.showExamScheduleButton"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.forceDesktopMode"}),t(U,{class:"my-2"}),t(d,{"setting-key":"display.lateStudentsArePresent"})]),_:1})]),_:1})}const rn=Q(el,[["render",tl]]),nl={};function sl(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{icon:"mdi-cog",title:"编辑设置"},{default:n(()=>[t(O,null,{default:n(()=>[t(d,{"setting-key":"edit.autoSave"}),t(U,{class:"my-2"}),t(d,{"setting-key":"edit.blockNonTodayAutoSave"}),t(U,{class:"my-2"}),t(d,{"setting-key":"edit.confirmNonTodaySave"}),t(U,{class:"my-2"}),t(d,{"setting-key":"edit.refreshBeforeEdit"}),t(U,{class:"my-2"}),t(d,{"setting-key":"edit.autoSavePromptText"}),t(U,{class:"my-2"}),t(d,{"setting-key":"edit.manualSavePromptText"})]),_:1})]),_:1})}const un=Q(nl,[["render",sl]]),il={name:"RefreshSettingsCard",components:{SettingsCard:W},data(){return{}}};function ll(s,e,o,u,i,l){const d=ve,f=W;return m(),h(f,{icon:"mdi-refresh-circle",title:"刷新设置"},{default:n(()=>[t(Yt,null,{default:n(()=>[t(O,null,{default:n(()=>[t(d,{"setting-key":"refresh.auto",title:"自动刷新"}),t(U,{class:"my-2"}),t(d,{"setting-key":"refresh.interval",title:"刷新间隔"})]),_:1})]),_:1})]),_:1})}const dn=Q(il,[["render",ll]]),ol={name:"SettingsLinkGenerator",data(){return{selectedItems:[],generatedLink:"",linkCopied:!1,search:"",preconfigForm:{namespace:"",authCode:"",autoExecute:!1},unifiedLink:"",headers:[{title:"",key:"data-table-select"},{title:"设置项",key:"description",sortable:!0},{title:"当前值",key:"value",sortable:!0},{title:"键名",key:"key",class:"d-none d-sm-table-cell",sortable:!0},{title:"状态",key:"isChanged",sortable:!0}]}},computed:{settingItems(){const s=Re(),e=[];for(const[o,u]of Object.entries(ut)){if(u.requireDeveloper&&!s["developer.enabled"])continue;const i=s[o]!==u.default;e.push({key:o,description:u.description||o,value:s[o],icon:u.icon||"mdi-cog",isChanged:i,defaultValue:u.default})}return e.sort((o,u)=>o.key.localeCompare(u.key))},filteredItems(){if(!this.search)return this.settingItems;const s=this.search.toLowerCase();return s==="已修改"?this.settingItems.filter(e=>e.isChanged):s==="是"||s==="否"?this.settingItems.filter(e=>typeof e.value=="boolean"&&(s==="是"?e.value:!e.value)):this.settingItems.filter(e=>{const o=e.description.toLowerCase(),u=e.key.toLowerCase(),i=String(e.value).toLowerCase(),l=e.isChanged?"已修改":"默认";return o.includes(s)||u.includes(s)||i.includes(s)||l.includes(s)})},hasDisplaySettings(){return this.selectedItems.some(s=>s.startsWith("display."))},hasEditSettings(){return this.selectedItems.some(s=>s.startsWith("edit."))},hasServerSettings(){return this.selectedItems.some(s=>s.startsWith("server."))},hasChangedSettings(){const s=Re();return this.selectedItems.some(e=>{const o=ut[e];return o&&s[e]!==o.default})}},watch:{selectedItems:{handler(){this.preconfigForm.namespace.trim()&&this.generateUnifiedLink()},deep:!0},"preconfigForm.namespace":{handler(){this.preconfigForm.namespace.trim()?this.generateUnifiedLink():this.unifiedLink=""}},"preconfigForm.authCode":{handler(){this.preconfigForm.namespace.trim()&&this.generateUnifiedLink()}},"preconfigForm.autoExecute":{handler(){this.preconfigForm.namespace.trim()&&this.generateUnifiedLink()}}},methods:{handleSelectionChange(s){this.selectedItems=s.map(e=>e.key),this.generateLink()},generateLink(){const s=`${window.location.protocol}//${window.location.host}/`,e=Re(),o={};for(const u of this.selectedItems)o[u]=e[u];if(Object.keys(o).length===0){this.generatedLink=s;return}try{const u=JSON.stringify(o),l=new TextEncoder().encode(u),f={config:btoa(Array.from(l).map(I=>String.fromCharCode(I)).join(""))},w=new URLSearchParams(window.location.search).get("date");w&&(f.date=w);const x=new URLSearchParams(f).toString();this.generatedLink=`${s}?${x}`}catch(u){console.error("生成链接失败:",u),this.generatedLink="链接生成失败,请重试"}this.linkCopied=!1},async copyLink(){this.generatedLink||this.generateLink();try{await navigator.clipboard.writeText(this.generatedLink),this.linkCopied=!0,setTimeout(()=>{this.linkCopied=!1},3e3)}catch(s){console.error("复制链接失败:",s)}},resetSelection(){this.selectedItems=[],this.generatedLink="",this.linkCopied=!1},selectAll(){this.selectedItems=this.settingItems.map(s=>s.key),this.generateLink()},selectDataSourceSettings(){const s=this.settingItems.filter(e=>e.key.startsWith("server.")&&e.key!=="server.kvToken").map(e=>e.key);this.selectedItems=s,this.generateLink()},selectChangedSettings(){const s=this.settingItems.filter(e=>e.isChanged&&e.key!=="server.kvToken").map(e=>e.key);this.selectedItems=s,this.generateLink()},selectByPrefix(s){const e=this.settingItems.filter(o=>o.key.startsWith(`${s}.`)).map(o=>o.key);this.selectedItems=e},autoGenerateLink(){this.selectedItems.length>0?this.generateLink():this.generatedLink=""},getSettingDescription(s){const e=this.settingItems.find(o=>o.key===s);return e?e.description:s},generateUnifiedLink(){if(this.preconfigForm.namespace.trim())try{const s=`${window.location.protocol}//${window.location.host}/`,e=new URLSearchParams;if(e.append("namespace",this.preconfigForm.namespace.trim()),this.preconfigForm.authCode.trim()&&e.append("authCode",this.preconfigForm.authCode.trim()),this.preconfigForm.autoExecute&&e.append("autoExecute","true"),this.selectedItems.length>0){const o=Re(),u={};for(const r of this.selectedItems)u[r]=o[r];const i=JSON.stringify(u),d=new TextEncoder().encode(i),f=btoa(Array.from(d).map(r=>String.fromCharCode(r)).join(""));e.append("config",f)}this.unifiedLink=`${s}?${e.toString()}`,this.linkCopied=!1,console.log("生成统一链接:",this.unifiedLink),console.log("包含预配置:",!!this.preconfigForm.namespace),console.log("包含设置数量:",this.selectedItems.length)}catch(s){console.error("生成统一链接失败:",s),this.unifiedLink="链接生成失败,请重试"}},async copyUnifiedLink(){if(this.unifiedLink||this.generateUnifiedLink(),!(!this.unifiedLink||this.unifiedLink.includes("失败")))try{await navigator.clipboard.writeText(this.unifiedLink),this.linkCopied=!0,setTimeout(()=>{this.linkCopied=!1},3e3)}catch(s){console.error("复制统一链接失败:",s)}},openTestLink(){this.unifiedLink&&!this.unifiedLink.includes("失败")&&window.open(this.unifiedLink,"_blank")},clearAll(){this.preconfigForm={namespace:"",authCode:"",autoExecute:!1},this.selectedItems=[],this.unifiedLink="",this.generatedLink="",this.linkCopied=!1}}},al={class:"d-flex mb-3 gap-2 flex-wrap"},rl={class:"d-flex align-center mb-3 flex-wrap gap-2"},ul={class:"d-flex align-center"},dl={class:"d-flex align-center"},cl={key:0},ml={key:1},fl={key:2},pl={class:"text-caption text-grey"},hl={class:"d-flex mb-3 gap-2 flex-wrap"},gl={class:"d-flex flex-wrap gap-1"};function wl(s,e,o,u,i,l){return m(),k("div",null,[t(M,{border:"",class:"unified-link-generator"},{default:n(()=>[t(K,{class:"text-h6"},{default:n(()=>[t(g,{class:"mr-2",icon:"mdi-link-variant",start:""}),e[6]||(e[6]=a(" 统一链接生成器 ",-1))]),_:1}),t(j,null,{default:n(()=>[e[35]||(e[35]=c("div",{class:"text-body-2 text-medium-emphasis mb-4"}," 生成包含预配置认证信息和设置的统一链接。可以同时预配置设备认证和应用设置。 ",-1)),t(M,{class:"mb-4",variant:"tonal"},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[t(g,{start:""},{default:n(()=>[...e[7]||(e[7]=[a(" mdi-account-key ",-1)])]),_:1}),e[8]||(e[8]=a(" 预配置认证信息 ",-1))]),_:1}),t(j,null,{default:n(()=>[t(de,null,{default:n(()=>[t(R,{cols:"12",md:"6"},{default:n(()=>[t(N,{modelValue:i.preconfigForm.namespace,"onUpdate:modelValue":e[0]||(e[0]=d=>i.preconfigForm.namespace=d),hint:"设备的命名空间标识符",label:"命名空间","persistent-hint":"",placeholder:"例如: classroom-001","prepend-inner-icon":"mdi-identifier",variant:"outlined"},null,8,["modelValue"])]),_:1}),t(R,{cols:"12",md:"6"},{default:n(()=>[t(N,{modelValue:i.preconfigForm.authCode,"onUpdate:modelValue":e[1]||(e[1]=d=>i.preconfigForm.authCode=d),hint:"留空则需要用户手动输入",label:"认证码","persistent-hint":"",placeholder:"设备认证码(可选)","prepend-inner-icon":"mdi-lock-outline",variant:"outlined"},null,8,["modelValue"])]),_:1})]),_:1}),t(de,{class:"mt-2"},{default:n(()=>[t(R,{cols:"12"},{default:n(()=>[t(Se,{modelValue:i.preconfigForm.autoExecute,"onUpdate:modelValue":e[2]||(e[2]=d=>i.preconfigForm.autoExecute=d),density:"compact",hint:"启用后会自动尝试认证,即使没有认证码也会尝试",label:"自动执行认证","persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),i.preconfigForm.namespace?(m(),h(Y,{key:0,class:"mt-3",type:"info",variant:"tonal"},{default:n(()=>[e[13]||(e[13]=c("div",{class:"text-subtitle-2 mb-2"}," 预配置信息: ",-1)),t(G,{class:"mr-2 mb-1",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[9]||(e[9]=[a(" mdi-identifier ",-1)])]),_:1}),a(" 命名空间: "+v(i.preconfigForm.namespace),1)]),_:1}),i.preconfigForm.authCode?(m(),h(G,{key:0,class:"mr-2 mb-1",color:"warning",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[10]||(e[10]=[a(" mdi-lock ",-1)])]),_:1}),a(" 认证码: "+v(i.preconfigForm.authCode.length>8?i.preconfigForm.authCode.substring(0,8)+"...":i.preconfigForm.authCode),1)]),_:1})):(m(),h(G,{key:1,class:"mr-2 mb-1",color:"grey",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[11]||(e[11]=[a(" mdi-lock-open ",-1)])]),_:1}),e[12]||(e[12]=a(" 无认证码 ",-1))]),_:1})),t(G,{color:i.preconfigForm.autoExecute?"success":"orange",class:"mr-2 mb-1",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[a(v(i.preconfigForm.autoExecute?"mdi-play-circle":"mdi-hand-back-left"),1)]),_:1}),a(" "+v(i.preconfigForm.autoExecute?"自动认证":"手动认证"),1)]),_:1},8,["color"])]),_:1})):b("",!0)]),_:1})]),_:1}),t(M,{class:"mb-4",variant:"tonal"},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[t(g,{start:""},{default:n(()=>[...e[14]||(e[14]=[a(" mdi-cog-transfer ",-1)])]),_:1}),e[15]||(e[15]=a(" 设置分享(可选) ",-1))]),_:1}),t(j,null,{default:n(()=>[e[22]||(e[22]=c("div",{class:"text-body-2 text-medium-emphasis mb-3"}," 选择需要包含在链接中的设置项。如果不选择任何设置,将只生成预配置认证链接。 ",-1)),c("div",al,[t(p,{color:"primary","prepend-icon":"mdi-server-network",size:"small",variant:"tonal",onClick:l.selectDataSourceSettings},{default:n(()=>[...e[16]||(e[16]=[a(" 数据源设置 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"primary","prepend-icon":"mdi-compare",size:"small",variant:"tonal",onClick:l.selectChangedSettings},{default:n(()=>[...e[17]||(e[17]=[a(" 已变更设置 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"success","prepend-icon":"mdi-select-all",size:"small",variant:"tonal",onClick:l.selectAll},{default:n(()=>[...e[18]||(e[18]=[a(" 全选 ",-1)])]),_:1},8,["onClick"]),t(p,{color:"error","prepend-icon":"mdi-select-remove",size:"small",variant:"tonal",onClick:l.resetSelection},{default:n(()=>[...e[19]||(e[19]=[a(" 清除选择 ",-1)])]),_:1},8,["onClick"])]),c("div",rl,[t(G,{class:"mr-2",color:"primary"},{default:n(()=>[a(" 已选 "+v(i.selectedItems.length)+" 项设置 ",1)]),_:1}),i.selectedItems.length>0?(m(),k(H,{key:0},[(m(!0),k(H,null,te(i.selectedItems.slice(0,3),d=>(m(),h(G,{key:d,class:"mr-1",size:"small",variant:"text"},{default:n(()=>[a(v(l.getSettingDescription(d)),1)]),_:2},1024))),128)),i.selectedItems.length>3?(m(),h(G,{key:0,color:"grey",size:"small",variant:"text"},{default:n(()=>[a(" +"+v(i.selectedItems.length-3)+" 更多 ",1)]),_:1})):b("",!0)],64)):b("",!0)]),t(kt,{variant:"accordion"},{default:n(()=>[t(yt,null,{default:n(()=>[t(qt,null,{default:n(({expanded:d})=>[c("div",ul,[t(g,{class:"mr-2"},{default:n(()=>[a(v(d?"mdi-chevron-up":"mdi-chevron-down"),1)]),_:2},1024),e[20]||(e[20]=a(" 显示设置列表详情 ",-1))])]),_:1}),t(xt,null,{default:n(()=>[t(N,{modelValue:i.search,"onUpdate:modelValue":e[3]||(e[3]=d=>i.search=d),class:"mb-4",clearable:"","hide-details":"",label:"搜索设置","prepend-inner-icon":"mdi-magnify","single-line":""},null,8,["modelValue"]),t(Zt,{modelValue:i.selectedItems,"onUpdate:modelValue":e[4]||(e[4]=d=>i.selectedItems=d),headers:i.headers,items:l.filteredItems,"items-per-page":l.settingItems.length,"sort-by":[{key:"isChanged",order:"desc"}],class:"rounded setting-table",density:"compact","item-value":"key","show-select":"","onUpdate:selected":l.handleSelectionChange},{"item.description":n(({item:d})=>[c("div",dl,[t(g,{icon:d.icon,class:"mr-2",size:"small"},null,8,["icon"]),a(" "+v(d.description)+" ",1),d.key==="server.kvToken"?(m(),h(G,{key:0,class:"ml-2",color:"error",size:"x-small"},{default:n(()=>[...e[21]||(e[21]=[a(" 敏感 ",-1)])]),_:1})):b("",!0)])]),"item.value":n(({item:d})=>[typeof d.value=="boolean"?(m(),k("span",cl,v(d.value?"是":"否"),1)):d.key==="server.kvToken"&&d.value?(m(),k("span",ml,v(d.value.substring(0,8))+"... ",1)):(m(),k("span",fl,v(d.value),1))]),"item.key":n(({item:d})=>[c("span",pl,v(d.key),1)]),"item.isChanged":n(({item:d})=>[t(G,{color:d.isChanged?"warning":"success",text:d.isChanged?"已修改":"默认",density:"compact",size:"x-small"},null,8,["color","text"])]),_:2},1032,["modelValue","headers","items","items-per-page","onUpdate:selected"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(M,{class:"mb-4",variant:"outlined"},{default:n(()=>[t(K,{class:"text-subtitle-1"},{default:n(()=>[t(g,{start:""},{default:n(()=>[...e[23]||(e[23]=[a(" mdi-link ",-1)])]),_:1}),e[24]||(e[24]=a(" 生成的统一链接 ",-1))]),_:1}),t(j,null,{default:n(()=>[c("div",hl,[t(p,{disabled:!i.preconfigForm.namespace.trim(),color:"primary","prepend-icon":"mdi-auto-fix",variant:"flat",onClick:l.generateUnifiedLink},{default:n(()=>[...e[25]||(e[25]=[a(" 生成统一链接 ",-1)])]),_:1},8,["disabled","onClick"]),t(p,{disabled:!i.unifiedLink,color:"success","prepend-icon":"mdi-test-tube",variant:"tonal",onClick:l.openTestLink},{default:n(()=>[...e[26]||(e[26]=[a(" 测试链接 ",-1)])]),_:1},8,["disabled","onClick"]),t(p,{color:"error","prepend-icon":"mdi-delete",variant:"tonal",onClick:l.clearAll},{default:n(()=>[...e[27]||(e[27]=[a(" 清空所有 ",-1)])]),_:1},8,["onClick"])]),t(N,{modelValue:i.unifiedLink,"onUpdate:modelValue":e[5]||(e[5]=d=>i.unifiedLink=d),"append-inner-icon":i.linkCopied?"mdi-check":"mdi-content-copy",placeholder:i.preconfigForm.namespace?"点击「生成统一链接」按钮":"请先输入命名空间",class:"mb-3",label:"统一链接",readonly:"",variant:"outlined","onClick:appendInner":l.copyUnifiedLink},null,8,["modelValue","append-inner-icon","placeholder","onClick:appendInner"]),i.unifiedLink?(m(),h(Y,{key:0,class:"mb-3",type:"success",variant:"tonal"},{default:n(()=>[e[33]||(e[33]=c("div",{class:"text-subtitle-2 mb-2"}," 链接包含内容: ",-1)),c("div",gl,[t(G,{color:"primary",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[28]||(e[28]=[a(" mdi-account-key ",-1)])]),_:1}),e[29]||(e[29]=a(" 预配置认证 ",-1))]),_:1}),i.selectedItems.length>0?(m(),h(G,{key:0,color:"secondary",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[30]||(e[30]=[a(" mdi-cog ",-1)])]),_:1}),a(" "+v(i.selectedItems.length)+" 项设置 ",1)]),_:1})):(m(),h(G,{key:1,color:"grey",size:"small"},{default:n(()=>[t(g,{size:"small",start:""},{default:n(()=>[...e[31]||(e[31]=[a(" mdi-cog-off ",-1)])]),_:1}),e[32]||(e[32]=a(" 无额外设置 ",-1))]),_:1}))])]),_:1})):b("",!0)]),_:1})]),_:1}),t(Y,{type:"warning",variant:"tonal"},{default:n(()=>[...e[34]||(e[34]=[c("div",{class:"text-subtitle-2 mb-2"}," ⚠️ 安全提醒 ",-1),c("ul",{class:"text-body-2 pl-4"},[c("li",null,"认证码和设置信息会在URL中传输,请谨慎分发"),c("li",null,"建议仅在受信任的网络环境中使用"),c("li",null,"生产环境建议使用HTTPS协议"),c("li",null,"数据源设置和已变更设置默认不包含敏感Token信息")],-1)])]),_:1})]),_:1})]),_:1})])}const cn=Q(ol,[["render",wl]]),vl={name:"UnsavedWarning",props:{show:Boolean,message:{type:String,default:"未保存"}}},bl={class:"warning-container"};function kl(s,e,o,u,i,l){return m(),k("div",bl,[o.show?(m(),h(G,{key:0,class:"warning-chip",color:"warning",size:"small"},{default:n(()=>[a(v(o.message),1)]),_:1})):b("",!0)])}const st=Q(vl,[["render",kl],["__scopeId","data-v-0f36b655"]]),yl=Fe({disabled:Boolean,modelValue:{type:Boolean,default:null},...Bn()},"VHover"),mn=tt()({name:"VHover",props:yl(),emits:{"update:modelValue":s=>!0},setup(s,e){let{slots:o}=e;const u=Wt(s,"modelValue"),{runOpenDelay:i,runCloseDelay:l}=jn(s,d=>!s.disabled&&(u.value=d));return()=>{var d;return(d=o.default)==null?void 0:d.call(o,{isHovering:u.value,props:{onMouseenter:i,onMouseleave:l}})}}}),xl={name:"TeacherListCard",components:{UnsavedWarning:st},props:{isMobile:Boolean},data(){return{newTeacher:{name:"",subjects:[],isHeadTeacher:!1},editState:{index:-1,teacher:null},modelValue:{list:[],text:"",advanced:!1},loading:!1,error:null,lastSavedData:null,unsavedChanges:!1,commonSubjects:["语文","数学","英语","物理","化学","生物","政治","历史","地理","信息技术","音乐","美术","体育"]}},watch:{modelValue:{handler(s){this.lastSavedData&&(this.unsavedChanges=JSON.stringify(s.list)!==JSON.stringify(this.lastSavedData)),this.modelValue.advanced||(this.modelValue.text=JSON.stringify(s.list,null,2))},deep:!0}},mounted(){this.loadTeachers()},methods:{async loadTeachers(){var s;this.error=null;try{if(this.loading=!0,!y("server.classNumber"))throw new Error("请先设置班号");try{const o=await ie.loadData("classworks-list-teacher");o.success!==!1&&Array.isArray(o)&&(this.modelValue.list=o.map(u=>({name:u.name||"",subjects:Array.isArray(u.subjects)?u.subjects:[],isHeadTeacher:!!u.isHeadTeacher})),this.modelValue.text=JSON.stringify(this.modelValue.list,null,2),this.lastSavedData=JSON.parse(JSON.stringify(this.modelValue.list)),this.unsavedChanges=!1)}catch(o){console.warn("Failed to load teacher list, initializing empty list",o),this.modelValue.list=[],this.modelValue.text="[]",this.lastSavedData=[]}}catch(e){console.error("加载教师列表失败:",e),this.error=e.message||"加载失败,请检查设置",(s=this.$message)==null||s.error("加载失败",this.error)}finally{this.loading=!1}},async saveTeachers(){var s,e,o;try{if(!y("server.classNumber"))throw new Error("请先设置班号");const i=this.modelValue.list.map(d=>({name:d.name,subjects:Array.isArray(d.subjects)?d.subjects:[],isHeadTeacher:!!d.isHeadTeacher})),l=await ie.saveData("classworks-list-teacher",i);if(l.success===!1)throw new Error(((s=l.error)==null?void 0:s.message)||"保存失败");this.modelValue.list=i,this.lastSavedData=JSON.parse(JSON.stringify(i)),this.unsavedChanges=!1,(e=this.$message)==null||e.success("保存成功","教师列表已更新")}catch(u){console.error("保存教师列表失败:",u),(o=this.$message)==null||o.error("保存失败",u.message||"请重试")}},toggleAdvanced(){this.modelValue.advanced=!this.modelValue.advanced,this.modelValue.advanced&&(this.modelValue.text=JSON.stringify(this.modelValue.list,null,2))},handleTextInput(s){if(this.modelValue.advanced)try{const e=JSON.parse(s);Array.isArray(e)?(this.modelValue.list=e.map(o=>({name:o.name||"",subjects:Array.isArray(o.subjects)?o.subjects:[],isHeadTeacher:!!o.isHeadTeacher})),this.error=null):this.error="JSON 必须是一个数组"}catch(e){this.error="JSON 格式错误: "+e.message}},addTeacher(){var e,o;const s=this.newTeacher.name.trim();if(!s){(e=this.$message)==null||e.warning("提示","请输入教师姓名");return}if(this.newTeacher.subjects.length===0){(o=this.$message)==null||o.warning("提示","请选择至少一个任教科目");return}this.modelValue.list.push({name:s,subjects:[...this.newTeacher.subjects],isHeadTeacher:this.newTeacher.isHeadTeacher}),this.newTeacher={name:"",subjects:[],isHeadTeacher:!1}},startEdit(s,e){this.editState.index=s,this.editState.teacher={name:e.name,subjects:[...e.subjects],isHeadTeacher:e.isHeadTeacher}},saveEdit(){var s,e;if(this.editState.index!==-1){const o=this.editState.teacher.name.trim();if(!o){(s=this.$message)==null||s.warning("提示","教师姓名不能为空");return}if(this.editState.teacher.subjects.length===0){(e=this.$message)==null||e.warning("提示","请选择至少一个任教科目");return}this.modelValue.list[this.editState.index]={name:o,subjects:[...this.editState.teacher.subjects],isHeadTeacher:this.editState.teacher.isHeadTeacher},this.editState.index=-1,this.editState.teacher=null}},cancelEdit(){this.editState.index=-1,this.editState.teacher=null},removeTeacher(s){s!==void 0&&this.modelValue.list.splice(s,1)},handleClick(s,e){this.isMobile&&this.startEdit(s,e)}}},Sl={key:0},Cl={class:"d-flex align-start mb-3"},Vl={class:"flex-grow-1"},_l={class:"d-flex align-center mb-1"},Dl=["onClick"],Al={key:0,class:"mt-2"},Il={key:1,class:"mt-1"},Tl={key:1,class:"pt-2"};function Ul(s,e,o,u,i,l){const d=st;return m(),h(M,{class:pe({"unsaved-changes":i.unsavedChanges}),color:i.unsavedChanges?"warning-subtle":void 0,border:""},{default:n(()=>[t(ze,null,{prepend:n(()=>[t(g,{class:"mr-2",icon:"mdi-account-tie",size:"large"})]),append:n(()=>[t(d,{show:i.unsavedChanges,message:"有未保存的更改"},null,8,["show"]),t(p,{color:i.modelValue.advanced?"primary":void 0,"prepend-icon":"mdi-code-braces",variant:"text",onClick:l.toggleAdvanced},{default:n(()=>[a(v(i.modelValue.advanced?"返回基础编辑":"高级编辑"),1)]),_:1},8,["color","onClick"])]),default:n(()=>[t(K,{class:"text-h6"},{default:n(()=>[...e[4]||(e[4]=[a(" 教师列表 ",-1)])]),_:1})]),_:1}),t(j,null,{default:n(()=>[i.loading?(m(),h($e,{key:0,class:"mb-4",color:"primary",indeterminate:""})):b("",!0),i.error?(m(),h(Y,{key:1,class:"mb-4",closable:"",type:"error",variant:"tonal"},{default:n(()=>[a(v(i.error),1)]),_:1})):b("",!0),t(Ht,null,{default:n(()=>[i.modelValue.advanced?(m(),k("div",Tl,[t(Pe,{modelValue:i.modelValue.text,"onUpdate:modelValue":[e[3]||(e[3]=f=>i.modelValue.text=f),l.handleTextInput],hint:"JSON 格式编辑教师列表。每个教师需包含 name、subjects(数组)、isHeadTeacher(布尔值)",label:"批量编辑教师列表 (JSON)","persistent-hint":"",placeholder:'[{"name":"教师姓名","subjects":["语文","数学"],"isHeadTeacher":true}]',rows:"15",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue"])])):(m(),k("div",Sl,[t(M,{class:"mb-6",variant:"outlined"},{default:n(()=>[t(j,null,{default:n(()=>[t(de,null,{default:n(()=>[t(R,{cols:"12",md:"4"},{default:n(()=>[t(N,{modelValue:i.newTeacher.name,"onUpdate:modelValue":e[0]||(e[0]=f=>i.newTeacher.name=f),density:"comfortable","hide-details":"",label:"教师姓名",placeholder:"输入教师姓名","prepend-inner-icon":"mdi-account",variant:"outlined"},null,8,["modelValue"])]),_:1}),t(R,{cols:"12",md:"5"},{default:n(()=>[t(Ut,{modelValue:i.newTeacher.subjects,"onUpdate:modelValue":e[1]||(e[1]=f=>i.newTeacher.subjects=f),items:i.commonSubjects,chips:"",clearable:"","closable-chips":"",density:"comfortable","hide-details":"",label:"任教科目",multiple:"",placeholder:"选择或输入科目","prepend-inner-icon":"mdi-book-open-variant",variant:"outlined"},null,8,["modelValue","items"])]),_:1}),t(R,{cols:"12",md:"3",class:"d-flex align-center gap-2"},{default:n(()=>[t(Se,{modelValue:i.newTeacher.isHeadTeacher,"onUpdate:modelValue":e[2]||(e[2]=f=>i.newTeacher.isHeadTeacher=f),density:"comfortable","hide-details":"",label:"班主任"},null,8,["modelValue"]),t(p,{disabled:!i.newTeacher.name.trim()||i.newTeacher.subjects.length===0,color:"primary","prepend-icon":"mdi-plus",onClick:l.addTeacher},{default:n(()=>[...e[5]||(e[5]=[a(" 添加教师 ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1}),i.modelValue.list.length===0?(m(),h(de,{key:0},{default:n(()=>[t(R,{cols:"12"},{default:n(()=>[t(Y,{type:"info",variant:"tonal"},{default:n(()=>[...e[6]||(e[6]=[a(" 暂无教师信息,请添加教师 ",-1)])]),_:1})]),_:1})]),_:1})):(m(),h(de,{key:1},{default:n(()=>[(m(!0),k(H,null,te(i.modelValue.list,(f,r)=>(m(),h(R,{key:r,cols:"12",lg:"6",xl:"4"},{default:n(()=>[t(mn,null,{default:n(({isHovering:w,props:x})=>[t(M,Ve({elevation:o.isMobile?1:w?4:1,border:"",class:"teacher-card"},{ref_for:!0},x),{default:n(()=>[t(j,{class:"pa-4"},{default:n(()=>[c("div",Cl,[t(et,{color:f.isHeadTeacher?"primary":"grey-lighten-1",class:"mr-3",size:"48"},{default:n(()=>[t(g,{icon:f.isHeadTeacher?"mdi-star":"mdi-account",size:"28"},null,8,["icon"])]),_:2},1032,["color"]),c("div",Vl,[c("div",_l,[i.editState.index===r?(m(),h(N,{key:0,modelValue:i.editState.teacher.name,"onUpdate:modelValue":I=>i.editState.teacher.name=I,autofocus:"",class:"flex-grow-1",density:"compact","hide-details":"",variant:"underlined"},null,8,["modelValue","onUpdate:modelValue"])):(m(),k("span",{key:1,class:"text-h6 font-weight-medium",onClick:I=>l.handleClick(r,f)},v(f.name),9,Dl)),f.isHeadTeacher?(m(),h(G,{key:2,class:"ml-2",color:"primary",density:"comfortable",size:"small",variant:"flat"},{default:n(()=>[...e[7]||(e[7]=[a(" 班主任 ",-1)])]),_:1})):b("",!0)]),i.editState.index===r?(m(),k("div",Al,[t(Ut,{modelValue:i.editState.teacher.subjects,"onUpdate:modelValue":I=>i.editState.teacher.subjects=I,items:i.commonSubjects,chips:"","closable-chips":"",density:"compact","hide-details":"",label:"任教科目",multiple:"",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"]),t(Se,{modelValue:i.editState.teacher.isHeadTeacher,"onUpdate:modelValue":I=>i.editState.teacher.isHeadTeacher=I,class:"mt-2",density:"compact","hide-details":"",label:"班主任"},null,8,["modelValue","onUpdate:modelValue"])])):(m(),k("div",Il,[(m(!0),k(H,null,te(f.subjects,(I,F)=>(m(),h(G,{key:F,class:"mr-1 mb-1",density:"comfortable",size:"small",variant:"tonal"},{default:n(()=>[a(v(I),1)]),_:2},1024))),128))]))]),c("div",{class:pe([{"opacity-100":w||o.isMobile||i.editState.index===r},"d-flex gap-1 action-buttons ml-2"])},[i.editState.index===r?(m(),h(p,{key:0,color:"success",icon:"mdi-check",size:"small",variant:"text",onClick:l.saveEdit},null,8,["onClick"])):b("",!0),i.editState.index===r?(m(),h(p,{key:1,color:"grey",icon:"mdi-close",size:"small",variant:"text",onClick:l.cancelEdit},null,8,["onClick"])):(m(),h(p,{key:2,color:"primary",icon:"mdi-pencil",size:"small",variant:"text",onClick:I=>l.startEdit(r,f)},null,8,["onClick"])),i.editState.index!==r?(m(),h(p,{key:3,color:"error",icon:"mdi-delete",size:"small",variant:"text",onClick:I=>l.removeTeacher(r)},null,8,["onClick"])):b("",!0)],2)])]),_:2},1024)]),_:2},1040,["elevation"])]),_:2},1024)]),_:2},1024))),128))]),_:1}))]))]),_:1}),t(de,{class:"mt-6"},{default:n(()=>[t(R,{class:"d-flex gap-2",cols:"12"},{default:n(()=>[t(p,{disabled:i.loading,loading:i.loading,color:"primary","prepend-icon":"mdi-content-save",size:"large",onClick:l.saveTeachers},{default:n(()=>[...e[8]||(e[8]=[a(" 保存教师列表 ",-1)])]),_:1},8,["disabled","loading","onClick"]),t(p,{disabled:i.loading,loading:i.loading,color:"error","prepend-icon":"mdi-refresh",size:"large",variant:"outlined",onClick:l.loadTeachers},{default:n(()=>[...e[9]||(e[9]=[a(" 重载教师列表 ",-1)])]),_:1},8,["disabled","loading","onClick"])]),_:1})]),_:1})]),_:1})]),_:1},8,["class","color"])}const fn=Q(xl,[["render",Ul],["__scopeId","data-v-96a84acd"]]);let rt=null;async function jl(){return rt||(rt=(await Ft(async()=>{const{pinyin:s}=await import("./index-DdToQrR8.js");return{pinyin:s}},[],import.meta.url)).pinyin),rt}const Bl={name:"StudentListCard",components:{UnsavedWarning:st},props:{isMobile:Boolean},data(){return{newStudentName:"",editState:{index:-1,name:""},modelValue:{list:[],text:"",advanced:!1},loading:!1,error:null,lastSavedData:null,unsavedChanges:!1}},watch:{modelValue:{handler(s){this.lastSavedData&&(this.unsavedChanges=JSON.stringify(s.list)!==JSON.stringify(this.lastSavedData)),this.modelValue.advanced||(this.modelValue.text=s.list.slice().sort((e,o)=>e.id-o.id).map(e=>e.name).join(` `))},deep:!0}},mounted(){this.loadStudents()},methods:{async loadStudents(){var s;this.error=null;try{if(this.loading=!0,!y("server.classNumber"))throw new Error("请先设置班号");try{const o=await ie.loadData("classworks-list-main");o.success!=!1&&Array.isArray(o)&&(this.modelValue.list=o.map((u,i)=>typeof u=="string"?{id:i+1,name:u}:{id:u.id||i+1,name:u.name||u.toString()}),this.modelValue.list.sort((u,i)=>u.id-i.id),this.modelValue.text=this.modelValue.list.map(u=>u.name).join(` `),this.lastSavedData=JSON.parse(JSON.stringify(this.modelValue.list)),this.unsavedChanges=!1)}catch(o){console.warn("Failed to load student list from dedicated key, falling back to config",o)}}catch(e){console.error("加载学生列表失败:",e),this.error=e.message||"加载失败,请检查设置",(s=this.$message)==null||s.error("加载失败",this.error)}finally{this.loading=!1}},async saveStudents(){var s,e,o;try{if(!y("server.classNumber"))throw new Error("请先设置班号");const i=this.modelValue.list.slice().sort((d,f)=>d.id-f.id).map((d,f)=>({id:f+1,name:d.name})),l=await ie.saveData("classworks-list-main",i);if(l.success===!1)throw new Error(((s=l.error)==null?void 0:s.message)||"保存失败");this.modelValue.list=i,this.lastSavedData=JSON.parse(JSON.stringify(i)),this.unsavedChanges=!1,(e=this.$message)==null||e.success("保存成功","学生列表已更新")}catch(u){console.error("保存学生列表失败:",u),(o=this.$message)==null||o.error("保存失败",u.message||"请重试")}},toggleAdvanced(){this.modelValue.advanced=!this.modelValue.advanced},handleTextInput(s){if(!this.modelValue.advanced)return;const e=s.split(` @@ -15,7 +15,7 @@ ${f}`}else l&&(d+=` 依次尝试的服务器: ${u} -所有服务器均连接失败`}this.$message.error("连接失败",o)}finally{this.loading=!1}},confirmClearLocalStorage(){this.confirmTitle="确认清除",this.confirmMessage="此操作将清除所有本地存储的数据,确定要继续吗?",this.confirmAction=this.clearLocalStorage,this.confirmDialog=!0},clearLocalStorage(){try{localStorage.clear(),this.$message.success("清除成功","本地存储数据已清除"),this.confirmDialog=!1}catch(s){this.$message.error("清除失败",s.message)}},confirmClearIndexedDB(){this.confirmTitle="确认清除",this.confirmMessage="此操作将清除所有IndexedDB中的数据,确定要继续吗?",this.confirmAction=this.clearIndexedDB,this.confirmDialog=!0},async clearIndexedDB(){try{await window.indexedDB.deleteDatabase("ClassworksDB"),this.$message.success("清除成功","数据库缓存已清除"),this.confirmDialog=!1,this.isKvProvider&&setTimeout(()=>{window.location.reload()},1500)}catch(s){this.$message.error("清除失败",s.message)}},async exportData(){try{const s="ClassworksDB",e={indexedDB:{}},o=await new Promise((r,w)=>{const x=window.indexedDB.open(s);x.onerror=()=>w(x.error),x.onsuccess=()=>r(x.result)}),u=Array.from(o.objectStoreNames);for(const r of u){const x=o.transaction(r,"readonly").objectStore(r),I=await new Promise((F,$)=>{const J=x.getAll();J.onerror=()=>$(J.error),J.onsuccess=()=>F(J.result)});e.indexedDB[r]=I}const i=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),l=URL.createObjectURL(i),d=document.createElement("a"),f=new Date().toISOString().split("T")[0];d.href=l,d.download=`homework-indexeddb-${f}.json`,d.click(),URL.revokeObjectURL(l),this.$message.success("导出成功","IndexedDB数据已导出")}catch(s){console.error("导出失败:",s),this.$message.error("导出失败",s.message||"无法导出数据库数据")}},async migrateData(){this.migrateLoading=!0,this.$router.push("/datamigration"),this.migrateLoading=!1},handleConfirm(){this.confirmAction&&this.confirmAction()}}};function Xl(s,e,o,u,i,l){const d=W;return m(),h(d,{icon:"mdi-database-cog",title:"数据源设置"},{default:n(()=>[t(O,null,{default:n(()=>[l.currentProvider==="kv-server"||l.currentProvider==="classworkscloud"?(m(),h(D,{key:0},{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-lan-connect"})]),append:n(()=>[t(p,{loading:i.loading,variant:"tonal",onClick:l.checkServerConnection},{default:n(()=>[...e[3]||(e[3]=[a(" 测试连接 ",-1)])]),_:1},8,["loading","onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[2]||(e[2]=[a("检查服务器连接",-1)])]),_:1})]),_:1})):b("",!0),l.currentProvider==="kv-local"?(m(),k(H,{key:1},[t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-database"})]),append:n(()=>[t(p,{color:"error",variant:"tonal",onClick:l.confirmClearIndexedDB},{default:n(()=>[...e[6]||(e[6]=[a(" 清除 ",-1)])]),_:1},8,["onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[4]||(e[4]=[a("清除数据库缓存",-1)])]),_:1}),t(ne,null,{default:n(()=>[...e[5]||(e[5]=[a(" 这将清除所有本地数据库中的数据 ",-1)])]),_:1})]),_:1}),t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-database-export"})]),append:n(()=>[t(p,{variant:"tonal",onClick:l.exportData},{default:n(()=>[...e[8]||(e[8]=[a(" 导出 ",-1)])]),_:1},8,["onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[7]||(e[7]=[a("导出数据库",-1)])]),_:1})]),_:1})],64)):b("",!0),t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-lan-connect"})]),append:n(()=>[t(p,{to:"/cachemanagement",variant:"tonal"},{default:n(()=>[...e[10]||(e[10]=[a(" 查看 ",-1)])]),_:1})]),default:n(()=>[t(z,null,{default:n(()=>[...e[9]||(e[9]=[a("查看本地缓存",-1)])]),_:1})]),_:1})]),_:1}),t(we,{modelValue:i.confirmDialog,"onUpdate:modelValue":e[1]||(e[1]=f=>i.confirmDialog=f),"max-width":"400"},{default:n(()=>[t(M,null,{default:n(()=>[t(K,null,{default:n(()=>[a(v(i.confirmTitle),1)]),_:1}),t(j,null,{default:n(()=>[a(v(i.confirmMessage),1)]),_:1}),t(ue,null,{default:n(()=>[t(Z),t(p,{color:"grey",variant:"text",onClick:e[0]||(e[0]=f=>i.confirmDialog=!1)},{default:n(()=>[...e[11]||(e[11]=[a(" 取消 ",-1)])]),_:1}),t(p,{color:"error",variant:"tonal",onClick:l.handleConfirm},{default:n(()=>[...e[12]||(e[12]=[a(" 确认 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const wn=Q(Zl,[["render",Xl]]),$l={name:"CloudNamespaceInfoCard",props:{visible:{type:Boolean,default:!0}},data(){return{namespaceInfo:{},loading:!1,hasNamespaceInfo:!1,showReinitDialog:!1,defaultAuthServer:y("server.authDomain")}},watch:{visible(s){s===!0&&this.fetchNamespaceInfo()}},mounted(){this.visible&&this.fetchNamespaceInfo()},methods:{formatDate(s){if(!s)return"未知";try{return new Date(s).toLocaleString("zh-CN")}catch{return s}},async fetchNamespaceInfo(){this.loading=!0;try{const s=await ss.loadNamespaceInfo();this.namespaceInfo=s,this.hasNamespaceInfo=!0,this.loading=!1}catch(s){console.error("获取命名空间信息失败:",s),this.hasNamespaceInfo=!1,this.namespaceInfo={}}finally{this.loading=!1}},async reloadInfo(){await this.fetchNamespaceInfo()},getBindAccountUrl(){var e,o;const s=(o=(e=this.namespaceInfo)==null?void 0:e.device)==null?void 0:o.uuid;return s?`${this.defaultAuthServer}?uuid=${encodeURIComponent(s)}&tolinktoaccount=true`:this.defaultAuthServer},confirmReinitialize(){re("server.kvToken",""),re("device.uuid",""),this.showReinitDialog=!1,this.$router.push("/")}}},eo={key:0,class:"mb-4"},to={key:1,class:"d-flex align-center mb-4"},no={class:"d-flex flex-column gap-1"},so={class:"d-flex align-center"},io={class:"d-flex align-center"},lo={key:0,class:"d-flex align-center"},oo={class:"text-truncate"},ao={class:"d-flex align-center"},ro={key:1,class:"d-flex align-center"};function uo(s,e,o,u,i,l){return m(),h(M,{disabled:!i.hasNamespaceInfo,loading:i.loading,class:"my-4"},{loader:n(()=>[i.loading?(m(),h($e,{key:0,color:"primary",indeterminate:""})):b("",!0)]),default:n(()=>[t(K,null,{default:n(()=>[t(g,{class:"me-2"},{default:n(()=>[...e[3]||(e[3]=[a(" mdi-cloud-check ",-1)])]),_:1}),e[4]||(e[4]=a(" 设备信息 ",-1))]),_:1}),i.hasNamespaceInfo?(m(),h(j,{key:0},{default:n(()=>[i.namespaceInfo.hasAccount===!1?(m(),k("div",eo,[t(Y,{border:"",type:"warning",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[5]||(e[5]=[a("设备未绑定账号",-1)])]),_:1}),e[7]||(e[7]=c("div",null,"当前设备尚未绑定账号,部分功能可能受限。请前往绑定账号以获得完整体验。",-1)),t(p,{href:l.getBindAccountUrl(),"append-icon":"mdi-open-in-new",class:"mt-3",target:"_blank",variant:"outlined"},{default:n(()=>[...e[6]||(e[6]=[a(" 前往绑定账号 ",-1)])]),_:1},8,["href"])]),_:1})])):b("",!0),i.namespaceInfo.hasAccount&&i.namespaceInfo.account?(m(),k("div",to,[t(M,{"prepend-avatar":i.namespaceInfo.account.avatarUrl,subtitle:"此设备由贵校管理 管理员账号 ID: "+i.namespaceInfo.account.id,title:i.namespaceInfo.account.name||"未命名用户",border:"",class:"w-100",hover:"",variant:"tonal"},{default:n(()=>[t(j,null,{default:n(()=>[...e[8]||(e[8]=[a(" 此设备由贵校或贵单位管理,该管理员系此空间所有者,如有疑问请咨询他,对于恶意绑定、滥用行为请反馈。 ",-1)])]),_:1})]),_:1},8,["prepend-avatar","subtitle","title"])])):b("",!0),i.namespaceInfo.device?(m(),h(M,{key:2,border:"",class:"mb-4",hover:"",variant:"tonal"},{default:n(()=>[t(K,{class:"pb-1"},{default:n(()=>[...e[9]||(e[9]=[a(" 设备信息 ",-1)])]),_:1}),t(j,null,{default:n(()=>[c("div",no,[c("div",so,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[10]||(e[10]=[a(" mdi-tag ",-1)])]),_:1}),e[11]||(e[11]=c("span",{class:"font-weight-medium me-2"},"设备名称:",-1)),c("span",null,v(i.namespaceInfo.device.name||"未命名设备"),1)]),c("div",io,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[12]||(e[12]=[a(" mdi-identifier ",-1)])]),_:1}),e[13]||(e[13]=c("span",{class:"font-weight-medium me-2"},"设备 ID:",-1)),c("span",null,v(i.namespaceInfo.device.id),1)]),i.namespaceInfo.hasAccount===!1&&i.namespaceInfo.device.uuid?(m(),k("div",lo,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[14]||(e[14]=[a(" mdi-uuid ",-1)])]),_:1}),e[15]||(e[15]=c("span",{class:"font-weight-medium me-2"},"UUID:",-1)),c("span",oo,v(i.namespaceInfo.device.uuid),1)])):b("",!0),c("div",ao,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[16]||(e[16]=[a(" mdi-calendar ",-1)])]),_:1}),e[17]||(e[17]=c("span",{class:"font-weight-medium me-2"},"创建时间:",-1)),c("span",null,v(l.formatDate(i.namespaceInfo.device.createdAt)),1)]),i.namespaceInfo.device.updatedAt?(m(),k("div",ro,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[18]||(e[18]=[a(" mdi-calendar-clock ",-1)])]),_:1}),e[19]||(e[19]=c("span",{class:"font-weight-medium me-2"},"更新时间:",-1)),c("span",null,v(l.formatDate(i.namespaceInfo.device.updatedAt)),1)])):b("",!0)])]),_:1})]),_:1})):b("",!0),t(M,{border:"",hover:"",subtitle:"文档形键值数据库",title:"Classworks KV"},{default:n(()=>[t(j,null,{default:n(()=>[...e[20]||(e[20]=[a(" Classworks KV 是厚浪云推出的文档形键值数据库,其是一个开放的云应用平台,为各种应用提供存储服务。此设备正在使用其服务,如果您希望管理设备信息,请前往 Classworks KV 的网站,如果您在服务推出前就在使用 Classworks,您的数据已被自动迁移。 ",-1),c("br",null,null,-1),c("br",null,null,-1),a(" Classworks KV 的全域管理员是 ",-1),c("a",{href:"https://wuyuan.dev",target:"_blank"}," 孙悟元 ",-1)])]),_:1}),t(ue,null,{default:n(()=>[t(p,{href:i.defaultAuthServer,"append-icon":"mdi-open-in-new",class:"text-none",target:"_blank"},{default:n(()=>[...e[21]||(e[21]=[a(" 前往 Classworks KV ",-1)])]),_:1},8,["href"])]),_:1})]),_:1})]),_:1})):(m(),h(j,{key:1},{default:n(()=>[t(Y,{type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[22]||(e[22]=[a("未获取到设备信息",-1)])]),_:1}),e[23]||(e[23]=c("p",null,"您尚未完成云端存储授权或连接失败,请点击下方按钮进行初始化。",-1))]),_:1})]),_:1})),t(ue,null,{default:n(()=>[t(Z),t(p,{loading:i.loading,color:"primary",variant:"outlined",onClick:l.reloadInfo},{default:n(()=>[...e[24]||(e[24]=[a(" 刷新设备信息 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{color:"error",variant:"outlined",onClick:e[0]||(e[0]=d=>i.showReinitDialog=!0)},{default:n(()=>[...e[25]||(e[25]=[a(" 重新初始化云端存储 ",-1)])]),_:1})]),_:1}),t(we,{modelValue:i.showReinitDialog,"onUpdate:modelValue":e[2]||(e[2]=d=>i.showReinitDialog=d),"max-width":"500"},{default:n(()=>[t(M,null,{default:n(()=>[t(K,null,{default:n(()=>[...e[26]||(e[26]=[a("确认重新初始化",-1)])]),_:1}),t(j,null,{default:n(()=>[t(Y,{class:"mb-3",type:"warning",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[27]||(e[27]=[a("警告",-1)])]),_:1}),e[28]||(e[28]=a(" 此操作将清除当前的云端存储配置(包括 Token),您需要重新进行授权。 ",-1))]),_:1}),e[29]||(e[29]=c("p",null,"您确定要重新初始化云端存储吗?",-1))]),_:1}),t(ue,null,{default:n(()=>[t(Z),t(p,{variant:"text",onClick:e[1]||(e[1]=d=>i.showReinitDialog=!1)},{default:n(()=>[...e[30]||(e[30]=[a(" 取消 ",-1)])]),_:1}),t(p,{color:"error",onClick:l.confirmReinitialize},{default:n(()=>[...e[31]||(e[31]=[a(" 确认 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["disabled","loading"])}const vn=Q($l,[["render",uo]]),co={name:"ServerSettingsCard",components:{SettingsCard:W,CloudNamespaceInfoCard:vn},props:{loading:Boolean},data(){return{unwatch:null,serverSettings:{provider:y("server.provider"),domain:y("server.domain"),classNumber:y("server.classNumber"),kvToken:y("server.kvToken")},settingsChangeTimeout:null}},computed:{currentProvider(){return this.serverSettings.provider},isKvProvider(){return this.currentProvider==="kv-local"||this.currentProvider==="kv-server"},isClassworksCloud(){return this.currentProvider==="classworkscloud"},useServer(){return this.currentProvider==="server"||this.currentProvider==="kv-server"||this.currentProvider==="classworkscloud"}},watch:{serverSettings:{handler(){this.settingsChangeTimeout&&clearTimeout(this.settingsChangeTimeout),this.settingsChangeTimeout=setTimeout(()=>{this.saveAllSettings()},100)},deep:!0}},mounted(){this.loadAllSettings(),this.unwatch=pt(()=>{this.loadAllSettings(),this.$forceUpdate&&this.$forceUpdate()})},beforeUnmount(){this.unwatch&&this.unwatch()},methods:{loadAllSettings(){this.serverSettings={provider:y("server.provider"),domain:y("server.domain"),classNumber:y("server.classNumber"),kvToken:y("server.kvToken")}},saveAllSettings(){Object.entries(this.serverSettings).forEach(([s,e])=>{const o=`server.${s}`,u=y(o);e!==u&&(re(o,e)?console.log(`设置已更新: ${o} = ${e}`):(console.error(`设置失败: ${o}`),this.serverSettings[s]=u))})}}},mo={key:0},fo={key:2},po={key:3},ho={key:4};function go(s,e,o,u,i,l){const d=vn,f=W;return m(),h(f,{loading:o.loading,icon:"mdi-database",title:"数据源设置"},{default:n(()=>[t(Yt,null,{default:n(()=>[t(Ze,{modelValue:i.serverSettings.provider,"onUpdate:modelValue":e[0]||(e[0]=r=>i.serverSettings.provider=r),items:[{title:"Classworks云端存储",value:"classworkscloud"},{title:"KV本地存储",value:"kv-local"},{title:"KV远程服务器",value:"kv-server"}],class:"mb-3",density:"comfortable","item-title":"title","item-value":"value",label:"数据提供者","prepend-icon":"mdi-database",variant:"outlined"},null,8,["modelValue"]),l.isKvProvider?(m(),h(Y,{key:0,class:"my-2",type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[5]||(e[5]=[a("KV 存储系统",-1)])]),_:1}),e[7]||(e[7]=c("p",null,"KV存储系统使用本机唯一标识符(UUID)来区分不同设备的数据。",-1)),l.currentProvider==="kv-server"?(m(),k("p",mo,[...e[6]||(e[6]=[a(" 服务器端点格式: ",-1),c("code",null,"http(s)://服务器域名/",-1),c("br",null,null,-1),a(" 在服务器域名处仅填写基础URL,不需要任何路径。 ",-1)])])):b("",!0)]),_:1})):b("",!0),l.isClassworksCloud?(m(),h(Y,{key:1,class:"my-2",color:"success",type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[8]||(e[8]=[a("Classworks云端存储",-1)])]),_:1}),e[9]||(e[9]=c("p",null,"Classworks云端存储是官方提供的存储解决方案,自动配置了最优的访问设置。",-1)),e[10]||(e[10]=c("p",null,"使用此选项时,服务器域名和网站令牌将自动配置,无需手动设置。",-1))]),_:1})):b("",!0),t(U,{class:"my-2"}),l.isClassworksCloud?(m(),k("div",fo,[t(N,{modelValue:i.serverSettings.kvToken,"onUpdate:modelValue":e[1]||(e[1]=r=>i.serverSettings.kvToken=r),class:"mb-2",density:"comfortable",hint:"令牌用于云端存储授权",label:"KV 授权令牌","persistent-hint":"","prepend-icon":"mdi-shield-key",variant:"outlined"},null,8,["modelValue"]),t(d,{visible:l.isClassworksCloud,class:"mt-4"},null,8,["visible"])])):l.currentProvider==="kv-server"?(m(),k("div",po,[t(N,{modelValue:i.serverSettings.domain,"onUpdate:modelValue":e[2]||(e[2]=r=>i.serverSettings.domain=r),class:"mb-2",density:"comfortable",hint:"例如: https://example.com (不需要路径)",label:"服务器域名","persistent-hint":"","prepend-icon":"mdi-web",variant:"outlined"},null,8,["modelValue"]),t(N,{modelValue:i.serverSettings.kvToken,"onUpdate:modelValue":e[3]||(e[3]=r=>i.serverSettings.kvToken=r),class:"mb-2",density:"comfortable",hint:"令牌用于服务器验证",label:"KV 授权令牌","persistent-hint":"","prepend-icon":"mdi-shield-key",variant:"outlined"},null,8,["modelValue"])])):l.currentProvider==="kv-local"?(m(),k("div",ho,[t(N,{modelValue:i.serverSettings.classNumber,"onUpdate:modelValue":e[4]||(e[4]=r=>i.serverSettings.classNumber=r),class:"mb-2",density:"comfortable",hint:"例如: 高三八班",label:"班级编号","persistent-hint":"","prepend-icon":"mdi-account-group",variant:"outlined"},null,8,["modelValue"])])):b("",!0)]),_:1})]),_:1},8,["loading"])}const bn=Q(co,[["render",go]]),wo="classworks",vo="module",bo="0.0.0",ko={dev:"vite --host",build:"vite build",preview:"vite preview",lint:"eslint . --fix",prebuild:"node scripts/generate-sound-list.js"},yo={"@fingerprintjs/fingerprintjs":"^5.0.1","@mdi/font":"7.4.47","@microsoft/clarity":"^1.0.2","@sentry/vue":"^10.36.0","@vueuse/core":"^14.1.0","@wydev/noise-core":"^0.1.0",axios:"^1.13.2",idb:"^8.0.3","js-base64":"^3.7.8","lucide-vue-next":"^0.555.0","pinyin-pro":"^3.27.0","ratelimit-header-parser":"^0.1.0","roboto-fontface":"*","socket.io-client":"^4.8.1","typewriter-effect":"^2.22.0",uuid:"^13.0.0",vue:"^3.5.25","vue-sonner":"^2.0.9",vuetify:"^3.11.0",vite:"^5.4.11"},xo={"@eslint/js":"^9.39.1","@vite-pwa/assets-generator":"^1.0.2","@vitejs/plugin-vue":"^6.0.2",eslint:"^9.39.1","eslint-plugin-import":"^2.32.0","eslint-plugin-n":"^17.23.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^7.2.1","eslint-plugin-vue":"^10.6.2",pinia:"^3.0.4",sass:"1.94.2","sass-embedded":"^1.93.3","unplugin-auto-import":"^20.3.0","unplugin-fonts":"^1.4.0","unplugin-vue-components":"^30.0.0","unplugin-vue-router":"^0.18.0","vite-plugin-pwa":"^1.2.0","vite-plugin-vue-devtools":"^7.6.8","vite-plugin-vue-layouts":"^0.11.0","vite-plugin-vuetify":"^2.1.2","vue-router":"^4.6.3"},Le={name:wo,private:!0,type:vo,version:bo,scripts:ko,dependencies:yo,devDependencies:xo},So="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAa9SURBVHic7dY9jlxVFIXRY8SsCEDyMCAjgRFBYokARoGQQII5EDIJYhNgyb9td9euqvfu3WuN4CTf1nn2958/vRyg0mdHHwAcxwBAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFPj/6AI7z2+9/zW9//HX0Gct6/uUX8/yrL44+I+IDKCX+zA7xzxiASuLP7BL/jAGoI/7MTvHPGIAq4s/sFv+MAagh/syO8c8YgAriz+wa/4wB2J74MzvHP2MAtib+zO7xzxiAbYk/0xD/jAHYkvgzLfHPGIDtiD/TFP+MAdiK+DNt8c8YgG2IP9MY/4wB2IL4M63xzxiA5Yk/0xz/jAFYmvgz7fHPGIBliT8j/v8ZgAWJPyP+1wzAYsSfEf/bDMBCxJ8R//sMwCLEnxH/hxmABYg/I/6HGYCTE39G/B9nAE5M/Bnxf5oBOCnxZ8T/OAbghMSfEf/jGYCTEX9G/E9jAE5E/BnxP50BOAnxZ8R/GQNwAuLPiP9yBuBg4s+IP2MADiT+jPhzBuAg4s+I/zoMwAHEnxH/9RiAOxN/RvzXZQDuSPwZ8V+fAbgT8WfEfxsG4A7EnxH/7RiAGxN/Rvy3ZQBuSPwZ8d+eAbgR8WfEfx8G4AbEnxH//RiAKxN/Rvz3ZQCuSPwZ8d+fAbgS8WfEfwwDcAXiz4j/OAYgJP6M+I9lAALiz4j/eAbgQuLPiP8cDMAFxJ8R/3kYgCcSf0b852IAnkD8GfGfjwF4JPFnxH9OBuARxJ8R/3kZgE8Qf0b852YAPkL8GfGfnwF4gPgz4l+DAfgA8WfEvw4D8A7xZ8S/FgPwBvFnxL8eA/CK+DPiX5MBGPGnxL+u+gEQf0b8a6seAPFnxL++2gEQf0b8e6gcAPFnxL+PugEQf0b8e6kaAPFnxL+fmgEQf0b8e6oYAPFnxL+v7QdA/Bnx723rARB/Rvz723YAxJ8Rf4ctB0D8GfH32G4AxJ8Rf5etBkD8GfH32WYAxJ8Rf6ctBkD8GfH3Wn4AxJ8Rf7dn//7z68ujj+AYP774ZX548fPRZyzr+2+/me++/froMyLLfwBcRvyZHeKfMQCVxJ/ZJf4ZA1BH/Jmd4p8xAFXEn9kt/hkDUEP8mR3jnzEAFcSf2TX+GQOwPfFndo5/xgBsTfyZ3eOfMQDbEn+mIf4ZA7Al8Wda4p8xANsRf6Yp/hkDsBXxZ9rinzEA2xB/pjH+GQOwBfFnWuOfMQDLE3+mOf4ZA7A08Wfa458xAMsSf0b8/zMACxJ/RvyvGYDFiD8j/rcZgIWIPyP+9xmARYg/I/4PMwALEH9G/A8zACcn/oz4P84AnJj4M+L/NANwUuLPiP9xDMAJiT8j/sczACcj/oz4n8YAnIj4M+J/OgNwEuLPiP8yBuAExJ8R/+UMwMHEnxF/xgAcSPwZ8ecMwEHEnxH/dRiAA4g/I/7rMQB3Jv6M+K/LANyR+DPivz4DcCfiz4j/NgzAHYg/I/7bMQA3Jv6M+G/LANyQ+DPivz0DcCPiz4j/PgzADYg/I/77MQBXJv6M+O/LAFyR+DPivz8DcCXiz4j/GAbgCsSfEf9xDEBI/BnxH8sABMSfEf/xDMCFxJ8R/zkYgAuIPyP+8zAATyT+jPjPxQA8gfgz4j8fA/BI4s+I/5wMwCOIPyP+8zIAnyD+jPjPzQB8hPgz4j8/A/AA8WfEvwYD8AHiz4h/HQbgHeLPiH8tBuAN4s+Ifz0G4BXxZ8S/JgMw4k+Jf131AyD+jPjXVj0A4s+If321AyD+jPj3UDkA4s+Ifx91AyD+jPj3UjUA4s+Ifz81AyD+jPj3VDEA4s+If1/bD4D4M+Lf29YDIP6M+Pe37QCIPyP+DlsOgPgz4u+x3QCIPyP+LlsNgPgz4u+zzQCIPyP+TlsMgPgz4u+1/ACIPyP+bs/+/efXl0cfARxj+Q8AuJwBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAiv0Hs2PMhrt8KlMAAAAASUVORK5CYII=",Co={name:"AboutCard",setup(){const s=se([]),e=se(!1),o=se(!1),u=se(""),i=se(!1),l=se(!1),d="964979747",f="https://qm.qq.com/q/T6qImKJjGi",r=Kn(),w=()=>{try{const _={...Le.dependencies||{},...Le.devDependencies||{}},E=Object.entries(_).map(([q,P])=>({name:q,version:P.replace(/[\^~]/g,""),description:x(q)}));s.value=E}catch(_){console.error("加载依赖信息失败:",_),s.value=[]}},x=_=>({vue:"渐进式 JavaScript 框架",vuetify:"材料设计组件框架",axios:"Promise 基础的 HTTP 客户端",pinia:"Vue 状态管理库","vue-router":"Vue.js 官方路由管理器","@vitejs/plugin-vue":"Vite 的 Vue 插件"})[_]||"",I=()=>{r.push("/debug")},F=async()=>{i.value=!0;try{const _=await ds();u.value=_||""}catch(_){console.error("获取访客ID失败",_)}finally{i.value=!1}},$=()=>F(),J=async()=>{o.value=!0,u.value||await F()},he=async()=>{try{await navigator.clipboard.writeText(ce.value),l.value=!0,setTimeout(()=>l.value=!1,1800)}catch(_){console.error("复制失败",_)}},ae=L(()=>{var A,X;const _=navigator||{},E=typeof Intl<"u"&&Intl.DateTimeFormat?Intl.DateTimeFormat().resolvedOptions():{},q=E&&E.timeZone?E.timeZone:"",P=((X=(A=r.currentRoute)==null?void 0:A.value)==null?void 0:X.fullPath)||location.pathname;return[`App 版本: v${Le==null?void 0:Le.version}`,`URL: ${location.href}`,`路由: ${P}`,`UserAgent: ${_.userAgent||""}`,`语言: ${_.language||""}`,`时区: ${q}`,`平台: ${_.platform||""}`,`在线: ${String(_.onLine)}`,`屏幕: ${(screen==null?void 0:screen.width)||"-"}x${(screen==null?void 0:screen.height)||"-"}`,`视口: ${window.innerWidth||"-"}x${window.innerHeight||"-"}`].join(` +所有服务器均连接失败`}this.$message.error("连接失败",o)}finally{this.loading=!1}},confirmClearLocalStorage(){this.confirmTitle="确认清除",this.confirmMessage="此操作将清除所有本地存储的数据,确定要继续吗?",this.confirmAction=this.clearLocalStorage,this.confirmDialog=!0},clearLocalStorage(){try{localStorage.clear(),this.$message.success("清除成功","本地存储数据已清除"),this.confirmDialog=!1}catch(s){this.$message.error("清除失败",s.message)}},confirmClearIndexedDB(){this.confirmTitle="确认清除",this.confirmMessage="此操作将清除所有IndexedDB中的数据,确定要继续吗?",this.confirmAction=this.clearIndexedDB,this.confirmDialog=!0},async clearIndexedDB(){try{await window.indexedDB.deleteDatabase("ClassworksDB"),this.$message.success("清除成功","数据库缓存已清除"),this.confirmDialog=!1,this.isKvProvider&&setTimeout(()=>{window.location.reload()},1500)}catch(s){this.$message.error("清除失败",s.message)}},async exportData(){try{const s="ClassworksDB",e={indexedDB:{}},o=await new Promise((r,w)=>{const x=window.indexedDB.open(s);x.onerror=()=>w(x.error),x.onsuccess=()=>r(x.result)}),u=Array.from(o.objectStoreNames);for(const r of u){const x=o.transaction(r,"readonly").objectStore(r),I=await new Promise((F,$)=>{const J=x.getAll();J.onerror=()=>$(J.error),J.onsuccess=()=>F(J.result)});e.indexedDB[r]=I}const i=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),l=URL.createObjectURL(i),d=document.createElement("a"),f=new Date().toISOString().split("T")[0];d.href=l,d.download=`homework-indexeddb-${f}.json`,d.click(),URL.revokeObjectURL(l),this.$message.success("导出成功","IndexedDB数据已导出")}catch(s){console.error("导出失败:",s),this.$message.error("导出失败",s.message||"无法导出数据库数据")}},async migrateData(){this.migrateLoading=!0,this.$router.push("/datamigration"),this.migrateLoading=!1},handleConfirm(){this.confirmAction&&this.confirmAction()}}};function Xl(s,e,o,u,i,l){const d=W;return m(),h(d,{icon:"mdi-database-cog",title:"数据源设置"},{default:n(()=>[t(O,null,{default:n(()=>[l.currentProvider==="kv-server"||l.currentProvider==="classworkscloud"?(m(),h(D,{key:0},{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-lan-connect"})]),append:n(()=>[t(p,{loading:i.loading,variant:"tonal",onClick:l.checkServerConnection},{default:n(()=>[...e[3]||(e[3]=[a(" 测试连接 ",-1)])]),_:1},8,["loading","onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[2]||(e[2]=[a("检查服务器连接",-1)])]),_:1})]),_:1})):b("",!0),l.currentProvider==="kv-local"?(m(),k(H,{key:1},[t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-database"})]),append:n(()=>[t(p,{color:"error",variant:"tonal",onClick:l.confirmClearIndexedDB},{default:n(()=>[...e[6]||(e[6]=[a(" 清除 ",-1)])]),_:1},8,["onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[4]||(e[4]=[a("清除数据库缓存",-1)])]),_:1}),t(ne,null,{default:n(()=>[...e[5]||(e[5]=[a(" 这将清除所有本地数据库中的数据 ",-1)])]),_:1})]),_:1}),t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-database-export"})]),append:n(()=>[t(p,{variant:"tonal",onClick:l.exportData},{default:n(()=>[...e[8]||(e[8]=[a(" 导出 ",-1)])]),_:1},8,["onClick"])]),default:n(()=>[t(z,null,{default:n(()=>[...e[7]||(e[7]=[a("导出数据库",-1)])]),_:1})]),_:1})],64)):b("",!0),t(D,null,{prepend:n(()=>[t(g,{class:"mr-3",icon:"mdi-lan-connect"})]),append:n(()=>[t(p,{to:"/cachemanagement",variant:"tonal"},{default:n(()=>[...e[10]||(e[10]=[a(" 查看 ",-1)])]),_:1})]),default:n(()=>[t(z,null,{default:n(()=>[...e[9]||(e[9]=[a("查看本地缓存",-1)])]),_:1})]),_:1})]),_:1}),t(we,{modelValue:i.confirmDialog,"onUpdate:modelValue":e[1]||(e[1]=f=>i.confirmDialog=f),"max-width":"400"},{default:n(()=>[t(M,null,{default:n(()=>[t(K,null,{default:n(()=>[a(v(i.confirmTitle),1)]),_:1}),t(j,null,{default:n(()=>[a(v(i.confirmMessage),1)]),_:1}),t(ue,null,{default:n(()=>[t(Z),t(p,{color:"grey",variant:"text",onClick:e[0]||(e[0]=f=>i.confirmDialog=!1)},{default:n(()=>[...e[11]||(e[11]=[a(" 取消 ",-1)])]),_:1}),t(p,{color:"error",variant:"tonal",onClick:l.handleConfirm},{default:n(()=>[...e[12]||(e[12]=[a(" 确认 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const wn=Q(Zl,[["render",Xl]]),$l={name:"CloudNamespaceInfoCard",props:{visible:{type:Boolean,default:!0}},data(){return{namespaceInfo:{},loading:!1,hasNamespaceInfo:!1,showReinitDialog:!1,defaultAuthServer:y("server.authDomain")}},watch:{visible(s){s===!0&&this.fetchNamespaceInfo()}},mounted(){this.visible&&this.fetchNamespaceInfo()},methods:{formatDate(s){if(!s)return"未知";try{return new Date(s).toLocaleString("zh-CN")}catch{return s}},async fetchNamespaceInfo(){this.loading=!0;try{const s=await ss.loadNamespaceInfo();this.namespaceInfo=s,this.hasNamespaceInfo=!0,this.loading=!1}catch(s){console.error("获取命名空间信息失败:",s),this.hasNamespaceInfo=!1,this.namespaceInfo={}}finally{this.loading=!1}},async reloadInfo(){await this.fetchNamespaceInfo()},getBindAccountUrl(){var e,o;const s=(o=(e=this.namespaceInfo)==null?void 0:e.device)==null?void 0:o.uuid;return s?`${this.defaultAuthServer}?uuid=${encodeURIComponent(s)}&tolinktoaccount=true`:this.defaultAuthServer},confirmReinitialize(){re("server.kvToken",""),re("device.uuid",""),this.showReinitDialog=!1,this.$router.push("/")}}},eo={key:0,class:"mb-4"},to={key:1,class:"d-flex align-center mb-4"},no={class:"d-flex flex-column gap-1"},so={class:"d-flex align-center"},io={class:"d-flex align-center"},lo={key:0,class:"d-flex align-center"},oo={class:"text-truncate"},ao={class:"d-flex align-center"},ro={key:1,class:"d-flex align-center"};function uo(s,e,o,u,i,l){return m(),h(M,{disabled:!i.hasNamespaceInfo,loading:i.loading,class:"my-4"},{loader:n(()=>[i.loading?(m(),h($e,{key:0,color:"primary",indeterminate:""})):b("",!0)]),default:n(()=>[t(K,null,{default:n(()=>[t(g,{class:"me-2"},{default:n(()=>[...e[3]||(e[3]=[a(" mdi-cloud-check ",-1)])]),_:1}),e[4]||(e[4]=a(" 设备信息 ",-1))]),_:1}),i.hasNamespaceInfo?(m(),h(j,{key:0},{default:n(()=>[i.namespaceInfo.hasAccount===!1?(m(),k("div",eo,[t(Y,{border:"",type:"warning",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[5]||(e[5]=[a("设备未绑定账号",-1)])]),_:1}),e[7]||(e[7]=c("div",null,"当前设备尚未绑定账号,部分功能可能受限。请前往绑定账号以获得完整体验。",-1)),t(p,{href:l.getBindAccountUrl(),"append-icon":"mdi-open-in-new",class:"mt-3",target:"_blank",variant:"outlined"},{default:n(()=>[...e[6]||(e[6]=[a(" 前往绑定账号 ",-1)])]),_:1},8,["href"])]),_:1})])):b("",!0),i.namespaceInfo.hasAccount&&i.namespaceInfo.account?(m(),k("div",to,[t(M,{"prepend-avatar":i.namespaceInfo.account.avatarUrl,subtitle:"此设备由贵校管理 管理员账号 ID: "+i.namespaceInfo.account.id,title:i.namespaceInfo.account.name||"未命名用户",border:"",class:"w-100",hover:"",variant:"tonal"},{default:n(()=>[t(j,null,{default:n(()=>[...e[8]||(e[8]=[a(" 此设备由贵校或贵单位管理,该管理员系此空间所有者,如有疑问请咨询他,对于恶意绑定、滥用行为请反馈。 ",-1)])]),_:1})]),_:1},8,["prepend-avatar","subtitle","title"])])):b("",!0),i.namespaceInfo.device?(m(),h(M,{key:2,border:"",class:"mb-4",hover:"",variant:"tonal"},{default:n(()=>[t(K,{class:"pb-1"},{default:n(()=>[...e[9]||(e[9]=[a(" 设备信息 ",-1)])]),_:1}),t(j,null,{default:n(()=>[c("div",no,[c("div",so,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[10]||(e[10]=[a(" mdi-tag ",-1)])]),_:1}),e[11]||(e[11]=c("span",{class:"font-weight-medium me-2"},"设备名称:",-1)),c("span",null,v(i.namespaceInfo.device.name||"未命名设备"),1)]),c("div",io,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[12]||(e[12]=[a(" mdi-identifier ",-1)])]),_:1}),e[13]||(e[13]=c("span",{class:"font-weight-medium me-2"},"设备 ID:",-1)),c("span",null,v(i.namespaceInfo.device.id),1)]),i.namespaceInfo.hasAccount===!1&&i.namespaceInfo.device.uuid?(m(),k("div",lo,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[14]||(e[14]=[a(" mdi-uuid ",-1)])]),_:1}),e[15]||(e[15]=c("span",{class:"font-weight-medium me-2"},"UUID:",-1)),c("span",oo,v(i.namespaceInfo.device.uuid),1)])):b("",!0),c("div",ao,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[16]||(e[16]=[a(" mdi-calendar ",-1)])]),_:1}),e[17]||(e[17]=c("span",{class:"font-weight-medium me-2"},"创建时间:",-1)),c("span",null,v(l.formatDate(i.namespaceInfo.device.createdAt)),1)]),i.namespaceInfo.device.updatedAt?(m(),k("div",ro,[t(g,{class:"me-2",size:"small"},{default:n(()=>[...e[18]||(e[18]=[a(" mdi-calendar-clock ",-1)])]),_:1}),e[19]||(e[19]=c("span",{class:"font-weight-medium me-2"},"更新时间:",-1)),c("span",null,v(l.formatDate(i.namespaceInfo.device.updatedAt)),1)])):b("",!0)])]),_:1})]),_:1})):b("",!0),t(M,{border:"",hover:"",subtitle:"文档形键值数据库",title:"Classworks KV"},{default:n(()=>[t(j,null,{default:n(()=>[...e[20]||(e[20]=[a(" Classworks KV 是厚浪云推出的文档形键值数据库,其是一个开放的云应用平台,为各种应用提供存储服务。此设备正在使用其服务,如果您希望管理设备信息,请前往 Classworks KV 的网站,如果您在服务推出前就在使用 Classworks,您的数据已被自动迁移。 ",-1),c("br",null,null,-1),c("br",null,null,-1),a(" Classworks KV 的全域管理员是 ",-1),c("a",{href:"https://wuyuan.dev",target:"_blank"}," 孙悟元 ",-1)])]),_:1}),t(ue,null,{default:n(()=>[t(p,{href:i.defaultAuthServer,"append-icon":"mdi-open-in-new",class:"text-none",target:"_blank"},{default:n(()=>[...e[21]||(e[21]=[a(" 前往 Classworks KV ",-1)])]),_:1},8,["href"])]),_:1})]),_:1})]),_:1})):(m(),h(j,{key:1},{default:n(()=>[t(Y,{type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[22]||(e[22]=[a("未获取到设备信息",-1)])]),_:1}),e[23]||(e[23]=c("p",null,"您尚未完成云端存储授权或连接失败,请点击下方按钮进行初始化。",-1))]),_:1})]),_:1})),t(ue,null,{default:n(()=>[t(Z),t(p,{loading:i.loading,color:"primary",variant:"outlined",onClick:l.reloadInfo},{default:n(()=>[...e[24]||(e[24]=[a(" 刷新设备信息 ",-1)])]),_:1},8,["loading","onClick"]),t(p,{color:"error",variant:"outlined",onClick:e[0]||(e[0]=d=>i.showReinitDialog=!0)},{default:n(()=>[...e[25]||(e[25]=[a(" 重新初始化云端存储 ",-1)])]),_:1})]),_:1}),t(we,{modelValue:i.showReinitDialog,"onUpdate:modelValue":e[2]||(e[2]=d=>i.showReinitDialog=d),"max-width":"500"},{default:n(()=>[t(M,null,{default:n(()=>[t(K,null,{default:n(()=>[...e[26]||(e[26]=[a("确认重新初始化",-1)])]),_:1}),t(j,null,{default:n(()=>[t(Y,{class:"mb-3",type:"warning",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[27]||(e[27]=[a("警告",-1)])]),_:1}),e[28]||(e[28]=a(" 此操作将清除当前的云端存储配置(包括 Token),您需要重新进行授权。 ",-1))]),_:1}),e[29]||(e[29]=c("p",null,"您确定要重新初始化云端存储吗?",-1))]),_:1}),t(ue,null,{default:n(()=>[t(Z),t(p,{variant:"text",onClick:e[1]||(e[1]=d=>i.showReinitDialog=!1)},{default:n(()=>[...e[30]||(e[30]=[a(" 取消 ",-1)])]),_:1}),t(p,{color:"error",onClick:l.confirmReinitialize},{default:n(()=>[...e[31]||(e[31]=[a(" 确认 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["disabled","loading"])}const vn=Q($l,[["render",uo]]),co={name:"ServerSettingsCard",components:{SettingsCard:W,CloudNamespaceInfoCard:vn},props:{loading:Boolean},data(){return{unwatch:null,serverSettings:{provider:y("server.provider"),domain:y("server.domain"),classNumber:y("server.classNumber"),kvToken:y("server.kvToken")},settingsChangeTimeout:null}},computed:{currentProvider(){return this.serverSettings.provider},isKvProvider(){return this.currentProvider==="kv-local"||this.currentProvider==="kv-server"},isClassworksCloud(){return this.currentProvider==="classworkscloud"},useServer(){return this.currentProvider==="server"||this.currentProvider==="kv-server"||this.currentProvider==="classworkscloud"}},watch:{serverSettings:{handler(){this.settingsChangeTimeout&&clearTimeout(this.settingsChangeTimeout),this.settingsChangeTimeout=setTimeout(()=>{this.saveAllSettings()},100)},deep:!0}},mounted(){this.loadAllSettings(),this.unwatch=pt(()=>{this.loadAllSettings(),this.$forceUpdate&&this.$forceUpdate()})},beforeUnmount(){this.unwatch&&this.unwatch()},methods:{loadAllSettings(){this.serverSettings={provider:y("server.provider"),domain:y("server.domain"),classNumber:y("server.classNumber"),kvToken:y("server.kvToken")}},saveAllSettings(){Object.entries(this.serverSettings).forEach(([s,e])=>{const o=`server.${s}`,u=y(o);e!==u&&(re(o,e)?console.log(`设置已更新: ${o} = ${e}`):(console.error(`设置失败: ${o}`),this.serverSettings[s]=u))})}}},mo={key:0},fo={key:2},po={key:3},ho={key:4};function go(s,e,o,u,i,l){const d=vn,f=W;return m(),h(f,{loading:o.loading,icon:"mdi-database",title:"数据源设置"},{default:n(()=>[t(Yt,null,{default:n(()=>[t(Ze,{modelValue:i.serverSettings.provider,"onUpdate:modelValue":e[0]||(e[0]=r=>i.serverSettings.provider=r),items:[{title:"Classworks云端存储",value:"classworkscloud"},{title:"KV本地存储",value:"kv-local"},{title:"KV远程服务器",value:"kv-server"}],class:"mb-3",density:"comfortable","item-title":"title","item-value":"value",label:"数据提供者","prepend-icon":"mdi-database",variant:"outlined"},null,8,["modelValue"]),l.isKvProvider?(m(),h(Y,{key:0,class:"my-2",type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[5]||(e[5]=[a("KV 存储系统",-1)])]),_:1}),e[7]||(e[7]=c("p",null,"KV存储系统使用本机唯一标识符(UUID)来区分不同设备的数据。",-1)),l.currentProvider==="kv-server"?(m(),k("p",mo,[...e[6]||(e[6]=[a(" 服务器端点格式: ",-1),c("code",null,"http(s)://服务器域名/",-1),c("br",null,null,-1),a(" 在服务器域名处仅填写基础URL,不需要任何路径。 ",-1)])])):b("",!0)]),_:1})):b("",!0),l.isClassworksCloud?(m(),h(Y,{key:1,class:"my-2",color:"success",type:"info",variant:"tonal"},{default:n(()=>[t(Ne,null,{default:n(()=>[...e[8]||(e[8]=[a("Classworks云端存储",-1)])]),_:1}),e[9]||(e[9]=c("p",null,"Classworks云端存储是官方提供的存储解决方案,自动配置了最优的访问设置。",-1)),e[10]||(e[10]=c("p",null,"使用此选项时,服务器域名和网站令牌将自动配置,无需手动设置。",-1))]),_:1})):b("",!0),t(U,{class:"my-2"}),l.isClassworksCloud?(m(),k("div",fo,[t(N,{modelValue:i.serverSettings.kvToken,"onUpdate:modelValue":e[1]||(e[1]=r=>i.serverSettings.kvToken=r),class:"mb-2",density:"comfortable",hint:"令牌用于云端存储授权",label:"KV 授权令牌","persistent-hint":"","prepend-icon":"mdi-shield-key",variant:"outlined"},null,8,["modelValue"]),t(d,{visible:l.isClassworksCloud,class:"mt-4"},null,8,["visible"])])):l.currentProvider==="kv-server"?(m(),k("div",po,[t(N,{modelValue:i.serverSettings.domain,"onUpdate:modelValue":e[2]||(e[2]=r=>i.serverSettings.domain=r),class:"mb-2",density:"comfortable",hint:"例如: https://example.com (不需要路径)",label:"服务器域名","persistent-hint":"","prepend-icon":"mdi-web",variant:"outlined"},null,8,["modelValue"]),t(N,{modelValue:i.serverSettings.kvToken,"onUpdate:modelValue":e[3]||(e[3]=r=>i.serverSettings.kvToken=r),class:"mb-2",density:"comfortable",hint:"令牌用于服务器验证",label:"KV 授权令牌","persistent-hint":"","prepend-icon":"mdi-shield-key",variant:"outlined"},null,8,["modelValue"])])):l.currentProvider==="kv-local"?(m(),k("div",ho,[t(N,{modelValue:i.serverSettings.classNumber,"onUpdate:modelValue":e[4]||(e[4]=r=>i.serverSettings.classNumber=r),class:"mb-2",density:"comfortable",hint:"例如: 高三八班",label:"班级编号","persistent-hint":"","prepend-icon":"mdi-account-group",variant:"outlined"},null,8,["modelValue"])])):b("",!0)]),_:1})]),_:1},8,["loading"])}const bn=Q(co,[["render",go]]),wo="classworks",vo="module",bo="0.0.0",ko={dev:"vite --host",build:"vite build","build:store":"node scripts/generate-sound-list.js && vite build && node scripts/validate-pwa-build.js",preview:"vite preview",lint:"eslint . --fix","pwa:validate":"node scripts/validate-pwa-build.js",prebuild:"node scripts/generate-sound-list.js"},yo={"@fingerprintjs/fingerprintjs":"^5.0.1","@mdi/font":"7.4.47","@microsoft/clarity":"^1.0.2","@sentry/vue":"^10.36.0","@vueuse/core":"^14.1.0","@wydev/noise-core":"^0.1.0",axios:"^1.13.2",idb:"^8.0.3","js-base64":"^3.7.8","lucide-vue-next":"^0.555.0","pinyin-pro":"^3.27.0","ratelimit-header-parser":"^0.1.0","roboto-fontface":"*","socket.io-client":"^4.8.1","typewriter-effect":"^2.22.0",uuid:"^13.0.0",vue:"^3.5.25","vue-sonner":"^2.0.9",vuetify:"^3.11.0",vite:"^5.4.11"},xo={"@eslint/js":"^9.39.1","@vite-pwa/assets-generator":"^1.0.2","@vitejs/plugin-vue":"^6.0.2",eslint:"^9.39.1","eslint-plugin-import":"^2.32.0","eslint-plugin-n":"^17.23.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^7.2.1","eslint-plugin-vue":"^10.6.2",pinia:"^3.0.4",sass:"1.94.2","sass-embedded":"^1.93.3","unplugin-auto-import":"^20.3.0","unplugin-fonts":"^1.4.0","unplugin-vue-components":"^30.0.0","unplugin-vue-router":"^0.18.0","vite-plugin-pwa":"^1.2.0","vite-plugin-vue-devtools":"^7.6.8","vite-plugin-vue-layouts":"^0.11.0","vite-plugin-vuetify":"^2.1.2","vue-router":"^4.6.3"},Le={name:wo,private:!0,type:vo,version:bo,scripts:ko,dependencies:yo,devDependencies:xo},So="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAa9SURBVHic7dY9jlxVFIXRY8SsCEDyMCAjgRFBYokARoGQQII5EDIJYhNgyb9td9euqvfu3WuN4CTf1nn2958/vRyg0mdHHwAcxwBAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFDAAUMwBQzABAMQMAxQwAFDMAUMwAQDEDAMUMABQzAFDMAEAxAwDFPj/6AI7z2+9/zW9//HX0Gct6/uUX8/yrL44+I+IDKCX+zA7xzxiASuLP7BL/jAGoI/7MTvHPGIAq4s/sFv+MAagh/syO8c8YgAriz+wa/4wB2J74MzvHP2MAtib+zO7xzxiAbYk/0xD/jAHYkvgzLfHPGIDtiD/TFP+MAdiK+DNt8c8YgG2IP9MY/4wB2IL4M63xzxiA5Yk/0xz/jAFYmvgz7fHPGIBliT8j/v8ZgAWJPyP+1wzAYsSfEf/bDMBCxJ8R//sMwCLEnxH/hxmABYg/I/6HGYCTE39G/B9nAE5M/Bnxf5oBOCnxZ8T/OAbghMSfEf/jGYCTEX9G/E9jAE5E/BnxP50BOAnxZ8R/GQNwAuLPiP9yBuBg4s+IP2MADiT+jPhzBuAg4s+I/zoMwAHEnxH/9RiAOxN/RvzXZQDuSPwZ8V+fAbgT8WfEfxsG4A7EnxH/7RiAGxN/Rvy3ZQBuSPwZ8d+eAbgR8WfEfx8G4AbEnxH//RiAKxN/Rvz3ZQCuSPwZ8d+fAbgS8WfEfwwDcAXiz4j/OAYgJP6M+I9lAALiz4j/eAbgQuLPiP8cDMAFxJ8R/3kYgCcSf0b852IAnkD8GfGfjwF4JPFnxH9OBuARxJ8R/3kZgE8Qf0b852YAPkL8GfGfnwF4gPgz4l+DAfgA8WfEvw4D8A7xZ8S/FgPwBvFnxL8eA/CK+DPiX5MBGPGnxL+u+gEQf0b8a6seAPFnxL++2gEQf0b8e6gcAPFnxL+PugEQf0b8e6kaAPFnxL+fmgEQf0b8e6oYAPFnxL+v7QdA/Bnx723rARB/Rvz723YAxJ8Rf4ctB0D8GfH32G4AxJ8Rf5etBkD8GfH32WYAxJ8Rf6ctBkD8GfH3Wn4AxJ8Rf7dn//7z68ujj+AYP774ZX548fPRZyzr+2+/me++/froMyLLfwBcRvyZHeKfMQCVxJ/ZJf4ZA1BH/Jmd4p8xAFXEn9kt/hkDUEP8mR3jnzEAFcSf2TX+GQOwPfFndo5/xgBsTfyZ3eOfMQDbEn+mIf4ZA7Al8Wda4p8xANsRf6Yp/hkDsBXxZ9rinzEA2xB/pjH+GQOwBfFnWuOfMQDLE3+mOf4ZA7A08Wfa458xAMsSf0b8/zMACxJ/RvyvGYDFiD8j/rcZgIWIPyP+9xmARYg/I/4PMwALEH9G/A8zACcn/oz4P84AnJj4M+L/NANwUuLPiP9xDMAJiT8j/sczACcj/oz4n8YAnIj4M+J/OgNwEuLPiP8yBuAExJ8R/+UMwMHEnxF/xgAcSPwZ8ecMwEHEnxH/dRiAA4g/I/7rMQB3Jv6M+K/LANyR+DPivz4DcCfiz4j/NgzAHYg/I/7bMQA3Jv6M+G/LANyQ+DPivz0DcCPiz4j/PgzADYg/I/77MQBXJv6M+O/LAFyR+DPivz8DcCXiz4j/GAbgCsSfEf9xDEBI/BnxH8sABMSfEf/xDMCFxJ8R/zkYgAuIPyP+8zAATyT+jPjPxQA8gfgz4j8fA/BI4s+I/5wMwCOIPyP+8zIAnyD+jPjPzQB8hPgz4j8/A/AA8WfEvwYD8AHiz4h/HQbgHeLPiH8tBuAN4s+Ifz0G4BXxZ8S/JgMw4k+Jf131AyD+jPjXVj0A4s+If321AyD+jPj3UDkA4s+Ifx91AyD+jPj3UjUA4s+Ifz81AyD+jPj3VDEA4s+If1/bD4D4M+Lf29YDIP6M+Pe37QCIPyP+DlsOgPgz4u+x3QCIPyP+LlsNgPgz4u+zzQCIPyP+TlsMgPgz4u+1/ACIPyP+bs/+/efXl0cfARxj+Q8AuJwBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAihkAKGYAoJgBgGIGAIoZAChmAKCYAYBiBgCKGQAoZgCgmAGAYgYAiv0Hs2PMhrt8KlMAAAAASUVORK5CYII=",Co={name:"AboutCard",setup(){const s=se([]),e=se(!1),o=se(!1),u=se(""),i=se(!1),l=se(!1),d="964979747",f="https://qm.qq.com/q/T6qImKJjGi",r=Kn(),w=()=>{try{const _={...Le.dependencies||{},...Le.devDependencies||{}},E=Object.entries(_).map(([q,P])=>({name:q,version:P.replace(/[\^~]/g,""),description:x(q)}));s.value=E}catch(_){console.error("加载依赖信息失败:",_),s.value=[]}},x=_=>({vue:"渐进式 JavaScript 框架",vuetify:"材料设计组件框架",axios:"Promise 基础的 HTTP 客户端",pinia:"Vue 状态管理库","vue-router":"Vue.js 官方路由管理器","@vitejs/plugin-vue":"Vite 的 Vue 插件"})[_]||"",I=()=>{r.push("/debug")},F=async()=>{i.value=!0;try{const _=await ds();u.value=_||""}catch(_){console.error("获取访客ID失败",_)}finally{i.value=!1}},$=()=>F(),J=async()=>{o.value=!0,u.value||await F()},he=async()=>{try{await navigator.clipboard.writeText(ce.value),l.value=!0,setTimeout(()=>l.value=!1,1800)}catch(_){console.error("复制失败",_)}},ae=L(()=>{var A,X;const _=navigator||{},E=typeof Intl<"u"&&Intl.DateTimeFormat?Intl.DateTimeFormat().resolvedOptions():{},q=E&&E.timeZone?E.timeZone:"",P=((X=(A=r.currentRoute)==null?void 0:A.value)==null?void 0:X.fullPath)||location.pathname;return[`App 版本: v${Le==null?void 0:Le.version}`,`URL: ${location.href}`,`路由: ${P}`,`UserAgent: ${_.userAgent||""}`,`语言: ${_.language||""}`,`时区: ${q}`,`平台: ${_.platform||""}`,`在线: ${String(_.onLine)}`,`屏幕: ${(screen==null?void 0:screen.width)||"-"}x${(screen==null?void 0:screen.height)||"-"}`,`视口: ${window.innerWidth||"-"}x${window.innerHeight||"-"}`].join(` `)}),ce=L(()=>`调试ID: ${u.value||"获取失败"} 浏览器/环境信息: diff --git a/assets/socket-debugger-BgOyS6q7.js b/assets/socket-debugger-AgrQ1Sap.js similarity index 96% rename from assets/socket-debugger-BgOyS6q7.js rename to assets/socket-debugger-AgrQ1Sap.js index 5f56d35..11814af 100644 --- a/assets/socket-debugger-BgOyS6q7.js +++ b/assets/socket-debugger-AgrQ1Sap.js @@ -1,4 +1,4 @@ -import{c as Ce,g as I,d as se}from"./socketClient-pOSoE2ci.js";import{_ as Se,e as g,c as D,f as L,g as re,d as k,p as Y,q as _,r as y,t as x,i as ue,h as V}from"./index-CzpSlHRw.js";import{V as Z,a as m}from"./VRow-sd4d6eNi.js";import{V as Q}from"./VChip-B3whZF-S.js";import{V as we}from"./VTextField-BxdS2D7S.js";import{V as Le}from"./VTextarea-zDVNnlPQ.js";import{V as $e}from"./VSwitch-DcxT6NgQ.js";import{V as Re}from"./VAlert-DaoJAibO.js";import{V as De}from"./VContainer-BIFGURze.js";import{b as c,D as Ie,a3 as Te,X as C,Y as H,Z as t,j as n,a1 as o,S as u,k as p,$ as q,_ as z,F as de,a2 as ie,n as Ue,I as Be,e as ce}from"./vendor-vue-28M5UGz3.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-xQe1elLG.js";import"./vendor-vuetify-95axeNJO.js";const ze={class:"d-flex flex-wrap gap-2"},Me={class:"text-h4"},Ne={class:"text-h4"},Pe={class:"text-h4"},Ee={class:"text-h4"},Oe={class:"log-time"},je={class:"log-type"},Ae={class:"log-message"},Fe={key:0,class:"log-data"},Je={key:0,class:"text-center text-disabled pa-8"},He={__name:"socket-debugger",setup(qe){const fe=c(Ce()),$=c(!1),G=c(""),S=c(""),W=c(0),h=c(""),M=c(null),K=c("00:00:00"),X=c(!0),d=c({eventsReceived:0,eventsSent:0,errors:0,reconnects:0,avgLatency:0,lastPing:0,bytesSent:0,bytesReceived:0}),R=c([]),N=c(new Set),P=c(null),b=c({name:"",data:"{}"}),v=c(null),ee=ce(()=>$.value?{text:"已连接",color:"success"}:{text:"未连接",color:"error"}),me=ce(()=>S.value==="websocket"?"success":S.value==="polling"?"warning":"grey");function s(l,e,a=null){const f=new Date().toLocaleTimeString("zh-CN",{hour12:!1});R.value.push({type:l,message:e,data:a,time:f}),R.value.length>500&&R.value.shift(),X.value&&Be(()=>{P.value&&(P.value.scrollTop=P.value.scrollHeight)})}function pe(){R.value=[],s("info","日志已清空")}function te(l){if(l===0)return"0 B";const e=1024,a=["B","KB","MB","GB"],i=Math.floor(Math.log(l)/Math.log(e));return Math.round(l/Math.pow(e,i)*100)/100+" "+a[i]}let w=null;function ve(){if(M.value){const e=Date.now()-M.value,a=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),f=Math.floor(e%6e4/1e3);K.value=`${String(a).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(f).padStart(2,"0")}`}else K.value="00:00:00"}let T=null;function ne(){var U;const l=I();T&&le();const e=()=>{var r,B,ae;$.value=!0,G.value=l.id,S.value=((ae=(B=(r=l.io)==null?void 0:r.engine)==null?void 0:B.transport)==null?void 0:ae.name)||"unknown",M.value=Date.now(),h.value=new Date().toLocaleString("zh-CN"),s("success","已连接到服务器",{socketId:l.id,transport:S.value}),w||(w=setInterval(ve,1e3))},a=r=>{$.value=!1,G.value="",S.value="",M.value=null,s("warning","连接已断开",{reason:r}),w&&(clearInterval(w),w=null)},i=r=>{d.value.errors++,s("error","连接错误",{message:r.message,type:r.type})},f=r=>{d.value.reconnects++,W.value++,s("info",`重连成功 (尝试 #${r})`)},E=r=>{s("info",`正在尝试重连 #${r}...`)},O=r=>{d.value.errors++,s("error","重连失败",{message:r.message})},j=()=>{d.value.errors++,s("error","重连彻底失败")},A=()=>{s("debug","Ping 发送")},F=r=>{d.value.lastPing=r;const B=d.value.avgLatency;d.value.avgLatency=B===0?r:Math.round(B*.8+r*.2),s("debug",`Pong 接收 (${r}ms)`)},J=r=>{S.value=r.name,s("success",`传输已升级到 ${r.name}`)};T={socket:l,onConnect:e,onDisconnect:a,onConnectError:i,onReconnect:f,onReconnectAttempt:E,onReconnectError:O,onReconnectFailed:j,onPing:A,onPong:F,onUpgrade:J},l.on("connect",e),l.on("disconnect",a),l.on("connect_error",i),l.io.on("reconnect",f),l.io.on("reconnect_attempt",E),l.io.on("reconnect_error",O),l.io.on("reconnect_failed",j),l.io.on("ping",A),l.io.on("pong",F),(U=l.io)!=null&&U.engine&&l.io.engine.on("upgrade",J),N.value=new Set(Object.keys(l._callbacks||{}).map(r=>r.replace("$",""))),l.connected&&e()}function le(){var U;if(!T)return;const{socket:l,onConnect:e,onDisconnect:a,onConnectError:i,onReconnect:f,onReconnectAttempt:E,onReconnectError:O,onReconnectFailed:j,onPing:A,onPong:F,onUpgrade:J}=T;try{l.off("connect",e),l.off("disconnect",a),l.off("connect_error",i),l.io.off("reconnect",f),l.io.off("reconnect_attempt",E),l.io.off("reconnect_error",O),l.io.off("reconnect_failed",j),l.io.off("ping",A),l.io.off("pong",F),(U=l.io)!=null&&U.engine&&l.io.engine.off("upgrade",J)}catch{}T=null}function oe(){try{I().connect(),s("info","正在连接...")}catch(l){s("error","连接失败",{message:l.message})}}function ge(){try{se(),s("info","已手动断开连接")}catch(l){s("error","断开连接失败",{message:l.message})}}function _e(){try{se(),setTimeout(()=>{ne(),oe()},100)}catch(l){s("error","重连失败",{message:l.message})}}function ye(){try{const l=I();let e;try{e=JSON.parse(b.value.data)}catch{e=b.value.data}l.emit(b.value.name,e),d.value.eventsSent++,d.value.bytesSent+=JSON.stringify(e).length,s("info",`已发送事件: ${b.value.name}`,e)}catch(l){s("error","发送事件失败",{message:l.message})}}function ke(){v.value=null,s("info","开始连接测试...");const l=I(),e=setTimeout(()=>{v.value={type:"error",message:"连接测试超时 (20秒)"},s("error","连接测试超时")},2e4);l.connected?(clearTimeout(e),v.value={type:"success",message:`连接正常! Socket ID: ${l.id}, 传输: ${S.value}`},s("success","连接测试通过")):(l.once("connect",()=>{clearTimeout(e),v.value={type:"success",message:"连接测试成功!"},s("success","连接测试通过")}),l.once("connect_error",a=>{clearTimeout(e),v.value={type:"error",message:`连接失败: ${a.message}`},s("error","连接测试失败",{message:a.message})}))}function be(){const l=I(),e=Date.now();l.emit("ping",()=>{const a=Date.now()-e;v.value={type:"info",message:`测量延迟: ${a}ms`},s("info",`延迟测量结果: ${a}ms`)})}function xe(){s("warning","模拟错误场景..."),I().emit("nonexistent-event-test",{test:!0}),v.value={type:"info",message:"已发送测试事件到服务器,请检查服务器响应"}}function Ve(){const l=R.value.map(f=>`[${f.time}] [${f.type.toUpperCase()}] ${f.message}${f.data?` +import{c as Ce,g as I,d as se}from"./socketClient-BKHEsaLg.js";import{_ as Se,e as g,c as D,f as L,g as re,d as k,p as Y,q as _,r as y,t as x,i as ue,h as V}from"./index-DGIAsv4W.js";import{V as Z,a as m}from"./VRow-Cjhiymuu.js";import{V as Q}from"./VChip-mRzIPuM0.js";import{V as we}from"./VTextField-BurlcggD.js";import{V as Le}from"./VTextarea-vGWmTJww.js";import{V as $e}from"./VSwitch-k6hfPfa2.js";import{V as Re}from"./VAlert-BZ4-f-hy.js";import{V as De}from"./VContainer-DZyPrcqa.js";import{b as c,D as Ie,a3 as Te,X as C,Y as H,Z as t,j as n,a1 as o,S as u,k as p,$ as q,_ as z,F as de,a2 as ie,n as Ue,I as Be,e as ce}from"./vendor-vue-BiQC5iF7.js";import"./vendor-socket-dm1FmSOd.js";import"./serverRotation-BtcwvdZJ.js";import"./vendor-vuetify-DsKlzgKp.js";const ze={class:"d-flex flex-wrap gap-2"},Me={class:"text-h4"},Ne={class:"text-h4"},Pe={class:"text-h4"},Ee={class:"text-h4"},Oe={class:"log-time"},je={class:"log-type"},Ae={class:"log-message"},Fe={key:0,class:"log-data"},Je={key:0,class:"text-center text-disabled pa-8"},He={__name:"socket-debugger",setup(qe){const fe=c(Ce()),$=c(!1),G=c(""),S=c(""),W=c(0),h=c(""),M=c(null),K=c("00:00:00"),X=c(!0),d=c({eventsReceived:0,eventsSent:0,errors:0,reconnects:0,avgLatency:0,lastPing:0,bytesSent:0,bytesReceived:0}),R=c([]),N=c(new Set),P=c(null),b=c({name:"",data:"{}"}),v=c(null),ee=ce(()=>$.value?{text:"已连接",color:"success"}:{text:"未连接",color:"error"}),me=ce(()=>S.value==="websocket"?"success":S.value==="polling"?"warning":"grey");function s(l,e,a=null){const f=new Date().toLocaleTimeString("zh-CN",{hour12:!1});R.value.push({type:l,message:e,data:a,time:f}),R.value.length>500&&R.value.shift(),X.value&&Be(()=>{P.value&&(P.value.scrollTop=P.value.scrollHeight)})}function pe(){R.value=[],s("info","日志已清空")}function te(l){if(l===0)return"0 B";const e=1024,a=["B","KB","MB","GB"],i=Math.floor(Math.log(l)/Math.log(e));return Math.round(l/Math.pow(e,i)*100)/100+" "+a[i]}let w=null;function ve(){if(M.value){const e=Date.now()-M.value,a=Math.floor(e/36e5),i=Math.floor(e%36e5/6e4),f=Math.floor(e%6e4/1e3);K.value=`${String(a).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(f).padStart(2,"0")}`}else K.value="00:00:00"}let T=null;function ne(){var U;const l=I();T&&le();const e=()=>{var r,B,ae;$.value=!0,G.value=l.id,S.value=((ae=(B=(r=l.io)==null?void 0:r.engine)==null?void 0:B.transport)==null?void 0:ae.name)||"unknown",M.value=Date.now(),h.value=new Date().toLocaleString("zh-CN"),s("success","已连接到服务器",{socketId:l.id,transport:S.value}),w||(w=setInterval(ve,1e3))},a=r=>{$.value=!1,G.value="",S.value="",M.value=null,s("warning","连接已断开",{reason:r}),w&&(clearInterval(w),w=null)},i=r=>{d.value.errors++,s("error","连接错误",{message:r.message,type:r.type})},f=r=>{d.value.reconnects++,W.value++,s("info",`重连成功 (尝试 #${r})`)},E=r=>{s("info",`正在尝试重连 #${r}...`)},O=r=>{d.value.errors++,s("error","重连失败",{message:r.message})},j=()=>{d.value.errors++,s("error","重连彻底失败")},A=()=>{s("debug","Ping 发送")},F=r=>{d.value.lastPing=r;const B=d.value.avgLatency;d.value.avgLatency=B===0?r:Math.round(B*.8+r*.2),s("debug",`Pong 接收 (${r}ms)`)},J=r=>{S.value=r.name,s("success",`传输已升级到 ${r.name}`)};T={socket:l,onConnect:e,onDisconnect:a,onConnectError:i,onReconnect:f,onReconnectAttempt:E,onReconnectError:O,onReconnectFailed:j,onPing:A,onPong:F,onUpgrade:J},l.on("connect",e),l.on("disconnect",a),l.on("connect_error",i),l.io.on("reconnect",f),l.io.on("reconnect_attempt",E),l.io.on("reconnect_error",O),l.io.on("reconnect_failed",j),l.io.on("ping",A),l.io.on("pong",F),(U=l.io)!=null&&U.engine&&l.io.engine.on("upgrade",J),N.value=new Set(Object.keys(l._callbacks||{}).map(r=>r.replace("$",""))),l.connected&&e()}function le(){var U;if(!T)return;const{socket:l,onConnect:e,onDisconnect:a,onConnectError:i,onReconnect:f,onReconnectAttempt:E,onReconnectError:O,onReconnectFailed:j,onPing:A,onPong:F,onUpgrade:J}=T;try{l.off("connect",e),l.off("disconnect",a),l.off("connect_error",i),l.io.off("reconnect",f),l.io.off("reconnect_attempt",E),l.io.off("reconnect_error",O),l.io.off("reconnect_failed",j),l.io.off("ping",A),l.io.off("pong",F),(U=l.io)!=null&&U.engine&&l.io.engine.off("upgrade",J)}catch{}T=null}function oe(){try{I().connect(),s("info","正在连接...")}catch(l){s("error","连接失败",{message:l.message})}}function ge(){try{se(),s("info","已手动断开连接")}catch(l){s("error","断开连接失败",{message:l.message})}}function _e(){try{se(),setTimeout(()=>{ne(),oe()},100)}catch(l){s("error","重连失败",{message:l.message})}}function ye(){try{const l=I();let e;try{e=JSON.parse(b.value.data)}catch{e=b.value.data}l.emit(b.value.name,e),d.value.eventsSent++,d.value.bytesSent+=JSON.stringify(e).length,s("info",`已发送事件: ${b.value.name}`,e)}catch(l){s("error","发送事件失败",{message:l.message})}}function ke(){v.value=null,s("info","开始连接测试...");const l=I(),e=setTimeout(()=>{v.value={type:"error",message:"连接测试超时 (20秒)"},s("error","连接测试超时")},2e4);l.connected?(clearTimeout(e),v.value={type:"success",message:`连接正常! Socket ID: ${l.id}, 传输: ${S.value}`},s("success","连接测试通过")):(l.once("connect",()=>{clearTimeout(e),v.value={type:"success",message:"连接测试成功!"},s("success","连接测试通过")}),l.once("connect_error",a=>{clearTimeout(e),v.value={type:"error",message:`连接失败: ${a.message}`},s("error","连接测试失败",{message:a.message})}))}function be(){const l=I(),e=Date.now();l.emit("ping",()=>{const a=Date.now()-e;v.value={type:"info",message:`测量延迟: ${a}ms`},s("info",`延迟测量结果: ${a}ms`)})}function xe(){s("warning","模拟错误场景..."),I().emit("nonexistent-event-test",{test:!0}),v.value={type:"info",message:"已发送测试事件到服务器,请检查服务器响应"}}function Ve(){const l=R.value.map(f=>`[${f.time}] [${f.type.toUpperCase()}] ${f.message}${f.data?` `+JSON.stringify(f.data,null,2):""}`).join(` `),e=new Blob([l],{type:"text/plain"}),a=URL.createObjectURL(e),i=document.createElement("a");i.href=a,i.download=`socket-logs-${Date.now()}.txt`,i.click(),URL.revokeObjectURL(a),s("success","日志已导出")}return Ie(()=>{ne(),s("info","Socket 调试器已初始化")}),Te(()=>{le(),w&&(clearInterval(w),w=null)}),(l,e)=>(C(),H(De,{fluid:""},{default:t(()=>[n(Z,null,{default:t(()=>[n(m,{cols:"12"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,{class:"d-flex align-center"},{default:t(()=>[n(L,{class:"mr-2",color:"primary"},{default:t(()=>[...e[4]||(e[4]=[o(" mdi-network ",-1)])]),_:1}),e[5]||(e[5]=o(" Socket.IO 连接调试器 ",-1)),n(re),n(Q,{color:ee.value.color,size:"small"},{default:t(()=>[o(u(ee.value.text),1)]),_:1},8,["color"])]),_:1})]),_:1})]),_:1}),n(m,{cols:"12",md:"6"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,null,{default:t(()=>[...e[6]||(e[6]=[o("连接信息",-1)])]),_:1}),n(k,null,{default:t(()=>[n(Y,{density:"compact"},{default:t(()=>[n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[7]||(e[7]=[o("mdi-server",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[8]||(e[8]=[o("服务器地址",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(fe.value),1)]),_:1})]),_:1}),n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[9]||(e[9]=[o("mdi-identifier",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[10]||(e[10]=[o("Socket ID",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(G.value||"未连接"),1)]),_:1})]),_:1}),n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[11]||(e[11]=[o("mdi-transit-connection-variant",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[12]||(e[12]=[o("传输方式",-1)])]),_:1}),n(x,null,{default:t(()=>[n(Q,{size:"x-small",color:me.value},{default:t(()=>[o(u(S.value||"未知"),1)]),_:1},8,["color"])]),_:1})]),_:1}),n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[13]||(e[13]=[o("mdi-clock-outline",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[14]||(e[14]=[o("连接时长",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(K.value),1)]),_:1})]),_:1}),n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[15]||(e[15]=[o("mdi-refresh",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[16]||(e[16]=[o("重连次数",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(W.value),1)]),_:1})]),_:1}),n(_,null,{prepend:t(()=>[n(L,null,{default:t(()=>[...e[17]||(e[17]=[o("mdi-calendar-clock",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[...e[18]||(e[18]=[o("上次连接",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(h.value||"从未连接"),1)]),_:1})]),_:1})]),_:1}),n(ue,{class:"my-4"}),p("div",ze,[n(V,{color:"primary","prepend-icon":"mdi-connection",disabled:$.value,onClick:oe},{default:t(()=>[...e[19]||(e[19]=[o(" 连接 ",-1)])]),_:1},8,["disabled"]),n(V,{color:"error","prepend-icon":"mdi-connection",disabled:!$.value,onClick:ge},{default:t(()=>[...e[20]||(e[20]=[o(" 断开 ",-1)])]),_:1},8,["disabled"]),n(V,{color:"warning","prepend-icon":"mdi-refresh",onClick:_e},{default:t(()=>[...e[21]||(e[21]=[o(" 重连 ",-1)])]),_:1}),n(V,{color:"info","prepend-icon":"mdi-delete-sweep",onClick:pe},{default:t(()=>[...e[22]||(e[22]=[o(" 清空日志 ",-1)])]),_:1})])]),_:1})]),_:1})]),_:1}),n(m,{cols:"12",md:"6"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,null,{default:t(()=>[...e[23]||(e[23]=[o("统计信息",-1)])]),_:1}),n(k,null,{default:t(()=>[n(Z,null,{default:t(()=>[n(m,{cols:"6"},{default:t(()=>[n(g,{variant:"tonal",color:"success"},{default:t(()=>[n(k,{class:"text-center"},{default:t(()=>[p("div",Me,u(d.value.eventsReceived),1),e[24]||(e[24]=p("div",{class:"text-caption"}," 接收事件 ",-1))]),_:1})]),_:1})]),_:1}),n(m,{cols:"6"},{default:t(()=>[n(g,{variant:"tonal",color:"primary"},{default:t(()=>[n(k,{class:"text-center"},{default:t(()=>[p("div",Ne,u(d.value.eventsSent),1),e[25]||(e[25]=p("div",{class:"text-caption"}," 发送事件 ",-1))]),_:1})]),_:1})]),_:1}),n(m,{cols:"6"},{default:t(()=>[n(g,{variant:"tonal",color:"warning"},{default:t(()=>[n(k,{class:"text-center"},{default:t(()=>[p("div",Pe,u(d.value.errors),1),e[26]||(e[26]=p("div",{class:"text-caption"}," 错误次数 ",-1))]),_:1})]),_:1})]),_:1}),n(m,{cols:"6"},{default:t(()=>[n(g,{variant:"tonal",color:"info"},{default:t(()=>[n(k,{class:"text-center"},{default:t(()=>[p("div",Ee,u(d.value.reconnects),1),e[27]||(e[27]=p("div",{class:"text-caption"}," 重连次数 ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),n(ue,{class:"my-4"}),n(Y,{density:"compact"},{default:t(()=>[n(_,null,{default:t(()=>[n(y,null,{default:t(()=>[...e[28]||(e[28]=[o("平均延迟",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(d.value.avgLatency)+" ms",1)]),_:1})]),_:1}),n(_,null,{default:t(()=>[n(y,null,{default:t(()=>[...e[29]||(e[29]=[o("上次 Ping",-1)])]),_:1}),n(x,null,{default:t(()=>[o(u(d.value.lastPing)+" ms",1)]),_:1})]),_:1}),n(_,null,{default:t(()=>[n(y,null,{default:t(()=>[...e[30]||(e[30]=[o("数据传输",-1)])]),_:1}),n(x,null,{default:t(()=>[o(" ↑ "+u(te(d.value.bytesSent))+" / ↓ "+u(te(d.value.bytesReceived)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),n(m,{cols:"12",md:"6"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,null,{default:t(()=>[e[31]||(e[31]=o(" 事件监控 ",-1)),n(Q,{class:"ml-2",size:"small"},{default:t(()=>[o(u(N.value.size)+" 个监听器 ",1)]),_:1})]),_:1}),n(k,null,{default:t(()=>[n(Y,{density:"compact","max-height":"300",style:{"overflow-y":"auto"}},{default:t(()=>[N.value.size===0?(C(),H(_,{key:0},{default:t(()=>[n(y,{class:"text-center text-disabled"},{default:t(()=>[...e[32]||(e[32]=[o(" 暂无活动监听器 ",-1)])]),_:1})]),_:1})):q("",!0),(C(!0),z(de,null,ie(Array.from(N.value),a=>(C(),H(_,{key:a},{prepend:t(()=>[n(L,{size:"small"},{default:t(()=>[...e[33]||(e[33]=[o(" mdi-eye ",-1)])]),_:1})]),default:t(()=>[n(y,null,{default:t(()=>[o(u(a),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1}),n(m,{cols:"12",md:"6"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,null,{default:t(()=>[...e[34]||(e[34]=[o("发送自定义事件",-1)])]),_:1}),n(k,null,{default:t(()=>[n(we,{modelValue:b.value.name,"onUpdate:modelValue":e[0]||(e[0]=a=>b.value.name=a),label:"事件名称","prepend-icon":"mdi-tag",density:"compact",class:"mb-2"},null,8,["modelValue"]),n(Le,{modelValue:b.value.data,"onUpdate:modelValue":e[1]||(e[1]=a=>b.value.data=a),label:"数据 (JSON)","prepend-icon":"mdi-code-json",rows:"4",density:"compact",class:"mb-2"},null,8,["modelValue"]),n(V,{block:"",color:"primary","prepend-icon":"mdi-send",disabled:!$.value||!b.value.name,onClick:ye},{default:t(()=>[...e[35]||(e[35]=[o(" 发送事件 ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1}),n(m,{cols:"12"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,{class:"d-flex align-center"},{default:t(()=>[e[37]||(e[37]=o(" 连接日志 ",-1)),n(re),n($e,{modelValue:X.value,"onUpdate:modelValue":e[2]||(e[2]=a=>X.value=a),label:"自动滚动",density:"compact","hide-details":"",class:"mr-4"},null,8,["modelValue"]),n(V,{size:"small",variant:"text","prepend-icon":"mdi-download",onClick:Ve},{default:t(()=>[...e[36]||(e[36]=[o(" 导出 ",-1)])]),_:1})]),_:1}),n(k,null,{default:t(()=>[p("div",{ref_key:"logContainer",ref:P,class:"log-container",style:{height:"400px","overflow-y":"auto",background:"#1e1e1e","border-radius":"4px",padding:"12px"}},[(C(!0),z(de,null,ie(R.value,(a,i)=>(C(),z("div",{key:i,class:Ue(["log-entry",`log-${a.type}`])},[p("span",Oe,"["+u(a.time)+"]",1),p("span",je,"["+u(a.type.toUpperCase())+"]",1),p("span",Ae,u(a.message),1),a.data?(C(),z("pre",Fe,u(a.data),1)):q("",!0)],2))),128)),R.value.length===0?(C(),z("div",Je," 暂无日志 ")):q("",!0)],512)]),_:1})]),_:1})]),_:1}),n(m,{cols:"12"},{default:t(()=>[n(g,{border:""},{default:t(()=>[n(D,null,{default:t(()=>[...e[38]||(e[38]=[o("连接诊断",-1)])]),_:1}),n(k,null,{default:t(()=>[n(Z,null,{default:t(()=>[n(m,{cols:"12",md:"4"},{default:t(()=>[n(V,{block:"",color:"info","prepend-icon":"mdi-test-tube",onClick:ke},{default:t(()=>[...e[39]||(e[39]=[o(" 测试连接 ",-1)])]),_:1})]),_:1}),n(m,{cols:"12",md:"4"},{default:t(()=>[n(V,{block:"",color:"success","prepend-icon":"mdi-timer",disabled:!$.value,onClick:be},{default:t(()=>[...e[40]||(e[40]=[o(" 测量延迟 ",-1)])]),_:1},8,["disabled"])]),_:1}),n(m,{cols:"12",md:"4"},{default:t(()=>[n(V,{block:"",color:"warning","prepend-icon":"mdi-alert",onClick:xe},{default:t(()=>[...e[41]||(e[41]=[o(" 模拟错误 ",-1)])]),_:1})]),_:1})]),_:1}),v.value?(C(),H(Re,{key:0,type:v.value.type,class:"mt-4",closable:"","onClick:close":e[3]||(e[3]=a=>v.value=null)},{default:t(()=>[o(u(v.value.message),1)]),_:1},8,["type"])):q("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}},at=Se(He,[["__scopeId","data-v-a4520d11"]]);export{at as default}; diff --git a/assets/socketClient-pOSoE2ci.js b/assets/socketClient-BKHEsaLg.js similarity index 88% rename from assets/socketClient-pOSoE2ci.js rename to assets/socketClient-BKHEsaLg.js index d81a401..1092706 100644 --- a/assets/socketClient-pOSoE2ci.js +++ b/assets/socketClient-BKHEsaLg.js @@ -1 +1 @@ -import{l as f}from"./vendor-socket-dm1FmSOd.js";import{n as l}from"./index-CzpSlHRw.js";import{i as a,g as u}from"./serverRotation-xQe1elLG.js";let e=null,c=null;const r=new Set;function m(){var o,s;if(a())return u();const n=l("server.domain"),t=(s=(o=import.meta)==null?void 0:o.env)==null?void 0:s.VITE_SERVER_URL;return n||t||window.location.origin}function i(){const n=m();if(!e||c!==n){if(e){try{e.disconnect()}catch{}e=null}c=n,e=f(n,{transports:["polling","websocket"]}),r.forEach(({event:t,handler:o})=>{e.on(t,o)})}return e}function k(n,t){return i().on(n,t),r.add({event:n,handler:t}),()=>v(n,t)}function v(n,t){if(e){e.off(n,t);for(const o of Array.from(r))o.event===n&&o.handler===t&&r.delete(o)}}function E(n){const t=i();n&&t.emit("join-token",{token:n})}function S(n){e&&e.emit("leave-token",{token:n})}function U(){e&&e.emit("leave-all")}function w(n){const t=i();return t.on("connect",n),()=>t.off("connect",n)}function R(n,t=null){i().emit("send-event",{type:n,content:t})}function b(){if(e){try{e.disconnect()}catch{}e=null,c=null,r.clear()}}export{k as a,S as b,m as c,b as d,i as g,E as j,U as l,w as o,R as s}; +import{l as f}from"./vendor-socket-dm1FmSOd.js";import{n as l}from"./index-DGIAsv4W.js";import{i as a,g as u}from"./serverRotation-BtcwvdZJ.js";let e=null,c=null;const r=new Set;function m(){var o,s;if(a())return u();const n=l("server.domain"),t=(s=(o=import.meta)==null?void 0:o.env)==null?void 0:s.VITE_SERVER_URL;return n||t||window.location.origin}function i(){const n=m();if(!e||c!==n){if(e){try{e.disconnect()}catch{}e=null}c=n,e=f(n,{transports:["polling","websocket"]}),r.forEach(({event:t,handler:o})=>{e.on(t,o)})}return e}function k(n,t){return i().on(n,t),r.add({event:n,handler:t}),()=>v(n,t)}function v(n,t){if(e){e.off(n,t);for(const o of Array.from(r))o.event===n&&o.handler===t&&r.delete(o)}}function E(n){const t=i();n&&t.emit("join-token",{token:n})}function S(n){e&&e.emit("leave-token",{token:n})}function U(){e&&e.emit("leave-all")}function w(n){const t=i();return t.on("connect",n),()=>t.off("connect",n)}function R(n,t=null){i().emit("send-event",{type:n,content:t})}function b(){if(e){try{e.disconnect()}catch{}e=null,c=null,r.clear()}}export{k as a,S as b,m as c,b as d,i as g,E as j,U as l,w as o,R as s}; diff --git a/assets/vendor-utils-B_Y_1aLs.js b/assets/vendor-utils-B_Y_1aLs.js deleted file mode 100644 index 7f1cab3..0000000 --- a/assets/vendor-utils-B_Y_1aLs.js +++ /dev/null @@ -1,9 +0,0 @@ -function Dt(e,t){return function(){return e.apply(t,arguments)}}const{toString:En}=Object.prototype,{getPrototypeOf:te}=Object,{iterator:de,toStringTag:Nt}=Symbol,xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fe=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),xe(n,t))return!0;n=te(n)}return!1},Rn=(e,t)=>e!=null&&fe(e,t)?e[t]:void 0,Je=(e=>t=>{const n=En.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>Je(t)===e),Ce=e=>t=>typeof t===e,{isArray:Z}=Array,ne=Ce("undefined");function re(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ft=I("ArrayBuffer");function gn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ft(e.buffer),t}const Sn=Ce("string"),B=Ce("function"),Bt=Ce("number"),se=e=>e!==null&&typeof e=="object",An=e=>e===!0||e===!1,ge=e=>{if(!se(e))return!1;const t=te(e);return(t===null||t===Object.prototype||te(t)===null)&&!fe(e,Nt)&&!fe(e,de)},On=e=>{if(!se(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},xn=I("Date"),_n=I("File"),Tn=e=>!!(e&&typeof e.uri<"u"),Cn=e=>e&&typeof e.getParts<"u",Pn=I("Blob"),Un=I("FileList"),Dn=e=>se(e)&&B(e.pipe);function Nn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ct=Nn(),lt=typeof ct.FormData<"u"?ct.FormData:void 0,Fn=e=>{if(!e)return!1;if(lt&&e instanceof lt)return!0;const t=te(e);if(!t||t===Object.prototype||!B(e.append))return!1;const n=Je(e);return n==="formdata"||n==="object"&&B(e.toString)&&e.toString()==="[object FormData]"},Bn=I("URLSearchParams"),[Ln,In,jn,kn]=["ReadableStream","Request","Response","Headers"].map(I),qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!ne(e)&&e!==K;function He(...e){const{caseless:t,skipUndefined:n}=It(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&Lt(r,i)||i,l=xe(r,c)?r[c]:void 0;ge(l)&&ge(o)?r[c]=He(l,o):ge(o)?r[c]=He({},o):Z(o)?r[c]=o.slice():(!n||!ne(o))&&(r[c]=o)};for(let o=0,i=e.length;o(pe(t,(s,o)=>{n&&B(s)?Object.defineProperty(e,o,{__proto__:null,value:Dt(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Mn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},$n=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&te(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Vn=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!Bt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&te(Uint8Array)),Wn=(e,t)=>{const r=(e&&e[de]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Kn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Xn=I("HTMLFormElement"),Zn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Gn}=Object.prototype,Qn=I("RegExp"),jt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pe(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Yn=e=>{jt(e,(t,n)=>{if(B(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(B(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},er=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},tr=()=>{},nr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rr(e){return!!(e&&B(e.append)&&e[Nt]==="FormData"&&e[de])}const sr=e=>{const t=new WeakSet,n=r=>{if(se(r)){if(t.has(r))return;if(re(r))return r;if(!("toJSON"in r)){t.add(r);const s=Z(r)?[]:{};return pe(r,(o,i)=>{const c=n(o);!ne(c)&&(s[i]=c)}),t.delete(r),s}}return r};return n(e)},or=I("AsyncFunction"),ir=e=>e&&(se(e)||B(e))&&B(e.then)&&B(e.catch),kt=((e,t)=>e?setImmediate:t?((n,r)=>(K.addEventListener("message",({source:s,data:o})=>{s===K&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),K.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",B(K.postMessage)),ar=typeof queueMicrotask<"u"?queueMicrotask.bind(K):typeof process<"u"&&process.nextTick||kt,qt=e=>e!=null&&B(e[de]),cr=e=>e!=null&&fe(e,de)&&qt(e),a={isArray:Z,isArrayBuffer:Ft,isBuffer:re,isFormData:Fn,isArrayBufferView:gn,isString:Sn,isNumber:Bt,isBoolean:An,isObject:se,isPlainObject:ge,isEmptyObject:On,isReadableStream:Ln,isRequest:In,isResponse:jn,isHeaders:kn,isUndefined:ne,isDate:xn,isFile:_n,isReactNativeBlob:Tn,isReactNative:Cn,isBlob:Pn,isRegExp:Qn,isFunction:B,isStream:Dn,isURLSearchParams:Bn,isTypedArray:Jn,isFileList:Un,forEach:pe,merge:He,extend:Hn,trim:qn,stripBOM:Mn,inherits:zn,toFlatObject:$n,kindOf:Je,kindOfTest:I,endsWith:vn,toArray:Vn,forEachEntry:Wn,matchAll:Kn,isHTMLForm:Xn,hasOwnProperty:xe,hasOwnProp:xe,hasOwnInPrototypeChain:fe,getSafeProp:Rn,reduceDescriptors:jt,freezeMethods:Yn,toObjectSet:er,toCamelCase:Zn,noop:tr,toFiniteNumber:nr,findKey:Lt,global:K,isContextDefined:It,isSpecCompliantForm:rr,toJSONObject:sr,isAsyncFn:or,isThenable:ir,setImmediate:kt,asap:ar,isIterable:qt,isSafeIterable:cr},lr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ur=e=>{const t={};let n,r,s;return e&&e.split(` -`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&lr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function fr(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const dr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),pr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function We(e,t){return a.isArray(e)?e.map(n=>We(n,t)):fr(String(e).replace(t,""))}const hr=e=>We(e,dr),mr=e=>We(e,pr);function Ht(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=mr(n)}),t}const ut=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function Se(e){return e===!1||e==null?e:a.isArray(e)?e.map(Se):hr(String(e))}function yr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const br=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function wr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Er(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let F=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,f){const u=le(l);if(!u)return;const p=a.findKey(s,u);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||l]=Se(c))}const i=(c,l)=>a.forEach(c,(f,u)=>o(f,u,l));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!br(t))i(ur(t),n);else if(a.isObject(t)&&a.isSafeIterable(t)){let c=Object.create(null),l,f;for(const u of t){if(!a.isArray(u))throw new TypeError("Object iterator must return a key-value pair");f=u[0],a.hasOwnProp(c,f)?(l=c[f],c[f]=a.isArray(l)?[...l,u[1]]:[l,u[1]]):c[f]=u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=le(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return yr(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=le(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=le(i),i){const c=a.findKey(r,i);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Le(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Se(s),delete n[o];return}const c=t?wr(o):String(o).trim();c!==o&&delete n[o],n[c]=Se(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ut]=this[ut]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=le(i);r[c]||(Er(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(F.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(F);const Rr="[REDACTED ****]";function gr(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Sr(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof F&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const f=s(c);a.isUndefined(f)||(i[l]=f)});else{if(!a.isPlainObject(o)&&gr(o))return r.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const f=n.has(c.toLowerCase())?Rr:s(l);a.isUndefined(f)||(i[c]=f)}}return r.pop(),i};return s(e)}let h=class Mt extends Error{static from(t,n,r,s,o,i){const c=new Mt(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?Sr(t,n):a.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ar=null,zt=100;function Me(e){return a.isPlainObject(e)||a.isArray(e)}function $t(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map(function(s,o){return s=$t(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Or(e){return a.isArray(e)&&!e.some(Me)}const xr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Pe(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,E){return!a.isUndefined(E[y])});const r=n.metaTokens,s=n.visitor||S,o=n.dots,i=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?zt:n.maxDepth,f=c&&a.isSpecCompliantForm(t),u=[];if(!a.isFunction(s))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!f&&a.isBlob(d))throw new h("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function b(d){if(d>l)throw new h("Object is too deeply nested ("+d+" levels). Max depth: "+l,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(d,y){if(l===1/0)return JSON.stringify(d);const E=[];return JSON.stringify(d,function(D,x){if(!a.isObject(x))return x;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(x),b(y+E.length-1),x})}function S(d,y,E){let g=d;if(a.isReactNative(t)&&a.isReactNativeBlob(d))return t.append(Ie(E,y,o),p(d)),!1;if(d&&!E&&typeof d=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),d=w(d,1);else if(a.isArray(d)&&Or(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(g=a.toArray(d)))return y=$t(y),g.forEach(function(x,M){!(a.isUndefined(x)||x===null)&&t.append(i===!0?Ie([y],M,o):i===null?y:y+"[]",p(x))}),!1}return Me(d)?!0:(t.append(Ie(E,y,o),p(d)),!1)}const A=Object.assign(xr,{defaultVisitor:S,convertValue:p,isVisitable:Me});function m(d,y,E=0){if(!a.isUndefined(d)){if(b(E),u.indexOf(d)!==-1)throw new Error("Circular reference detected in "+y.join("."));u.push(d),a.forEach(d,function(D,x){(!(a.isUndefined(D)||D===null)&&s.call(t,D,a.isString(x)?x.trim():x,y,A))===!0&&m(D,y?y.concat(x):[x],E+1)}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return m(e),t}function ft(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ke(e,t){this._pairs=[],e&&Pe(e,this,t)}const vt=Ke.prototype;vt.append=function(t,n){this._pairs.push([t,n])};vt.toString=function(t){const n=t?function(r){return t.call(this,r,ft)}:ft;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function _r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vt(e,t,n){if(!t)return e;const r=a.isFunction(n)?{serialize:n}:n,s=a.getSafeProp(r,"encode")||_r,o=a.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=a.isURLSearchParams(t)?t.toString():new Ke(t,r).toString(s),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Tr=typeof URLSearchParams<"u"?URLSearchParams:Ke,Cr=typeof FormData<"u"?FormData:null,Pr=typeof Blob<"u"?Blob:null,Ur={isBrowser:!0,classes:{URLSearchParams:Tr,FormData:Cr,Blob:Pr},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",ze=typeof navigator=="object"&&navigator||void 0,Dr=Ze&&(!ze||["ReactNative","NativeScript","NS"].indexOf(ze.product)<0),Nr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ze&&window.location.href||"http://localhost",Br=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:Dr,hasStandardBrowserWebWorkerEnv:Nr,navigator:ze,origin:Fr},Symbol.toStringTag,{value:"Module"})),U={...Br,...Ur};function Lr(e,t){return Pe(e,new U.classes.URLSearchParams,{visitor:function(n,r,s,o){return U.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const pt=zt;function Jt(e){if(e>pt)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+pt,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ir(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Jt(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function jr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,l?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!a.hasOwnProp(s,i)||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=jr(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Ir(r),s,n,0)}),n}return null}const Y=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function kr(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const he={transitional:Xe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Wt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const l=Y(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lr(t,l).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Y(this,"env"),u=f&&f.FormData;return Pe(c?{"files[]":t}:t,u&&new u,l)}}return o||s?(n.setContentType("application/json",!1),kr(t)):t}],transformResponse:[function(t){const n=Y(this,"transitional")||he.transitional,r=n&&n.forcedJSONParsing,s=Y(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Y(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?h.from(l,h.ERR_BAD_RESPONSE,this,null,Y(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch","query"],e=>{he.headers[e]={}});function je(e,t){const n=this||he,r=t||n,s=F.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kt(e){return!!(e&&e.__CANCEL__)}let me=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,n.status>=400&&n.status<500?h.ERR_BAD_REQUEST:h.ERR_BAD_RESPONSE,n.config,n.request,n))}function qr(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Hr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),u=r[o];i||(i=f),n[s]=l,r[s]=f;let p=o,b=0;for(;p!==s;)b+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),p=u-n;p>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-p)))},()=>s&&i(s)]}const _e=(e,t,n=3)=>{let r=0;const s=Hr(50,250);return Mr(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=c!=null?Math.min(i,c):i,f=Math.max(0,l-r),u=s(f);r=Math.max(r,l);const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c?(c-l)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},ht=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mt=e=>(...t)=>a.asap(()=>e(...t)),zr=U.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,U.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,$r=U.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof F?{...e}:e;function G(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,p,b,w){return a.isPlainObject(u)&&a.isPlainObject(p)?a.merge.call({caseless:w},u,p):a.isPlainObject(p)?a.merge({},p):a.isArray(p)?p.slice():p}function s(u,p,b,w){if(a.isUndefined(p)){if(!a.isUndefined(u))return r(void 0,u,b,w)}else return r(u,p,b,w)}function o(u,p){if(!a.isUndefined(p))return r(void 0,p)}function i(u,p){if(a.isUndefined(p)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,p)}function c(u){const p=a.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!a.isUndefined(p))if(a.isPlainObject(p)){if(a.hasOwnProp(p,u))return p[u]}else return;const b=a.hasOwnProp(e,"transitional")?e.transitional:void 0;if(a.isPlainObject(b)&&a.hasOwnProp(b,u))return b[u]}function l(u,p,b){if(a.hasOwnProp(t,b))return r(u,p);if(a.hasOwnProp(e,b))return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(u,p,b)=>s(bt(u),bt(p),b,!0)};return a.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const b=a.hasOwnProp(f,p)?f[p]:s,w=a.hasOwnProp(e,p)?e[p]:void 0,S=a.hasOwnProp(t,p)?t[p]:void 0,A=b(w,S,p);a.isUndefined(A)&&b!==l||(n[p]=A)}),a.hasOwnProp(t,"validateStatus")&&a.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(a.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Zr=["content-type","content-length"];function Gr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,s])=>{Zr.includes(r.toLowerCase())&&e.set(r,s)})}const Qr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Gt(e){const t=G({},e),n=b=>a.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const l=n("auth"),f=n("baseURL"),u=n("allowAbsoluteUrls"),p=n("url");if(t.headers=c=F.from(c),t.url=Vt(Zt(f,p,u,t),n("params"),n("paramsSerializer")),l){const b=a.getSafeProp(l,"username")||"",w=a.getSafeProp(l,"password")||"";c.set("Authorization","Basic "+btoa(b+":"+(w?Qr(w):"")))}if(a.isFormData(r)&&(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv||a.isReactNative(r)?c.setContentType(void 0):a.isFunction(r.getHeaders)&&Gr(c,r.getHeaders(),n("formDataHeaderPolicy"))),U.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&zr(t.url))){const w=o&&i&&$r.read(i);w&&c.set(o,w)}return t}const Yr=typeof XMLHttpRequest<"u",es=Yr&&function(e){return new Promise(function(n,r){const s=Gt(e);let o=s.data;const i=F.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=s,u,p,b,w,S;function A(){w&&w(),S&&S(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function d(){if(!m)return;const E=F.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),D={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:e,request:m};Xt(function(M){n(M),A()},function(M){r(M),A()},D),m=null}"onloadend"in m?m.onloadend=d:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(d)},m.onabort=function(){m&&(r(new h("Request aborted",h.ECONNABORTED,e,m)),A(),m=null)},m.onerror=function(g){const D=g&&g.message?g.message:"Network Error",x=new h(D,h.ERR_NETWORK,e,m);x.event=g||null,r(x),A(),m=null},m.ontimeout=function(){let g=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||Xe;s.timeoutErrorMessage&&(g=s.timeoutErrorMessage),r(new h(g,D.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,m)),A(),m=null},o===void 0&&i.setContentType(null),"setRequestHeader"in m&&a.forEach(Ht(i),function(g,D){m.setRequestHeader(D,g)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),f&&([b,S]=_e(f,!0),m.addEventListener("progress",b)),l&&m.upload&&([p,w]=_e(l),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(u=E=>{m&&(r(!E||E.type?new me(null,e,m):E),m.abort(),A(),m=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const y=qr(s.url);if(y&&!U.protocols.includes(y)){r(new h("Unsupported protocol "+y+":",h.ERR_BAD_REQUEST,e));return}m.send(o||null)})},ts=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const f=l instanceof Error?l:this.reason;n.abort(f instanceof h?f:new me(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,s(new h(`timeout of ${t}ms exceeded`,h.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>a.asap(i),c},ns=function*(e,t){let n=e.byteLength;if(n{const s=rs(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await s.next();if(f){c(),l.close();return}let p=u.byteLength;if(n){let b=o+=p;n(b)}l.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},Te=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,os=(e,t,n)=>t+2w>=2&&r.charCodeAt(w-2)===37&&r.charCodeAt(w-1)===51&&(r.charCodeAt(w)===68||r.charCodeAt(w)===100);f>=0&&(r.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(r.charCodeAt(f)===61||u(f))&&l++;const b=Math.floor(i/4)*3-(l||0);return b>0?b:0}let o=0;for(let i=0,c=r.length;i=55296&&l<=56319&&i+1=56320&&f<=57343?(o+=4,i++):o+=3}else o+=3}return o}const Ge="1.18.0",Et=64*1024,{isFunction:Ee}=a,as=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Rt=e=>{if(!a.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cs=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},ls=e=>{const t=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=a.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,c=s?Ee(s):typeof fetch=="function",l=Ee(o),f=Ee(i);if(!c)return!1;const u=c&&Ee(n),p=c&&(typeof r=="function"?(d=>y=>d.encode(y))(new r):async d=>new Uint8Array(await new o(d).arrayBuffer())),b=l&&u&>(()=>{let d=!1;const y=new o(U.origin,{body:new n,method:"POST",get duplex(){return d=!0,"half"}}),E=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),d&&!E}),w=f&&u&>(()=>a.isReadableStream(new i("").body)),S={stream:w&&(d=>d.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!S[d]&&(S[d]=(y,E)=>{let g=y&&y[d];if(g)return g.call(y);throw new h(`Response type '${d}' is not supported`,h.ERR_NOT_SUPPORT,E)})});const A=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new o(U.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await p(d)).byteLength},m=async(d,y)=>{const E=a.toFiniteNumber(d.getContentLength());return E??A(y)};return async d=>{let{url:y,method:E,data:g,signal:D,cancelToken:x,timeout:M,onDownloadProgress:De,onUploadProgress:Ne,responseType:z,headers:$,withCredentials:ye="same-origin",fetchOptions:tt,maxContentLength:j,maxBodyLength:be}=Gt(d);const ie=a.isNumber(j)&&j>-1,Fe=a.isNumber(be)&&be>-1,yn=O=>a.hasOwnProp(d,O)?d[O]:void 0;let nt=s||fetch;z=z?(z+"").toLowerCase():"text";let v=ts([D,x&&x.toAbortSignal()],M),T=null;const J=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let Q,ae=null;const rt=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,d,T);try{let O;const k=yn("auth");if(k){const R=a.getSafeProp(k,"username")||"",L=a.getSafeProp(k,"password")||"";O={username:R,password:L}}if(cs(y)){const R=new URL(y,U.origin);if(!O&&(R.username||R.password)){const L=Rt(R.username),V=Rt(R.password);O={username:L,password:V}}(R.username||R.password)&&(R.username="",R.password="",y=R.href)}if(O&&($.delete("authorization"),$.set("Authorization","Basic "+btoa(as((O.username||"")+":"+(O.password||""))))),ie&&typeof y=="string"&&y.startsWith("data:")&&is(y)>j)throw new h("maxContentLength size of "+j+" exceeded",h.ERR_BAD_RESPONSE,d,T);if(Fe&&E!=="get"&&E!=="head"){const R=await A(g);if(typeof R=="number"&&isFinite(R)&&(Q=R,R>be))throw rt()}const we=Fe&&(a.isReadableStream(g)||a.isStream(g)),st=(R,L,V)=>wt(R,Et,W=>{if(Fe&&W>be)throw ae=rt();L&&L(W)},V);if(b&&E!=="get"&&E!=="head"&&(Ne||we)){if(Q=Q??await m($,g),Q!==0||we){let R=new o(y,{method:"POST",body:g,duplex:"half"}),L;if(a.isFormData(g)&&(L=R.headers.get("content-type"))&&$.setContentType(L),R.body){const[V,W]=Ne&&ht(Q,_e(mt(Ne)))||[];g=st(R.body,V,W)}}}else if(we&&!l&&u&&E!=="get"&&E!=="head")g=st(g);else if(we&&l&&!b&&E!=="get"&&E!=="head")throw new h("Stream request bodies are not supported by the current fetch implementation",h.ERR_NOT_SUPPORT,d,T);a.isString(ye)||(ye=ye?"include":"omit");const bn=l&&"credentials"in o.prototype;if(a.isFormData(g)){const R=$.getContentType();R&&/^multipart\/form-data/i.test(R)&&!/boundary=/i.test(R)&&$.delete("content-type")}$.set("User-Agent","axios/"+Ge,!1);const ot={...tt,signal:v,method:E.toUpperCase(),headers:Ht($.normalize()),body:g,duplex:"half",credentials:bn?ye:void 0};T=l&&new o(y,ot);let q=await(l?nt(T,tt):nt(y,ot));const it=F.from(q.headers);if(ie){const R=a.toFiniteNumber(it.getContentLength());if(R!=null&&R>j)throw new h("maxContentLength size of "+j+" exceeded",h.ERR_BAD_RESPONSE,d,T)}const Be=w&&(z==="stream"||z==="response");if(w&&q.body&&(De||ie||Be&&J)){const R={};["status","statusText","headers"].forEach(ce=>{R[ce]=q[ce]});const L=a.toFiniteNumber(it.getContentLength()),[V,W]=De&&ht(L,_e(mt(De),!0))||[];let at=0;const wn=ce=>{if(ie&&(at=ce,at>j))throw new h("maxContentLength size of "+j+" exceeded",h.ERR_BAD_RESPONSE,d,T);V&&V(ce)};q=new i(wt(q.body,Et,wn,()=>{W&&W(),J&&J()}),R)}z=z||"text";let H=await S[a.findKey(S,z)||"text"](q,d);if(ie&&!w&&!Be){let R;if(H!=null&&(typeof H.byteLength=="number"?R=H.byteLength:typeof H.size=="number"?R=H.size:typeof H=="string"&&(R=typeof r=="function"?new r().encode(H).byteLength:H.length)),typeof R=="number"&&R>j)throw new h("maxContentLength size of "+j+" exceeded",h.ERR_BAD_RESPONSE,d,T)}return!Be&&J&&J(),await new Promise((R,L)=>{Xt(R,L,{data:H,headers:F.from(q.headers),status:q.status,statusText:q.statusText,config:d,request:T})})}catch(O){if(J&&J(),v&&v.aborted&&v.reason instanceof h){const k=v.reason;throw k.config=d,T&&(k.request=T),O!==k&&(k.cause=O),k}throw ae?(T&&!ae.request&&(ae.request=T),ae):O instanceof h?(T&&!O.request&&(O.request=T),O):O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new h("Network Error",h.ERR_NETWORK,d,T,O&&O.response),{cause:O.cause||O}):h.from(O,O&&O.code,d,T,O&&O.response)}}},us=new Map,Qt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,l,f,u=us;for(;c--;)l=o[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:ls(t)),u=f;return f};Qt();const Qe={http:Ar,xhr:es,fetch:{get:Qt}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const St=e=>`- ${e}`,fs=e=>a.isFunction(e)||e===null||e===!1;function ds(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since : -`+i.map(St).join(` -`):" "+St(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Yt={getAdapter:ds,adapters:Qe};function ke(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new me(null,e)}function At(e){return ke(e),e.headers=F.from(e.headers),e.data=je.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yt.getAdapter(e.adapter||he.adapter,e)(e).then(function(r){ke(e),e.response=r;try{r.data=je.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=F.from(r.headers),r},function(r){if(!Kt(r)&&(ke(e),r&&r.response)){e.response=r.response;try{r.response.data=je.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=F.from(r.response.headers)}return Promise.reject(r)})}const Ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ue[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ot={};Ue.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ge+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new h(s(i," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!Ot[i]&&(Ot[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Ue.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ps(e,t,n){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new h("option "+o+" must be "+l,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const Ae={assertOptions:ps,validators:Ue},N=Ae.validators;let X=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` -`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` -`),c=i===-1?-1:o.indexOf(` -`,i+1),l=c===-1?"":o.slice(c+1);String(r.stack).endsWith(l)||(r.stack+=` -`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=G(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ae.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean),advertiseZstdAcceptEncoding:N.transitional(N.boolean),validateStatusUndefinedResolves:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Ae.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ae.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","query","common"],S=>{delete o[S]}),n.headers=F.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;l=l&&A.synchronous;const m=n.transitional||Xe;m&&m.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let u,p=0,b;if(!l){const S=[At.bind(this),void 0];for(S.unshift(...c),S.push(...f),b=S.length,u=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new me(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new en(function(s){t=s}),cancel:t}}};function ms(e){return function(n){return e.apply(null,n)}}function ys(e){return a.isObject(e)&&e.isAxiosError===!0}const $e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($e).forEach(([e,t])=>{$e[t]=e});function tn(e){const t=new X(e),n=Dt(X.prototype.request,t);return a.extend(n,X.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return tn(G(e,s))},n}const _=tn(he);_.Axios=X;_.CanceledError=me;_.CancelToken=hs;_.isCancel=Kt;_.VERSION=Ge;_.toFormData=Pe;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=ms;_.isAxiosError=ys;_.mergeConfig=G;_.AxiosHeaders=F;_.formToJSON=e=>Wt(a.isHTMLForm(e)?new FormData(e):e);_.getAdapter=Yt.getAdapter;_.HttpStatusCode=$e;_.default=_;const{Axios:Ls,AxiosError:Is,CanceledError:js,isCancel:ks,CancelToken:qs,VERSION:Hs,all:Ms,Cancel:zs,isAxiosError:$s,spread:vs,toFormData:Vs,AxiosHeaders:Js,HttpStatusCode:Ws,formToJSON:Ks,getAdapter:Xs,mergeConfig:Zs,create:Gs}=_,nn="3.7.8",bs=nn,oe=typeof Buffer=="function",xt=typeof TextDecoder=="function"?new TextDecoder:void 0,_t=typeof TextEncoder=="function"?new TextEncoder:void 0,ws="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ue=Array.prototype.slice.call(ws),Re=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(ue),Es=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,P=String.fromCharCode.bind(String),Tt=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),rn=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),sn=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),on=e=>{let t,n,r,s,o="";const i=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(s=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,o+=ue[t>>18&63]+ue[t>>12&63]+ue[t>>6&63]+ue[t&63]}return i?o.slice(0,i-3)+"===".substring(i):o},Ye=typeof btoa=="function"?e=>btoa(e):oe?e=>Buffer.from(e,"binary").toString("base64"):on,ve=oe?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,s=e.length;rt?rn(ve(e)):ve(e),Rs=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?P(192|t>>>6)+P(128|t&63):P(224|t>>>12&15)+P(128|t>>>6&63)+P(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return P(240|t>>>18&7)+P(128|t>>>12&63)+P(128|t>>>6&63)+P(128|t&63)}},gs=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,an=e=>e.replace(gs,Rs),Ct=oe?e=>Buffer.from(e,"utf8").toString("base64"):_t?e=>ve(_t.encode(e)):e=>Ye(an(e)),ee=(e,t=!1)=>t?rn(Ct(e)):Ct(e),Pt=e=>ee(e,!0),Ss=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,As=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return P((n>>>10)+55296)+P((n&1023)+56320);case 3:return P((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return P((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},cn=e=>e.replace(Ss,As),ln=e=>{if(e=e.replace(/\s+/g,""),!Es.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n,r,s=[];for(let o=0;o>16&255)):r===64?s.push(P(t>>16&255,t>>8&255)):s.push(P(t>>16&255,t>>8&255,t&255));return s.join("")},et=typeof atob=="function"?e=>atob(sn(e)):oe?e=>Buffer.from(e,"base64").toString("binary"):ln,un=oe?e=>Tt(Buffer.from(e,"base64")):e=>Tt(et(e).split("").map(t=>t.charCodeAt(0))),fn=e=>un(dn(e)),Os=oe?e=>Buffer.from(e,"base64").toString("utf8"):xt?e=>xt.decode(un(e)):e=>cn(et(e)),dn=e=>sn(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Ve=e=>Os(dn(e)),xs=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},pn=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),hn=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,pn(n));e("fromBase64",function(){return Ve(this)}),e("toBase64",function(t){return ee(this,t)}),e("toBase64URI",function(){return ee(this,!0)}),e("toBase64URL",function(){return ee(this,!0)}),e("toUint8Array",function(){return fn(this)})},mn=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,pn(n));e("toBase64",function(t){return Oe(this,t)}),e("toBase64URI",function(){return Oe(this,!0)}),e("toBase64URL",function(){return Oe(this,!0)})},_s=()=>{hn(),mn()},Qs={version:nn,VERSION:bs,atob:et,atobPolyfill:ln,btoa:Ye,btoaPolyfill:on,fromBase64:Ve,toBase64:ee,encode:ee,encodeURI:Pt,encodeURL:Pt,utob:an,btou:cn,decode:Ve,isValid:xs,fromUint8Array:Oe,toUint8Array:fn,extendString:hn,extendUint8Array:mn,extendBuiltins:_s},C=[];for(let e=0;e<256;++e)C.push((e+256).toString(16).slice(1));function Ts(e,t=0){return(C[e[t+0]]+C[e[t+1]]+C[e[t+2]]+C[e[t+3]]+"-"+C[e[t+4]]+C[e[t+5]]+"-"+C[e[t+6]]+C[e[t+7]]+"-"+C[e[t+8]]+C[e[t+9]]+"-"+C[e[t+10]]+C[e[t+11]]+C[e[t+12]]+C[e[t+13]]+C[e[t+14]]+C[e[t+15]]).toLowerCase()}let qe;const Cs=new Uint8Array(16);function Ps(){if(!qe){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");qe=crypto.getRandomValues.bind(crypto)}return qe(Cs)}const Us=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ut={randomUUID:Us};function Ds(e,t,n){var s;e=e||{};const r=e.random??((s=e.rng)==null?void 0:s.call(e))??Ps();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ts(r)}function Ys(e,t,n){return Ut.randomUUID&&!e?Ut.randomUUID():Ds(e)}export{_ as a,Qs as g,Ys as v}; diff --git a/assets/vendor-utils-DwALrQNc.js b/assets/vendor-utils-DwALrQNc.js new file mode 100644 index 0000000..00a67c8 --- /dev/null +++ b/assets/vendor-utils-DwALrQNc.js @@ -0,0 +1,9 @@ +function Dt(e,t){return function(){return e.apply(t,arguments)}}const{toString:En}=Object.prototype,{getPrototypeOf:te}=Object,{iterator:de,toStringTag:Nt}=Symbol,_e=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fe=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),_e(n,t))return!0;n=te(n)}return!1},Rn=(e,t)=>e!=null&&fe(e,t)?e[t]:void 0,Je=(e=>t=>{const n=En.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),j=e=>(e=e.toLowerCase(),t=>Je(t)===e),Ce=e=>t=>typeof t===e,{isArray:Z}=Array,ne=Ce("undefined");function re(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ft=j("ArrayBuffer");function gn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ft(e.buffer),t}const Sn=Ce("string"),B=Ce("function"),Bt=Ce("number"),se=e=>e!==null&&typeof e=="object",On=e=>e===!0||e===!1,ge=e=>{if(!se(e))return!1;const t=te(e);return(t===null||t===Object.prototype||te(t)===null)&&!fe(e,Nt)&&!fe(e,de)},An=e=>{if(!se(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_n=j("Date"),xn=j("File"),Tn=e=>!!(e&&typeof e.uri<"u"),Cn=e=>e&&typeof e.getParts<"u",Pn=j("Blob"),Un=j("FileList"),Dn=e=>se(e)&&B(e.pipe);function Nn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ct=Nn(),lt=typeof ct.FormData<"u"?ct.FormData:void 0,Fn=e=>{if(!e)return!1;if(lt&&e instanceof lt)return!0;const t=te(e);if(!t||t===Object.prototype||!B(e.append))return!1;const n=Je(e);return n==="formdata"||n==="object"&&B(e.toString)&&e.toString()==="[object FormData]"},Bn=j("URLSearchParams"),[Ln,In,jn,kn]=["ReadableStream","Request","Response","Headers"].map(j),qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!ne(e)&&e!==K;function He(...e){const{caseless:t,skipUndefined:n}=It(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&Lt(r,i)||i,l=_e(r,c)?r[c]:void 0;ge(l)&&ge(o)?r[c]=He(l,o):ge(o)?r[c]=He({},o):Z(o)?r[c]=o.slice():(!n||!ne(o))&&(r[c]=o)};for(let o=0,i=e.length;o(pe(t,(s,o)=>{n&&B(s)?Object.defineProperty(e,o,{__proto__:null,value:Dt(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Mn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},vn=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&te(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$n=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Vn=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!Bt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&te(Uint8Array)),Wn=(e,t)=>{const r=(e&&e[de]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Kn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Xn=j("HTMLFormElement"),Zn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Gn}=Object.prototype,Qn=j("RegExp"),jt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pe(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Yn=e=>{jt(e,(t,n)=>{if(B(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(B(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},er=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},tr=()=>{},nr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rr(e){return!!(e&&B(e.append)&&e[Nt]==="FormData"&&e[de])}const sr=e=>{const t=new WeakSet,n=r=>{if(se(r)){if(t.has(r))return;if(re(r))return r;if(!("toJSON"in r)){t.add(r);const s=Z(r)?[]:{};return pe(r,(o,i)=>{const c=n(o);!ne(c)&&(s[i]=c)}),t.delete(r),s}}return r};return n(e)},or=j("AsyncFunction"),ir=e=>e&&(se(e)||B(e))&&B(e.then)&&B(e.catch),kt=((e,t)=>e?setImmediate:t?((n,r)=>(K.addEventListener("message",({source:s,data:o})=>{s===K&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),K.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",B(K.postMessage)),ar=typeof queueMicrotask<"u"?queueMicrotask.bind(K):typeof process<"u"&&process.nextTick||kt,qt=e=>e!=null&&B(e[de]),cr=e=>e!=null&&fe(e,de)&&qt(e),a={isArray:Z,isArrayBuffer:Ft,isBuffer:re,isFormData:Fn,isArrayBufferView:gn,isString:Sn,isNumber:Bt,isBoolean:On,isObject:se,isPlainObject:ge,isEmptyObject:An,isReadableStream:Ln,isRequest:In,isResponse:jn,isHeaders:kn,isUndefined:ne,isDate:_n,isFile:xn,isReactNativeBlob:Tn,isReactNative:Cn,isBlob:Pn,isRegExp:Qn,isFunction:B,isStream:Dn,isURLSearchParams:Bn,isTypedArray:Jn,isFileList:Un,forEach:pe,merge:He,extend:Hn,trim:qn,stripBOM:Mn,inherits:zn,toFlatObject:vn,kindOf:Je,kindOfTest:j,endsWith:$n,toArray:Vn,forEachEntry:Wn,matchAll:Kn,isHTMLForm:Xn,hasOwnProperty:_e,hasOwnProp:_e,hasOwnInPrototypeChain:fe,getSafeProp:Rn,reduceDescriptors:jt,freezeMethods:Yn,toObjectSet:er,toCamelCase:Zn,noop:tr,toFiniteNumber:nr,findKey:Lt,global:K,isContextDefined:It,isSpecCompliantForm:rr,toJSONObject:sr,isAsyncFn:or,isThenable:ir,setImmediate:kt,asap:ar,isIterable:qt,isSafeIterable:cr},lr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ur=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&lr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function fr(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const dr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),pr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function We(e,t){return a.isArray(e)?e.map(n=>We(n,t)):fr(String(e).replace(t,""))}const hr=e=>We(e,dr),mr=e=>We(e,pr);function Ht(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=mr(n)}),t}const ut=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function Se(e){return e===!1||e==null?e:a.isArray(e)?e.map(Se):hr(String(e))}function yr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const br=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function wr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Er(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let F=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,f){const u=le(l);if(!u)return;const p=a.findKey(s,u);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||l]=Se(c))}const i=(c,l)=>a.forEach(c,(f,u)=>o(f,u,l));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!br(t))i(ur(t),n);else if(a.isObject(t)&&a.isSafeIterable(t)){let c=Object.create(null),l,f;for(const u of t){if(!a.isArray(u))throw new TypeError("Object iterator must return a key-value pair");f=u[0],a.hasOwnProp(c,f)?(l=c[f],c[f]=a.isArray(l)?[...l,u[1]]:[l,u[1]]):c[f]=u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=le(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return yr(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=le(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=le(i),i){const c=a.findKey(r,i);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Le(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Se(s),delete n[o];return}const c=t?wr(o):String(o).trim();c!==o&&delete n[o],n[c]=Se(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ut]=this[ut]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=le(i);r[c]||(Er(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(F.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(F);const Rr="[REDACTED ****]";function gr(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Sr(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof F&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const f=s(c);a.isUndefined(f)||(i[l]=f)});else{if(!a.isPlainObject(o)&&gr(o))return r.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const f=n.has(c.toLowerCase())?Rr:s(l);a.isUndefined(f)||(i[c]=f)}}return r.pop(),i};return s(e)}let h=class Mt extends Error{static from(t,n,r,s,o,i){const c=new Mt(t.message,n||t.code,r,s,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?Sr(t,n):a.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Or=null,zt=100;function Me(e){return a.isPlainObject(e)||a.isArray(e)}function vt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map(function(s,o){return s=vt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Ar(e){return a.isArray(e)&&!e.some(Me)}const _r=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Pe(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,E){return!a.isUndefined(E[y])});const r=n.metaTokens,s=n.visitor||g,o=n.dots,i=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?zt:n.maxDepth,f=c&&a.isSpecCompliantForm(t),u=[];if(!a.isFunction(s))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!f&&a.isBlob(d))throw new h("Blob is not supported. Use a Buffer instead.");if(a.isArrayBuffer(d)||a.isTypedArray(d)){if(f&&typeof c=="function")return new c([d]);if(typeof Buffer<"u")return Buffer.from(d);throw new h("Blob is not supported. Use a Buffer instead.",h.ERR_NOT_SUPPORT)}return d}function b(d){if(d>l)throw new h("Object is too deeply nested ("+d+" levels). Max depth: "+l,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(d,y){if(l===1/0)return JSON.stringify(d);const E=[];return JSON.stringify(d,function(D,_){if(!a.isObject(_))return _;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(_),b(y+E.length-1),_})}function g(d,y,E){let O=d;if(a.isReactNative(t)&&a.isReactNativeBlob(d))return t.append(Ie(E,y,o),p(d)),!1;if(d&&!E&&typeof d=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),d=w(d,1);else if(a.isArray(d)&&Ar(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(O=a.toArray(d)))return y=vt(y),O.forEach(function(_,M){!(a.isUndefined(_)||_===null)&&t.append(i===!0?Ie([y],M,o):i===null?y:y+"[]",p(_))}),!1}return Me(d)?!0:(t.append(Ie(E,y,o),p(d)),!1)}const S=Object.assign(_r,{defaultVisitor:g,convertValue:p,isVisitable:Me});function m(d,y,E=0){if(!a.isUndefined(d)){if(b(E),u.indexOf(d)!==-1)throw new Error("Circular reference detected in "+y.join("."));u.push(d),a.forEach(d,function(D,_){(!(a.isUndefined(D)||D===null)&&s.call(t,D,a.isString(_)?_.trim():_,y,S))===!0&&m(D,y?y.concat(_):[_],E+1)}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return m(e),t}function ft(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ke(e,t){this._pairs=[],e&&Pe(e,this,t)}const $t=Ke.prototype;$t.append=function(t,n){this._pairs.push([t,n])};$t.toString=function(t){const n=t?r=>t.call(this,r,ft):ft;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vt(e,t,n){if(!t)return e;e=e||"";const r=a.isFunction(n)?{serialize:n}:n,s=a.getSafeProp(r,"encode")||xr,o=a.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=a.isURLSearchParams(t)?t.toString():new Ke(t,r).toString(s),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Tr=typeof URLSearchParams<"u"?URLSearchParams:Ke,Cr=typeof FormData<"u"?FormData:null,Pr=typeof Blob<"u"?Blob:null,Ur={isBrowser:!0,classes:{URLSearchParams:Tr,FormData:Cr,Blob:Pr},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",ze=typeof navigator=="object"&&navigator||void 0,Dr=Ze&&(!ze||["ReactNative","NativeScript","NS"].indexOf(ze.product)<0),Nr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ze&&window.location.href||"http://localhost",Br=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:Dr,hasStandardBrowserWebWorkerEnv:Nr,navigator:ze,origin:Fr},Symbol.toStringTag,{value:"Module"})),U={...Br,...Ur};function Lr(e,t){return Pe(e,new U.classes.URLSearchParams,{visitor:function(n,r,s,o){return U.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const pt=zt;function Jt(e){if(e>pt)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+pt,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ir(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Jt(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function jr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,l?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!a.hasOwnProp(s,i)||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=jr(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Ir(r),s,n,0)}),n}return null}const Y=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function kr(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const he={transitional:Xe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Wt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const l=Y(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lr(t,l).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Y(this,"env"),u=f&&f.FormData;return Pe(c?{"files[]":t}:t,u&&new u,l)}}return o||s?(n.setContentType("application/json",!1),kr(t)):t}],transformResponse:[function(t){const n=Y(this,"transitional")||he.transitional,r=n&&n.forcedJSONParsing,s=Y(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Y(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?h.from(l,h.ERR_BAD_RESPONSE,this,null,Y(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch","query"],e=>{he.headers[e]={}});function je(e,t){const n=this||he,r=t||n,s=F.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kt(e){return!!(e&&e.__CANCEL__)}let me=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,n.status>=400&&n.status<500?h.ERR_BAD_REQUEST:h.ERR_BAD_RESPONSE,n.config,n.request,n))}function qr(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Hr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),u=r[o];i||(i=f),n[s]=l,r[s]=f;let p=o,b=0;for(;p!==s;)b+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),p=u-n;p>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-p)))},()=>s&&i(s)]}const xe=(e,t,n=3)=>{let r=0;const s=Hr(50,250);return Mr(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=c!=null?Math.min(i,c):i,f=Math.max(0,l-r),u=s(f);r=Math.max(r,l);const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c?(c-l)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},ht=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mt=e=>(...t)=>a.asap(()=>e(...t)),zr=U.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,U.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,vr=U.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof F?{...e}:e;function G(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,p,b,w){return a.isPlainObject(u)&&a.isPlainObject(p)?a.merge.call({caseless:w},u,p):a.isPlainObject(p)?a.merge({},p):a.isArray(p)?p.slice():p}function s(u,p,b,w){if(a.isUndefined(p)){if(!a.isUndefined(u))return r(void 0,u,b,w)}else return r(u,p,b,w)}function o(u,p){if(!a.isUndefined(p))return r(void 0,p)}function i(u,p){if(a.isUndefined(p)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,p)}function c(u){const p=a.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!a.isUndefined(p))if(a.isPlainObject(p)){if(a.hasOwnProp(p,u))return p[u]}else return;const b=a.hasOwnProp(e,"transitional")?e.transitional:void 0;if(a.isPlainObject(b)&&a.hasOwnProp(b,u))return b[u]}function l(u,p,b){if(a.hasOwnProp(t,b))return r(u,p);if(a.hasOwnProp(e,b))return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(u,p,b)=>s(bt(u),bt(p),b,!0)};return a.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const b=a.hasOwnProp(f,p)?f[p]:s,w=a.hasOwnProp(e,p)?e[p]:void 0,g=a.hasOwnProp(t,p)?t[p]:void 0,S=b(w,g,p);a.isUndefined(S)&&b!==l||(n[p]=S)}),a.hasOwnProp(t,"validateStatus")&&a.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(a.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Zr=["content-type","content-length"];function Gr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Zr.includes(r.toLowerCase())&&e.set(r,s)})}const Qr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Gt(e){const t=G({},e),n=b=>a.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const l=n("auth"),f=n("baseURL"),u=n("allowAbsoluteUrls"),p=n("url");if(t.headers=c=F.from(c),t.url=Vt(Zt(f,p,u,t),n("params"),n("paramsSerializer")),l){const b=a.getSafeProp(l,"username")||"",w=a.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(w?Qr(w):"")))}catch(g){throw h.from(g,h.ERR_BAD_OPTION_VALUE,e)}}if(a.isFormData(r)&&(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv||a.isReactNative(r)?c.setContentType(void 0):a.isFunction(r.getHeaders)&&Gr(c,r.getHeaders(),n("formDataHeaderPolicy"))),U.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&zr(t.url))){const w=o&&i&&vr.read(i);w&&c.set(o,w)}return t}const Yr=typeof XMLHttpRequest<"u",es=Yr&&function(e){return new Promise(function(n,r){const s=Gt(e);let o=s.data;const i=F.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=s,u,p,b,w,g;function S(){w&&w(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function d(){if(!m)return;const E=F.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),D={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:e,request:m};Xt(function(M){n(M),S()},function(M){r(M),S()},D),m=null}"onloadend"in m?m.onloadend=d:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(d)},m.onabort=function(){m&&(r(new h("Request aborted",h.ECONNABORTED,e,m)),S(),m=null)},m.onerror=function(O){const D=O&&O.message?O.message:"Network Error",_=new h(D,h.ERR_NETWORK,e,m);_.event=O||null,r(_),S(),m=null},m.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||Xe;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new h(O,D.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,m)),S(),m=null},o===void 0&&i.setContentType(null),"setRequestHeader"in m&&a.forEach(Ht(i),function(O,D){m.setRequestHeader(D,O)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),f&&([b,g]=xe(f,!0),m.addEventListener("progress",b)),l&&m.upload&&([p,w]=xe(l),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(u=E=>{m&&(r(!E||E.type?new me(null,e,m):E),m.abort(),S(),m=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const y=qr(s.url);if(y&&!U.protocols.includes(y)){r(new h("Unsupported protocol "+y+":",h.ERR_BAD_REQUEST,e)),S();return}m.send(o||null)})},ts=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const f=l instanceof Error?l:this.reason;n.abort(f instanceof h?f:new me(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,s(new h(`timeout of ${t}ms exceeded`,h.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>a.asap(i),c},ns=function*(e,t){let n=e.byteLength;if(n{const s=rs(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await s.next();if(f){c(),l.close();return}let p=u.byteLength;if(n){let b=o+=p;n(b)}l.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},Te=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,os=(e,t,n)=>t+2w>=2&&r.charCodeAt(w-2)===37&&r.charCodeAt(w-1)===51&&(r.charCodeAt(w)===68||r.charCodeAt(w)===100);f>=0&&(r.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(r.charCodeAt(f)===61||u(f))&&l++;const b=Math.floor(i/4)*3-(l||0);return b>0?b:0}let o=0;for(let i=0,c=r.length;i=55296&&l<=56319&&i+1=56320&&f<=57343?(o+=4,i++):o+=3}else o+=3}return o}const Ge="1.18.1",Et=64*1024,{isFunction:Ee}=a,as=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Rt=e=>{if(!a.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cs=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},ls=e=>{const t=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=a.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,c=s?Ee(s):typeof fetch=="function",l=Ee(o),f=Ee(i);if(!c)return!1;const u=c&&Ee(n),p=c&&(typeof r=="function"?(d=>y=>d.encode(y))(new r):async d=>new Uint8Array(await new o(d).arrayBuffer())),b=l&&u&>(()=>{let d=!1;const y=new o(U.origin,{body:new n,method:"POST",get duplex(){return d=!0,"half"}}),E=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),d&&!E}),w=f&&u&>(()=>a.isReadableStream(new i("").body)),g={stream:w&&(d=>d.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!g[d]&&(g[d]=(y,E)=>{let O=y&&y[d];if(O)return O.call(y);throw new h(`Response type '${d}' is not supported`,h.ERR_NOT_SUPPORT,E)})});const S=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new o(U.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await p(d)).byteLength},m=async(d,y)=>{const E=a.toFiniteNumber(d.getContentLength());return E??S(y)};return async d=>{let{url:y,method:E,data:O,signal:D,cancelToken:_,timeout:M,onDownloadProgress:De,onUploadProgress:Ne,responseType:z,headers:v,withCredentials:ye="same-origin",fetchOptions:tt,maxContentLength:k,maxBodyLength:be}=Gt(d);const ie=a.isNumber(k)&&k>-1,Fe=a.isNumber(be)&&be>-1,yn=A=>a.hasOwnProp(d,A)?d[A]:void 0;let nt=s||fetch;z=z?(z+"").toLowerCase():"text";let $=ts([D,_&&_.toAbortSignal()],M),T=null;const J=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let Q,ae=null;const rt=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,d,T);try{let A;const I=yn("auth");if(I){const R=a.getSafeProp(I,"username")||"",L=a.getSafeProp(I,"password")||"";A={username:R,password:L}}if(cs(y)){const R=new URL(y,U.origin);if(!A&&(R.username||R.password)){const L=Rt(R.username),V=Rt(R.password);A={username:L,password:V}}(R.username||R.password)&&(R.username="",R.password="",y=R.href)}if(A&&(v.delete("authorization"),v.set("Authorization","Basic "+btoa(as((A.username||"")+":"+(A.password||""))))),ie&&typeof y=="string"&&y.startsWith("data:")&&is(y)>k)throw new h("maxContentLength size of "+k+" exceeded",h.ERR_BAD_RESPONSE,d,T);if(Fe&&E!=="get"&&E!=="head"){const R=await S(O);if(typeof R=="number"&&isFinite(R)&&(Q=R,R>be))throw rt()}const we=Fe&&(a.isReadableStream(O)||a.isStream(O)),st=(R,L,V)=>wt(R,Et,W=>{if(Fe&&W>be)throw ae=rt();L&&L(W)},V);if(b&&E!=="get"&&E!=="head"&&(Ne||we)){if(Q=Q??await m(v,O),Q!==0||we){let R=new o(y,{method:"POST",body:O,duplex:"half"}),L;if(a.isFormData(O)&&(L=R.headers.get("content-type"))&&v.setContentType(L),R.body){const[V,W]=Ne&&ht(Q,xe(mt(Ne)))||[];O=st(R.body,V,W)}}}else if(we&&!l&&u&&E!=="get"&&E!=="head")O=st(O);else if(we&&l&&!b&&E!=="get"&&E!=="head")throw new h("Stream request bodies are not supported by the current fetch implementation",h.ERR_NOT_SUPPORT,d,T);a.isString(ye)||(ye=ye?"include":"omit");const bn=l&&"credentials"in o.prototype;if(a.isFormData(O)){const R=v.getContentType();R&&/^multipart\/form-data/i.test(R)&&!/boundary=/i.test(R)&&v.delete("content-type")}v.set("User-Agent","axios/"+Ge,!1);const ot={...tt,signal:$,method:E.toUpperCase(),headers:Ht(v.normalize()),body:O,duplex:"half",credentials:bn?ye:void 0};T=l&&new o(y,ot);let q=await(l?nt(T,tt):nt(y,ot));const it=F.from(q.headers);if(ie){const R=a.toFiniteNumber(it.getContentLength());if(R!=null&&R>k)throw new h("maxContentLength size of "+k+" exceeded",h.ERR_BAD_RESPONSE,d,T)}const Be=w&&(z==="stream"||z==="response");if(w&&q.body&&(De||ie||Be&&J)){const R={};["status","statusText","headers"].forEach(ce=>{R[ce]=q[ce]});const L=a.toFiniteNumber(it.getContentLength()),[V,W]=De&&ht(L,xe(mt(De),!0))||[];let at=0;const wn=ce=>{if(ie&&(at=ce,at>k))throw new h("maxContentLength size of "+k+" exceeded",h.ERR_BAD_RESPONSE,d,T);V&&V(ce)};q=new i(wt(q.body,Et,wn,()=>{W&&W(),J&&J()}),R)}z=z||"text";let H=await g[a.findKey(g,z)||"text"](q,d);if(ie&&!w&&!Be){let R;if(H!=null&&(typeof H.byteLength=="number"?R=H.byteLength:typeof H.size=="number"?R=H.size:typeof H=="string"&&(R=typeof r=="function"?new r().encode(H).byteLength:H.length)),typeof R=="number"&&R>k)throw new h("maxContentLength size of "+k+" exceeded",h.ERR_BAD_RESPONSE,d,T)}return!Be&&J&&J(),await new Promise((R,L)=>{Xt(R,L,{data:H,headers:F.from(q.headers),status:q.status,statusText:q.statusText,config:d,request:T})})}catch(A){if(J&&J(),$&&$.aborted&&$.reason instanceof h){const I=$.reason;throw I.config=d,T&&(I.request=T),A!==I&&Object.defineProperty(I,"cause",{__proto__:null,value:A,writable:!0,enumerable:!1,configurable:!0}),I}if(ae)throw T&&!ae.request&&(ae.request=T),ae;if(A instanceof h)throw T&&!A.request&&(A.request=T),A;if(A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)){const I=new h("Network Error",h.ERR_NETWORK,d,T,A&&A.response);throw Object.defineProperty(I,"cause",{__proto__:null,value:A.cause||A,writable:!0,enumerable:!1,configurable:!0}),I}throw h.from(A,A&&A.code,d,T,A&&A.response)}}},us=new Map,Qt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,l,f,u=us;for(;c--;)l=o[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:ls(t)),u=f;return f};Qt();const Qe={http:Or,xhr:es,fetch:{get:Qt}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const St=e=>`- ${e}`,fs=e=>a.isFunction(e)||e===null||e===!1;function ds(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since : +`+i.map(St).join(` +`):" "+St(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+c,h.ERR_NOT_SUPPORT)}return s}const Yt={getAdapter:ds,adapters:Qe};function ke(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new me(null,e)}function Ot(e){return ke(e),e.headers=F.from(e.headers),e.data=je.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yt.getAdapter(e.adapter||he.adapter,e)(e).then(function(r){ke(e),e.response=r;try{r.data=je.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=F.from(r.headers),r},function(r){if(!Kt(r)&&(ke(e),r&&r.response)){e.response=r.response;try{r.response.data=je.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=F.from(r.response.headers)}return Promise.reject(r)})}const Ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ue[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const At={};Ue.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ge+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new h(s(i," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!At[i]&&(At[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Ue.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ps(e,t,n){if(typeof e!="object"||e===null)throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new h("option "+o+" must be "+l,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const Oe={assertOptions:ps,validators:Ue},N=Oe.validators;let X=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` +`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` +`),c=i===-1?-1:o.indexOf(` +`,i+1),l=c===-1?"":o.slice(c+1);String(r.stack).endsWith(l)||(r.stack+=` +`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=G(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Oe.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean),advertiseZstdAcceptEncoding:N.transitional(N.boolean),validateStatusUndefinedResolves:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Oe.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Oe.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete o[g]}),n.headers=F.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;l=l&&S.synchronous;const m=n.transitional||Xe;m&&m.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let u,p=0,b;if(!l){const g=[Ot.bind(this),void 0];for(g.unshift(...c),g.push(...f),b=g.length,u=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new me(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new en(function(s){t=s}),cancel:t}}};function ms(e){return function(n){return e.apply(null,n)}}function ys(e){return a.isObject(e)&&e.isAxiosError===!0}const ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ve).forEach(([e,t])=>{ve[t]=e});function tn(e){const t=new X(e),n=Dt(X.prototype.request,t);return a.extend(n,X.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return tn(G(e,s))},n}const x=tn(he);x.Axios=X;x.CanceledError=me;x.CancelToken=hs;x.isCancel=Kt;x.VERSION=Ge;x.toFormData=Pe;x.AxiosError=h;x.Cancel=x.CanceledError;x.all=function(t){return Promise.all(t)};x.spread=ms;x.isAxiosError=ys;x.mergeConfig=G;x.AxiosHeaders=F;x.formToJSON=e=>Wt(a.isHTMLForm(e)?new FormData(e):e);x.getAdapter=Yt.getAdapter;x.HttpStatusCode=ve;x.default=x;const{Axios:Ls,AxiosError:Is,CanceledError:js,isCancel:ks,CancelToken:qs,VERSION:Hs,all:Ms,Cancel:zs,isAxiosError:vs,spread:$s,toFormData:Vs,AxiosHeaders:Js,HttpStatusCode:Ws,formToJSON:Ks,getAdapter:Xs,mergeConfig:Zs,create:Gs}=x,nn="3.8.0",bs=nn,oe=typeof Buffer=="function",_t=typeof TextDecoder=="function"?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,xt=typeof TextEncoder=="function"?new TextEncoder:void 0,ws="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ue=Array.prototype.slice.call(ws),Re=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(ue),Es=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,P=String.fromCharCode.bind(String),Tt=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),rn=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),sn=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),on=e=>{let t,n,r,s,o="";const i=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(s=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,o+=ue[t>>18&63]+ue[t>>12&63]+ue[t>>6&63]+ue[t&63]}return i?o.slice(0,i-3)+"===".substring(i):o},Ye=typeof btoa=="function"?e=>btoa(e):oe?e=>Buffer.from(e,"binary").toString("base64"):on,$e=oe?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,s=e.length;rt?rn($e(e)):$e(e),Rs=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?P(192|t>>>6)+P(128|t&63):P(224|t>>>12&15)+P(128|t>>>6&63)+P(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return P(240|t>>>18&7)+P(128|t>>>12&63)+P(128|t>>>6&63)+P(128|t&63)}},gs=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,an=e=>e.replace(gs,Rs),Ct=oe?e=>Buffer.from(e,"utf8").toString("base64"):xt?e=>$e(xt.encode(e)):e=>Ye(an(e)),ee=(e,t=!1)=>t?rn(Ct(e)):Ct(e),Pt=e=>ee(e,!0),Ss=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Os=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return P((n>>>10)+55296)+P((n&1023)+56320);case 3:return P((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return P((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},cn=e=>e.replace(Ss,Os),ln=e=>{if(e=e.replace(/\s+/g,""),!Es.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n,r,s=[];for(let o=0;o>16&255)):r===64?s.push(P(t>>16&255,t>>8&255)):s.push(P(t>>16&255,t>>8&255,t&255));return s.join("")},et=typeof atob=="function"?e=>atob(sn(e)):oe?e=>Buffer.from(e,"base64").toString("binary"):ln,un=oe?e=>Tt(Buffer.from(e,"base64")):e=>Tt(et(e).split("").map(t=>t.charCodeAt(0))),fn=e=>un(dn(e)),As=oe?e=>Buffer.from(e,"base64").toString("utf8"):_t?e=>_t.decode(un(e)):e=>cn(et(e)),dn=e=>sn(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Ve=e=>As(dn(e)),_s=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},pn=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),hn=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,pn(n));e("fromBase64",function(){return Ve(this)}),e("toBase64",function(t){return ee(this,t)}),e("toBase64URI",function(){return ee(this,!0)}),e("toBase64URL",function(){return ee(this,!0)}),e("toUint8Array",function(){return fn(this)})},mn=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,pn(n));e("toBase64",function(t){return Ae(this,t)}),e("toBase64URI",function(){return Ae(this,!0)}),e("toBase64URL",function(){return Ae(this,!0)})},xs=()=>{hn(),mn()},Qs={version:nn,VERSION:bs,atob:et,atobPolyfill:ln,btoa:Ye,btoaPolyfill:on,fromBase64:Ve,toBase64:ee,encode:ee,encodeURI:Pt,encodeURL:Pt,utob:an,btou:cn,decode:Ve,isValid:_s,fromUint8Array:Ae,toUint8Array:fn,extendString:hn,extendUint8Array:mn,extendBuiltins:xs},C=[];for(let e=0;e<256;++e)C.push((e+256).toString(16).slice(1));function Ts(e,t=0){return(C[e[t+0]]+C[e[t+1]]+C[e[t+2]]+C[e[t+3]]+"-"+C[e[t+4]]+C[e[t+5]]+"-"+C[e[t+6]]+C[e[t+7]]+"-"+C[e[t+8]]+C[e[t+9]]+"-"+C[e[t+10]]+C[e[t+11]]+C[e[t+12]]+C[e[t+13]]+C[e[t+14]]+C[e[t+15]]).toLowerCase()}let qe;const Cs=new Uint8Array(16);function Ps(){if(!qe){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");qe=crypto.getRandomValues.bind(crypto)}return qe(Cs)}const Us=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ut={randomUUID:Us};function Ds(e,t,n){var s;e=e||{};const r=e.random??((s=e.rng)==null?void 0:s.call(e))??Ps();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ts(r)}function Ys(e,t,n){return Ut.randomUUID&&!e?Ut.randomUUID():Ds(e)}export{x as a,Qs as g,Ys as v}; diff --git a/assets/vendor-vue-28M5UGz3.js b/assets/vendor-vue-28M5UGz3.js deleted file mode 100644 index 41acb8f..0000000 --- a/assets/vendor-vue-28M5UGz3.js +++ /dev/null @@ -1,29 +0,0 @@ -/** -* @vue/shared v3.5.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function zs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const le={},kt=[],et=()=>{},Ni=()=>!1,zn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Yn=e=>e.startsWith("onUpdate:"),pe=Object.assign,Ys=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},El=Object.prototype.hasOwnProperty,se=(e,t)=>El.call(e,t),k=Array.isArray,Kt=e=>Cn(e)==="[object Map]",Mi=e=>Cn(e)==="[object Set]",Rr=e=>Cn(e)==="[object Date]",W=e=>typeof e=="function",fe=e=>typeof e=="string",De=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",Di=e=>(ee(e)||W(e))&&W(e.then)&&W(e.catch),Li=Object.prototype.toString,Cn=e=>Li.call(e),Sl=e=>Cn(e).slice(8,-1),Fi=e=>Cn(e)==="[object Object]",Qn=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,cn=zs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Al=/-\w/g,Te=Xn(e=>e.replace(Al,t=>t.slice(1).toUpperCase())),Cl=/\B([A-Z])/g,At=Xn(e=>e.replace(Cl,"-$1").toLowerCase()),Zn=Xn(e=>e.charAt(0).toUpperCase()+e.slice(1)),us=Xn(e=>e?`on${Zn(e)}`:""),Ze=(e,t)=>!Object.is(e,t),Fn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Qs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},wl=e=>{const t=fe(e)?Number(e):NaN;return isNaN(t)?e:t};let xr;const es=()=>xr||(xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xs(e){if(k(e)){const t={};for(let n=0;n{if(n){const s=n.split(xl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Zs(e){let t="";if(fe(e))t=e;else if(k(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Ml=e=>fe(e)?e:e==null?"":k(e)||ee(e)&&(e.toString===Li||!W(e.toString))?Hi(e)?Ml(e.value):JSON.stringify(e,Bi,2):String(e),Bi=(e,t)=>Hi(t)?Bi(e,t.value):Kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[as(s,i)+" =>"]=r,n),{})}:Mi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>as(n))}:De(t)?as(t):ee(t)&&!k(t)&&!Fi(t)?String(t):t,as=(e,t="")=>{var n;return De(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let me;class Ui{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&&me&&(me.active?(this.parent=me,this.index=(me.scopes||(me.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)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(me===this)me=this.prevScope;else{let t=me;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(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fn;){let t=fn;for(fn=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 qi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ji(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),sr(s),Ll(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(zi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function zi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_n)||(e.globalVersion=_n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ts(e))))return;e.flags|=2;const t=e.dep,n=ce,s=Ue;ce=e,Ue=!0;try{qi(e);const r=e.fn(e._value);(t.version===0||Ze(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ce=n,Ue=s,Ji(e),e.flags&=-3}}function sr(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)sr(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ll(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ue=!0;const Yi=[];function ft(){Yi.push(Ue),Ue=!1}function ut(){const e=Yi.pop();Ue=e===void 0?!0:e}function Tr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ce;ce=void 0;try{t()}finally{ce=n}}}let _n=0;class Fl{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 rr{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(!ce||!Ue||ce===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ce)n=this.activeLink=new Fl(ce,this),ce.deps?(n.prevDep=ce.depsTail,ce.depsTail.nextDep=n,ce.depsTail=n):ce.deps=ce.depsTail=n,Qi(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=ce.depsTail,n.nextDep=void 0,ce.depsTail.nextDep=n,ce.depsTail=n,ce.deps===n&&(ce.deps=s)}return n}trigger(t){this.version++,_n++,this.notify(t)}notify(t){tr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{nr()}}}function Qi(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)Qi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Hn=new WeakMap,Nt=Symbol(""),Os=Symbol(""),yn=Symbol("");function Ee(e,t,n){if(Ue&&ce){let s=Hn.get(e);s||Hn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new rr),r.map=s,r.key=n),r.track()}}function ot(e,t,n,s,r,i){const o=Hn.get(e);if(!o){_n++;return}const l=c=>{c&&c.trigger()};if(tr(),t==="clear")o.forEach(l);else{const c=k(e),u=c&&Qn(n);if(c&&n==="length"){const f=Number(s);o.forEach((h,p)=>{(p==="length"||p===yn||!De(p)&&p>=f)&&l(h)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),u&&l(o.get(yn)),t){case"add":c?u&&l(o.get("length")):(l(o.get(Nt)),Kt(e)&&l(o.get(Os)));break;case"delete":c||(l(o.get(Nt)),Kt(e)&&l(o.get(Os)));break;case"set":Kt(e)&&l(o.get(Nt));break}}nr()}function Vl(e,t){const n=Hn.get(e);return n&&n.get(t)}function Vt(e){const t=Q(e);return t===e?t:(Ee(t,"iterate",yn),Me(e)?t:t.map(ke))}function ts(e){return Ee(e=Q(e),"iterate",yn),e}function Qe(e,t){return at(e)?qt(ct(e)?ke(t):t):ke(t)}const jl={__proto__:null,[Symbol.iterator](){return ds(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Vt(this).concat(...e.map(t=>k(t)?Vt(t):t))},entries(){return ds(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,n=>n.map(s=>Qe(this,s)),arguments)},find(e,t){return nt(this,"find",e,t,n=>Qe(this,n),arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,n=>Qe(this,n),arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ps(this,"includes",e)},indexOf(...e){return ps(this,"indexOf",e)},join(e){return Vt(this).join(e)},lastIndexOf(...e){return ps(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Zt(this,"pop")},push(...e){return Zt(this,"push",e)},reduce(e,...t){return Or(this,"reduce",e,t)},reduceRight(e,...t){return Or(this,"reduceRight",e,t)},shift(){return Zt(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Zt(this,"splice",e)},toReversed(){return Vt(this).toReversed()},toSorted(e){return Vt(this).toSorted(e)},toSpliced(...e){return Vt(this).toSpliced(...e)},unshift(...e){return Zt(this,"unshift",e)},values(){return ds(this,"values",e=>Qe(this,e))}};function ds(e,t,n){const s=ts(e),r=s[t]();return s!==e&&!Me(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Hl=Array.prototype;function nt(e,t,n,s,r,i){const o=ts(e),l=o!==e&&!Me(e),c=o[t];if(c!==Hl[t]){const h=c.apply(e,i);return l?ke(h):h}let u=n;o!==e&&(l?u=function(h,p){return n.call(this,Qe(e,h),p,e)}:n.length>2&&(u=function(h,p){return n.call(this,h,p,e)}));const f=c.call(o,u,s);return l&&r?r(f):f}function Or(e,t,n,s){const r=ts(e),i=r!==e&&!Me(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(u,f,h){return l&&(l=!1,u=Qe(e,u)),n.call(this,u,Qe(e,f),h,e)}):n.length>3&&(o=function(u,f,h){return n.call(this,u,f,h,e)}));const c=r[t](o,...s);return l?Qe(e,c):c}function ps(e,t,n){const s=Q(e);Ee(s,"iterate",yn);const r=s[t](...n);return(r===-1||r===!1)&&ns(n[0])?(n[0]=Q(n[0]),s[t](...n)):r}function Zt(e,t,n=[]){ft(),tr();const s=Q(e)[t].apply(e,n);return nr(),ut(),s}const Bl=zs("__proto__,__v_isRef,__isVue"),Xi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(De));function Ul(e){De(e)||(e=String(e));const t=Q(this);return Ee(t,"has",e),t.hasOwnProperty(e)}class Zi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Ql:so:i?no:to).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=k(t);if(!r){let c;if(o&&(c=jl[n]))return c;if(n==="hasOwnProperty")return Ul}const l=Reflect.get(t,n,ae(t)?t:s);if((De(n)?Xi.has(n):Bl(n))||(r||Ee(t,"get",n),i))return l;if(ae(l)){const c=o&&Qn(n)?l:l.value;return r&&ee(c)?Is(c):c}return ee(l)?r?Is(l):wn(l):l}}class eo extends Zi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=k(t)&&Qn(n);if(!this._isShallow){const u=at(i);if(!Me(s)&&!at(s)&&(i=Q(i),s=Q(s)),!o&&ae(i)&&!ae(s))return u||(i.value=s),!0}const l=o?Number(n)e,In=e=>Reflect.getPrototypeOf(e);function $l(e,t,n){return function(...s){const r=this.__v_raw,i=Q(r),o=Kt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...s),f=n?Ps:t?qt:ke;return!t&&Ee(i,"iterate",c?Os:Nt),pe(Object.create(u),{next(){const{value:h,done:p}=u.next();return p?{value:h,done:p}:{value:l?[f(h[0]),f(h[1])]:f(h),done:p}}})}}function Nn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ql(e,t){const n={get(r){const i=this.__v_raw,o=Q(i),l=Q(r);e||(Ze(r,l)&&Ee(o,"get",r),Ee(o,"get",l));const{has:c}=In(o),u=t?Ps:e?qt:ke;if(c.call(o,r))return u(i.get(r));if(c.call(o,l))return u(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ee(Q(r),"iterate",Nt),r.size},has(r){const i=this.__v_raw,o=Q(i),l=Q(r);return e||(Ze(r,l)&&Ee(o,"has",r),Ee(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=Q(l),u=t?Ps:e?qt:ke;return!e&&Ee(c,"iterate",Nt),l.forEach((f,h)=>r.call(i,u(f),u(h),o))}};return pe(n,e?{add:Nn("add"),set:Nn("set"),delete:Nn("delete"),clear:Nn("clear")}:{add(r){const i=Q(this),o=In(i),l=Q(r),c=!t&&!Me(r)&&!at(r)?l:r;return o.has.call(i,c)||Ze(r,c)&&o.has.call(i,r)||Ze(l,c)&&o.has.call(i,l)||(i.add(c),ot(i,"add",c,c)),this},set(r,i){!t&&!Me(i)&&!at(i)&&(i=Q(i));const o=Q(this),{has:l,get:c}=In(o);let u=l.call(o,r);u||(r=Q(r),u=l.call(o,r));const f=c.call(o,r);return o.set(r,i),u?Ze(i,f)&&ot(o,"set",r,i):ot(o,"add",r,i),this},delete(r){const i=Q(this),{has:o,get:l}=In(i);let c=o.call(i,r);c||(r=Q(r),c=o.call(i,r)),l&&l.call(i,r);const u=i.delete(r);return c&&ot(i,"delete",r,void 0),u},clear(){const r=Q(this),i=r.size!==0,o=r.clear();return i&&ot(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=$l(r,e,t)}),n}function ir(e,t){const n=ql(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(se(n,r)&&r in s?n:s,r,i)}const Jl={get:ir(!1,!1)},zl={get:ir(!1,!0)},Yl={get:ir(!0,!1)};const to=new WeakMap,no=new WeakMap,so=new WeakMap,Ql=new WeakMap;function Xl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wn(e){return at(e)?e:or(e,!1,Kl,Jl,to)}function ro(e){return or(e,!1,Wl,zl,no)}function Is(e){return or(e,!0,Gl,Yl,so)}function or(e,t,n,s,r){if(!ee(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=Xl(Sl(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ct(e){return at(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function at(e){return!!(e&&e.__v_isReadonly)}function Me(e){return!!(e&&e.__v_isShallow)}function ns(e){return e?!!e.__v_raw:!1}function Q(e){const t=e&&e.__v_raw;return t?Q(t):e}function lr(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&Vi(e,"__v_skip",!0),e}const ke=e=>ee(e)?wn(e):e,qt=e=>ee(e)?Is(e):e;function ae(e){return e?e.__v_isRef===!0:!1}function Gt(e){return io(e,!1)}function Zl(e){return io(e,!0)}function io(e,t){return ae(e)?e:new ec(e,t)}class ec{constructor(t,n){this.dep=new rr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Q(t),this._value=n?t:ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Me(t)||at(t);t=s?t:Q(t),Ze(t,n)&&(this._rawValue=t,this._value=s?t:ke(t),this.dep.trigger())}}function Et(e){return ae(e)?e.value:e}function aa(e){return W(e)?e():Et(e)}const tc={get:(e,t,n)=>t==="__v_raw"?e:Et(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function oo(e){return ct(e)?e:new Proxy(e,tc)}function nc(e){const t=k(e)?new Array(e.length):{};for(const n in e)t[n]=lo(e,n);return t}class sc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=De(n)?n:String(n),this._raw=Q(t);let r=!0,i=t;if(!k(t)||De(this._key)||!Qn(this._key))do r=!ns(i)||Me(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Et(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ae(this._raw[this._key])){const n=this._object[this._key];if(ae(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Vl(this._raw,this._key)}}class rc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ha(e,t,n){return ae(e)?e:W(e)?new rc(e):ee(e)&&arguments.length>1?lo(e,t,n):Gt(e)}function lo(e,t,n){return new sc(e,t,n)}class ic{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new rr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return $i(this,!0),!0}get value(){const t=this.dep.track();return zi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function oc(e,t,n=!1){let s,r;return W(e)?s=e:(s=e.get,r=e.set),new ic(s,r,n)}const Mn={},Bn=new WeakMap;let Tt;function lc(e,t=!1,n=Tt){if(n){let s=Bn.get(n);s||Bn.set(n,s=[]),s.push(e)}}function cc(e,t,n=le){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,u=T=>r?T:Me(T)||r===!1||r===0?lt(T,1):lt(T);let f,h,p,g,b=!1,_=!1;if(ae(e)?(h=()=>e.value,b=Me(e)):ct(e)?(h=()=>u(e),b=!0):k(e)?(_=!0,b=e.some(T=>ct(T)||Me(T)),h=()=>e.map(T=>{if(ae(T))return T.value;if(ct(T))return u(T);if(W(T))return c?c(T,2):T()})):W(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){ft();try{p()}finally{ut()}}const T=Tt;Tt=f;try{return c?c(e,3,[g]):e(g)}finally{Tt=T}}:h=et,t&&r){const T=h,F=r===!0?1/0:r;h=()=>lt(T(),F)}const O=Ki(),N=()=>{f.stop(),O&&O.active&&Ys(O.effects,f)};if(i&&t){const T=t;t=(...F)=>{const X=T(...F);return N(),X}}let C=_?new Array(e.length).fill(Mn):Mn;const M=T=>{if(!(!(f.flags&1)||!f.dirty&&!T))if(t){const F=f.run();if(T||r||b||(_?F.some((X,j)=>Ze(X,C[j])):Ze(F,C))){p&&p();const X=Tt;Tt=f;try{const j=[F,C===Mn?void 0:_&&C[0]===Mn?[]:C,g];C=F,c?c(t,3,j):t(...j)}finally{Tt=X}}}else f.run()};return l&&l(M),f=new Gi(h),f.scheduler=o?()=>o(M,!1):M,g=T=>lc(T,!1,f),p=f.onStop=()=>{const T=Bn.get(f);if(T){if(c)c(T,4);else for(const F of T)F();Bn.delete(f)}},t?s?M(!0):C=f.run():o?o(M.bind(null,!0),!0):f.run(),N.pause=f.pause.bind(f),N.resume=f.resume.bind(f),N.stop=N,N}function lt(e,t=1/0,n){if(t<=0||!ee(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ae(e))lt(e.value,t,n);else if(k(e))for(let s=0;s{lt(s,t,n)});else if(Fi(e)){for(const s in e)lt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&<(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Rn(e,t,n,s){try{return s?e(...s):e()}catch(r){xn(r,t,n)}}function Be(e,t,n,s){if(W(e)){const r=Rn(e,t,n,s);return r&&Di(r)&&r.catch(i=>{xn(i,t,n)}),r}if(k(e)){const r=[];for(let i=0;i>>1,r=xe[s],i=vn(r);i=vn(n)?xe.push(e):xe.splice(uc(t),0,e),e.flags|=1,fo()}}function fo(){Un||(Un=co.then(ao))}function ac(e){k(e)?Wt.push(...e):vt&&e.id===-1?vt.splice(Ht+1,0,e):e.flags&1||(Wt.push(e),e.flags|=1),fo()}function Pr(e,t,n=Ye+1){for(;nvn(n)-vn(s));if(Wt.length=0,vt){vt.push(...t);return}for(vt=t,Ht=0;Hte.id==null?e.flags&2?-1:1/0:e.id;function ao(e){try{for(Ye=0;Ye{s._d&&Wn(-1);const i=kn(t);let o;try{o=e(...r)}finally{kn(i),s._d&&Wn(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function da(e,t){if(be===null)return e;const n=os(be),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&W(t)?t.call(s&&s.proxy):t}}function dc(){return!!(On()||Mt)}const pc=Symbol.for("v-scx"),gc=()=>He(pc);function pa(e,t){return ur(e,null,t)}function an(e,t,n){return ur(e,t,n)}function ur(e,t,n=le){const{immediate:s,deep:r,flush:i,once:o}=n,l=pe({},n),c=t&&s||!t&&i!=="post";let u;if(Jt){if(i==="sync"){const g=gc();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=et,g.resume=et,g.pause=et,g}}const f=ve;l.call=(g,b,_)=>Be(g,f,b,_);let h=!1;i==="post"?l.scheduler=g=>{we(g,f&&f.suspense)}:i!=="sync"&&(h=!0,l.scheduler=(g,b)=>{b?g():fr(g)}),l.augmentJob=g=>{t&&(g.flags|=4),h&&(g.flags|=2,f&&(g.id=f.uid,g.i=f))};const p=cc(e,t,l);return Jt&&(u?u.push(p):c&&p()),p}function mc(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?po(s,e):()=>s[e]:e.bind(s,s);let i;W(t)?i=t:(i=t.handler,n=t);const o=Pn(this),l=ur(r,i.bind(s),n);return o(),l}function po(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,Ot=e=>e&&(e.disabled||e.disabled===""),_c=e=>e&&(e.defer||e.defer===""),Ir=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Nr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ns=(e,t)=>{const n=e&&e.to;return fe(n)?t?t(n):null:n},yc={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,u){const{mc:f,pc:h,pbc:p,o:{insert:g,querySelector:b,createText:_,createComment:O,parentNode:N}}=u,C=Ot(t.props);let{dynamicChildren:M}=t;const T=(j,H,w)=>{j.shapeFlag&16&&f(j.children,H,w,r,i,o,l,c)},F=(j=t)=>{const H=Ot(j.props),w=j.target=Ns(j.props,b),G=Ms(w,j,_,g);w&&(o!=="svg"&&Ir(w)?o="svg":o!=="mathml"&&Nr(w)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(w),H||(T(j,w,G),rn(j,!1)))},X=j=>{const H=()=>{if(mt.get(j)===H){if(mt.delete(j),Ot(j.props)){const w=N(j.el)||n;T(j,w,j.anchor),rn(j,!0)}F(j)}};mt.set(j,H),we(H,i)};if(e==null){const j=t.el=_(""),H=t.anchor=_("");if(g(j,n,s),g(H,n,s),_c(t.props)||i&&i.pendingBranch){X(t);return}C&&(T(t,n,H),rn(t,!0)),F()}else{t.el=e.el;const j=t.anchor=e.anchor,H=mt.get(e);if(H){H.flags|=8,mt.delete(e),X(t);return}t.targetStart=e.targetStart;const w=t.target=e.target,G=t.targetAnchor=e.targetAnchor,J=Ot(e.props),P=J?n:w,z=J?j:G;if(o==="svg"||Ir(w)?o="svg":(o==="mathml"||Nr(w))&&(o="mathml"),M?(p(e.dynamicChildren,M,P,r,i,o,l),_r(e,t,!0)):c||h(e,t,P,z,r,i,o,l,!1),C)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Dn(t,n,j,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ue=t.target=Ns(t.props,b);ue&&Dn(t,ue,null,u,0)}else J&&Dn(t,w,G,u,1);rn(t,C)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:u,targetAnchor:f,target:h,props:p}=e,g=i||!Ot(p),b=mt.get(e);if(b&&(b.flags|=8,mt.delete(e)),h&&(r(u),r(f)),i&&r(c),!b&&o&16)for(let _=0;_{e.isMounted=!0}),wo(()=>{e.isUnmounting=!0}),e}const Fe=[Function,Array],yo={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fe,onEnter:Fe,onAfterEnter:Fe,onEnterCancelled:Fe,onBeforeLeave:Fe,onLeave:Fe,onAfterLeave:Fe,onLeaveCancelled:Fe,onBeforeAppear:Fe,onAppear:Fe,onAfterAppear:Fe,onAppearCancelled:Fe},vo=e=>{const t=e.subTree;return t.component?vo(t.component):t},bc={name:"BaseTransition",props:yo,setup(e,{slots:t}){const n=On(),s=_o();return()=>{const r=t.default&&ar(t.default(),!0),i=r&&r.length?bo(r):n.subTree?ff():void 0;if(!i)return;const o=Q(e),{mode:l}=o;if(s.isLeaving)return gs(i);const c=Mr(i);if(!c)return gs(i);let u=bn(c,o,s,n,h=>u=h);c.type!==Se&&Dt(c,u);let f=n.subTree&&Mr(n.subTree);if(f&&f.type!==Se&&!Pt(f,c)&&vo(n).type!==Se){let h=bn(f,o,s,n);if(Dt(f,h),l==="out-in"&&c.type!==Se)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},gs(i);l==="in-out"&&c.type!==Se?h.delayLeave=(p,g,b)=>{const _=Eo(s,f);_[String(f.key)]=f,p[Ve]=()=>{g(),p[Ve]=void 0,delete u.delayedLeave,f=void 0},u.delayedLeave=()=>{b(),delete u.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return i}}};function bo(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Se){t=n;break}}return t}const Ec=bc;function Eo(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 bn(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:g,onAfterLeave:b,onLeaveCancelled:_,onBeforeAppear:O,onAppear:N,onAfterAppear:C,onAppearCancelled:M}=t,T=String(e.key),F=Eo(n,e),X=(w,G)=>{w&&Be(w,s,9,G)},j=(w,G)=>{const J=G[1];X(w,G),k(w)?w.every(P=>P.length<=1)&&J():w.length<=1&&J()},H={mode:o,persisted:l,beforeEnter(w){let G=c;if(!n.isMounted)if(i)G=O||c;else return;w[Ve]&&w[Ve](!0);const J=F[T];J&&Pt(e,J)&&J.el[Ve]&&J.el[Ve](),X(G,[w])},enter(w){if(F[T]===e)return;let G=u,J=f,P=h;if(!n.isMounted)if(i)G=N||u,J=C||f,P=M||h;else return;let z=!1;w[en]=Ae=>{z||(z=!0,Ae?X(P,[w]):X(J,[w]),H.delayedLeave&&H.delayedLeave(),w[en]=void 0)};const ue=w[en].bind(null,!1);G?j(G,[w,ue]):ue()},leave(w,G){const J=String(e.key);if(w[en]&&w[en](!0),n.isUnmounting)return G();X(p,[w]);let P=!1;w[Ve]=ue=>{P||(P=!0,G(),ue?X(_,[w]):X(b,[w]),w[Ve]=void 0,F[J]===e&&delete F[J])};const z=w[Ve].bind(null,!1);F[J]=e,g?j(g,[w,z]):z()},clone(w){const G=bn(w,t,n,s,r);return r&&r(G),G}};return H}function gs(e){if(Tn(e))return e=St(e),e.children=null,e}function Mr(e){if(!Tn(e))return mo(e.type)&&e.children?bo(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&&W(n.default))return n.default()}}function Dt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ar(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;ihn(_,t&&(k(t)?t[O]:t),n,s,r));return}if($t(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&hn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?os(s.component):s.el,o=r?null:i,{i:l,r:c}=e,u=t&&t.r,f=l.refs===le?l.refs={}:l.refs,h=l.setupState,p=Q(h),g=h===le?Ni:_=>Dr(f,_)?!1:se(p,_),b=(_,O)=>!(O&&Dr(f,O));if(u!=null&&u!==c){if(Lr(t),fe(u))f[u]=null,g(u)&&(h[u]=null);else if(ae(u)){const _=t;b(u,_.k)&&(u.value=null),_.k&&(f[_.k]=null)}}if(W(c))Rn(c,l,12,[o,f]);else{const _=fe(c),O=ae(c);if(_||O){const N=()=>{if(e.f){const C=_?g(c)?h[c]:f[c]:b()||!e.k?c.value:f[e.k];if(r)k(C)&&Ys(C,i);else if(k(C))C.includes(i)||C.push(i);else if(_)f[c]=[i],g(c)&&(h[c]=f[c]);else{const M=[i];b(c,e.k)&&(c.value=M),e.k&&(f[e.k]=M)}}else _?(f[c]=o,g(c)&&(h[c]=o)):O&&(b(c,e.k)&&(c.value=o),e.k&&(f[e.k]=o))};if(o){const C=()=>{N(),Kn.delete(e)};C.id=-1,Kn.set(e,C),we(C,n)}else Lr(e),N()}}}function Lr(e){const t=Kn.get(e);t&&(t.flags|=8,Kn.delete(e))}const Fr=e=>e.nodeType===8;es().requestIdleCallback;es().cancelIdleCallback;function Sc(e,t){if(Fr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Fr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const $t=e=>!!e.type.__asyncLoader;function _a(e){W(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let u=null,f,h=0;const p=()=>(h++,u=null,g()),g=()=>{let b;return u||(b=u=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((O,N)=>{c(_,()=>O(p()),()=>N(_),h+1)});throw _}).then(_=>b!==u&&u?u:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),f=_,_)))};return hr({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(b,_,O){let N=!1;(_.bu||(_.bu=[])).push(()=>N=!0);const C=()=>{N||O()},M=i?()=>{const T=i(C,F=>Sc(b,F));T&&(_.bum||(_.bum=[])).push(T)}:C;f?M():g().then(()=>!_.isUnmounted&&M())},get __asyncResolved(){return f},setup(){const b=ve;if(dr(b),f)return()=>Ln(f,b);const _=F=>{u=null,xn(F,b,13,!s)};if(l&&b.suspense||Jt)return g().then(F=>()=>Ln(F,b)).catch(F=>(_(F),()=>s?_e(s,{error:F}):null));const O=Gt(!1),N=Gt(),C=Gt(!!r);let M,T;return pr(()=>{M!=null&&clearTimeout(M),T!=null&&clearTimeout(T)}),r&&(T=setTimeout(()=>{b.isUnmounted||(C.value=!1)},r)),o!=null&&(M=setTimeout(()=>{if(!b.isUnmounted&&!O.value&&!N.value){const F=new Error(`Async component timed out after ${o}ms.`);_(F),N.value=F}},o)),g().then(()=>{b.isUnmounted||(O.value=!0,b.parent&&Tn(b.parent.vnode)&&b.parent.update())}).catch(F=>{if(b.isUnmounted){u=null;return}_(F),N.value=F}),()=>{if(O.value&&f)return Ln(f,b);if(N.value&&s)return _e(s,{error:N.value});if(n&&!C.value)return Ln(n,b)}}})}function Ln(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=_e(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const Tn=e=>e.type.__isKeepAlive;function Ac(e,t){So(e,"a",t)}function Cc(e,t){So(e,"da",t)}function So(e,t,n=ve){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ss(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Tn(r.parent.vnode)&&wc(s,t,n,r),r=r.parent}}function wc(e,t,n,s){const r=ss(t,e,s,!0);pr(()=>{Ys(s[t],r)},n)}function ss(e,t,n=ve,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{ft();const l=Pn(n),c=Be(t,n,e,o);return l(),ut(),c});return s?r.unshift(i):r.push(i),i}}const ht=e=>(t,n=ve)=>{(!Jt||e==="sp")&&ss(e,(...s)=>t(...s),n)},Rc=ht("bm"),Ao=ht("m"),xc=ht("bu"),Co=ht("u"),wo=ht("bum"),pr=ht("um"),Tc=ht("sp"),Oc=ht("rtg"),Pc=ht("rtc");function Ic(e,t=ve){ss("ec",e,t)}const Ro="components";function ya(e,t){return To(Ro,e,!0,t)||e}const xo=Symbol.for("v-ndc");function va(e){return fe(e)?To(Ro,e,!1)||e:e||xo}function To(e,t,n=!0,s=!1){const r=be||ve;if(r){const i=r.type;{const l=yf(i,!1);if(l&&(l===t||l===Te(t)||l===Zn(Te(t))))return i}const o=Vr(r[e]||i[e],t)||Vr(r.appContext[e],t);return!o&&s?i:o}}function Vr(e,t){return e&&(e[t]||e[Te(t)]||e[Zn(Te(t))])}function ba(e,t,n,s){let r;const i=n,o=k(e);if(o||fe(e)){const l=o&&ct(e);let c=!1,u=!1;l&&(c=!Me(e),u=at(e),e=ts(e)),r=new Array(e.length);for(let f=0,h=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,u=l.length;c{const i=s.fn(...r);return i&&(i.key=s.key),i}:s.fn)}return e}function Sa(e,t,n={},s,r){if(be.ce||be.parent&&$t(be.parent)&&be.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),js(),Hs(Pe,null,[_e("slot",n,s)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),js();const o=i&&Oo(i(n)),l=n.key||o&&o.key,c=Hs(Pe,{key:(l&&!De(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||[],o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),c}function Oo(e){return e.some(t=>Sn(t)?!(t.type===Se||t.type===Pe&&!Oo(t.children)):!0)?e:null}const Ds=e=>e?zo(e)?os(e):Ds(e.parent):null,dn=pe(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=>Ds(e.parent),$root:e=>Ds(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Io(e),$forceUpdate:e=>e.f||(e.f=()=>{fr(e.update)}),$nextTick:e=>e.n||(e.n=cr.bind(e.proxy)),$watch:e=>mc.bind(e)}),ms=(e,t)=>e!==le&&!e.__isScriptSetup&&se(e,t),Nc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ms(s,t))return o[t]=1,s[t];if(r!==le&&se(r,t))return o[t]=2,r[t];if(se(i,t))return o[t]=3,i[t];if(n!==le&&se(n,t))return o[t]=4,n[t];Ls&&(o[t]=0)}}const u=dn[t];let f,h;if(u)return t==="$attrs"&&Ee(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==le&&se(n,t))return o[t]=4,n[t];if(h=c.config.globalProperties,se(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ms(r,t)?(r[t]=n,!0):s!==le&&se(s,t)?(s[t]=n,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==le&&l[0]!=="$"&&se(e,l)||ms(t,l)||se(i,l)||se(s,l)||se(dn,l)||se(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jr(e){return k(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ls=!0;function Mc(e){const t=Io(e),n=e.proxy,s=e.ctx;Ls=!1,t.beforeCreate&&Hr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:u,created:f,beforeMount:h,mounted:p,beforeUpdate:g,updated:b,activated:_,deactivated:O,beforeDestroy:N,beforeUnmount:C,destroyed:M,unmounted:T,render:F,renderTracked:X,renderTriggered:j,errorCaptured:H,serverPrefetch:w,expose:G,inheritAttrs:J,components:P,directives:z,filters:ue}=t;if(u&&Dc(u,s,null),o)for(const q in o){const te=o[q];W(te)&&(s[q]=te.bind(n))}if(r){const q=r.call(n,n);ee(q)&&(e.data=wn(q))}if(Ls=!0,i)for(const q in i){const te=i[q],tt=W(te)?te.bind(n,n):W(te.get)?te.get.bind(n,n):et,dt=!W(te)&&W(te.set)?te.set.bind(n):et,Ge=je({get:tt,set:dt});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:Oe=>Ge.value=Oe})}if(l)for(const q in l)Po(l[q],s,n,q);if(c){const q=W(c)?c.call(n):c;Reflect.ownKeys(q).forEach(te=>{Vn(te,q[te])})}f&&Hr(f,e,"c");function ie(q,te){k(te)?te.forEach(tt=>q(tt.bind(n))):te&&q(te.bind(n))}if(ie(Rc,h),ie(Ao,p),ie(xc,g),ie(Co,b),ie(Ac,_),ie(Cc,O),ie(Ic,H),ie(Pc,X),ie(Oc,j),ie(wo,C),ie(pr,T),ie(Tc,w),k(G))if(G.length){const q=e.exposed||(e.exposed={});G.forEach(te=>{Object.defineProperty(q,te,{get:()=>n[te],set:tt=>n[te]=tt,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===et&&(e.render=F),J!=null&&(e.inheritAttrs=J),P&&(e.components=P),z&&(e.directives=z),w&&dr(e)}function Dc(e,t,n=et){k(e)&&(e=Fs(e));for(const s in e){const r=e[s];let i;ee(r)?"default"in r?i=He(r.from||s,r.default,!0):i=He(r.from||s):i=He(r),ae(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Hr(e,t,n){Be(k(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Po(e,t,n,s){let r=s.includes(".")?po(n,s):()=>n[s];if(fe(e)){const i=t[e];W(i)&&an(r,i)}else if(W(e))an(r,e.bind(n));else if(ee(e))if(k(e))e.forEach(i=>Po(i,t,n,s));else{const i=W(e.handler)?e.handler.bind(n):t[e.handler];W(i)&&an(r,i,e)}}function Io(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>Gn(c,u,o,!0)),Gn(c,t,o)),ee(t)&&i.set(t,c),c}function Gn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Gn(e,i,n,!0),r&&r.forEach(o=>Gn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Lc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Lc={data:Br,props:Ur,emits:Ur,methods:on,computed:on,beforeCreate:Ce,created:Ce,beforeMount:Ce,mounted:Ce,beforeUpdate:Ce,updated:Ce,beforeDestroy:Ce,beforeUnmount:Ce,destroyed:Ce,unmounted:Ce,activated:Ce,deactivated:Ce,errorCaptured:Ce,serverPrefetch:Ce,components:on,directives:on,watch:Vc,provide:Br,inject:Fc};function Br(e,t){return t?e?function(){return pe(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function Fc(e,t){return on(Fs(e),Fs(t))}function Fs(e){if(k(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Te(t)}Modifiers`]||e[`${At(t)}Modifiers`];function Uc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||le;let r=n;const i=t.startsWith("update:"),o=i&&Bc(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>fe(f)?f.trim():f)),o.number&&(r=n.map(Qs)));let l,c=s[l=us(t)]||s[l=us(Te(t))];!c&&i&&(c=s[l=us(At(t))]),c&&Be(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Be(u,e,6,r)}}const kc=new WeakMap;function Mo(e,t,n=!1){const s=n?kc:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!W(e)){const c=u=>{const f=Mo(u,t,!0);f&&(l=!0,pe(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(ee(e)&&s.set(e,null),null):(k(i)?i.forEach(c=>o[c]=null):pe(o,i),ee(e)&&s.set(e,o),o)}function rs(e,t){return!e||!zn(t)?!1:(t=t.slice(2).replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,At(t))||se(e,t))}function kr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:u,renderCache:f,props:h,data:p,setupState:g,ctx:b,inheritAttrs:_}=e,O=kn(e);let N,C;try{if(n.shapeFlag&4){const T=r||s,F=T;N=Xe(u.call(F,T,f,h,g,p,b)),C=l}else{const T=t;N=Xe(T.length>1?T(h,{attrs:l,slots:o,emit:c}):T(h,null)),C=t.props?l:Kc(l)}}catch(T){pn.length=0,xn(T,e,1),N=_e(Se)}let M=N;if(C&&_!==!1){const T=Object.keys(C),{shapeFlag:F}=M;T.length&&F&7&&(i&&T.some(Yn)&&(C=Gc(C,i)),M=St(M,C,!1,!0))}return n.dirs&&(M=St(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(n.dirs):n.dirs),n.transition&&Dt(M,n.transition),N=M,kn(O),N}const Kc=e=>{let t;for(const n in e)(n==="class"||n==="style"||zn(n))&&((t||(t={}))[n]=e[n]);return t},Gc=(e,t)=>{const n={};for(const s in e)(!Yn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Wc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Kr(s,o,u):!!o;if(c&8){const f=t.dynamicProps;for(let h=0;hObject.create(Lo),Vo=e=>Object.getPrototypeOf(e)===Lo;function qc(e,t,n,s=!1){const r={},i=Fo();e.propsDefaults=Object.create(null),jo(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:ro(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Jc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=Q(r),[c]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[p,g]=Ho(h,t,!0);pe(o,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return ee(e)&&s.set(e,kt),kt;if(k(i))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",mr=e=>k(e)?e.map(Xe):[Xe(e)],Yc=(e,t,n)=>{if(t._n)return t;const s=hc((...r)=>mr(t(...r)),n);return s._c=!1,s},Bo=(e,t,n)=>{const s=e._ctx;for(const r in e){if(gr(r))continue;const i=e[r];if(W(i))t[r]=Yc(r,i,s);else if(i!=null){const o=mr(i);t[r]=()=>o}}},Uo=(e,t)=>{const n=mr(t);e.slots.default=()=>n},ko=(e,t,n)=>{for(const s in t)(n||!gr(s))&&(e[s]=t[s])},Qc=(e,t,n)=>{const s=e.slots=Fo();if(e.vnode.shapeFlag&32){const r=t._;r?(ko(s,t,n),n&&Vi(s,"_",r,!0)):Bo(t,s)}else t&&Uo(e,t)},Xc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=le;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ko(r,t,n):(i=!t.$stable,Bo(t,r)),o=t}else t&&(Uo(e,t),o={default:1});if(i)for(const l in r)!gr(l)&&o[l]==null&&delete r[l]},we=sf;function Zc(e){return ef(e)}function ef(e,t){const n=es();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:f,parentNode:h,nextSibling:p,setScopeId:g=et,insertStaticContent:b}=e,_=(a,d,m,v=null,S=null,y=null,I=void 0,x=null,R=!!d.dynamicChildren)=>{if(a===d)return;a&&!Pt(a,d)&&(v=E(a),Oe(a,S,y,!0),a=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:A,ref:K,shapeFlag:L}=d;switch(A){case is:O(a,d,m,v);break;case Se:N(a,d,m,v);break;case ys:a==null&&C(d,m,v,I);break;case Pe:P(a,d,m,v,S,y,I,x,R);break;default:L&1?F(a,d,m,v,S,y,I,x,R):L&6?z(a,d,m,v,S,y,I,x,R):(L&64||L&128)&&A.process(a,d,m,v,S,y,I,x,R,B)}K!=null&&S?hn(K,a&&a.ref,y,d||a,!d):K==null&&a&&a.ref!=null&&hn(a.ref,null,y,a,!0)},O=(a,d,m,v)=>{if(a==null)s(d.el=l(d.children),m,v);else{const S=d.el=a.el;d.children!==a.children&&u(S,d.children)}},N=(a,d,m,v)=>{a==null?s(d.el=c(d.children||""),m,v):d.el=a.el},C=(a,d,m,v)=>{[a.el,a.anchor]=b(a.children,d,m,v,a.el,a.anchor)},M=({el:a,anchor:d},m,v)=>{let S;for(;a&&a!==d;)S=p(a),s(a,m,v),a=S;s(d,m,v)},T=({el:a,anchor:d})=>{let m;for(;a&&a!==d;)m=p(a),r(a),a=m;r(d)},F=(a,d,m,v,S,y,I,x,R)=>{if(d.type==="svg"?I="svg":d.type==="math"&&(I="mathml"),a==null)X(d,m,v,S,y,I,x,R);else{const A=a.el&&a.el._isVueCE?a.el:null;try{A&&A._beginPatch(),w(a,d,S,y,I,x,R)}finally{A&&A._endPatch()}}},X=(a,d,m,v,S,y,I,x)=>{let R,A;const{props:K,shapeFlag:L,transition:U,dirs:$}=a;if(R=a.el=o(a.type,y,K&&K.is,K),L&8?f(R,a.children):L&16&&H(a.children,R,null,v,S,_s(a,y),I,x),$&&wt(a,null,v,"created"),j(R,a,a.scopeId,I,v),K){for(const oe in K)oe!=="value"&&!cn(oe)&&i(R,oe,null,K[oe],y,v);"value"in K&&i(R,"value",null,K.value,y),(A=K.onVnodeBeforeMount)&&Je(A,v,a)}$&&wt(a,null,v,"beforeMount");const Z=tf(S,U);Z&&U.beforeEnter(R),s(R,d,m),((A=K&&K.onVnodeMounted)||Z||$)&&we(()=>{try{A&&Je(A,v,a),Z&&U.enter(R),$&&wt(a,null,v,"mounted")}finally{}},S)},j=(a,d,m,v,S)=>{if(m&&g(a,m),v)for(let y=0;y{for(let A=R;A{const x=d.el=a.el;let{patchFlag:R,dynamicChildren:A,dirs:K}=d;R|=a.patchFlag&16;const L=a.props||le,U=d.props||le;let $;if(m&&Rt(m,!1),($=U.onVnodeBeforeUpdate)&&Je($,m,d,a),K&&wt(d,a,m,"beforeUpdate"),m&&Rt(m,!0),(L.innerHTML&&U.innerHTML==null||L.textContent&&U.textContent==null)&&f(x,""),A?G(a.dynamicChildren,A,x,m,v,_s(d,S),y):I||te(a,d,x,null,m,v,_s(d,S),y,!1),R>0){if(R&16)J(x,L,U,m,S);else if(R&2&&L.class!==U.class&&i(x,"class",null,U.class,S),R&4&&i(x,"style",L.style,U.style,S),R&8){const Z=d.dynamicProps;for(let oe=0;oe{$&&Je($,m,d,a),K&&wt(d,a,m,"updated")},v)},G=(a,d,m,v,S,y,I)=>{for(let x=0;x{if(d!==m){if(d!==le)for(const y in d)!cn(y)&&!(y in m)&&i(a,y,d[y],null,S,v);for(const y in m){if(cn(y))continue;const I=m[y],x=d[y];I!==x&&y!=="value"&&i(a,y,x,I,S,v)}"value"in m&&i(a,"value",d.value,m.value,S)}},P=(a,d,m,v,S,y,I,x,R)=>{const A=d.el=a?a.el:l(""),K=d.anchor=a?a.anchor:l("");let{patchFlag:L,dynamicChildren:U,slotScopeIds:$}=d;$&&(x=x?x.concat($):$),a==null?(s(A,m,v),s(K,m,v),H(d.children||[],m,K,S,y,I,x,R)):L>0&&L&64&&U&&a.dynamicChildren&&a.dynamicChildren.length===U.length?(G(a.dynamicChildren,U,m,S,y,I,x),(d.key!=null||S&&d===S.subTree)&&_r(a,d,!0)):te(a,d,m,K,S,y,I,x,R)},z=(a,d,m,v,S,y,I,x,R)=>{d.slotScopeIds=x,a==null?d.shapeFlag&512?S.ctx.activate(d,m,v,I,R):ue(d,m,v,S,y,I,R):Ae(a,d,R)},ue=(a,d,m,v,S,y,I)=>{const x=a.component=df(a,v,S);if(Tn(a)&&(x.ctx.renderer=B),pf(x,!1,I),x.asyncDep){if(S&&S.registerDep(x,ie,I),!a.el){const R=x.subTree=_e(Se);N(null,R,d,m),a.placeholder=R.el}}else ie(x,a,d,m,S,y,I)},Ae=(a,d,m)=>{const v=d.component=a.component;if(Wc(a,d,m))if(v.asyncDep&&!v.asyncResolved){q(v,d,m);return}else v.next=d,v.update();else d.el=a.el,v.vnode=d},ie=(a,d,m,v,S,y,I)=>{const x=()=>{if(a.isMounted){let{next:L,bu:U,u:$,parent:Z,vnode:oe}=a;{const $e=Ko(a);if($e){L&&(L.el=oe.el,q(a,L,I)),$e.asyncDep.then(()=>{we(()=>{a.isUnmounted||A()},S)});return}}let re=L,de;Rt(a,!1),L?(L.el=oe.el,q(a,L,I)):L=oe,U&&Fn(U),(de=L.props&&L.props.onVnodeBeforeUpdate)&&Je(de,Z,L,oe),Rt(a,!0);const ye=kr(a),We=a.subTree;a.subTree=ye,_(We,ye,h(We.el),E(We),a,S,y),L.el=ye.el,re===null&&$c(a,ye.el),$&&we($,S),(de=L.props&&L.props.onVnodeUpdated)&&we(()=>Je(de,Z,L,oe),S)}else{let L;const{el:U,props:$}=d,{bm:Z,m:oe,parent:re,root:de,type:ye}=a,We=$t(d);Rt(a,!1),Z&&Fn(Z),!We&&(L=$&&$.onVnodeBeforeMount)&&Je(L,re,d),Rt(a,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(ye,a.parent?a.parent.type:void 0);const $e=a.subTree=kr(a);_(null,$e,m,v,a,S,y),d.el=$e.el}if(oe&&we(oe,S),!We&&(L=$&&$.onVnodeMounted)){const $e=d;we(()=>Je(L,re,$e),S)}(d.shapeFlag&256||re&&$t(re.vnode)&&re.vnode.shapeFlag&256)&&a.a&&we(a.a,S),a.isMounted=!0,d=m=v=null}};a.scope.on();const R=a.effect=new Gi(x);a.scope.off();const A=a.update=R.run.bind(R),K=a.job=R.runIfDirty.bind(R);K.i=a,K.id=a.uid,R.scheduler=()=>fr(K),Rt(a,!0),A()},q=(a,d,m)=>{d.component=a;const v=a.vnode.props;a.vnode=d,a.next=null,Jc(a,d.props,v,m),Xc(a,d.children,m),ft(),Pr(a),ut()},te=(a,d,m,v,S,y,I,x,R=!1)=>{const A=a&&a.children,K=a?a.shapeFlag:0,L=d.children,{patchFlag:U,shapeFlag:$}=d;if(U>0){if(U&128){dt(A,L,m,v,S,y,I,x,R);return}else if(U&256){tt(A,L,m,v,S,y,I,x,R);return}}$&8?(K&16&&Le(A,S,y),L!==A&&f(m,L)):K&16?$&16?dt(A,L,m,v,S,y,I,x,R):Le(A,S,y,!0):(K&8&&f(m,""),$&16&&H(L,m,v,S,y,I,x,R))},tt=(a,d,m,v,S,y,I,x,R)=>{a=a||kt,d=d||kt;const A=a.length,K=d.length,L=Math.min(A,K);let U;for(U=0;UK?Le(a,S,y,!0,!1,L):H(d,m,v,S,y,I,x,R,L)},dt=(a,d,m,v,S,y,I,x,R)=>{let A=0;const K=d.length;let L=a.length-1,U=K-1;for(;A<=L&&A<=U;){const $=a[A],Z=d[A]=R?it(d[A]):Xe(d[A]);if(Pt($,Z))_($,Z,m,null,S,y,I,x,R);else break;A++}for(;A<=L&&A<=U;){const $=a[L],Z=d[U]=R?it(d[U]):Xe(d[U]);if(Pt($,Z))_($,Z,m,null,S,y,I,x,R);else break;L--,U--}if(A>L){if(A<=U){const $=U+1,Z=$U)for(;A<=L;)Oe(a[A],S,y,!0),A++;else{const $=A,Z=A,oe=new Map;for(A=Z;A<=U;A++){const Ie=d[A]=R?it(d[A]):Xe(d[A]);Ie.key!=null&&oe.set(Ie.key,A)}let re,de=0;const ye=U-Z+1;let We=!1,$e=0;const Xt=new Array(ye);for(A=0;A=ye){Oe(Ie,S,y,!0);continue}let qe;if(Ie.key!=null)qe=oe.get(Ie.key);else for(re=Z;re<=U;re++)if(Xt[re-Z]===0&&Pt(Ie,d[re])){qe=re;break}qe===void 0?Oe(Ie,S,y,!0):(Xt[qe-Z]=A+1,qe>=$e?$e=qe:We=!0,_(Ie,d[qe],m,null,S,y,I,x,R),de++)}const Ar=We?nf(Xt):kt;for(re=Ar.length-1,A=ye-1;A>=0;A--){const Ie=Z+A,qe=d[Ie],Cr=d[Ie+1],wr=Ie+1{const{el:y,type:I,transition:x,children:R,shapeFlag:A}=a;if(A&6){Ge(a.component.subTree,d,m,v);return}if(A&128){a.suspense.move(d,m,v);return}if(A&64){I.move(a,d,m,B);return}if(I===Pe){s(y,d,m);for(let L=0;Lx.enter(y),S));else{const{leave:L,delayLeave:U,afterLeave:$}=x,Z=()=>{a.ctx.isUnmounted?r(y):s(y,d,m)},oe=()=>{const re=y._isLeaving||!!y[Ve];y._isLeaving&&y[Ve](!0),x.persisted&&!re?Z():L(y,()=>{Z(),$&&$()})};U?U(y,Z,oe):oe()}else s(y,d,m)},Oe=(a,d,m,v=!1,S=!1)=>{const{type:y,props:I,ref:x,children:R,dynamicChildren:A,shapeFlag:K,patchFlag:L,dirs:U,cacheIndex:$,memo:Z}=a;if(L===-2&&(S=!1),x!=null&&(ft(),hn(x,null,m,a,!0),ut()),$!=null&&(d.renderCache[$]=void 0),K&256){d.ctx.deactivate(a);return}const oe=K&1&&U,re=!$t(a);let de;if(re&&(de=I&&I.onVnodeBeforeUnmount)&&Je(de,d,a),K&6)Ct(a.component,m,v);else{if(K&128){a.suspense.unmount(m,v);return}oe&&wt(a,null,d,"beforeUnmount"),K&64?a.type.remove(a,d,m,B,v):A&&!A.hasOnce&&(y!==Pe||L>0&&L&64)?Le(A,d,m,!1,!0):(y===Pe&&L&384||!S&&K&16)&&Le(R,d,m),v&&Lt(a)}const ye=Z!=null&&$==null;(re&&(de=I&&I.onVnodeUnmounted)||oe||ye)&&we(()=>{de&&Je(de,d,a),oe&&wt(a,null,d,"unmounted"),ye&&(a.el=null)},m)},Lt=a=>{const{type:d,el:m,anchor:v,transition:S}=a;if(d===Pe){Ft(m,v);return}if(d===ys){T(a);return}const y=()=>{r(m),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(a.shapeFlag&1&&S&&!S.persisted){const{leave:I,delayLeave:x}=S,R=()=>I(m,y);x?x(a.el,y,R):R()}else y()},Ft=(a,d)=>{let m;for(;a!==d;)m=p(a),r(a),a=m;r(d)},Ct=(a,d,m)=>{const{bum:v,scope:S,job:y,subTree:I,um:x,m:R,a:A}=a;Wr(R),Wr(A),v&&Fn(v),S.stop(),y&&(y.flags|=8,Oe(I,a,d,m)),x&&we(x,d),we(()=>{a.isUnmounted=!0},d)},Le=(a,d,m,v=!1,S=!1,y=0)=>{for(let I=y;I{if(a.shapeFlag&6)return E(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=p(a.anchor||a.el),m=d&&d[go];return m?p(m):d};let V=!1;const D=(a,d,m)=>{let v;a==null?d._vnode&&(Oe(d._vnode,null,null,!0),v=d._vnode.component):_(d._vnode||null,a,d,null,null,null,m),d._vnode=a,V||(V=!0,Pr(v),uo(),V=!1)},B={p:_,um:Oe,m:Ge,r:Lt,mt:ue,mc:H,pc:te,pbc:G,n:E,o:e};return{render:D,hydrate:void 0,createApp:Hc(D)}}function _s({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 Rt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function tf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _r(e,t,n=!1){const s=e.children,r=t.children;if(k(s)&&k(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ko(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ko(t)}function Wr(e){if(e)for(let t=0;te.__isSuspense;function sf(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):ac(e)}const Pe=Symbol.for("v-fgt"),is=Symbol.for("v-txt"),Se=Symbol.for("v-cmt"),ys=Symbol.for("v-stc"),pn=[];let Ne=null;function js(e=!1){pn.push(Ne=e?null:[])}function rf(){pn.pop(),Ne=pn[pn.length-1]||null}let En=1;function Wn(e,t=!1){En+=e,e<0&&Ne&&t&&(Ne.hasOnce=!0)}function $o(e){return e.dynamicChildren=En>0?Ne||kt:null,rf(),En>0&&Ne&&Ne.push(e),e}function Aa(e,t,n,s,r,i){return $o(Jo(e,t,n,s,r,i,!0))}function Hs(e,t,n,s,r){return $o(_e(e,t,n,s,r,!0))}function Sn(e){return e?e.__v_isVNode===!0:!1}function Pt(e,t){return e.type===t.type&&e.key===t.key}const qo=({key:e})=>e??null,jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||ae(e)||W(e)?{i:be,r:e,k:t,f:!!n}:e:null);function Jo(e,t=null,n=null,s=0,r=null,i=e===Pe?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qo(t),ref:t&&jn(t),scopeId:ho,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:be};return l?(yr(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),En>0&&!o&&Ne&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ne.push(c),c}const _e=of;function of(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===xo)&&(e=Se),Sn(e)){const l=St(e,t,!0);return n&&yr(l,n),En>0&&!i&&Ne&&(l.shapeFlag&6?Ne[Ne.indexOf(e)]=l:Ne.push(l)),l.patchFlag=-2,l}if(vf(e)&&(e=e.__vccOpts),t){t=lf(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=Zs(l)),ee(c)&&(ns(c)&&!k(c)&&(c=pe({},c)),t.style=Xs(c))}const o=fe(e)?1:Wo(e)?128:mo(e)?64:ee(e)?4:W(e)?2:0;return Jo(e,t,n,s,r,o,i,!0)}function lf(e){return e?ns(e)||Vo(e)?pe({},e):e:null}function St(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,u=t?uf(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&qo(u),ref:t&&t.ref?n&&i?k(i)?i.concat(jn(t)):[i,jn(t)]:jn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&St(e.ssContent),ssFallback:e.ssFallback&&St(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Dt(f,c.clone(f)),f}function cf(e=" ",t=0){return _e(is,null,e,t)}function ff(e="",t=!1){return t?(js(),Hs(Se,null,e)):_e(Se,null,e)}function Xe(e){return e==null||typeof e=="boolean"?_e(Se):k(e)?_e(Pe,null,e.slice()):Sn(e)?it(e):_e(is,null,String(e))}function it(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:St(e)}function yr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(k(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),yr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Vo(t)?t._ctx=be:r===3&&be&&(be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:be},n=32):(t=String(t),s&64?(n=16,t=[cf(t)]):n=8);e.children=t,e.shapeFlag|=n}function uf(...e){const t={};for(let n=0;nve||be;let $n,Bs;{const e=es(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};$n=t("__VUE_INSTANCE_SETTERS__",n=>ve=n),Bs=t("__VUE_SSR_SETTERS__",n=>Jt=n)}const Pn=e=>{const t=ve;return $n(e),e.scope.on(),()=>{e.scope.off(),$n(t)}},$r=()=>{ve&&ve.scope.off(),$n(null)};function zo(e){return e.vnode.shapeFlag&4}let Jt=!1;function pf(e,t=!1,n=!1){t&&Bs(t);const{props:s,children:r}=e.vnode,i=zo(e);qc(e,s,i,t),Qc(e,r,n||t);const o=i?gf(e,t):void 0;return t&&Bs(!1),o}function gf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nc);const{setup:s}=n;if(s){ft();const r=e.setupContext=s.length>1?_f(e):null,i=Pn(e),o=Rn(s,e,0,[e.props,r]),l=Di(o);if(ut(),i(),(l||e.sp)&&!$t(e)&&dr(e),l){if(o.then($r,$r),t)return o.then(c=>{qr(e,c)}).catch(c=>{xn(c,e,0)});e.asyncDep=o}else qr(e,o)}else Yo(e)}function qr(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ee(t)&&(e.setupState=oo(t)),Yo(e)}function Yo(e,t,n){const s=e.type;e.render||(e.render=s.render||et);{const r=Pn(e);ft();try{Mc(e)}finally{ut(),r()}}}const mf={get(e,t){return Ee(e,"get",""),e[t]}};function _f(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,mf),slots:e.slots,emit:e.emit,expose:t}}function os(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oo(lr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in dn)return dn[n](e)},has(t,n){return n in t||n in dn}})):e.proxy}function yf(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}function vf(e){return W(e)&&"__vccOpts"in e}const je=(e,t)=>oc(e,t,Jt);function vr(e,t,n){try{Wn(-1);const s=arguments.length;return s===2?ee(t)&&!k(t)?Sn(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Sn(n)&&(n=[n]),_e(e,t,n))}finally{Wn(1)}}const bf="3.5.38";/** -* @vue/runtime-dom v3.5.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Us;const Jr=typeof window<"u"&&window.trustedTypes;if(Jr)try{Us=Jr.createPolicy("vue",{createHTML:e=>e})}catch{}const Qo=Us?e=>Us.createHTML(e):e=>e,Ef="http://www.w3.org/2000/svg",Sf="http://www.w3.org/1998/Math/MathML",rt=typeof document<"u"?document:null,zr=rt&&rt.createElement("template"),Af={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 r=t==="svg"?rt.createElementNS(Ef,e):t==="mathml"?rt.createElementNS(Sf,e):n?rt.createElement(e,{is:n}):rt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>rt.createTextNode(e),createComment:e=>rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{zr.innerHTML=Qo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=zr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pt="transition",tn="animation",zt=Symbol("_vtc"),Xo={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},Zo=pe({},yo,Xo),Cf=e=>(e.displayName="Transition",e.props=Zo,e),Ca=Cf((e,{slots:t})=>vr(Ec,el(e),t)),xt=(e,t=[])=>{k(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yr=e=>e?k(e)?e.some(t=>t.length>1):e.length>1:!1;function el(e){const t={};for(const P in e)P in Xo||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:f=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,b=wf(r),_=b&&b[0],O=b&&b[1],{onBeforeEnter:N,onEnter:C,onEnterCancelled:M,onLeave:T,onLeaveCancelled:F,onBeforeAppear:X=N,onAppear:j=C,onAppearCancelled:H=M}=t,w=(P,z,ue,Ae)=>{P._enterCancelled=Ae,_t(P,z?f:l),_t(P,z?u:o),ue&&ue()},G=(P,z)=>{P._isLeaving=!1,_t(P,h),_t(P,g),_t(P,p),z&&z()},J=P=>(z,ue)=>{const Ae=P?j:C,ie=()=>w(z,P,ue);xt(Ae,[z,ie]),Qr(()=>{_t(z,P?c:i),ze(z,P?f:l),Yr(Ae)||Xr(z,s,_,ie)})};return pe(t,{onBeforeEnter(P){xt(N,[P]),ze(P,i),ze(P,o)},onBeforeAppear(P){xt(X,[P]),ze(P,c),ze(P,u)},onEnter:J(!1),onAppear:J(!0),onLeave(P,z){P._isLeaving=!0;const ue=()=>G(P,z);ze(P,h),P._enterCancelled?(ze(P,p),ks(P)):(ks(P),ze(P,p)),Qr(()=>{P._isLeaving&&(_t(P,h),ze(P,g),Yr(T)||Xr(P,s,O,ue))}),xt(T,[P,ue])},onEnterCancelled(P){w(P,!1,void 0,!0),xt(M,[P])},onAppearCancelled(P){w(P,!0,void 0,!0),xt(H,[P])},onLeaveCancelled(P){G(P),xt(F,[P])}})}function wf(e){if(e==null)return null;if(ee(e))return[vs(e.enter),vs(e.leave)];{const t=vs(e);return[t,t]}}function vs(e){return wl(e)}function ze(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[zt]||(e[zt]=new Set)).add(t)}function _t(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[zt];n&&(n.delete(t),n.size||(e[zt]=void 0))}function Qr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Rf=0;function Xr(e,t,n,s){const r=e._endId=++Rf,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=tl(e,t);if(!o)return s();const u=o+"end";let f=0;const h=()=>{e.removeEventListener(u,p),i()},p=g=>{g.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[b]||"").split(", "),r=s(`${pt}Delay`),i=s(`${pt}Duration`),o=Zr(r,i),l=s(`${tn}Delay`),c=s(`${tn}Duration`),u=Zr(l,c);let f=null,h=0,p=0;t===pt?o>0&&(f=pt,h=o,p=i.length):t===tn?u>0&&(f=tn,h=u,p=c.length):(h=Math.max(o,u),f=h>0?o>u?pt:tn:null,p=f?f===pt?i.length:c.length:0);const g=f===pt&&/\b(?:transform|all)(?:,|$)/.test(s(`${pt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:g}}function Zr(e,t){for(;e.lengthei(n)+ei(e[s])))}function ei(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ks(e){return(e?e.ownerDocument:document).body.offsetHeight}function xf(e,t,n){const s=e[zt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qn=Symbol("_vod"),br=Symbol("_vsh"),wa={name:"show",beforeMount(e,{value:t},{transition:n}){e[qn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):nn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),nn(e,!0),s.enter(e)):s.leave(e,()=>{nn(e,!1)}):nn(e,t))},beforeUnmount(e,{value:t}){nn(e,t)}};function nn(e,t){e.style.display=t?e[qn]:"none",e[br]=!t}const Tf=Symbol(""),Of=/(?:^|;)\s*display\s*:/;function Pf(e,t,n){const s=e.style,r=fe(n);let i=!1;if(n&&!r){if(t)if(fe(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&ln(s,l,"")}else for(const o in t)n[o]==null&&ln(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?Nf(e,o,!fe(t)&&t?t[o]:void 0,l)||ln(s,o,l):ln(s,o,"")}}else if(r){if(t!==n){const o=s[Tf];o&&(n+=";"+o),s.cssText=n,i=Of.test(n)}}else t&&e.removeAttribute("style");qn in e&&(e[qn]=i?s.display:"",e[br]&&(s.display="none"))}const ti=/\s*!important$/;function ln(e,t,n){if(k(n))n.forEach(s=>ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=If(e,t);ti.test(n)?e.setProperty(At(s),n.replace(ti,""),"important"):e[s]=n}}const ni=["Webkit","Moz","ms"],bs={};function If(e,t){const n=bs[t];if(n)return n;let s=Te(t);if(s!=="filter"&&s in e)return bs[t]=s;s=Zn(s);for(let r=0;rEs||(Ff.then(()=>Es=0),Es=Date.now());function jf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(k(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Hf=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?xf(e,s,o):t==="style"?Pf(e,n,s):zn(t)?Yn(t)||Df(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Bf(e,t,s,o))?(ii(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ri(e,t,s,o,i,t!=="value")):e._isVueCE&&(Uf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!fe(s)))?ii(e,Te(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),ri(e,t,s,o))};function Bf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ci(t)&&W(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ci(t)&&fe(n)?!1:t in e}function Uf(e,t){const n=e._def.props;if(!n)return!1;const s=Te(t);return Array.isArray(n)?n.some(r=>Te(r)===s):Object.keys(n).some(r=>Te(r)===s)}const nl=new WeakMap,sl=new WeakMap,Jn=Symbol("_moveCb"),fi=Symbol("_enterCb"),kf=e=>(delete e.props.mode,e),Kf=kf({name:"TransitionGroup",props:pe({},Zo,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=On(),s=_o();let r,i;return Co(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!qf(r[0].el,n.vnode.el,o)){r=[];return}r.forEach(Gf),r.forEach(Wf);const l=r.filter($f);ks(n.vnode.el),l.forEach(c=>{const u=c.el,f=u.style;ze(u,o),f.transform=f.webkitTransform=f.transitionDuration="";const h=u[Jn]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",h),u[Jn]=null,_t(u,o))};u.addEventListener("transitionend",h)}),r=[]}),()=>{const o=Q(e),l=el(o);let c=o.tag||Pe;if(r=[],i)for(let u=0;u{l.split(/\s+/).forEach(c=>c&&s.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(s);const{hasTransform:o}=tl(s);return i.removeChild(s),o}const ui=e=>{const t=e.props["onUpdate:modelValue"]||!1;return k(t)?n=>Fn(t,n):t};function Jf(e){e.target.composing=!0}function ai(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ss=Symbol("_assign");function hi(e,t,n){return t&&(e=e.trim()),n&&(e=Qs(e)),e}const xa={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Ss]=ui(r);const i=s||r.props&&r.props.type==="number";Bt(e,t?"change":"input",o=>{o.target.composing||e[Ss](hi(e.value,n,i))}),(n||i)&&Bt(e,"change",()=>{e.value=hi(e.value,n,i)}),t||(Bt(e,"compositionstart",Jf),Bt(e,"compositionend",ai),Bt(e,"change",ai))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[Ss]=ui(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Qs(e.value):e.value,c=t??"";if(l===c)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},zf=["ctrl","shift","alt","meta"],Yf={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)=>zf.some(n=>e[`${n}Key`]&&!t.includes(n))},Ta=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=At(r.key);if(t.some(o=>o===i||Qf[o]===i))return e(r)})},Xf=pe({patchProp:Hf},Af);let di;function Zf(){return di||(di=Zc(Xf))}const Pa=(...e)=>{const t=Zf().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=tu(s);if(!r)return;const i=t._component;!W(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,eu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function eu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tu(e){return fe(e)?document.querySelector(e):e}/*! - * pinia v3.0.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let il;const ls=e=>il=e,ol=Symbol();function Ks(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var gn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(gn||(gn={}));function Ia(){const e=ki(!0),t=e.run(()=>Gt({}));let n=[],s=[];const r=lr({install(i){ls(r),r._a=i,i.provide(ol,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const ll=()=>{};function pi(e,t,n,s=ll){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&Ki()&&Dl(r),r}function jt(e,...t){e.forEach(n=>{n(...t)})}const nu=e=>e(),gi=Symbol(),As=Symbol();function Gs(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Ks(r)&&Ks(s)&&e.hasOwnProperty(n)&&!ae(s)&&!ct(s)?e[n]=Gs(r,s):e[n]=s}return e}const su=Symbol();function ru(e){return!Ks(e)||!Object.prototype.hasOwnProperty.call(e,su)}const{assign:yt}=Object;function iu(e){return!!(ae(e)&&e.effect)}function ou(e,t,n,s){const{state:r,actions:i,getters:o}=t,l=n.state.value[e];let c;function u(){l||(n.state.value[e]=r?r():{});const f=nc(n.state.value[e]);return yt(f,i,Object.keys(o||{}).reduce((h,p)=>(h[p]=lr(je(()=>{ls(n);const g=n._s.get(e);return o[p].call(g,g)})),h),{}))}return c=cl(e,u,t,n,s,!0),c}function cl(e,t,n={},s,r,i){let o;const l=yt({actions:{}},n),c={deep:!0};let u,f,h=new Set,p=new Set,g;const b=s.state.value[e];!i&&!b&&(s.state.value[e]={});let _;function O(H){let w;u=f=!1,typeof H=="function"?(H(s.state.value[e]),w={type:gn.patchFunction,storeId:e,events:g}):(Gs(s.state.value[e],H),w={type:gn.patchObject,payload:H,storeId:e,events:g});const G=_=Symbol();cr().then(()=>{_===G&&(u=!0)}),f=!0,jt(h,w,s.state.value[e])}const N=i?function(){const{state:w}=n,G=w?w():{};this.$patch(J=>{yt(J,G)})}:ll;function C(){o.stop(),h.clear(),p.clear(),s._s.delete(e)}const M=(H,w="")=>{if(gi in H)return H[As]=w,H;const G=function(){ls(s);const J=Array.from(arguments),P=new Set,z=new Set;function ue(q){P.add(q)}function Ae(q){z.add(q)}jt(p,{args:J,name:G[As],store:F,after:ue,onError:Ae});let ie;try{ie=H.apply(this&&this.$id===e?this:F,J)}catch(q){throw jt(z,q),q}return ie instanceof Promise?ie.then(q=>(jt(P,q),q)).catch(q=>(jt(z,q),Promise.reject(q))):(jt(P,ie),ie)};return G[gi]=!0,G[As]=w,G},T={_p:s,$id:e,$onAction:pi.bind(null,p),$patch:O,$reset:N,$subscribe(H,w={}){const G=pi(h,H,w.detached,()=>J()),J=o.run(()=>an(()=>s.state.value[e],P=>{(w.flush==="sync"?f:u)&&H({storeId:e,type:gn.direct,events:g},P)},yt({},c,w)));return G},$dispose:C},F=wn(T);s._s.set(e,F);const j=(s._a&&s._a.runWithContext||nu)(()=>s._e.run(()=>(o=ki()).run(()=>t({action:M}))));for(const H in j){const w=j[H];if(ae(w)&&!iu(w)||ct(w))i||(b&&ru(w)&&(ae(w)?w.value=b[H]:Gs(w,b[H])),s.state.value[e][H]=w);else if(typeof w=="function"){const G=M(w,H);j[H]=G,l.actions[H]=w}}return yt(F,j),yt(Q(F),j),Object.defineProperty(F,"$state",{get:()=>s.state.value[e],set:H=>{O(w=>{yt(w,H)})}}),s._p.forEach(H=>{yt(F,o.run(()=>H({store:F,app:s._a,pinia:s,options:l})))}),b&&i&&n.hydrate&&n.hydrate(F.$state,b),u=!0,f=!0,F}/*! #__NO_SIDE_EFFECTS__ */function Na(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function i(o,l){const c=dc();return o=o||(c?He(ol,null):null),o&&ls(o),o=il,o._s.has(e)||(r?cl(e,t,s,o):ou(e,s,o)),o._s.get(e)}return i.$id=e,i}function Ma(e,t){return Array.isArray(t)?t.reduce((n,s)=>(n[s]=function(){return e(this.$pinia)[s]},n),{}):Object.keys(t).reduce((n,s)=>(n[s]=function(){const r=e(this.$pinia),i=t[s];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function Da(e,t){return Array.isArray(t)?t.reduce((n,s)=>(n[s]=function(...r){return e(this.$pinia)[s](...r)},n),{}):Object.keys(t).reduce((n,s)=>(n[s]=function(...r){return e(this.$pinia)[t[s]](...r)},n),{})}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const Ut=typeof document<"u";function fl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&fl(e.default)}const ne=Object.assign;function Cs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ke(r)?r.map(e):e(r)}return n}const mn=()=>{},Ke=Array.isArray;function mi(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const ul=/#/g,cu=/&/g,fu=/\//g,uu=/=/g,au=/\?/g,al=/\+/g,hu=/%5B/g,du=/%5D/g,hl=/%5E/g,pu=/%60/g,dl=/%7B/g,gu=/%7C/g,pl=/%7D/g,mu=/%20/g;function Er(e){return e==null?"":encodeURI(""+e).replace(gu,"|").replace(hu,"[").replace(du,"]")}function _u(e){return Er(e).replace(dl,"{").replace(pl,"}").replace(hl,"^")}function Ws(e){return Er(e).replace(al,"%2B").replace(mu,"+").replace(ul,"%23").replace(cu,"%26").replace(pu,"`").replace(dl,"{").replace(pl,"}").replace(hl,"^")}function yu(e){return Ws(e).replace(uu,"%3D")}function vu(e){return Er(e).replace(ul,"%23").replace(au,"%3F")}function bu(e){return vu(e).replace(fu,"%2F")}function An(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Eu=/\/$/,Su=e=>e.replace(Eu,"");function ws(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),i=t.slice(c,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=Ru(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:An(o)}}function Au(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function _i(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Cu(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Yt(t.matched[s],n.matched[r])&&gl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Yt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function gl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!wu(e[n],t[n]))return!1;return!0}function wu(e,t){return Ke(e)?yi(e,t):Ke(t)?yi(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function yi(e,t){return Ke(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ru(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let $s=function(e){return e.pop="pop",e.push="push",e}({}),Rs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function xu(e){if(!e)if(Ut){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Su(e)}const Tu=/^[^#]+#/;function Ou(e,t){return e.replace(Tu,"#")+t}function Pu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const cs=()=>({left:window.scrollX,top:window.scrollY});function Iu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Pu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function vi(e,t){return(history.state?history.state.position-t:-1)+e}const qs=new Map;function Nu(e,t){qs.set(e,t)}function Mu(e){const t=qs.get(e);return qs.delete(e),t}function Du(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}let he=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const _l=Symbol("");he.MATCHER_NOT_FOUND+"",he.NAVIGATION_GUARD_REDIRECT+"",he.NAVIGATION_ABORTED+"",he.NAVIGATION_CANCELLED+"",he.NAVIGATION_DUPLICATED+"";function Qt(e,t){return ne(new Error,{type:e,[_l]:!0},t)}function st(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const Lu=["params","query","hash"];function Fu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Lu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Vu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Ws(r)):[s&&Ws(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function ju(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ke(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Hu=Symbol(""),Ei=Symbol(""),fs=Symbol(""),Sr=Symbol(""),Js=Symbol("");function sn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function bt(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const u=p=>{p===!1?c(Qt(he.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Du(p)?c(Qt(he.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(o&&s.enterCallbacks[r]===o&&typeof p=="function"&&o.push(p),l())},f=i(()=>e.call(s&&s.instances[r],t,n,u));let h=Promise.resolve(f);e.length<3&&(h=h.then(u)),h.catch(p=>c(p))})}function xs(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let c=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(fl(c)){const u=(c.__vccOpts||c)[t];u&&i.push(bt(u,n,s,o,l,r))}else{let u=c();i.push(()=>u.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${o.path}"`);const h=lu(f)?f.default:f;o.mods[l]=f,o.components[l]=h;const p=(h.__vccOpts||h)[t];return p&&bt(p,n,s,o,l,r)()}))}}return i}function Bu(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oYt(u,l))?s.push(l):n.push(l));const c=e.matched[o];c&&(t.matched.find(u=>Yt(u,c))||r.push(c))}return[n,s,r]}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let Uu=()=>location.protocol+"//"+location.host;function yl(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),_i(l,"")}return _i(n,e)+s+r}function ku(e,t,n,s){let r=[],i=[],o=null;const l=({state:p})=>{const g=yl(e,location),b=n.value,_=t.value;let O=0;if(p){if(n.value=g,t.value=p,o&&o===b){o=null;return}O=_?p.position-_.position:0}else s(g);r.forEach(N=>{N(n.value,b,{delta:O,type:$s.pop,direction:O?O>0?Rs.forward:Rs.back:Rs.unknown})})};function c(){o=n.value}function u(p){r.push(p);const g=()=>{const b=r.indexOf(p);b>-1&&r.splice(b,1)};return i.push(g),g}function f(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ne({},p.state,{scroll:cs()}),"")}}function h(){for(const p of i)p();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:c,listen:u,destroy:h}}function Si(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?cs():null}}function Ku(e){const{history:t,location:n}=window,s={value:yl(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,u,f){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:Uu()+e+c;try{t[f?"replaceState":"pushState"](u,"",p),r.value=u}catch(g){console.error(g),n[f?"replace":"assign"](p)}}function o(c,u){i(c,ne({},t.state,Si(r.value.back,c,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=c}function l(c,u){const f=ne({},r.value,t.state,{forward:c,scroll:cs()});i(f.current,f,!0),i(c,ne({},Si(s.value,c,null),{position:f.position+1},u),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function La(e){e=xu(e);const t=Ku(e),n=ku(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=ne({location:"",base:e,go:s,createHref:Ou.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let It=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var ge=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(ge||{});const Gu={type:It.Static,value:""},Wu=/[a-zA-Z0-9_]/;function $u(e){if(!e)return[[]];if(e==="/")return[[Gu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=ge.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,u="",f="";function h(){u&&(n===ge.Static?i.push({type:It.Static,value:u}):n===ge.Param||n===ge.ParamRegExp||n===ge.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:It.Param,value:u,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=c}for(;lt.length?t.length===1&&t[0]===Re.Static+Re.Segment?1:-1:0}function vl(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Qu={strict:!1,end:!0,sensitive:!1};function Xu(e,t,n){const s=zu($u(e.path),n),r=ne(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Zu(e,t){const n=[],s=new Map;t=mi(Qu,t);function r(h){return s.get(h)}function i(h,p,g){const b=!g,_=Ri(h);_.aliasOf=g&&g.record;const O=mi(t,h),N=[_];if("alias"in h){const T=typeof h.alias=="string"?[h.alias]:h.alias;for(const F of T)N.push(Ri(ne({},_,{components:g?g.record.components:_.components,path:F,aliasOf:g?g.record:_})))}let C,M;for(const T of N){const{path:F}=T;if(p&&F[0]!=="/"){const X=p.record.path,j=X[X.length-1]==="/"?"":"/";T.path=p.record.path+(F&&j+F)}if(C=Xu(T,p,O),g?g.alias.push(C):(M=M||C,M!==C&&M.alias.push(C),b&&h.name&&!xi(C)&&o(h.name)),bl(C)&&c(C),_.children){const X=_.children;for(let j=0;j{o(M)}:mn}function o(h){if(ml(h)){const p=s.get(h);p&&(s.delete(h),n.splice(n.indexOf(p),1),p.children.forEach(o),p.alias.forEach(o))}else{const p=n.indexOf(h);p>-1&&(n.splice(p,1),h.record.name&&s.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function l(){return n}function c(h){const p=na(h,n);n.splice(p,0,h),h.record.name&&!xi(h)&&s.set(h.record.name,h)}function u(h,p){let g,b={},_,O;if("name"in h&&h.name){if(g=s.get(h.name),!g)throw Qt(he.MATCHER_NOT_FOUND,{location:h});O=g.record.name,b=ne(wi(p.params,g.keys.filter(M=>!M.optional).concat(g.parent?g.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),h.params&&wi(h.params,g.keys.map(M=>M.name))),_=g.stringify(b)}else if(h.path!=null)_=h.path,g=n.find(M=>M.re.test(_)),g&&(b=g.parse(_),O=g.record.name);else{if(g=p.name?s.get(p.name):n.find(M=>M.re.test(p.path)),!g)throw Qt(he.MATCHER_NOT_FOUND,{location:h,currentLocation:p});O=g.record.name,b=ne({},p.params,h.params),_=g.stringify(b)}const N=[];let C=g;for(;C;)N.unshift(C.record),C=C.parent;return{name:O,path:_,params:b,matched:N,meta:ta(N)}}e.forEach(h=>i(h));function f(){n.length=0,s.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:f,getRoutes:l,getRecordMatcher:r}}function wi(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Ri(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ea(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ea(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function xi(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ta(e){return e.reduce((t,n)=>ne(t,n.meta),{})}function na(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;vl(e,t[i])<0?s=i:n=i+1}const r=sa(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function sa(e){let t=e;for(;t=t.parent;)if(bl(t)&&vl(e,t)===0)return t}function bl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ti(e){const t=He(fs),n=He(Sr),s=je(()=>{const c=Et(e.to);return t.resolve(c)}),r=je(()=>{const{matched:c}=s.value,{length:u}=c,f=c[u-1],h=n.matched;if(!f||!h.length)return-1;const p=h.findIndex(Yt.bind(null,f));if(p>-1)return p;const g=Oi(c[u-2]);return u>1&&Oi(f)===g&&h[h.length-1].path!==g?h.findIndex(Yt.bind(null,c[u-2])):p}),i=je(()=>r.value>-1&&ca(n.params,s.value.params)),o=je(()=>r.value>-1&&r.value===n.matched.length-1&&gl(n.params,s.value.params));function l(c={}){if(la(c)){const u=t[Et(e.replace)?"replace":"push"](Et(e.to)).catch(mn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:je(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function ra(e){return e.length===1?e[0]:e}const ia=hr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Ti,setup(e,{slots:t}){const n=wn(Ti(e)),{options:s}=He(fs),r=je(()=>({[Pi(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Pi(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&ra(t.default(n));return e.custom?i:vr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),oa=ia;function la(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function ca(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ke(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Oi(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Pi=(e,t,n)=>e??t??n,fa=hr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=He(Js),r=je(()=>e.route||s.value),i=He(Ei,0),o=je(()=>{let u=Et(i);const{matched:f}=r.value;let h;for(;(h=f[u])&&!h.components;)u++;return u}),l=je(()=>r.value.matched[o.value]);Vn(Ei,je(()=>o.value+1)),Vn(Hu,l),Vn(Js,r);const c=Gt();return an(()=>[c.value,l.value,e.name],([u,f,h],[p,g,b])=>{f&&(f.instances[h]=u,g&&g!==f&&u&&u===p&&(f.leaveGuards.size||(f.leaveGuards=g.leaveGuards),f.updateGuards.size||(f.updateGuards=g.updateGuards))),u&&f&&(!g||!Yt(f,g)||!p)&&(f.enterCallbacks[h]||[]).forEach(_=>_(u))},{flush:"post"}),()=>{const u=r.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return Ii(n.default,{Component:p,route:u});const g=h.props[f],b=g?g===!0?u.params:typeof g=="function"?g(u):g:null,O=vr(p,ne({},b,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return Ii(n.default,{Component:O,route:u})||O}}});function Ii(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ua=fa;function Fa(e){const t=Zu(e.routes,e),n=e.parseQuery||Vu,s=e.stringifyQuery||bi,r=e.history,i=sn(),o=sn(),l=sn(),c=Zl(gt);let u=gt;Ut&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Cs.bind(null,E=>""+E),h=Cs.bind(null,bu),p=Cs.bind(null,An);function g(E,V){let D,B;return ml(E)?(D=t.getRecordMatcher(E),B=V):B=E,t.addRoute(B,D)}function b(E){const V=t.getRecordMatcher(E);V&&t.removeRoute(V)}function _(){return t.getRoutes().map(E=>E.record)}function O(E){return!!t.getRecordMatcher(E)}function N(E,V){if(V=ne({},V||c.value),typeof E=="string"){const m=ws(n,E,V.path),v=t.resolve({path:m.path},V),S=r.createHref(m.fullPath);return ne(m,v,{params:p(v.params),hash:An(m.hash),redirectedFrom:void 0,href:S})}let D;if(E.path!=null)D=ne({},E,{path:ws(n,E.path,V.path).path});else{const m=ne({},E.params);for(const v in m)m[v]==null&&delete m[v];D=ne({},E,{params:h(m)}),V.params=h(V.params)}const B=t.resolve(D,V),Y=E.hash||"";B.params=f(p(B.params));const a=Au(s,ne({},E,{hash:_u(Y),path:B.path})),d=r.createHref(a);return ne({fullPath:a,hash:Y,query:s===bi?ju(E.query):E.query||{}},B,{redirectedFrom:void 0,href:d})}function C(E){return typeof E=="string"?ws(n,E,c.value.path):ne({},E)}function M(E,V){if(u!==E)return Qt(he.NAVIGATION_CANCELLED,{from:V,to:E})}function T(E){return j(E)}function F(E){return T(ne(C(E),{replace:!0}))}function X(E,V){const D=E.matched[E.matched.length-1];if(D&&D.redirect){const{redirect:B}=D;let Y=typeof B=="function"?B(E,V):B;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=C(Y):{path:Y},Y.params={}),ne({query:E.query,hash:E.hash,params:Y.path!=null?{}:E.params},Y)}}function j(E,V){const D=u=N(E),B=c.value,Y=E.state,a=E.force,d=E.replace===!0,m=X(D,B);if(m)return j(ne(C(m),{state:typeof m=="object"?ne({},Y,m.state):Y,force:a,replace:d}),V||D);const v=D;v.redirectedFrom=V;let S;return!a&&Cu(s,B,D)&&(S=Qt(he.NAVIGATION_DUPLICATED,{to:v,from:B}),Ge(B,B,!0,!1)),(S?Promise.resolve(S):G(v,B)).catch(y=>st(y)?st(y,he.NAVIGATION_GUARD_REDIRECT)?y:dt(y):te(y,v,B)).then(y=>{if(y){if(st(y,he.NAVIGATION_GUARD_REDIRECT))return j(ne({replace:d},C(y.to),{state:typeof y.to=="object"?ne({},Y,y.to.state):Y,force:a}),V||v)}else y=P(v,B,!0,d,Y);return J(v,B,y),y})}function H(E,V){const D=M(E,V);return D?Promise.reject(D):Promise.resolve()}function w(E){const V=Ft.values().next().value;return V&&typeof V.runWithContext=="function"?V.runWithContext(E):E()}function G(E,V){let D;const[B,Y,a]=Bu(E,V);D=xs(B.reverse(),"beforeRouteLeave",E,V);for(const m of B)m.leaveGuards.forEach(v=>{D.push(bt(v,E,V))});const d=H.bind(null,E,V);return D.push(d),Le(D).then(()=>{D=[];for(const m of i.list())D.push(bt(m,E,V));return D.push(d),Le(D)}).then(()=>{D=xs(Y,"beforeRouteUpdate",E,V);for(const m of Y)m.updateGuards.forEach(v=>{D.push(bt(v,E,V))});return D.push(d),Le(D)}).then(()=>{D=[];for(const m of a)if(m.beforeEnter)if(Ke(m.beforeEnter))for(const v of m.beforeEnter)D.push(bt(v,E,V));else D.push(bt(m.beforeEnter,E,V));return D.push(d),Le(D)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),D=xs(a,"beforeRouteEnter",E,V,w),D.push(d),Le(D))).then(()=>{D=[];for(const m of o.list())D.push(bt(m,E,V));return D.push(d),Le(D)}).catch(m=>st(m,he.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function J(E,V,D){l.list().forEach(B=>w(()=>B(E,V,D)))}function P(E,V,D,B,Y){const a=M(E,V);if(a)return a;const d=V===gt,m=Ut?history.state:{};D&&(B||d?r.replace(E.fullPath,ne({scroll:d&&m&&m.scroll},Y)):r.push(E.fullPath,Y)),c.value=E,Ge(E,V,D,d),dt()}let z;function ue(){z||(z=r.listen((E,V,D)=>{if(!Ct.listening)return;const B=N(E),Y=X(B,Ct.currentRoute.value);if(Y){j(ne(Y,{replace:!0,force:!0}),B).catch(mn);return}u=B;const a=c.value;Ut&&Nu(vi(a.fullPath,D.delta),cs()),G(B,a).catch(d=>st(d,he.NAVIGATION_ABORTED|he.NAVIGATION_CANCELLED)?d:st(d,he.NAVIGATION_GUARD_REDIRECT)?(j(ne(C(d.to),{force:!0}),B).then(m=>{st(m,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&!D.delta&&D.type===$s.pop&&r.go(-1,!1)}).catch(mn),Promise.reject()):(D.delta&&r.go(-D.delta,!1),te(d,B,a))).then(d=>{d=d||P(B,a,!1),d&&(D.delta&&!st(d,he.NAVIGATION_CANCELLED)?r.go(-D.delta,!1):D.type===$s.pop&&st(d,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),J(B,a,d)}).catch(mn)}))}let Ae=sn(),ie=sn(),q;function te(E,V,D){dt(E);const B=ie.list();return B.length?B.forEach(Y=>Y(E,V,D)):console.error(E),Promise.reject(E)}function tt(){return q&&c.value!==gt?Promise.resolve():new Promise((E,V)=>{Ae.add([E,V])})}function dt(E){return q||(q=!E,ue(),Ae.list().forEach(([V,D])=>E?D(E):V()),Ae.reset()),E}function Ge(E,V,D,B){const{scrollBehavior:Y}=e;if(!Ut||!Y)return Promise.resolve();const a=!D&&Mu(vi(E.fullPath,0))||(B||!D)&&history.state&&history.state.scroll||null;return cr().then(()=>Y(E,V,a)).then(d=>d&&Iu(d)).catch(d=>te(d,E,V))}const Oe=E=>r.go(E);let Lt;const Ft=new Set,Ct={currentRoute:c,listening:!0,addRoute:g,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:O,getRoutes:_,resolve:N,options:e,push:T,replace:F,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:ie.add,isReady:tt,install(E){E.component("RouterLink",oa),E.component("RouterView",ua),E.config.globalProperties.$router=Ct,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Et(c)}),Ut&&!Lt&&c.value===gt&&(Lt=!0,T(r.location).catch(B=>{}));const V={};for(const B in gt)Object.defineProperty(V,B,{get:()=>c.value[B],enumerable:!0});E.provide(fs,Ct),E.provide(Sr,ro(V)),E.provide(Js,c);const D=E.unmount;Ft.add(E),E.unmount=function(){Ft.delete(E),Ft.size<1&&(u=gt,z&&z(),z=null,c.value=gt,Lt=!1,q=!1),D()}}};function Le(E){return E.reduce((V,D)=>V.then(()=>w(D)),Promise.resolve())}return Ct}function Va(){return He(fs)}function ja(e){return He(Sr)}export{ff as $,wo as A,Is as B,Se as C,Ao as D,ma as E,Pe as F,Cc as G,Ac as H,cr as I,Ia as J,Fa as K,La as L,ae as M,Xs as N,Co as O,Ca as P,va as Q,da as R,Ml as S,is as T,Ra as U,wa as V,ga as W,js as X,Hs as Y,hc as Z,Aa as _,Zn as a,Rc as a0,cf as a1,ba as a2,pr as a3,ya as a4,Pa as a5,Na as a6,Da as a7,Ma as a8,_a as a9,Ta as aa,ja as ab,Va as ac,Ea as ad,Oa as ae,Sa as af,lr as ag,St as ah,xc as ai,xa as aj,Gt as b,Te as c,He as d,je as e,hr as f,On as g,vr as h,Sn as i,_e as j,Jo as k,aa as l,uf as m,Zs as n,an as o,Vn as p,Dl as q,wn as r,Zl as s,ha as t,Et as u,ki as v,pa as w,Q as x,nc as y,Ki as z}; diff --git a/assets/vendor-vue-BiQC5iF7.js b/assets/vendor-vue-BiQC5iF7.js new file mode 100644 index 0000000..c1d061e --- /dev/null +++ b/assets/vendor-vue-BiQC5iF7.js @@ -0,0 +1,29 @@ +/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Ys(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const le={},Kt=[],et=()=>{},Ii=()=>!1,Yn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qn=e=>e.startsWith("onUpdate:"),pe=Object.assign,Qs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},bl=Object.prototype.hasOwnProperty,se=(e,t)=>bl.call(e,t),K=Array.isArray,kt=e=>An(e)==="[object Map]",Ni=e=>An(e)==="[object Set]",Rr=e=>An(e)==="[object Date]",W=e=>typeof e=="function",fe=e=>typeof e=="string",De=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",Mi=e=>(ee(e)||W(e))&&W(e.then)&&W(e.catch),Di=Object.prototype.toString,An=e=>Di.call(e),El=e=>An(e).slice(8,-1),Li=e=>An(e)==="[object Object]",Xn=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,cn=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Sl=/-\w/g,Te=Zn(e=>e.replace(Sl,t=>t.slice(1).toUpperCase())),Cl=/\B([A-Z])/g,Ct=Zn(e=>e.replace(Cl,"-$1").toLowerCase()),es=Zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),as=Zn(e=>e?`on${es(e)}`:""),Ze=(e,t)=>!Object.is(e,t),Fn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Xs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Al=e=>{const t=fe(e)?Number(e):NaN;return isNaN(t)?e:t};let xr;const ts=()=>xr||(xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Zs(e){if(K(e)){const t={};for(let n=0;n{if(n){const s=n.split(Rl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function er(e){let t="";if(fe(e))t=e;else if(K(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Nl=e=>fe(e)?e:e==null?"":K(e)||ee(e)&&(e.toString===Di||!W(e.toString))?ji(e)?Nl(e.value):JSON.stringify(e,Hi,2):String(e),Hi=(e,t)=>ji(t)?Hi(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[hs(s,i)+" =>"]=r,n),{})}:Ni(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>hs(n))}:De(t)?hs(t):ee(t)&&!K(t)&&!Li(t)?String(t):t,hs=(e,t="")=>{var n;return De(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let me;class Bi{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&&me&&(me.active?(this.parent=me,this.index=(me.scopes||(me.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)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(me===this)me=this.prevScope;else{let t=me;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(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fn;){let t=fn;for(fn=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 $i(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),rr(s),Dl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Os(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ji(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ji(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_n)||(e.globalVersion=_n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Os(e))))return;e.flags|=2;const t=e.dep,n=ce,s=Ue;ce=e,Ue=!0;try{$i(e);const r=e.fn(e._value);(t.version===0||Ze(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ce=n,Ue=s,qi(e),e.flags&=-3}}function rr(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)rr(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Dl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ue=!0;const zi=[];function tt(){zi.push(Ue),Ue=!1}function nt(){const e=zi.pop();Ue=e===void 0?!0:e}function Tr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ce;ce=void 0;try{t()}finally{ce=n}}}let _n=0;class Ll{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 ir{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(!ce||!Ue||ce===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ce)n=this.activeLink=new Ll(ce,this),ce.deps?(n.prevDep=ce.depsTail,ce.depsTail.nextDep=n,ce.depsTail=n):ce.deps=ce.depsTail=n,Yi(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=ce.depsTail,n.nextDep=void 0,ce.depsTail.nextDep=n,ce.depsTail=n,ce.deps===n&&(ce.deps=s)}return n}trigger(t){this.version++,_n++,this.notify(t)}notify(t){nr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{sr()}}}function Yi(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)Yi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Hn=new WeakMap,Nt=Symbol(""),Ps=Symbol(""),yn=Symbol("");function Ee(e,t,n){if(Ue&&ce){let s=Hn.get(e);s||Hn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ir),r.map=s,r.key=n),r.track()}}function ct(e,t,n,s,r,i){const o=Hn.get(e);if(!o){_n++;return}const l=c=>{c&&c.trigger()};if(nr(),t==="clear")o.forEach(l);else{const c=K(e),u=c&&Xn(n);if(c&&n==="length"){const f=Number(s);o.forEach((h,p)=>{(p==="length"||p===yn||!De(p)&&p>=f)&&l(h)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),u&&l(o.get(yn)),t){case"add":c?u&&l(o.get("length")):(l(o.get(Nt)),kt(e)&&l(o.get(Ps)));break;case"delete":c||(l(o.get(Nt)),kt(e)&&l(o.get(Ps)));break;case"set":kt(e)&&l(o.get(Nt));break}}sr()}function Fl(e,t){const n=Hn.get(e);return n&&n.get(t)}function Vt(e){const t=Q(e);return t===e?t:(Ee(t,"iterate",yn),Me(e)?t:t.map(Ke))}function ns(e){return Ee(e=Q(e),"iterate",yn),e}function Qe(e,t){return at(e)?qt(ut(e)?Ke(t):t):Ke(t)}const Vl={__proto__:null,[Symbol.iterator](){return ps(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Vt(this).concat(...e.map(t=>K(t)?Vt(t):t))},entries(){return ps(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,n=>n.map(s=>Qe(this,s)),arguments)},find(e,t){return rt(this,"find",e,t,n=>Qe(this,n),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,n=>Qe(this,n),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return gs(this,"includes",e)},indexOf(...e){return gs(this,"indexOf",e)},join(e){return Vt(this).join(e)},lastIndexOf(...e){return gs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Zt(this,"pop")},push(...e){return Zt(this,"push",e)},reduce(e,...t){return Or(this,"reduce",e,t)},reduceRight(e,...t){return Or(this,"reduceRight",e,t)},shift(){return Zt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Zt(this,"splice",e)},toReversed(){return Vt(this).toReversed()},toSorted(e){return Vt(this).toSorted(e)},toSpliced(...e){return Vt(this).toSpliced(...e)},unshift(...e){return Zt(this,"unshift",e)},values(){return ps(this,"values",e=>Qe(this,e))}};function ps(e,t,n){const s=ns(e),r=s[t]();return s!==e&&!Me(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const jl=Array.prototype;function rt(e,t,n,s,r,i){const o=ns(e),l=o!==e&&!Me(e),c=o[t];if(c!==jl[t]){const h=c.apply(e,i);return l?Ke(h):h}let u=n;o!==e&&(l?u=function(h,p){return n.call(this,Qe(e,h),p,e)}:n.length>2&&(u=function(h,p){return n.call(this,h,p,e)}));const f=c.call(o,u,s);return l&&r?r(f):f}function Or(e,t,n,s){const r=ns(e),i=r!==e&&!Me(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(u,f,h){return l&&(l=!1,u=Qe(e,u)),n.call(this,u,Qe(e,f),h,e)}):n.length>3&&(o=function(u,f,h){return n.call(this,u,f,h,e)}));const c=r[t](o,...s);return l?Qe(e,c):c}function gs(e,t,n){const s=Q(e);Ee(s,"iterate",yn);const r=s[t](...n);return(r===-1||r===!1)&&ss(n[0])?(n[0]=Q(n[0]),s[t](...n)):r}function Zt(e,t,n=[]){tt(),nr();const s=Q(e)[t].apply(e,n);return sr(),nt(),s}const Hl=Ys("__proto__,__v_isRef,__isVue"),Qi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(De));function Bl(e){De(e)||(e=String(e));const t=Q(this);return Ee(t,"has",e),t.hasOwnProperty(e)}class Xi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Yl:no:i?to:eo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=K(t);if(!r){let c;if(o&&(c=Vl[n]))return c;if(n==="hasOwnProperty")return Bl}const l=Reflect.get(t,n,ae(t)?t:s);if((De(n)?Qi.has(n):Hl(n))||(r||Ee(t,"get",n),i))return l;if(ae(l)){const c=o&&Xn(n)?l:l.value;return r&&ee(c)?Ns(c):c}return ee(l)?r?Ns(l):wn(l):l}}class Zi extends Xi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=K(t)&&Xn(n);if(!this._isShallow){const u=at(i);if(!Me(s)&&!at(s)&&(i=Q(i),s=Q(s)),!o&&ae(i)&&!ae(s))return u||(i.value=s),!0}const l=o?Number(n)e,In=e=>Reflect.getPrototypeOf(e);function Wl(e,t,n){return function(...s){const r=this.__v_raw,i=Q(r),o=kt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...s),f=n?Is:t?qt:Ke;return!t&&Ee(i,"iterate",c?Ps:Nt),pe(Object.create(u),{next(){const{value:h,done:p}=u.next();return p?{value:h,done:p}:{value:l?[f(h[0]),f(h[1])]:f(h),done:p}}})}}function Nn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $l(e,t){const n={get(r){const i=this.__v_raw,o=Q(i),l=Q(r);e||(Ze(r,l)&&Ee(o,"get",r),Ee(o,"get",l));const{has:c}=In(o),u=t?Is:e?qt:Ke;if(c.call(o,r))return u(i.get(r));if(c.call(o,l))return u(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ee(Q(r),"iterate",Nt),r.size},has(r){const i=this.__v_raw,o=Q(i),l=Q(r);return e||(Ze(r,l)&&Ee(o,"has",r),Ee(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=Q(l),u=t?Is:e?qt:Ke;return!e&&Ee(c,"iterate",Nt),l.forEach((f,h)=>r.call(i,u(f),u(h),o))}};return pe(n,e?{add:Nn("add"),set:Nn("set"),delete:Nn("delete"),clear:Nn("clear")}:{add(r){const i=Q(this),o=In(i),l=Q(r),c=!t&&!Me(r)&&!at(r)?l:r;return o.has.call(i,c)||Ze(r,c)&&o.has.call(i,r)||Ze(l,c)&&o.has.call(i,l)||(i.add(c),ct(i,"add",c,c)),this},set(r,i){!t&&!Me(i)&&!at(i)&&(i=Q(i));const o=Q(this),{has:l,get:c}=In(o);let u=l.call(o,r);u||(r=Q(r),u=l.call(o,r));const f=c.call(o,r);return o.set(r,i),u?Ze(i,f)&&ct(o,"set",r,i):ct(o,"add",r,i),this},delete(r){const i=Q(this),{has:o,get:l}=In(i);let c=o.call(i,r);c||(r=Q(r),c=o.call(i,r)),l&&l.call(i,r);const u=i.delete(r);return c&&ct(i,"delete",r,void 0),u},clear(){const r=Q(this),i=r.size!==0,o=r.clear();return i&&ct(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Wl(r,e,t)}),n}function or(e,t){const n=$l(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(se(n,r)&&r in s?n:s,r,i)}const ql={get:or(!1,!1)},Jl={get:or(!1,!0)},zl={get:or(!0,!1)};const eo=new WeakMap,to=new WeakMap,no=new WeakMap,Yl=new WeakMap;function Ql(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wn(e){return at(e)?e:lr(e,!1,Kl,ql,eo)}function so(e){return lr(e,!1,Gl,Jl,to)}function Ns(e){return lr(e,!0,kl,zl,no)}function lr(e,t,n,s,r){if(!ee(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=Ql(El(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ut(e){return at(e)?ut(e.__v_raw):!!(e&&e.__v_isReactive)}function at(e){return!!(e&&e.__v_isReadonly)}function Me(e){return!!(e&&e.__v_isShallow)}function ss(e){return e?!!e.__v_raw:!1}function Q(e){const t=e&&e.__v_raw;return t?Q(t):e}function cr(e){return!se(e,"__v_skip")&&Object.isExtensible(e)&&Fi(e,"__v_skip",!0),e}const Ke=e=>ee(e)?wn(e):e,qt=e=>ee(e)?Ns(e):e;function ae(e){return e?e.__v_isRef===!0:!1}function Gt(e){return ro(e,!1)}function Xl(e){return ro(e,!0)}function ro(e,t){return ae(e)?e:new Zl(e,t)}class Zl{constructor(t,n){this.dep=new ir,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Q(t),this._value=n?t:Ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Me(t)||at(t);t=s?t:Q(t),Ze(t,n)&&(this._rawValue=t,this._value=s?t:Ke(t),this.dep.trigger())}}function Et(e){return ae(e)?e.value:e}function ha(e){return W(e)?e():Et(e)}const ec={get:(e,t,n)=>t==="__v_raw"?e:Et(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function io(e){return ut(e)?e:new Proxy(e,ec)}function tc(e){const t=K(e)?new Array(e.length):{};for(const n in e)t[n]=oo(e,n);return t}class nc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=De(n)?n:String(n),this._raw=Q(t);let r=!0,i=t;if(!K(t)||De(this._key)||!Xn(this._key))do r=!ss(i)||Me(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Et(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ae(this._raw[this._key])){const n=this._object[this._key];if(ae(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Fl(this._raw,this._key)}}class sc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function da(e,t,n){return ae(e)?e:W(e)?new sc(e):ee(e)&&arguments.length>1?oo(e,t,n):Gt(e)}function oo(e,t,n){return new nc(e,t,n)}class rc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ir(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return Wi(this,!0),!0}get value(){const t=this.dep.track();return Ji(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ic(e,t,n=!1){let s,r;return W(e)?s=e:(s=e.get,r=e.set),new rc(s,r,n)}const Mn={},Bn=new WeakMap;let Tt;function oc(e,t=!1,n=Tt){if(n){let s=Bn.get(n);s||Bn.set(n,s=[]),s.push(e)}}function lc(e,t,n=le){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,u=T=>r?T:Me(T)||r===!1||r===0?ft(T,1):ft(T);let f,h,p,g,b=!1,_=!1;if(ae(e)?(h=()=>e.value,b=Me(e)):ut(e)?(h=()=>u(e),b=!0):K(e)?(_=!0,b=e.some(T=>ut(T)||Me(T)),h=()=>e.map(T=>{if(ae(T))return T.value;if(ut(T))return u(T);if(W(T))return c?c(T,2):T()})):W(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){tt();try{p()}finally{nt()}}const T=Tt;Tt=f;try{return c?c(e,3,[g]):e(g)}finally{Tt=T}}:h=et,t&&r){const T=h,F=r===!0?1/0:r;h=()=>ft(T(),F)}const P=Ki(),O=()=>{f.stop(),P&&P.active&&Qs(P.effects,f)};if(i&&t){const T=t;t=(...F)=>{const X=T(...F);return O(),X}}let A=_?new Array(e.length).fill(Mn):Mn;const M=T=>{if(!(!(f.flags&1)||!f.dirty&&!T))if(t){const F=f.run();if(T||r||b||(_?F.some((X,j)=>Ze(X,A[j])):Ze(F,A))){p&&p();const X=Tt;Tt=f;try{const j=[F,A===Mn?void 0:_&&A[0]===Mn?[]:A,g];A=F,c?c(t,3,j):t(...j)}finally{Tt=X}}}else f.run()};return l&&l(M),f=new ki(h),f.scheduler=o?()=>o(M,!1):M,g=T=>oc(T,!1,f),p=f.onStop=()=>{const T=Bn.get(f);if(T){if(c)c(T,4);else for(const F of T)F();Bn.delete(f)}},t?s?M(!0):A=f.run():o?o(M.bind(null,!0),!0):f.run(),O.pause=f.pause.bind(f),O.resume=f.resume.bind(f),O.stop=O,O}function ft(e,t=1/0,n){if(t<=0||!ee(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ae(e))ft(e.value,t,n);else if(K(e))for(let s=0;s{ft(s,t,n)});else if(Li(e)){for(const s in e)ft(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&ft(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Rn(e,t,n,s){try{return s?e(...s):e()}catch(r){xn(r,t,n)}}function Be(e,t,n,s){if(W(e)){const r=Rn(e,t,n,s);return r&&Mi(r)&&r.catch(i=>{xn(i,t,n)}),r}if(K(e)){const r=[];for(let i=0;i>>1,r=xe[s],i=vn(r);i=vn(n)?xe.push(e):xe.splice(fc(t),0,e),e.flags|=1,co()}}function co(){Un||(Un=lo.then(uo))}function uc(e){K(e)?Wt.push(...e):vt&&e.id===-1?vt.splice(Ht+1,0,e):e.flags&1||(Wt.push(e),e.flags|=1),co()}function Pr(e,t,n=Ye+1){for(;nvn(n)-vn(s));if(Wt.length=0,vt){vt.push(...t);return}for(vt=t,Ht=0;Hte.id==null?e.flags&2?-1:1/0:e.id;function uo(e){try{for(Ye=0;Ye{s._d&&Wn(-1);const i=Kn(t);let o;try{o=e(...r)}finally{Kn(i),s._d&&Wn(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function pa(e,t){if(be===null)return e;const n=ls(be),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&W(t)?t.call(s&&s.proxy):t}}function hc(){return!!(On()||Mt)}const dc=Symbol.for("v-scx"),pc=()=>He(dc);function ga(e,t){return ar(e,null,t)}function an(e,t,n){return ar(e,t,n)}function ar(e,t,n=le){const{immediate:s,deep:r,flush:i,once:o}=n,l=pe({},n),c=t&&s||!t&&i!=="post";let u;if(Jt){if(i==="sync"){const g=pc();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=et,g.resume=et,g.pause=et,g}}const f=ve;l.call=(g,b,_)=>Be(g,f,b,_);let h=!1;i==="post"?l.scheduler=g=>{we(g,f&&f.suspense)}:i!=="sync"&&(h=!0,l.scheduler=(g,b)=>{b?g():ur(g)}),l.augmentJob=g=>{t&&(g.flags|=4),h&&(g.flags|=2,f&&(g.id=f.uid,g.i=f))};const p=lc(e,t,l);return Jt&&(u?u.push(p):c&&p()),p}function gc(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?ho(s,e):()=>s[e]:e.bind(s,s);let i;W(t)?i=t:(i=t.handler,n=t);const o=Pn(this),l=ar(r,i.bind(s),n);return o(),l}function ho(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,Ot=e=>e&&(e.disabled||e.disabled===""),mc=e=>e&&(e.defer||e.defer===""),Ir=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Nr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ms=(e,t)=>{const n=e&&e.to;return fe(n)?t?t(n):null:n},_c={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,u){const{mc:f,pc:h,pbc:p,o:{insert:g,querySelector:b,createText:_,createComment:P,parentNode:O}}=u,A=Ot(t.props);let{dynamicChildren:M}=t;const T=(j,H,w)=>{j.shapeFlag&16&&f(j.children,H,w,r,i,o,l,c)},F=(j=t)=>{const H=Ot(j.props),w=j.target=Ms(j.props,b),G=Ds(w,j,_,g);w&&(o!=="svg"&&Ir(w)?o="svg":o!=="mathml"&&Nr(w)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(w),H||(T(j,w,G),rn(j,!1)))},X=j=>{const H=()=>{if(mt.get(j)===H){if(mt.delete(j),Ot(j.props)){const w=O(j.el)||n;T(j,w,j.anchor),rn(j,!0)}F(j)}};mt.set(j,H),we(H,i)};if(e==null){const j=t.el=_(""),H=t.anchor=_("");if(g(j,n,s),g(H,n,s),mc(t.props)||i&&i.pendingBranch){X(t);return}A&&(T(t,n,H),rn(t,!0)),F()}else{t.el=e.el;const j=t.anchor=e.anchor,H=mt.get(e);if(H){H.flags|=8,mt.delete(e),X(t);return}t.targetStart=e.targetStart;const w=t.target=e.target,G=t.targetAnchor=e.targetAnchor,J=Ot(e.props),N=J?n:w,z=J?j:G;if(o==="svg"||Ir(w)?o="svg":(o==="mathml"||Nr(w))&&(o="mathml"),M?(p(e.dynamicChildren,M,N,r,i,o,l),yr(e,t,!0)):c||h(e,t,N,z,r,i,o,l,!1),A)J?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Dn(t,n,j,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ue=Ms(t.props,b);ue&&(t.target=ue,Dn(t,ue,null,u,0))}else J&&Dn(t,w,G,u,1);rn(t,A)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:u,targetAnchor:f,target:h,props:p}=e,g=Ot(p),b=i||!g,_=mt.get(e);if(_&&(_.flags|=8,mt.delete(e)),h&&(r(u),r(f)),i&&r(c),!_&&(g||h)&&o&16)for(let P=0;P{e.isMounted=!0}),Ao(()=>{e.isUnmounting=!0}),e}const Fe=[Function,Array],_o={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fe,onEnter:Fe,onAfterEnter:Fe,onEnterCancelled:Fe,onBeforeLeave:Fe,onLeave:Fe,onAfterLeave:Fe,onLeaveCancelled:Fe,onBeforeAppear:Fe,onAppear:Fe,onAfterAppear:Fe,onAppearCancelled:Fe},yo=e=>{const t=e.subTree;return t.component?yo(t.component):t},vc={name:"BaseTransition",props:_o,setup(e,{slots:t}){const n=On(),s=mo();return()=>{const r=t.default&&hr(t.default(),!0),i=r&&r.length?vo(r):n.subTree?cf():void 0;if(!i)return;const o=Q(e),{mode:l}=o;if(s.isLeaving)return ms(i);const c=Mr(i);if(!c)return ms(i);let u=bn(c,o,s,n,h=>u=h);c.type!==Se&&Dt(c,u);let f=n.subTree&&Mr(n.subTree);if(f&&f.type!==Se&&!Pt(f,c)&&yo(n).type!==Se){let h=bn(f,o,s,n);if(Dt(f,h),l==="out-in"&&c.type!==Se)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},ms(i);l==="in-out"&&c.type!==Se?h.delayLeave=(p,g,b)=>{const _=bo(s,f);_[String(f.key)]=f,p[Ve]=()=>{g(),p[Ve]=void 0,delete u.delayedLeave,f=void 0},u.delayedLeave=()=>{b(),delete u.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return i}}};function vo(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Se){t=n;break}}return t}const bc=vc;function bo(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 bn(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:g,onAfterLeave:b,onLeaveCancelled:_,onBeforeAppear:P,onAppear:O,onAfterAppear:A,onAppearCancelled:M}=t,T=String(e.key),F=bo(n,e),X=(w,G)=>{w&&Be(w,s,9,G)},j=(w,G)=>{const J=G[1];X(w,G),K(w)?w.every(N=>N.length<=1)&&J():w.length<=1&&J()},H={mode:o,persisted:l,beforeEnter(w){let G=c;if(!n.isMounted)if(i)G=P||c;else return;w[Ve]&&w[Ve](!0);const J=F[T];J&&Pt(e,J)&&J.el[Ve]&&J.el[Ve](),X(G,[w])},enter(w){if(F[T]===e)return;let G=u,J=f,N=h;if(!n.isMounted)if(i)G=O||u,J=A||f,N=M||h;else return;let z=!1;w[en]=Ce=>{z||(z=!0,Ce?X(N,[w]):X(J,[w]),H.delayedLeave&&H.delayedLeave(),w[en]=void 0)};const ue=w[en].bind(null,!1);G?j(G,[w,ue]):ue()},leave(w,G){const J=String(e.key);if(w[en]&&w[en](!0),n.isUnmounting)return G();X(p,[w]);let N=!1;w[Ve]=ue=>{N||(N=!0,G(),ue?X(_,[w]):X(b,[w]),w[Ve]=void 0,F[J]===e&&delete F[J])};const z=w[Ve].bind(null,!1);F[J]=e,g?j(g,[w,z]):z()},clone(w){const G=bn(w,t,n,s,r);return r&&r(G),G}};return H}function ms(e){if(Tn(e))return e=St(e),e.children=null,e}function Mr(e){if(!Tn(e))return go(e.type)&&e.children?vo(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&&W(n.default))return n.default()}}function Dt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hr(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;ihn(_,t&&(K(t)?t[P]:t),n,s,r));return}if($t(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&hn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ls(s.component):s.el,o=r?null:i,{i:l,r:c}=e,u=t&&t.r,f=l.refs===le?l.refs={}:l.refs,h=l.setupState,p=Q(h),g=h===le?Ii:_=>Dr(f,_)?!1:se(p,_),b=(_,P)=>!(P&&Dr(f,P));if(u!=null&&u!==c){if(Lr(t),fe(u))f[u]=null,g(u)&&(h[u]=null);else if(ae(u)){const _=t;b(u,_.k)&&(u.value=null),_.k&&(f[_.k]=null)}}if(W(c)){tt();try{Rn(c,l,12,[o,f])}finally{nt()}}else{const _=fe(c),P=ae(c);if(_||P){const O=()=>{if(e.f){const A=_?g(c)?h[c]:f[c]:b()||!e.k?c.value:f[e.k];if(r)K(A)&&Qs(A,i);else if(K(A))A.includes(i)||A.push(i);else if(_)f[c]=[i],g(c)&&(h[c]=f[c]);else{const M=[i];b(c,e.k)&&(c.value=M),e.k&&(f[e.k]=M)}}else _?(f[c]=o,g(c)&&(h[c]=o)):P&&(b(c,e.k)&&(c.value=o),e.k&&(f[e.k]=o))};if(o){const A=()=>{O(),kn.delete(e)};A.id=-1,kn.set(e,A),we(A,n)}else Lr(e),O()}}}function Lr(e){const t=kn.get(e);t&&(t.flags|=8,kn.delete(e))}const Fr=e=>e.nodeType===8;ts().requestIdleCallback;ts().cancelIdleCallback;function Ec(e,t){if(Fr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Fr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const $t=e=>!!e.type.__asyncLoader;function ya(e){W(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let u=null,f,h=0;const p=()=>(h++,u=null,g()),g=()=>{let b;return u||(b=u=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((P,O)=>{c(_,()=>P(p()),()=>O(_),h+1)});throw _}).then(_=>b!==u&&u?u:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),f=_,_)))};return dr({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(b,_,P){let O=!1;(_.bu||(_.bu=[])).push(()=>O=!0);const A=()=>{O||P()},M=i?()=>{const T=i(A,F=>Ec(b,F));T&&(_.bum||(_.bum=[])).push(T)}:A;f?M():g().then(()=>!_.isUnmounted&&M())},get __asyncResolved(){return f},setup(){const b=ve;if(pr(b),f)return()=>Ln(f,b);const _=F=>{u=null,xn(F,b,13,!s)};if(l&&b.suspense||Jt)return g().then(F=>()=>Ln(F,b)).catch(F=>(_(F),()=>s?_e(s,{error:F}):null));const P=Gt(!1),O=Gt(),A=Gt(!!r);let M,T;return gr(()=>{M!=null&&clearTimeout(M),T!=null&&clearTimeout(T)}),r&&(T=setTimeout(()=>{b.isUnmounted||(A.value=!1)},r)),o!=null&&(M=setTimeout(()=>{if(!b.isUnmounted&&!P.value&&!O.value){const F=new Error(`Async component timed out after ${o}ms.`);_(F),O.value=F}},o)),g().then(()=>{b.isUnmounted||(P.value=!0,b.parent&&Tn(b.parent.vnode)&&b.parent.update())}).catch(F=>{if(b.isUnmounted){u=null;return}_(F),O.value=F}),()=>{if(P.value&&f)return Ln(f,b);if(O.value&&s)return _e(s,{error:O.value});if(n&&!A.value)return Ln(n,b)}}})}function Ln(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=_e(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const Tn=e=>e.type.__isKeepAlive;function Sc(e,t){Eo(e,"a",t)}function Cc(e,t){Eo(e,"da",t)}function Eo(e,t,n=ve){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(rs(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Tn(r.parent.vnode)&&Ac(s,t,n,r),r=r.parent}}function Ac(e,t,n,s){const r=rs(t,e,s,!0);gr(()=>{Qs(s[t],r)},n)}function rs(e,t,n=ve,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{tt();const l=Pn(n),c=Be(t,n,e,o);return l(),nt(),c});return s?r.unshift(i):r.push(i),i}}const ht=e=>(t,n=ve)=>{(!Jt||e==="sp")&&rs(e,(...s)=>t(...s),n)},wc=ht("bm"),So=ht("m"),Rc=ht("bu"),Co=ht("u"),Ao=ht("bum"),gr=ht("um"),xc=ht("sp"),Tc=ht("rtg"),Oc=ht("rtc");function Pc(e,t=ve){rs("ec",e,t)}const wo="components";function va(e,t){return xo(wo,e,!0,t)||e}const Ro=Symbol.for("v-ndc");function ba(e){return fe(e)?xo(wo,e,!1)||e:e||Ro}function xo(e,t,n=!0,s=!1){const r=be||ve;if(r){const i=r.type;{const l=_f(i,!1);if(l&&(l===t||l===Te(t)||l===es(Te(t))))return i}const o=Vr(r[e]||i[e],t)||Vr(r.appContext[e],t);return!o&&s?i:o}}function Vr(e,t){return e&&(e[t]||e[Te(t)]||e[es(Te(t))])}function Ea(e,t,n,s){let r;const i=n,o=K(e);if(o||fe(e)){const l=o&&ut(e);let c=!1,u=!1;l&&(c=!Me(e),u=at(e),e=ns(e)),r=new Array(e.length);for(let f=0,h=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,u=l.length;c{const i=s.fn(...r);return i&&(i.key=s.key),i}:s.fn)}return e}function Ca(e,t,n={},s,r){if(be.ce||be.parent&&$t(be.parent)&&be.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),Hs(),Bs(Pe,null,[_e("slot",n,s)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Hs();const o=i&&To(i(n)),l=n.key||o&&o.key,c=Bs(Pe,{key:(l&&!De(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||[],o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),c}function To(e){return e.some(t=>Sn(t)?!(t.type===Se||t.type===Pe&&!To(t.children)):!0)?e:null}const Ls=e=>e?Jo(e)?ls(e):Ls(e.parent):null,dn=pe(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=>Ls(e.parent),$root:e=>Ls(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Po(e),$forceUpdate:e=>e.f||(e.f=()=>{ur(e.update)}),$nextTick:e=>e.n||(e.n=fr.bind(e.proxy)),$watch:e=>gc.bind(e)}),_s=(e,t)=>e!==le&&!e.__isScriptSetup&&se(e,t),Ic={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(_s(s,t))return o[t]=1,s[t];if(r!==le&&se(r,t))return o[t]=2,r[t];if(se(i,t))return o[t]=3,i[t];if(n!==le&&se(n,t))return o[t]=4,n[t];Fs&&(o[t]=0)}}const u=dn[t];let f,h;if(u)return t==="$attrs"&&Ee(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==le&&se(n,t))return o[t]=4,n[t];if(h=c.config.globalProperties,se(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return _s(r,t)?(r[t]=n,!0):s!==le&&se(s,t)?(s[t]=n,!0):se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==le&&l[0]!=="$"&&se(e,l)||_s(t,l)||se(i,l)||se(s,l)||se(dn,l)||se(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jr(e){return K(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Fs=!0;function Nc(e){const t=Po(e),n=e.proxy,s=e.ctx;Fs=!1,t.beforeCreate&&Hr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:u,created:f,beforeMount:h,mounted:p,beforeUpdate:g,updated:b,activated:_,deactivated:P,beforeDestroy:O,beforeUnmount:A,destroyed:M,unmounted:T,render:F,renderTracked:X,renderTriggered:j,errorCaptured:H,serverPrefetch:w,expose:G,inheritAttrs:J,components:N,directives:z,filters:ue}=t;if(u&&Mc(u,s,null),o)for(const q in o){const te=o[q];W(te)&&(s[q]=te.bind(n))}if(r){const q=r.call(n,n);ee(q)&&(e.data=wn(q))}if(Fs=!0,i)for(const q in i){const te=i[q],st=W(te)?te.bind(n,n):W(te.get)?te.get.bind(n,n):et,dt=!W(te)&&W(te.set)?te.set.bind(n):et,Ge=je({get:st,set:dt});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:Oe=>Ge.value=Oe})}if(l)for(const q in l)Oo(l[q],s,n,q);if(c){const q=W(c)?c.call(n):c;Reflect.ownKeys(q).forEach(te=>{Vn(te,q[te])})}f&&Hr(f,e,"c");function ie(q,te){K(te)?te.forEach(st=>q(st.bind(n))):te&&q(te.bind(n))}if(ie(wc,h),ie(So,p),ie(Rc,g),ie(Co,b),ie(Sc,_),ie(Cc,P),ie(Pc,H),ie(Oc,X),ie(Tc,j),ie(Ao,A),ie(gr,T),ie(xc,w),K(G))if(G.length){const q=e.exposed||(e.exposed={});G.forEach(te=>{Object.defineProperty(q,te,{get:()=>n[te],set:st=>n[te]=st,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===et&&(e.render=F),J!=null&&(e.inheritAttrs=J),N&&(e.components=N),z&&(e.directives=z),w&&pr(e)}function Mc(e,t,n=et){K(e)&&(e=Vs(e));for(const s in e){const r=e[s];let i;ee(r)?"default"in r?i=He(r.from||s,r.default,!0):i=He(r.from||s):i=He(r),ae(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Hr(e,t,n){Be(K(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oo(e,t,n,s){let r=s.includes(".")?ho(n,s):()=>n[s];if(fe(e)){const i=t[e];W(i)&&an(r,i)}else if(W(e))an(r,e.bind(n));else if(ee(e))if(K(e))e.forEach(i=>Oo(i,t,n,s));else{const i=W(e.handler)?e.handler.bind(n):t[e.handler];W(i)&&an(r,i,e)}}function Po(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>Gn(c,u,o,!0)),Gn(c,t,o)),ee(t)&&i.set(t,c),c}function Gn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Gn(e,i,n,!0),r&&r.forEach(o=>Gn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Dc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Dc={data:Br,props:Ur,emits:Ur,methods:on,computed:on,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:on,directives:on,watch:Fc,provide:Br,inject:Lc};function Br(e,t){return t?e?function(){return pe(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function Lc(e,t){return on(Vs(e),Vs(t))}function Vs(e){if(K(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Te(t)}Modifiers`]||e[`${Ct(t)}Modifiers`];function Bc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||le;let r=n;const i=t.startsWith("update:"),o=i&&Hc(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>fe(f)?f.trim():f)),o.number&&(r=n.map(Xs)));let l,c=s[l=as(t)]||s[l=as(Te(t))];!c&&i&&(c=s[l=as(Ct(t))]),c&&Be(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Be(u,e,6,r)}}const Uc=new WeakMap;function No(e,t,n=!1){const s=n?Uc:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!W(e)){const c=u=>{const f=No(u,t,!0);f&&(l=!0,pe(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(ee(e)&&s.set(e,null),null):(K(i)?i.forEach(c=>o[c]=null):pe(o,i),ee(e)&&s.set(e,o),o)}function is(e,t){return!e||!Yn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),se(e,t[0].toLowerCase()+t.slice(1))||se(e,Ct(t))||se(e,t))}function Kr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:u,renderCache:f,props:h,data:p,setupState:g,ctx:b,inheritAttrs:_}=e,P=Kn(e);let O,A;try{if(n.shapeFlag&4){const T=r||s,F=T;O=Xe(u.call(F,T,f,h,g,p,b)),A=l}else{const T=t;O=Xe(T.length>1?T(h,{attrs:l,slots:o,emit:c}):T(h,null)),A=t.props?l:Kc(l)}}catch(T){pn.length=0,xn(T,e,1),O=_e(Se)}let M=O;if(A&&_!==!1){const T=Object.keys(A),{shapeFlag:F}=M;T.length&&F&7&&(i&&T.some(Qn)&&(A=kc(A,i)),M=St(M,A,!1,!0))}return n.dirs&&(M=St(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(n.dirs):n.dirs),n.transition&&Dt(M,n.transition),O=M,Kn(P),O}const Kc=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yn(n))&&((t||(t={}))[n]=e[n]);return t},kc=(e,t)=>{const n={};for(const s in e)(!Qn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Gc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?kr(s,o,u):!!o;if(c&8){const f=t.dynamicProps;for(let h=0;hObject.create(Do),Fo=e=>Object.getPrototypeOf(e)===Do;function $c(e,t,n,s=!1){const r={},i=Lo();e.propsDefaults=Object.create(null),Vo(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:so(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function qc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=Q(r),[c]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[p,g]=jo(h,t,!0);pe(o,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return ee(e)&&s.set(e,Kt),Kt;if(K(i))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",_r=e=>K(e)?e.map(Xe):[Xe(e)],zc=(e,t,n)=>{if(t._n)return t;const s=ac((...r)=>_r(t(...r)),n);return s._c=!1,s},Ho=(e,t,n)=>{const s=e._ctx;for(const r in e){if(mr(r))continue;const i=e[r];if(W(i))t[r]=zc(r,i,s);else if(i!=null){const o=_r(i);t[r]=()=>o}}},Bo=(e,t)=>{const n=_r(t);e.slots.default=()=>n},Uo=(e,t,n)=>{for(const s in t)(n||!mr(s))&&(e[s]=t[s])},Yc=(e,t,n)=>{const s=e.slots=Lo();if(e.vnode.shapeFlag&32){const r=t._;r?(Uo(s,t,n),n&&Fi(s,"_",r,!0)):Ho(t,s)}else t&&Bo(e,t)},Qc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=le;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Uo(r,t,n):(i=!t.$stable,Ho(t,r)),o=t}else t&&(Bo(e,t),o={default:1});if(i)for(const l in r)!mr(l)&&o[l]==null&&delete r[l]},we=nf;function Xc(e){return Zc(e)}function Zc(e,t){const n=ts();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:f,parentNode:h,nextSibling:p,setScopeId:g=et,insertStaticContent:b}=e,_=(a,d,m,v=null,S=null,y=null,I=void 0,x=null,R=!!d.dynamicChildren)=>{if(a===d)return;a&&!Pt(a,d)&&(v=E(a),Oe(a,S,y,!0),a=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:C,ref:k,shapeFlag:L}=d;switch(C){case os:P(a,d,m,v);break;case Se:O(a,d,m,v);break;case vs:a==null&&A(d,m,v,I);break;case Pe:N(a,d,m,v,S,y,I,x,R);break;default:L&1?F(a,d,m,v,S,y,I,x,R):L&6?z(a,d,m,v,S,y,I,x,R):(L&64||L&128)&&C.process(a,d,m,v,S,y,I,x,R,B)}k!=null&&S?hn(k,a&&a.ref,y,d||a,!d):k==null&&a&&a.ref!=null&&hn(a.ref,null,y,a,!0)},P=(a,d,m,v)=>{if(a==null)s(d.el=l(d.children),m,v);else{const S=d.el=a.el;d.children!==a.children&&u(S,d.children)}},O=(a,d,m,v)=>{a==null?s(d.el=c(d.children||""),m,v):d.el=a.el},A=(a,d,m,v)=>{[a.el,a.anchor]=b(a.children,d,m,v,a.el,a.anchor)},M=({el:a,anchor:d},m,v)=>{let S;for(;a&&a!==d;)S=p(a),s(a,m,v),a=S;s(d,m,v)},T=({el:a,anchor:d})=>{let m;for(;a&&a!==d;)m=p(a),r(a),a=m;r(d)},F=(a,d,m,v,S,y,I,x,R)=>{if(d.type==="svg"?I="svg":d.type==="math"&&(I="mathml"),a==null)X(d,m,v,S,y,I,x,R);else{const C=a.el&&a.el._isVueCE?a.el:null;try{C&&C._beginPatch(),w(a,d,S,y,I,x,R)}finally{C&&C._endPatch()}}},X=(a,d,m,v,S,y,I,x)=>{let R,C;const{props:k,shapeFlag:L,transition:U,dirs:$}=a;if(R=a.el=o(a.type,y,k&&k.is,k),L&8?f(R,a.children):L&16&&H(a.children,R,null,v,S,ys(a,y),I,x),$&&wt(a,null,v,"created"),j(R,a,a.scopeId,I,v),k){for(const oe in k)oe!=="value"&&!cn(oe)&&i(R,oe,null,k[oe],y,v);"value"in k&&i(R,"value",null,k.value,y),(C=k.onVnodeBeforeMount)&&Je(C,v,a)}$&&wt(a,null,v,"beforeMount");const Z=ef(S,U);Z&&U.beforeEnter(R),s(R,d,m),((C=k&&k.onVnodeMounted)||Z||$)&&we(()=>{try{C&&Je(C,v,a),Z&&U.enter(R),$&&wt(a,null,v,"mounted")}finally{}},S)},j=(a,d,m,v,S)=>{if(m&&g(a,m),v)for(let y=0;y{for(let C=R;C{const x=d.el=a.el;let{patchFlag:R,dynamicChildren:C,dirs:k}=d;R|=a.patchFlag&16;const L=a.props||le,U=d.props||le;let $;if(m&&Rt(m,!1),($=U.onVnodeBeforeUpdate)&&Je($,m,d,a),k&&wt(d,a,m,"beforeUpdate"),m&&Rt(m,!0),C&&(!a.dynamicChildren||a.dynamicChildren.length!==C.length)&&(R=0,I=!1,C=null),(L.innerHTML&&U.innerHTML==null||L.textContent&&U.textContent==null)&&f(x,""),C?G(a.dynamicChildren,C,x,m,v,ys(d,S),y):I||te(a,d,x,null,m,v,ys(d,S),y,!1),R>0){if(R&16)J(x,L,U,m,S);else if(R&2&&L.class!==U.class&&i(x,"class",null,U.class,S),R&4&&i(x,"style",L.style,U.style,S),R&8){const Z=d.dynamicProps;for(let oe=0;oe{$&&Je($,m,d,a),k&&wt(d,a,m,"updated")},v)},G=(a,d,m,v,S,y,I)=>{for(let x=0;x{if(d!==m){if(d!==le)for(const y in d)!cn(y)&&!(y in m)&&i(a,y,d[y],null,S,v);for(const y in m){if(cn(y))continue;const I=m[y],x=d[y];I!==x&&y!=="value"&&i(a,y,x,I,S,v)}"value"in m&&i(a,"value",d.value,m.value,S)}},N=(a,d,m,v,S,y,I,x,R)=>{const C=d.el=a?a.el:l(""),k=d.anchor=a?a.anchor:l("");let{patchFlag:L,dynamicChildren:U,slotScopeIds:$}=d;$&&(x=x?x.concat($):$),a==null?(s(C,m,v),s(k,m,v),H(d.children||[],m,k,S,y,I,x,R)):L>0&&L&64&&U&&a.dynamicChildren&&a.dynamicChildren.length===U.length?(G(a.dynamicChildren,U,m,S,y,I,x),(d.key!=null||S&&d===S.subTree)&&yr(a,d,!0)):te(a,d,m,k,S,y,I,x,R)},z=(a,d,m,v,S,y,I,x,R)=>{d.slotScopeIds=x,a==null?d.shapeFlag&512?S.ctx.activate(d,m,v,I,R):ue(d,m,v,S,y,I,R):Ce(a,d,R)},ue=(a,d,m,v,S,y,I)=>{const x=a.component=hf(a,v,S);if(Tn(a)&&(x.ctx.renderer=B),df(x,!1,I),x.asyncDep){if(S&&S.registerDep(x,ie,I),!a.el){const R=x.subTree=_e(Se);O(null,R,d,m),a.placeholder=R.el}}else ie(x,a,d,m,S,y,I)},Ce=(a,d,m)=>{const v=d.component=a.component;if(Gc(a,d,m))if(v.asyncDep&&!v.asyncResolved){q(v,d,m);return}else v.next=d,v.update();else d.el=a.el,v.vnode=d},ie=(a,d,m,v,S,y,I)=>{const x=()=>{if(a.isMounted){let{next:L,bu:U,u:$,parent:Z,vnode:oe}=a;{const $e=Ko(a);if($e){L&&(L.el=oe.el,q(a,L,I)),$e.asyncDep.then(()=>{we(()=>{a.isUnmounted||C()},S)});return}}let re=L,de;Rt(a,!1),L?(L.el=oe.el,q(a,L,I)):L=oe,U&&Fn(U),(de=L.props&&L.props.onVnodeBeforeUpdate)&&Je(de,Z,L,oe),Rt(a,!0);const ye=Kr(a),We=a.subTree;a.subTree=ye,_(We,ye,h(We.el),E(We),a,S,y),L.el=ye.el,re===null&&Wc(a,ye.el),$&&we($,S),(de=L.props&&L.props.onVnodeUpdated)&&we(()=>Je(de,Z,L,oe),S)}else{let L;const{el:U,props:$}=d,{bm:Z,m:oe,parent:re,root:de,type:ye}=a,We=$t(d);Rt(a,!1),Z&&Fn(Z),!We&&(L=$&&$.onVnodeBeforeMount)&&Je(L,re,d),Rt(a,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(ye,a.parent?a.parent.type:void 0);const $e=a.subTree=Kr(a);_(null,$e,m,v,a,S,y),d.el=$e.el}if(oe&&we(oe,S),!We&&(L=$&&$.onVnodeMounted)){const $e=d;we(()=>Je(L,re,$e),S)}(d.shapeFlag&256||re&&$t(re.vnode)&&re.vnode.shapeFlag&256)&&a.a&&we(a.a,S),a.isMounted=!0,d=m=v=null}};a.scope.on();const R=a.effect=new ki(x);a.scope.off();const C=a.update=R.run.bind(R),k=a.job=R.runIfDirty.bind(R);k.i=a,k.id=a.uid,R.scheduler=()=>ur(k),Rt(a,!0),C()},q=(a,d,m)=>{d.component=a;const v=a.vnode.props;a.vnode=d,a.next=null,qc(a,d.props,v,m),Qc(a,d.children,m),tt(),Pr(a),nt()},te=(a,d,m,v,S,y,I,x,R=!1)=>{const C=a&&a.children,k=a?a.shapeFlag:0,L=d.children,{patchFlag:U,shapeFlag:$}=d;if(U>0){if(U&128){dt(C,L,m,v,S,y,I,x,R);return}else if(U&256){st(C,L,m,v,S,y,I,x,R);return}}$&8?(k&16&&Le(C,S,y),L!==C&&f(m,L)):k&16?$&16?dt(C,L,m,v,S,y,I,x,R):Le(C,S,y,!0):(k&8&&f(m,""),$&16&&H(L,m,v,S,y,I,x,R))},st=(a,d,m,v,S,y,I,x,R)=>{a=a||Kt,d=d||Kt;const C=a.length,k=d.length,L=Math.min(C,k);let U;for(U=0;Uk?Le(a,S,y,!0,!1,L):H(d,m,v,S,y,I,x,R,L)},dt=(a,d,m,v,S,y,I,x,R)=>{let C=0;const k=d.length;let L=a.length-1,U=k-1;for(;C<=L&&C<=U;){const $=a[C],Z=d[C]=R?lt(d[C]):Xe(d[C]);if(Pt($,Z))_($,Z,m,null,S,y,I,x,R);else break;C++}for(;C<=L&&C<=U;){const $=a[L],Z=d[U]=R?lt(d[U]):Xe(d[U]);if(Pt($,Z))_($,Z,m,null,S,y,I,x,R);else break;L--,U--}if(C>L){if(C<=U){const $=U+1,Z=$U)for(;C<=L;)Oe(a[C],S,y,!0),C++;else{const $=C,Z=C,oe=new Map;for(C=Z;C<=U;C++){const Ie=d[C]=R?lt(d[C]):Xe(d[C]);Ie.key!=null&&oe.set(Ie.key,C)}let re,de=0;const ye=U-Z+1;let We=!1,$e=0;const Xt=new Array(ye);for(C=0;C=ye){Oe(Ie,S,y,!0);continue}let qe;if(Ie.key!=null)qe=oe.get(Ie.key);else for(re=Z;re<=U;re++)if(Xt[re-Z]===0&&Pt(Ie,d[re])){qe=re;break}qe===void 0?Oe(Ie,S,y,!0):(Xt[qe-Z]=C+1,qe>=$e?$e=qe:We=!0,_(Ie,d[qe],m,null,S,y,I,x,R),de++)}const Cr=We?tf(Xt):Kt;for(re=Cr.length-1,C=ye-1;C>=0;C--){const Ie=Z+C,qe=d[Ie],Ar=d[Ie+1],wr=Ie+1{const{el:y,type:I,transition:x,children:R,shapeFlag:C}=a;if(C&6){Ge(a.component.subTree,d,m,v);return}if(C&128){a.suspense.move(d,m,v);return}if(C&64){I.move(a,d,m,B);return}if(I===Pe){s(y,d,m);for(let L=0;Lx.enter(y),S));else{const{leave:L,delayLeave:U,afterLeave:$}=x,Z=()=>{a.ctx.isUnmounted?r(y):s(y,d,m)},oe=()=>{const re=y._isLeaving||!!y[Ve];y._isLeaving&&y[Ve](!0),x.persisted&&!re?Z():L(y,()=>{Z(),$&&$()})};U?U(y,Z,oe):oe()}else s(y,d,m)},Oe=(a,d,m,v=!1,S=!1)=>{const{type:y,props:I,ref:x,children:R,dynamicChildren:C,shapeFlag:k,patchFlag:L,dirs:U,cacheIndex:$,memo:Z}=a;if(L===-2&&(S=!1),x!=null&&(tt(),hn(x,null,m,a,!0),nt()),$!=null&&(d.renderCache[$]=void 0),k&256){d.ctx.deactivate(a);return}const oe=k&1&&U,re=!$t(a);let de;if(re&&(de=I&&I.onVnodeBeforeUnmount)&&Je(de,d,a),k&6)At(a.component,m,v);else{if(k&128){a.suspense.unmount(m,v);return}oe&&wt(a,null,d,"beforeUnmount"),k&64?a.type.remove(a,d,m,B,v):C&&!C.hasOnce&&(y!==Pe||L>0&&L&64)?Le(C,d,m,!1,!0):(y===Pe&&L&384||!S&&k&16)&&Le(R,d,m),v&&Lt(a)}const ye=Z!=null&&$==null;(re&&(de=I&&I.onVnodeUnmounted)||oe||ye)&&we(()=>{de&&Je(de,d,a),oe&&wt(a,null,d,"unmounted"),ye&&(a.el=null)},m)},Lt=a=>{const{type:d,el:m,anchor:v,transition:S}=a;if(d===Pe){Ft(m,v);return}if(d===vs){T(a);return}const y=()=>{r(m),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(a.shapeFlag&1&&S&&!S.persisted){const{leave:I,delayLeave:x}=S,R=()=>I(m,y);x?x(a.el,y,R):R()}else y()},Ft=(a,d)=>{let m;for(;a!==d;)m=p(a),r(a),a=m;r(d)},At=(a,d,m)=>{const{bum:v,scope:S,job:y,subTree:I,um:x,m:R,a:C}=a;Wr(R),Wr(C),v&&Fn(v),S.stop(),y&&(y.flags|=8,Oe(I,a,d,m)),x&&we(x,d),we(()=>{a.isUnmounted=!0},d)},Le=(a,d,m,v=!1,S=!1,y=0)=>{for(let I=y;I{if(a.shapeFlag&6)return E(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=p(a.anchor||a.el),m=d&&d[po];return m?p(m):d};let V=!1;const D=(a,d,m)=>{let v;a==null?d._vnode&&(Oe(d._vnode,null,null,!0),v=d._vnode.component):_(d._vnode||null,a,d,null,null,null,m),d._vnode=a,V||(V=!0,Pr(v),fo(),V=!1)},B={p:_,um:Oe,m:Ge,r:Lt,mt:ue,mc:H,pc:te,pbc:G,n:E,o:e};return{render:D,hydrate:void 0,createApp:jc(D)}}function ys({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 Rt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ef(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yr(e,t,n=!1){const s=e.children,r=t.children;if(K(s)&&K(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ko(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ko(t)}function Wr(e){if(e)for(let t=0;te.__isSuspense;function nf(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):uc(e)}const Pe=Symbol.for("v-fgt"),os=Symbol.for("v-txt"),Se=Symbol.for("v-cmt"),vs=Symbol.for("v-stc"),pn=[];let Ne=null;function Hs(e=!1){pn.push(Ne=e?null:[])}function sf(){pn.pop(),Ne=pn[pn.length-1]||null}let En=1;function Wn(e,t=!1){En+=e,e<0&&Ne&&t&&(Ne.hasOnce=!0)}function Wo(e){return e.dynamicChildren=En>0?Ne||Kt:null,sf(),En>0&&Ne&&Ne.push(e),e}function Aa(e,t,n,s,r,i){return Wo(qo(e,t,n,s,r,i,!0))}function Bs(e,t,n,s,r){return Wo(_e(e,t,n,s,r,!0))}function Sn(e){return e?e.__v_isVNode===!0:!1}function Pt(e,t){return e.type===t.type&&e.key===t.key}const $o=({key:e})=>e??null,jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||ae(e)||W(e)?{i:be,r:e,k:t,f:!!n}:e:null);function qo(e,t=null,n=null,s=0,r=null,i=e===Pe?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$o(t),ref:t&&jn(t),scopeId:ao,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:be};return l?($n(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),En>0&&!o&&Ne&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ne.push(c),c}const _e=rf;function rf(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Ro)&&(e=Se),Sn(e)){const l=St(e,t,!0);return n&&$n(l,n),En>0&&!i&&Ne&&(l.shapeFlag&6?Ne[Ne.indexOf(e)]=l:Ne.push(l)),l.patchFlag=-2,l}if(yf(e)&&(e=e.__vccOpts),t){t=of(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=er(l)),ee(c)&&(ss(c)&&!K(c)&&(c=pe({},c)),t.style=Zs(c))}const o=fe(e)?1:Go(e)?128:go(e)?64:ee(e)?4:W(e)?2:0;return qo(e,t,n,s,r,o,i,!0)}function of(e){return e?ss(e)||Fo(e)?pe({},e):e:null}function St(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,u=t?ff(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&$o(u),ref:t&&t.ref?n&&i?K(i)?i.concat(jn(t)):[i,jn(t)]:jn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&St(e.ssContent),ssFallback:e.ssFallback&&St(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Dt(f,c.clone(f)),f}function lf(e=" ",t=0){return _e(os,null,e,t)}function cf(e="",t=!1){return t?(Hs(),Bs(Se,null,e)):_e(Se,null,e)}function Xe(e){return e==null||typeof e=="boolean"?_e(Se):K(e)?_e(Pe,null,e.slice()):Sn(e)?lt(e):_e(os,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:St(e)}function $n(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),$n(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Fo(t)?t._ctx=be:r===3&&be&&(be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(W(t)){if(s&65){$n(e,{default:t});return}t={default:t,_ctx:be},n=32}else t=String(t),s&64?(n=16,t=[lf(t)]):n=8;e.children=t,e.shapeFlag|=n}function ff(...e){const t={};for(let n=0;nve||be;let qn,Us;{const e=ts(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};qn=t("__VUE_INSTANCE_SETTERS__",n=>ve=n),Us=t("__VUE_SSR_SETTERS__",n=>Jt=n)}const Pn=e=>{const t=ve;return qn(e),e.scope.on(),()=>{e.scope.off(),qn(t)}},$r=()=>{ve&&ve.scope.off(),qn(null)};function Jo(e){return e.vnode.shapeFlag&4}let Jt=!1;function df(e,t=!1,n=!1){t&&Us(t);const{props:s,children:r}=e.vnode,i=Jo(e);$c(e,s,i,t),Yc(e,r,n||t);const o=i?pf(e,t):void 0;return t&&Us(!1),o}function pf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ic);const{setup:s}=n;if(s){tt();const r=e.setupContext=s.length>1?mf(e):null,i=Pn(e),o=Rn(s,e,0,[e.props,r]),l=Mi(o);if(nt(),i(),(l||e.sp)&&!$t(e)&&pr(e),l){if(o.then($r,$r),t)return o.then(c=>{qr(e,c)}).catch(c=>{xn(c,e,0)});e.asyncDep=o}else qr(e,o)}else zo(e)}function qr(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ee(t)&&(e.setupState=io(t)),zo(e)}function zo(e,t,n){const s=e.type;e.render||(e.render=s.render||et);{const r=Pn(e);tt();try{Nc(e)}finally{nt(),r()}}}const gf={get(e,t){return Ee(e,"get",""),e[t]}};function mf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,gf),slots:e.slots,emit:e.emit,expose:t}}function ls(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(io(cr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in dn)return dn[n](e)},has(t,n){return n in t||n in dn}})):e.proxy}function _f(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}function yf(e){return W(e)&&"__vccOpts"in e}const je=(e,t)=>ic(e,t,Jt);function vr(e,t,n){try{Wn(-1);const s=arguments.length;return s===2?ee(t)&&!K(t)?Sn(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Sn(n)&&(n=[n]),_e(e,t,n))}finally{Wn(1)}}const vf="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ks;const Jr=typeof window<"u"&&window.trustedTypes;if(Jr)try{Ks=Jr.createPolicy("vue",{createHTML:e=>e})}catch{}const Yo=Ks?e=>Ks.createHTML(e):e=>e,bf="http://www.w3.org/2000/svg",Ef="http://www.w3.org/1998/Math/MathML",ot=typeof document<"u"?document:null,zr=ot&&ot.createElement("template"),Sf={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 r=t==="svg"?ot.createElementNS(bf,e):t==="mathml"?ot.createElementNS(Ef,e):n?ot.createElement(e,{is:n}):ot.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ot.createTextNode(e),createComment:e=>ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{zr.innerHTML=Yo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=zr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pt="transition",tn="animation",zt=Symbol("_vtc"),Qo={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},Xo=pe({},_o,Qo),Cf=e=>(e.displayName="Transition",e.props=Xo,e),wa=Cf((e,{slots:t})=>vr(bc,Zo(e),t)),xt=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yr=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function Zo(e){const t={};for(const N in e)N in Qo||(t[N]=e[N]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:f=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,b=Af(r),_=b&&b[0],P=b&&b[1],{onBeforeEnter:O,onEnter:A,onEnterCancelled:M,onLeave:T,onLeaveCancelled:F,onBeforeAppear:X=O,onAppear:j=A,onAppearCancelled:H=M}=t,w=(N,z,ue,Ce)=>{N._enterCancelled=Ce,_t(N,z?f:l),_t(N,z?u:o),ue&&ue()},G=(N,z)=>{N._isLeaving=!1,_t(N,h),_t(N,g),_t(N,p),z&&z()},J=N=>(z,ue)=>{const Ce=N?j:A,ie=()=>w(z,N,ue);xt(Ce,[z,ie]),Qr(()=>{_t(z,N?c:i),ze(z,N?f:l),Yr(Ce)||Xr(z,s,_,ie)})};return pe(t,{onBeforeEnter(N){xt(O,[N]),ze(N,i),ze(N,o)},onBeforeAppear(N){xt(X,[N]),ze(N,c),ze(N,u)},onEnter:J(!1),onAppear:J(!0),onLeave(N,z){N._isLeaving=!0;const ue=()=>G(N,z);ze(N,h),N._enterCancelled?(ze(N,p),ks(N)):(ks(N),ze(N,p)),Qr(()=>{N._isLeaving&&(_t(N,h),ze(N,g),Yr(T)||Xr(N,s,P,ue))}),xt(T,[N,ue])},onEnterCancelled(N){w(N,!1,void 0,!0),xt(M,[N])},onAppearCancelled(N){w(N,!0,void 0,!0),xt(H,[N])},onLeaveCancelled(N){G(N),xt(F,[N])}})}function Af(e){if(e==null)return null;if(ee(e))return[bs(e.enter),bs(e.leave)];{const t=bs(e);return[t,t]}}function bs(e){return Al(e)}function ze(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[zt]||(e[zt]=new Set)).add(t)}function _t(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[zt];n&&(n.delete(t),n.size||(e[zt]=void 0))}function Qr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let wf=0;function Xr(e,t,n,s){const r=e._endId=++wf,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=el(e,t);if(!o)return s();const u=o+"end";let f=0;const h=()=>{e.removeEventListener(u,p),i()},p=g=>{g.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[b]||"").split(", "),r=s(`${pt}Delay`),i=s(`${pt}Duration`),o=Zr(r,i),l=s(`${tn}Delay`),c=s(`${tn}Duration`),u=Zr(l,c);let f=null,h=0,p=0;t===pt?o>0&&(f=pt,h=o,p=i.length):t===tn?u>0&&(f=tn,h=u,p=c.length):(h=Math.max(o,u),f=h>0?o>u?pt:tn:null,p=f?f===pt?i.length:c.length:0);const g=f===pt&&/\b(?:transform|all)(?:,|$)/.test(s(`${pt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:g}}function Zr(e,t){for(;e.lengthei(n)+ei(e[s])))}function ei(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ks(e){return(e?e.ownerDocument:document).body.offsetHeight}function Rf(e,t,n){const s=e[zt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jn=Symbol("_vod"),br=Symbol("_vsh"),Ra={name:"show",beforeMount(e,{value:t},{transition:n}){e[Jn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):nn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),nn(e,!0),s.enter(e)):s.leave(e,()=>{nn(e,!1)}):nn(e,t))},beforeUnmount(e,{value:t}){nn(e,t)}};function nn(e,t){e.style.display=t?e[Jn]:"none",e[br]=!t}const xf=Symbol(""),Tf=/(?:^|;)\s*display\s*:/;function Of(e,t,n){const s=e.style,r=fe(n);let i=!1;if(n&&!r){if(t)if(fe(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&ln(s,l,"")}else for(const o in t)n[o]==null&&ln(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?If(e,o,!fe(t)&&t?t[o]:void 0,l)||ln(s,o,l):ln(s,o,"")}}else if(r){if(t!==n){const o=s[xf];o&&(n+=";"+o),s.cssText=n,i=Tf.test(n)}}else t&&e.removeAttribute("style");Jn in e&&(e[Jn]=i?s.display:"",e[br]&&(s.display="none"))}const ti=/\s*!important$/;function ln(e,t,n){if(K(n))n.forEach(s=>ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Pf(e,t);ti.test(n)?e.setProperty(Ct(s),n.replace(ti,""),"important"):e[s]=n}}const ni=["Webkit","Moz","ms"],Es={};function Pf(e,t){const n=Es[t];if(n)return n;let s=Te(t);if(s!=="filter"&&s in e)return Es[t]=s;s=es(s);for(let r=0;rSs||(Vf.then(()=>Ss=0),Ss=Date.now());function Hf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(K(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Bf=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Rf(e,s,o):t==="style"?Of(e,n,s):Yn(t)?Qn(t)||Mf(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uf(e,t,s,o))?(ii(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ri(e,t,s,o,i,t!=="value")):e._isVueCE&&(Kf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!fe(s)))?ii(e,Te(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),ri(e,t,s,o))};function Uf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&li(t)&&W(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return li(t)&&fe(n)?!1:t in e}function Kf(e,t){const n=e._def.props;if(!n)return!1;const s=Te(t);return Array.isArray(n)?n.some(r=>Te(r)===s):Object.keys(n).some(r=>Te(r)===s)}const tl=new WeakMap,nl=new WeakMap,zn=Symbol("_moveCb"),ci=Symbol("_enterCb"),kf=e=>(delete e.props.mode,e),Gf=kf({name:"TransitionGroup",props:pe({},Xo,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=On(),s=mo();let r,i;return Co(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!Jf(r[0].el,n.vnode.el,o)){r=[];return}r.forEach(Wf),r.forEach($f);const l=r.filter(qf);ks(n.vnode.el),l.forEach(c=>{const u=c.el,f=u.style;ze(u,o),f.transform=f.webkitTransform=f.transitionDuration="";const h=u[zn]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",h),u[zn]=null,_t(u,o))};u.addEventListener("transitionend",h)}),r=[]}),()=>{const o=Q(e),l=Zo(o);let c=o.tag||Pe;if(r=[],i)for(let u=0;u{l.split(/\s+/).forEach(c=>c&&s.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(s);const{hasTransform:o}=el(s);return i.removeChild(s),o}const fi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>Fn(t,n):t};function zf(e){e.target.composing=!0}function ui(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Cs=Symbol("_assign");function ai(e,t,n){return t&&(e=e.trim()),n&&(e=Xs(e)),e}const Ta={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Cs]=fi(r);const i=s||r.props&&r.props.type==="number";Bt(e,t?"change":"input",o=>{o.target.composing||e[Cs](ai(e.value,n,i))}),(n||i)&&Bt(e,"change",()=>{e.value=ai(e.value,n,i)}),t||(Bt(e,"compositionstart",zf),Bt(e,"compositionend",ui),Bt(e,"change",ui))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[Cs]=fi(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Xs(e.value):e.value,c=t??"";if(l===c)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Yf=["ctrl","shift","alt","meta"],Qf={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)=>Yf.some(n=>e[`${n}Key`]&&!t.includes(n))},Oa=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Ct(r.key);if(t.some(o=>o===i||Xf[o]===i))return e(r)})},Zf=pe({patchProp:Bf},Sf);let hi;function eu(){return hi||(hi=Xc(Zf))}const Ia=(...e)=>{const t=eu().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=nu(s);if(!r)return;const i=t._component;!W(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,tu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function tu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function nu(e){return fe(e)?document.querySelector(e):e}/*! + * pinia v3.0.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let rl;const cs=e=>rl=e,il=Symbol();function Gs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var gn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(gn||(gn={}));function Na(){const e=Ui(!0),t=e.run(()=>Gt({}));let n=[],s=[];const r=cr({install(i){cs(r),r._a=i,i.provide(il,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const ol=()=>{};function di(e,t,n,s=ol){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&Ki()&&Ml(r),r}function jt(e,...t){e.forEach(n=>{n(...t)})}const su=e=>e(),pi=Symbol(),As=Symbol();function Ws(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Gs(r)&&Gs(s)&&e.hasOwnProperty(n)&&!ae(s)&&!ut(s)?e[n]=Ws(r,s):e[n]=s}return e}const ru=Symbol();function iu(e){return!Gs(e)||!Object.prototype.hasOwnProperty.call(e,ru)}const{assign:yt}=Object;function ou(e){return!!(ae(e)&&e.effect)}function lu(e,t,n,s){const{state:r,actions:i,getters:o}=t,l=n.state.value[e];let c;function u(){l||(n.state.value[e]=r?r():{});const f=tc(n.state.value[e]);return yt(f,i,Object.keys(o||{}).reduce((h,p)=>(h[p]=cr(je(()=>{cs(n);const g=n._s.get(e);return o[p].call(g,g)})),h),{}))}return c=ll(e,u,t,n,s,!0),c}function ll(e,t,n={},s,r,i){let o;const l=yt({actions:{}},n),c={deep:!0};let u,f,h=new Set,p=new Set,g;const b=s.state.value[e];!i&&!b&&(s.state.value[e]={});let _;function P(H){let w;u=f=!1,typeof H=="function"?(H(s.state.value[e]),w={type:gn.patchFunction,storeId:e,events:g}):(Ws(s.state.value[e],H),w={type:gn.patchObject,payload:H,storeId:e,events:g});const G=_=Symbol();fr().then(()=>{_===G&&(u=!0)}),f=!0,jt(h,w,s.state.value[e])}const O=i?function(){const{state:w}=n,G=w?w():{};this.$patch(J=>{yt(J,G)})}:ol;function A(){o.stop(),h.clear(),p.clear(),s._s.delete(e)}const M=(H,w="")=>{if(pi in H)return H[As]=w,H;const G=function(){cs(s);const J=Array.from(arguments),N=new Set,z=new Set;function ue(q){N.add(q)}function Ce(q){z.add(q)}jt(p,{args:J,name:G[As],store:F,after:ue,onError:Ce});let ie;try{ie=H.apply(this&&this.$id===e?this:F,J)}catch(q){throw jt(z,q),q}return ie instanceof Promise?ie.then(q=>(jt(N,q),q)).catch(q=>(jt(z,q),Promise.reject(q))):(jt(N,ie),ie)};return G[pi]=!0,G[As]=w,G},T={_p:s,$id:e,$onAction:di.bind(null,p),$patch:P,$reset:O,$subscribe(H,w={}){const G=di(h,H,w.detached,()=>J()),J=o.run(()=>an(()=>s.state.value[e],N=>{(w.flush==="sync"?f:u)&&H({storeId:e,type:gn.direct,events:g},N)},yt({},c,w)));return G},$dispose:A},F=wn(T);s._s.set(e,F);const j=(s._a&&s._a.runWithContext||su)(()=>s._e.run(()=>(o=Ui()).run(()=>t({action:M}))));for(const H in j){const w=j[H];if(ae(w)&&!ou(w)||ut(w))i||(b&&iu(w)&&(ae(w)?w.value=b[H]:Ws(w,b[H])),s.state.value[e][H]=w);else if(typeof w=="function"){const G=M(w,H);j[H]=G,l.actions[H]=w}}return yt(F,j),yt(Q(F),j),Object.defineProperty(F,"$state",{get:()=>s.state.value[e],set:H=>{P(w=>{yt(w,H)})}}),s._p.forEach(H=>{yt(F,o.run(()=>H({store:F,app:s._a,pinia:s,options:l})))}),b&&i&&n.hydrate&&n.hydrate(F.$state,b),u=!0,f=!0,F}/*! #__NO_SIDE_EFFECTS__ */function Ma(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function i(o,l){const c=hc();return o=o||(c?He(il,null):null),o&&cs(o),o=rl,o._s.has(e)||(r?ll(e,t,s,o):lu(e,s,o)),o._s.get(e)}return i.$id=e,i}function Da(e,t){return Array.isArray(t)?t.reduce((n,s)=>(n[s]=function(){return e(this.$pinia)[s]},n),{}):Object.keys(t).reduce((n,s)=>(n[s]=function(){const r=e(this.$pinia),i=t[s];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function La(e,t){return Array.isArray(t)?t.reduce((n,s)=>(n[s]=function(...r){return e(this.$pinia)[s](...r)},n),{}):Object.keys(t).reduce((n,s)=>(n[s]=function(...r){return e(this.$pinia)[t[s]](...r)},n),{})}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Ut=typeof document<"u";function cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function cu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cl(e.default)}const ne=Object.assign;function ws(e,t){const n={};for(const s in t){const r=t[s];n[s]=ke(r)?r.map(e):e(r)}return n}const mn=()=>{},ke=Array.isArray;function gi(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const fl=/#/g,fu=/&/g,uu=/\//g,au=/=/g,hu=/\?/g,ul=/\+/g,du=/%5B/g,pu=/%5D/g,al=/%5E/g,gu=/%60/g,hl=/%7B/g,mu=/%7C/g,dl=/%7D/g,_u=/%20/g;function Er(e){return e==null?"":encodeURI(""+e).replace(mu,"|").replace(du,"[").replace(pu,"]")}function yu(e){return Er(e).replace(hl,"{").replace(dl,"}").replace(al,"^")}function $s(e){return Er(e).replace(ul,"%2B").replace(_u,"+").replace(fl,"%23").replace(fu,"%26").replace(gu,"`").replace(hl,"{").replace(dl,"}").replace(al,"^")}function vu(e){return $s(e).replace(au,"%3D")}function bu(e){return Er(e).replace(fl,"%23").replace(hu,"%3F")}function Eu(e){return bu(e).replace(uu,"%2F")}function Cn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Su=/\/$/,Cu=e=>e.replace(Su,"");function Rs(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),i=t.slice(c,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=xu(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:Cn(o)}}function Au(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function mi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function wu(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Yt(t.matched[s],n.matched[r])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Yt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ru(e[n],t[n]))return!1;return!0}function Ru(e,t){return ke(e)?_i(e,t):ke(t)?_i(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function _i(e,t){return ke(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function xu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let qs=function(e){return e.pop="pop",e.push="push",e}({}),xs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Tu(e){if(!e)if(Ut){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Cu(e)}const Ou=/^[^#]+#/;function Pu(e,t){return e.replace(Ou,"#")+t}function Iu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const fs=()=>({left:window.scrollX,top:window.scrollY});function Nu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Iu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function yi(e,t){return(history.state?history.state.position-t:-1)+e}const Js=new Map;function Mu(e,t){Js.set(e,t)}function Du(e){const t=Js.get(e);return Js.delete(e),t}function Lu(e){return typeof e=="string"||e&&typeof e=="object"}function gl(e){return typeof e=="string"||typeof e=="symbol"}let he=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const ml=Symbol("");he.MATCHER_NOT_FOUND+"",he.NAVIGATION_GUARD_REDIRECT+"",he.NAVIGATION_ABORTED+"",he.NAVIGATION_CANCELLED+"",he.NAVIGATION_DUPLICATED+"";function Qt(e,t){return ne(new Error,{type:e,[ml]:!0},t)}function it(e,t){return e instanceof Error&&ml in e&&(t==null||!!(e.type&t))}const Fu=["params","query","hash"];function Vu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Fu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ju(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&$s(r)):[s&&$s(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Hu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ke(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Bu=Symbol(""),bi=Symbol(""),us=Symbol(""),Sr=Symbol(""),zs=Symbol("");function sn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function bt(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const u=p=>{p===!1?c(Qt(he.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Lu(p)?c(Qt(he.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(o&&s.enterCallbacks[r]===o&&typeof p=="function"&&o.push(p),l())},f=i(()=>e.call(s&&s.instances[r],t,n,u));let h=Promise.resolve(f);e.length<3&&(h=h.then(u)),h.catch(p=>c(p))})}function Ts(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let c=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(cl(c)){const u=(c.__vccOpts||c)[t];u&&i.push(bt(u,n,s,o,l,r))}else{let u=c();i.push(()=>u.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${o.path}"`);const h=cu(f)?f.default:f;o.mods[l]=f,o.components[l]=h;const p=(h.__vccOpts||h)[t];return p&&bt(p,n,s,o,l,r)()}))}}return i}function Uu(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oYt(u,l))?s.push(l):n.push(l));const c=e.matched[o];c&&(t.matched.find(u=>Yt(u,c))||r.push(c))}return[n,s,r]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Ku=()=>location.protocol+"//"+location.host;function _l(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),mi(l,"")}return mi(n,e)+s+r}function ku(e,t,n,s){let r=[],i=[],o=null;const l=({state:p})=>{const g=_l(e,location),b=n.value,_=t.value;let P=0;if(p){if(n.value=g,t.value=p,o&&o===b){o=null;return}P=_?p.position-_.position:0}else s(g);r.forEach(O=>{O(n.value,b,{delta:P,type:qs.pop,direction:P?P>0?xs.forward:xs.back:xs.unknown})})};function c(){o=n.value}function u(p){r.push(p);const g=()=>{const b=r.indexOf(p);b>-1&&r.splice(b,1)};return i.push(g),g}function f(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ne({},p.state,{scroll:fs()}),"")}}function h(){for(const p of i)p();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:c,listen:u,destroy:h}}function Ei(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?fs():null}}function Gu(e){const{history:t,location:n}=window,s={value:_l(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,u,f){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:Ku()+e+c;try{t[f?"replaceState":"pushState"](u,"",p),r.value=u}catch(g){console.error(g),n[f?"replace":"assign"](p)}}function o(c,u){i(c,ne({},t.state,Ei(r.value.back,c,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=c}function l(c,u){const f=ne({},r.value,t.state,{forward:c,scroll:fs()});i(f.current,f,!0),i(c,ne({},Ei(s.value,c,null),{position:f.position+1},u),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function Fa(e){e=Tu(e);const t=Gu(e),n=ku(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=ne({location:"",base:e,go:s,createHref:Pu.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let It=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var ge=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(ge||{});const Wu={type:It.Static,value:""},$u=/[a-zA-Z0-9_]/;function qu(e){if(!e)return[[]];if(e==="/")return[[Wu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=ge.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,u="",f="";function h(){u&&(n===ge.Static?i.push({type:It.Static,value:u}):n===ge.Param||n===ge.ParamRegExp||n===ge.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:It.Param,value:u,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=c}for(;lt.length?t.length===1&&t[0]===Re.Static+Re.Segment?1:-1:0}function yl(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Xu={strict:!1,end:!0,sensitive:!1};function Zu(e,t,n){const s=Yu(qu(e.path),n),r=ne(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function ea(e,t){const n=[],s=new Map;t=gi(Xu,t);function r(h){return s.get(h)}function i(h,p,g){const b=!g,_=wi(h);_.aliasOf=g&&g.record;const P=gi(t,h),O=[_];if("alias"in h){const T=typeof h.alias=="string"?[h.alias]:h.alias;for(const F of T)O.push(wi(ne({},_,{components:g?g.record.components:_.components,path:F,aliasOf:g?g.record:_})))}let A,M;for(const T of O){const{path:F}=T;if(p&&F[0]!=="/"){const X=p.record.path,j=X[X.length-1]==="/"?"":"/";T.path=p.record.path+(F&&j+F)}if(A=Zu(T,p,P),g?g.alias.push(A):(M=M||A,M!==A&&M.alias.push(A),b&&h.name&&!Ri(A)&&o(h.name)),vl(A)&&c(A),_.children){const X=_.children;for(let j=0;j{o(M)}:mn}function o(h){if(gl(h)){const p=s.get(h);p&&(s.delete(h),n.splice(n.indexOf(p),1),p.children.forEach(o),p.alias.forEach(o))}else{const p=n.indexOf(h);p>-1&&(n.splice(p,1),h.record.name&&s.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function l(){return n}function c(h){const p=sa(h,n);n.splice(p,0,h),h.record.name&&!Ri(h)&&s.set(h.record.name,h)}function u(h,p){let g,b={},_,P;if("name"in h&&h.name){if(g=s.get(h.name),!g)throw Qt(he.MATCHER_NOT_FOUND,{location:h});P=g.record.name,b=ne(Ai(p.params,g.keys.filter(M=>!M.optional).concat(g.parent?g.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),h.params&&Ai(h.params,g.keys.map(M=>M.name))),_=g.stringify(b)}else if(h.path!=null)_=h.path,g=n.find(M=>M.re.test(_)),g&&(b=g.parse(_),P=g.record.name);else{if(g=p.name?s.get(p.name):n.find(M=>M.re.test(p.path)),!g)throw Qt(he.MATCHER_NOT_FOUND,{location:h,currentLocation:p});P=g.record.name,b=ne({},p.params,h.params),_=g.stringify(b)}const O=[];let A=g;for(;A;)O.unshift(A.record),A=A.parent;return{name:P,path:_,params:b,matched:O,meta:na(O)}}e.forEach(h=>i(h));function f(){n.length=0,s.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:f,getRoutes:l,getRecordMatcher:r}}function Ai(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function wi(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ta(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ta(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Ri(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function na(e){return e.reduce((t,n)=>ne(t,n.meta),{})}function sa(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;yl(e,t[i])<0?s=i:n=i+1}const r=ra(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function ra(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function xi(e){const t=He(us),n=He(Sr),s=je(()=>{const c=Et(e.to);return t.resolve(c)}),r=je(()=>{const{matched:c}=s.value,{length:u}=c,f=c[u-1],h=n.matched;if(!f||!h.length)return-1;const p=h.findIndex(Yt.bind(null,f));if(p>-1)return p;const g=Ti(c[u-2]);return u>1&&Ti(f)===g&&h[h.length-1].path!==g?h.findIndex(Yt.bind(null,c[u-2])):p}),i=je(()=>r.value>-1&&fa(n.params,s.value.params)),o=je(()=>r.value>-1&&r.value===n.matched.length-1&&pl(n.params,s.value.params));function l(c={}){if(ca(c)){const u=t[Et(e.replace)?"replace":"push"](Et(e.to)).catch(mn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:je(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function ia(e){return e.length===1?e[0]:e}const oa=dr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:xi,setup(e,{slots:t}){const n=wn(xi(e)),{options:s}=He(us),r=je(()=>({[Oi(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Oi(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&ia(t.default(n));return e.custom?i:vr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),la=oa;function ca(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fa(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!ke(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Ti(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Oi=(e,t,n)=>e??t??n,ua=dr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=He(zs),r=je(()=>e.route||s.value),i=He(bi,0),o=je(()=>{let u=Et(i);const{matched:f}=r.value;let h;for(;(h=f[u])&&!h.components;)u++;return u}),l=je(()=>r.value.matched[o.value]);Vn(bi,je(()=>o.value+1)),Vn(Bu,l),Vn(zs,r);const c=Gt();return an(()=>[c.value,l.value,e.name],([u,f,h],[p,g,b])=>{f&&(f.instances[h]=u,g&&g!==f&&u&&u===p&&(f.leaveGuards.size||(f.leaveGuards=g.leaveGuards),f.updateGuards.size||(f.updateGuards=g.updateGuards))),u&&f&&(!g||!Yt(f,g)||!p)&&(f.enterCallbacks[h]||[]).forEach(_=>_(u))},{flush:"post"}),()=>{const u=r.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return Pi(n.default,{Component:p,route:u});const g=h.props[f],b=g?g===!0?u.params:typeof g=="function"?g(u):g:null,P=vr(p,ne({},b,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return Pi(n.default,{Component:P,route:u})||P}}});function Pi(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const aa=ua;function Va(e){const t=ea(e.routes,e),n=e.parseQuery||ju,s=e.stringifyQuery||vi,r=e.history,i=sn(),o=sn(),l=sn(),c=Xl(gt);let u=gt;Ut&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=ws.bind(null,E=>""+E),h=ws.bind(null,Eu),p=ws.bind(null,Cn);function g(E,V){let D,B;return gl(E)?(D=t.getRecordMatcher(E),B=V):B=E,t.addRoute(B,D)}function b(E){const V=t.getRecordMatcher(E);V&&t.removeRoute(V)}function _(){return t.getRoutes().map(E=>E.record)}function P(E){return!!t.getRecordMatcher(E)}function O(E,V){if(V=ne({},V||c.value),typeof E=="string"){const m=Rs(n,E,V.path),v=t.resolve({path:m.path},V),S=r.createHref(m.fullPath);return ne(m,v,{params:p(v.params),hash:Cn(m.hash),redirectedFrom:void 0,href:S})}let D;if(E.path!=null)D=ne({},E,{path:Rs(n,E.path,V.path).path});else{const m=ne({},E.params);for(const v in m)m[v]==null&&delete m[v];D=ne({},E,{params:h(m)}),V.params=h(V.params)}const B=t.resolve(D,V),Y=E.hash||"";B.params=f(p(B.params));const a=Au(s,ne({},E,{hash:yu(Y),path:B.path})),d=r.createHref(a);return ne({fullPath:a,hash:Y,query:s===vi?Hu(E.query):E.query||{}},B,{redirectedFrom:void 0,href:d})}function A(E){return typeof E=="string"?Rs(n,E,c.value.path):ne({},E)}function M(E,V){if(u!==E)return Qt(he.NAVIGATION_CANCELLED,{from:V,to:E})}function T(E){return j(E)}function F(E){return T(ne(A(E),{replace:!0}))}function X(E,V){const D=E.matched[E.matched.length-1];if(D&&D.redirect){const{redirect:B}=D;let Y=typeof B=="function"?B(E,V):B;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=A(Y):{path:Y},Y.params={}),ne({query:E.query,hash:E.hash,params:Y.path!=null?{}:E.params},Y)}}function j(E,V){const D=u=O(E),B=c.value,Y=E.state,a=E.force,d=E.replace===!0,m=X(D,B);if(m)return j(ne(A(m),{state:typeof m=="object"?ne({},Y,m.state):Y,force:a,replace:d}),V||D);const v=D;v.redirectedFrom=V;let S;return!a&&wu(s,B,D)&&(S=Qt(he.NAVIGATION_DUPLICATED,{to:v,from:B}),Ge(B,B,!0,!1)),(S?Promise.resolve(S):G(v,B)).catch(y=>it(y)?it(y,he.NAVIGATION_GUARD_REDIRECT)?y:dt(y):te(y,v,B)).then(y=>{if(y){if(it(y,he.NAVIGATION_GUARD_REDIRECT))return j(ne({replace:d},A(y.to),{state:typeof y.to=="object"?ne({},Y,y.to.state):Y,force:a}),V||v)}else y=N(v,B,!0,d,Y);return J(v,B,y),y})}function H(E,V){const D=M(E,V);return D?Promise.reject(D):Promise.resolve()}function w(E){const V=Ft.values().next().value;return V&&typeof V.runWithContext=="function"?V.runWithContext(E):E()}function G(E,V){let D;const[B,Y,a]=Uu(E,V);D=Ts(B.reverse(),"beforeRouteLeave",E,V);for(const m of B)m.leaveGuards.forEach(v=>{D.push(bt(v,E,V))});const d=H.bind(null,E,V);return D.push(d),Le(D).then(()=>{D=[];for(const m of i.list())D.push(bt(m,E,V));return D.push(d),Le(D)}).then(()=>{D=Ts(Y,"beforeRouteUpdate",E,V);for(const m of Y)m.updateGuards.forEach(v=>{D.push(bt(v,E,V))});return D.push(d),Le(D)}).then(()=>{D=[];for(const m of a)if(m.beforeEnter)if(ke(m.beforeEnter))for(const v of m.beforeEnter)D.push(bt(v,E,V));else D.push(bt(m.beforeEnter,E,V));return D.push(d),Le(D)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),D=Ts(a,"beforeRouteEnter",E,V,w),D.push(d),Le(D))).then(()=>{D=[];for(const m of o.list())D.push(bt(m,E,V));return D.push(d),Le(D)}).catch(m=>it(m,he.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function J(E,V,D){l.list().forEach(B=>w(()=>B(E,V,D)))}function N(E,V,D,B,Y){const a=M(E,V);if(a)return a;const d=V===gt,m=Ut?history.state:{};D&&(B||d?r.replace(E.fullPath,ne({scroll:d&&m&&m.scroll},Y)):r.push(E.fullPath,Y)),c.value=E,Ge(E,V,D,d),dt()}let z;function ue(){z||(z=r.listen((E,V,D)=>{if(!At.listening)return;const B=O(E),Y=X(B,At.currentRoute.value);if(Y){j(ne(Y,{replace:!0,force:!0}),B).catch(mn);return}u=B;const a=c.value;Ut&&Mu(yi(a.fullPath,D.delta),fs()),G(B,a).catch(d=>it(d,he.NAVIGATION_ABORTED|he.NAVIGATION_CANCELLED)?d:it(d,he.NAVIGATION_GUARD_REDIRECT)?(j(ne(A(d.to),{force:!0}),B).then(m=>{it(m,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&!D.delta&&D.type===qs.pop&&r.go(-1,!1)}).catch(mn),Promise.reject()):(D.delta&&r.go(-D.delta,!1),te(d,B,a))).then(d=>{d=d||N(B,a,!1),d&&(D.delta&&!it(d,he.NAVIGATION_CANCELLED)?r.go(-D.delta,!1):D.type===qs.pop&&it(d,he.NAVIGATION_ABORTED|he.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),J(B,a,d)}).catch(mn)}))}let Ce=sn(),ie=sn(),q;function te(E,V,D){dt(E);const B=ie.list();return B.length?B.forEach(Y=>Y(E,V,D)):console.error(E),Promise.reject(E)}function st(){return q&&c.value!==gt?Promise.resolve():new Promise((E,V)=>{Ce.add([E,V])})}function dt(E){return q||(q=!E,ue(),Ce.list().forEach(([V,D])=>E?D(E):V()),Ce.reset()),E}function Ge(E,V,D,B){const{scrollBehavior:Y}=e;if(!Ut||!Y)return Promise.resolve();const a=!D&&Du(yi(E.fullPath,0))||(B||!D)&&history.state&&history.state.scroll||null;return fr().then(()=>Y(E,V,a)).then(d=>d&&Nu(d)).catch(d=>te(d,E,V))}const Oe=E=>r.go(E);let Lt;const Ft=new Set,At={currentRoute:c,listening:!0,addRoute:g,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:P,getRoutes:_,resolve:O,options:e,push:T,replace:F,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:ie.add,isReady:st,install(E){E.component("RouterLink",la),E.component("RouterView",aa),E.config.globalProperties.$router=At,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Et(c)}),Ut&&!Lt&&c.value===gt&&(Lt=!0,T(r.location).catch(B=>{}));const V={};for(const B in gt)Object.defineProperty(V,B,{get:()=>c.value[B],enumerable:!0});E.provide(us,At),E.provide(Sr,so(V)),E.provide(zs,c);const D=E.unmount;Ft.add(E),E.unmount=function(){Ft.delete(E),Ft.size<1&&(u=gt,z&&z(),z=null,c.value=gt,Lt=!1,q=!1),D()}}};function Le(E){return E.reduce((V,D)=>V.then(()=>w(D)),Promise.resolve())}return At}function ja(){return He(us)}function Ha(e){return He(Sr)}export{cf as $,Ao as A,Ns as B,Se as C,So as D,_a as E,Pe as F,Cc as G,Sc as H,fr as I,Na as J,Va as K,Fa as L,ae as M,Zs as N,Co as O,wa as P,ba as Q,pa as R,Nl as S,os as T,xa as U,Ra as V,ma as W,Hs as X,Bs as Y,ac as Z,Aa as _,es as a,wc as a0,lf as a1,Ea as a2,gr as a3,va as a4,Ia as a5,Ma as a6,La as a7,Da as a8,ya as a9,Oa as aa,Ha as ab,ja as ac,Sa as ad,Pa as ae,Ca as af,cr as ag,St as ah,Rc as ai,Ta as aj,Gt as b,Te as c,He as d,je as e,dr as f,On as g,vr as h,Sn as i,_e as j,qo as k,ha as l,ff as m,er as n,an as o,Vn as p,Ml as q,wn as r,Xl as s,da as t,Et as u,Ui as v,ga as w,Q as x,tc as y,Ki as z}; diff --git a/assets/vendor-vuetify-95axeNJO.js b/assets/vendor-vuetify-DsKlzgKp.js similarity index 99% rename from assets/vendor-vuetify-95axeNJO.js rename to assets/vendor-vuetify-DsKlzgKp.js index f41d537..7d82e19 100644 --- a/assets/vendor-vuetify-95axeNJO.js +++ b/assets/vendor-vuetify-DsKlzgKp.js @@ -1,4 +1,4 @@ -import{w as ke,t as k,r as R,s as F,F as Tt,i as ln,C as fn,c as Ct,a as Mt,u as ee,g as dn,b as H,d as A,e as S,p as ue,f as mn,h as At,j as re,n as gn,m as hn,k as de,l as pn,o as G,q as We,v as Pe,x as yn,y as vn,z as bn,A as Ot,B as wn,D as Dn,E as Sn,G as xn,H as kn,I as En}from"./vendor-vue-28M5UGz3.js";function Ha(e){}function Tn(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const M=typeof window<"u",Va=M&&"IntersectionObserver"in window,Cn=M&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),Ft=M&&"matchMedia"in window&&typeof window.matchMedia=="function",Mn=()=>Ft&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function _e(e,t,n){An(e,t),t.set(e,n)}function An(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xe(e,t,n){return e.set(It(e,t),n),n}function $(e,t){return e.get(It(e,t))}function It(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function Pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let a=0;a"u"?n:a}if(typeof t=="string")return $e(e,t,n);if(Array.isArray(t))return Pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function $t(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function me(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function ja(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function qe(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Rt(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const za=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function Ga(e){return Object.keys(e)}function Oe(e,t){return t.every(n=>e.hasOwnProperty(n))}function On(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function Qe(e,t,n){const r=Object.create(null),a=Object.create(null);for(const s in e)t.some(o=>o instanceof RegExp?o.test(s):o===s)?r[s]=e[s]:a[s]=e[s];return[r,a]}function Fn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const Nt=/^on[^a-z]/,Be=e=>Nt.test(e),In=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],Pn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function Ua(e){return e.isComposing&&Pn.includes(e.key)}function Za(e){const[t,n]=Qe(e,[Nt]),r=Fn(t,In),[a,s]=Qe(n,["class","style","id","inert",/^data-/]);return Object.assign(a,t),Object.assign(s,r),[a,s]}function Ka(e){return e==null?[]:Array.isArray(e)?e:[e]}function _a(e,t){let n=0;const r=function(){for(var a=arguments.length,s=new Array(a),o=0;oe(...s),ee(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function He(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function Xa(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function et(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function $n(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r1&&arguments[1]!==void 0?arguments[1]:1e3;if(e=t&&r0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const a in e)r[a]=e[a];for(const a in t){const s=e[a],o=t[a];if(qe(s)&&qe(o)){r[a]=T(s,o,n);continue}if(n&&Array.isArray(s)&&Array.isArray(o)){r[a]=n(s,o);continue}r[a]=o}return r}function Rn(e){return e.map(t=>t.type===Tt?Rn(t.children):t).flat()}function j(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(j.cache.has(e))return j.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return j.cache.set(e,t),t}j.cache=new Map;function te(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>te(e,n)).flat(1);if(t.suspense)return te(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>te(e,n)).flat(1);if(t.component){if(Object.getOwnPropertyDescriptor(t.component.provides,e))return[t.component];if(t.component.subTree)return te(e,t.component.subTree).flat(1)}return[]}var Z=new WeakMap,V=new WeakMap;class Qa{constructor(t){_e(this,Z,[]),_e(this,V,0),this.size=t}get isFull(){return $(Z,this).length===this.size}push(t){$(Z,this)[$(V,this)]=t,Xe(V,this,($(V,this)+1)%this.size)}values(){return $(Z,this).slice($(V,this)).concat($(Z,this).slice(0,$(V,this)))}clear(){$(Z,this).length=0,Xe(V,this,0)}}function Ja(e){const t=R({});ke(()=>{const r=e();for(const a in r)t[a]=r[a]},{flush:"sync"});const n={};for(const r in t)n[r]=k(()=>t[r]);return n}function Re(e,t){return e.includes(t)}function Lt(e){return e[2].toLowerCase()+e.slice(3)}const es=()=>[Function,Array];function ts(e,t){return t="on"+Mt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Nn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","details:not(:has(> summary))","details > summary","[tabindex]",'[contenteditable]:not([contenteditable="false"])',"audio[controls]","video[controls]"].map(a=>`${a}${t?':not([tabindex="-1"])':""}:not([disabled], [inert])`).join(", ");let r;try{r=[...e.querySelectorAll(n)]}catch{return[]}return r.filter(a=>!a.closest("[inert]")).filter(a=>!!a.offsetParent||a.getClientRects().length>0).filter(a=>{var s,o;return!((s=a.parentElement)!=null&&s.closest("details:not([open])"))||a.tagName==="SUMMARY"&&((o=a.parentElement)==null?void 0:o.tagName)==="DETAILS"})}function Wn(e,t,n){let r,a=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do a+=s,r=e[a];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&a=0);return r}function Bn(e,t,n){var a,s,o,i;const r=Ln(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&((a=r[0])==null||a.focus(n));else if(t==="first")(s=r[0])==null||s.focus(n);else if(t==="last")(o=r.at(-1))==null||o.focus(n);else if(typeof t=="number")(i=r[t])==null||i.focus(n);else{const u=Wn(r,t);u?u.focus():Bn(e,t==="next"?"first":"last",n)}}function ns(e){return e==null||typeof e=="string"&&e.trim()===""}function rs(){}function as(e,t){if(!(M&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Hn(e){return e.some(t=>ln(t)?t.type===fn?!1:t.type!==Tt||Hn(t.children):!0)?e:null}function ss(e,t){if(!M||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function os(e,t){const n=e.clientX,r=e.clientY,a=t.getBoundingClientRect(),s=a.left,o=a.top,i=a.right,u=a.bottom;return n>=s&&n<=i&&r>=o&&r<=u}function Vn(){const e=F(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>Rt(e.value)}),t}function is(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function ve(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function us(e){return"\\^$*+?.()|{}[]".includes(e)?`\\${e}`:e}function cs(e){const t={};for(const n in e)t[Ct(n)]=e[n];return t}function ls(e){const t=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(n=>{let[r,a]=n;return t.includes(r)?!!a:a!==void 0}))}const Wt=["top","bottom"],Yn=["start","end","left","right"];function fs(e,t){let[n,r]=e.split(" ");return r||(r=Re(Wt,n)?"start":Re(Yn,n)?"top":"center"),{side:tt(n,t),align:tt(r,t)}}function tt(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function ds(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function ms(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function gs(e){return{side:e.align,align:e.side}}function hs(e){return Re(Wt,e.side)?"y":"x"}class N{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof Element,a=r?1+(1-n)/n:1,{x:s,y:o,width:i,height:u}=r?t.getBoundingClientRect():t;this.x=s*a,this.y=o*a,this.width=i*a,this.height=u*a}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function ps(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function ys(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new N({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new N(e)}function vs(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new N({x:visualViewport.scale>1?0:visualViewport.offsetLeft,y:visualViewport.scale>1?0:visualViewport.offsetTop,width:visualViewport.width*visualViewport.scale/t,height:visualViewport.height*visualViewport.scale/t})}else return new N({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else return new N(e)}function bs(e){const t=new N(e),n=getComputedStyle(e),r=n.transform;if(r){let a,s,o,i,u;if(r.startsWith("matrix3d("))a=r.slice(9,-1).split(/, /),s=Number(a[0]),o=Number(a[5]),i=Number(a[12]),u=Number(a[13]);else if(r.startsWith("matrix("))a=r.slice(7,-1).split(/, /),s=Number(a[0]),o=Number(a[3]),i=Number(a[4]),u=Number(a[5]);else return new N(t);const c=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(c),l=t.y-u-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=o?t.height/o:e.offsetHeight+1;return new N({x:f,y:l,width:m,height:p})}else return new N(t)}function ws(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(a=>{r.onfinish=()=>{a(r)}})),r}const ye=new WeakMap;function Ds(e,t){Object.keys(t).forEach(n=>{if(Be(n)){const r=Lt(n),a=ye.get(e);if(t[n]==null)a==null||a.forEach(s=>{const[o,i]=s;o===r&&(e.removeEventListener(r,i),a.delete(s))});else if(!a||![...a].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=a||new Set;s.add([r,t[n]]),ye.has(e)||ye.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function Ss(e,t){Object.keys(t).forEach(n=>{if(Be(n)){const r=Lt(n),a=ye.get(e);a==null||a.forEach(s=>{const[o,i]=s;o===r&&(e.removeEventListener(r,i),a.delete(s))})}else e.removeAttribute(n)})}const K=2.4,nt=.2126729,rt=.7151522,at=.072175,jn=.55,zn=.58,Gn=.57,Un=.62,ge=.03,st=1.45,Zn=5e-4,Kn=1.25,_n=1.25,ot=.078,it=12.82051282051282,he=.06,ut=.001;function ct(e,t){const n=(e.r/255)**K,r=(e.g/255)**K,a=(e.b/255)**K,s=(t.r/255)**K,o=(t.g/255)**K,i=(t.b/255)**K;let u=n*nt+r*rt+a*at,c=s*nt+o*rt+i*at;if(u<=ge&&(u+=(ge-u)**st),c<=ge&&(c+=(ge-c)**st),Math.abs(c-u)u){const l=(c**jn-u**zn)*Kn;f=l-ut?0:l>-ot?l-l*it*he:l+he}return f*100}const be=.20689655172413793,Xn=e=>e>be**3?Math.cbrt(e):e/(3*be**2)+4/29,qn=e=>e>be?e**3:3*be**2*(e-4/29);function Bt(e){const t=Xn,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function Ht(e){const t=qn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Qn=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Jn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,er=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],tr=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Vt(e){const t=Array(3),n=Jn,r=Qn;for(let a=0;a<3;++a)t[a]=Math.round(He(n(r[a][0]*e[0]+r[a][1]*e[1]+r[a][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Ve(e){let{r:t,g:n,b:r}=e;const a=[0,0,0],s=tr,o=er;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)a[i]=o[i][0]*t+o[i][1]*n+o[i][2]*r;return a}function nr(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function xs(e){return nr(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const lt=/^(?(?:rgb|hsl)a?)\((?.+)\)/,rr={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>ft({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>ft({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>ae({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>ae({h:e,s:t,v:n,a:r})};function L(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&<.test(e)){const{groups:t}=e.match(lt),{fn:n,values:r}=t,a=r.split(/,\s*|\s*\/\s*|\s+/).map((s,o)=>s.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return rr[n](...a)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),sr(t)}else if(typeof e=="object"){if(Oe(e,["r","g","b"]))return e;if(Oe(e,["h","s","l"]))return ae(Yt(e));if(Oe(e,["h","s","v"]))return ae(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name} +import{w as ke,t as k,r as R,s as F,F as Tt,i as ln,C as fn,c as Ct,a as Mt,u as ee,g as dn,b as H,d as A,e as S,p as ue,f as mn,h as At,j as re,n as gn,m as hn,k as de,l as pn,o as G,q as We,v as Pe,x as yn,y as vn,z as bn,A as Ot,B as wn,D as Dn,E as Sn,G as xn,H as kn,I as En}from"./vendor-vue-BiQC5iF7.js";function Ha(e){}function Tn(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const M=typeof window<"u",Va=M&&"IntersectionObserver"in window,Cn=M&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),Ft=M&&"matchMedia"in window&&typeof window.matchMedia=="function",Mn=()=>Ft&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function _e(e,t,n){An(e,t),t.set(e,n)}function An(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xe(e,t,n){return e.set(It(e,t),n),n}function $(e,t){return e.get(It(e,t))}function It(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function Pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let a=0;a"u"?n:a}if(typeof t=="string")return $e(e,t,n);if(Array.isArray(t))return Pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function $t(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function me(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function ja(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function qe(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Rt(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const za=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function Ga(e){return Object.keys(e)}function Oe(e,t){return t.every(n=>e.hasOwnProperty(n))}function On(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function Qe(e,t,n){const r=Object.create(null),a=Object.create(null);for(const s in e)t.some(o=>o instanceof RegExp?o.test(s):o===s)?r[s]=e[s]:a[s]=e[s];return[r,a]}function Fn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const Nt=/^on[^a-z]/,Be=e=>Nt.test(e),In=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],Pn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function Ua(e){return e.isComposing&&Pn.includes(e.key)}function Za(e){const[t,n]=Qe(e,[Nt]),r=Fn(t,In),[a,s]=Qe(n,["class","style","id","inert",/^data-/]);return Object.assign(a,t),Object.assign(s,r),[a,s]}function Ka(e){return e==null?[]:Array.isArray(e)?e:[e]}function _a(e,t){let n=0;const r=function(){for(var a=arguments.length,s=new Array(a),o=0;oe(...s),ee(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function He(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function Xa(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function et(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function $n(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r1&&arguments[1]!==void 0?arguments[1]:1e3;if(e=t&&r0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const a in e)r[a]=e[a];for(const a in t){const s=e[a],o=t[a];if(qe(s)&&qe(o)){r[a]=T(s,o,n);continue}if(n&&Array.isArray(s)&&Array.isArray(o)){r[a]=n(s,o);continue}r[a]=o}return r}function Rn(e){return e.map(t=>t.type===Tt?Rn(t.children):t).flat()}function j(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(j.cache.has(e))return j.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return j.cache.set(e,t),t}j.cache=new Map;function te(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>te(e,n)).flat(1);if(t.suspense)return te(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>te(e,n)).flat(1);if(t.component){if(Object.getOwnPropertyDescriptor(t.component.provides,e))return[t.component];if(t.component.subTree)return te(e,t.component.subTree).flat(1)}return[]}var Z=new WeakMap,V=new WeakMap;class Qa{constructor(t){_e(this,Z,[]),_e(this,V,0),this.size=t}get isFull(){return $(Z,this).length===this.size}push(t){$(Z,this)[$(V,this)]=t,Xe(V,this,($(V,this)+1)%this.size)}values(){return $(Z,this).slice($(V,this)).concat($(Z,this).slice(0,$(V,this)))}clear(){$(Z,this).length=0,Xe(V,this,0)}}function Ja(e){const t=R({});ke(()=>{const r=e();for(const a in r)t[a]=r[a]},{flush:"sync"});const n={};for(const r in t)n[r]=k(()=>t[r]);return n}function Re(e,t){return e.includes(t)}function Lt(e){return e[2].toLowerCase()+e.slice(3)}const es=()=>[Function,Array];function ts(e,t){return t="on"+Mt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Nn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","details:not(:has(> summary))","details > summary","[tabindex]",'[contenteditable]:not([contenteditable="false"])',"audio[controls]","video[controls]"].map(a=>`${a}${t?':not([tabindex="-1"])':""}:not([disabled], [inert])`).join(", ");let r;try{r=[...e.querySelectorAll(n)]}catch{return[]}return r.filter(a=>!a.closest("[inert]")).filter(a=>!!a.offsetParent||a.getClientRects().length>0).filter(a=>{var s,o;return!((s=a.parentElement)!=null&&s.closest("details:not([open])"))||a.tagName==="SUMMARY"&&((o=a.parentElement)==null?void 0:o.tagName)==="DETAILS"})}function Wn(e,t,n){let r,a=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do a+=s,r=e[a];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&a=0);return r}function Bn(e,t,n){var a,s,o,i;const r=Ln(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&((a=r[0])==null||a.focus(n));else if(t==="first")(s=r[0])==null||s.focus(n);else if(t==="last")(o=r.at(-1))==null||o.focus(n);else if(typeof t=="number")(i=r[t])==null||i.focus(n);else{const u=Wn(r,t);u?u.focus():Bn(e,t==="next"?"first":"last",n)}}function ns(e){return e==null||typeof e=="string"&&e.trim()===""}function rs(){}function as(e,t){if(!(M&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Hn(e){return e.some(t=>ln(t)?t.type===fn?!1:t.type!==Tt||Hn(t.children):!0)?e:null}function ss(e,t){if(!M||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function os(e,t){const n=e.clientX,r=e.clientY,a=t.getBoundingClientRect(),s=a.left,o=a.top,i=a.right,u=a.bottom;return n>=s&&n<=i&&r>=o&&r<=u}function Vn(){const e=F(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>Rt(e.value)}),t}function is(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function ve(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function us(e){return"\\^$*+?.()|{}[]".includes(e)?`\\${e}`:e}function cs(e){const t={};for(const n in e)t[Ct(n)]=e[n];return t}function ls(e){const t=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(n=>{let[r,a]=n;return t.includes(r)?!!a:a!==void 0}))}const Wt=["top","bottom"],Yn=["start","end","left","right"];function fs(e,t){let[n,r]=e.split(" ");return r||(r=Re(Wt,n)?"start":Re(Yn,n)?"top":"center"),{side:tt(n,t),align:tt(r,t)}}function tt(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function ds(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function ms(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function gs(e){return{side:e.align,align:e.side}}function hs(e){return Re(Wt,e.side)?"y":"x"}class N{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof Element,a=r?1+(1-n)/n:1,{x:s,y:o,width:i,height:u}=r?t.getBoundingClientRect():t;this.x=s*a,this.y=o*a,this.width=i*a,this.height=u*a}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function ps(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function ys(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new N({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new N(e)}function vs(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new N({x:visualViewport.scale>1?0:visualViewport.offsetLeft,y:visualViewport.scale>1?0:visualViewport.offsetTop,width:visualViewport.width*visualViewport.scale/t,height:visualViewport.height*visualViewport.scale/t})}else return new N({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else return new N(e)}function bs(e){const t=new N(e),n=getComputedStyle(e),r=n.transform;if(r){let a,s,o,i,u;if(r.startsWith("matrix3d("))a=r.slice(9,-1).split(/, /),s=Number(a[0]),o=Number(a[5]),i=Number(a[12]),u=Number(a[13]);else if(r.startsWith("matrix("))a=r.slice(7,-1).split(/, /),s=Number(a[0]),o=Number(a[3]),i=Number(a[4]),u=Number(a[5]);else return new N(t);const c=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(c),l=t.y-u-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=o?t.height/o:e.offsetHeight+1;return new N({x:f,y:l,width:m,height:p})}else return new N(t)}function ws(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(a=>{r.onfinish=()=>{a(r)}})),r}const ye=new WeakMap;function Ds(e,t){Object.keys(t).forEach(n=>{if(Be(n)){const r=Lt(n),a=ye.get(e);if(t[n]==null)a==null||a.forEach(s=>{const[o,i]=s;o===r&&(e.removeEventListener(r,i),a.delete(s))});else if(!a||![...a].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=a||new Set;s.add([r,t[n]]),ye.has(e)||ye.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function Ss(e,t){Object.keys(t).forEach(n=>{if(Be(n)){const r=Lt(n),a=ye.get(e);a==null||a.forEach(s=>{const[o,i]=s;o===r&&(e.removeEventListener(r,i),a.delete(s))})}else e.removeAttribute(n)})}const K=2.4,nt=.2126729,rt=.7151522,at=.072175,jn=.55,zn=.58,Gn=.57,Un=.62,ge=.03,st=1.45,Zn=5e-4,Kn=1.25,_n=1.25,ot=.078,it=12.82051282051282,he=.06,ut=.001;function ct(e,t){const n=(e.r/255)**K,r=(e.g/255)**K,a=(e.b/255)**K,s=(t.r/255)**K,o=(t.g/255)**K,i=(t.b/255)**K;let u=n*nt+r*rt+a*at,c=s*nt+o*rt+i*at;if(u<=ge&&(u+=(ge-u)**st),c<=ge&&(c+=(ge-c)**st),Math.abs(c-u)u){const l=(c**jn-u**zn)*Kn;f=l-ut?0:l>-ot?l-l*it*he:l+he}return f*100}const be=.20689655172413793,Xn=e=>e>be**3?Math.cbrt(e):e/(3*be**2)+4/29,qn=e=>e>be?e**3:3*be**2*(e-4/29);function Bt(e){const t=Xn,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function Ht(e){const t=qn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Qn=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Jn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,er=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],tr=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Vt(e){const t=Array(3),n=Jn,r=Qn;for(let a=0;a<3;++a)t[a]=Math.round(He(n(r[a][0]*e[0]+r[a][1]*e[1]+r[a][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Ve(e){let{r:t,g:n,b:r}=e;const a=[0,0,0],s=tr,o=er;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)a[i]=o[i][0]*t+o[i][1]*n+o[i][2]*r;return a}function nr(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function xs(e){return nr(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const lt=/^(?(?:rgb|hsl)a?)\((?.+)\)/,rr={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>ft({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>ft({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>ae({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>ae({h:e,s:t,v:n,a:r})};function L(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&<.test(e)){const{groups:t}=e.match(lt),{fn:n,values:r}=t,a=r.split(/,\s*|\s*\/\s*|\s+/).map((s,o)=>s.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return rr[n](...a)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),sr(t)}else if(typeof e=="object"){if(Oe(e,["r","g","b"]))return e;if(Oe(e,["h","s","l"]))return ae(Yt(e));if(Oe(e,["h","s","v"]))return ae(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name} Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function ae(e){const{h:t,s:n,v:r,a}=e,s=i=>{const u=(i+t/60)%6;return r-r*n*Math.max(Math.min(u,4-u,1),0)},o=[s(5),s(3),s(1)].map(i=>Math.round(i*255));return{r:o[0],g:o[1],b:o[2],a}}function ft(e){return ae(Yt(e))}function Yt(e){const{h:t,s:n,l:r,a}=e,s=r+n*Math.min(r,1-r),o=s===0?0:2-2*r/s;return{h:t,s:o,v:s,a}}function pe(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function ar(e){let{r:t,g:n,b:r,a}=e;return`#${[pe(t),pe(n),pe(r),a!==void 0?pe(Math.round(a*255)):""].join("")}`}function sr(e){e=or(e);let[t,n,r,a]=$n(e,2).map(s=>parseInt(s,16));return a=a===void 0?a:a/255,{r:t,g:n,b:r,a}}function or(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Je(Je(e,6),8,"F")),e}function ir(e,t){const n=Bt(Ve(e));return n[0]=n[0]+t*10,Vt(Ht(n))}function ur(e,t){const n=Bt(Ve(e));return n[0]=n[0]-t*10,Vt(Ht(n))}function cr(e){const t=L(e);return Ve(t)[1]}function lr(e){const t=Math.abs(ct(L(0),L(e)));return Math.abs(ct(L(16777215),L(e)))>Math.min(t,50)?"#fff":"#000"}function U(e,t){return n=>Object.keys(e).reduce((r,a)=>{const o=typeof e[a]=="object"&&e[a]!=null&&!Array.isArray(e[a])?e[a]:{type:e[a]};return n&&a in n?r[a]={...o,default:n[a]}:r[a]=o,t&&!r[a].source&&(r[a].source=t),r},{})}const fr=U({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function W(e,t){const n=dn();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function dr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=W(e).type;return j((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}function mr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:W("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const X=Symbol.for("vuetify:defaults");function gr(e){return H(e)}function Ye(){const e=A(X);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function ks(e,t){const n=Ye(),r=H(e),a=S(()=>{if(ee(t==null?void 0:t.disabled))return n.value;const o=ee(t==null?void 0:t.scoped),i=ee(t==null?void 0:t.reset),u=ee(t==null?void 0:t.root);if(r.value==null&&!(o||i||u))return n.value;let c=T(r.value,{prev:n.value});if(o)return c;if(i||u){const f=Number(i||1/0);for(let l=0;l<=f&&!(!c||!("prev"in c));l++)c=c.prev;return c&&typeof u=="string"&&u in c&&(c=T(T(c,{prev:c}),c[u])),c}return c.prev?T(c.prev,c):c});return ue(X,a),a}function hr(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[j(t)]<"u")}function pr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ye();const r=W("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const a=S(()=>{var u;return(u=n.value)==null?void 0:u[e._as??t]}),s=new Proxy(e,{get(u,c){var p,y,E,C;const f=Reflect.get(u,c);if(c==="class"||c==="style")return[(p=a.value)==null?void 0:p[c],f].filter(d=>d!=null);if(hr(r.vnode,c))return f;const l=(y=a.value)==null?void 0:y[c];if(l!==void 0)return l;const m=(C=(E=n.value)==null?void 0:E.global)==null?void 0:C[c];return m!==void 0?m:f}}),o=F();ke(()=>{if(a.value){const u=Object.entries(a.value).filter(c=>{let[f]=c;return f.startsWith(f[0].toUpperCase())});o.value=u.length?Object.fromEntries(u):void 0}else o.value=void 0});function i(){const u=mr(X,r);ue(X,S(()=>o.value?T((u==null?void 0:u.value)??{},o.value):u==null?void 0:u.value))}return{props:s,provideSubDefaults:i}}function ce(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=U(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return On(r,t)},e.props._as=String,e.setup=function(r,a){const s=Ye();if(!s.value)return e._setup(r,a);const{props:o,provideSubDefaults:i}=pr(r,r._as??e.name,s),u=e._setup(o,a);return i(),u}}return e}function jt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?ce:mn)(t)}function Es(e,t){return t.props=e,t}function Ts(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return jt()({name:n??Mt(Ct(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...fr()},setup(r,a){let{slots:s}=a;return()=>{var o;return At(r.tag,{class:[e,r.class],style:r.style},(o=s.default)==null?void 0:o.call(s))}}})}function yr(e,t,n,r){if(!n||ve(e)||ve(t))return;const a=n.get(e);if(a)a.set(t,r);else{const s=new WeakMap;s.set(t,r),n.set(e,s)}}function vr(e,t,n){var s,o;if(!n||ve(e)||ve(t))return null;const r=(s=n.get(e))==null?void 0:s.get(t);if(typeof r=="boolean")return r;const a=(o=n.get(t))==null?void 0:o.get(e);return typeof a=="boolean"?a:null}function br(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;const a=vr(e,t,n);return a||(yr(e,t,n,!0),r.every(s=>br(e[s],t[s],n)))}function Cs(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const Ms="cubic-bezier(0.4, 0, 0.2, 1)",As="cubic-bezier(0.0, 0, 0.2, 1)",Os="cubic-bezier(0.4, 0, 1, 1)",wr={linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5,instant:e=>1};function Fs(e,t,n){return Object.keys(e).filter(r=>Be(r)&&r.endsWith(t)).reduce((r,a)=>(r[a.slice(0,-t.length)]=s=>Nn(e[a],s,n(s)),r),{})}function Is(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?Dr(e):zt(e))return e;e=e.parentElement}return document.scrollingElement}function Ps(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(zt(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function zt(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e),n=t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight,r=t.overflowX==="scroll"||t.overflowX==="auto"&&e.scrollWidth>e.clientWidth;return n||r}function Dr(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function $s(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Rs(e){const t=W("useRender");t.render=e}function Ns(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{leading:!0,trailing:!0},r=0,a=0,s=!1,o=0;function i(){clearTimeout(r),s=!1,o=0}const u=function(){for(var c=arguments.length,f=new Array(c),l=0;l=t?y():n.trailing&&(r=setTimeout(y,t-p)):(s=!0,n.leading&&y())};return u.clear=i,u.immediate=e,u}const Sr=[String,Function,Object,Array],Ne=Symbol.for("vuetify:icons"),Ee=U({icon:{type:Sr},tag:{type:[String,Object,Function],required:!0}},"icon"),dt=jt()({name:"VComponentIcon",props:Ee(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return re(e.tag,null,{default:()=>{var a;return[e.icon?re(r,null,null):(a=n.default)==null?void 0:a.call(n)]}})}}}),Gt=ce({name:"VSvgIcon",inheritAttrs:!1,props:Ee(),setup(e,t){let{attrs:n}=t;return()=>re(e.tag,hn(n,{style:null}),{default:()=>[de("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?de("path",{d:r[0],"fill-opacity":r[1]},null):de("path",{d:r},null)):de("path",{d:e.icon},null)])]})}});ce({name:"VLigatureIcon",props:Ee(),setup(e){return()=>re(e.tag,null,{default:()=>[e.icon]})}});const Ut=ce({name:"VClassIcon",props:Ee(),setup(e){return()=>re(e.tag,{class:gn(e.icon)},null)}}),Ls=e=>{const t=A(Ne);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:S(()=>{var u;const r=pn(e);if(!r)return{component:dt};let a=r;if(typeof a=="string"&&(a=a.trim(),a.startsWith("$")&&(a=(u=t.aliases)==null?void 0:u[a.slice(1)])),Array.isArray(a))return{component:Gt,icon:a};if(typeof a!="string")return{component:dt,icon:a};const s=Object.keys(t.sets).find(c=>typeof a=="string"&&a.startsWith(`${c}:`)),o=s?a.slice(s.length+1):a;return{component:t.sets[s??t.defaultSet].component,icon:o}})}},xr={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",tableGroupCollapse:"mdi-chevron-down",tableGroupExpand:"mdi-chevron-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload",color:"mdi-palette",command:"mdi-apple-keyboard-command",ctrl:"mdi-apple-keyboard-control",space:"mdi-keyboard-space",shift:"mdi-apple-keyboard-shift",alt:"mdi-apple-keyboard-option",enter:"mdi-keyboard-return",arrowup:"mdi-arrow-up",arrowdown:"mdi-arrow-down",arrowleft:"mdi-arrow-left",arrowright:"mdi-arrow-right",backspace:"mdi-backspace",play:"mdi-play",pause:"mdi-pause",fullscreen:"mdi-fullscreen",fullscreenExit:"mdi-fullscreen-exit",volumeHigh:"mdi-volume-high",volumeMedium:"mdi-volume-medium",volumeLow:"mdi-volume-low",volumeOff:"mdi-volume-variant-off",search:"mdi-magnify"},kr={component:e=>At(Ut,{...e,class:"mdi"})};function Er(){return{svg:{component:Gt},class:{component:Ut}}}function Tr(e){const t=Er(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=kr),T({defaultSet:n,sets:t,aliases:{...xr,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}function Cr(e,t){let n;function r(){n=Pe(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}G(e,a=>{a&&!n?r():a||(n==null||n.stop(),n=void 0)},{immediate:!0}),We(()=>{n==null||n.stop()})}function Mr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:l=>l,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:l=>l;const s=W("useProxiedModel"),o=H(e[t]!==void 0?e[t]:n),i=j(t),c=i!==t?S(()=>{var l,m,p,y;return e[t],!!(((l=s.vnode.props)!=null&&l.hasOwnProperty(t)||(m=s.vnode.props)!=null&&m.hasOwnProperty(i))&&((p=s.vnode.props)!=null&&p.hasOwnProperty(`onUpdate:${t}`)||(y=s.vnode.props)!=null&&y.hasOwnProperty(`onUpdate:${i}`)))}):S(()=>{var l,m;return e[t],!!((l=s.vnode.props)!=null&&l.hasOwnProperty(t)&&((m=s.vnode.props)!=null&&m.hasOwnProperty(`onUpdate:${t}`)))});Cr(()=>!c.value,()=>{G(()=>e[t],l=>{o.value=l})});const f=S({get(){const l=e[t];return r(c.value?l:o.value)},set(l){const m=a(l),p=yn(c.value?e[t]:o.value);p===m||r(p)===l||(o.value=m,s==null||s.emit(`update:${t}`,m))}});return Object.defineProperty(f,"externalValue",{get:()=>c.value?e[t]:o.value}),f}const Ar={badge:"Badge",open:"Open",close:"Close",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"},ariaLabel:{previousMonth:"Previous month",nextMonth:"Next month",selectYear:"Select year",previousYear:"Previous year",nextYear:"Next year",selectMonth:"Select month",selectDate:"{0}",currentDate:"Today, {0}"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time",hour:"Hour",minute:"Minute",second:"Second",notAllowed:"Value is not allowed"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"},rules:{required:"This field is required",email:"Please enter a valid email",number:"This field can only contain numbers",integer:"This field can only contain integer values",capital:"This field can only contain uppercase letters",maxLength:"You must enter a maximum of {0} characters",minLength:"You must enter a minimum of {0} characters",strictLength:"The length of the entered field is invalid",exclude:"The {0} character is not allowed",notEmpty:"Please choose at least one value",pattern:"Invalid format"},command:{search:"Type a command or search..."},hotkey:{then:"then",ctrl:"Ctrl",command:"Command",space:"Space",shift:"Shift",alt:"Alt",enter:"Enter",escape:"Escape",upArrow:"Up Arrow",downArrow:"Down Arrow",leftArrow:"Left Arrow",rightArrow:"Right Arrow",backspace:"Backspace",option:"Option",plus:"plus",shortcut:"Keyboard shortcut: {0}",or:"or"},video:{play:"Play",pause:"Pause",seek:"Seek",volume:"Volume",showVolume:"Show volume control",mute:"Mute",unmute:"Unmute",enterFullscreen:"Full screen",exitFullscreen:"Exit full screen"},colorPicker:{ariaLabel:{eyedropper:"Select color with eyedropper",hueSlider:"Hue",alphaSlider:"Alpha",redInput:"Red value",greenInput:"Green value",blueInput:"Blue value",alphaInput:"Alpha value",hueInput:"Hue value",saturationInput:"Saturation value",lightnessInput:"Lightness value",hexInput:"HEX value",hexaInput:"HEX with alpha value",changeFormat:"Change color format"}}},mt="$vuetify.",gt=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),Zt=(e,t,n)=>function(r){for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;onew Intl.NumberFormat([e.value,t.value],r).format(n)}function Kt(e,t){return je(e,t)(.1).includes(",")?",":"."}function Fe(e,t,n){const r=Mr(e,t,e[t]??n.value);return r.value=e[t]??n.value,G(n,a=>{e[t]==null&&(r.value=n.value)}),r}function _t(e){return t=>{const n=Fe(t,"locale",e.current),r=Fe(t,"fallback",e.fallback),a=Fe(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:a,decimalSeparator:k(()=>Kt(n,r)),t:Zt(n,r,a),n:je(n,r),provide:_t({current:n,fallback:r,messages:a})}}}function Or(e){const t=F((e==null?void 0:e.locale)??"en"),n=F((e==null?void 0:e.fallback)??"en"),r=H({en:Ar,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,decimalSeparator:k(()=>(e==null?void 0:e.decimalSeparator)??Kt(t,n)),t:Zt(t,n,r),n:je(t,n),provide:_t({current:t,fallback:n,messages:r})}}const we=Symbol.for("vuetify:locale");function Fr(e){return e.name!=null}function Ir(e){const t=e!=null&&e.adapter&&Fr(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:Or(e),n=Rr(t,e);return{...t,...n}}function Pr(){const e=A(we);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function $r(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function Rr(e,t){const n=H((t==null?void 0:t.rtl)??$r()),r=S(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:k(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Nr(){const e=A(we);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}function le(e){const t=e.slice(-2).toUpperCase();switch(!0){case e==="GB-alt-variant":return{firstDay:0,firstWeekSize:4};case e==="001":return{firstDay:1,firstWeekSize:1};case`AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW`.includes(t):return{firstDay:0,firstWeekSize:1};case`AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV diff --git a/assets/visitorId-2IHCmkCy.js b/assets/visitorId-D_nwlNzA.js similarity index 85% rename from assets/visitorId-2IHCmkCy.js rename to assets/visitorId-D_nwlNzA.js index b79983e..90f9f1f 100644 --- a/assets/visitorId-2IHCmkCy.js +++ b/assets/visitorId-D_nwlNzA.js @@ -1 +1 @@ -import{x as e}from"./index-CzpSlHRw.js";import"./vendor-vuetify-95axeNJO.js";import"./vendor-vue-28M5UGz3.js";let a;const r=t=>({get:async()=>({visitorId:"unknown",error:(t==null?void 0:t.message)||String(t||""),fallback:!0})}),o=async()=>{try{const t=await e(()=>import("./fp.esm-p88LZBod.js"),[],import.meta.url);return(t==null?void 0:t.default)||t}catch(t){return console.warn("Fingerprint library blocked or failed to load; using fallback agent.",t),null}},i=()=>(a||(a=(async()=>{const t=await o();if(!t)return r(new Error("fingerprint module unavailable"));try{return await t.load()}catch(n){return console.warn("FingerprintJS.load failed, using fallback agent.",n),r(n)}})()),a),u=async()=>{const n=await(await i()).get();return(n==null?void 0:n.visitorId)||"unknown"},g=async()=>await(await i()).get();export{g as getFingerprintData,u as getVisitorId,i as loadFingerprint}; +import{x as e}from"./index-DGIAsv4W.js";import"./vendor-vuetify-DsKlzgKp.js";import"./vendor-vue-BiQC5iF7.js";let a;const r=t=>({get:async()=>({visitorId:"unknown",error:(t==null?void 0:t.message)||String(t||""),fallback:!0})}),o=async()=>{try{const t=await e(()=>import("./fp.esm-p88LZBod.js"),[],import.meta.url);return(t==null?void 0:t.default)||t}catch(t){return console.warn("Fingerprint library blocked or failed to load; using fallback agent.",t),null}},i=()=>(a||(a=(async()=>{const t=await o();if(!t)return r(new Error("fingerprint module unavailable"));try{return await t.load()}catch(n){return console.warn("FingerprintJS.load failed, using fallback agent.",n),r(n)}})()),a),u=async()=>{const n=await(await i()).get();return(n==null?void 0:n.visitorId)||"unknown"},g=async()=>await(await i()).get();export{g as getFingerprintData,u as getVisitorId,i as loadFingerprint}; diff --git a/index.html b/index.html index d642094..230a567 100644 --- a/index.html +++ b/index.html @@ -18,6 +18,7 @@ + @@ -34,13 +35,21 @@ - - + + + + + + + + + + - - - + + + diff --git a/manifest.webmanifest b/manifest.webmanifest index 872ae29..39fba58 100644 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -1 +1 @@ -{"name":"Classworks作业板","short_name":"Classworks","description":"记录,查看并同步作业","start_url":"./","display":"standalone","background_color":"#212121","theme_color":"#212121","lang":"en","scope":"./","edge_side_panel":{"default_path":"./"},"icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"./pwa/image/pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./pwa/image/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"./pwa/image/maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"shortcuts":[{"name":"随机点名","short_name":"随机点名","url":"./#random-picker","icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"}]}]} +{"name":"Classworks作业板","short_name":"Classworks","description":"适用于班级大屏的作业板小工具,支持记录、查看并同步作业。","start_url":"./","display":"standalone","background_color":"#212121","theme_color":"#212121","lang":"zh-CN","scope":"./","id":"./","dir":"ltr","display_override":["window-controls-overlay","standalone","minimal-ui"],"orientation":"any","categories":["education","productivity","utilities"],"prefer_related_applications":false,"launch_handler":{"client_mode":["navigate-existing","auto"]},"edge_side_panel":{"default_path":"./"},"icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"./pwa/image/pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./pwa/image/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"./pwa/image/maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"shortcuts":[{"name":"随机点名","short_name":"随机点名","url":"./#random-picker","icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"}]}]} diff --git a/sw.js b/sw.js index bb08ddb..c5b2f08 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,a={};const s=(s,n)=>(s=new URL(s+".js",n).href,a[s]||new Promise(a=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=a,document.head.appendChild(e)}else e=s,importScripts(s),a()}).then(()=>{let e=a[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e}));self.define=(n,c)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(a[i])return;let r={};const t=e=>s(e,i),o={module:{uri:i},exports:r,require:t};a[i]=Promise.all(n.map(e=>o[e]||t(e))).then(e=>(c(...e),r))}}define(["./workbox-7334f08a"],function(e){"use strict";importScripts("/sw-cache-manager.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"sw-cache-manager.js",revision:"e1c99eed8d27ad84cb5fc7c56efd223b"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"manifest.webmanifest",revision:"b0b994b429676afc68d0e6f9fe77af13"},{url:"index.html",revision:"8dc55110ecbe6a9e8c5dd7fc1c088aa7"},{url:"favicon.ico",revision:"8e3a55390cf66d227f765a6063bb6c31"},{url:"banner.png",revision:"98c56bcdd08a6e6e50c613f73e270353"},{url:"328a0e159cf9b3fb3caacaab9c83bf17.txt",revision:"d06a7b1a4998b04f6c949893fa6b3c3b"},{url:"pwa/image/maskable-icon-512x512.png",revision:"dfa412c4bbe0f716216ac5db7a4c706d"},{url:"pwa/image/pwa-192x192.png",revision:"81802c789e8b735f7f8b181f002932f8"},{url:"pwa/image/pwa-512x512.png",revision:"57cc60501279a6d172b32211b1c67688"},{url:"pwa/image/pwa-64x64.png",revision:"b4ca4c3d8333391f20cddbb3f6cca2df"},{url:"manifest.webmanifest",revision:"b0b994b429676afc68d0e6f9fe77af13"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute(({url:e,sameOrigin:a})=>a&&e.pathname.endsWith("/assets/"),new e.CacheFirst({cacheName:"assets-cache",plugins:[new e.ExpirationPlugin({maxEntries:200,maxAgeSeconds:5184e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute(({url:e,sameOrigin:a})=>a&&e.pathname.startsWith("/pwa/"),new e.StaleWhileRevalidate({cacheName:"pwa-cache",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:604800}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute(({url:e,sameOrigin:a})=>{if(!a)return!1;const s=e.pathname;return!(s.includes("/assets/")||s.includes("/pwa/"))},new e.NetworkFirst({cacheName:"other-resources",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:86400}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}); +if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const u=s=>i(s,r),o={module:{uri:r},exports:a,require:u};e[r]=Promise.all(n.map(s=>o[s]||u(s))).then(s=>(l(...s),a))}}define(["./workbox-7334f08a"],function(s){"use strict";importScripts("sw-cache-manager.js"),self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"sw-cache-manager.js",revision:"e1c99eed8d27ad84cb5fc7c56efd223b"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"manifest.webmanifest",revision:"332c2eee06c240aeb7a94fc37d8d6cb1"},{url:"index.html",revision:"3c2e9b15f242db6e80aa93721b08aa51"},{url:"favicon.ico",revision:"8e3a55390cf66d227f765a6063bb6c31"},{url:"banner.png",revision:"98c56bcdd08a6e6e50c613f73e270353"},{url:"328a0e159cf9b3fb3caacaab9c83bf17.txt",revision:"d06a7b1a4998b04f6c949893fa6b3c3b"},{url:"sounds/Teams 默认通话铃.mp3",revision:"bda21cf4dbfbac23f7c078d02b136f0c"},{url:"sounds/Teams 默认.mp3",revision:"7d0ea80d3ab8272d8f28a4ad4e6ef238"},{url:"sounds/Teams 高分.mp3",revision:"b5342507ead401ddc8e9ad27b684cf29"},{url:"sounds/Teams 颤振.mp3",revision:"7d92c46c0ca199446c1fd72d0504b7d7"},{url:"sounds/Teams 重复振铃.mp3",revision:"fb902955f401306811d6cd51d14c6c97"},{url:"sounds/Teams 进阶.mp3",revision:"9edb48fc85646c06728f727334f153c4"},{url:"sounds/Teams 轻弹.mp3",revision:"3c22478acb22b9825374bc386626e1e5"},{url:"sounds/Teams 赋予希望.mp3",revision:"61d4dbcf5f3af0be8b237864b566f647"},{url:"sounds/Teams 警报.mp3",revision:"13185400beeaab47be5d9f05fc469b4a"},{url:"sounds/Teams 蜂鸣声.mp3",revision:"60894252e2c86a66bb36f581b36c6c56"},{url:"sounds/Teams 点击.mp3",revision:"7f0ac7ce255b0440aa1ff460ae534418"},{url:"sounds/Teams 滴水.mp3",revision:"56d6127071c4514a0230061d6e692205"},{url:"sounds/Teams 波纹.mp3",revision:"67d993bbe556c6b06f0c1de58b5ffc79"},{url:"sounds/Teams 波普.mp3",revision:"a2092a6219357df7f239cc59cbb2447f"},{url:"sounds/Teams 气泡.mp3",revision:"bf21272379428e85205f66592894b881"},{url:"sounds/Teams 气泡(大声).mp3",revision:"ccbffede0f91fb2fc4c1e3b700885299"},{url:"sounds/Teams 时空.mp3",revision:"21d5f825d18cf541314659eb058ea997"},{url:"sounds/Teams 摇摆.mp3",revision:"cc593fc7586d4ca8f357324caed7392b"},{url:"sounds/Teams 提醒.mp3",revision:"1bb92bf7e9ff6c7580bd4c07b0da5d26"},{url:"sounds/Teams 弹拨.mp3",revision:"dbca54d79ab2dc7f58e0c815d1e52c76"},{url:"sounds/Teams 尤里卡.mp3",revision:"f959ac97e8113c13fbef4640d701bb46"},{url:"sounds/Teams 增强.mp3",revision:"aff4c45773c33ee949dbb2fd176ead9c"},{url:"sounds/Teams 叮铃.mp3",revision:"740bf4b245b232b81cb46beccd085ffc"},{url:"sounds/Teams 召唤.mp3",revision:"5f22a60afb21d7ef32c02ef604a0586a"},{url:"sounds/Teams 共鸣.mp3",revision:"0da491cc59a0a2c88e1cdfdb26e31194"},{url:"sounds/Teams 优先处理.mp3",revision:"5117fd6695056edd9fe7d13bdd981bbc"},{url:"sounds/Teams teams_notification.mp3",revision:"c0a3e466772e808ff0cfa0e9c76e4440"},{url:"sounds/Teams teams_meet_up_reminder.mp3",revision:"c18a464074c423def70a420418b80365"},{url:"sounds/Teams screenshare_ring.mp3",revision:"c18a464074c423def70a420418b80365"},{url:"sounds/Teams meetup_ring.mp3",revision:"ec5fdebfd3fa2f4f9f60673074a4e35e"},{url:"sounds/Teams incoming-ringtone-level40.mp3",revision:"d7298eb35126dd4f60d07e6aaeeae96f"},{url:"sounds/Teams incoming-ringtone-level30.mp3",revision:"dbe2f213d90800fb9b02aca8356b2e44"},{url:"sounds/Teams bounce.mp3",revision:"2ddc0b2c7e515045d31276dbd20cc5e3"},{url:"sounds/Teams Remix.mp3",revision:"bdbc0b25f3c1a1d09a157ae5923573cd"},{url:"sounds/Teams Ping.mp3",revision:"9c4446c079e89828abcae8aca5663c12"},{url:"pwa/image/pwa-64x64.png",revision:"b4ca4c3d8333391f20cddbb3f6cca2df"},{url:"pwa/image/pwa-512x512.png",revision:"57cc60501279a6d172b32211b1c67688"},{url:"pwa/image/pwa-192x192.png",revision:"81802c789e8b735f7f8b181f002932f8"},{url:"pwa/image/maskable-icon-512x512.png",revision:"dfa412c4bbe0f716216ac5db7a4c706d"},{url:"pwa/image/logo.svg",revision:"899b27b2269e41899c7422cfa4c389e5"},{url:"pwa/image/favicon.ico",revision:"8e3a55390cf66d227f765a6063bb6c31"},{url:"pwa/image/apple-touch-icon-180x180.png",revision:"3180606ea2115ea1af7e66dbeb1b28fd"},{url:"assets/visitorId-D_nwlNzA.js",revision:null},{url:"assets/vendor-vuetify-DsKlzgKp.js",revision:null},{url:"assets/vendor-vue-BiQC5iF7.js",revision:null},{url:"assets/vendor-utils-DwALrQNc.js",revision:null},{url:"assets/vendor-socket-dm1FmSOd.js",revision:null},{url:"assets/soundList-D9U-Grcp.js",revision:null},{url:"assets/socketClient-BKHEsaLg.js",revision:null},{url:"assets/socket-debugger-B22H3Il3.css",revision:null},{url:"assets/socket-debugger-AgrQ1Sap.js",revision:null},{url:"assets/settings-DjXlifwc.js",revision:null},{url:"assets/settings-BxfdCqX7.css",revision:null},{url:"assets/serverRotation-BtcwvdZJ.js",revision:null},{url:"assets/materialdesignicons-webfont-Dp5v-WZN.woff2",revision:null},{url:"assets/materialdesignicons-webfont-B7mPwVP_.ttf",revision:null},{url:"assets/index-ghQi_28l.js",revision:null},{url:"assets/index-Yfd4JoUB.css",revision:null},{url:"assets/index-DdToQrR8.js",revision:null},{url:"assets/index-DGIAsv4W.js",revision:null},{url:"assets/index-DCuIjJC4.js",revision:null},{url:"assets/index-BFmbztHq.css",revision:null},{url:"assets/index-7Awvo4-J.js",revision:null},{url:"assets/fp.esm-p88LZBod.js",revision:null},{url:"assets/examschedule-D7wPNFui.css",revision:null},{url:"assets/examschedule-BZ-idwf4.js",revision:null},{url:"assets/deviceEvents-HN9RDua9.js",revision:null},{url:"assets/default-VxHjJPAZ.js",revision:null},{url:"assets/default-CmdaPMSp.css",revision:null},{url:"assets/debug-socket-iwz8uZ6l.js",revision:null},{url:"assets/debug-init-57thZXh2.js",revision:null},{url:"assets/debug-DCZMB0S_.js",revision:null},{url:"assets/debug-CbS14biG.css",revision:null},{url:"assets/dataProvider-GWPC-0Vt.js",revision:null},{url:"assets/cses2wakeup-DRhHxOpY.js",revision:null},{url:"assets/cses2wakeup-DFUa6tSq.css",revision:null},{url:"assets/core-Cy2g3AD-.js",revision:null},{url:"assets/authorize-CZL9tEmI.js",revision:null},{url:"assets/_id_-DjPmieQy.js",revision:null},{url:"assets/_id_-DMpTK4Oz.js",revision:null},{url:"assets/VTooltip-D7EaNDeY.css",revision:null},{url:"assets/VTooltip-2IUjfpCS.js",revision:null},{url:"assets/VTimePicker-BkWY3_8P.css",revision:null},{url:"assets/VTimePicker-BApLLZ8X.js",revision:null},{url:"assets/VTextarea-vGWmTJww.js",revision:null},{url:"assets/VTextarea-_xVwaw_z.css",revision:null},{url:"assets/VTextField-DTDEIDq0.css",revision:null},{url:"assets/VTextField-BurlcggD.js",revision:null},{url:"assets/VTabs-DqmvmKGK.js",revision:null},{url:"assets/VTabs-566n5b08.css",revision:null},{url:"assets/VTable-Cq72iBVc.js",revision:null},{url:"assets/VTable-CNLJxQof.css",revision:null},{url:"assets/VSwitch-k6hfPfa2.js",revision:null},{url:"assets/VSwitch-Bk42mIwg.css",revision:null},{url:"assets/VSkeletonLoader-DwE_iqTb.js",revision:null},{url:"assets/VSkeletonLoader-C11ZEozu.css",revision:null},{url:"assets/VSheet-DxsDksIw.css",revision:null},{url:"assets/VSheet-BBnSA_kJ.js",revision:null},{url:"assets/VSelect-oxA0t9CG.js",revision:null},{url:"assets/VSelect-DHZViySU.css",revision:null},{url:"assets/VRow-D2ArqUC2.css",revision:null},{url:"assets/VRow-Cjhiymuu.js",revision:null},{url:"assets/VPicker-SM18M-iq.js",revision:null},{url:"assets/VPicker-Dm9DplUc.css",revision:null},{url:"assets/VPagination-DLzhjdaP.js",revision:null},{url:"assets/VPagination-BF2MZmld.css",revision:null},{url:"assets/VForm-ObW_L7SS.js",revision:null},{url:"assets/VExpansionPanels-kEj4ZJQK.css",revision:null},{url:"assets/VExpansionPanels-BDI8gHu5.js",revision:null},{url:"assets/VDatePicker-zglzEVGT.css",revision:null},{url:"assets/VDatePicker-CuGF0KeL.js",revision:null},{url:"assets/VDataTable-DmTCHg4b.js",revision:null},{url:"assets/VDataTable-Cl7qiDOP.css",revision:null},{url:"assets/VContainer-DZyPrcqa.js",revision:null},{url:"assets/VContainer-B1KSavhG.css",revision:null},{url:"assets/VCombobox-r6cc1Iy_.css",revision:null},{url:"assets/VCombobox-BGa7K58w.js",revision:null},{url:"assets/VChip-mRzIPuM0.js",revision:null},{url:"assets/VChip-Dmz_1Lnv.css",revision:null},{url:"assets/VCheckboxBtn-BKcSogH0.js",revision:null},{url:"assets/VCheckbox-ZL-u1kGB.css",revision:null},{url:"assets/VCheckbox-BRi_fHJs.js",revision:null},{url:"assets/VAutocomplete-Ygy_KjMW.css",revision:null},{url:"assets/VAutocomplete-N0zTUlyj.js",revision:null},{url:"assets/VAppBarTitle-DheyIZnb.js",revision:null},{url:"assets/VAppBarTitle-CczdD-Q2.css",revision:null},{url:"assets/VAlert-D_OX1cfW.css",revision:null},{url:"assets/VAlert-BZ4-f-hy.js",revision:null},{url:"assets/UrgentTestDialog-BqTcJt8c.js",revision:null},{url:"assets/UrgentTestDialog-65OEJ5uz.css",revision:null},{url:"assets/StudentNameManager-tn0RQdqM.css",revision:null},{url:"assets/StudentNameManager-DB-P5C67.js",revision:null},{url:"assets/RandomPicker-CsXS_sbB.js",revision:null},{url:"assets/RandomPicker-CU-edGvg.css",revision:null},{url:"assets/PwaInstallCard-DM1cBO1c.js",revision:null},{url:"assets/MessageLog-CZsTVP4i.js",revision:null},{url:"assets/MessageLog-BGkFwivK.css",revision:null},{url:"assets/InitServiceChooser-Cm36vuZZ.js",revision:null},{url:"assets/InitServiceChooser-BSZJBnhr.css",revision:null},{url:"assets/HomeworkEditDialog-DSAcf9mw.css",revision:null},{url:"assets/HomeworkEditDialog-BpaBTmY_.js",revision:null},{url:"assets/FloatingToolbar-BZD3ZR8B.js",revision:null},{url:"assets/FloatingToolbar-5gVX85mk.css",revision:null},{url:"assets/ExamScheduleCard-DhbbmO7J.js",revision:null},{url:"assets/ExamScheduleCard-BJuKYvRa.css",revision:null},{url:"assets/ExamConfigEditor-HgNV6CVV.css",revision:null},{url:"assets/ExamConfigEditor-BVwEXehR.js",revision:null},{url:"assets/ChatWidget-ChgL-O5B.css",revision:null},{url:"assets/ChatWidget-BXhjl6gS.js",revision:null},{url:"assets/CacheManagement-3L-v8_PB.js",revision:null},{url:"assets/AttendanceSidebar-DmtvE998.js",revision:null},{url:"assets/AttendanceManagementDialog-D0prZwJd.css",revision:null},{url:"assets/AttendanceManagementDialog-BpjEre5P.js",revision:null},{url:"assets/404-D89xq0CT.js",revision:null},{url:"pwa/image/maskable-icon-512x512.png",revision:"dfa412c4bbe0f716216ac5db7a4c706d"},{url:"pwa/image/pwa-192x192.png",revision:"81802c789e8b735f7f8b181f002932f8"},{url:"pwa/image/pwa-512x512.png",revision:"57cc60501279a6d172b32211b1c67688"},{url:"pwa/image/pwa-64x64.png",revision:"b4ca4c3d8333391f20cddbb3f6cca2df"},{url:"manifest.webmanifest",revision:"332c2eee06c240aeb7a94fc37d8d6cb1"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/api\//,/^\/socket\.io\//]})),s.registerRoute(({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/assets/"),new s.CacheFirst({cacheName:"assets-cache",plugins:[new s.ExpirationPlugin({maxEntries:200,maxAgeSeconds:5184e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/sounds/"),new s.CacheFirst({cacheName:"sound-cache",plugins:[new s.ExpirationPlugin({maxEntries:80,maxAgeSeconds:2592e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(({url:s,sameOrigin:e})=>e&&s.pathname.startsWith("/pwa/"),new s.StaleWhileRevalidate({cacheName:"pwa-cache",plugins:[new s.ExpirationPlugin({maxEntries:50,maxAgeSeconds:604800}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(({url:s,sameOrigin:e})=>{if(!e)return!1;const i=s.pathname;return!(i.includes("/assets/")||i.includes("/pwa/")||i.includes("/sounds/"))},new s.NetworkFirst({cacheName:"other-resources",networkTimeoutSeconds:10,plugins:[new s.ExpirationPlugin({maxEntries:100,maxAgeSeconds:86400}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")});